diff --git a/public/demo/dxf_5.html b/public/demo/dxf_5.html index 7f81817..1cff2ae 100644 --- a/public/demo/dxf_5.html +++ b/public/demo/dxf_5.html @@ -78,8 +78,10 @@
- - + + + +
@@ -197,6 +199,8 @@ const getMarkupDataBtn = document.getElementById("GetMarkupData"); const setMarkupDataBtn = document.getElementById("SetMarkupData"); + const updateMarkupDataBtn = document.getElementById("UpdateMarkupData"); + const removeMarkupDataBtn = document.getElementById("RemoveMarkupData"); const markupDataTxt = document.getElementById("MarkupData"); getMarkupDataBtn.onclick = () => { const markups = viewer.getMarkups(); @@ -212,9 +216,37 @@ }; setMarkupDataBtn.onclick = () => { try { - const val = JSON.parse(markupDataTxt.value); - console.log(val); - viewer.setMarkups(val); + const markups = JSON.parse(markupDataTxt.value); + console.log(markups); + viewer.setMarkups(markups); + } catch (ex) { + console.warn(ex); + } + }; + updateMarkupDataBtn.onclick = () => { + try { + const markups = JSON.parse(markupDataTxt.value); + console.log(markups); + // update markups one by one + for (let i = 0; i < markups.length; ++i) { + const ret = viewer.updateMarkup(markups[i]); + const str = `[Demo] ${ret ? "Updated" : "Failed to"} markup with id: ${markups[i].id}`; + console.log(str); + } + } catch (ex) { + console.warn(ex); + } + }; + removeMarkupDataBtn.onclick = () => { + try { + const markups = JSON.parse(markupDataTxt.value); + console.log(markups); + // remove markups one by one + for (let i = 0; i < markups.length; ++i) { + const ret = viewer.removeMarkup(markups[i].id); + const str = `[Demo] ${ret ? "Updated" : "Failed to"} markup with id: ${markups[i].id}`; + console.log(str); + } } catch (ex) { console.warn(ex); } diff --git a/public/demo/libs/gemini-viewer.esm.min.js b/public/demo/libs/gemini-viewer.esm.min.js index 849ce23..6d8f6da 100644 --- a/public/demo/libs/gemini-viewer.esm.min.js +++ b/public/demo/libs/gemini-viewer.esm.min.js @@ -1,10909 +1,7 @@ /** - * @pattern-x/gemini-viewer-threejs v0.2.23 build Sun Mar 05 2023 + * @pattern-x/gemini-viewer-threejs v0.2.25 build Wed Mar 22 2023 * https://pattern-x.github.io/gemini-viewer-examples/ * Copyright 2023 gemini * @license UNLICENSED */ -var nNe=Object.create;var e1=Object.defineProperty,sNe=Object.defineProperties,aNe=Object.getOwnPropertyDescriptor,oNe=Object.getOwnPropertyDescriptors,lNe=Object.getOwnPropertyNames,_7=Object.getOwnPropertySymbols,R7=Object.getPrototypeOf,M7=Object.prototype.hasOwnProperty,cNe=Object.prototype.propertyIsEnumerable,uNe=Reflect.get;var Gh=Math.pow,w7=(t,r,e)=>r in t?e1(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,Ur=(t,r)=>{for(var e in r||(r={}))M7.call(r,e)&&w7(t,e,r[e]);if(_7)for(var e of _7(r))cNe.call(r,e)&&w7(t,e,r[e]);return t},Mn=(t,r)=>sNe(t,oNe(r));var zP=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(r,e)=>(typeof require!="undefined"?require:r)[e]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var hNe=(t,r)=>()=>(t&&(r=t(t=0)),r);var V=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),z_=(t,r)=>{for(var e in r)e1(t,e,{get:r[e],enumerable:!0})},D7=(t,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of lNe(r))!M7.call(t,n)&&n!==e&&e1(t,n,{get:()=>r[n],enumerable:!(i=aNe(r,n))||i.enumerable});return t};var Un=(t,r,e)=>(e=t!=null?nNe(R7(t)):{},D7(r||!t||!t.__esModule?e1(e,"default",{value:t,enumerable:!0}):e,t)),pNe=t=>D7(e1({},"__esModule",{value:!0}),t);var C7=(t,r,e)=>uNe(R7(t),e,r);var ot=(t,r,e)=>new Promise((i,n)=>{var s=l=>{try{o(e.next(l))}catch(c){n(c)}},a=l=>{try{o(e.throw(l))}catch(c){n(c)}},o=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,a);o((e=e.apply(t,r)).next())});var P7={};z_(P7,{default:()=>TNe});function j_(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?j_=function(r){return typeof r}:j_=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},j_(t)}function fNe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function A7(t,r){for(var e=0;e1&&arguments[1]!==void 0?arguments[1]:{};fNe(this,a),this._locale=n(o),this._select=r(this._locale),this._type=yNe(l.type),this._nf=new t("en",l)}return mNe(a,[{key:"resolvedOptions",value:function(){var l=this._nf.resolvedOptions(),c=l.minimumIntegerDigits,u=l.minimumFractionDigits,h=l.maximumFractionDigits,p=l.minimumSignificantDigits,d=l.maximumSignificantDigits,f={locale:this._locale,minimumIntegerDigits:c,minimumFractionDigits:u,maximumFractionDigits:h,pluralCategories:e(this._locale,this._type==="ordinal"),type:this._type};return typeof p=="number"&&(f.minimumSignificantDigits=p,f.maximumSignificantDigits=d),f}},{key:"select",value:function(l){if(!(this instanceof a))throw new TypeError("select() called on incompatible ".concat(this));if(typeof l!="number"&&(l=Number(l)),!isFinite(l))return"other";var c=this._nf.format(Math.abs(l));return this._select(c,this._type==="ordinal")}}],[{key:"supportedLocalesOf",value:function(l){return O7(l).filter(i)}}]),a}();return Object.defineProperty(s,"prototype",{writable:!1}),s}var gNe,O7,vNe,yNe,N7=hNe(()=>{gNe=function(r){return r.split("-").every(function(e){return/[a-z0-9]+/i.test(e)})},O7=function(r){if(!r)return[];Array.isArray(r)||(r=[r]);for(var e={},i=0;i{"use strict";function ENe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function L7(t,r){for(var e=0;e="0"&&a<="9"&&++n}return nthis._maxSD?e.toPrecision(this._maxSD):i}return this._minFD>0?e.toFixed(this._minFD):this._maxFD===0?e.toFixed(0):String(e)}}]),t}();F7.exports=xNe});var W7=V((nLt,j7)=>{"use strict";var INe=(N7(),pNe(P7)),SNe=H7();function U7(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var _Ne=U7(INe),wNe=U7(SNe);function W_(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W_=function(r){return typeof r}:W_=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},W_(t)}var B7=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function k7(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jP={exports:{}};(function(t,r){var e=function(c,u){return u?"other":c==1?"one":"other"},i=function(c,u){return u?"other":c==0||c==1?"one":"other"},n=function(c,u){return u?"other":c>=0&&c<=1?"one":"other"},s=function(c,u){var h=String(c).split("."),p=!h[1];return u?"other":c==1&&p?"one":"other"},a=function(c,u){return"other"},o=function(c,u){return u?"other":c==1?"one":c==2?"two":"other"};(function(l,c){Object.defineProperty(c,"__esModule",{value:!0}),t.exports=c})(B7,{_in:a,af:e,ak:i,am:n,an:e,ar:function(c,u){var h=String(c).split("."),p=Number(h[0])==c,d=p&&h[0].slice(-2);return u?"other":c==0?"zero":c==1?"one":c==2?"two":d>=3&&d<=10?"few":d>=11&&d<=99?"many":"other"},ars:function(c,u){var h=String(c).split("."),p=Number(h[0])==c,d=p&&h[0].slice(-2);return u?"other":c==0?"zero":c==1?"one":c==2?"two":d>=3&&d<=10?"few":d>=11&&d<=99?"many":"other"},as:function(c,u){return u?c==1||c==5||c==7||c==8||c==9||c==10?"one":c==2||c==3?"two":c==4?"few":c==6?"many":"other":c>=0&&c<=1?"one":"other"},asa:e,ast:s,az:function(c,u){var h=String(c).split("."),p=h[0],d=p.slice(-1),f=p.slice(-2),m=p.slice(-3);return u?d==1||d==2||d==5||d==7||d==8||f==20||f==50||f==70||f==80?"one":d==3||d==4||m==100||m==200||m==300||m==400||m==500||m==600||m==700||m==800||m==900?"few":p==0||d==6||f==40||f==60||f==90?"many":"other":c==1?"one":"other"},be:function(c,u){var h=String(c).split("."),p=Number(h[0])==c,d=p&&h[0].slice(-1),f=p&&h[0].slice(-2);return u?(d==2||d==3)&&f!=12&&f!=13?"few":"other":d==1&&f!=11?"one":d>=2&&d<=4&&(f<12||f>14)?"few":p&&d==0||d>=5&&d<=9||f>=11&&f<=14?"many":"other"},bem:e,bez:e,bg:e,bho:i,bm:a,bn:function(c,u){return u?c==1||c==5||c==7||c==8||c==9||c==10?"one":c==2||c==3?"two":c==4?"few":c==6?"many":"other":c>=0&&c<=1?"one":"other"},bo:a,br:function(c,u){var h=String(c).split("."),p=Number(h[0])==c,d=p&&h[0].slice(-1),f=p&&h[0].slice(-2),m=p&&h[0].slice(-6);return u?"other":d==1&&f!=11&&f!=71&&f!=91?"one":d==2&&f!=12&&f!=72&&f!=92?"two":(d==3||d==4||d==9)&&(f<10||f>19)&&(f<70||f>79)&&(f<90||f>99)?"few":c!=0&&p&&m==0?"many":"other"},brx:e,bs:function(c,u){var h=String(c).split("."),p=h[0],d=h[1]||"",f=!h[1],m=p.slice(-1),g=p.slice(-2),y=d.slice(-1),E=d.slice(-2);return u?"other":f&&m==1&&g!=11||y==1&&E!=11?"one":f&&m>=2&&m<=4&&(g<12||g>14)||y>=2&&y<=4&&(E<12||E>14)?"few":"other"},ca:function(c,u){var h=String(c).split("."),p=!h[1];return u?c==1||c==3?"one":c==2?"two":c==4?"few":"other":c==1&&p?"one":"other"},ce:e,ceb:function(c,u){var h=String(c).split("."),p=h[0],d=h[1]||"",f=!h[1],m=p.slice(-1),g=d.slice(-1);return u?"other":f&&(p==1||p==2||p==3)||f&&m!=4&&m!=6&&m!=9||!f&&g!=4&&g!=6&&g!=9?"one":"other"},cgg:e,chr:e,ckb:e,cs:function(c,u){var h=String(c).split("."),p=h[0],d=!h[1];return u?"other":c==1&&d?"one":p>=2&&p<=4&&d?"few":d?"other":"many"},cy:function(c,u){return u?c==0||c==7||c==8||c==9?"zero":c==1?"one":c==2?"two":c==3||c==4?"few":c==5||c==6?"many":"other":c==0?"zero":c==1?"one":c==2?"two":c==3?"few":c==6?"many":"other"},da:function(c,u){var h=String(c).split("."),p=h[0],d=Number(h[0])==c;return u?"other":c==1||!d&&(p==0||p==1)?"one":"other"},de:s,doi:n,dsb:function(c,u){var h=String(c).split("."),p=h[0],d=h[1]||"",f=!h[1],m=p.slice(-2),g=d.slice(-2);return u?"other":f&&m==1||g==1?"one":f&&m==2||g==2?"two":f&&(m==3||m==4)||g==3||g==4?"few":"other"},dv:e,dz:a,ee:e,el:e,en:function(c,u){var h=String(c).split("."),p=!h[1],d=Number(h[0])==c,f=d&&h[0].slice(-1),m=d&&h[0].slice(-2);return u?f==1&&m!=11?"one":f==2&&m!=12?"two":f==3&&m!=13?"few":"other":c==1&&p?"one":"other"},eo:e,es:e,et:s,eu:e,fa:n,ff:function(c,u){return u?"other":c>=0&&c<2?"one":"other"},fi:s,fil:function(c,u){var h=String(c).split("."),p=h[0],d=h[1]||"",f=!h[1],m=p.slice(-1),g=d.slice(-1);return u?c==1?"one":"other":f&&(p==1||p==2||p==3)||f&&m!=4&&m!=6&&m!=9||!f&&g!=4&&g!=6&&g!=9?"one":"other"},fo:e,fr:function(c,u){var h=String(c).split("."),p=h[0],d=!h[1],f=p.slice(-6);return u?c==1?"one":"other":c>=0&&c<2?"one":p!=0&&f==0&&d?"many":"other"},fur:e,fy:s,ga:function(c,u){var h=String(c).split("."),p=Number(h[0])==c;return u?c==1?"one":"other":c==1?"one":c==2?"two":p&&c>=3&&c<=6?"few":p&&c>=7&&c<=10?"many":"other"},gd:function(c,u){var h=String(c).split("."),p=Number(h[0])==c;return u?c==1||c==11?"one":c==2||c==12?"two":c==3||c==13?"few":"other":c==1||c==11?"one":c==2||c==12?"two":p&&c>=3&&c<=10||p&&c>=13&&c<=19?"few":"other"},gl:s,gsw:e,gu:function(c,u){return u?c==1?"one":c==2||c==3?"two":c==4?"few":c==6?"many":"other":c>=0&&c<=1?"one":"other"},guw:i,gv:function(c,u){var h=String(c).split("."),p=h[0],d=!h[1],f=p.slice(-1),m=p.slice(-2);return u?"other":d&&f==1?"one":d&&f==2?"two":d&&(m==0||m==20||m==40||m==60||m==80)?"few":d?"other":"many"},ha:e,haw:e,he:function(c,u){var h=String(c).split("."),p=h[0],d=!h[1],f=Number(h[0])==c,m=f&&h[0].slice(-1);return u?"other":c==1&&d?"one":p==2&&d?"two":d&&(c<0||c>10)&&f&&m==0?"many":"other"},hi:function(c,u){return u?c==1?"one":c==2||c==3?"two":c==4?"few":c==6?"many":"other":c>=0&&c<=1?"one":"other"},hr:function(c,u){var h=String(c).split("."),p=h[0],d=h[1]||"",f=!h[1],m=p.slice(-1),g=p.slice(-2),y=d.slice(-1),E=d.slice(-2);return u?"other":f&&m==1&&g!=11||y==1&&E!=11?"one":f&&m>=2&&m<=4&&(g<12||g>14)||y>=2&&y<=4&&(E<12||E>14)?"few":"other"},hsb:function(c,u){var h=String(c).split("."),p=h[0],d=h[1]||"",f=!h[1],m=p.slice(-2),g=d.slice(-2);return u?"other":f&&m==1||g==1?"one":f&&m==2||g==2?"two":f&&(m==3||m==4)||g==3||g==4?"few":"other"},hu:function(c,u){return u?c==1||c==5?"one":"other":c==1?"one":"other"},hy:function(c,u){return u?c==1?"one":"other":c>=0&&c<2?"one":"other"},ia:s,id:a,ig:a,ii:a,io:s,is:function(c,u){var h=String(c).split("."),p=h[0],d=Number(h[0])==c,f=p.slice(-1),m=p.slice(-2);return u?"other":d&&f==1&&m!=11||!d?"one":"other"},it:function(c,u){var h=String(c).split("."),p=!h[1];return u?c==11||c==8||c==80||c==800?"many":"other":c==1&&p?"one":"other"},iu:o,iw:function(c,u){var h=String(c).split("."),p=h[0],d=!h[1],f=Number(h[0])==c,m=f&&h[0].slice(-1);return u?"other":c==1&&d?"one":p==2&&d?"two":d&&(c<0||c>10)&&f&&m==0?"many":"other"},ja:a,jbo:a,jgo:e,ji:s,jmc:e,jv:a,jw:a,ka:function(c,u){var h=String(c).split("."),p=h[0],d=p.slice(-2);return u?p==1?"one":p==0||d>=2&&d<=20||d==40||d==60||d==80?"many":"other":c==1?"one":"other"},kab:function(c,u){return u?"other":c>=0&&c<2?"one":"other"},kaj:e,kcg:e,kde:a,kea:a,kk:function(c,u){var h=String(c).split("."),p=Number(h[0])==c,d=p&&h[0].slice(-1);return u?d==6||d==9||p&&d==0&&c!=0?"many":"other":c==1?"one":"other"},kkj:e,kl:e,km:a,kn:n,ko:a,ks:e,ksb:e,ksh:function(c,u){return u?"other":c==0?"zero":c==1?"one":"other"},ku:e,kw:function(c,u){var h=String(c).split("."),p=Number(h[0])==c,d=p&&h[0].slice(-2),f=p&&h[0].slice(-3),m=p&&h[0].slice(-5),g=p&&h[0].slice(-6);return u?p&&c>=1&&c<=4||d>=1&&d<=4||d>=21&&d<=24||d>=41&&d<=44||d>=61&&d<=64||d>=81&&d<=84?"one":c==5||d==5?"many":"other":c==0?"zero":c==1?"one":d==2||d==22||d==42||d==62||d==82||p&&f==0&&(m>=1e3&&m<=2e4||m==4e4||m==6e4||m==8e4)||c!=0&&g==1e5?"two":d==3||d==23||d==43||d==63||d==83?"few":c!=1&&(d==1||d==21||d==41||d==61||d==81)?"many":"other"},ky:e,lag:function(c,u){var h=String(c).split("."),p=h[0];return u?"other":c==0?"zero":(p==0||p==1)&&c!=0?"one":"other"},lb:e,lg:e,lij:function(c,u){var h=String(c).split("."),p=!h[1],d=Number(h[0])==c;return u?c==11||c==8||d&&c>=80&&c<=89||d&&c>=800&&c<=899?"many":"other":c==1&&p?"one":"other"},lkt:a,ln:i,lo:function(c,u){return u&&c==1?"one":"other"},lt:function(c,u){var h=String(c).split("."),p=h[1]||"",d=Number(h[0])==c,f=d&&h[0].slice(-1),m=d&&h[0].slice(-2);return u?"other":f==1&&(m<11||m>19)?"one":f>=2&&f<=9&&(m<11||m>19)?"few":p!=0?"many":"other"},lv:function(c,u){var h=String(c).split("."),p=h[1]||"",d=p.length,f=Number(h[0])==c,m=f&&h[0].slice(-1),g=f&&h[0].slice(-2),y=p.slice(-2),E=p.slice(-1);return u?"other":f&&m==0||g>=11&&g<=19||d==2&&y>=11&&y<=19?"zero":m==1&&g!=11||d==2&&E==1&&y!=11||d!=2&&E==1?"one":"other"},mas:e,mg:i,mgo:e,mk:function(c,u){var h=String(c).split("."),p=h[0],d=h[1]||"",f=!h[1],m=p.slice(-1),g=p.slice(-2),y=d.slice(-1),E=d.slice(-2);return u?m==1&&g!=11?"one":m==2&&g!=12?"two":(m==7||m==8)&&g!=17&&g!=18?"many":"other":f&&m==1&&g!=11||y==1&&E!=11?"one":"other"},ml:e,mn:e,mo:function(c,u){var h=String(c).split("."),p=!h[1],d=Number(h[0])==c,f=d&&h[0].slice(-2);return u?c==1?"one":"other":c==1&&p?"one":!p||c==0||f>=2&&f<=19?"few":"other"},mr:function(c,u){return u?c==1?"one":c==2||c==3?"two":c==4?"few":"other":c==1?"one":"other"},ms:function(c,u){return u&&c==1?"one":"other"},mt:function(c,u){var h=String(c).split("."),p=Number(h[0])==c,d=p&&h[0].slice(-2);return u?"other":c==1?"one":c==0||d>=2&&d<=10?"few":d>=11&&d<=19?"many":"other"},my:a,nah:e,naq:o,nb:e,nd:e,ne:function(c,u){var h=String(c).split("."),p=Number(h[0])==c;return u?p&&c>=1&&c<=4?"one":"other":c==1?"one":"other"},nl:s,nn:e,nnh:e,no:e,nqo:a,nr:e,nso:i,ny:e,nyn:e,om:e,or:function(c,u){var h=String(c).split("."),p=Number(h[0])==c;return u?c==1||c==5||p&&c>=7&&c<=9?"one":c==2||c==3?"two":c==4?"few":c==6?"many":"other":c==1?"one":"other"},os:e,osa:a,pa:i,pap:e,pcm:n,pl:function(c,u){var h=String(c).split("."),p=h[0],d=!h[1],f=p.slice(-1),m=p.slice(-2);return u?"other":c==1&&d?"one":d&&f>=2&&f<=4&&(m<12||m>14)?"few":d&&p!=1&&(f==0||f==1)||d&&f>=5&&f<=9||d&&m>=12&&m<=14?"many":"other"},prg:function(c,u){var h=String(c).split("."),p=h[1]||"",d=p.length,f=Number(h[0])==c,m=f&&h[0].slice(-1),g=f&&h[0].slice(-2),y=p.slice(-2),E=p.slice(-1);return u?"other":f&&m==0||g>=11&&g<=19||d==2&&y>=11&&y<=19?"zero":m==1&&g!=11||d==2&&E==1&&y!=11||d!=2&&E==1?"one":"other"},ps:e,pt:function(c,u){var h=String(c).split("."),p=h[0];return u?"other":p==0||p==1?"one":"other"},pt_PT:s,rm:e,ro:function(c,u){var h=String(c).split("."),p=!h[1],d=Number(h[0])==c,f=d&&h[0].slice(-2);return u?c==1?"one":"other":c==1&&p?"one":!p||c==0||f>=2&&f<=19?"few":"other"},rof:e,root:a,ru:function(c,u){var h=String(c).split("."),p=h[0],d=!h[1],f=p.slice(-1),m=p.slice(-2);return u?"other":d&&f==1&&m!=11?"one":d&&f>=2&&f<=4&&(m<12||m>14)?"few":d&&f==0||d&&f>=5&&f<=9||d&&m>=11&&m<=14?"many":"other"},rwk:e,sah:a,saq:e,sat:o,sc:function(c,u){var h=String(c).split("."),p=!h[1];return u?c==11||c==8||c==80||c==800?"many":"other":c==1&&p?"one":"other"},scn:function(c,u){var h=String(c).split("."),p=!h[1];return u?c==11||c==8||c==80||c==800?"many":"other":c==1&&p?"one":"other"},sd:e,sdh:e,se:o,seh:e,ses:a,sg:a,sh:function(c,u){var h=String(c).split("."),p=h[0],d=h[1]||"",f=!h[1],m=p.slice(-1),g=p.slice(-2),y=d.slice(-1),E=d.slice(-2);return u?"other":f&&m==1&&g!=11||y==1&&E!=11?"one":f&&m>=2&&m<=4&&(g<12||g>14)||y>=2&&y<=4&&(E<12||E>14)?"few":"other"},shi:function(c,u){var h=String(c).split("."),p=Number(h[0])==c;return u?"other":c>=0&&c<=1?"one":p&&c>=2&&c<=10?"few":"other"},si:function(c,u){var h=String(c).split("."),p=h[0],d=h[1]||"";return u?"other":c==0||c==1||p==0&&d==1?"one":"other"},sk:function(c,u){var h=String(c).split("."),p=h[0],d=!h[1];return u?"other":c==1&&d?"one":p>=2&&p<=4&&d?"few":d?"other":"many"},sl:function(c,u){var h=String(c).split("."),p=h[0],d=!h[1],f=p.slice(-2);return u?"other":d&&f==1?"one":d&&f==2?"two":d&&(f==3||f==4)||!d?"few":"other"},sma:o,smi:o,smj:o,smn:o,sms:o,sn:e,so:e,sq:function(c,u){var h=String(c).split("."),p=Number(h[0])==c,d=p&&h[0].slice(-1),f=p&&h[0].slice(-2);return u?c==1?"one":d==4&&f!=14?"many":"other":c==1?"one":"other"},sr:function(c,u){var h=String(c).split("."),p=h[0],d=h[1]||"",f=!h[1],m=p.slice(-1),g=p.slice(-2),y=d.slice(-1),E=d.slice(-2);return u?"other":f&&m==1&&g!=11||y==1&&E!=11?"one":f&&m>=2&&m<=4&&(g<12||g>14)||y>=2&&y<=4&&(E<12||E>14)?"few":"other"},ss:e,ssy:e,st:e,su:a,sv:function(c,u){var h=String(c).split("."),p=!h[1],d=Number(h[0])==c,f=d&&h[0].slice(-1),m=d&&h[0].slice(-2);return u?(f==1||f==2)&&m!=11&&m!=12?"one":"other":c==1&&p?"one":"other"},sw:s,syr:e,ta:e,te:e,teo:e,th:a,ti:i,tig:e,tk:function(c,u){var h=String(c).split("."),p=Number(h[0])==c,d=p&&h[0].slice(-1);return u?d==6||d==9||c==10?"few":"other":c==1?"one":"other"},tl:function(c,u){var h=String(c).split("."),p=h[0],d=h[1]||"",f=!h[1],m=p.slice(-1),g=d.slice(-1);return u?c==1?"one":"other":f&&(p==1||p==2||p==3)||f&&m!=4&&m!=6&&m!=9||!f&&g!=4&&g!=6&&g!=9?"one":"other"},tn:e,to:a,tr:e,ts:e,tzm:function(c,u){var h=String(c).split("."),p=Number(h[0])==c;return u?"other":c==0||c==1||p&&c>=11&&c<=99?"one":"other"},ug:e,uk:function(c,u){var h=String(c).split("."),p=h[0],d=!h[1],f=Number(h[0])==c,m=f&&h[0].slice(-1),g=f&&h[0].slice(-2),y=p.slice(-1),E=p.slice(-2);return u?m==3&&g!=13?"few":"other":d&&y==1&&E!=11?"one":d&&y>=2&&y<=4&&(E<12||E>14)?"few":d&&y==0||d&&y>=5&&y<=9||d&&E>=11&&E<=14?"many":"other"},ur:s,uz:e,ve:e,vi:function(c,u){return u&&c==1?"one":"other"},vo:e,vun:e,wa:i,wae:e,wo:a,xh:e,xog:e,yi:s,yo:a,yue:a,zh:a,zu:n})})(jP);var G7=k7(jP.exports),RNe=Object.freeze(Object.assign(Object.create(null),jP.exports,{default:G7})),WP={exports:{}};(function(t,r){var e="zero",i="one",n="two",s="few",a="many",o="other",l={cardinal:[i,o],ordinal:[o]},c={cardinal:[o],ordinal:[o]},u={cardinal:[i,s,a,o],ordinal:[o]},h={cardinal:[i,o],ordinal:[i,o]},p={cardinal:[i,n,o],ordinal:[o]};(function(d,f){Object.defineProperty(f,"__esModule",{value:!0}),t.exports=f})(B7,{_in:c,af:l,ak:l,am:l,an:l,ar:{cardinal:[e,i,n,s,a,o],ordinal:[o]},ars:{cardinal:[e,i,n,s,a,o],ordinal:[o]},as:{cardinal:[i,o],ordinal:[i,n,s,a,o]},asa:l,ast:l,az:{cardinal:[i,o],ordinal:[i,s,a,o]},be:{cardinal:[i,s,a,o],ordinal:[s,o]},bem:l,bez:l,bg:l,bho:l,bm:c,bn:{cardinal:[i,o],ordinal:[i,n,s,a,o]},bo:c,br:{cardinal:[i,n,s,a,o],ordinal:[o]},brx:l,bs:{cardinal:[i,s,o],ordinal:[o]},ca:{cardinal:[i,o],ordinal:[i,n,s,o]},ce:l,ceb:l,cgg:l,chr:l,ckb:l,cs:u,cy:{cardinal:[e,i,n,s,a,o],ordinal:[e,i,n,s,a,o]},da:l,de:l,doi:l,dsb:{cardinal:[i,n,s,o],ordinal:[o]},dv:l,dz:c,ee:l,el:l,en:{cardinal:[i,o],ordinal:[i,n,s,o]},eo:l,es:l,et:l,eu:l,fa:l,ff:l,fi:l,fil:h,fo:l,fr:{cardinal:[i,a,o],ordinal:[i,o]},fur:l,fy:l,ga:{cardinal:[i,n,s,a,o],ordinal:[i,o]},gd:{cardinal:[i,n,s,o],ordinal:[i,n,s,o]},gl:l,gsw:l,gu:{cardinal:[i,o],ordinal:[i,n,s,a,o]},guw:l,gv:{cardinal:[i,n,s,a,o],ordinal:[o]},ha:l,haw:l,he:{cardinal:[i,n,a,o],ordinal:[o]},hi:{cardinal:[i,o],ordinal:[i,n,s,a,o]},hr:{cardinal:[i,s,o],ordinal:[o]},hsb:{cardinal:[i,n,s,o],ordinal:[o]},hu:h,hy:h,ia:l,id:c,ig:c,ii:c,io:l,is:l,it:{cardinal:[i,o],ordinal:[a,o]},iu:p,iw:{cardinal:[i,n,a,o],ordinal:[o]},ja:c,jbo:c,jgo:l,ji:l,jmc:l,jv:c,jw:c,ka:{cardinal:[i,o],ordinal:[i,a,o]},kab:l,kaj:l,kcg:l,kde:c,kea:c,kk:{cardinal:[i,o],ordinal:[a,o]},kkj:l,kl:l,km:c,kn:l,ko:c,ks:l,ksb:l,ksh:{cardinal:[e,i,o],ordinal:[o]},ku:l,kw:{cardinal:[e,i,n,s,a,o],ordinal:[i,a,o]},ky:l,lag:{cardinal:[e,i,o],ordinal:[o]},lb:l,lg:l,lij:{cardinal:[i,o],ordinal:[a,o]},lkt:c,ln:l,lo:{cardinal:[o],ordinal:[i,o]},lt:u,lv:{cardinal:[e,i,o],ordinal:[o]},mas:l,mg:l,mgo:l,mk:{cardinal:[i,o],ordinal:[i,n,a,o]},ml:l,mn:l,mo:{cardinal:[i,s,o],ordinal:[i,o]},mr:{cardinal:[i,o],ordinal:[i,n,s,o]},ms:{cardinal:[o],ordinal:[i,o]},mt:u,my:c,nah:l,naq:p,nb:l,nd:l,ne:h,nl:l,nn:l,nnh:l,no:l,nqo:c,nr:l,nso:l,ny:l,nyn:l,om:l,or:{cardinal:[i,o],ordinal:[i,n,s,a,o]},os:l,osa:c,pa:l,pap:l,pcm:l,pl:u,prg:{cardinal:[e,i,o],ordinal:[o]},ps:l,pt:l,pt_PT:l,rm:l,ro:{cardinal:[i,s,o],ordinal:[i,o]},rof:l,root:c,ru:u,rwk:l,sah:c,saq:l,sat:p,sc:{cardinal:[i,o],ordinal:[a,o]},scn:{cardinal:[i,o],ordinal:[a,o]},sd:l,sdh:l,se:p,seh:l,ses:c,sg:c,sh:{cardinal:[i,s,o],ordinal:[o]},shi:{cardinal:[i,s,o],ordinal:[o]},si:l,sk:u,sl:{cardinal:[i,n,s,o],ordinal:[o]},sma:p,smi:p,smj:p,smn:p,sms:p,sn:l,so:l,sq:{cardinal:[i,o],ordinal:[i,a,o]},sr:{cardinal:[i,s,o],ordinal:[o]},ss:l,ssy:l,st:l,su:c,sv:h,sw:l,syr:l,ta:l,te:l,teo:l,th:c,ti:l,tig:l,tk:{cardinal:[i,o],ordinal:[s,o]},tl:h,tn:l,to:c,tr:l,ts:l,tzm:l,ug:l,uk:{cardinal:[i,s,a,o],ordinal:[s,o]},ur:l,uz:l,ve:l,vi:{cardinal:[o],ordinal:[i,o]},vo:l,vun:l,wa:l,wae:l,wo:c,xh:l,xog:l,yi:l,yo:c,yue:c,zh:c,zu:l})})(WP);var V7=k7(WP.exports),MNe=Object.freeze(Object.assign(Object.create(null),WP.exports,{default:V7})),DNe=G7||RNe,CNe=V7||MNe,ANe=(typeof Intl=="undefined"?"undefined":W_(Intl))==="object"&&Intl.NumberFormat||wNe.default,z7=function(r){return r==="in"?"_in":r==="pt-PT"?"pt_PT":r},ONe=function(r){return DNe[z7(r)]},PNe=function(r,e){return CNe[z7(r)][e?"ordinal":"cardinal"]},NNe=_Ne.default(ANe,ONe,PNe);j7.exports=NNe});var X7=V(Y7=>{"use strict";var LNe=W7();function FNe(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var Rd=FNe(LNe);typeof Intl=="undefined"?(typeof global!="undefined"?global.Intl={PluralRules:Rd.default}:typeof window!="undefined"?window.Intl={PluralRules:Rd.default}:Y7.Intl={PluralRules:Rd.default},Rd.default.polyfill=!0):Intl.PluralRules?(qP=["en","es","ru","zh"],q7=Intl.PluralRules.supportedLocalesOf(qP),q7.length{var q_=function(t){return t&&t.Math==Math&&t};$7.exports=q_(typeof globalThis=="object"&&globalThis)||q_(typeof window=="object"&&window)||q_(typeof self=="object"&&self)||q_(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var Rt=V((oLt,Z7)=>{Z7.exports=function(t){try{return!!t()}catch(r){return!0}}});var Pr=V((lLt,K7)=>{var HNe=Rt();K7.exports=!HNe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var tv=V((cLt,J7)=>{var UNe=Rt();J7.exports=!UNe(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")})});var ni=V((uLt,Q7)=>{var BNe=tv(),Y_=Function.prototype.call;Q7.exports=BNe?Y_.bind(Y_):function(){return Y_.apply(Y_,arguments)}});var t1=V(r9=>{"use strict";var e9={}.propertyIsEnumerable,t9=Object.getOwnPropertyDescriptor,kNe=t9&&!e9.call({1:2},1);r9.f=kNe?function(r){var e=t9(this,r);return!!e&&e.enumerable}:e9});var Ao=V((pLt,i9)=>{i9.exports=function(t,r){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:r}}});var Bt=V((dLt,a9)=>{var n9=tv(),s9=Function.prototype,YP=s9.call,GNe=n9&&s9.bind.bind(YP,YP);a9.exports=n9?GNe:function(t){return function(){return YP.apply(t,arguments)}}});var fa=V((fLt,l9)=>{var o9=Bt(),VNe=o9({}.toString),zNe=o9("".slice);l9.exports=function(t){return zNe(VNe(t),8,-1)}});var xm=V((mLt,c9)=>{var jNe=Bt(),WNe=Rt(),qNe=fa(),XP=Object,YNe=jNe("".split);c9.exports=WNe(function(){return!XP("z").propertyIsEnumerable(0)})?function(t){return qNe(t)=="String"?YNe(t,""):XP(t)}:XP});var ma=V((gLt,u9)=>{u9.exports=function(t){return t==null}});var ls=V((vLt,h9)=>{var XNe=ma(),$Ne=TypeError;h9.exports=function(t){if(XNe(t))throw $Ne("Can't call method on "+t);return t}});var ga=V((yLt,p9)=>{var ZNe=xm(),KNe=ls();p9.exports=function(t){return ZNe(KNe(t))}});var ZP=V((TLt,d9)=>{var $P=typeof document=="object"&&document.all,JNe=typeof $P=="undefined"&&$P!==void 0;d9.exports={all:$P,IS_HTMLDDA:JNe}});var Ti=V((ELt,m9)=>{var f9=ZP(),QNe=f9.all;m9.exports=f9.IS_HTMLDDA?function(t){return typeof t=="function"||t===QNe}:function(t){return typeof t=="function"}});var si=V((bLt,y9)=>{var g9=Ti(),v9=ZP(),eLe=v9.all;y9.exports=v9.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:g9(t)||t===eLe}:function(t){return typeof t=="object"?t!==null:g9(t)}});var bn=V((xLt,T9)=>{var KP=ir(),tLe=Ti(),rLe=function(t){return tLe(t)?t:void 0};T9.exports=function(t,r){return arguments.length<2?rLe(KP[t]):KP[t]&&KP[t][r]}});var Oo=V((ILt,E9)=>{var iLe=Bt();E9.exports=iLe({}.isPrototypeOf)});var bu=V((SLt,b9)=>{var nLe=bn();b9.exports=nLe("navigator","userAgent")||""});var xu=V((_Lt,R9)=>{var w9=ir(),JP=bu(),x9=w9.process,I9=w9.Deno,S9=x9&&x9.versions||I9&&I9.version,_9=S9&&S9.v8,dc,X_;_9&&(dc=_9.split("."),X_=dc[0]>0&&dc[0]<4?1:+(dc[0]+dc[1]));!X_&&JP&&(dc=JP.match(/Edge\/(\d+)/),(!dc||dc[1]>=74)&&(dc=JP.match(/Chrome\/(\d+)/),dc&&(X_=+dc[1])));R9.exports=X_});var Im=V((wLt,D9)=>{var M9=xu(),sLe=Rt();D9.exports=!!Object.getOwnPropertySymbols&&!sLe(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&M9&&M9<41})});var QP=V((RLt,C9)=>{var aLe=Im();C9.exports=aLe&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Md=V((MLt,A9)=>{var oLe=bn(),lLe=Ti(),cLe=Oo(),uLe=QP(),hLe=Object;A9.exports=uLe?function(t){return typeof t=="symbol"}:function(t){var r=oLe("Symbol");return lLe(r)&&cLe(r.prototype,hLe(t))}});var Dd=V((DLt,O9)=>{var pLe=String;O9.exports=function(t){try{return pLe(t)}catch(r){return"Object"}}});var fs=V((CLt,P9)=>{var dLe=Ti(),fLe=Dd(),mLe=TypeError;P9.exports=function(t){if(dLe(t))return t;throw mLe(fLe(t)+" is not a function")}});var Iu=V((ALt,N9)=>{var gLe=fs(),vLe=ma();N9.exports=function(t,r){var e=t[r];return vLe(e)?void 0:gLe(e)}});var i2=V((OLt,L9)=>{var e2=ni(),t2=Ti(),r2=si(),yLe=TypeError;L9.exports=function(t,r){var e,i;if(r==="string"&&t2(e=t.toString)&&!r2(i=e2(e,t))||t2(e=t.valueOf)&&!r2(i=e2(e,t))||r!=="string"&&t2(e=t.toString)&&!r2(i=e2(e,t)))return i;throw yLe("Can't convert object to primitive value")}});var Bn=V((PLt,F9)=>{F9.exports=!1});var $_=V((NLt,U9)=>{var H9=ir(),TLe=Object.defineProperty;U9.exports=function(t,r){try{TLe(H9,t,{value:r,configurable:!0,writable:!0})}catch(e){H9[t]=r}return r}});var Z_=V((LLt,k9)=>{var ELe=ir(),bLe=$_(),B9="__core-js_shared__",xLe=ELe[B9]||bLe(B9,{});k9.exports=xLe});var Sm=V((FLt,V9)=>{var ILe=Bn(),G9=Z_();(V9.exports=function(t,r){return G9[t]||(G9[t]=r!==void 0?r:{})})("versions",[]).push({version:"3.27.1",mode:ILe?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.1/LICENSE",source:"https://github.com/zloirock/core-js"})});var Li=V((HLt,z9)=>{var SLe=ls(),_Le=Object;z9.exports=function(t){return _Le(SLe(t))}});var Si=V((ULt,j9)=>{var wLe=Bt(),RLe=Li(),MLe=wLe({}.hasOwnProperty);j9.exports=Object.hasOwn||function(r,e){return MLe(RLe(r),e)}});var _m=V((BLt,W9)=>{var DLe=Bt(),CLe=0,ALe=Math.random(),OLe=DLe(1 .toString);W9.exports=function(t){return"Symbol("+(t===void 0?"":t)+")_"+OLe(++CLe+ALe,36)}});var fi=V((kLt,Z9)=>{var PLe=ir(),NLe=Sm(),q9=Si(),LLe=_m(),Y9=Im(),$9=QP(),rv=NLe("wks"),wm=PLe.Symbol,X9=wm&&wm.for,FLe=$9?wm:wm&&wm.withoutSetter||LLe;Z9.exports=function(t){if(!q9(rv,t)||!(Y9||typeof rv[t]=="string")){var r="Symbol."+t;Y9&&q9(wm,t)?rv[t]=wm[t]:$9&&X9?rv[t]=X9(r):rv[t]=FLe(r)}return rv[t]}});var r1=V((GLt,Q9)=>{var HLe=ni(),K9=si(),J9=Md(),ULe=Iu(),BLe=i2(),kLe=fi(),GLe=TypeError,VLe=kLe("toPrimitive");Q9.exports=function(t,r){if(!K9(t)||J9(t))return t;var e=ULe(t,VLe),i;if(e){if(r===void 0&&(r="default"),i=HLe(e,t,r),!K9(i)||J9(i))return i;throw GLe("Can't convert object to primitive value")}return r===void 0&&(r="number"),BLe(t,r)}});var Vh=V((VLt,ez)=>{var zLe=r1(),jLe=Md();ez.exports=function(t){var r=zLe(t,"string");return jLe(r)?r:r+""}});var i1=V((zLt,rz)=>{var WLe=ir(),tz=si(),n2=WLe.document,qLe=tz(n2)&&tz(n2.createElement);rz.exports=function(t){return qLe?n2.createElement(t):{}}});var s2=V((jLt,iz)=>{var YLe=Pr(),XLe=Rt(),$Le=i1();iz.exports=!YLe&&!XLe(function(){return Object.defineProperty($Le("div"),"a",{get:function(){return 7}}).a!=7})});var Us=V(sz=>{var ZLe=Pr(),KLe=ni(),JLe=t1(),QLe=Ao(),eFe=ga(),tFe=Vh(),rFe=Si(),iFe=s2(),nz=Object.getOwnPropertyDescriptor;sz.f=ZLe?nz:function(r,e){if(r=eFe(r),e=tFe(e),iFe)try{return nz(r,e)}catch(i){}if(rFe(r,e))return QLe(!KLe(JLe.f,r,e),r[e])}});var a2=V((qLt,az)=>{var nFe=Pr(),sFe=Rt();az.exports=nFe&&sFe(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var jr=V((YLt,oz)=>{var aFe=si(),oFe=String,lFe=TypeError;oz.exports=function(t){if(aFe(t))return t;throw lFe(oFe(t)+" is not an object")}});var Vi=V(cz=>{var cFe=Pr(),uFe=s2(),hFe=a2(),K_=jr(),lz=Vh(),pFe=TypeError,o2=Object.defineProperty,dFe=Object.getOwnPropertyDescriptor,l2="enumerable",c2="configurable",u2="writable";cz.f=cFe?hFe?function(r,e,i){if(K_(r),e=lz(e),K_(i),typeof r=="function"&&e==="prototype"&&"value"in i&&u2 in i&&!i[u2]){var n=dFe(r,e);n&&n[u2]&&(r[e]=i.value,i={configurable:c2 in i?i[c2]:n[c2],enumerable:l2 in i?i[l2]:n[l2],writable:!1})}return o2(r,e,i)}:o2:function(r,e,i){if(K_(r),e=lz(e),K_(i),uFe)try{return o2(r,e,i)}catch(n){}if("get"in i||"set"in i)throw pFe("Accessors not supported");return"value"in i&&(r[e]=i.value),r}});var va=V(($Lt,uz)=>{var fFe=Pr(),mFe=Vi(),gFe=Ao();uz.exports=fFe?function(t,r,e){return mFe.f(t,r,gFe(1,e))}:function(t,r,e){return t[r]=e,t}});var Rm=V((ZLt,pz)=>{var h2=Pr(),vFe=Si(),hz=Function.prototype,yFe=h2&&Object.getOwnPropertyDescriptor,p2=vFe(hz,"name"),TFe=p2&&function(){}.name==="something",EFe=p2&&(!h2||h2&&yFe(hz,"name").configurable);pz.exports={EXISTS:p2,PROPER:TFe,CONFIGURABLE:EFe}});var J_=V((KLt,dz)=>{var bFe=Bt(),xFe=Ti(),d2=Z_(),IFe=bFe(Function.toString);xFe(d2.inspectSource)||(d2.inspectSource=function(t){return IFe(t)});dz.exports=d2.inspectSource});var f2=V((JLt,mz)=>{var SFe=ir(),_Fe=Ti(),fz=SFe.WeakMap;mz.exports=_Fe(fz)&&/native code/.test(String(fz))});var n1=V((QLt,vz)=>{var wFe=Sm(),RFe=_m(),gz=wFe("keys");vz.exports=function(t){return gz[t]||(gz[t]=RFe(t))}});var iv=V((eFt,yz)=>{yz.exports={}});var cs=V((tFt,bz)=>{var MFe=f2(),Ez=ir(),DFe=si(),CFe=va(),m2=Si(),g2=Z_(),AFe=n1(),OFe=iv(),Tz="Object already initialized",v2=Ez.TypeError,PFe=Ez.WeakMap,Q_,s1,ew,NFe=function(t){return ew(t)?s1(t):Q_(t,{})},LFe=function(t){return function(r){var e;if(!DFe(r)||(e=s1(r)).type!==t)throw v2("Incompatible receiver, "+t+" required");return e}};MFe||g2.state?(fc=g2.state||(g2.state=new PFe),fc.get=fc.get,fc.has=fc.has,fc.set=fc.set,Q_=function(t,r){if(fc.has(t))throw v2(Tz);return r.facade=t,fc.set(t,r),r},s1=function(t){return fc.get(t)||{}},ew=function(t){return fc.has(t)}):(Mm=AFe("state"),OFe[Mm]=!0,Q_=function(t,r){if(m2(t,Mm))throw v2(Tz);return r.facade=t,CFe(t,Mm,r),r},s1=function(t){return m2(t,Mm)?t[Mm]:{}},ew=function(t){return m2(t,Mm)});var fc,Mm;bz.exports={set:Q_,get:s1,has:ew,enforce:NFe,getterFor:LFe}});var iw=V((rFt,Iz)=>{var FFe=Rt(),HFe=Ti(),tw=Si(),y2=Pr(),UFe=Rm().CONFIGURABLE,BFe=J_(),xz=cs(),kFe=xz.enforce,GFe=xz.get,rw=Object.defineProperty,VFe=y2&&!FFe(function(){return rw(function(){},"length",{value:8}).length!==8}),zFe=String(String).split("String"),jFe=Iz.exports=function(t,r,e){String(r).slice(0,7)==="Symbol("&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),e&&e.getter&&(r="get "+r),e&&e.setter&&(r="set "+r),(!tw(t,"name")||UFe&&t.name!==r)&&(y2?rw(t,"name",{value:r,configurable:!0}):t.name=r),VFe&&e&&tw(e,"arity")&&t.length!==e.arity&&rw(t,"length",{value:e.arity});try{e&&tw(e,"constructor")&&e.constructor?y2&&rw(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(n){}var i=kFe(t);return tw(i,"source")||(i.source=zFe.join(typeof r=="string"?r:"")),t};Function.prototype.toString=jFe(function(){return HFe(this)&&GFe(this).source||BFe(this)},"toString")});var Dn=V((iFt,Sz)=>{var WFe=Ti(),qFe=Vi(),YFe=iw(),XFe=$_();Sz.exports=function(t,r,e,i){i||(i={});var n=i.enumerable,s=i.name!==void 0?i.name:r;if(WFe(e)&&YFe(e,s,i),i.global)n?t[r]=e:XFe(r,e);else{try{i.unsafe?t[r]&&(n=!0):delete t[r]}catch(a){}n?t[r]=e:qFe.f(t,r,{value:e,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return t}});var T2=V((nFt,_z)=>{var $Fe=Math.ceil,ZFe=Math.floor;_z.exports=Math.trunc||function(r){var e=+r;return(e>0?ZFe:$Fe)(e)}});var ms=V((sFt,wz)=>{var KFe=T2();wz.exports=function(t){var r=+t;return r!==r||r===0?0:KFe(r)}});var Su=V((aFt,Rz)=>{var JFe=ms(),QFe=Math.max,e5e=Math.min;Rz.exports=function(t,r){var e=JFe(t);return e<0?QFe(e+r,0):e5e(e,r)}});var Wa=V((oFt,Mz)=>{var t5e=ms(),r5e=Math.min;Mz.exports=function(t){return t>0?r5e(t5e(t),9007199254740991):0}});var ln=V((lFt,Dz)=>{var i5e=Wa();Dz.exports=function(t){return i5e(t.length)}});var nv=V((cFt,Az)=>{var n5e=ga(),s5e=Su(),a5e=ln(),Cz=function(t){return function(r,e,i){var n=n5e(r),s=a5e(n),a=s5e(i,s),o;if(t&&e!=e){for(;s>a;)if(o=n[a++],o!=o)return!0}else for(;s>a;a++)if((t||a in n)&&n[a]===e)return t||a||0;return!t&&-1}};Az.exports={includes:Cz(!0),indexOf:Cz(!1)}});var b2=V((uFt,Pz)=>{var o5e=Bt(),E2=Si(),l5e=ga(),c5e=nv().indexOf,u5e=iv(),Oz=o5e([].push);Pz.exports=function(t,r){var e=l5e(t),i=0,n=[],s;for(s in e)!E2(u5e,s)&&E2(e,s)&&Oz(n,s);for(;r.length>i;)E2(e,s=r[i++])&&(~c5e(n,s)||Oz(n,s));return n}});var nw=V((hFt,Nz)=>{Nz.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var zh=V(Lz=>{var h5e=b2(),p5e=nw(),d5e=p5e.concat("length","prototype");Lz.f=Object.getOwnPropertyNames||function(r){return h5e(r,d5e)}});var a1=V(Fz=>{Fz.f=Object.getOwnPropertySymbols});var sw=V((fFt,Hz)=>{var f5e=bn(),m5e=Bt(),g5e=zh(),v5e=a1(),y5e=jr(),T5e=m5e([].concat);Hz.exports=f5e("Reflect","ownKeys")||function(r){var e=g5e.f(y5e(r)),i=v5e.f;return i?T5e(e,i(r)):e}});var o1=V((mFt,Bz)=>{var Uz=Si(),E5e=sw(),b5e=Us(),x5e=Vi();Bz.exports=function(t,r,e){for(var i=E5e(r),n=x5e.f,s=b5e.f,a=0;a{var I5e=Rt(),S5e=Ti(),_5e=/#|\.prototype\./,l1=function(t,r){var e=R5e[w5e(t)];return e==D5e?!0:e==M5e?!1:S5e(r)?I5e(r):!!r},w5e=l1.normalize=function(t){return String(t).replace(_5e,".").toLowerCase()},R5e=l1.data={},M5e=l1.NATIVE="N",D5e=l1.POLYFILL="P";kz.exports=l1});var Ne=V((vFt,Gz)=>{var x2=ir(),C5e=Us().f,A5e=va(),O5e=Dn(),P5e=$_(),N5e=o1(),L5e=sv();Gz.exports=function(t,r){var e=t.target,i=t.global,n=t.stat,s,a,o,l,c,u;if(i?a=x2:n?a=x2[e]||P5e(e,{}):a=(x2[e]||{}).prototype,a)for(o in r){if(c=r[o],t.dontCallGetSet?(u=C5e(a,o),l=u&&u.value):l=a[o],s=L5e(i?o:e+(n?".":"#")+o,t.forced),!s&&l!==void 0){if(typeof c==typeof l)continue;N5e(c,l)}(t.sham||l&&l.sham)&&A5e(c,"sham",!0),O5e(a,o,c,t)}}});var aw=V((yFt,zz)=>{var F5e=fi(),H5e=F5e("toStringTag"),Vz={};Vz[H5e]="z";zz.exports=String(Vz)==="[object z]"});var mc=V((TFt,jz)=>{var U5e=aw(),B5e=Ti(),ow=fa(),k5e=fi(),G5e=k5e("toStringTag"),V5e=Object,z5e=ow(function(){return arguments}())=="Arguments",j5e=function(t,r){try{return t[r]}catch(e){}};jz.exports=U5e?ow:function(t){var r,e,i;return t===void 0?"Undefined":t===null?"Null":typeof(e=j5e(r=V5e(t),G5e))=="string"?e:z5e?ow(r):(i=ow(r))=="Object"&&B5e(r.callee)?"Arguments":i}});var mi=V((EFt,Wz)=>{var W5e=mc(),q5e=String;Wz.exports=function(t){if(W5e(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return q5e(t)}});var av=V((bFt,qz)=>{var Y5e=b2(),X5e=nw();qz.exports=Object.keys||function(r){return Y5e(r,X5e)}});var lw=V(Yz=>{var $5e=Pr(),Z5e=a2(),K5e=Vi(),J5e=jr(),Q5e=ga(),e6e=av();Yz.f=$5e&&!Z5e?Object.defineProperties:function(r,e){J5e(r);for(var i=Q5e(e),n=e6e(e),s=n.length,a=0,o;s>a;)K5e.f(r,o=n[a++],i[o]);return r}});var I2=V((IFt,Xz)=>{var t6e=bn();Xz.exports=t6e("document","documentElement")});var qa=V((SFt,tj)=>{var r6e=jr(),i6e=lw(),$z=nw(),n6e=iv(),s6e=I2(),a6e=i1(),o6e=n1(),Zz=">",Kz="<",_2="prototype",w2="script",Qz=o6e("IE_PROTO"),S2=function(){},ej=function(t){return Kz+w2+Zz+t+Kz+"/"+w2+Zz},Jz=function(t){t.write(ej("")),t.close();var r=t.parentWindow.Object;return t=null,r},l6e=function(){var t=a6e("iframe"),r="java"+w2+":",e;return t.style.display="none",s6e.appendChild(t),t.src=String(r),e=t.contentWindow.document,e.open(),e.write(ej("document.F=Object")),e.close(),e.F},cw,uw=function(){try{cw=new ActiveXObject("htmlfile")}catch(r){}uw=typeof document!="undefined"?document.domain&&cw?Jz(cw):l6e():Jz(cw);for(var t=$z.length;t--;)delete uw[_2][$z[t]];return uw()};n6e[Qz]=!0;tj.exports=Object.create||function(r,e){var i;return r!==null?(S2[_2]=r6e(r),i=new S2,S2[_2]=null,i[Qz]=r):i=uw(),e===void 0?i:i6e.f(i,e)}});var _u=V((_Ft,rj)=>{"use strict";var c6e=Vh(),u6e=Vi(),h6e=Ao();rj.exports=function(t,r,e){var i=c6e(r);i in t?u6e.f(t,i,h6e(0,e)):t[i]=e}});var ov=V((wFt,nj)=>{var ij=Su(),p6e=ln(),d6e=_u(),f6e=Array,m6e=Math.max;nj.exports=function(t,r,e){for(var i=p6e(t),n=ij(r,i),s=ij(e===void 0?i:e,i),a=f6e(m6e(s-n,0)),o=0;n{var g6e=fa(),v6e=ga(),sj=zh().f,y6e=ov(),aj=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],T6e=function(t){try{return sj(t)}catch(r){return y6e(aj)}};oj.exports.f=function(r){return aj&&g6e(r)=="Window"?T6e(r):sj(v6e(r))}});var R2=V(lj=>{var E6e=fi();lj.f=E6e});var pw=V((DFt,cj)=>{var b6e=ir();cj.exports=b6e});var ya=V((CFt,hj)=>{var uj=pw(),x6e=Si(),I6e=R2(),S6e=Vi().f;hj.exports=function(t){var r=uj.Symbol||(uj.Symbol={});x6e(r,t)||S6e(r,t,{value:I6e.f(t)})}});var M2=V((AFt,pj)=>{var _6e=ni(),w6e=bn(),R6e=fi(),M6e=Dn();pj.exports=function(){var t=w6e("Symbol"),r=t&&t.prototype,e=r&&r.valueOf,i=R6e("toPrimitive");r&&!r[i]&&M6e(r,i,function(n){return _6e(e,this)},{arity:1})}});var Ya=V((OFt,fj)=>{var D6e=Vi().f,C6e=Si(),A6e=fi(),dj=A6e("toStringTag");fj.exports=function(t,r,e){t&&!e&&(t=t.prototype),t&&!C6e(t,dj)&&D6e(t,dj,{configurable:!0,value:r})}});var jh=V((PFt,mj)=>{var O6e=fa(),P6e=Bt();mj.exports=function(t){if(O6e(t)==="Function")return P6e(t)}});var fl=V((NFt,vj)=>{var gj=jh(),N6e=fs(),L6e=tv(),F6e=gj(gj.bind);vj.exports=function(t,r){return N6e(t),r===void 0?t:L6e?F6e(t,r):function(){return t.apply(r,arguments)}}});var Wh=V((LFt,yj)=>{var H6e=fa();yj.exports=Array.isArray||function(r){return H6e(r)=="Array"}});var Dm=V((FFt,Ij)=>{var U6e=Bt(),B6e=Rt(),Tj=Ti(),k6e=mc(),G6e=bn(),V6e=J_(),Ej=function(){},z6e=[],bj=G6e("Reflect","construct"),D2=/^\s*(?:class|function)\b/,j6e=U6e(D2.exec),W6e=!D2.exec(Ej),c1=function(r){if(!Tj(r))return!1;try{return bj(Ej,z6e,r),!0}catch(e){return!1}},xj=function(r){if(!Tj(r))return!1;switch(k6e(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return W6e||!!j6e(D2,V6e(r))}catch(e){return!0}};xj.sham=!0;Ij.exports=!bj||B6e(function(){var t;return c1(c1.call)||!c1(Object)||!c1(function(){t=!0})||t})?xj:c1});var Rj=V((HFt,wj)=>{var Sj=Wh(),q6e=Dm(),Y6e=si(),X6e=fi(),$6e=X6e("species"),_j=Array;wj.exports=function(t){var r;return Sj(t)&&(r=t.constructor,q6e(r)&&(r===_j||Sj(r.prototype))?r=void 0:Y6e(r)&&(r=r[$6e],r===null&&(r=void 0))),r===void 0?_j:r}});var lv=V((UFt,Mj)=>{var Z6e=Rj();Mj.exports=function(t,r){return new(Z6e(t))(r===0?0:r)}});var ws=V((BFt,Cj)=>{var K6e=fl(),J6e=Bt(),Q6e=xm(),eHe=Li(),tHe=ln(),rHe=lv(),Dj=J6e([].push),Cd=function(t){var r=t==1,e=t==2,i=t==3,n=t==4,s=t==6,a=t==7,o=t==5||s;return function(l,c,u,h){for(var p=eHe(l),d=Q6e(p),f=K6e(c,u),m=tHe(d),g=0,y=h||rHe,E=r?y(l,m):e||a?y(l,0):void 0,b,x;m>g;g++)if((o||g in d)&&(b=d[g],x=f(b,g,p),t))if(r)E[g]=x;else if(x)switch(t){case 3:return!0;case 5:return b;case 6:return g;case 2:Dj(E,b)}else switch(t){case 4:return!1;case 7:Dj(E,b)}return s?-1:i||n?n:E}};Cj.exports={forEach:Cd(0),map:Cd(1),filter:Cd(2),some:Cd(3),every:Cd(4),find:Cd(5),findIndex:Cd(6),filterReject:Cd(7)}});var qj=V(()=>{"use strict";var dw=Ne(),U2=ir(),B2=ni(),iHe=Bt(),nHe=Bn(),cv=Pr(),uv=Im(),sHe=Rt(),Rs=Si(),aHe=Oo(),P2=jr(),fw=ga(),k2=Vh(),oHe=mi(),N2=Ao(),h1=qa(),Pj=av(),lHe=zh(),Nj=hw(),cHe=a1(),Lj=Us(),Fj=Vi(),uHe=lw(),Hj=t1(),C2=Dn(),G2=Sm(),hHe=n1(),Uj=iv(),Aj=_m(),pHe=fi(),dHe=R2(),fHe=ya(),mHe=M2(),gHe=Ya(),Bj=cs(),mw=ws().forEach,Xa=hHe("hidden"),gw="Symbol",p1="prototype",vHe=Bj.set,Oj=Bj.getterFor(gw),ml=Object[p1],Cm=U2.Symbol,u1=Cm&&Cm[p1],yHe=U2.TypeError,A2=U2.QObject,kj=Lj.f,Ad=Fj.f,Gj=Nj.f,THe=Hj.f,Vj=iHe([].push),qh=G2("symbols"),d1=G2("op-symbols"),EHe=G2("wks"),L2=!A2||!A2[p1]||!A2[p1].findChild,F2=cv&&sHe(function(){return h1(Ad({},"a",{get:function(){return Ad(this,"a",{value:7}).a}})).a!=7})?function(t,r,e){var i=kj(ml,r);i&&delete ml[r],Ad(t,r,e),i&&t!==ml&&Ad(ml,r,i)}:Ad,O2=function(t,r){var e=qh[t]=h1(u1);return vHe(e,{type:gw,tag:t,description:r}),cv||(e.description=r),e},vw=function(r,e,i){r===ml&&vw(d1,e,i),P2(r);var n=k2(e);return P2(i),Rs(qh,n)?(i.enumerable?(Rs(r,Xa)&&r[Xa][n]&&(r[Xa][n]=!1),i=h1(i,{enumerable:N2(0,!1)})):(Rs(r,Xa)||Ad(r,Xa,N2(1,{})),r[Xa][n]=!0),F2(r,n,i)):Ad(r,n,i)},V2=function(r,e){P2(r);var i=fw(e),n=Pj(i).concat(Wj(i));return mw(n,function(s){(!cv||B2(H2,i,s))&&vw(r,s,i[s])}),r},bHe=function(r,e){return e===void 0?h1(r):V2(h1(r),e)},H2=function(r){var e=k2(r),i=B2(THe,this,e);return this===ml&&Rs(qh,e)&&!Rs(d1,e)?!1:i||!Rs(this,e)||!Rs(qh,e)||Rs(this,Xa)&&this[Xa][e]?i:!0},zj=function(r,e){var i=fw(r),n=k2(e);if(!(i===ml&&Rs(qh,n)&&!Rs(d1,n))){var s=kj(i,n);return s&&Rs(qh,n)&&!(Rs(i,Xa)&&i[Xa][n])&&(s.enumerable=!0),s}},jj=function(r){var e=Gj(fw(r)),i=[];return mw(e,function(n){!Rs(qh,n)&&!Rs(Uj,n)&&Vj(i,n)}),i},Wj=function(t){var r=t===ml,e=Gj(r?d1:fw(t)),i=[];return mw(e,function(n){Rs(qh,n)&&(!r||Rs(ml,n))&&Vj(i,qh[n])}),i};uv||(Cm=function(){if(aHe(u1,this))throw yHe("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:oHe(arguments[0]),e=Aj(r),i=function(n){this===ml&&B2(i,d1,n),Rs(this,Xa)&&Rs(this[Xa],e)&&(this[Xa][e]=!1),F2(this,e,N2(1,n))};return cv&&L2&&F2(ml,e,{configurable:!0,set:i}),O2(e,r)},u1=Cm[p1],C2(u1,"toString",function(){return Oj(this).tag}),C2(Cm,"withoutSetter",function(t){return O2(Aj(t),t)}),Hj.f=H2,Fj.f=vw,uHe.f=V2,Lj.f=zj,lHe.f=Nj.f=jj,cHe.f=Wj,dHe.f=function(t){return O2(pHe(t),t)},cv&&(Ad(u1,"description",{configurable:!0,get:function(){return Oj(this).description}}),nHe||C2(ml,"propertyIsEnumerable",H2,{unsafe:!0})));dw({global:!0,constructor:!0,wrap:!0,forced:!uv,sham:!uv},{Symbol:Cm});mw(Pj(EHe),function(t){fHe(t)});dw({target:gw,stat:!0,forced:!uv},{useSetter:function(){L2=!0},useSimple:function(){L2=!1}});dw({target:"Object",stat:!0,forced:!uv,sham:!cv},{create:bHe,defineProperty:vw,defineProperties:V2,getOwnPropertyDescriptor:zj});dw({target:"Object",stat:!0,forced:!uv},{getOwnPropertyNames:jj});mHe();gHe(Cm,gw);Uj[Xa]=!0});var z2=V((VFt,Yj)=>{var xHe=Im();Yj.exports=xHe&&!!Symbol.for&&!!Symbol.keyFor});var $j=V(()=>{var IHe=Ne(),SHe=bn(),_He=Si(),wHe=mi(),Xj=Sm(),RHe=z2(),j2=Xj("string-to-symbol-registry"),MHe=Xj("symbol-to-string-registry");IHe({target:"Symbol",stat:!0,forced:!RHe},{for:function(t){var r=wHe(t);if(_He(j2,r))return j2[r];var e=SHe("Symbol")(r);return j2[r]=e,MHe[e]=r,e}})});var Kj=V(()=>{var DHe=Ne(),CHe=Si(),AHe=Md(),OHe=Dd(),PHe=Sm(),NHe=z2(),Zj=PHe("symbol-to-string-registry");DHe({target:"Symbol",stat:!0,forced:!NHe},{keyFor:function(r){if(!AHe(r))throw TypeError(OHe(r)+" is not a symbol");if(CHe(Zj,r))return Zj[r]}})});var Po=V((YFt,tW)=>{var LHe=tv(),eW=Function.prototype,Jj=eW.apply,Qj=eW.call;tW.exports=typeof Reflect=="object"&&Reflect.apply||(LHe?Qj.bind(Jj):function(){return Qj.apply(Jj,arguments)})});var Od=V((XFt,rW)=>{var FHe=Bt();rW.exports=FHe([].slice)});var W2=V(()=>{var HHe=Ne(),cW=bn(),uW=Po(),UHe=ni(),f1=Bt(),hW=Rt(),BHe=Wh(),kHe=Ti(),GHe=si(),iW=Md(),pW=Od(),VHe=Im(),Pd=cW("JSON","stringify"),yw=f1(/./.exec),nW=f1("".charAt),zHe=f1("".charCodeAt),jHe=f1("".replace),WHe=f1(1 .toString),qHe=/[\uD800-\uDFFF]/g,sW=/^[\uD800-\uDBFF]$/,aW=/^[\uDC00-\uDFFF]$/,oW=!VHe||hW(function(){var t=cW("Symbol")();return Pd([t])!="[null]"||Pd({a:t})!="{}"||Pd(Object(t))!="{}"}),lW=hW(function(){return Pd("\uDF06\uD834")!=='"\\udf06\\ud834"'||Pd("\uDEAD")!=='"\\udead"'}),YHe=function(t,r){var e=pW(arguments),i=r;if(!(!GHe(r)&&t===void 0||iW(t)))return BHe(r)||(r=function(n,s){if(kHe(i)&&(s=UHe(i,this,n,s)),!iW(s))return s}),e[1]=r,uW(Pd,null,e)},XHe=function(t,r,e){var i=nW(e,r-1),n=nW(e,r+1);return yw(sW,t)&&!yw(aW,n)||yw(aW,t)&&!yw(sW,i)?"\\u"+WHe(zHe(t,0),16):t};Pd&&HHe({target:"JSON",stat:!0,arity:3,forced:oW||lW},{stringify:function(r,e,i){var n=pW(arguments),s=uW(oW?YHe:Pd,null,n);return lW&&typeof s=="string"?jHe(s,qHe,XHe):s}})});var fW=V(()=>{var $He=Ne(),ZHe=Im(),KHe=Rt(),dW=a1(),JHe=Li(),QHe=!ZHe||KHe(function(){dW.f(1)});$He({target:"Object",stat:!0,forced:QHe},{getOwnPropertySymbols:function(r){var e=dW.f;return e?e(JHe(r)):[]}})});var mW=V(()=>{qj();$j();Kj();W2();fW()});var xW=V(()=>{"use strict";var e4e=Ne(),t4e=Pr(),r4e=ir(),Tw=Bt(),i4e=Si(),n4e=Ti(),s4e=Oo(),a4e=mi(),o4e=Vi().f,l4e=o1(),Yh=r4e.Symbol,Am=Yh&&Yh.prototype;t4e&&n4e(Yh)&&(!("description"in Am)||Yh().description!==void 0)&&(q2={},m1=function(){var r=arguments.length<1||arguments[0]===void 0?void 0:a4e(arguments[0]),e=s4e(Am,this)?new Yh(r):r===void 0?Yh():Yh(r);return r===""&&(q2[e]=!0),e},l4e(m1,Yh),m1.prototype=Am,Am.constructor=m1,gW=String(Yh("test"))=="Symbol(test)",vW=Tw(Am.valueOf),yW=Tw(Am.toString),TW=/^Symbol\((.*)\)[^)]+$/,EW=Tw("".replace),bW=Tw("".slice),o4e(Am,"description",{configurable:!0,get:function(){var r=vW(this);if(i4e(q2,r))return"";var e=yW(r),i=gW?bW(e,7,-1):EW(e,TW,"$1");return i===""?void 0:i}}),e4e({global:!0,constructor:!0,forced:!0},{Symbol:m1}));var q2,m1,gW,vW,yW,TW,EW,bW});var IW=V(()=>{var c4e=ya();c4e("asyncIterator")});var SW=V(()=>{var u4e=ya();u4e("hasInstance")});var _W=V(()=>{var h4e=ya();h4e("isConcatSpreadable")});var wW=V(()=>{var p4e=ya();p4e("iterator")});var RW=V(()=>{var d4e=ya();d4e("match")});var MW=V(()=>{var f4e=ya();f4e("matchAll")});var DW=V(()=>{var m4e=ya();m4e("replace")});var CW=V(()=>{var g4e=ya();g4e("search")});var AW=V(()=>{var v4e=ya();v4e("species")});var OW=V(()=>{var y4e=ya();y4e("split")});var PW=V(()=>{var T4e=ya(),E4e=M2();T4e("toPrimitive");E4e()});var NW=V(()=>{var b4e=bn(),x4e=ya(),I4e=Ya();x4e("toStringTag");I4e(b4e("Symbol"),"Symbol")});var LW=V(()=>{var S4e=ya();S4e("unscopables")});var Y2=V((D5t,FW)=>{var _4e=Ti(),w4e=String,R4e=TypeError;FW.exports=function(t){if(typeof t=="object"||_4e(t))return t;throw R4e("Can't set "+w4e(t)+" as a prototype")}});var gc=V((C5t,HW)=>{var M4e=Bt(),D4e=jr(),C4e=Y2();HW.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,r={},e;try{e=M4e(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),e(r,[]),t=r instanceof Array}catch(i){}return function(n,s){return D4e(n),C4e(s),t?e(n,s):n.__proto__=s,n}}():void 0)});var X2=V((A5t,UW)=>{var A4e=Vi().f;UW.exports=function(t,r,e){e in t||A4e(t,e,{configurable:!0,get:function(){return r[e]},set:function(i){r[e]=i}})}});var Om=V((O5t,kW)=>{var O4e=Ti(),P4e=si(),BW=gc();kW.exports=function(t,r,e){var i,n;return BW&&O4e(i=r.constructor)&&i!==e&&P4e(n=i.prototype)&&n!==e.prototype&&BW(t,n),t}});var hv=V((P5t,GW)=>{var N4e=mi();GW.exports=function(t,r){return t===void 0?arguments.length<2?"":r:N4e(t)}});var $2=V((N5t,VW)=>{var L4e=si(),F4e=va();VW.exports=function(t,r){L4e(r)&&"cause"in r&&F4e(t,"cause",r.cause)}});var g1=V((L5t,WW)=>{var H4e=Bt(),zW=Error,U4e=H4e("".replace),B4e=function(t){return String(zW(t).stack)}("zxcasd"),jW=/\n\s*at [^:]*:[^\n]*/,k4e=jW.test(B4e);WW.exports=function(t,r){if(k4e&&typeof t=="string"&&!zW.prepareStackTrace)for(;r--;)t=U4e(t,jW,"");return t}});var Ew=V((F5t,qW)=>{var G4e=Rt(),V4e=Ao();qW.exports=!G4e(function(){var t=Error("a");return"stack"in t?(Object.defineProperty(t,"stack",V4e(1,7)),t.stack!==7):!0})});var K2=V((H5t,JW)=>{"use strict";var YW=bn(),z4e=Si(),Z2=va(),j4e=Oo(),XW=gc(),$W=o1(),ZW=X2(),W4e=Om(),q4e=hv(),Y4e=$2(),X4e=g1(),$4e=Ew(),Z4e=Pr(),KW=Bn();JW.exports=function(t,r,e,i){var n="stackTraceLimit",s=i?2:1,a=t.split("."),o=a[a.length-1],l=YW.apply(null,a);if(l){var c=l.prototype;if(!KW&&z4e(c,"cause")&&delete c.cause,!e)return l;var u=YW("Error"),h=r(function(p,d){var f=q4e(i?d:p,void 0),m=i?new l(p):new l;return f!==void 0&&Z2(m,"message",f),$4e&&Z2(m,"stack",X4e(m.stack,2)),this&&j4e(c,this)&&W4e(m,this,h),arguments.length>s&&Y4e(m,arguments[s]),m});if(h.prototype=c,o!=="Error"?XW?XW(h,u):$W(h,u,{name:!0}):Z4e&&n in l&&(ZW(h,l,n),ZW(h,l,"prepareStackTrace")),$W(h,l),!KW)try{c.name!==o&&Z2(c,"name",o),c.constructor=h}catch(p){}return h}}});var rq=V(()=>{var eq=Ne(),K4e=ir(),wu=Po(),tq=K2(),J2="WebAssembly",QW=K4e[J2],bw=Error("e",{cause:7}).cause!==7,Pm=function(t,r){var e={};e[t]=tq(t,r,bw),eq({global:!0,constructor:!0,arity:1,forced:bw},e)},Q2=function(t,r){if(QW&&QW[t]){var e={};e[t]=tq(J2+"."+t,r,bw),eq({target:J2,stat:!0,constructor:!0,arity:1,forced:bw},e)}};Pm("Error",function(t){return function(e){return wu(t,this,arguments)}});Pm("EvalError",function(t){return function(e){return wu(t,this,arguments)}});Pm("RangeError",function(t){return function(e){return wu(t,this,arguments)}});Pm("ReferenceError",function(t){return function(e){return wu(t,this,arguments)}});Pm("SyntaxError",function(t){return function(e){return wu(t,this,arguments)}});Pm("TypeError",function(t){return function(e){return wu(t,this,arguments)}});Pm("URIError",function(t){return function(e){return wu(t,this,arguments)}});Q2("CompileError",function(t){return function(e){return wu(t,this,arguments)}});Q2("LinkError",function(t){return function(e){return wu(t,this,arguments)}});Q2("RuntimeError",function(t){return function(e){return wu(t,this,arguments)}})});var eN=V((k5t,nq)=>{"use strict";var J4e=Pr(),Q4e=Rt(),eUe=jr(),tUe=qa(),iq=hv(),xw=Error.prototype.toString,rUe=Q4e(function(){if(J4e){var t=tUe(Object.defineProperty({},"name",{get:function(){return this===t}}));if(xw.call(t)!=="true")return!0}return xw.call({message:1,name:2})!=="2: 1"||xw.call({})!=="Error"});nq.exports=rUe?function(){var r=eUe(this),e=iq(r.name,"Error"),i=iq(r.message);return e?i?e+": "+i:e:i}:xw});var oq=V(()=>{var iUe=Dn(),sq=eN(),aq=Error.prototype;aq.toString!==sq&&iUe(aq,"toString",sq)});var Iw=V((z5t,lq)=>{var nUe=Rt();lq.exports=!nUe(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})});var No=V((j5t,uq)=>{var sUe=Si(),aUe=Ti(),oUe=Li(),lUe=n1(),cUe=Iw(),cq=lUe("IE_PROTO"),tN=Object,uUe=tN.prototype;uq.exports=cUe?tN.getPrototypeOf:function(t){var r=oUe(t);if(sUe(r,cq))return r[cq];var e=r.constructor;return aUe(e)&&r instanceof e?e.prototype:r instanceof tN?uUe:null}});var pv=V((W5t,hq)=>{hq.exports={}});var Sw=V((q5t,pq)=>{var hUe=fi(),pUe=pv(),dUe=hUe("iterator"),fUe=Array.prototype;pq.exports=function(t){return t!==void 0&&(pUe.Array===t||fUe[dUe]===t)}});var dv=V((Y5t,fq)=>{var mUe=mc(),dq=Iu(),gUe=ma(),vUe=pv(),yUe=fi(),TUe=yUe("iterator");fq.exports=function(t){if(!gUe(t))return dq(t,TUe)||dq(t,"@@iterator")||vUe[mUe(t)]}});var v1=V((X5t,mq)=>{var EUe=ni(),bUe=fs(),xUe=jr(),IUe=Dd(),SUe=dv(),_Ue=TypeError;mq.exports=function(t,r){var e=arguments.length<2?SUe(t):r;if(bUe(e))return xUe(EUe(e,t));throw _Ue(IUe(t)+" is not iterable")}});var rN=V(($5t,vq)=>{var wUe=ni(),gq=jr(),RUe=Iu();vq.exports=function(t,r,e){var i,n;gq(t);try{if(i=RUe(t,"return"),!i){if(r==="throw")throw e;return e}i=wUe(i,t)}catch(s){n=!0,i=s}if(r==="throw")throw e;if(n)throw i;return gq(i),e}});var vc=V((Z5t,bq)=>{var MUe=fl(),DUe=ni(),CUe=jr(),AUe=Dd(),OUe=Sw(),PUe=ln(),yq=Oo(),NUe=v1(),LUe=dv(),Tq=rN(),FUe=TypeError,_w=function(t,r){this.stopped=t,this.result=r},Eq=_w.prototype;bq.exports=function(t,r,e){var i=e&&e.that,n=!!(e&&e.AS_ENTRIES),s=!!(e&&e.IS_RECORD),a=!!(e&&e.IS_ITERATOR),o=!!(e&&e.INTERRUPTED),l=MUe(r,i),c,u,h,p,d,f,m,g=function(E){return c&&Tq(c,"normal",E),new _w(!0,E)},y=function(E){return n?(CUe(E),o?l(E[0],E[1],g):l(E[0],E[1])):o?l(E,g):l(E)};if(s)c=t.iterator;else if(a)c=t;else{if(u=LUe(t),!u)throw FUe(AUe(t)+" is not iterable");if(OUe(u)){for(h=0,p=PUe(t);p>h;h++)if(d=y(t[h]),d&&yq(Eq,d))return d;return new _w(!1)}c=NUe(t,u)}for(f=s?t.next:c.next;!(m=DUe(f,c)).done;){try{d=y(m.value)}catch(E){Tq(c,"throw",E)}if(typeof d=="object"&&d&&yq(Eq,d))return d}return new _w(!1)}});var Iq=V(()=>{"use strict";var HUe=Ne(),UUe=Oo(),BUe=No(),Rw=gc(),kUe=o1(),xq=qa(),ww=va(),iN=Ao(),GUe=g1(),VUe=$2(),zUe=vc(),jUe=hv(),WUe=fi(),qUe=Ew(),YUe=WUe("toStringTag"),Mw=Error,XUe=[].push,y1=function(r,e){var i=arguments.length>2?arguments[2]:void 0,n=UUe(nN,this),s;Rw?s=Rw(Mw(),n?BUe(this):nN):(s=n?this:xq(nN),ww(s,YUe,"Error")),e!==void 0&&ww(s,"message",jUe(e)),qUe&&ww(s,"stack",GUe(s.stack,1)),VUe(s,i);var a=[];return zUe(r,XUe,{that:a}),ww(s,"errors",a),s};Rw?Rw(y1,Mw):kUe(y1,Mw,{name:!0});var nN=y1.prototype=xq(Mw.prototype,{constructor:iN(1,y1),message:iN(1,""),name:iN(1,"AggregateError")});HUe({global:!0,constructor:!0,arity:2},{AggregateError:y1})});var Sq=V(()=>{Iq()});var Mq=V(()=>{var $Ue=Ne(),ZUe=bn(),KUe=Po(),_q=Rt(),JUe=K2(),sN="AggregateError",wq=ZUe(sN),Rq=!_q(function(){return wq([1]).errors[0]!==1})&&_q(function(){return wq([1],sN,{cause:7}).cause!==7});$Ue({global:!0,constructor:!0,arity:2,forced:Rq},{AggregateError:JUe(sN,function(t){return function(e,i){return KUe(t,this,arguments)}},Rq,!0)})});var gl=V((i6t,Dq)=>{var QUe=fi(),eBe=qa(),tBe=Vi().f,aN=QUe("unscopables"),oN=Array.prototype;oN[aN]==null&&tBe(oN,aN,{configurable:!0,value:eBe(null)});Dq.exports=function(t){oN[aN][t]=!0}});var Cq=V(()=>{"use strict";var rBe=Ne(),iBe=Li(),nBe=ln(),sBe=ms(),aBe=gl();rBe({target:"Array",proto:!0},{at:function(r){var e=iBe(this),i=nBe(e),n=sBe(r),s=n>=0?n:i+n;return s<0||s>=i?void 0:e[s]}});aBe("at")});var fv=V((a6t,Aq)=>{var oBe=TypeError,lBe=9007199254740991;Aq.exports=function(t){if(t>lBe)throw oBe("Maximum allowed index exceeded");return t}});var mv=V((o6t,Oq)=>{var cBe=Rt(),uBe=fi(),hBe=xu(),pBe=uBe("species");Oq.exports=function(t){return hBe>=51||!cBe(function(){var r=[],e=r.constructor={};return e[pBe]=function(){return{foo:1}},r[t](Boolean).foo!==1})}});var Fq=V(()=>{"use strict";var dBe=Ne(),fBe=Rt(),mBe=Wh(),gBe=si(),vBe=Li(),yBe=ln(),Pq=fv(),Nq=_u(),TBe=lv(),EBe=mv(),bBe=fi(),xBe=xu(),Lq=bBe("isConcatSpreadable"),IBe=xBe>=51||!fBe(function(){var t=[];return t[Lq]=!1,t.concat()[0]!==t}),SBe=EBe("concat"),_Be=function(t){if(!gBe(t))return!1;var r=t[Lq];return r!==void 0?!!r:mBe(t)},wBe=!IBe||!SBe;dBe({target:"Array",proto:!0,arity:1,forced:wBe},{concat:function(r){var e=vBe(this),i=TBe(e,0),n=0,s,a,o,l,c;for(s=-1,o=arguments.length;s{"use strict";var Hq=Dd(),RBe=TypeError;Uq.exports=function(t,r){if(!delete t[r])throw RBe("Cannot delete property "+Hq(r)+" of "+Hq(t))}});var cN=V((h6t,Bq)=>{"use strict";var MBe=Li(),lN=Su(),DBe=ln(),CBe=T1(),ABe=Math.min;Bq.exports=[].copyWithin||function(r,e){var i=MBe(this),n=DBe(i),s=lN(r,n),a=lN(e,n),o=arguments.length>2?arguments[2]:void 0,l=ABe((o===void 0?n:lN(o,n))-a,n-s),c=1;for(a0;)a in i?i[s]=i[a]:CBe(i,s),s+=c,a+=c;return i}});var kq=V(()=>{var OBe=Ne(),PBe=cN(),NBe=gl();OBe({target:"Array",proto:!0},{copyWithin:PBe});NBe("copyWithin")});var Ru=V((f6t,Gq)=>{"use strict";var LBe=Rt();Gq.exports=function(t,r){var e=[][t];return!!e&&LBe(function(){e.call(null,r||function(){return 1},1)})}});var Vq=V(()=>{"use strict";var FBe=Ne(),HBe=ws().every,UBe=Ru(),BBe=UBe("every");FBe({target:"Array",proto:!0,forced:!BBe},{every:function(r){return HBe(this,r,arguments.length>1?arguments[1]:void 0)}})});var Dw=V((v6t,jq)=>{"use strict";var kBe=Li(),zq=Su(),GBe=ln();jq.exports=function(r){for(var e=kBe(this),i=GBe(e),n=arguments.length,s=zq(n>1?arguments[1]:void 0,i),a=n>2?arguments[2]:void 0,o=a===void 0?i:zq(a,i);o>s;)e[s++]=r;return e}});var Wq=V(()=>{var VBe=Ne(),zBe=Dw(),jBe=gl();VBe({target:"Array",proto:!0},{fill:zBe});jBe("fill")});var qq=V(()=>{"use strict";var WBe=Ne(),qBe=ws().filter,YBe=mv(),XBe=YBe("filter");WBe({target:"Array",proto:!0,forced:!XBe},{filter:function(r){return qBe(this,r,arguments.length>1?arguments[1]:void 0)}})});var Xq=V(()=>{"use strict";var $Be=Ne(),ZBe=ws().find,KBe=gl(),uN="find",Yq=!0;uN in[]&&Array(1)[uN](function(){Yq=!1});$Be({target:"Array",proto:!0,forced:Yq},{find:function(r){return ZBe(this,r,arguments.length>1?arguments[1]:void 0)}});KBe(uN)});var Zq=V(()=>{"use strict";var JBe=Ne(),QBe=ws().findIndex,eke=gl(),hN="findIndex",$q=!0;hN in[]&&Array(1)[hN](function(){$q=!1});JBe({target:"Array",proto:!0,forced:$q},{findIndex:function(r){return QBe(this,r,arguments.length>1?arguments[1]:void 0)}});eke(hN)});var E1=V((w6t,Jq)=>{var tke=fl(),rke=xm(),ike=Li(),nke=ln(),Kq=function(t){var r=t==1;return function(e,i,n){for(var s=ike(e),a=rke(s),o=tke(i,n),l=nke(a),c,u;l-- >0;)if(c=a[l],u=o(c,l,s),u)switch(t){case 0:return c;case 1:return l}return r?-1:void 0}};Jq.exports={findLast:Kq(0),findLastIndex:Kq(1)}});var Qq=V(()=>{"use strict";var ske=Ne(),ake=E1().findLast,oke=gl();ske({target:"Array",proto:!0},{findLast:function(r){return ake(this,r,arguments.length>1?arguments[1]:void 0)}});oke("findLast")});var eY=V(()=>{"use strict";var lke=Ne(),cke=E1().findLastIndex,uke=gl();lke({target:"Array",proto:!0},{findLastIndex:function(r){return cke(this,r,arguments.length>1?arguments[1]:void 0)}});uke("findLastIndex")});var pN=V((A6t,rY)=>{"use strict";var hke=Wh(),pke=ln(),dke=fv(),fke=fl(),tY=function(t,r,e,i,n,s,a,o){for(var l=n,c=0,u=a?fke(a,o):!1,h,p;c0&&hke(h)?(p=pke(h),l=tY(t,r,h,p,l,s-1)-1):(dke(l+1),t[l]=h),l++),c++;return l};rY.exports=tY});var iY=V(()=>{"use strict";var mke=Ne(),gke=pN(),vke=Li(),yke=ln(),Tke=ms(),Eke=lv();mke({target:"Array",proto:!0},{flat:function(){var r=arguments.length?arguments[0]:void 0,e=vke(this),i=yke(e),n=Eke(e,0);return n.length=gke(n,e,e,i,0,r===void 0?1:Tke(r)),n}})});var nY=V(()=>{"use strict";var bke=Ne(),xke=pN(),Ike=fs(),Ske=Li(),_ke=ln(),wke=lv();bke({target:"Array",proto:!0},{flatMap:function(r){var e=Ske(this),i=_ke(e),n;return Ike(r),n=wke(e,0),n.length=xke(n,e,e,i,0,1,r,arguments.length>1?arguments[1]:void 0),n}})});var dN=V((F6t,sY)=>{"use strict";var Rke=ws().forEach,Mke=Ru(),Dke=Mke("forEach");sY.exports=Dke?[].forEach:function(r){return Rke(this,r,arguments.length>1?arguments[1]:void 0)}});var oY=V(()=>{"use strict";var Cke=Ne(),aY=dN();Cke({target:"Array",proto:!0,forced:[].forEach!=aY},{forEach:aY})});var cY=V((B6t,lY)=>{var Ake=jr(),Oke=rN();lY.exports=function(t,r,e,i){try{return i?r(Ake(e)[0],e[1]):r(e)}catch(n){Oke(t,"throw",n)}}});var fN=V((k6t,pY)=>{"use strict";var Pke=fl(),Nke=ni(),Lke=Li(),Fke=cY(),Hke=Sw(),Uke=Dm(),Bke=ln(),uY=_u(),kke=v1(),Gke=dv(),hY=Array;pY.exports=function(r){var e=Lke(r),i=Uke(this),n=arguments.length,s=n>1?arguments[1]:void 0,a=s!==void 0;a&&(s=Pke(s,n>2?arguments[2]:void 0));var o=Gke(e),l=0,c,u,h,p,d,f;if(o&&!(this===hY&&Hke(o)))for(p=kke(e,o),d=p.next,u=i?new this:[];!(h=Nke(d,p)).done;l++)f=a?Fke(p,s,[h.value,l],!0):h.value,uY(u,l,f);else for(c=Bke(e),u=i?new this(c):hY(c);c>l;l++)f=a?s(e[l],l):e[l],uY(u,l,f);return u.length=l,u}});var b1=V((G6t,gY)=>{var Vke=fi(),fY=Vke("iterator"),mY=!1;try{dY=0,mN={next:function(){return{done:!!dY++}},return:function(){mY=!0}},mN[fY]=function(){return this},Array.from(mN,function(){throw 2})}catch(t){}var dY,mN;gY.exports=function(t,r){if(!r&&!mY)return!1;var e=!1;try{var i={};i[fY]=function(){return{next:function(){return{done:e=!0}}}},t(i)}catch(n){}return e}});var vY=V(()=>{var zke=Ne(),jke=fN(),Wke=b1(),qke=!Wke(function(t){Array.from(t)});zke({target:"Array",stat:!0,forced:qke},{from:jke})});var yY=V(()=>{"use strict";var Yke=Ne(),Xke=nv().includes,$ke=Rt(),Zke=gl(),Kke=$ke(function(){return!Array(1).includes()});Yke({target:"Array",proto:!0,forced:Kke},{includes:function(r){return Xke(this,r,arguments.length>1?arguments[1]:void 0)}});Zke("includes")});var EY=V(()=>{"use strict";var Jke=Ne(),Qke=jh(),e8e=nv().indexOf,t8e=Ru(),gN=Qke([].indexOf),TY=!!gN&&1/gN([1],1,-0)<0,r8e=t8e("indexOf");Jke({target:"Array",proto:!0,forced:TY||!r8e},{indexOf:function(r){var e=arguments.length>1?arguments[1]:void 0;return TY?gN(this,r,e)||0:e8e(this,r,e)}})});var bY=V(()=>{var i8e=Ne(),n8e=Wh();i8e({target:"Array",stat:!0},{isArray:n8e})});var EN=V((Z6t,SY)=>{"use strict";var s8e=Rt(),a8e=Ti(),o8e=si(),l8e=qa(),xY=No(),c8e=Dn(),u8e=fi(),h8e=Bn(),TN=u8e("iterator"),IY=!1,Xh,vN,yN;[].keys&&(yN=[].keys(),"next"in yN?(vN=xY(xY(yN)),vN!==Object.prototype&&(Xh=vN)):IY=!0);var p8e=!o8e(Xh)||s8e(function(){var t={};return Xh[TN].call(t)!==t});p8e?Xh={}:h8e&&(Xh=l8e(Xh));a8e(Xh[TN])||c8e(Xh,TN,function(){return this});SY.exports={IteratorPrototype:Xh,BUGGY_SAFARI_ITERATORS:IY}});var Cw=V((K6t,_Y)=>{"use strict";var d8e=EN().IteratorPrototype,f8e=qa(),m8e=Ao(),g8e=Ya(),v8e=pv(),y8e=function(){return this};_Y.exports=function(t,r,e,i){var n=r+" Iterator";return t.prototype=f8e(d8e,{next:m8e(+!i,e)}),g8e(t,n,!1,!0),v8e[n]=y8e,t}});var Pw=V((J6t,LY)=>{"use strict";var T8e=Ne(),E8e=ni(),Aw=Bn(),PY=Rm(),b8e=Ti(),x8e=Cw(),wY=No(),RY=gc(),I8e=Ya(),S8e=va(),bN=Dn(),_8e=fi(),MY=pv(),NY=EN(),w8e=PY.PROPER,R8e=PY.CONFIGURABLE,DY=NY.IteratorPrototype,Ow=NY.BUGGY_SAFARI_ITERATORS,x1=_8e("iterator"),CY="keys",I1="values",AY="entries",OY=function(){return this};LY.exports=function(t,r,e,i,n,s,a){x8e(e,r,i);var o=function(y){if(y===n&&p)return p;if(!Ow&&y in u)return u[y];switch(y){case CY:return function(){return new e(this,y)};case I1:return function(){return new e(this,y)};case AY:return function(){return new e(this,y)}}return function(){return new e(this)}},l=r+" Iterator",c=!1,u=t.prototype,h=u[x1]||u["@@iterator"]||n&&u[n],p=!Ow&&h||o(n),d=r=="Array"&&u.entries||h,f,m,g;if(d&&(f=wY(d.call(new t)),f!==Object.prototype&&f.next&&(!Aw&&wY(f)!==DY&&(RY?RY(f,DY):b8e(f[x1])||bN(f,x1,OY)),I8e(f,l,!0,!0),Aw&&(MY[l]=OY))),w8e&&n==I1&&h&&h.name!==I1&&(!Aw&&R8e?S8e(u,"name",I1):(c=!0,p=function(){return E8e(h,this)})),n)if(m={values:o(I1),keys:s?p:o(CY),entries:o(AY)},a)for(g in m)(Ow||c||!(g in u))&&bN(u,g,m[g]);else T8e({target:r,proto:!0,forced:Ow||c},m);return(!Aw||a)&&u[x1]!==p&&bN(u,x1,p,{name:n}),MY[r]=p,m}});var S1=V((Q6t,FY)=>{FY.exports=function(t,r){return{value:t,done:r}}});var _1=V((eHt,GY)=>{"use strict";var M8e=ga(),xN=gl(),HY=pv(),BY=cs(),D8e=Vi().f,C8e=Pw(),Nw=S1(),A8e=Bn(),O8e=Pr(),kY="Array Iterator",P8e=BY.set,N8e=BY.getterFor(kY);GY.exports=C8e(Array,"Array",function(t,r){P8e(this,{type:kY,target:M8e(t),index:0,kind:r})},function(){var t=N8e(this),r=t.target,e=t.kind,i=t.index++;return!r||i>=r.length?(t.target=void 0,Nw(void 0,!0)):e=="keys"?Nw(i,!1):e=="values"?Nw(r[i],!1):Nw([i,r[i]],!1)},"values");var UY=HY.Arguments=HY.Array;xN("keys");xN("values");xN("entries");if(!A8e&&O8e&&UY.name!=="values")try{D8e(UY,"name",{value:"values"})}catch(t){}});var VY=V(()=>{"use strict";var L8e=Ne(),F8e=Bt(),H8e=xm(),U8e=ga(),B8e=Ru(),k8e=F8e([].join),G8e=H8e!=Object,V8e=B8e("join",",");L8e({target:"Array",proto:!0,forced:G8e||!V8e},{join:function(r){return k8e(U8e(this),r===void 0?",":r)}})});var SN=V((iHt,jY)=>{"use strict";var z8e=Po(),j8e=ga(),W8e=ms(),q8e=ln(),Y8e=Ru(),X8e=Math.min,IN=[].lastIndexOf,zY=!!IN&&1/[1].lastIndexOf(1,-0)<0,$8e=Y8e("lastIndexOf"),Z8e=zY||!$8e;jY.exports=Z8e?function(r){if(zY)return z8e(IN,this,arguments)||0;var e=j8e(this),i=q8e(e),n=i-1;for(arguments.length>1&&(n=X8e(n,W8e(arguments[1]))),n<0&&(n=i+n);n>=0;n--)if(n in e&&e[n]===r)return n||0;return-1}:IN});var qY=V(()=>{var K8e=Ne(),WY=SN();K8e({target:"Array",proto:!0,forced:WY!==[].lastIndexOf},{lastIndexOf:WY})});var YY=V(()=>{"use strict";var J8e=Ne(),Q8e=ws().map,eGe=mv(),tGe=eGe("map");J8e({target:"Array",proto:!0,forced:!tGe},{map:function(r){return Q8e(this,r,arguments.length>1?arguments[1]:void 0)}})});var $Y=V(()=>{"use strict";var rGe=Ne(),iGe=Rt(),nGe=Dm(),sGe=_u(),XY=Array,aGe=iGe(function(){function t(){}return!(XY.of.call(t)instanceof t)});rGe({target:"Array",stat:!0,forced:aGe},{of:function(){for(var r=0,e=arguments.length,i=new(nGe(this)?this:XY)(e);e>r;)sGe(i,r,arguments[r++]);return i.length=e,i}})});var Lw=V((uHt,ZY)=>{"use strict";var oGe=Pr(),lGe=Wh(),cGe=TypeError,uGe=Object.getOwnPropertyDescriptor,hGe=oGe&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();ZY.exports=hGe?function(t,r){if(lGe(t)&&!uGe(t,"length").writable)throw cGe("Cannot set read only .length");return t.length=r}:function(t,r){return t.length=r}});var KY=V(()=>{"use strict";var pGe=Ne(),dGe=Li(),fGe=ln(),mGe=Lw(),gGe=fv(),vGe=Rt(),yGe=vGe(function(){return[].push.call({length:4294967296},1)!==4294967297}),TGe=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}();pGe({target:"Array",proto:!0,arity:1,forced:yGe||TGe},{push:function(r){var e=dGe(this),i=fGe(e),n=arguments.length;gGe(i+n);for(var s=0;s{var EGe=fs(),bGe=Li(),xGe=xm(),IGe=ln(),SGe=TypeError,JY=function(t){return function(r,e,i,n){EGe(e);var s=bGe(r),a=xGe(s),o=IGe(s),l=t?o-1:0,c=t?-1:1;if(i<2)for(;;){if(l in a){n=a[l],l+=c;break}if(l+=c,t?l<0:o<=l)throw SGe("Reduce of empty array with no initial value")}for(;t?l>=0:o>l;l+=c)l in a&&(n=e(n,a[l],l,s));return n}};QY.exports={left:JY(!1),right:JY(!0)}});var Mu=V((fHt,eX)=>{var _Ge=fa(),wGe=ir();eX.exports=_Ge(wGe.process)=="process"});var rX=V(()=>{"use strict";var RGe=Ne(),MGe=w1().left,DGe=Ru(),tX=xu(),CGe=Mu(),AGe=DGe("reduce"),OGe=!CGe&&tX>79&&tX<83;RGe({target:"Array",proto:!0,forced:!AGe||OGe},{reduce:function(r){var e=arguments.length;return MGe(this,r,e,e>1?arguments[1]:void 0)}})});var nX=V(()=>{"use strict";var PGe=Ne(),NGe=w1().right,LGe=Ru(),iX=xu(),FGe=Mu(),HGe=LGe("reduceRight"),UGe=!FGe&&iX>79&&iX<83;PGe({target:"Array",proto:!0,forced:!HGe||UGe},{reduceRight:function(r){return NGe(this,r,arguments.length,arguments.length>1?arguments[1]:void 0)}})});var aX=V(()=>{"use strict";var BGe=Ne(),kGe=Bt(),GGe=Wh(),VGe=kGe([].reverse),sX=[1,2];BGe({target:"Array",proto:!0,forced:String(sX)===String(sX.reverse())},{reverse:function(){return GGe(this)&&(this.length=this.length),VGe(this)}})});var cX=V(()=>{"use strict";var zGe=Ne(),oX=Wh(),jGe=Dm(),WGe=si(),lX=Su(),qGe=ln(),YGe=ga(),XGe=_u(),$Ge=fi(),ZGe=mv(),KGe=Od(),JGe=ZGe("slice"),QGe=$Ge("species"),_N=Array,eVe=Math.max;zGe({target:"Array",proto:!0,forced:!JGe},{slice:function(r,e){var i=YGe(this),n=qGe(i),s=lX(r,n),a=lX(e===void 0?n:e,n),o,l,c;if(oX(i)&&(o=i.constructor,jGe(o)&&(o===_N||oX(o.prototype))?o=void 0:WGe(o)&&(o=o[QGe],o===null&&(o=void 0)),o===_N||o===void 0))return KGe(i,s,a);for(l=new(o===void 0?_N:o)(eVe(a-s,0)),c=0;s{"use strict";var tVe=Ne(),rVe=ws().some,iVe=Ru(),nVe=iVe("some");tVe({target:"Array",proto:!0,forced:!nVe},{some:function(r){return rVe(this,r,arguments.length>1?arguments[1]:void 0)}})});var Fw=V((_Ht,pX)=>{var hX=ov(),sVe=Math.floor,wN=function(t,r){var e=t.length,i=sVe(e/2);return e<8?aVe(t,r):oVe(t,wN(hX(t,0,i),r),wN(hX(t,i),r),r)},aVe=function(t,r){for(var e=t.length,i=1,n,s;i0;)t[s]=t[--s];s!==i++&&(t[s]=n)}return t},oVe=function(t,r,e,i){for(var n=r.length,s=e.length,a=0,o=0;a{var lVe=bu(),dX=lVe.match(/firefox\/(\d+)/i);fX.exports=!!dX&&+dX[1]});var MN=V((RHt,mX)=>{var cVe=bu();mX.exports=/MSIE|Trident/.test(cVe)});var Hw=V((MHt,vX)=>{var uVe=bu(),gX=uVe.match(/AppleWebKit\/(\d+)\./);vX.exports=!!gX&&+gX[1]});var wX=V(()=>{"use strict";var hVe=Ne(),SX=Bt(),pVe=fs(),dVe=Li(),yX=ln(),fVe=T1(),TX=mi(),DN=Rt(),mVe=Fw(),gVe=Ru(),EX=RN(),vVe=MN(),bX=xu(),xX=Hw(),Nd=[],IX=SX(Nd.sort),yVe=SX(Nd.push),TVe=DN(function(){Nd.sort(void 0)}),EVe=DN(function(){Nd.sort(null)}),bVe=gVe("sort"),_X=!DN(function(){if(bX)return bX<70;if(!(EX&&EX>3)){if(vVe)return!0;if(xX)return xX<603;var t="",r,e,i,n;for(r=65;r<76;r++){switch(e=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(n=0;n<47;n++)Nd.push({k:e+n,v:i})}for(Nd.sort(function(s,a){return a.v-s.v}),n=0;nTX(e)?1:-1}};hVe({target:"Array",proto:!0,forced:xVe},{sort:function(r){r!==void 0&&pVe(r);var e=dVe(this);if(_X)return r===void 0?IX(e):IX(e,r);var i=[],n=yX(e),s,a;for(a=0;a{"use strict";var SVe=bn(),_Ve=Vi(),wVe=fi(),RVe=Pr(),RX=wVe("species");MX.exports=function(t){var r=SVe(t),e=_Ve.f;RVe&&r&&!r[RX]&&e(r,RX,{configurable:!0,get:function(){return this}})}});var DX=V(()=>{var MVe=Nm();MVe("Array")});var CX=V(()=>{"use strict";var DVe=Ne(),CVe=Li(),AVe=Su(),OVe=ms(),PVe=ln(),NVe=Lw(),LVe=fv(),FVe=lv(),HVe=_u(),CN=T1(),UVe=mv(),BVe=UVe("splice"),kVe=Math.max,GVe=Math.min;DVe({target:"Array",proto:!0,forced:!BVe},{splice:function(r,e){var i=CVe(this),n=PVe(i),s=AVe(r,n),a=arguments.length,o,l,c,u,h,p;for(a===0?o=l=0:a===1?(o=0,l=n-s):(o=a-2,l=GVe(kVe(OVe(e),0),n-s)),LVe(n+o-l),c=FVe(i,l),u=0;un-l+o;u--)CN(i,u-1)}else if(o>l)for(u=n-l;u>s;u--)h=u+l-1,p=u+o-1,h in i?i[p]=i[h]:CN(i,p);for(u=0;u{var VVe=gl();VVe("flat")});var OX=V(()=>{var zVe=gl();zVe("flatMap")});var PX=V(()=>{"use strict";var jVe=Ne(),WVe=Li(),qVe=ln(),YVe=Lw(),XVe=T1(),$Ve=fv(),ZVe=[].unshift(0)!==1,KVe=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(t){return t instanceof TypeError}}();jVe({target:"Array",proto:!0,arity:1,forced:ZVe||KVe},{unshift:function(r){var e=WVe(this),i=qVe(e),n=arguments.length;if(n){$Ve(i+n);for(var s=i;s--;){var a=s+n;s in e?e[a]=e[s]:XVe(e,a)}for(var o=0;o{NX.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"});var gv=V((zHt,LX)=>{var JVe=Dn();LX.exports=function(t,r,e){for(var i in r)JVe(t,i,r[i],e);return t}});var yc=V((jHt,FX)=>{var QVe=Oo(),e7e=TypeError;FX.exports=function(t,r){if(QVe(r,t))return t;throw e7e("Incorrect invocation")}});var AN=V((WHt,HX)=>{var t7e=ms(),r7e=Wa(),i7e=RangeError;HX.exports=function(t){if(t===void 0)return 0;var r=t7e(t),e=r7e(r);if(r!==e)throw i7e("Wrong length or index");return e}});var BX=V((qHt,UX)=>{var n7e=Array,s7e=Math.abs,$h=Math.pow,a7e=Math.floor,o7e=Math.log,l7e=Math.LN2,c7e=function(t,r,e){var i=n7e(e),n=e*8-r-1,s=(1<>1,o=r===23?$h(2,-24)-$h(2,-77):0,l=t<0||t===0&&1/t<0?1:0,c=0,u,h,p;for(t=s7e(t),t!=t||t===1/0?(h=t!=t?1:0,u=s):(u=a7e(o7e(t)/l7e),p=$h(2,-u),t*p<1&&(u--,p*=2),u+a>=1?t+=o/p:t+=o*$h(2,1-a),t*p>=2&&(u++,p/=2),u+a>=s?(h=0,u=s):u+a>=1?(h=(t*p-1)*$h(2,r),u=u+a):(h=t*$h(2,a-1)*$h(2,r),u=0));r>=8;)i[c++]=h&255,h/=256,r-=8;for(u=u<0;)i[c++]=u&255,u/=256,n-=8;return i[--c]|=l*128,i},u7e=function(t,r){var e=t.length,i=e*8-r-1,n=(1<>1,a=i-7,o=e-1,l=t[o--],c=l&127,u;for(l>>=7;a>0;)c=c*256+t[o--],a-=8;for(u=c&(1<<-a)-1,c>>=-a,a+=r;a>0;)u=u*256+t[o--],a-=8;if(c===0)c=1-s;else{if(c===n)return u?NaN:l?-1/0:1/0;u=u+$h(2,r),c=c-s}return(l?-1:1)*u*$h(2,c-r)};UX.exports={pack:c7e,unpack:u7e}});var M1=V((YHt,n$)=>{"use strict";var Ww=ir(),UN=Bt(),ON=Pr(),h7e=Uw(),KX=Rm(),kX=va(),GX=gv(),PN=Rt(),Bw=yc(),p7e=ms(),d7e=Wa(),Vw=AN(),JX=BX(),f7e=No(),VX=gc(),m7e=zh().f,g7e=Vi().f,v7e=Dw(),y7e=ov(),QX=Ya(),e$=cs(),T7e=KX.PROPER,zX=KX.CONFIGURABLE,Tv=e$.get,jX=e$.set,zw="ArrayBuffer",t$="DataView",yv="prototype",E7e="Wrong length",r$="Wrong index",vl=Ww[zw],Lo=vl,vv=Lo&&Lo[yv],Du=Ww[t$],Lm=Du&&Du[yv],WX=Object.prototype,b7e=Ww.Array,jw=Ww.RangeError,x7e=UN(v7e),I7e=UN([].reverse),i$=JX.pack,qX=JX.unpack,YX=function(t){return[t&255]},XX=function(t){return[t&255,t>>8&255]},$X=function(t){return[t&255,t>>8&255,t>>16&255,t>>24&255]},ZX=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},S7e=function(t){return i$(t,23,4)},_7e=function(t){return i$(t,52,8)},kw=function(t,r){g7e(t[yv],r,{get:function(){return Tv(this)[r]}})},Ld=function(t,r,e,i){var n=Vw(e),s=Tv(t);if(n+r>s.byteLength)throw jw(r$);var a=Tv(s.buffer).bytes,o=n+s.byteOffset,l=y7e(a,o,o+r);return i?l:I7e(l)},Fd=function(t,r,e,i,n,s){var a=Vw(e),o=Tv(t);if(a+r>o.byteLength)throw jw(r$);for(var l=Tv(o.buffer).bytes,c=a+o.byteOffset,u=i(+n),h=0;hn)throw jw("Wrong offset");if(i=i===void 0?n-s:d7e(i),s+i>n)throw jw(E7e);jX(this,{buffer:r,byteLength:i,byteOffset:s}),ON||(this.buffer=r,this.byteLength=i,this.byteOffset=s)},Lm=Du[yv],ON&&(kw(Lo,"byteLength"),kw(Du,"buffer"),kw(Du,"byteLength"),kw(Du,"byteOffset")),GX(Lm,{getInt8:function(r){return Ld(this,1,r)[0]<<24>>24},getUint8:function(r){return Ld(this,1,r)[0]},getInt16:function(r){var e=Ld(this,2,r,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(r){var e=Ld(this,2,r,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(r){return ZX(Ld(this,4,r,arguments.length>1?arguments[1]:void 0))},getUint32:function(r){return ZX(Ld(this,4,r,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(r){return qX(Ld(this,4,r,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(r){return qX(Ld(this,8,r,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(r,e){Fd(this,1,r,YX,e)},setUint8:function(r,e){Fd(this,1,r,YX,e)},setInt16:function(r,e){Fd(this,2,r,XX,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(r,e){Fd(this,2,r,XX,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(r,e){Fd(this,4,r,$X,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(r,e){Fd(this,4,r,$X,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(r,e){Fd(this,4,r,S7e,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(r,e){Fd(this,8,r,_7e,e,arguments.length>2?arguments[2]:void 0)}});else{if(NN=T7e&&vl.name!==zw,!PN(function(){vl(1)})||!PN(function(){new vl(-1)})||PN(function(){return new vl,new vl(1.5),new vl(NaN),vl.length!=1||NN&&!zX})){for(Lo=function(r){return Bw(this,vv),new vl(Vw(r))},Lo[yv]=vv,LN=m7e(vl),FN=0;LN.length>FN;)(Gw=LN[FN++])in Lo||kX(Lo,Gw,vl[Gw]);vv.constructor=Lo}else NN&&zX&&kX(vl,"name",zw);VX&&f7e(Lm)!==WX&&VX(Lm,WX),R1=new Du(new Lo(2)),HN=UN(Lm.setInt8),R1.setInt8(0,2147483648),R1.setInt8(1,2147483649),(R1.getInt8(0)||!R1.getInt8(1))&&GX(Lm,{setInt8:function(r,e){HN(this,r,e<<24>>24)},setUint8:function(r,e){HN(this,r,e<<24>>24)}},{unsafe:!0})}var NN,LN,FN,Gw,R1,HN;QX(Lo,zw);QX(Du,t$);n$.exports={ArrayBuffer:Lo,DataView:Du}});var a$=V(()=>{"use strict";var w7e=Ne(),R7e=ir(),M7e=M1(),D7e=Nm(),BN="ArrayBuffer",s$=M7e[BN],C7e=R7e[BN];w7e({global:!0,constructor:!0,forced:C7e!==s$},{ArrayBuffer:s$});D7e(BN)});var _i=V((ZHt,g$)=>{"use strict";var A7e=Uw(),zN=Pr(),Ta=ir(),u$=Ti(),Xw=si(),Ud=Si(),jN=mc(),O7e=Dd(),P7e=va(),kN=Dn(),N7e=Vi().f,L7e=Oo(),$w=No(),bv=gc(),F7e=fi(),H7e=_m(),h$=cs(),p$=h$.enforce,U7e=h$.get,qw=Ta.Int8Array,GN=qw&&qw.prototype,o$=Ta.Uint8ClampedArray,l$=o$&&o$.prototype,Cu=qw&&$w(qw),Tc=GN&&$w(GN),B7e=Object.prototype,WN=Ta.TypeError,c$=F7e("toStringTag"),VN=H7e("TYPED_ARRAY_TAG"),Yw="TypedArrayConstructor",Zh=A7e&&!!bv&&jN(Ta.opera)!=="Opera",d$=!1,$a,Hd,Ev,Kh={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},qN={BigInt64Array:8,BigUint64Array:8},k7e=function(r){if(!Xw(r))return!1;var e=jN(r);return e==="DataView"||Ud(Kh,e)||Ud(qN,e)},f$=function(t){var r=$w(t);if(Xw(r)){var e=U7e(r);return e&&Ud(e,Yw)?e[Yw]:f$(r)}},m$=function(t){if(!Xw(t))return!1;var r=jN(t);return Ud(Kh,r)||Ud(qN,r)},G7e=function(t){if(m$(t))return t;throw WN("Target is not a typed array")},V7e=function(t){if(u$(t)&&(!bv||L7e(Cu,t)))return t;throw WN(O7e(t)+" is not a typed array constructor")},z7e=function(t,r,e,i){if(zN){if(e)for(var n in Kh){var s=Ta[n];if(s&&Ud(s.prototype,t))try{delete s.prototype[t]}catch(a){try{s.prototype[t]=r}catch(o){}}}(!Tc[t]||e)&&kN(Tc,t,e?r:Zh&&GN[t]||r,i)}},j7e=function(t,r,e){var i,n;if(zN){if(bv){if(e){for(i in Kh)if(n=Ta[i],n&&Ud(n,t))try{delete n[t]}catch(s){}}if(!Cu[t]||e)try{return kN(Cu,t,e?r:Zh&&Cu[t]||r)}catch(s){}else return}for(i in Kh)n=Ta[i],n&&(!n[t]||e)&&kN(n,t,r)}};for($a in Kh)Hd=Ta[$a],Ev=Hd&&Hd.prototype,Ev?p$(Ev)[Yw]=Hd:Zh=!1;for($a in qN)Hd=Ta[$a],Ev=Hd&&Hd.prototype,Ev&&(p$(Ev)[Yw]=Hd);if((!Zh||!u$(Cu)||Cu===Function.prototype)&&(Cu=function(){throw WN("Incorrect invocation")},Zh))for($a in Kh)Ta[$a]&&bv(Ta[$a],Cu);if((!Zh||!Tc||Tc===B7e)&&(Tc=Cu.prototype,Zh))for($a in Kh)Ta[$a]&&bv(Ta[$a].prototype,Tc);Zh&&$w(l$)!==Tc&&bv(l$,Tc);if(zN&&!Ud(Tc,c$)){d$=!0,N7e(Tc,c$,{get:function(){return Xw(this)?this[VN]:void 0}});for($a in Kh)Ta[$a]&&P7e(Ta[$a],VN,$a)}g$.exports={NATIVE_ARRAY_BUFFER_VIEWS:Zh,TYPED_ARRAY_TAG:d$&&VN,aTypedArray:G7e,aTypedArrayConstructor:V7e,exportTypedArrayMethod:z7e,exportTypedArrayStaticMethod:j7e,getTypedArrayConstructor:f$,isView:k7e,isTypedArray:m$,TypedArray:Cu,TypedArrayPrototype:Tc}});var y$=V(()=>{var W7e=Ne(),v$=_i(),q7e=v$.NATIVE_ARRAY_BUFFER_VIEWS;W7e({target:"ArrayBuffer",stat:!0,forced:!q7e},{isView:v$.isView})});var Zw=V((QHt,T$)=>{var Y7e=Dm(),X7e=Dd(),$7e=TypeError;T$.exports=function(t){if(Y7e(t))return t;throw $7e(X7e(t)+" is not a constructor")}});var Fm=V((e4t,b$)=>{var E$=jr(),Z7e=Zw(),K7e=ma(),J7e=fi(),Q7e=J7e("species");b$.exports=function(t,r){var e=E$(t).constructor,i;return e===void 0||K7e(i=E$(e)[Q7e])?r:Z7e(i)}});var R$=V(()=>{"use strict";var e9e=Ne(),XN=jh(),t9e=Rt(),_$=M1(),x$=jr(),I$=Su(),r9e=Wa(),i9e=Fm(),$N=_$.ArrayBuffer,YN=_$.DataView,w$=YN.prototype,S$=XN($N.prototype.slice),n9e=XN(w$.getUint8),s9e=XN(w$.setUint8),a9e=t9e(function(){return!new $N(2).slice(1,void 0).byteLength});e9e({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:a9e},{slice:function(r,e){if(S$&&e===void 0)return S$(x$(this),r);for(var i=x$(this).byteLength,n=I$(r,i),s=I$(e===void 0?i:e,i),a=new(i9e(this,$N))(r9e(s-n)),o=new YN(this),l=new YN(a),c=0;n{var o9e=Ne(),l9e=M1(),c9e=Uw();o9e({global:!0,constructor:!0,forced:!c9e},{DataView:l9e.DataView})});var D$=V(()=>{M$()});var C$=V(()=>{"use strict";var u9e=Ne(),h9e=Bt(),p9e=Rt(),d9e=p9e(function(){return new Date(16e11).getYear()!==120}),f9e=h9e(Date.prototype.getFullYear);u9e({target:"Date",proto:!0,forced:d9e},{getYear:function(){return f9e(this)-1900}})});var O$=V(()=>{var m9e=Ne(),g9e=Bt(),A$=Date,v9e=g9e(A$.prototype.getTime);m9e({target:"Date",stat:!0},{now:function(){return v9e(new A$)}})});var L$=V(()=>{"use strict";var y9e=Ne(),P$=Bt(),T9e=ms(),N$=Date.prototype,E9e=P$(N$.getTime),b9e=P$(N$.setFullYear);y9e({target:"Date",proto:!0},{setYear:function(r){E9e(this);var e=T9e(r),i=0<=e&&e<=99?e+1900:e;return b9e(this,i)}})});var F$=V(()=>{var x9e=Ne();x9e({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})});var D1=V((m4t,H$)=>{"use strict";var I9e=ms(),S9e=mi(),_9e=ls(),w9e=RangeError;H$.exports=function(r){var e=S9e(_9e(this)),i="",n=I9e(r);if(n<0||n==1/0)throw w9e("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))n&1&&(i+=e);return i}});var Kw=V((g4t,G$)=>{var k$=Bt(),R9e=Wa(),U$=mi(),M9e=D1(),D9e=ls(),C9e=k$(M9e),A9e=k$("".slice),O9e=Math.ceil,B$=function(t){return function(r,e,i){var n=U$(D9e(r)),s=R9e(e),a=n.length,o=i===void 0?" ":U$(i),l,c;return s<=a||o==""?n:(l=s-a,c=C9e(o,O9e(l/o.length)),c.length>l&&(c=A9e(c,0,l)),t?n+c:c+n)}};G$.exports={start:B$(!1),end:B$(!0)}});var j$=V((v4t,z$)=>{"use strict";var Bd=Bt(),V$=Rt(),Hm=Kw().start,P9e=RangeError,N9e=isFinite,L9e=Math.abs,Jh=Date.prototype,ZN=Jh.toISOString,F9e=Bd(Jh.getTime),H9e=Bd(Jh.getUTCDate),U9e=Bd(Jh.getUTCFullYear),B9e=Bd(Jh.getUTCHours),k9e=Bd(Jh.getUTCMilliseconds),G9e=Bd(Jh.getUTCMinutes),V9e=Bd(Jh.getUTCMonth),z9e=Bd(Jh.getUTCSeconds);z$.exports=V$(function(){return ZN.call(new Date(-5e13-1))!="0385-07-25T07:06:39.999Z"})||!V$(function(){ZN.call(new Date(NaN))})?function(){if(!N9e(F9e(this)))throw P9e("Invalid time value");var r=this,e=U9e(r),i=k9e(r),n=e<0?"-":e>9999?"+":"";return n+Hm(L9e(e),n?6:4,0)+"-"+Hm(V9e(r)+1,2,0)+"-"+Hm(H9e(r),2,0)+"T"+Hm(B9e(r),2,0)+":"+Hm(G9e(r),2,0)+":"+Hm(z9e(r),2,0)+"."+Hm(i,3,0)+"Z"}:ZN});var q$=V(()=>{var j9e=Ne(),W$=j$();j9e({target:"Date",proto:!0,forced:Date.prototype.toISOString!==W$},{toISOString:W$})});var Y$=V(()=>{"use strict";var W9e=Ne(),q9e=Rt(),Y9e=Li(),X9e=r1(),$9e=q9e(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});W9e({target:"Date",proto:!0,arity:1,forced:$9e},{toJSON:function(r){var e=Y9e(this),i=X9e(e,"number");return typeof i=="number"&&!isFinite(i)?null:e.toISOString()}})});var $$=V((x4t,X$)=>{"use strict";var Z9e=jr(),K9e=i2(),J9e=TypeError;X$.exports=function(t){if(Z9e(this),t==="string"||t==="default")t="string";else if(t!=="number")throw J9e("Incorrect hint");return K9e(this,t)}});var J$=V(()=>{var Q9e=Si(),eze=Dn(),tze=$$(),rze=fi(),Z$=rze("toPrimitive"),K$=Date.prototype;Q9e(K$,Z$)||eze(K$,Z$,tze)});var rZ=V(()=>{var eZ=Bt(),ize=Dn(),KN=Date.prototype,Q$="Invalid Date",tZ="toString",nze=eZ(KN[tZ]),sze=eZ(KN.getTime);String(new Date(NaN))!=Q$&&ize(KN,tZ,function(){var r=sze(this);return r===r?nze(this):Q$})});var nZ=V(()=>{"use strict";var aze=Ne(),C1=Bt(),oze=mi(),lze=C1("".charAt),cze=C1("".charCodeAt),uze=C1(/./.exec),hze=C1(1 .toString),pze=C1("".toUpperCase),dze=/[\w*+\-./@]/,iZ=function(t,r){for(var e=hze(t,16);e.length{"use strict";var aZ=Bt(),fze=fs(),mze=si(),gze=Si(),sZ=Od(),vze=tv(),oZ=Function,yze=aZ([].concat),Tze=aZ([].join),JN={},Eze=function(t,r,e){if(!gze(JN,r)){for(var i=[],n=0;n{var bze=Ne(),cZ=QN();bze({target:"Function",proto:!0,forced:Function.bind!==cZ},{bind:cZ})});var dZ=V(()=>{"use strict";var xze=Ti(),hZ=si(),Ize=Vi(),Sze=No(),_ze=fi(),wze=iw(),eL=_ze("hasInstance"),pZ=Function.prototype;eL in pZ||Ize.f(pZ,eL,{value:wze(function(t){if(!xze(this)||!hZ(t))return!1;var r=this.prototype;if(!hZ(r))return t instanceof this;for(;t=Sze(t);)if(r===t)return!0;return!1},eL)})});var vZ=V(()=>{var Rze=Pr(),Mze=Rm().EXISTS,fZ=Bt(),Dze=Vi().f,mZ=Function.prototype,Cze=fZ(mZ.toString),gZ=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Aze=fZ(gZ.exec),Oze="name";Rze&&!Mze&&Dze(mZ,Oze,{configurable:!0,get:function(){try{return Aze(gZ,Cze(this))[1]}catch(t){return""}}})});var yZ=V(()=>{var Pze=Ne(),tL=ir();Pze({global:!0,forced:tL.globalThis!==tL},{globalThis:tL})});var TZ=V(()=>{var Nze=ir(),Lze=Ya();Lze(Nze.JSON,"JSON",!0)});var Jw=V((k4t,EZ)=>{var Fze=Rt();EZ.exports=Fze(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})});var eR=V((G4t,xZ)=>{var Hze=Rt(),Uze=si(),Bze=fa(),bZ=Jw(),Qw=Object.isExtensible,kze=Hze(function(){Qw(1)});xZ.exports=kze||bZ?function(r){return!Uze(r)||bZ&&Bze(r)=="ArrayBuffer"?!1:Qw?Qw(r):!0}:Qw});var Um=V((V4t,IZ)=>{var Gze=Rt();IZ.exports=!Gze(function(){return Object.isExtensible(Object.preventExtensions({}))})});var kd=V((z4t,wZ)=>{var Vze=Ne(),zze=Bt(),jze=iv(),Wze=si(),rL=Si(),qze=Vi().f,SZ=zh(),Yze=hw(),iL=eR(),Xze=_m(),$ze=Um(),_Z=!1,Qh=Xze("meta"),Zze=0,nL=function(t){qze(t,Qh,{value:{objectID:"O"+Zze++,weakData:{}}})},Kze=function(t,r){if(!Wze(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!rL(t,Qh)){if(!iL(t))return"F";if(!r)return"E";nL(t)}return t[Qh].objectID},Jze=function(t,r){if(!rL(t,Qh)){if(!iL(t))return!0;if(!r)return!1;nL(t)}return t[Qh].weakData},Qze=function(t){return $ze&&_Z&&iL(t)&&!rL(t,Qh)&&nL(t),t},eje=function(){tje.enable=function(){},_Z=!0;var t=SZ.f,r=zze([].splice),e={};e[Qh]=1,t(e).length&&(SZ.f=function(i){for(var n=t(i),s=0,a=n.length;s{"use strict";var rje=Ne(),ije=ir(),nje=Bt(),RZ=sv(),sje=Dn(),aje=kd(),oje=vc(),lje=yc(),cje=Ti(),uje=ma(),sL=si(),aL=Rt(),hje=b1(),pje=Ya(),dje=Om();MZ.exports=function(t,r,e){var i=t.indexOf("Map")!==-1,n=t.indexOf("Weak")!==-1,s=i?"set":"add",a=ije[t],o=a&&a.prototype,l=a,c={},u=function(y){var E=nje(o[y]);sje(o,y,y=="add"?function(x){return E(this,x===0?0:x),this}:y=="delete"?function(b){return n&&!sL(b)?!1:E(this,b===0?0:b)}:y=="get"?function(x){return n&&!sL(x)?void 0:E(this,x===0?0:x)}:y=="has"?function(x){return n&&!sL(x)?!1:E(this,x===0?0:x)}:function(x,S){return E(this,x===0?0:x,S),this})},h=RZ(t,!cje(a)||!(n||o.forEach&&!aL(function(){new a().entries().next()})));if(h)l=e.getConstructor(r,t,i,s),aje.enable();else if(RZ(t,!0)){var p=new l,d=p[s](n?{}:-0,1)!=p,f=aL(function(){p.has(1)}),m=hje(function(y){new a(y)}),g=!n&&aL(function(){for(var y=new a,E=5;E--;)y[s](E,E);return!y.has(-0)});m||(l=r(function(y,E){lje(y,o);var b=dje(new a,y,l);return uje(E)||oje(E,b[s],{that:b,AS_ENTRIES:i}),b}),l.prototype=o,o.constructor=l),(f||g)&&(u("delete"),u("has"),i&&u("get")),(g||d)&&u(s),n&&o.clear&&delete o.clear}return c[t]=l,rje({global:!0,constructor:!0,forced:l!=a},c),pje(l,t),n||e.setStrong(l,t,i),l}});var lL=V((W4t,PZ)=>{"use strict";var fje=Vi().f,mje=qa(),DZ=gv(),gje=fl(),vje=yc(),yje=ma(),Tje=vc(),Eje=Pw(),tR=S1(),bje=Nm(),O1=Pr(),CZ=kd().fastKey,OZ=cs(),AZ=OZ.set,oL=OZ.getterFor;PZ.exports={getConstructor:function(t,r,e,i){var n=t(function(c,u){vje(c,s),AZ(c,{type:r,index:mje(null),first:void 0,last:void 0,size:0}),O1||(c.size=0),yje(u)||Tje(u,c[i],{that:c,AS_ENTRIES:e})}),s=n.prototype,a=oL(r),o=function(c,u,h){var p=a(c),d=l(c,u),f,m;return d?d.value=h:(p.last=d={index:m=CZ(u,!0),key:u,value:h,previous:f=p.last,next:void 0,removed:!1},p.first||(p.first=d),f&&(f.next=d),O1?p.size++:c.size++,m!=="F"&&(p.index[m]=d)),c},l=function(c,u){var h=a(c),p=CZ(u),d;if(p!=="F")return h.index[p];for(d=h.first;d;d=d.next)if(d.key==u)return d};return DZ(s,{clear:function(){for(var u=this,h=a(u),p=h.index,d=h.first;d;)d.removed=!0,d.previous&&(d.previous=d.previous.next=void 0),delete p[d.index],d=d.next;h.first=h.last=void 0,O1?h.size=0:u.size=0},delete:function(c){var u=this,h=a(u),p=l(u,c);if(p){var d=p.next,f=p.previous;delete h.index[p.index],p.removed=!0,f&&(f.next=d),d&&(d.previous=f),h.first==p&&(h.first=d),h.last==p&&(h.last=f),O1?h.size--:u.size--}return!!p},forEach:function(u){for(var h=a(this),p=gje(u,arguments.length>1?arguments[1]:void 0),d;d=d?d.next:h.first;)for(p(d.value,d.key,this);d&&d.removed;)d=d.previous},has:function(u){return!!l(this,u)}}),DZ(s,e?{get:function(u){var h=l(this,u);return h&&h.value},set:function(u,h){return o(this,u===0?0:u,h)}}:{add:function(u){return o(this,u=u===0?0:u,u)}}),O1&&fje(s,"size",{get:function(){return a(this).size}}),n},setStrong:function(t,r,e){var i=r+" Iterator",n=oL(r),s=oL(i);Eje(t,r,function(a,o){AZ(this,{type:i,target:a,state:n(a),kind:o,last:void 0})},function(){for(var a=s(this),o=a.kind,l=a.last;l&&l.removed;)l=l.previous;return!a.target||!(a.last=l=l?l.next:a.state.first)?(a.target=void 0,tR(void 0,!0)):o=="keys"?tR(l.key,!1):o=="values"?tR(l.value,!1):tR([l.key,l.value],!1)},e?"entries":"values",!e,!0),bje(r)}}});var NZ=V(()=>{"use strict";var xje=A1(),Ije=lL();xje("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Ije)});var LZ=V(()=>{NZ()});var cL=V((Z4t,FZ)=>{var Sje=Math.log;FZ.exports=Math.log1p||function(r){var e=+r;return e>-1e-8&&e<1e-8?e-e*e/2:Sje(1+e)}});var UZ=V(()=>{var _je=Ne(),wje=cL(),uL=Math.acosh,Rje=Math.log,HZ=Math.sqrt,Mje=Math.LN2,Dje=!uL||Math.floor(uL(Number.MAX_VALUE))!=710||uL(1/0)!=1/0;_je({target:"Math",stat:!0,forced:Dje},{acosh:function(r){var e=+r;return e<1?NaN:e>9490626562425156e-8?Rje(e)+Mje:wje(e-1+HZ(e-1)*HZ(e+1))}})});var GZ=V(()=>{var Cje=Ne(),BZ=Math.asinh,Aje=Math.log,Oje=Math.sqrt;function kZ(t){var r=+t;return!isFinite(r)||r==0?r:r<0?-kZ(-r):Aje(r+Oje(r*r+1))}Cje({target:"Math",stat:!0,forced:!(BZ&&1/BZ(0)>0)},{asinh:kZ})});var zZ=V(()=>{var Pje=Ne(),VZ=Math.atanh,Nje=Math.log;Pje({target:"Math",stat:!0,forced:!(VZ&&1/VZ(-0)<0)},{atanh:function(r){var e=+r;return e==0?e:Nje((1+e)/(1-e))/2}})});var rR=V((iUt,jZ)=>{jZ.exports=Math.sign||function(r){var e=+r;return e==0||e!=e?e:e<0?-1:1}});var WZ=V(()=>{var Lje=Ne(),Fje=rR(),Hje=Math.abs,Uje=Math.pow;Lje({target:"Math",stat:!0},{cbrt:function(r){var e=+r;return Fje(e)*Uje(Hje(e),1/3)}})});var qZ=V(()=>{var Bje=Ne(),kje=Math.floor,Gje=Math.log,Vje=Math.LOG2E;Bje({target:"Math",stat:!0},{clz32:function(r){var e=r>>>0;return e?31-kje(Gje(e+.5)*Vje):32}})});var N1=V((lUt,YZ)=>{var P1=Math.expm1,zje=Math.exp;YZ.exports=!P1||P1(10)>22025.465794806718||P1(10)<22025.465794806718||P1(-2e-17)!=-2e-17?function(r){var e=+r;return e==0?e:e>-1e-6&&e<1e-6?e+e*e/2:zje(e)-1}:P1});var $Z=V(()=>{var jje=Ne(),Wje=N1(),XZ=Math.cosh,qje=Math.abs,hL=Math.E;jje({target:"Math",stat:!0,forced:!XZ||XZ(710)===1/0},{cosh:function(r){var e=Wje(qje(r)-1)+1;return(e+1/(e*hL*hL))*(hL/2)}})});var KZ=V(()=>{var Yje=Ne(),ZZ=N1();Yje({target:"Math",stat:!0,forced:ZZ!=Math.expm1},{expm1:ZZ})});var QZ=V((dUt,JZ)=>{var Xje=rR(),$je=Math.abs,nR=Math.pow,dL=nR(2,-52),iR=nR(2,-23),Zje=nR(2,127)*(2-iR),pL=nR(2,-126),Kje=function(t){return t+1/dL-1/dL};JZ.exports=Math.fround||function(r){var e=+r,i=$je(e),n=Xje(e),s,a;return iZje||a!=a?n*(1/0):n*a)}});var eK=V(()=>{var Jje=Ne(),Qje=QZ();Jje({target:"Math",stat:!0},{fround:Qje})});var rK=V(()=>{var eWe=Ne(),tK=Math.hypot,tWe=Math.abs,rWe=Math.sqrt,iWe=!!tK&&tK(1/0,NaN)!==1/0;eWe({target:"Math",stat:!0,arity:2,forced:iWe},{hypot:function(r,e){for(var i=0,n=0,s=arguments.length,a=0,o,l;n0?(l=o/a,i+=l*l):i+=o;return a===1/0?1/0:a*rWe(i)}})});var nK=V(()=>{var nWe=Ne(),sWe=Rt(),iK=Math.imul,aWe=sWe(function(){return iK(4294967295,5)!=-5||iK.length!=2});nWe({target:"Math",stat:!0,forced:aWe},{imul:function(r,e){var i=65535,n=+r,s=+e,a=i&n,o=i&s;return 0|a*o+((i&n>>>16)*o+a*(i&s>>>16)<<16>>>0)}})});var fL=V((EUt,sK)=>{var oWe=Math.log,lWe=Math.LOG10E;sK.exports=Math.log10||function(r){return oWe(r)*lWe}});var aK=V(()=>{var cWe=Ne(),uWe=fL();cWe({target:"Math",stat:!0},{log10:uWe})});var oK=V(()=>{var hWe=Ne(),pWe=cL();hWe({target:"Math",stat:!0},{log1p:pWe})});var lK=V(()=>{var dWe=Ne(),fWe=Math.log,mWe=Math.LN2;dWe({target:"Math",stat:!0},{log2:function(r){return fWe(r)/mWe}})});var cK=V(()=>{var gWe=Ne(),vWe=rR();gWe({target:"Math",stat:!0},{sign:vWe})});var pK=V(()=>{var yWe=Ne(),TWe=Rt(),uK=N1(),EWe=Math.abs,hK=Math.exp,bWe=Math.E,xWe=TWe(function(){return Math.sinh(-2e-17)!=-2e-17});yWe({target:"Math",stat:!0,forced:xWe},{sinh:function(r){var e=+r;return EWe(e)<1?(uK(e)-uK(-e))/2:(hK(e-1)-hK(-e-1))*(bWe/2)}})});var mK=V(()=>{var IWe=Ne(),dK=N1(),fK=Math.exp;IWe({target:"Math",stat:!0},{tanh:function(r){var e=+r,i=dK(e),n=dK(-e);return i==1/0?1:n==1/0?-1:(i-n)/(fK(e)+fK(-e))}})});var gK=V(()=>{var SWe=Ya();SWe(Math,"Math",!0)});var vK=V(()=>{var _We=Ne(),wWe=T2();_We({target:"Math",stat:!0},{trunc:wWe})});var L1=V((HUt,yK)=>{var RWe=Bt();yK.exports=RWe(1 .valueOf)});var F1=V((UUt,TK)=>{TK.exports=` -\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var Bm=V((BUt,bK)=>{var MWe=Bt(),DWe=ls(),CWe=mi(),AWe=F1(),EK=MWe("".replace),sR="["+AWe+"]",OWe=RegExp("^"+sR+sR+"*"),PWe=RegExp(sR+sR+"*$"),mL=function(t){return function(r){var e=CWe(DWe(r));return t&1&&(e=EK(e,OWe,"")),t&2&&(e=EK(e,PWe,"")),e}};bK.exports={start:mL(1),end:mL(2),trim:mL(3)}});var MK=V(()=>{"use strict";var NWe=Ne(),gL=Bn(),LWe=Pr(),SK=ir(),vL=pw(),_K=Bt(),FWe=sv(),xK=Si(),HWe=Om(),UWe=Oo(),BWe=Md(),wK=r1(),kWe=Rt(),GWe=zh().f,VWe=Us().f,zWe=Vi().f,jWe=L1(),WWe=Bm().trim,H1="Number",xv=SK[H1],IK=vL[H1],yL=xv.prototype,qWe=SK.TypeError,YWe=_K("".slice),aR=_K("".charCodeAt),XWe=function(t){var r=wK(t,"number");return typeof r=="bigint"?r:$We(r)},$We=function(t){var r=wK(t,"number"),e,i,n,s,a,o,l,c;if(BWe(r))throw qWe("Cannot convert a Symbol value to a number");if(typeof r=="string"&&r.length>2){if(r=WWe(r),e=aR(r,0),e===43||e===45){if(i=aR(r,2),i===88||i===120)return NaN}else if(e===48){switch(aR(r,1)){case 66:case 98:n=2,s=49;break;case 79:case 111:n=8,s=55;break;default:return+r}for(a=YWe(r,2),o=a.length,l=0;ls)return NaN;return parseInt(a,n)}}return+r},TL=FWe(H1,!xv(" 0o1")||!xv("0b1")||xv("+0x1")),ZWe=function(t){return UWe(yL,t)&&kWe(function(){jWe(t)})},oR=function(r){var e=arguments.length<1?0:xv(XWe(r));return ZWe(this)?HWe(Object(e),this,oR):e};oR.prototype=yL;TL&&!gL&&(yL.constructor=oR);NWe({global:!0,constructor:!0,wrap:!0,forced:TL},{Number:oR});var RK=function(t,r){for(var e=LWe?GWe(r):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0,n;e.length>i;i++)xK(r,n=e[i])&&!xK(t,n)&&zWe(t,n,VWe(r,n))};gL&&IK&&RK(vL[H1],IK);(TL||gL)&&RK(vL[H1],xv)});var DK=V(()=>{var KWe=Ne();KWe({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})});var AK=V((jUt,CK)=>{var JWe=ir(),QWe=JWe.isFinite;CK.exports=Number.isFinite||function(r){return typeof r=="number"&&QWe(r)}});var OK=V(()=>{var eqe=Ne(),tqe=AK();eqe({target:"Number",stat:!0},{isFinite:tqe})});var lR=V((YUt,PK)=>{var rqe=si(),iqe=Math.floor;PK.exports=Number.isInteger||function(r){return!rqe(r)&&isFinite(r)&&iqe(r)===r}});var NK=V(()=>{var nqe=Ne(),sqe=lR();nqe({target:"Number",stat:!0},{isInteger:sqe})});var LK=V(()=>{var aqe=Ne();aqe({target:"Number",stat:!0},{isNaN:function(r){return r!=r}})});var FK=V(()=>{var oqe=Ne(),lqe=lR(),cqe=Math.abs;oqe({target:"Number",stat:!0},{isSafeInteger:function(r){return lqe(r)&&cqe(r)<=9007199254740991}})});var HK=V(()=>{var uqe=Ne();uqe({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})});var UK=V(()=>{var hqe=Ne();hqe({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})});var EL=V((nBt,VK)=>{var GK=ir(),pqe=Rt(),dqe=Bt(),fqe=mi(),mqe=Bm().trim,gqe=F1(),vqe=dqe("".charAt),cR=GK.parseFloat,BK=GK.Symbol,kK=BK&&BK.iterator,yqe=1/cR(gqe+"-0")!==-1/0||kK&&!pqe(function(){cR(Object(kK))});VK.exports=yqe?function(r){var e=mqe(fqe(r)),i=cR(e);return i===0&&vqe(e,0)=="-"?-0:i}:cR});var jK=V(()=>{var Tqe=Ne(),zK=EL();Tqe({target:"Number",stat:!0,forced:Number.parseFloat!=zK},{parseFloat:zK})});var bL=V((oBt,ZK)=>{var XK=ir(),Eqe=Rt(),bqe=Bt(),xqe=mi(),Iqe=Bm().trim,WK=F1(),U1=XK.parseInt,qK=XK.Symbol,YK=qK&&qK.iterator,$K=/^[+-]?0x/i,Sqe=bqe($K.exec),_qe=U1(WK+"08")!==8||U1(WK+"0x16")!==22||YK&&!Eqe(function(){U1(Object(YK))});ZK.exports=_qe?function(r,e){var i=Iqe(xqe(r));return U1(i,e>>>0||(Sqe($K,i)?16:10))}:U1});var JK=V(()=>{var wqe=Ne(),KK=bL();wqe({target:"Number",stat:!0,forced:Number.parseInt!=KK},{parseInt:KK})});var iJ=V(()=>{"use strict";var Rqe=Ne(),xL=Bt(),Mqe=ms(),Dqe=L1(),Cqe=D1(),Aqe=fL(),uR=Rt(),Oqe=RangeError,QK=String,Pqe=isFinite,Nqe=Math.abs,Lqe=Math.floor,eJ=Math.pow,Fqe=Math.round,Au=xL(1 .toExponential),Hqe=xL(Cqe),tJ=xL("".slice),rJ=Au(-69e-12,4)==="-6.9000e-11"&&Au(1.255,2)==="1.25e+0"&&Au(12345,3)==="1.235e+4"&&Au(25,0)==="3e+1",Uqe=uR(function(){Au(1,1/0)})&&uR(function(){Au(1,-1/0)}),Bqe=!uR(function(){Au(1/0,1/0)})&&!uR(function(){Au(NaN,1/0)}),kqe=!rJ||!Uqe||!Bqe;Rqe({target:"Number",proto:!0,forced:kqe},{toExponential:function(r){var e=Dqe(this);if(r===void 0)return Au(e);var i=Mqe(r);if(!Pqe(e))return String(e);if(i<0||i>20)throw Oqe("Incorrect fraction digits");if(rJ)return Au(e,i);var n="",s="",a=0,o="",l="";if(e<0&&(n="-",e=-e),e===0)a=0,s=Hqe("0",i+1);else{var c=Aqe(e);a=Lqe(c);var u=0,h=eJ(10,a-i);u=Fqe(e/h),2*e>=(2*u+1)*h&&(u+=1),u>=eJ(10,i+1)&&(u/=10,a+=1),s=QK(u)}return i!==0&&(s=tJ(s,0,1)+"."+tJ(s,1)),a===0?(o="+",l="0"):(o=a>0?"+":"-",l=QK(Nqe(a))),s+="e"+o+l,n+s}})});var cJ=V(()=>{"use strict";var Gqe=Ne(),_L=Bt(),Vqe=ms(),zqe=L1(),jqe=D1(),nJ=Rt(),Wqe=RangeError,oJ=String,lJ=Math.floor,SL=_L(jqe),sJ=_L("".slice),B1=_L(1 .toFixed),Sv=function(t,r,e){return r===0?e:r%2===1?Sv(t,r-1,e*t):Sv(t*t,r/2,e)},qqe=function(t){for(var r=0,e=t;e>=4096;)r+=12,e/=4096;for(;e>=2;)r+=1,e/=2;return r},Iv=function(t,r,e){for(var i=-1,n=e;++i<6;)n+=r*t[i],t[i]=n%1e7,n=lJ(n/1e7)},IL=function(t,r){for(var e=6,i=0;--e>=0;)i+=t[e],t[e]=lJ(i/r),i=i%r*1e7},aJ=function(t){for(var r=6,e="";--r>=0;)if(e!==""||r===0||t[r]!==0){var i=oJ(t[r]);e=e===""?i:e+SL("0",7-i.length)+i}return e},Yqe=nJ(function(){return B1(8e-5,3)!=="0.000"||B1(.9,0)!=="1"||B1(1.255,2)!=="1.25"||B1(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!nJ(function(){B1({})});Gqe({target:"Number",proto:!0,forced:Yqe},{toFixed:function(r){var e=zqe(this),i=Vqe(r),n=[0,0,0,0,0,0],s="",a="0",o,l,c,u;if(i<0||i>20)throw Wqe("Incorrect fraction digits");if(e!=e)return"NaN";if(e<=-1e21||e>=1e21)return oJ(e);if(e<0&&(s="-",e=-e),e>1e-21)if(o=qqe(e*Sv(2,69,1))-69,l=o<0?e*Sv(2,-o,1):e/Sv(2,o,1),l*=4503599627370496,o=52-o,o>0){for(Iv(n,0,l),c=i;c>=7;)Iv(n,1e7,0),c-=7;for(Iv(n,Sv(10,c,1),0),c=o-1;c>=23;)IL(n,1<<23),c-=23;IL(n,1<0?(u=a.length,a=s+(u<=i?"0."+SL("0",i-u)+a:sJ(a,0,u-i)+"."+sJ(a,u-i))):a=s+a,a}})});var pJ=V(()=>{"use strict";var Xqe=Ne(),$qe=Bt(),uJ=Rt(),hJ=L1(),hR=$qe(1 .toPrecision),Zqe=uJ(function(){return hR(1,void 0)!=="1"})||!uJ(function(){hR({})});Xqe({target:"Number",proto:!0,forced:Zqe},{toPrecision:function(r){return r===void 0?hR(hJ(this)):hR(hJ(this),r)}})});var RL=V((gBt,mJ)=>{"use strict";var dJ=Pr(),Kqe=Bt(),Jqe=ni(),Qqe=Rt(),wL=av(),eYe=a1(),tYe=t1(),rYe=Li(),iYe=xm(),_v=Object.assign,fJ=Object.defineProperty,nYe=Kqe([].concat);mJ.exports=!_v||Qqe(function(){if(dJ&&_v({b:1},_v(fJ({},"a",{enumerable:!0,get:function(){fJ(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},r={},e=Symbol(),i="abcdefghijklmnopqrst";return t[e]=7,i.split("").forEach(function(n){r[n]=n}),_v({},t)[e]!=7||wL(_v({},r)).join("")!=i})?function(r,e){for(var i=rYe(r),n=arguments.length,s=1,a=eYe.f,o=tYe.f;n>s;)for(var l=iYe(arguments[s++]),c=a?nYe(wL(l),a(l)):wL(l),u=c.length,h=0,p;u>h;)p=c[h++],(!dJ||Jqe(o,l,p))&&(i[p]=l[p]);return i}:_v});var vJ=V(()=>{var sYe=Ne(),gJ=RL();sYe({target:"Object",stat:!0,arity:2,forced:Object.assign!==gJ},{assign:gJ})});var yJ=V(()=>{var aYe=Ne(),oYe=Pr(),lYe=qa();aYe({target:"Object",stat:!0,sham:!oYe},{create:lYe})});var k1=V((bBt,EJ)=>{"use strict";var cYe=Bn(),uYe=ir(),hYe=Rt(),TJ=Hw();EJ.exports=cYe||!hYe(function(){if(!(TJ&&TJ<535)){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete uYe[t]}})});var bJ=V(()=>{"use strict";var pYe=Ne(),dYe=Pr(),fYe=k1(),mYe=fs(),gYe=Li(),vYe=Vi();dYe&&pYe({target:"Object",proto:!0,forced:fYe},{__defineGetter__:function(r,e){vYe.f(gYe(this),r,{get:mYe(e),enumerable:!0,configurable:!0})}})});var IJ=V(()=>{var yYe=Ne(),TYe=Pr(),xJ=lw().f;yYe({target:"Object",stat:!0,forced:Object.defineProperties!==xJ,sham:!TYe},{defineProperties:xJ})});var _J=V(()=>{var EYe=Ne(),bYe=Pr(),SJ=Vi().f;EYe({target:"Object",stat:!0,forced:Object.defineProperty!==SJ,sham:!bYe},{defineProperty:SJ})});var wJ=V(()=>{"use strict";var xYe=Ne(),IYe=Pr(),SYe=k1(),_Ye=fs(),wYe=Li(),RYe=Vi();IYe&&xYe({target:"Object",proto:!0,forced:SYe},{__defineSetter__:function(r,e){RYe.f(wYe(this),r,{set:_Ye(e),enumerable:!0,configurable:!0})}})});var ML=V((CBt,DJ)=>{var MYe=Pr(),MJ=Bt(),DYe=av(),CYe=ga(),AYe=t1().f,OYe=MJ(AYe),PYe=MJ([].push),RJ=function(t){return function(r){for(var e=CYe(r),i=DYe(e),n=i.length,s=0,a=[],o;n>s;)o=i[s++],(!MYe||OYe(e,o))&&PYe(a,t?[o,e[o]]:e[o]);return a}};DJ.exports={entries:RJ(!0),values:RJ(!1)}});var CJ=V(()=>{var NYe=Ne(),LYe=ML().entries;NYe({target:"Object",stat:!0},{entries:function(r){return LYe(r)}})});var AJ=V(()=>{var FYe=Ne(),HYe=Um(),UYe=Rt(),BYe=si(),kYe=kd().onFreeze,DL=Object.freeze,GYe=UYe(function(){DL(1)});FYe({target:"Object",stat:!0,forced:GYe,sham:!HYe},{freeze:function(r){return DL&&BYe(r)?DL(kYe(r)):r}})});var OJ=V(()=>{var VYe=Ne(),zYe=vc(),jYe=_u();VYe({target:"Object",stat:!0},{fromEntries:function(r){var e={};return zYe(r,function(i,n){jYe(e,i,n)},{AS_ENTRIES:!0}),e}})});var LJ=V(()=>{var WYe=Ne(),qYe=Rt(),YYe=ga(),PJ=Us().f,NJ=Pr(),XYe=qYe(function(){PJ(1)}),$Ye=!NJ||XYe;WYe({target:"Object",stat:!0,forced:$Ye,sham:!NJ},{getOwnPropertyDescriptor:function(r,e){return PJ(YYe(r),e)}})});var FJ=V(()=>{var ZYe=Ne(),KYe=Pr(),JYe=sw(),QYe=ga(),eXe=Us(),tXe=_u();ZYe({target:"Object",stat:!0,sham:!KYe},{getOwnPropertyDescriptors:function(r){for(var e=QYe(r),i=eXe.f,n=JYe(e),s={},a=0,o,l;n.length>a;)l=i(e,o=n[a++]),l!==void 0&&tXe(s,o,l);return s}})});var HJ=V(()=>{var rXe=Ne(),iXe=Rt(),nXe=hw().f,sXe=iXe(function(){return!Object.getOwnPropertyNames(1)});rXe({target:"Object",stat:!0,forced:sXe},{getOwnPropertyNames:nXe})});var BJ=V(()=>{var aXe=Ne(),oXe=Rt(),lXe=Li(),UJ=No(),cXe=Iw(),uXe=oXe(function(){UJ(1)});aXe({target:"Object",stat:!0,forced:uXe,sham:!cXe},{getPrototypeOf:function(r){return UJ(lXe(r))}})});var kJ=V(()=>{var hXe=Ne(),pXe=Si();hXe({target:"Object",stat:!0},{hasOwn:pXe})});var CL=V((YBt,GJ)=>{GJ.exports=Object.is||function(r,e){return r===e?r!==0||1/r===1/e:r!=r&&e!=e}});var VJ=V(()=>{var dXe=Ne(),fXe=CL();dXe({target:"Object",stat:!0},{is:fXe})});var jJ=V(()=>{var mXe=Ne(),zJ=eR();mXe({target:"Object",stat:!0,forced:Object.isExtensible!==zJ},{isExtensible:zJ})});var qJ=V(()=>{var gXe=Ne(),vXe=Rt(),yXe=si(),TXe=fa(),WJ=Jw(),AL=Object.isFrozen,EXe=vXe(function(){AL(1)});gXe({target:"Object",stat:!0,forced:EXe||WJ},{isFrozen:function(r){return!yXe(r)||WJ&&TXe(r)=="ArrayBuffer"?!0:AL?AL(r):!1}})});var XJ=V(()=>{var bXe=Ne(),xXe=Rt(),IXe=si(),SXe=fa(),YJ=Jw(),OL=Object.isSealed,_Xe=xXe(function(){OL(1)});bXe({target:"Object",stat:!0,forced:_Xe||YJ},{isSealed:function(r){return!IXe(r)||YJ&&SXe(r)=="ArrayBuffer"?!0:OL?OL(r):!1}})});var ZJ=V(()=>{var wXe=Ne(),RXe=Li(),$J=av(),MXe=Rt(),DXe=MXe(function(){$J(1)});wXe({target:"Object",stat:!0,forced:DXe},{keys:function(r){return $J(RXe(r))}})});var KJ=V(()=>{"use strict";var CXe=Ne(),AXe=Pr(),OXe=k1(),PXe=Li(),NXe=Vh(),LXe=No(),FXe=Us().f;AXe&&CXe({target:"Object",proto:!0,forced:OXe},{__lookupGetter__:function(r){var e=PXe(this),i=NXe(r),n;do if(n=FXe(e,i))return n.get;while(e=LXe(e))}})});var JJ=V(()=>{"use strict";var HXe=Ne(),UXe=Pr(),BXe=k1(),kXe=Li(),GXe=Vh(),VXe=No(),zXe=Us().f;UXe&&HXe({target:"Object",proto:!0,forced:BXe},{__lookupSetter__:function(r){var e=kXe(this),i=GXe(r),n;do if(n=zXe(e,i))return n.set;while(e=VXe(e))}})});var QJ=V(()=>{var jXe=Ne(),WXe=si(),qXe=kd().onFreeze,YXe=Um(),XXe=Rt(),PL=Object.preventExtensions,$Xe=XXe(function(){PL(1)});jXe({target:"Object",stat:!0,forced:$Xe,sham:!YXe},{preventExtensions:function(r){return PL&&WXe(r)?PL(qXe(r)):r}})});var Gd=V((ukt,tQ)=>{var eQ=iw(),ZXe=Vi();tQ.exports=function(t,r,e){return e.get&&eQ(e.get,r,{getter:!0}),e.set&&eQ(e.set,r,{setter:!0}),ZXe.f(t,r,e)}});var oQ=V(()=>{"use strict";var KXe=Pr(),JXe=Gd(),rQ=si(),QXe=Li(),e$e=ls(),iQ=Object.getPrototypeOf,nQ=Object.setPrototypeOf,sQ=Object.prototype,aQ="__proto__";if(KXe&&iQ&&nQ&&!(aQ in sQ))try{JXe(sQ,aQ,{configurable:!0,get:function(){return iQ(QXe(this))},set:function(r){var e=e$e(this);!rQ(r)&&r!==null||!rQ(e)||nQ(e,r)}})}catch(t){}});var lQ=V(()=>{var t$e=Ne(),r$e=si(),i$e=kd().onFreeze,n$e=Um(),s$e=Rt(),NL=Object.seal,a$e=s$e(function(){NL(1)});t$e({target:"Object",stat:!0,forced:a$e,sham:!n$e},{seal:function(r){return NL&&r$e(r)?NL(i$e(r)):r}})});var cQ=V(()=>{var o$e=Ne(),l$e=gc();o$e({target:"Object",stat:!0},{setPrototypeOf:l$e})});var hQ=V((vkt,uQ)=>{"use strict";var c$e=aw(),u$e=mc();uQ.exports=c$e?{}.toString:function(){return"[object "+u$e(this)+"]"}});var pQ=V(()=>{var h$e=aw(),p$e=Dn(),d$e=hQ();h$e||p$e(Object.prototype,"toString",d$e,{unsafe:!0})});var dQ=V(()=>{var f$e=Ne(),m$e=ML().values;f$e({target:"Object",stat:!0},{values:function(r){return m$e(r)}})});var mQ=V(()=>{var g$e=Ne(),fQ=EL();g$e({global:!0,forced:parseFloat!=fQ},{parseFloat:fQ})});var vQ=V(()=>{var v$e=Ne(),gQ=bL();v$e({global:!0,forced:parseInt!=gQ},{parseInt:gQ})});var ep=V((wkt,yQ)=>{var y$e=TypeError;yQ.exports=function(t,r){if(t{var T$e=bu();TQ.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(T$e)});var z1=V((Mkt,RQ)=>{var Fo=ir(),E$e=Po(),b$e=fl(),EQ=Ti(),x$e=Si(),I$e=Rt(),bQ=I2(),S$e=Od(),xQ=i1(),_$e=ep(),w$e=LL(),R$e=Mu(),GL=Fo.setImmediate,VL=Fo.clearImmediate,M$e=Fo.process,FL=Fo.Dispatch,D$e=Fo.Function,IQ=Fo.MessageChannel,C$e=Fo.String,HL=0,G1={},SQ="onreadystatechange",V1,km,UL,BL;try{V1=Fo.location}catch(t){}var zL=function(t){if(x$e(G1,t)){var r=G1[t];delete G1[t],r()}},kL=function(t){return function(){zL(t)}},_Q=function(t){zL(t.data)},wQ=function(t){Fo.postMessage(C$e(t),V1.protocol+"//"+V1.host)};(!GL||!VL)&&(GL=function(r){_$e(arguments.length,1);var e=EQ(r)?r:D$e(r),i=S$e(arguments,1);return G1[++HL]=function(){E$e(e,void 0,i)},km(HL),HL},VL=function(r){delete G1[r]},R$e?km=function(t){M$e.nextTick(kL(t))}:FL&&FL.now?km=function(t){FL.now(kL(t))}:IQ&&!w$e?(UL=new IQ,BL=UL.port2,UL.port1.onmessage=_Q,km=b$e(BL.postMessage,BL)):Fo.addEventListener&&EQ(Fo.postMessage)&&!Fo.importScripts&&V1&&V1.protocol!=="file:"&&!I$e(wQ)?(km=wQ,Fo.addEventListener("message",_Q,!1)):SQ in xQ("script")?km=function(t){bQ.appendChild(xQ("script"))[SQ]=function(){bQ.removeChild(this),zL(t)}}:km=function(t){setTimeout(kL(t),0)});RQ.exports={set:GL,clear:VL}});var DQ=V((Dkt,MQ)=>{var A$e=bu(),O$e=ir();MQ.exports=/ipad|iphone|ipod/i.test(A$e)&&O$e.Pebble!==void 0});var AQ=V((Ckt,CQ)=>{var P$e=bu();CQ.exports=/web0s(?!.*chrome)/i.test(P$e)});var XL=V((Akt,BQ)=>{var Vm=ir(),OQ=fl(),N$e=Us().f,jL=z1().set,L$e=LL(),F$e=DQ(),H$e=AQ(),WL=Mu(),PQ=Vm.MutationObserver||Vm.WebKitMutationObserver,NQ=Vm.document,LQ=Vm.process,pR=Vm.Promise,FQ=N$e(Vm,"queueMicrotask"),UQ=FQ&&FQ.value,j1,Gm,W1,wv,qL,YL,dR,HQ;UQ||(j1=function(){var t,r;for(WL&&(t=LQ.domain)&&t.exit();Gm;){r=Gm.fn,Gm=Gm.next;try{r()}catch(e){throw Gm?wv():W1=void 0,e}}W1=void 0,t&&t.enter()},!L$e&&!WL&&!H$e&&PQ&&NQ?(qL=!0,YL=NQ.createTextNode(""),new PQ(j1).observe(YL,{characterData:!0}),wv=function(){YL.data=qL=!qL}):!F$e&&pR&&pR.resolve?(dR=pR.resolve(void 0),dR.constructor=pR,HQ=OQ(dR.then,dR),wv=function(){HQ(j1)}):WL?wv=function(){LQ.nextTick(j1)}:(jL=OQ(jL,Vm),wv=function(){jL(j1)}));BQ.exports=UQ||function(t){var r={fn:t,next:void 0};W1&&(W1.next=r),Gm||(Gm=r,wv()),W1=r}});var GQ=V((Okt,kQ)=>{var U$e=ir();kQ.exports=function(t,r){var e=U$e.console;e&&e.error&&(arguments.length==1?e.error(t):e.error(t,r))}});var Rv=V((Pkt,VQ)=>{VQ.exports=function(t){try{return{error:!1,value:t()}}catch(r){return{error:!0,value:r}}}});var WQ=V((Nkt,jQ)=>{var zQ=function(){this.head=null,this.tail=null};zQ.prototype={add:function(t){var r={item:t,next:null};this.head?this.tail.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}};jQ.exports=zQ});var zm=V((Lkt,qQ)=>{var B$e=ir();qQ.exports=B$e.Promise});var fR=V((Fkt,YQ)=>{YQ.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"});var $L=V((Hkt,XQ)=>{var k$e=fR(),G$e=Mu();XQ.exports=!k$e&&!G$e&&typeof window=="object"&&typeof document=="object"});var Mv=V((Ukt,KQ)=>{var V$e=ir(),q1=zm(),z$e=Ti(),j$e=sv(),W$e=J_(),q$e=fi(),Y$e=$L(),X$e=fR(),$$e=Bn(),ZL=xu(),$Q=q1&&q1.prototype,Z$e=q$e("species"),KL=!1,ZQ=z$e(V$e.PromiseRejectionEvent),K$e=j$e("Promise",function(){var t=W$e(q1),r=t!==String(q1);if(!r&&ZL===66||$$e&&!($Q.catch&&$Q.finally))return!0;if(!ZL||ZL<51||!/native code/.test(t)){var e=new q1(function(s){s(1)}),i=function(s){s(function(){},function(){})},n=e.constructor={};if(n[Z$e]=i,KL=e.then(function(){})instanceof i,!KL)return!0}return!r&&(Y$e||X$e)&&!ZQ});KQ.exports={CONSTRUCTOR:K$e,REJECTION_EVENT:ZQ,SUBCLASSING:KL}});var Vd=V((Bkt,QQ)=>{"use strict";var JQ=fs(),J$e=TypeError,Q$e=function(t){var r,e;this.promise=new t(function(i,n){if(r!==void 0||e!==void 0)throw J$e("Bad Promise constructor");r=i,e=n}),this.resolve=JQ(r),this.reject=JQ(e)};QQ.exports.f=function(t){return new Q$e(t)}});var yee=V(()=>{"use strict";var eZe=Ne(),tZe=Bn(),yR=Mu(),zd=ir(),Ov=ni(),eee=Dn(),tee=gc(),rZe=Ya(),iZe=Nm(),nZe=fs(),vR=Ti(),sZe=si(),aZe=yc(),oZe=Fm(),aee=z1().set,rF=XL(),lZe=GQ(),cZe=Rv(),uZe=WQ(),oee=cs(),TR=zm(),iF=Mv(),lee=Vd(),ER="Promise",cee=iF.CONSTRUCTOR,hZe=iF.REJECTION_EVENT,pZe=iF.SUBCLASSING,JL=oee.getterFor(ER),dZe=oee.set,Dv=TR&&TR.prototype,jm=TR,mR=Dv,uee=zd.TypeError,QL=zd.document,nF=zd.process,eF=lee.f,fZe=eF,mZe=!!(QL&&QL.createEvent&&zd.dispatchEvent),hee="unhandledrejection",gZe="rejectionhandled",ree=0,pee=1,vZe=2,sF=1,dee=2,gR,iee,yZe,nee,fee=function(t){var r;return sZe(t)&&vR(r=t.then)?r:!1},mee=function(t,r){var e=r.value,i=r.state==pee,n=i?t.ok:t.fail,s=t.resolve,a=t.reject,o=t.domain,l,c,u;try{n?(i||(r.rejection===dee&&EZe(r),r.rejection=sF),n===!0?l=e:(o&&o.enter(),l=n(e),o&&(o.exit(),u=!0)),l===t.promise?a(uee("Promise-chain cycle")):(c=fee(l))?Ov(c,l,s,a):s(l)):a(e)}catch(h){o&&!u&&o.exit(),a(h)}},gee=function(t,r){t.notified||(t.notified=!0,rF(function(){for(var e=t.reactions,i;i=e.get();)mee(i,t);t.notified=!1,r&&!t.rejection&&TZe(t)}))},vee=function(t,r,e){var i,n;mZe?(i=QL.createEvent("Event"),i.promise=r,i.reason=e,i.initEvent(t,!1,!0),zd.dispatchEvent(i)):i={promise:r,reason:e},!hZe&&(n=zd["on"+t])?n(i):t===hee&&lZe("Unhandled promise rejection",e)},TZe=function(t){Ov(aee,zd,function(){var r=t.facade,e=t.value,i=see(t),n;if(i&&(n=cZe(function(){yR?nF.emit("unhandledRejection",e,r):vee(hee,r,e)}),t.rejection=yR||see(t)?dee:sF,n.error))throw n.value})},see=function(t){return t.rejection!==sF&&!t.parent},EZe=function(t){Ov(aee,zd,function(){var r=t.facade;yR?nF.emit("rejectionHandled",r):vee(gZe,r,t.value)})},Cv=function(t,r,e){return function(i){t(r,i,e)}},Av=function(t,r,e){t.done||(t.done=!0,e&&(t=e),t.value=r,t.state=vZe,gee(t,!0))},tF=function(t,r,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===r)throw uee("Promise can't be resolved itself");var i=fee(r);i?rF(function(){var n={done:!1};try{Ov(i,r,Cv(tF,n,t),Cv(Av,n,t))}catch(s){Av(n,s,t)}}):(t.value=r,t.state=pee,gee(t,!1))}catch(n){Av({done:!1},n,t)}}};if(cee&&(jm=function(r){aZe(this,mR),nZe(r),Ov(gR,this);var e=JL(this);try{r(Cv(tF,e),Cv(Av,e))}catch(i){Av(e,i)}},mR=jm.prototype,gR=function(r){dZe(this,{type:ER,done:!1,notified:!1,parent:!1,reactions:new uZe,rejection:!1,state:ree,value:void 0})},gR.prototype=eee(mR,"then",function(r,e){var i=JL(this),n=eF(oZe(this,jm));return i.parent=!0,n.ok=vR(r)?r:!0,n.fail=vR(e)&&e,n.domain=yR?nF.domain:void 0,i.state==ree?i.reactions.add(n):rF(function(){mee(n,i)}),n.promise}),iee=function(){var t=new gR,r=JL(t);this.promise=t,this.resolve=Cv(tF,r),this.reject=Cv(Av,r)},lee.f=eF=function(t){return t===jm||t===yZe?new iee(t):fZe(t)},!tZe&&vR(TR)&&Dv!==Object.prototype)){nee=Dv.then,pZe||eee(Dv,"then",function(r,e){var i=this;return new jm(function(n,s){Ov(nee,i,n,s)}).then(r,e)},{unsafe:!0});try{delete Dv.constructor}catch(t){}tee&&tee(Dv,mR)}eZe({global:!0,constructor:!0,wrap:!0,forced:cee},{Promise:jm});rZe(jm,ER,!1,!0);iZe(ER)});var aF=V((Vkt,Tee)=>{var bZe=zm(),xZe=b1(),IZe=Mv().CONSTRUCTOR;Tee.exports=IZe||!xZe(function(t){bZe.all(t).then(void 0,function(){})})});var Eee=V(()=>{"use strict";var SZe=Ne(),_Ze=ni(),wZe=fs(),RZe=Vd(),MZe=Rv(),DZe=vc(),CZe=aF();SZe({target:"Promise",stat:!0,forced:CZe},{all:function(r){var e=this,i=RZe.f(e),n=i.resolve,s=i.reject,a=MZe(function(){var o=wZe(e.resolve),l=[],c=0,u=1;DZe(r,function(h){var p=c++,d=!1;u++,_Ze(o,e,h).then(function(f){d||(d=!0,l[p]=f,--u||n(l))},s)}),--u||n(l)});return a.error&&s(a.value),i.promise}})});var xee=V(()=>{"use strict";var AZe=Ne(),OZe=Bn(),PZe=Mv().CONSTRUCTOR,lF=zm(),NZe=bn(),LZe=Ti(),FZe=Dn(),bee=lF&&lF.prototype;AZe({target:"Promise",proto:!0,forced:PZe,real:!0},{catch:function(t){return this.then(void 0,t)}});!OZe&&LZe(lF)&&(oF=NZe("Promise").prototype.catch,bee.catch!==oF&&FZe(bee,"catch",oF,{unsafe:!0}));var oF});var Iee=V(()=>{"use strict";var HZe=Ne(),UZe=ni(),BZe=fs(),kZe=Vd(),GZe=Rv(),VZe=vc(),zZe=aF();HZe({target:"Promise",stat:!0,forced:zZe},{race:function(r){var e=this,i=kZe.f(e),n=i.reject,s=GZe(function(){var a=BZe(e.resolve);VZe(r,function(o){UZe(a,e,o).then(i.resolve,n)})});return s.error&&n(s.value),i.promise}})});var See=V(()=>{"use strict";var jZe=Ne(),WZe=ni(),qZe=Vd(),YZe=Mv().CONSTRUCTOR;jZe({target:"Promise",stat:!0,forced:YZe},{reject:function(r){var e=qZe.f(this);return WZe(e.reject,void 0,r),e.promise}})});var cF=V((Kkt,_ee)=>{var XZe=jr(),$Ze=si(),ZZe=Vd();_ee.exports=function(t,r){if(XZe(t),$Ze(r)&&r.constructor===t)return r;var e=ZZe.f(t),i=e.resolve;return i(r),e.promise}});var Mee=V(()=>{"use strict";var KZe=Ne(),JZe=bn(),wee=Bn(),QZe=zm(),Ree=Mv().CONSTRUCTOR,eKe=cF(),tKe=JZe("Promise"),rKe=wee&&!Ree;KZe({target:"Promise",stat:!0,forced:wee||Ree},{resolve:function(r){return eKe(rKe&&this===tKe?QZe:this,r)}})});var Dee=V(()=>{yee();Eee();xee();Iee();See();Mee()});var Cee=V(()=>{"use strict";var iKe=Ne(),nKe=ni(),sKe=fs(),aKe=Vd(),oKe=Rv(),lKe=vc();iKe({target:"Promise",stat:!0},{allSettled:function(r){var e=this,i=aKe.f(e),n=i.resolve,s=i.reject,a=oKe(function(){var o=sKe(e.resolve),l=[],c=0,u=1;lKe(r,function(h){var p=c++,d=!1;u++,nKe(o,e,h).then(function(f){d||(d=!0,l[p]={status:"fulfilled",value:f},--u||n(l))},function(f){d||(d=!0,l[p]={status:"rejected",reason:f},--u||n(l))})}),--u||n(l)});return a.error&&s(a.value),i.promise}})});var Oee=V(()=>{"use strict";var cKe=Ne(),uKe=ni(),hKe=fs(),pKe=bn(),dKe=Vd(),fKe=Rv(),mKe=vc(),Aee="No one promise resolved";cKe({target:"Promise",stat:!0},{any:function(r){var e=this,i=pKe("AggregateError"),n=dKe.f(e),s=n.resolve,a=n.reject,o=fKe(function(){var l=hKe(e.resolve),c=[],u=0,h=1,p=!1;mKe(r,function(d){var f=u++,m=!1;h++,uKe(l,e,d).then(function(g){m||p||(p=!0,s(g))},function(g){m||p||(m=!0,c[f]=g,--h||a(new i(c,Aee)))})}),--h||a(new i(c,Aee))});return o.error&&a(o.value),n.promise}})});var Fee=V(()=>{"use strict";var gKe=Ne(),vKe=Bn(),bR=zm(),yKe=Rt(),Nee=bn(),Lee=Ti(),TKe=Fm(),Pee=cF(),EKe=Dn(),hF=bR&&bR.prototype,bKe=!!bR&&yKe(function(){hF.finally.call({then:function(){}},function(){})});gKe({target:"Promise",proto:!0,real:!0,forced:bKe},{finally:function(t){var r=TKe(this,Nee("Promise")),e=Lee(t);return this.then(e?function(i){return Pee(r,t()).then(function(){return i})}:t,e?function(i){return Pee(r,t()).then(function(){throw i})}:t)}});!vKe&&Lee(bR)&&(uF=Nee("Promise").prototype.finally,hF.finally!==uF&&EKe(hF,"finally",uF,{unsafe:!0}));var uF});var Hee=V(()=>{var xKe=Ne(),IKe=Po(),SKe=fs(),_Ke=jr(),wKe=Rt(),RKe=!wKe(function(){Reflect.apply(function(){})});xKe({target:"Reflect",stat:!0,forced:RKe},{apply:function(r,e,i){return IKe(SKe(r),e,_Ke(i))}})});var jee=V(()=>{var MKe=Ne(),DKe=bn(),pF=Po(),CKe=QN(),Uee=Zw(),AKe=jr(),Bee=si(),OKe=qa(),Gee=Rt(),dF=DKe("Reflect","construct"),PKe=Object.prototype,NKe=[].push,Vee=Gee(function(){function t(){}return!(dF(function(){},[],t)instanceof t)}),zee=!Gee(function(){dF(function(){})}),kee=Vee||zee;MKe({target:"Reflect",stat:!0,forced:kee,sham:kee},{construct:function(r,e){Uee(r),AKe(e);var i=arguments.length<3?r:Uee(arguments[2]);if(zee&&!Vee)return dF(r,e,i);if(r==i){switch(e.length){case 0:return new r;case 1:return new r(e[0]);case 2:return new r(e[0],e[1]);case 3:return new r(e[0],e[1],e[2]);case 4:return new r(e[0],e[1],e[2],e[3])}var n=[null];return pF(NKe,n,e),new(pF(CKe,r,n))}var s=i.prototype,a=OKe(Bee(s)?s:PKe),o=pF(r,a,e);return Bee(o)?o:a}})});var Yee=V(()=>{var LKe=Ne(),FKe=Pr(),Wee=jr(),HKe=Vh(),qee=Vi(),UKe=Rt(),BKe=UKe(function(){Reflect.defineProperty(qee.f({},1,{value:1}),1,{value:2})});LKe({target:"Reflect",stat:!0,forced:BKe,sham:!FKe},{defineProperty:function(r,e,i){Wee(r);var n=HKe(e);Wee(i);try{return qee.f(r,n,i),!0}catch(s){return!1}}})});var Xee=V(()=>{var kKe=Ne(),GKe=jr(),VKe=Us().f;kKe({target:"Reflect",stat:!0},{deleteProperty:function(r,e){var i=VKe(GKe(r),e);return i&&!i.configurable?!1:delete r[e]}})});var fF=V((g8t,Zee)=>{var $ee=Si();Zee.exports=function(t){return t!==void 0&&($ee(t,"value")||$ee(t,"writable"))}});var Jee=V(()=>{var zKe=Ne(),jKe=ni(),WKe=si(),qKe=jr(),YKe=fF(),XKe=Us(),$Ke=No();function Kee(t,r){var e=arguments.length<3?t:arguments[2],i,n;if(qKe(t)===e)return t[r];if(i=XKe.f(t,r),i)return YKe(i)?i.value:i.get===void 0?void 0:jKe(i.get,e);if(WKe(n=$Ke(t)))return Kee(n,r,e)}zKe({target:"Reflect",stat:!0},{get:Kee})});var Qee=V(()=>{var ZKe=Ne(),KKe=Pr(),JKe=jr(),QKe=Us();ZKe({target:"Reflect",stat:!0,sham:!KKe},{getOwnPropertyDescriptor:function(r,e){return QKe.f(JKe(r),e)}})});var ete=V(()=>{var eJe=Ne(),tJe=jr(),rJe=No(),iJe=Iw();eJe({target:"Reflect",stat:!0,sham:!iJe},{getPrototypeOf:function(r){return rJe(tJe(r))}})});var tte=V(()=>{var nJe=Ne();nJe({target:"Reflect",stat:!0},{has:function(r,e){return e in r}})});var rte=V(()=>{var sJe=Ne(),aJe=jr(),oJe=eR();sJe({target:"Reflect",stat:!0},{isExtensible:function(r){return aJe(r),oJe(r)}})});var ite=V(()=>{var lJe=Ne(),cJe=sw();lJe({target:"Reflect",stat:!0},{ownKeys:cJe})});var nte=V(()=>{var uJe=Ne(),hJe=bn(),pJe=jr(),dJe=Um();uJe({target:"Reflect",stat:!0,sham:!dJe},{preventExtensions:function(r){pJe(r);try{var e=hJe("Object","preventExtensions");return e&&e(r),!0}catch(i){return!1}}})});var cte=V(()=>{var fJe=Ne(),mJe=ni(),gJe=jr(),ste=si(),vJe=fF(),yJe=Rt(),mF=Vi(),ate=Us(),TJe=No(),ote=Ao();function lte(t,r,e){var i=arguments.length<4?t:arguments[3],n=ate.f(gJe(t),r),s,a,o;if(!n){if(ste(a=TJe(t)))return lte(a,r,e,i);n=ote(0)}if(vJe(n)){if(n.writable===!1||!ste(i))return!1;if(s=ate.f(i,r)){if(s.get||s.set||s.writable===!1)return!1;s.value=e,mF.f(i,r,s)}else mF.f(i,r,ote(0,e))}else{if(o=n.set,o===void 0)return!1;mJe(o,i,e)}return!0}var EJe=yJe(function(){var t=function(){},r=mF.f(new t,"a",{configurable:!0});return Reflect.set(t.prototype,"a",1,r)!==!1});fJe({target:"Reflect",stat:!0,forced:EJe},{set:lte})});var hte=V(()=>{var bJe=Ne(),xJe=jr(),IJe=Y2(),ute=gc();ute&&bJe({target:"Reflect",stat:!0},{setPrototypeOf:function(r,e){xJe(r),IJe(e);try{return ute(r,e),!0}catch(i){return!1}}})});var pte=V(()=>{var SJe=Ne(),_Je=ir(),wJe=Ya();SJe({global:!0},{Reflect:{}});wJe(_Je.Reflect,"Reflect",!0)});var Pv=V((H8t,dte)=>{var RJe=si(),MJe=fa(),DJe=fi(),CJe=DJe("match");dte.exports=function(t){var r;return RJe(t)&&((r=t[CJe])!==void 0?!!r:MJe(t)=="RegExp")}});var xR=V((U8t,fte)=>{"use strict";var AJe=jr();fte.exports=function(){var t=AJe(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r}});var Nv=V((B8t,gte)=>{var OJe=ni(),PJe=Si(),NJe=Oo(),LJe=xR(),mte=RegExp.prototype;gte.exports=function(t){var r=t.flags;return r===void 0&&!("flags"in mte)&&!PJe(t,"flags")&&NJe(mte,t)?OJe(LJe,t):r}});var Y1=V((k8t,vte)=>{var gF=Rt(),FJe=ir(),vF=FJe.RegExp,yF=gF(function(){var t=vF("a","y");return t.lastIndex=2,t.exec("abcd")!=null}),HJe=yF||gF(function(){return!vF("a","y").sticky}),UJe=yF||gF(function(){var t=vF("^r","gy");return t.lastIndex=2,t.exec("str")!=null});vte.exports={BROKEN_CARET:UJe,MISSED_STICKY:HJe,UNSUPPORTED_Y:yF}});var IR=V((G8t,yte)=>{var BJe=Rt(),kJe=ir(),GJe=kJe.RegExp;yte.exports=BJe(function(){var t=GJe(".","s");return!(t.dotAll&&t.exec(` -`)&&t.flags==="s")})});var TF=V((V8t,Tte)=>{var VJe=Rt(),zJe=ir(),jJe=zJe.RegExp;Tte.exports=VJe(function(){var t=jJe("(?b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$c")!=="bc"})});var Mte=V(()=>{var WJe=Pr(),IF=ir(),X1=Bt(),qJe=sv(),YJe=Om(),XJe=va(),$Je=zh().f,Ete=Oo(),ZJe=Pv(),bte=mi(),KJe=Nv(),Ste=Y1(),JJe=X2(),QJe=Dn(),eQe=Rt(),tQe=Si(),rQe=cs().enforce,iQe=Nm(),nQe=fi(),_te=IR(),wte=TF(),sQe=nQe("match"),Wd=IF.RegExp,Lv=Wd.prototype,aQe=IF.SyntaxError,oQe=X1(Lv.exec),SR=X1("".charAt),xte=X1("".replace),Ite=X1("".indexOf),lQe=X1("".slice),cQe=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Wm=/a/g,EF=/a/g,uQe=new Wd(Wm)!==Wm,Rte=Ste.MISSED_STICKY,hQe=Ste.UNSUPPORTED_Y,pQe=WJe&&(!uQe||Rte||_te||wte||eQe(function(){return EF[sQe]=!1,Wd(Wm)!=Wm||Wd(EF)==EF||Wd(Wm,"i")!="/a/i"})),dQe=function(t){for(var r=t.length,e=0,i="",n=!1,s;e<=r;e++){if(s=SR(t,e),s==="\\"){i+=s+SR(t,++e);continue}!n&&s==="."?i+="[\\s\\S]":(s==="["?n=!0:s==="]"&&(n=!1),i+=s)}return i},fQe=function(t){for(var r=t.length,e=0,i="",n=[],s={},a=!1,o=!1,l=0,c="",u;e<=r;e++){if(u=SR(t,e),u==="\\")u=u+SR(t,++e);else if(u==="]")a=!1;else if(!a)switch(!0){case u==="[":a=!0;break;case u==="(":oQe(cQe,lQe(t,e+1))&&(e+=2,o=!0),i+=u,l++;continue;case(u===">"&&o):if(c===""||tQe(s,c))throw new aQe("Invalid capture group name");s[c]=!0,n[n.length]=[c,l],o=!1,c="";continue}o?c+=u:i+=u}return[i,n]};if(qJe("RegExp",pQe)){for(jd=function(r,e){var i=Ete(Lv,this),n=ZJe(r),s=e===void 0,a=[],o=r,l,c,u,h,p,d;if(!i&&n&&s&&r.constructor===jd)return r;if((n||Ete(Lv,r))&&(r=r.source,s&&(e=KJe(o))),r=r===void 0?"":bte(r),e=e===void 0?"":bte(e),o=r,_te&&"dotAll"in Wm&&(c=!!e&&Ite(e,"s")>-1,c&&(e=xte(e,/s/g,""))),l=e,Rte&&"sticky"in Wm&&(u=!!e&&Ite(e,"y")>-1,u&&hQe&&(e=xte(e,/y/g,""))),wte&&(h=fQe(r),r=h[0],a=h[1]),p=YJe(Wd(r,e),i?this:Lv,jd),(c||u||a.length)&&(d=rQe(p),c&&(d.dotAll=!0,d.raw=jd(dQe(r),l)),u&&(d.sticky=!0),a.length&&(d.groups=a)),r!==o)try{XJe(p,"source",o===""?"(?:)":o)}catch(f){}return p},bF=$Je(Wd),xF=0;bF.length>xF;)JJe(jd,Wd,bF[xF++]);Lv.constructor=jd,jd.prototype=Lv,QJe(IF,"RegExp",jd,{constructor:!0})}var jd,bF,xF;iQe("RegExp")});var Cte=V(()=>{var mQe=Pr(),gQe=IR(),vQe=fa(),yQe=Gd(),TQe=cs().get,Dte=RegExp.prototype,EQe=TypeError;mQe&&gQe&&yQe(Dte,"dotAll",{configurable:!0,get:function(){if(this!==Dte){if(vQe(this)==="RegExp")return!!TQe(this).dotAll;throw EQe("Incompatible receiver, RegExp required")}}})});var $1=V((Y8t,Ote)=>{"use strict";var Fv=ni(),wR=Bt(),bQe=mi(),xQe=xR(),IQe=Y1(),SQe=Sm(),_Qe=qa(),wQe=cs().get,RQe=IR(),MQe=TF(),DQe=SQe("native-string-replace",String.prototype.replace),_R=RegExp.prototype.exec,_F=_R,CQe=wR("".charAt),AQe=wR("".indexOf),OQe=wR("".replace),SF=wR("".slice),wF=function(){var t=/a/,r=/b*/g;return Fv(_R,t,"a"),Fv(_R,r,"a"),t.lastIndex!==0||r.lastIndex!==0}(),Ate=IQe.BROKEN_CARET,RF=/()??/.exec("")[1]!==void 0,PQe=wF||RF||Ate||RQe||MQe;PQe&&(_F=function(r){var e=this,i=wQe(e),n=bQe(r),s=i.raw,a,o,l,c,u,h,p;if(s)return s.lastIndex=e.lastIndex,a=Fv(_F,s,n),e.lastIndex=s.lastIndex,a;var d=i.groups,f=Ate&&e.sticky,m=Fv(xQe,e),g=e.source,y=0,E=n;if(f&&(m=OQe(m,"y",""),AQe(m,"g")===-1&&(m+="g"),E=SF(n,e.lastIndex),e.lastIndex>0&&(!e.multiline||e.multiline&&CQe(n,e.lastIndex-1)!==` -`)&&(g="(?: "+g+")",E=" "+E,y++),o=new RegExp("^(?:"+g+")",m)),RF&&(o=new RegExp("^"+g+"$(?!\\s)",m)),wF&&(l=e.lastIndex),c=Fv(_R,f?o:e,E),f?c?(c.input=SF(c.input,y),c[0]=SF(c[0],y),c.index=e.lastIndex,e.lastIndex+=c[0].length):e.lastIndex=0:wF&&c&&(e.lastIndex=e.global?c.index+c[0].length:l),RF&&c&&c.length>1&&Fv(DQe,c[0],o,function(){for(u=1;u{"use strict";var NQe=Ne(),Pte=$1();NQe({target:"RegExp",proto:!0,forced:/./.exec!==Pte},{exec:Pte})});var Fte=V(()=>{var LQe=ir(),FQe=Pr(),HQe=Gd(),UQe=xR(),BQe=Rt(),Nte=LQe.RegExp,Lte=Nte.prototype,kQe=FQe&&BQe(function(){var t=!0;try{Nte(".","d")}catch(l){t=!1}var r={},e="",i=t?"dgimsy":"gimsy",n=function(l,c){Object.defineProperty(r,l,{get:function(){return e+=c,!0}})},s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};t&&(s.hasIndices="d");for(var a in s)n(a,s[a]);var o=Object.getOwnPropertyDescriptor(Lte,"flags").get.call(r);return o!==i||e!==i});kQe&&HQe(Lte,"flags",{configurable:!0,get:UQe})});var Ute=V(()=>{var GQe=Pr(),VQe=Y1().MISSED_STICKY,zQe=fa(),jQe=Gd(),WQe=cs().get,Hte=RegExp.prototype,qQe=TypeError;GQe&&VQe&&jQe(Hte,"sticky",{configurable:!0,get:function(){if(this!==Hte){if(zQe(this)==="RegExp")return!!WQe(this).sticky;throw qQe("Incompatible receiver, RegExp required")}}})});var Gte=V(()=>{"use strict";RR();var YQe=Ne(),Bte=ni(),XQe=Ti(),kte=jr(),$Qe=mi(),ZQe=function(){var t=!1,r=/[ac]/;return r.exec=function(){return t=!0,/./.exec.apply(this,arguments)},r.test("abc")===!0&&t}(),KQe=/./.test;YQe({target:"RegExp",proto:!0,forced:!ZQe},{test:function(t){var r=kte(this),e=$Qe(t),i=r.exec;if(!XQe(i))return Bte(KQe,r,e);var n=Bte(i,r,e);return n===null?!1:(kte(n),!0)}})});var jte=V(()=>{"use strict";var JQe=Rm().PROPER,QQe=Dn(),eet=jr(),Vte=mi(),tet=Rt(),ret=Nv(),MF="toString",iet=RegExp.prototype,zte=iet[MF],net=tet(function(){return zte.call({source:"a",flags:"b"})!="/a/b"}),set=JQe&&zte.name!=MF;(net||set)&&QQe(RegExp.prototype,MF,function(){var r=eet(this),e=Vte(r.source),i=Vte(ret(r));return"/"+e+"/"+i},{unsafe:!0})});var Wte=V(()=>{"use strict";var aet=A1(),oet=lL();aet("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},oet)});var qte=V(()=>{Wte()});var Yte=V(()=>{"use strict";var cet=Ne(),uet=Bt(),het=ls(),pet=ms(),det=mi(),fet=Rt(),met=uet("".charAt),get=fet(function(){return"\u{20BB7}".at(-2)!=="\uD842"});cet({target:"String",proto:!0,forced:get},{at:function(r){var e=det(het(this)),i=e.length,n=pet(r),s=n>=0?n:i+n;return s<0||s>=i?void 0:met(e,s)}})});var Z1=V((uGt,Zte)=>{var DF=Bt(),vet=ms(),yet=mi(),Tet=ls(),Eet=DF("".charAt),Xte=DF("".charCodeAt),bet=DF("".slice),$te=function(t){return function(r,e){var i=yet(Tet(r)),n=vet(e),s=i.length,a,o;return n<0||n>=s?t?"":void 0:(a=Xte(i,n),a<55296||a>56319||n+1===s||(o=Xte(i,n+1))<56320||o>57343?t?Eet(i,n):a:t?bet(i,n,n+2):(a-55296<<10)+(o-56320)+65536)}};Zte.exports={codeAt:$te(!1),charAt:$te(!0)}});var Kte=V(()=>{"use strict";var xet=Ne(),Iet=Z1().codeAt;xet({target:"String",proto:!0},{codePointAt:function(r){return Iet(this,r)}})});var MR=V((dGt,Jte)=>{var _et=Pv(),wet=TypeError;Jte.exports=function(t){if(_et(t))throw wet("The method doesn't accept regular expressions");return t}});var DR=V((fGt,Qte)=>{var Ret=fi(),Met=Ret("match");Qte.exports=function(t){var r=/./;try{"/./"[t](r)}catch(e){try{return r[Met]=!1,"/./"[t](r)}catch(i){}}return!1}});var nre=V(()=>{"use strict";var Det=Ne(),rre=jh(),Cet=Us().f,Aet=Wa(),ere=mi(),Oet=MR(),Pet=ls(),Net=DR(),Let=Bn(),tre=rre("".endsWith),Fet=rre("".slice),Het=Math.min,ire=Net("endsWith"),Uet=!Let&&!ire&&!!function(){var t=Cet(String.prototype,"endsWith");return t&&!t.writable}();Det({target:"String",proto:!0,forced:!Uet&&!ire},{endsWith:function(r){var e=ere(Pet(this));Oet(r);var i=arguments.length>1?arguments[1]:void 0,n=e.length,s=i===void 0?n:Het(Aet(i),n),a=ere(r);return tre?tre(e,a,s):Fet(e,s-a.length,s)===a}})});var ore=V(()=>{var Bet=Ne(),ket=Bt(),Get=Su(),Vet=RangeError,sre=String.fromCharCode,are=String.fromCodePoint,zet=ket([].join),jet=!!are&&are.length!=1;Bet({target:"String",stat:!0,arity:1,forced:jet},{fromCodePoint:function(r){for(var e=[],i=arguments.length,n=0,s;i>n;){if(s=+arguments[n++],Get(s,1114111)!==s)throw Vet(s+" is not a valid code point");e[n]=s<65536?sre(s):sre(((s-=65536)>>10)+55296,s%1024+56320)}return zet(e,"")}})});var cre=V(()=>{"use strict";var Wet=Ne(),qet=Bt(),Yet=MR(),Xet=ls(),lre=mi(),$et=DR(),Zet=qet("".indexOf);Wet({target:"String",proto:!0,forced:!$et("includes")},{includes:function(r){return!!~Zet(lre(Xet(this)),lre(Yet(r)),arguments.length>1?arguments[1]:void 0)}})});var CF=V(()=>{"use strict";var Ket=Z1().charAt,Jet=mi(),hre=cs(),Qet=Pw(),ure=S1(),pre="String Iterator",ett=hre.set,ttt=hre.getterFor(pre);Qet(String,"String",function(t){ett(this,{type:pre,string:Jet(t),index:0})},function(){var r=ttt(this),e=r.string,i=r.index,n;return i>=e.length?ure(void 0,!0):(n=Ket(e,i),r.index+=n.length,ure(n,!1))})});var K1=V((IGt,vre)=>{"use strict";RR();var dre=jh(),fre=Dn(),rtt=$1(),mre=Rt(),gre=fi(),itt=va(),ntt=gre("species"),AF=RegExp.prototype;vre.exports=function(t,r,e,i){var n=gre(t),s=!mre(function(){var c={};return c[n]=function(){return 7},""[t](c)!=7}),a=s&&!mre(function(){var c=!1,u=/a/;return t==="split"&&(u={},u.constructor={},u.constructor[ntt]=function(){return u},u.flags="",u[n]=/./[n]),u.exec=function(){return c=!0,null},u[n](""),!c});if(!s||!a||e){var o=dre(/./[n]),l=r(n,""[t],function(c,u,h,p,d){var f=dre(c),m=u.exec;return m===rtt||m===AF.exec?s&&!d?{done:!0,value:o(u,h,p)}:{done:!0,value:f(h,u,p)}:{done:!1}});fre(String.prototype,t,l[0]),fre(AF,n,l[1])}i&&itt(AF[n],"sham",!0)}});var J1=V((SGt,yre)=>{"use strict";var stt=Z1().charAt;yre.exports=function(t,r,e){return r+(e?stt(t,r).length:1)}});var Hv=V((_Gt,Ere)=>{var Tre=ni(),att=jr(),ott=Ti(),ltt=fa(),ctt=$1(),utt=TypeError;Ere.exports=function(t,r){var e=t.exec;if(ott(e)){var i=Tre(e,t,r);return i!==null&&att(i),i}if(ltt(t)==="RegExp")return Tre(ctt,t,r);throw utt("RegExp#exec called on incompatible receiver")}});var xre=V(()=>{"use strict";var htt=ni(),ptt=K1(),dtt=jr(),ftt=ma(),mtt=Wa(),OF=mi(),gtt=ls(),vtt=Iu(),ytt=J1(),bre=Hv();ptt("match",function(t,r,e){return[function(n){var s=gtt(this),a=ftt(n)?void 0:vtt(n,t);return a?htt(a,n,s):new RegExp(n)[t](OF(s))},function(i){var n=dtt(this),s=OF(i),a=e(r,n,s);if(a.done)return a.value;if(!n.global)return bre(n,s);var o=n.unicode;n.lastIndex=0;for(var l=[],c=0,u;(u=bre(n,s))!==null;){var h=OF(u[0]);l[c]=h,h===""&&(n.lastIndex=ytt(s,mtt(n.lastIndex),o)),c++}return c===0?null:l}]})});var Ore=V(()=>{"use strict";var Ttt=Ne(),Ire=ni(),wre=jh(),Ett=Cw(),CR=S1(),Sre=ls(),Rre=Wa(),Q1=mi(),btt=jr(),xtt=ma(),Itt=fa(),Stt=Pv(),Mre=Nv(),_tt=Iu(),wtt=Dn(),Rtt=Rt(),Mtt=fi(),Dtt=Fm(),Ctt=J1(),Att=Hv(),Dre=cs(),NF=Bn(),AR=Mtt("matchAll"),Cre="RegExp String",Are=Cre+" Iterator",Ott=Dre.set,Ptt=Dre.getterFor(Are),_re=RegExp.prototype,Ntt=TypeError,LF=wre("".indexOf),OR=wre("".matchAll),PF=!!OR&&!Rtt(function(){OR("a",/./)}),Ltt=Ett(function(r,e,i,n){Ott(this,{type:Are,regexp:r,string:e,global:i,unicode:n,done:!1})},Cre,function(){var r=Ptt(this);if(r.done)return CR(void 0,!0);var e=r.regexp,i=r.string,n=Att(e,i);return n===null?(r.done=!0,CR(void 0,!0)):r.global?(Q1(n[0])===""&&(e.lastIndex=Ctt(i,Rre(e.lastIndex),r.unicode)),CR(n,!1)):(r.done=!0,CR(n,!1))}),FF=function(t){var r=btt(this),e=Q1(t),i=Dtt(r,RegExp),n=Q1(Mre(r)),s,a,o;return s=new i(i===RegExp?r.source:r,n),a=!!~LF(n,"g"),o=!!~LF(n,"u"),s.lastIndex=Rre(r.lastIndex),new Ltt(s,e,a,o)};Ttt({target:"String",proto:!0,forced:PF},{matchAll:function(r){var e=Sre(this),i,n,s,a;if(xtt(r)){if(PF)return OR(e,r)}else{if(Stt(r)&&(i=Q1(Sre(Mre(r))),!~LF(i,"g")))throw Ntt("`.matchAll` does not allow non-global regexes");if(PF)return OR(e,r);if(s=_tt(r,AR),s===void 0&&NF&&Itt(r)=="RegExp"&&(s=FF),s)return Ire(s,r,e)}return n=Q1(e),a=new RegExp(r,"g"),NF?Ire(FF,a,n):a[AR](n)}});NF||AR in _re||wtt(_re,AR,FF)});var HF=V((CGt,Pre)=>{var Ftt=bu();Pre.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(Ftt)});var Nre=V(()=>{"use strict";var Htt=Ne(),Utt=Kw().end,Btt=HF();Htt({target:"String",proto:!0,forced:Btt},{padEnd:function(r){return Utt(this,r,arguments.length>1?arguments[1]:void 0)}})});var Lre=V(()=>{"use strict";var ktt=Ne(),Gtt=Kw().start,Vtt=HF();ktt({target:"String",proto:!0,forced:Vtt},{padStart:function(r){return Gtt(this,r,arguments.length>1?arguments[1]:void 0)}})});var Bre=V(()=>{var ztt=Ne(),Ure=Bt(),jtt=ga(),Wtt=Li(),Fre=mi(),qtt=ln(),Hre=Ure([].push),Ytt=Ure([].join);ztt({target:"String",stat:!0},{raw:function(r){for(var e=jtt(Wtt(r).raw),i=qtt(e),n=arguments.length,s=[],a=0;i>a;){if(Hre(s,Fre(e[a++])),a===i)return Ytt(s,"");a{var Xtt=Ne(),$tt=D1();Xtt({target:"String",proto:!0},{repeat:$tt})});var GF=V((BGt,Gre)=>{var kF=Bt(),Ztt=Li(),Ktt=Math.floor,UF=kF("".charAt),Jtt=kF("".replace),BF=kF("".slice),Qtt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ert=/\$([$&'`]|\d{1,2})/g;Gre.exports=function(t,r,e,i,n,s){var a=e+t.length,o=i.length,l=ert;return n!==void 0&&(n=Ztt(n),l=Qtt),Jtt(s,l,function(c,u){var h;switch(UF(u,0)){case"$":return"$";case"&":return t;case"`":return BF(r,0,e);case"'":return BF(r,a);case"<":h=n[BF(u,1,-1)];break;default:var p=+u;if(p===0)return c;if(p>o){var d=Ktt(p/10);return d===0?c:d<=o?i[d-1]===void 0?UF(u,1):i[d-1]+UF(u,1):c}h=i[p-1]}return h===void 0?"":h})}});var qre=V(()=>{"use strict";var trt=Po(),Vre=ni(),PR=Bt(),rrt=K1(),irt=Rt(),nrt=jr(),srt=Ti(),art=ma(),ort=ms(),lrt=Wa(),Uv=mi(),crt=ls(),urt=J1(),hrt=Iu(),prt=GF(),drt=Hv(),frt=fi(),zF=frt("replace"),mrt=Math.max,grt=Math.min,vrt=PR([].concat),VF=PR([].push),zre=PR("".indexOf),jre=PR("".slice),yrt=function(t){return t===void 0?t:String(t)},Trt=function(){return"a".replace(/./,"$0")==="$0"}(),Wre=function(){return/./[zF]?/./[zF]("a","$0")==="":!1}(),Ert=!irt(function(){var t=/./;return t.exec=function(){var r=[];return r.groups={a:"7"},r},"".replace(t,"$")!=="7"});rrt("replace",function(t,r,e){var i=Wre?"$":"$0";return[function(s,a){var o=crt(this),l=art(s)?void 0:hrt(s,zF);return l?Vre(l,s,o,a):Vre(r,Uv(o),s,a)},function(n,s){var a=nrt(this),o=Uv(n);if(typeof s=="string"&&zre(s,i)===-1&&zre(s,"$<")===-1){var l=e(r,a,o,s);if(l.done)return l.value}var c=srt(s);c||(s=Uv(s));var u=a.global;if(u){var h=a.unicode;a.lastIndex=0}for(var p=[];;){var d=drt(a,o);if(d===null||(VF(p,d),!u))break;var f=Uv(d[0]);f===""&&(a.lastIndex=urt(o,lrt(a.lastIndex),h))}for(var m="",g=0,y=0;y=g&&(m+=jre(o,g,b)+_,g=b+E.length)}return m+jre(o,g)}]},!Ert||!Trt||Wre)});var Kre=V(()=>{"use strict";var brt=Ne(),xrt=ni(),jF=Bt(),Yre=ls(),Irt=Ti(),Srt=ma(),_rt=Pv(),Bv=mi(),wrt=Iu(),Rrt=Nv(),Mrt=GF(),Drt=fi(),Crt=Bn(),Art=Drt("replace"),Ort=TypeError,Zre=jF("".indexOf),Prt=jF("".replace),Xre=jF("".slice),Nrt=Math.max,$re=function(t,r,e){return e>t.length?-1:r===""?e:Zre(t,r,e)};brt({target:"String",proto:!0},{replaceAll:function(r,e){var i=Yre(this),n,s,a,o,l,c,u,h,p,d=0,f=0,m="";if(!Srt(r)){if(n=_rt(r),n&&(s=Bv(Yre(Rrt(r))),!~Zre(s,"g")))throw Ort("`.replaceAll` does not allow non-global regexes");if(a=wrt(r,Art),a)return xrt(a,r,i,e);if(Crt&&n)return Prt(Bv(i),r,e)}for(o=Bv(i),l=Bv(r),c=Irt(e),c||(e=Bv(e)),u=l.length,h=Nrt(1,u),d=$re(o,l,0);d!==-1;)p=c?Bv(e(l,d,o)):Mrt(l,o,d,[],void 0,e),m+=Xre(o,f,d)+p,f=d+u,d=$re(o,l,d+h);return f{"use strict";var Lrt=ni(),Frt=K1(),Hrt=jr(),Urt=ma(),Brt=ls(),Jre=CL(),Qre=mi(),krt=Iu(),Grt=Hv();Frt("search",function(t,r,e){return[function(n){var s=Brt(this),a=Urt(n)?void 0:krt(n,t);return a?Lrt(a,n,s):new RegExp(n)[t](Qre(s))},function(i){var n=Hrt(this),s=Qre(i),a=e(r,n,s);if(a.done)return a.value;var o=n.lastIndex;Jre(o,0)||(n.lastIndex=0);var l=Grt(n,s);return Jre(n.lastIndex,o)||(n.lastIndex=o),l===null?-1:l.index}]})});var aie=V(()=>{"use strict";var Vrt=Po(),eb=ni(),qF=Bt(),zrt=K1(),jrt=jr(),Wrt=ma(),qrt=Pv(),tie=ls(),Yrt=Fm(),Xrt=J1(),$rt=Wa(),WF=mi(),Zrt=Iu(),rie=ov(),iie=Hv(),Krt=$1(),Jrt=Y1(),Qrt=Rt(),kv=Jrt.UNSUPPORTED_Y,nie=4294967295,eit=Math.min,sie=[].push,tit=qF(/./.exec),Gv=qF(sie),tb=qF("".slice),rit=!Qrt(function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var e="ab".split(t);return e.length!==2||e[0]!=="a"||e[1]!=="b"});zrt("split",function(t,r,e){var i;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?i=function(n,s){var a=WF(tie(this)),o=s===void 0?nie:s>>>0;if(o===0)return[];if(n===void 0)return[a];if(!qrt(n))return eb(r,a,n,o);for(var l=[],c=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(n.sticky?"y":""),u=0,h=new RegExp(n.source,c+"g"),p,d,f;(p=eb(Krt,h,a))&&(d=h.lastIndex,!(d>u&&(Gv(l,tb(a,u,p.index)),p.length>1&&p.index=o)));)h.lastIndex===p.index&&h.lastIndex++;return u===a.length?(f||!tit(h,""))&&Gv(l,""):Gv(l,tb(a,u)),l.length>o?rie(l,0,o):l}:"0".split(void 0,0).length?i=function(n,s){return n===void 0&&s===0?[]:eb(r,this,n,s)}:i=r,[function(s,a){var o=tie(this),l=Wrt(s)?void 0:Zrt(s,t);return l?eb(l,s,o,a):eb(i,WF(o),s,a)},function(n,s){var a=jrt(this),o=WF(n),l=e(i,a,o,s,i!==r);if(l.done)return l.value;var c=Yrt(a,RegExp),u=a.unicode,h=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(kv?"g":"y"),p=new c(kv?"^(?:"+a.source+")":a,h),d=s===void 0?nie:s>>>0;if(d===0)return[];if(o.length===0)return iie(p,o)===null?[o]:[];for(var f=0,m=0,g=[];m{"use strict";var iit=Ne(),cie=jh(),nit=Us().f,sit=Wa(),oie=mi(),ait=MR(),oit=ls(),lit=DR(),cit=Bn(),lie=cie("".startsWith),uit=cie("".slice),hit=Math.min,uie=lit("startsWith"),pit=!cit&&!uie&&!!function(){var t=nit(String.prototype,"startsWith");return t&&!t.writable}();iit({target:"String",proto:!0,forced:!pit&&!uie},{startsWith:function(r){var e=oie(oit(this));ait(r);var i=sit(hit(arguments.length>1?arguments[1]:void 0,e.length)),n=oie(r);return lie?lie(e,n,i):uit(e,i,i+n.length)===n}})});var die=V(()=>{"use strict";var dit=Ne(),fit=Bt(),mit=ls(),pie=ms(),git=mi(),vit=fit("".slice),yit=Math.max,Tit=Math.min,Eit=!"".substr||"ab".substr(-1)!=="b";dit({target:"String",proto:!0,forced:Eit},{substr:function(r,e){var i=git(mit(this)),n=i.length,s=pie(r),a,o;return s===1/0&&(s=0),s<0&&(s=yit(n+s,0)),a=e===void 0?n:pie(e),a<=0||a===1/0?"":(o=Tit(s+a,n),s>=o?"":vit(i,s,o))}})});var NR=V((JGt,gie)=>{var bit=Rm().PROPER,xit=Rt(),fie=F1(),mie="\u200B\x85\u180E";gie.exports=function(t){return xit(function(){return!!fie[t]()||mie[t]()!==mie||bit&&fie[t].name!==t})}});var vie=V(()=>{"use strict";var Iit=Ne(),Sit=Bm().trim,_it=NR();Iit({target:"String",proto:!0,forced:_it("trim")},{trim:function(){return Sit(this)}})});var YF=V((tVt,yie)=>{"use strict";var wit=Bm().end,Rit=NR();yie.exports=Rit("trimEnd")?function(){return wit(this)}:"".trimEnd});var Eie=V(()=>{var Mit=Ne(),Tie=YF();Mit({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==Tie},{trimRight:Tie})});var xie=V(()=>{Eie();var Dit=Ne(),bie=YF();Dit({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==bie},{trimEnd:bie})});var XF=V((aVt,Iie)=>{"use strict";var Cit=Bm().start,Ait=NR();Iie.exports=Ait("trimStart")?function(){return Cit(this)}:"".trimStart});var _ie=V(()=>{var Oit=Ne(),Sie=XF();Oit({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==Sie},{trimLeft:Sie})});var Rie=V(()=>{_ie();var Pit=Ne(),wie=XF();Pit({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==wie},{trimStart:wie})});var Za=V((hVt,Die)=>{var Nit=Bt(),Lit=ls(),Mie=mi(),Fit=/"/g,Hit=Nit("".replace);Die.exports=function(t,r,e,i){var n=Mie(Lit(t)),s="<"+r;return e!==""&&(s+=" "+e+'="'+Hit(Mie(i),Fit,""")+'"'),s+">"+n+""}});var Ka=V((pVt,Cie)=>{var Uit=Rt();Cie.exports=function(t){return Uit(function(){var r=""[t]('"');return r!==r.toLowerCase()||r.split('"').length>3})}});var Aie=V(()=>{"use strict";var Bit=Ne(),kit=Za(),Git=Ka();Bit({target:"String",proto:!0,forced:Git("anchor")},{anchor:function(r){return kit(this,"a","name",r)}})});var Oie=V(()=>{"use strict";var Vit=Ne(),zit=Za(),jit=Ka();Vit({target:"String",proto:!0,forced:jit("big")},{big:function(){return zit(this,"big","","")}})});var Pie=V(()=>{"use strict";var Wit=Ne(),qit=Za(),Yit=Ka();Wit({target:"String",proto:!0,forced:Yit("blink")},{blink:function(){return qit(this,"blink","","")}})});var Nie=V(()=>{"use strict";var Xit=Ne(),$it=Za(),Zit=Ka();Xit({target:"String",proto:!0,forced:Zit("bold")},{bold:function(){return $it(this,"b","","")}})});var Lie=V(()=>{"use strict";var Kit=Ne(),Jit=Za(),Qit=Ka();Kit({target:"String",proto:!0,forced:Qit("fixed")},{fixed:function(){return Jit(this,"tt","","")}})});var Fie=V(()=>{"use strict";var ent=Ne(),tnt=Za(),rnt=Ka();ent({target:"String",proto:!0,forced:rnt("fontcolor")},{fontcolor:function(r){return tnt(this,"font","color",r)}})});var Hie=V(()=>{"use strict";var int=Ne(),nnt=Za(),snt=Ka();int({target:"String",proto:!0,forced:snt("fontsize")},{fontsize:function(r){return nnt(this,"font","size",r)}})});var Uie=V(()=>{"use strict";var ant=Ne(),ont=Za(),lnt=Ka();ant({target:"String",proto:!0,forced:lnt("italics")},{italics:function(){return ont(this,"i","","")}})});var Bie=V(()=>{"use strict";var cnt=Ne(),unt=Za(),hnt=Ka();cnt({target:"String",proto:!0,forced:hnt("link")},{link:function(r){return unt(this,"a","href",r)}})});var kie=V(()=>{"use strict";var pnt=Ne(),dnt=Za(),fnt=Ka();pnt({target:"String",proto:!0,forced:fnt("small")},{small:function(){return dnt(this,"small","","")}})});var Gie=V(()=>{"use strict";var mnt=Ne(),gnt=Za(),vnt=Ka();mnt({target:"String",proto:!0,forced:vnt("strike")},{strike:function(){return gnt(this,"strike","","")}})});var Vie=V(()=>{"use strict";var ynt=Ne(),Tnt=Za(),Ent=Ka();ynt({target:"String",proto:!0,forced:Ent("sub")},{sub:function(){return Tnt(this,"sub","","")}})});var zie=V(()=>{"use strict";var bnt=Ne(),xnt=Za(),Int=Ka();bnt({target:"String",proto:!0,forced:Int("sup")},{sup:function(){return xnt(this,"sup","","")}})});var LR=V((BVt,Wie)=>{var jie=ir(),$F=Rt(),Snt=b1(),_nt=_i().NATIVE_ARRAY_BUFFER_VIEWS,wnt=jie.ArrayBuffer,qm=jie.Int8Array;Wie.exports=!_nt||!$F(function(){qm(1)})||!$F(function(){new qm(-1)})||!Snt(function(t){new qm,new qm(null),new qm(1.5),new qm(t)},!0)||$F(function(){return new qm(new wnt(2),1,void 0).length!==1})});var Yie=V((kVt,qie)=>{var Rnt=ms(),Mnt=RangeError;qie.exports=function(t){var r=Rnt(t);if(r<0)throw Mnt("The argument can't be less than 0");return r}});var ZF=V((GVt,Xie)=>{var Dnt=Yie(),Cnt=RangeError;Xie.exports=function(t,r){var e=Dnt(t);if(e%r)throw Cnt("Wrong offset");return e}});var Zie=V((VVt,$ie)=>{var Ant=mc(),Ont=Bt(),Pnt=Ont("".slice);$ie.exports=function(t){return Pnt(Ant(t),0,3)==="Big"}});var KF=V((zVt,Kie)=>{var Nnt=r1(),Lnt=TypeError;Kie.exports=function(t){var r=Nnt(t,"number");if(typeof r=="number")throw Lnt("Can't convert number to bigint");return BigInt(r)}});var JF=V((jVt,Jie)=>{var Fnt=fl(),Hnt=ni(),Unt=Zw(),Bnt=Li(),knt=ln(),Gnt=v1(),Vnt=dv(),znt=Sw(),jnt=Zie(),Wnt=_i().aTypedArrayConstructor,qnt=KF();Jie.exports=function(r){var e=Unt(this),i=Bnt(r),n=arguments.length,s=n>1?arguments[1]:void 0,a=s!==void 0,o=Vnt(i),l,c,u,h,p,d,f,m;if(o&&!znt(o))for(f=Gnt(i,o),m=f.next,i=[];!(d=Hnt(m,f)).done;)i.push(d.value);for(a&&n>2&&(s=Fnt(s,arguments[2])),c=knt(i),u=new(Wnt(e))(c),h=jnt(u),l=0;c>l;l++)p=a?s(i[l],l):i[l],u[l]=h?qnt(p):+p;return u}});var Ou=V((WVt,s5)=>{"use strict";var Qie=Ne(),une=ir(),ene=ni(),Ynt=Pr(),Xnt=LR(),Vv=_i(),hne=M1(),tne=yc(),$nt=Ao(),rb=va(),Znt=lR(),Knt=Wa(),rne=AN(),QF=ZF(),pne=Vh(),ib=Si(),Jnt=mc(),r5=si(),Qnt=Md(),est=qa(),tst=Oo(),FR=gc(),rst=zh().f,ine=JF(),ist=ws().forEach,nst=Nm(),dne=Vi(),fne=Us(),a5=cs(),sst=Om(),i5=a5.get,ast=a5.set,ost=a5.enforce,o5=dne.f,lst=fne.f,cst=Math.round,e5=une.RangeError,mne=hne.ArrayBuffer,ust=mne.prototype,hst=hne.DataView,HR=Vv.NATIVE_ARRAY_BUFFER_VIEWS,nne=Vv.TYPED_ARRAY_TAG,sne=Vv.TypedArray,nb=Vv.TypedArrayPrototype,pst=Vv.aTypedArrayConstructor,n5=Vv.isTypedArray,UR="BYTES_PER_ELEMENT",t5="Wrong length",ane=function(t,r){pst(t);for(var e=0,i=r.length,n=new t(i);i>e;)n[e]=r[e++];return n},BR=function(t,r){o5(t,r,{get:function(){return i5(this)[r]}})},one=function(t){var r;return tst(ust,t)||(r=Jnt(t))=="ArrayBuffer"||r=="SharedArrayBuffer"},gne=function(t,r){return n5(t)&&!Qnt(r)&&r in t&&Znt(+r)&&r>=0},lne=function(r,e){return e=pne(e),gne(r,e)?$nt(2,r[e]):lst(r,e)},cne=function(r,e,i){return e=pne(e),gne(r,e)&&r5(i)&&ib(i,"value")&&!ib(i,"get")&&!ib(i,"set")&&!i.configurable&&(!ib(i,"writable")||i.writable)&&(!ib(i,"enumerable")||i.enumerable)?(r[e]=i.value,r):o5(r,e,i)};Ynt?(HR||(fne.f=lne,dne.f=cne,BR(nb,"buffer"),BR(nb,"byteOffset"),BR(nb,"byteLength"),BR(nb,"length")),Qie({target:"Object",stat:!0,forced:!HR},{getOwnPropertyDescriptor:lne,defineProperty:cne}),s5.exports=function(t,r,e){var i=t.match(/\d+$/)[0]/8,n=t+(e?"Clamped":"")+"Array",s="get"+t,a="set"+t,o=une[n],l=o,c=l&&l.prototype,u={},h=function(m,g){var y=i5(m);return y.view[s](g*i+y.byteOffset,!0)},p=function(m,g,y){var E=i5(m);e&&(y=(y=cst(y))<0?0:y>255?255:y&255),E.view[a](g*i+E.byteOffset,y,!0)},d=function(m,g){o5(m,g,{get:function(){return h(this,g)},set:function(y){return p(this,g,y)},enumerable:!0})};HR?Xnt&&(l=r(function(m,g,y,E){return tne(m,c),sst(function(){return r5(g)?one(g)?E!==void 0?new o(g,QF(y,i),E):y!==void 0?new o(g,QF(y,i)):new o(g):n5(g)?ane(l,g):ene(ine,l,g):new o(rne(g))}(),m,l)}),FR&&FR(l,sne),ist(rst(o),function(m){m in l||rb(l,m,o[m])}),l.prototype=c):(l=r(function(m,g,y,E){tne(m,c);var b=0,x=0,S,D,P;if(!r5(g))P=rne(g),D=P*i,S=new mne(D);else if(one(g)){S=g,x=QF(y,i);var _=g.byteLength;if(E===void 0){if(_%i||(D=_-x,D<0))throw e5(t5)}else if(D=Knt(E)*i,D+x>_)throw e5(t5);P=D/i}else return n5(g)?ane(l,g):ene(ine,l,g);for(ast(m,{buffer:S,byteOffset:x,byteLength:D,length:P,view:new hst(S)});b{var dst=Ou();dst("Float32",function(t){return function(e,i,n){return t(this,e,i,n)}})});var yne=V(()=>{var fst=Ou();fst("Float64",function(t){return function(e,i,n){return t(this,e,i,n)}})});var Tne=V(()=>{var mst=Ou();mst("Int8",function(t){return function(e,i,n){return t(this,e,i,n)}})});var Ene=V(()=>{var gst=Ou();gst("Int16",function(t){return function(e,i,n){return t(this,e,i,n)}})});var bne=V(()=>{var vst=Ou();vst("Int32",function(t){return function(e,i,n){return t(this,e,i,n)}})});var xne=V(()=>{var yst=Ou();yst("Uint8",function(t){return function(e,i,n){return t(this,e,i,n)}})});var Ine=V(()=>{var Tst=Ou();Tst("Uint8",function(t){return function(e,i,n){return t(this,e,i,n)}},!0)});var Sne=V(()=>{var Est=Ou();Est("Uint16",function(t){return function(e,i,n){return t(this,e,i,n)}})});var _ne=V(()=>{var bst=Ou();bst("Uint32",function(t){return function(e,i,n){return t(this,e,i,n)}})});var Rne=V(()=>{"use strict";var wne=_i(),xst=ln(),Ist=ms(),Sst=wne.aTypedArray,_st=wne.exportTypedArrayMethod;_st("at",function(r){var e=Sst(this),i=xst(e),n=Ist(r),s=n>=0?n:i+n;return s<0||s>=i?void 0:e[s]})});var Dne=V(()=>{"use strict";var wst=Bt(),Mne=_i(),Rst=cN(),Mst=wst(Rst),Dst=Mne.aTypedArray,Cst=Mne.exportTypedArrayMethod;Cst("copyWithin",function(r,e){return Mst(Dst(this),r,e,arguments.length>2?arguments[2]:void 0)})});var Ane=V(()=>{"use strict";var Cne=_i(),Ast=ws().every,Ost=Cne.aTypedArray,Pst=Cne.exportTypedArrayMethod;Pst("every",function(r){return Ast(Ost(this),r,arguments.length>1?arguments[1]:void 0)})});var Pne=V(()=>{"use strict";var One=_i(),Nst=Dw(),Lst=KF(),Fst=mc(),Hst=ni(),Ust=Bt(),Bst=Rt(),kst=One.aTypedArray,Gst=One.exportTypedArrayMethod,Vst=Ust("".slice),zst=Bst(function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),t!==1});Gst("fill",function(r){var e=arguments.length;kst(this);var i=Vst(Fst(this),0,3)==="Big"?Lst(r):+r;return Hst(Nst,this,i,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)},zst)});var Lne=V((y7t,Nne)=>{var jst=ln();Nne.exports=function(t,r){for(var e=0,i=jst(r),n=new t(i);i>e;)n[e]=r[e++];return n}});var sb=V((T7t,Hne)=>{var Fne=_i(),Wst=Fm(),qst=Fne.aTypedArrayConstructor,Yst=Fne.getTypedArrayConstructor;Hne.exports=function(t){return qst(Wst(t,Yst(t)))}});var Bne=V((E7t,Une)=>{var Xst=Lne(),$st=sb();Une.exports=function(t,r){return Xst($st(t),r)}});var Gne=V(()=>{"use strict";var kne=_i(),Zst=ws().filter,Kst=Bne(),Jst=kne.aTypedArray,Qst=kne.exportTypedArrayMethod;Qst("filter",function(r){var e=Zst(Jst(this),r,arguments.length>1?arguments[1]:void 0);return Kst(this,e)})});var zne=V(()=>{"use strict";var Vne=_i(),eat=ws().find,tat=Vne.aTypedArray,rat=Vne.exportTypedArrayMethod;rat("find",function(r){return eat(tat(this),r,arguments.length>1?arguments[1]:void 0)})});var Wne=V(()=>{"use strict";var jne=_i(),iat=ws().findIndex,nat=jne.aTypedArray,sat=jne.exportTypedArrayMethod;sat("findIndex",function(r){return iat(nat(this),r,arguments.length>1?arguments[1]:void 0)})});var Yne=V(()=>{"use strict";var qne=_i(),aat=E1().findLast,oat=qne.aTypedArray,lat=qne.exportTypedArrayMethod;lat("findLast",function(r){return aat(oat(this),r,arguments.length>1?arguments[1]:void 0)})});var $ne=V(()=>{"use strict";var Xne=_i(),cat=E1().findLastIndex,uat=Xne.aTypedArray,hat=Xne.exportTypedArrayMethod;hat("findLastIndex",function(r){return cat(uat(this),r,arguments.length>1?arguments[1]:void 0)})});var Kne=V(()=>{"use strict";var Zne=_i(),pat=ws().forEach,dat=Zne.aTypedArray,fat=Zne.exportTypedArrayMethod;fat("forEach",function(r){pat(dat(this),r,arguments.length>1?arguments[1]:void 0)})});var Jne=V(()=>{"use strict";var mat=LR(),gat=_i().exportTypedArrayStaticMethod,vat=JF();gat("from",vat,mat)});var ese=V(()=>{"use strict";var Qne=_i(),yat=nv().includes,Tat=Qne.aTypedArray,Eat=Qne.exportTypedArrayMethod;Eat("includes",function(r){return yat(Tat(this),r,arguments.length>1?arguments[1]:void 0)})});var rse=V(()=>{"use strict";var tse=_i(),bat=nv().indexOf,xat=tse.aTypedArray,Iat=tse.exportTypedArrayMethod;Iat("indexOf",function(r){return bat(xat(this),r,arguments.length>1?arguments[1]:void 0)})});var ose=V(()=>{"use strict";var Sat=ir(),_at=Rt(),l5=Bt(),nse=_i(),c5=_1(),wat=fi(),u5=wat("iterator"),ise=Sat.Uint8Array,Rat=l5(c5.values),Mat=l5(c5.keys),Dat=l5(c5.entries),h5=nse.aTypedArray,kR=nse.exportTypedArrayMethod,zv=ise&&ise.prototype,GR=!_at(function(){zv[u5].call([1])}),sse=!!zv&&zv.values&&zv[u5]===zv.values&&zv.values.name==="values",ase=function(){return Rat(h5(this))};kR("entries",function(){return Dat(h5(this))},GR);kR("keys",function(){return Mat(h5(this))},GR);kR("values",ase,GR||!sse,{name:"values"});kR(u5,ase,GR||!sse,{name:"values"})});var cse=V(()=>{"use strict";var lse=_i(),Cat=Bt(),Aat=lse.aTypedArray,Oat=lse.exportTypedArrayMethod,Pat=Cat([].join);Oat("join",function(r){return Pat(Aat(this),r)})});var hse=V(()=>{"use strict";var use=_i(),Nat=Po(),Lat=SN(),Fat=use.aTypedArray,Hat=use.exportTypedArrayMethod;Hat("lastIndexOf",function(r){var e=arguments.length;return Nat(Lat,Fat(this),e>1?[r,arguments[1]]:[r])})});var dse=V(()=>{"use strict";var pse=_i(),Uat=ws().map,Bat=sb(),kat=pse.aTypedArray,Gat=pse.exportTypedArrayMethod;Gat("map",function(r){return Uat(kat(this),r,arguments.length>1?arguments[1]:void 0,function(e,i){return new(Bat(e))(i)})})});var mse=V(()=>{"use strict";var fse=_i(),Vat=LR(),zat=fse.aTypedArrayConstructor,jat=fse.exportTypedArrayStaticMethod;jat("of",function(){for(var r=0,e=arguments.length,i=new(zat(this))(e);e>r;)i[r]=arguments[r++];return i},Vat)});var vse=V(()=>{"use strict";var gse=_i(),Wat=w1().left,qat=gse.aTypedArray,Yat=gse.exportTypedArrayMethod;Yat("reduce",function(r){var e=arguments.length;return Wat(qat(this),r,e,e>1?arguments[1]:void 0)})});var Tse=V(()=>{"use strict";var yse=_i(),Xat=w1().right,$at=yse.aTypedArray,Zat=yse.exportTypedArrayMethod;Zat("reduceRight",function(r){var e=arguments.length;return Xat($at(this),r,e,e>1?arguments[1]:void 0)})});var bse=V(()=>{"use strict";var Ese=_i(),Kat=Ese.aTypedArray,Jat=Ese.exportTypedArrayMethod,Qat=Math.floor;Jat("reverse",function(){for(var r=this,e=Kat(r).length,i=Qat(e/2),n=0,s;n{"use strict";var Ise=ir(),Sse=ni(),f5=_i(),eot=ln(),tot=ZF(),rot=Li(),_se=Rt(),iot=Ise.RangeError,p5=Ise.Int8Array,xse=p5&&p5.prototype,wse=xse&&xse.set,not=f5.aTypedArray,sot=f5.exportTypedArrayMethod,d5=!_se(function(){var t=new Uint8ClampedArray(2);return Sse(wse,t,{length:1,0:3},1),t[1]!==3}),aot=d5&&f5.NATIVE_ARRAY_BUFFER_VIEWS&&_se(function(){var t=new p5(2);return t.set(1),t.set("2",1),t[0]!==0||t[1]!==2});sot("set",function(r){not(this);var e=tot(arguments.length>1?arguments[1]:void 0,1),i=rot(r);if(d5)return Sse(wse,this,i,e);var n=this.length,s=eot(i),a=0;if(s+e>n)throw iot("Wrong length");for(;a{"use strict";var Mse=_i(),oot=sb(),lot=Rt(),cot=Od(),uot=Mse.aTypedArray,hot=Mse.exportTypedArrayMethod,pot=lot(function(){new Int8Array(1).slice()});hot("slice",function(r,e){for(var i=cot(uot(this),r,e),n=oot(this),s=0,a=i.length,o=new n(a);a>s;)o[s]=i[s++];return o},pot)});var Ase=V(()=>{"use strict";var Cse=_i(),dot=ws().some,fot=Cse.aTypedArray,mot=Cse.exportTypedArrayMethod;mot("some",function(r){return dot(fot(this),r,arguments.length>1?arguments[1]:void 0)})});var Hse=V(()=>{"use strict";var got=ir(),vot=jh(),m5=Rt(),yot=fs(),Tot=Fw(),Fse=_i(),Ose=RN(),Eot=MN(),Pse=xu(),Nse=Hw(),bot=Fse.aTypedArray,xot=Fse.exportTypedArrayMethod,ab=got.Uint16Array,jv=ab&&vot(ab.prototype.sort),Iot=!!jv&&!(m5(function(){jv(new ab(2),null)})&&m5(function(){jv(new ab(2),{})})),Lse=!!jv&&!m5(function(){if(Pse)return Pse<74;if(Ose)return Ose<67;if(Eot)return!0;if(Nse)return Nse<602;var t=new ab(516),r=Array(516),e,i;for(e=0;e<516;e++)i=e%4,t[e]=515-e,r[e]=e-2*i+3;for(jv(t,function(n,s){return(n/4|0)-(s/4|0)}),e=0;e<516;e++)if(t[e]!==r[e])return!0}),Sot=function(t){return function(r,e){return t!==void 0?+t(r,e)||0:e!==e?-1:r!==r?1:r===0&&e===0?1/r>0&&1/e<0?1:-1:r>e}};xot("sort",function(r){return r!==void 0&&yot(r),Lse?jv(this,r):Tot(bot(this),Sot(r))},!Lse||Iot)});var kse=V(()=>{"use strict";var Bse=_i(),_ot=Wa(),Use=Su(),wot=sb(),Rot=Bse.aTypedArray,Mot=Bse.exportTypedArrayMethod;Mot("subarray",function(r,e){var i=Rot(this),n=i.length,s=Use(r,n),a=wot(i);return new a(i.buffer,i.byteOffset+s*i.BYTES_PER_ELEMENT,_ot((e===void 0?n:Use(e,n))-s))})});var Wse=V(()=>{"use strict";var Dot=ir(),Cot=Po(),zse=_i(),g5=Rt(),Gse=Od(),VR=Dot.Int8Array,Vse=zse.aTypedArray,Aot=zse.exportTypedArrayMethod,jse=[].toLocaleString,Oot=!!VR&&g5(function(){jse.call(new VR(1))}),Pot=g5(function(){return[1,2].toLocaleString()!=new VR([1,2]).toLocaleString()})||!g5(function(){VR.prototype.toLocaleString.call([1,2])});Aot("toLocaleString",function(){return Cot(jse,Oot?Gse(Vse(this)):Vse(this),Gse(arguments))},Pot)});var Yse=V(()=>{"use strict";var Not=_i().exportTypedArrayMethod,Lot=Rt(),Fot=ir(),Hot=Bt(),qse=Fot.Uint8Array,Uot=qse&&qse.prototype||{},zR=[].toString,Bot=Hot([].join);Lot(function(){zR.call({})})&&(zR=function(){return Bot(this)});var kot=Uot.toString!=zR;Not("toString",zR,kot)});var Jse=V(()=>{"use strict";var Got=Ne(),v5=Bt(),Vot=mi(),Xse=String.fromCharCode,$se=v5("".charAt),Zse=v5(/./.exec),Kse=v5("".slice),zot=/^[\da-f]{2}$/i,jot=/^[\da-f]{4}$/i;Got({global:!0},{unescape:function(r){for(var e=Vot(r),i="",n=e.length,s=0,a,o;s{"use strict";var Wot=Bt(),Qse=gv(),jR=kd().getWeakData,qot=yc(),Yot=jr(),Xot=ma(),y5=si(),$ot=vc(),tae=ws(),eae=Si(),rae=cs(),Zot=rae.set,Kot=rae.getterFor,Jot=tae.find,Qot=tae.findIndex,elt=Wot([].splice),tlt=0,WR=function(t){return t.frozen||(t.frozen=new iae)},iae=function(){this.entries=[]},T5=function(t,r){return Jot(t.entries,function(e){return e[0]===r})};iae.prototype={get:function(t){var r=T5(this,t);if(r)return r[1]},has:function(t){return!!T5(this,t)},set:function(t,r){var e=T5(this,t);e?e[1]=r:this.entries.push([t,r])},delete:function(t){var r=Qot(this.entries,function(e){return e[0]===t});return~r&&elt(this.entries,r,1),!!~r}};nae.exports={getConstructor:function(t,r,e,i){var n=t(function(l,c){qot(l,s),Zot(l,{type:r,id:tlt++,frozen:void 0}),Xot(c)||$ot(c,l[i],{that:l,AS_ENTRIES:e})}),s=n.prototype,a=Kot(r),o=function(l,c,u){var h=a(l),p=jR(Yot(c),!0);return p===!0?WR(h).set(c,u):p[h.id]=u,l};return Qse(s,{delete:function(l){var c=a(this);if(!y5(l))return!1;var u=jR(l);return u===!0?WR(c).delete(l):u&&eae(u,c.id)&&delete u[c.id]},has:function(c){var u=a(this);if(!y5(c))return!1;var h=jR(c);return h===!0?WR(u).has(c):h&&eae(h,u.id)}}),Qse(s,e?{get:function(c){var u=a(this);if(y5(c)){var h=jR(c);return h===!0?WR(u).get(c):h?h[u.id]:void 0}},set:function(c,u){return o(this,c,u)}}:{add:function(c){return o(this,c,!0)}}),n}}});var fae=V(()=>{"use strict";var rlt=Um(),sae=ir(),$R=Bt(),aae=gv(),ilt=kd(),nlt=A1(),cae=E5(),qR=si(),YR=cs().enforce,slt=Rt(),alt=f2(),cb=Object,olt=Array.isArray,XR=cb.isExtensible,uae=cb.isFrozen,llt=cb.isSealed,hae=cb.freeze,clt=cb.seal,oae={},lae={},ult=!sae.ActiveXObject&&"ActiveXObject"in sae,ob,pae=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},dae=nlt("WeakMap",pae,cae),Wv=dae.prototype,ZR=$R(Wv.set),hlt=function(){return rlt&&slt(function(){var t=hae([]);return ZR(new dae,t,1),!uae(t)})};alt&&(ult?(ob=cae.getConstructor(pae,"WeakMap",!0),ilt.enable(),b5=$R(Wv.delete),lb=$R(Wv.has),x5=$R(Wv.get),aae(Wv,{delete:function(t){if(qR(t)&&!XR(t)){var r=YR(this);return r.frozen||(r.frozen=new ob),b5(this,t)||r.frozen.delete(t)}return b5(this,t)},has:function(r){if(qR(r)&&!XR(r)){var e=YR(this);return e.frozen||(e.frozen=new ob),lb(this,r)||e.frozen.has(r)}return lb(this,r)},get:function(r){if(qR(r)&&!XR(r)){var e=YR(this);return e.frozen||(e.frozen=new ob),lb(this,r)?x5(this,r):e.frozen.get(r)}return x5(this,r)},set:function(r,e){if(qR(r)&&!XR(r)){var i=YR(this);i.frozen||(i.frozen=new ob),lb(this,r)?ZR(this,r,e):i.frozen.set(r,e)}else ZR(this,r,e);return this}})):hlt()&&aae(Wv,{set:function(r,e){var i;return olt(r)&&(uae(r)?i=oae:llt(r)&&(i=lae)),ZR(this,r,e),i==oae&&hae(r),i==lae&&clt(r),this}}));var b5,lb,x5});var mae=V(()=>{fae()});var gae=V(()=>{"use strict";var plt=A1(),dlt=E5();plt("WeakSet",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},dlt)});var vae=V(()=>{gae()});var I5=V((w9t,Eae)=>{var yae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Tae={};for(ub=0;ub<66;ub++)Tae[yae.charAt(ub)]=ub;var ub;Eae.exports={itoc:yae,ctoi:Tae}});var wae=V(()=>{var flt=Ne(),Sae=bn(),_5=Bt(),w5=Rt(),mlt=mi(),glt=Si(),vlt=ep(),S5=I5().ctoi,_ae=/[^\d+/a-z]/i,ylt=/[\t\n\f\r ]+/g,Tlt=/[=]+$/,hb=Sae("atob"),Elt=String.fromCharCode,blt=_5("".charAt),bae=_5("".replace),xlt=_5(_ae.exec),R5=w5(function(){return hb(" ")!==""}),M5=!w5(function(){hb("a")}),xae=!R5&&!M5&&!w5(function(){hb()}),Iae=!R5&&!M5&&hb.length!==1;flt({global:!0,enumerable:!0,forced:R5||M5||xae||Iae},{atob:function(r){if(vlt(arguments.length,1),xae||Iae)return hb(r);var e=bae(mlt(r),ylt,""),i="",n=0,s=0,a,o;if(e.length%4==0&&(e=bae(e,Tlt,"")),e.length%4==1||xlt(_ae,e))throw new(Sae("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;a=blt(e,n++);)glt(S5,a)&&(o=s%4?o*64+S5[a]:S5[a],s++%4&&(i+=Elt(255&o>>(-2*s&6))));return i}})});var Lae=V(()=>{var Ilt=Ne(),Oae=bn(),Pae=Bt(),Nae=Rt(),Rae=mi(),Slt=ep(),_lt=I5().itoc,Ym=Oae("btoa"),Mae=Pae("".charAt),wlt=Pae("".charCodeAt),Dae=!!Ym&&!Nae(function(){Ym()}),Cae=!!Ym&&Nae(function(){return Ym(null)!=="bnVsbA=="}),Aae=!!Ym&&Ym.length!==1;Ilt({global:!0,enumerable:!0,forced:Dae||Cae||Aae},{btoa:function(r){if(Slt(arguments.length,1),Dae||Cae||Aae)return Ym(Rae(r));for(var e=Rae(r),i="",n=0,s=_lt,a,o;Mae(e,n)||(s="=",n%1);){if(o=wlt(e,n+=3/4),o>255)throw new(Oae("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");a=a<<8|o,i+=Mae(s,63&a>>8-n%1*8)}return i}})});var D5=V((A9t,Fae)=>{Fae.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var A5=V((O9t,Uae)=>{var Rlt=i1(),C5=Rlt("span").classList,Hae=C5&&C5.constructor&&C5.constructor.prototype;Uae.exports=Hae===Object.prototype?void 0:Hae});var Vae=V(()=>{var Bae=ir(),kae=D5(),Mlt=A5(),O5=dN(),Dlt=va(),Gae=function(t){if(t&&t.forEach!==O5)try{Dlt(t,"forEach",O5)}catch(r){t.forEach=O5}};for(KR in kae)kae[KR]&&Gae(Bae[KR]&&Bae[KR].prototype);var KR;Gae(Mlt)});var Xae=V(()=>{var zae=ir(),Wae=D5(),Clt=A5(),pb=_1(),P5=va(),qae=fi(),N5=qae("iterator"),jae=qae("toStringTag"),L5=pb.values,Yae=function(t,r){if(t){if(t[N5]!==L5)try{P5(t,N5,L5)}catch(i){t[N5]=L5}if(t[jae]||P5(t,jae,r),Wae[r]){for(var e in pb)if(t[e]!==pb[e])try{P5(t,e,pb[e])}catch(i){t[e]=pb[e]}}}};for(JR in Wae)Yae(zae[JR]&&zae[JR].prototype,JR);var JR;Yae(Clt,"DOMTokenList")});var Zae=V((H9t,$ae)=>{var Alt=Mu();$ae.exports=function(t){try{if(Alt)return Function('return require("'+t+'")')()}catch(r){}}});var F5=V((U9t,Kae)=>{Kae.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}});var loe=V(()=>{"use strict";var Olt=Ne(),Plt=Zae(),tM=bn(),V5=Rt(),Nlt=qa(),z5=Ao(),rM=Vi().f,Llt=Dn(),QR=Gd(),eM=Si(),Flt=yc(),Hlt=jr(),eoe=eN(),Jae=hv(),qv=F5(),Ult=g1(),toe=cs(),j5=Pr(),roe=Bn(),Yv="DOMException",G5="DATA_CLONE_ERR",nM=tM("Error"),tp=tM(Yv)||function(){try{var t=tM("MessageChannel")||Plt("worker_threads").MessageChannel;new t().port1.postMessage(new WeakMap)}catch(r){if(r.name==G5&&r.code==25)return r.constructor}}(),Blt=tp&&tp.prototype,ioe=nM.prototype,klt=toe.set,Glt=toe.getterFor(Yv),Vlt="stack"in nM(Yv),noe=function(t){return eM(qv,t)&&qv[t].m?qv[t].c:0},W5=function(){Flt(this,fb);var r=arguments.length,e=Jae(r<1?void 0:arguments[0]),i=Jae(r<2?void 0:arguments[1],"Error"),n=noe(i);if(klt(this,{type:Yv,name:i,message:e,code:n}),j5||(this.name=i,this.message=e,this.code=n),Vlt){var s=nM(e);s.name=Yv,rM(this,"stack",z5(1,Ult(s.stack,1)))}},fb=W5.prototype=Nlt(ioe),soe=function(t){return{enumerable:!0,configurable:!0,get:t}},H5=function(t){return soe(function(){return Glt(this)[t]})};j5&&(QR(fb,"code",H5("code")),QR(fb,"message",H5("message")),QR(fb,"name",H5("name")));rM(fb,"constructor",z5(1,W5));var sM=V5(function(){return!(new tp instanceof nM)}),aoe=sM||V5(function(){return ioe.toString!==eoe||String(new tp(1,2))!=="2: 1"}),ooe=sM||V5(function(){return new tp(1,"DataCloneError").code!==25}),zlt=sM||tp[G5]!==25||Blt[G5]!==25,Qae=roe?aoe||ooe||zlt:sM;Olt({global:!0,constructor:!0,forced:Qae},{DOMException:Qae?W5:tp});var mb=tM(Yv),iM=mb.prototype;aoe&&(roe||tp===mb)&&Llt(iM,"toString",eoe);ooe&&j5&&tp===mb&&QR(iM,"code",soe(function(){return noe(Hlt(this).name)}));for(U5 in qv)eM(qv,U5)&&(B5=qv[U5],db=B5.s,k5=z5(6,B5.c),eM(mb,db)||rM(mb,db,k5),eM(iM,db)||rM(iM,db,k5));var B5,db,k5,U5});var moe=V(()=>{"use strict";var jlt=Ne(),Wlt=ir(),Q5=bn(),K5=Ao(),J5=Vi().f,coe=Si(),qlt=yc(),Ylt=Om(),uoe=hv(),q5=F5(),Xlt=g1(),$lt=Pr(),doe=Bn(),vb="DOMException",foe=Q5("Error"),yb=Q5(vb),e6=function(){qlt(this,Zlt);var r=arguments.length,e=uoe(r<1?void 0:arguments[0]),i=uoe(r<2?void 0:arguments[1],"Error"),n=new yb(e,i),s=foe(e);return s.name=vb,J5(n,"stack",K5(1,Xlt(s.stack,1))),Ylt(n,this,e6),n},Zlt=e6.prototype=yb.prototype,Klt="stack"in foe(vb),Jlt="stack"in new yb(1,2),Y5=yb&&$lt&&Object.getOwnPropertyDescriptor(Wlt,vb),Qlt=!!Y5&&!(Y5.writable&&Y5.configurable),hoe=Klt&&!Qlt&&!Jlt;jlt({global:!0,constructor:!0,forced:doe||hoe},{DOMException:hoe?e6:yb});var gb=Q5(vb),poe=gb.prototype;if(poe.constructor!==gb){doe||J5(poe,"constructor",K5(1,gb));for(X5 in q5)coe(q5,X5)&&($5=q5[X5],Z5=$5.s,coe(gb,Z5)||J5(gb,Z5,K5(6,$5.c)))}var $5,Z5,X5});var voe=V(()=>{var ect=bn(),tct=Ya(),goe="DOMException";tct(ect(goe),goe)});var Toe=V(()=>{var rct=Ne(),ict=ir(),yoe=z1().clear;rct({global:!0,bind:!0,enumerable:!0,forced:ict.clearImmediate!==yoe},{clearImmediate:yoe})});var boe=V((Y9t,Eoe)=>{Eoe.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"});var aM=V((X9t,Ioe)=>{"use strict";var xoe=ir(),nct=Po(),sct=Ti(),act=boe(),oct=bu(),lct=Od(),cct=ep(),uct=xoe.Function,hct=/MSIE .\./.test(oct)||act&&function(){var t=xoe.Bun.version.split(".");return t.length<3||t[0]==0&&(t[1]<3||t[1]==3&&t[2]==0)}();Ioe.exports=function(t,r){var e=r?2:1;return hct?function(i,n){var s=cct(arguments.length,1)>e,a=sct(i)?i:uct(i),o=s?lct(arguments,e):[],l=s?function(){nct(a,this,o)}:a;return r?t(l,n):t(l)}:t}});var Roe=V(()=>{var pct=Ne(),woe=ir(),Soe=z1().set,dct=aM(),_oe=woe.setImmediate?dct(Soe,!1):Soe;pct({global:!0,bind:!0,enumerable:!0,forced:woe.setImmediate!==_oe},{setImmediate:_oe})});var Moe=V(()=>{Toe();Roe()});var Doe=V(()=>{var fct=Ne(),mct=ir(),gct=XL(),vct=fs(),yct=ep(),Tct=Mu(),Ect=mct.process;fct({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(r){yct(arguments.length,1),vct(r);var e=Tct&&Ect.domain;gct(e?e.bind(r):r)}})});var Aoe=V(()=>{"use strict";var bct=Ne(),qd=ir(),xct=Gd(),Ict=Pr(),Sct=TypeError,_ct=Object.defineProperty,Coe=qd.self!==qd;try{Ict?(oM=Object.getOwnPropertyDescriptor(qd,"self"),(Coe||!oM||!oM.get||!oM.enumerable)&&xct(qd,"self",{get:function(){return qd},set:function(r){if(this!==qd)throw Sct("Illegal invocation");_ct(qd,"self",{value:r,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})):bct({global:!0,simple:!0,forced:Coe},{self:qd})}catch(t){}var oM});var Poe=V((izt,Ooe)=>{var lM=Bt(),Tb=Map.prototype;Ooe.exports={Map,set:lM(Tb.set),get:lM(Tb.get),has:lM(Tb.has),remove:lM(Tb.delete),proto:Tb}});var Loe=V((nzt,Noe)=>{var t6=Bt(),Xv=Set.prototype;Noe.exports={Set,add:t6(Xv.add),has:t6(Xv.has),remove:t6(Xv.delete),proto:Xv,$has:Xv.has,$keys:Xv.keys}});var Woe=V(()=>{var wct=Bn(),Rct=Ne(),Cn=ir(),u6=bn(),xb=Bt(),hM=Rt(),Mct=_m(),a6=Ti(),Dct=Dm(),Cct=ma(),o6=si(),Act=Md(),Oct=vc(),Hoe=jr(),Uoe=mc(),Pct=Si(),Nct=_u(),r6=va(),cM=ln(),Lct=ep(),Fct=Nv(),pM=Poe(),Boe=Loe(),Hct=Ew(),i6=xu(),Uct=$L(),Bct=fR(),kct=Mu(),Eb=Cn.Object,Gct=Cn.Array,koe=Cn.Date,Ib=Cn.Error,Vct=Cn.EvalError,zct=Cn.RangeError,jct=Cn.ReferenceError,Wct=Cn.SyntaxError,Goe=Cn.TypeError,qct=Cn.URIError,Yct=Cn.PerformanceMark,$v=Cn.WebAssembly,Xct=$v&&$v.CompileError||Ib,$ct=$v&&$v.LinkError||Ib,Zct=$v&&$v.RuntimeError||Ib,Xm=u6("DOMException"),l6=pM.Map,Voe=pM.has,Kct=pM.get,uM=pM.set,Jct=Boe.Set,Qct=Boe.add,eut=u6("Object","keys"),tut=xb([].push),rut=xb((!0).valueOf),iut=xb(1 .valueOf),nut=xb("".valueOf),sut=xb(koe.prototype.getTime),c6=Mct("structuredClone"),bb="DataCloneError",n6="Transferring",zoe=function(t){return!hM(function(){var r=new Cn.Set([7]),e=t(r),i=t(Eb(7));return e==r||!e.has(7)||typeof i!="object"||i!=7})&&t},Foe=function(t,r){return!hM(function(){var e=new r,i=t({a:e,b:e});return!(i&&i.a===i.b&&i.a instanceof r&&i.a.stack===e.stack)})},aut=function(t){return!hM(function(){var r=t(new Cn.AggregateError([1],c6,{cause:3}));return r.name!="AggregateError"||r.errors[0]!=1||r.message!=c6||r.cause!=3})},Xd=Cn.structuredClone,out=wct||!Foe(Xd,Ib)||!Foe(Xd,Xm)||!aut(Xd),lut=!Xd&&zoe(function(t){return new Yct(c6,{detail:t}).detail}),Yd=zoe(Xd)||lut,s6=function(t){throw new Xm("Uncloneable type: "+t,bb)},Ea=function(t,r){throw new Xm((r||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",bb)},cut=function(){var t;try{t=new Cn.DataTransfer}catch(r){try{t=new Cn.ClipboardEvent("").clipboardData}catch(e){}}return t&&t.items&&t.files?t:null},qs=function(t,r){if(Act(t)&&s6("Symbol"),!o6(t))return t;if(r){if(Voe(r,t))return Kct(r,t)}else r=new l6;var e=Uoe(t),i=!1,n,s,a,o,l,c,u,h,p,d;switch(e){case"Array":a=Gct(cM(t)),i=!0;break;case"Object":a={},i=!0;break;case"Map":a=new l6,i=!0;break;case"Set":a=new Jct,i=!0;break;case"RegExp":a=new RegExp(t.source,Fct(t));break;case"Error":switch(s=t.name,s){case"AggregateError":a=u6("AggregateError")([]);break;case"EvalError":a=Vct();break;case"RangeError":a=zct();break;case"ReferenceError":a=jct();break;case"SyntaxError":a=Wct();break;case"TypeError":a=Goe();break;case"URIError":a=qct();break;case"CompileError":a=Xct();break;case"LinkError":a=$ct();break;case"RuntimeError":a=Zct();break;default:a=Ib()}i=!0;break;case"DOMException":a=new Xm(t.message,t.name),i=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":n=Cn[e],o6(n)||Ea(e),a=new n(qs(t.buffer,r),t.byteOffset,e==="DataView"?t.byteLength:t.length);break;case"DOMQuad":try{a=new DOMQuad(qs(t.p1,r),qs(t.p2,r),qs(t.p3,r),qs(t.p4,r))}catch(f){Yd?a=Yd(t):Ea(e)}break;case"FileList":if(o=cut(),o){for(l=0,c=cM(t);l92||kct&&i6>94||Uct&&i6>97)return!1;var t=new ArrayBuffer(8),r=Xd(t,{transfer:[t]});return t.byteLength!=0||r.byteLength!=8}),uut=function(t,r){if(!o6(t))throw Goe("Transfer option cannot be converted to a sequence");var e=[];Oct(t,function(p){tut(e,Hoe(p))});var i=0,n=cM(e),s,a,o,l,c,u,h;if(joe)for(l=Xd(e,{transfer:e});i1&&!Cct(arguments[1])?Hoe(arguments[1]):void 0,i=e?e.transfer:void 0,n;return i!==void 0&&(n=new l6,uut(i,n)),qs(r,n)}})});var Xoe=V(()=>{var hut=Ne(),Yoe=ir(),put=aM(),qoe=put(Yoe.setInterval,!0);hut({global:!0,bind:!0,forced:Yoe.setInterval!==qoe},{setInterval:qoe})});var Koe=V(()=>{var dut=Ne(),Zoe=ir(),fut=aM(),$oe=fut(Zoe.setTimeout,!0);dut({global:!0,bind:!0,forced:Zoe.setTimeout!==$oe},{setTimeout:$oe})});var Joe=V(()=>{Xoe();Koe()});var h6=V((dzt,Qoe)=>{var mut=Rt(),gut=fi(),vut=Bn(),yut=gut("iterator");Qoe.exports=!mut(function(){var t=new URL("b?a=1&b=2&c=3","http://a"),r=t.searchParams,e="";return t.pathname="c%20d",r.forEach(function(i,n){r.delete("b"),e+=n+i}),vut&&!t.toJSON||!r.sort||t.href!=="http://a/c%20d?a=1&c=3"||r.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!r[yut]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("http://a#\u0431").hash!=="#%D0%B1"||e!=="a1c3"||new URL("http://x",void 0).host!=="x"})});var lle=V((fzt,ole)=>{"use strict";var $m=Bt(),p6=2147483647,Sb=36,nle=1,m6=26,Tut=38,Eut=700,but=72,xut=128,Iut="-",Sut=/[^\0-\u007E]/,sle=/[.\u3002\uFF0E\uFF61]/g,ele="Overflow: input needs wider integers to process",d6=Sb-nle,tle=RangeError,_ut=$m(sle.exec),Zv=Math.floor,f6=String.fromCharCode,rle=$m("".charCodeAt),ale=$m([].join),$d=$m([].push),wut=$m("".replace),Rut=$m("".split),Mut=$m("".toLowerCase),Dut=function(t){for(var r=[],e=0,i=t.length;e=55296&&n<=56319&&e>1,t+=Zv(t/r);t>d6*m6>>1;)t=Zv(t/d6),i+=Sb;return Zv(i+(d6+1)*t/(t+Tut))},Aut=function(t){var r=[];t=Dut(t);var e=t.length,i=xut,n=0,s=but,a,o;for(a=0;a=i&&oZv((p6-n)/h))throw tle(ele);for(n+=(u-i)*h,i=u,a=0;ap6)throw tle(ele);if(o==i){for(var p=n,d=Sb;;){var f=d<=s?nle:d>=s+m6?m6:d-s;if(p{"use strict";_1();var E6=Ne(),Jv=ir(),dM=ni(),Pu=Bt(),Out=Pr(),Ele=h6(),ble=Dn(),Put=gv(),Nut=Ya(),Lut=Cw(),I6=cs(),xle=yc(),g6=Ti(),Fut=Si(),Hut=fl(),Uut=mc(),But=jr(),Ile=si(),Ho=mi(),kut=qa(),cle=Ao(),b6=v1(),Gut=dv(),Kv=ep(),Vut=fi(),zut=Fw(),jut=Vut("iterator"),Rb="URLSearchParams",Sle=Rb+"Iterator",_le=I6.set,Ec=I6.getterFor(Rb),Wut=I6.getterFor(Sle),qut=Object.getOwnPropertyDescriptor,S6=function(t){if(!Out)return Jv[t];var r=qut(Jv,t);return r&&r.value},ule=S6("fetch"),mM=S6("Request"),_b=S6("Headers"),v6=mM&&mM.prototype,hle=_b&&_b.prototype,Yut=Jv.RegExp,Xut=Jv.TypeError,wle=Jv.decodeURIComponent,$ut=Jv.encodeURIComponent,Zut=Pu("".charAt),ple=Pu([].join),Zm=Pu([].push),x6=Pu("".replace),Kut=Pu([].shift),dle=Pu([].splice),fle=Pu("".split),Jut=Pu("".slice),Qut=/\+/g,mle=Array(4),eht=function(t){return mle[t-1]||(mle[t-1]=Yut("((?:%[\\da-f]{2}){"+t+"})","gi"))},tht=function(t){try{return wle(t)}catch(r){return t}},gle=function(t){var r=x6(t,Qut," "),e=4;try{return wle(r)}catch(i){for(;e;)r=x6(r,eht(e--),tht);return r}},rht=/[!'()~]|%20/g,iht={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},nht=function(t){return iht[t]},vle=function(t){return x6($ut(t),rht,nht)},y6=Lut(function(r,e){_le(this,{type:Sle,iterator:b6(Ec(r).entries),kind:e})},"Iterator",function(){var r=Wut(this),e=r.kind,i=r.iterator.next(),n=i.value;return i.done||(i.value=e==="keys"?n.key:e==="values"?n.value:[n.key,n.value]),i},!0),Rle=function(t){this.entries=[],this.url=null,t!==void 0&&(Ile(t)?this.parseObject(t):this.parseQuery(typeof t=="string"?Zut(t,0)==="?"?Jut(t,1):t:Ho(t)))};Rle.prototype={type:Rb,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var r=Gut(t),e,i,n,s,a,o,l;if(r)for(e=b6(t,r),i=e.next;!(n=dM(i,e)).done;){if(s=b6(But(n.value)),a=s.next,(o=dM(a,s)).done||(l=dM(a,s)).done||!dM(a,s).done)throw Xut("Expected sequence with length 2");Zm(this.entries,{key:Ho(o.value),value:Ho(l.value)})}else for(var c in t)Fut(t,c)&&Zm(this.entries,{key:c,value:Ho(t[c])})},parseQuery:function(t){if(t)for(var r=fle(t,"&"),e=0,i,n;e0?arguments[0]:void 0;_le(this,new Rle(r))},wb=gM.prototype;Put(wb,{append:function(r,e){Kv(arguments.length,2);var i=Ec(this);Zm(i.entries,{key:Ho(r),value:Ho(e)}),i.updateURL()},delete:function(t){Kv(arguments.length,1);for(var r=Ec(this),e=r.entries,i=Ho(t),n=0;ni.key?1:-1}),r.updateURL()},forEach:function(r){for(var e=Ec(this).entries,i=Hut(r,arguments.length>1?arguments[1]:void 0),n=0,s;n1?T6(arguments[1]):{})}}),g6(mM)&&(fM=function(r){return xle(this,v6),new mM(r,arguments.length>1?T6(arguments[1]):{})},v6.constructor=fM,fM.prototype=v6,E6({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:fM})));var yle,Tle,T6,fM;Mle.exports={URLSearchParams:gM,getState:Ec}});var Yle=V(()=>{"use strict";CF();var sht=Ne(),G6=Pr(),aht=h6(),V6=ir(),Dle=fl(),xl=Bt(),bM=Dn(),yl=Gd(),oht=yc(),U6=Si(),z6=RL(),Qv=fN(),bc=ov(),lht=Z1().codeAt,cht=lle(),ip=mi(),uht=Ya(),hht=ep(),Gle=_6(),Vle=cs(),pht=Vle.set,xM=Vle.getterFor("URL"),dht=Gle.URLSearchParams,fht=Gle.getState,Mb=V6.URL,B6=V6.TypeError,IM=V6.parseInt,mht=Math.floor,Cle=Math.pow,bl=xl("".charAt),xc=xl(/./.exec),Cb=xl([].join),ght=xl(1 .toString),vht=xl([].pop),ty=xl([].push),Ale=xl("".replace),yht=xl([].shift),Tht=xl("".split),Ob=xl("".slice),SM=xl("".toLowerCase),Eht=xl([].unshift),bht="Invalid authority",w6="Invalid scheme",Km="Invalid host",Ole="Invalid port",zle=/[a-z]/i,xht=/[\d+-.a-z]/i,k6=/\d/,Iht=/^0x/i,Sht=/^[0-7]+$/,_ht=/^\d+$/,jle=/^[\da-f]+$/i,wht=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Rht=/[\0\t\n\r #/:<>?@[\\\]^|]/,Mht=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Dht=/[\t\n\r]/g,Tl,Cht=function(t){var r=Tht(t,"."),e,i,n,s,a,o,l;if(r.length&&r[r.length-1]==""&&r.length--,e=r.length,e>4)return t;for(i=[],n=0;n1&&bl(s,0)=="0"&&(a=xc(Iht,s)?16:8,s=Ob(s,a==8?1:2)),s==="")o=0;else{if(!xc(a==10?_ht:a==8?Sht:jle,s))return t;o=IM(s,a)}ty(i,o)}for(n=0;n=Cle(256,5-e))return null}else if(o>255)return null;for(l=vht(i),n=0;n6))return;for(o=0;p();){if(l=null,o>0)if(p()=="."&&o<4)n++;else return;if(!xc(k6,p()))return;for(;xc(k6,p());){if(c=IM(p(),10),l===null)l=c;else{if(l==0)return;l=l*10+c}if(l>255)return;n++}r[e]=r[e]*256+l,o++,(o==2||o==4)&&e++}if(o!=4)return;break}else if(p()==":"){if(n++,!p())return}else if(p())return;r[e++]=s}if(i!==null)for(u=e-i,e=7;e!=0&&u>0;)h=r[e],r[e--]=r[i+u-1],r[i+--u]=h;else if(e!=8)return;return r},Oht=function(t){for(var r=null,e=1,i=null,n=0,s=0;s<8;s++)t[s]!==0?(n>e&&(r=i,e=n),i=null,n=0):(i===null&&(i=s),++n);return n>e&&(r=i,e=n),r},Db=function(t){var r,e,i,n;if(typeof t=="number"){for(r=[],e=0;e<4;e++)Eht(r,t%256),t=mht(t/256);return Cb(r,".")}else if(typeof t=="object"){for(r="",i=Oht(t),e=0;e<8;e++)n&&t[e]===0||(n&&(n=!1),i===e?(r+=e?":":"::",n=!0):(r+=ght(t[e],16),e<7&&(r+=":")));return"["+r+"]"}return t},EM={},Wle=z6({},EM,{" ":1,'"':1,"<":1,">":1,"`":1}),qle=z6({},Wle,{"#":1,"?":1,"{":1,"}":1}),R6=z6({},qle,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Zd=function(t,r){var e=lht(t,0);return e>32&&e<127&&!U6(r,t)?t:encodeURIComponent(t)},vM={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ab=function(t,r){var e;return t.length==2&&xc(zle,bl(t,0))&&((e=bl(t,1))==":"||!r&&e=="|")},Ple=function(t){var r;return t.length>1&&Ab(Ob(t,0,2))&&(t.length==2||(r=bl(t,2))==="/"||r==="\\"||r==="?"||r==="#")},Pht=function(t){return t==="."||SM(t)==="%2e"},Nht=function(t){return t=SM(t),t===".."||t==="%2e."||t===".%2e"||t==="%2e%2e"},M6={},Nle={},D6={},Lle={},Fle={},C6={},Hle={},Ule={},yM={},TM={},A6={},O6={},P6={},N6={},Ble={},L6={},ey={},Nu={},kle={},Jm={},rp={},j6=function(t,r,e){var i=ip(t),n,s,a;if(r){if(s=this.parse(i),s)throw B6(s);this.searchParams=null}else{if(e!==void 0&&(n=new j6(e,!0)),s=this.parse(i,null,n),s)throw B6(s);a=fht(new dht),a.bindURL(this),this.searchParams=a}};j6.prototype={type:"URL",parse:function(t,r,e){var i=this,n=r||M6,s=0,a="",o=!1,l=!1,c=!1,u,h,p,d;for(t=ip(t),r||(i.scheme="",i.username="",i.password="",i.host=null,i.port=null,i.path=[],i.query=null,i.fragment=null,i.cannotBeABaseURL=!1,t=Ale(t,Mht,"")),t=Ale(t,Dht,""),u=Qv(t);s<=u.length;){switch(h=u[s],n){case M6:if(h&&xc(zle,h))a+=SM(h),n=Nle;else{if(r)return w6;n=D6;continue}break;case Nle:if(h&&(xc(xht,h)||h=="+"||h=="-"||h=="."))a+=SM(h);else if(h==":"){if(r&&(i.isSpecial()!=U6(vM,a)||a=="file"&&(i.includesCredentials()||i.port!==null)||i.scheme=="file"&&!i.host))return;if(i.scheme=a,r){i.isSpecial()&&vM[i.scheme]==i.port&&(i.port=null);return}a="",i.scheme=="file"?n=N6:i.isSpecial()&&e&&e.scheme==i.scheme?n=Lle:i.isSpecial()?n=Ule:u[s+1]=="/"?(n=Fle,s++):(i.cannotBeABaseURL=!0,ty(i.path,""),n=kle)}else{if(r)return w6;a="",n=D6,s=0;continue}break;case D6:if(!e||e.cannotBeABaseURL&&h!="#")return w6;if(e.cannotBeABaseURL&&h=="#"){i.scheme=e.scheme,i.path=bc(e.path),i.query=e.query,i.fragment="",i.cannotBeABaseURL=!0,n=rp;break}n=e.scheme=="file"?N6:C6;continue;case Lle:if(h=="/"&&u[s+1]=="/")n=yM,s++;else{n=C6;continue}break;case Fle:if(h=="/"){n=TM;break}else{n=Nu;continue}case C6:if(i.scheme=e.scheme,h==Tl)i.username=e.username,i.password=e.password,i.host=e.host,i.port=e.port,i.path=bc(e.path),i.query=e.query;else if(h=="/"||h=="\\"&&i.isSpecial())n=Hle;else if(h=="?")i.username=e.username,i.password=e.password,i.host=e.host,i.port=e.port,i.path=bc(e.path),i.query="",n=Jm;else if(h=="#")i.username=e.username,i.password=e.password,i.host=e.host,i.port=e.port,i.path=bc(e.path),i.query=e.query,i.fragment="",n=rp;else{i.username=e.username,i.password=e.password,i.host=e.host,i.port=e.port,i.path=bc(e.path),i.path.length--,n=Nu;continue}break;case Hle:if(i.isSpecial()&&(h=="/"||h=="\\"))n=yM;else if(h=="/")n=TM;else{i.username=e.username,i.password=e.password,i.host=e.host,i.port=e.port,n=Nu;continue}break;case Ule:if(n=yM,h!="/"||bl(a,s+1)!="/")continue;s++;break;case yM:if(h!="/"&&h!="\\"){n=TM;continue}break;case TM:if(h=="@"){o&&(a="%40"+a),o=!0,p=Qv(a);for(var f=0;f65535)return Ole;i.port=i.isSpecial()&&y===vM[i.scheme]?null:y,a=""}if(r)return;n=ey;continue}else return Ole;break;case N6:if(i.scheme="file",h=="/"||h=="\\")n=Ble;else if(e&&e.scheme=="file")if(h==Tl)i.host=e.host,i.path=bc(e.path),i.query=e.query;else if(h=="?")i.host=e.host,i.path=bc(e.path),i.query="",n=Jm;else if(h=="#")i.host=e.host,i.path=bc(e.path),i.query=e.query,i.fragment="",n=rp;else{Ple(Cb(bc(u,s),""))||(i.host=e.host,i.path=bc(e.path),i.shortenPath()),n=Nu;continue}else{n=Nu;continue}break;case Ble:if(h=="/"||h=="\\"){n=L6;break}e&&e.scheme=="file"&&!Ple(Cb(bc(u,s),""))&&(Ab(e.path[0],!0)?ty(i.path,e.path[0]):i.host=e.host),n=Nu;continue;case L6:if(h==Tl||h=="/"||h=="\\"||h=="?"||h=="#"){if(!r&&Ab(a))n=Nu;else if(a==""){if(i.host="",r)return;n=ey}else{if(d=i.parseHost(a),d)return d;if(i.host=="localhost"&&(i.host=""),r)return;a="",n=ey}continue}else a+=h;break;case ey:if(i.isSpecial()){if(n=Nu,h!="/"&&h!="\\")continue}else if(!r&&h=="?")i.query="",n=Jm;else if(!r&&h=="#")i.fragment="",n=rp;else if(h!=Tl&&(n=Nu,h!="/"))continue;break;case Nu:if(h==Tl||h=="/"||h=="\\"&&i.isSpecial()||!r&&(h=="?"||h=="#")){if(Nht(a)?(i.shortenPath(),h!="/"&&!(h=="\\"&&i.isSpecial())&&ty(i.path,"")):Pht(a)?h!="/"&&!(h=="\\"&&i.isSpecial())&&ty(i.path,""):(i.scheme=="file"&&!i.path.length&&Ab(a)&&(i.host&&(i.host=""),a=bl(a,0)+":"),ty(i.path,a)),a="",i.scheme=="file"&&(h==Tl||h=="?"||h=="#"))for(;i.path.length>1&&i.path[0]==="";)yht(i.path);h=="?"?(i.query="",n=Jm):h=="#"&&(i.fragment="",n=rp)}else a+=Zd(h,qle);break;case kle:h=="?"?(i.query="",n=Jm):h=="#"?(i.fragment="",n=rp):h!=Tl&&(i.path[0]+=Zd(h,EM));break;case Jm:!r&&h=="#"?(i.fragment="",n=rp):h!=Tl&&(h=="'"&&i.isSpecial()?i.query+="%27":h=="#"?i.query+="%23":i.query+=Zd(h,EM));break;case rp:h!=Tl&&(i.fragment+=Zd(h,Wle));break}s++}},parseHost:function(t){var r,e,i;if(bl(t,0)=="["){if(bl(t,t.length-1)!="]"||(r=Aht(Ob(t,1,-1)),!r))return Km;this.host=r}else if(this.isSpecial()){if(t=cht(t),xc(wht,t)||(r=Cht(t),r===null))return Km;this.host=r}else{if(xc(Rht,t))return Km;for(r="",e=Qv(t),i=0;i1?arguments[1]:void 0,n=pht(e,new j6(r,!1,i));G6||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},ba=ry.prototype,El=function(t,r){return{get:function(){return xM(this)[t]()},set:r&&function(e){return xM(this)[r](e)},configurable:!0,enumerable:!0}};G6&&(yl(ba,"href",El("serialize","setHref")),yl(ba,"origin",El("getOrigin")),yl(ba,"protocol",El("getProtocol","setProtocol")),yl(ba,"username",El("getUsername","setUsername")),yl(ba,"password",El("getPassword","setPassword")),yl(ba,"host",El("getHost","setHost")),yl(ba,"hostname",El("getHostname","setHostname")),yl(ba,"port",El("getPort","setPort")),yl(ba,"pathname",El("getPathname","setPathname")),yl(ba,"search",El("getSearch","setSearch")),yl(ba,"searchParams",El("getSearchParams")),yl(ba,"hash",El("getHash","setHash")));bM(ba,"toJSON",function(){return xM(this).serialize()},{enumerable:!0});bM(ba,"toString",function(){return xM(this).serialize()},{enumerable:!0});Mb&&(F6=Mb.createObjectURL,H6=Mb.revokeObjectURL,F6&&bM(ry,"createObjectURL",Dle(F6,Mb)),H6&&bM(ry,"revokeObjectURL",Dle(H6,Mb)));var F6,H6;uht(ry,"URL");sht({global:!0,constructor:!0,forced:!aht,sham:!G6},{URL:ry})});var Xle=V(()=>{Yle()});var $le=V(()=>{"use strict";var Lht=Ne(),Fht=ni();Lht({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return Fht(URL.prototype.toString,this)}})});var Zle=V(()=>{_6()});var Jle=V((Szt,Kle)=>{mW();xW();IW();SW();_W();wW();RW();MW();DW();CW();AW();OW();PW();NW();LW();rq();oq();Sq();Mq();Cq();Fq();kq();Vq();Wq();qq();Xq();Zq();Qq();eY();iY();nY();oY();vY();yY();EY();bY();_1();VY();qY();YY();$Y();KY();rX();nX();aX();cX();uX();wX();DX();CX();AX();OX();PX();a$();y$();R$();D$();C$();O$();L$();F$();q$();Y$();J$();rZ();nZ();uZ();dZ();vZ();yZ();W2();TZ();LZ();UZ();GZ();zZ();WZ();qZ();$Z();KZ();eK();rK();nK();aK();oK();lK();cK();pK();mK();gK();vK();MK();DK();OK();NK();LK();FK();HK();UK();jK();JK();iJ();cJ();pJ();vJ();yJ();bJ();IJ();_J();wJ();CJ();AJ();OJ();LJ();FJ();HJ();BJ();kJ();VJ();jJ();qJ();XJ();ZJ();KJ();JJ();QJ();oQ();lQ();cQ();pQ();dQ();mQ();vQ();Dee();Cee();Oee();Fee();Hee();jee();Yee();Xee();Jee();Qee();ete();tte();rte();ite();nte();cte();hte();pte();Mte();Cte();RR();Fte();Ute();Gte();jte();qte();Yte();Kte();nre();ore();cre();CF();xre();Ore();Nre();Lre();Bre();kre();qre();Kre();eie();aie();hie();die();vie();xie();Rie();Aie();Oie();Pie();Nie();Lie();Fie();Hie();Uie();Bie();kie();Gie();Vie();zie();vne();yne();Tne();Ene();bne();xne();Ine();Sne();_ne();Rne();Dne();Ane();Pne();Gne();zne();Wne();Yne();$ne();Kne();Jne();ese();rse();ose();cse();hse();dse();mse();vse();Tse();bse();Rse();Dse();Ase();Hse();kse();Wse();Yse();Jse();mae();vae();wae();Lae();Vae();Xae();loe();moe();voe();Moe();Doe();Aoe();Woe();Joe();Xle();$le();Zle();Kle.exports=pw()});var Qle=V((_zt,q6)=>{var W6=function(t){"use strict";var r=Object.prototype,e=r.hasOwnProperty,i=Object.defineProperty||function(G,U,j){G[U]=j.value},n,s=typeof Symbol=="function"?Symbol:{},a=s.iterator||"@@iterator",o=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function c(G,U,j){return Object.defineProperty(G,U,{value:j,enumerable:!0,configurable:!0,writable:!0}),G[U]}try{c({},"")}catch(G){c=function(U,j,ee){return U[j]=ee}}function u(G,U,j,ee){var ae=U&&U.prototype instanceof y?U:y,se=Object.create(ae.prototype),ue=new C(ee||[]);return i(se,"_invoke",{value:F(G,j,ue)}),se}t.wrap=u;function h(G,U,j){try{return{type:"normal",arg:G.call(U,j)}}catch(ee){return{type:"throw",arg:ee}}}var p="suspendedStart",d="suspendedYield",f="executing",m="completed",g={};function y(){}function E(){}function b(){}var x={};c(x,a,function(){return this});var S=Object.getPrototypeOf,D=S&&S(S(N([])));D&&D!==r&&e.call(D,a)&&(x=D);var P=b.prototype=y.prototype=Object.create(x);E.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:E,configurable:!0}),E.displayName=c(b,l,"GeneratorFunction");function _(G){["next","throw","return"].forEach(function(U){c(G,U,function(j){return this._invoke(U,j)})})}t.isGeneratorFunction=function(G){var U=typeof G=="function"&&G.constructor;return U?U===E||(U.displayName||U.name)==="GeneratorFunction":!1},t.mark=function(G){return Object.setPrototypeOf?Object.setPrototypeOf(G,b):(G.__proto__=b,c(G,l,"GeneratorFunction")),G.prototype=Object.create(P),G},t.awrap=function(G){return{__await:G}};function w(G,U){function j(se,ue,ve,be){var de=h(G[se],G,ue);if(de.type==="throw")be(de.arg);else{var we=de.arg,Fe=we.value;return Fe&&typeof Fe=="object"&&e.call(Fe,"__await")?U.resolve(Fe.__await).then(function(je){j("next",je,ve,be)},function(je){j("throw",je,ve,be)}):U.resolve(Fe).then(function(je){we.value=je,ve(we)},function(je){return j("throw",je,ve,be)})}}var ee;function ae(se,ue){function ve(){return new U(function(be,de){j(se,ue,be,de)})}return ee=ee?ee.then(ve,ve):ve()}i(this,"_invoke",{value:ae})}_(w.prototype),c(w.prototype,o,function(){return this}),t.AsyncIterator=w,t.async=function(G,U,j,ee,ae){ae===void 0&&(ae=Promise);var se=new w(u(G,U,j,ee),ae);return t.isGeneratorFunction(U)?se:se.next().then(function(ue){return ue.done?ue.value:se.next()})};function F(G,U,j){var ee=p;return function(se,ue){if(ee===f)throw new Error("Generator is already running");if(ee===m){if(se==="throw")throw ue;return k()}for(j.method=se,j.arg=ue;;){var ve=j.delegate;if(ve){var be=X(ve,j);if(be){if(be===g)continue;return be}}if(j.method==="next")j.sent=j._sent=j.arg;else if(j.method==="throw"){if(ee===p)throw ee=m,j.arg;j.dispatchException(j.arg)}else j.method==="return"&&j.abrupt("return",j.arg);ee=f;var de=h(G,U,j);if(de.type==="normal"){if(ee=j.done?m:d,de.arg===g)continue;return{value:de.arg,done:j.done}}else de.type==="throw"&&(ee=m,j.method="throw",j.arg=de.arg)}}}function X(G,U){var j=U.method,ee=G.iterator[j];if(ee===n)return U.delegate=null,j==="throw"&&G.iterator.return&&(U.method="return",U.arg=n,X(G,U),U.method==="throw")||j!=="return"&&(U.method="throw",U.arg=new TypeError("The iterator does not provide a '"+j+"' method")),g;var ae=h(ee,G.iterator,U.arg);if(ae.type==="throw")return U.method="throw",U.arg=ae.arg,U.delegate=null,g;var se=ae.arg;if(!se)return U.method="throw",U.arg=new TypeError("iterator result is not an object"),U.delegate=null,g;if(se.done)U[G.resultName]=se.value,U.next=G.nextLoc,U.method!=="return"&&(U.method="next",U.arg=n);else return se;return U.delegate=null,g}_(P),c(P,l,"Generator"),c(P,a,function(){return this}),c(P,"toString",function(){return"[object Generator]"});function H(G){var U={tryLoc:G[0]};1 in G&&(U.catchLoc=G[1]),2 in G&&(U.finallyLoc=G[2],U.afterLoc=G[3]),this.tryEntries.push(U)}function he(G){var U=G.completion||{};U.type="normal",delete U.arg,G.completion=U}function C(G){this.tryEntries=[{tryLoc:"root"}],G.forEach(H,this),this.reset(!0)}t.keys=function(G){var U=Object(G),j=[];for(var ee in U)j.push(ee);return j.reverse(),function ae(){for(;j.length;){var se=j.pop();if(se in U)return ae.value=se,ae.done=!1,ae}return ae.done=!0,ae}};function N(G){if(G){var U=G[a];if(U)return U.call(G);if(typeof G.next=="function")return G;if(!isNaN(G.length)){var j=-1,ee=function ae(){for(;++j=0;--ee){var ae=this.tryEntries[ee],se=ae.completion;if(ae.tryLoc==="root")return j("end");if(ae.tryLoc<=this.prev){var ue=e.call(ae,"catchLoc"),ve=e.call(ae,"finallyLoc");if(ue&&ve){if(this.prev=0;--j){var ee=this.tryEntries[j];if(ee.tryLoc<=this.prev&&e.call(ee,"finallyLoc")&&this.prev=0;--U){var j=this.tryEntries[U];if(j.finallyLoc===G)return this.complete(j.completion,j.afterLoc),he(j),g}},catch:function(G){for(var U=this.tryEntries.length-1;U>=0;--U){var j=this.tryEntries[U];if(j.tryLoc===G){var ee=j.completion;if(ee.type==="throw"){var ae=ee.arg;he(j)}return ae}}throw new Error("illegal catch attempt")},delegateYield:function(G,U,j){return this.delegate={iterator:N(G),resultName:U,nextLoc:j},this.method==="next"&&(this.arg=n),g}},t}(typeof q6=="object"?q6.exports:{});try{regeneratorRuntime=W6}catch(t){typeof globalThis=="object"?globalThis.regeneratorRuntime=W6:Function("r","regeneratorRuntime = r")(W6)}});var Khe=V((Zhe,bC)=>{(function(t,r){"use strict";typeof define=="function"&&define.amd?define(r):typeof bC=="object"&&bC.exports?bC.exports=r():t.log=r()})(Zhe,function(){"use strict";var t=function(){},r="undefined",e=typeof window!==r&&typeof window.navigator!==r&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"];function n(f,m){var g=f[m];if(typeof g.bind=="function")return g.bind(f);try{return Function.prototype.bind.call(g,f)}catch(y){return function(){return Function.prototype.apply.apply(g,[f,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(f){return f==="debug"&&(f="log"),typeof console===r?!1:f==="trace"&&e?s:console[f]!==void 0?n(console,f):console.log!==void 0?n(console,"log"):t}function o(f,m){for(var g=0;g=0&&_<=y.levels.SILENT){if(E=_,w!==!1&&x(_),o.call(y,_,f),typeof console===r&&_{(function(t,r){typeof pB=="object"&&typeof dB!="undefined"?dB.exports=r():typeof define=="function"&&define.amd?define(r):(t=typeof globalThis!="undefined"?globalThis:t||self,t.polygonClipping=r())})(pB,function(){"use strict";function t(_e,J){if(!(_e instanceof J))throw new TypeError("Cannot call a class as a function")}function r(_e,J){for(var $=0;$J?1:_e0){if(J.right===null)break;if($(_e,J.right.key)>0){var xe=J.right;if(J.right=xe.left,xe.left=J,J=xe,J.right===null)break}me.right=J,me=J,J=J.right}else break}return me.right=J.left,z.left=J.right,J.left=re.right,J.right=re.left,J}function a(_e,J,$,re){var me=new i(_e,J);if($===null)return me.left=me.right=null,me;$=s(_e,$,re);var z=re(_e,$.key);return z<0?(me.left=$.left,me.right=$,$.left=null):z>=0&&(me.right=$.right,me.left=$,$.right=null),me}function o(_e,J,$){var re=null,me=null;if(J){J=s(_e,J,$);var z=$(J.key,_e);z===0?(re=J.left,me=J.right):z<0?(me=J.right,J.right=null,re=J):(re=J.left,J.left=null,me=J)}return{left:re,right:me}}function l(_e,J,$){return J===null?_e:(_e===null||(J=s(_e.key,J,$),J.left=_e),J)}function c(_e,J,$,re,me){if(_e){re(""+J+($?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+me(_e)+` -`);var z=J+($?" ":"\u2502 ");_e.left&&c(_e.left,z,!1,re,me),_e.right&&c(_e.right,z,!0,re,me)}}var u=function(){function _e(J){J===void 0&&(J=n),this._root=null,this._size=0,this._comparator=J}return _e.prototype.insert=function(J,$){return this._size++,this._root=a(J,$,this._root,this._comparator)},_e.prototype.add=function(J,$){var re=new i(J,$);this._root===null&&(re.left=re.right=null,this._size++,this._root=re);var me=this._comparator,z=s(J,this._root,me),Y=me(J,z.key);return Y===0?this._root=z:(Y<0?(re.left=z.left,re.right=z,z.left=null):Y>0&&(re.right=z.right,re.left=z,z.right=null),this._size++,this._root=re),this._root},_e.prototype.remove=function(J){this._root=this._remove(J,this._root,this._comparator)},_e.prototype._remove=function(J,$,re){var me;if($===null)return null;$=s(J,$,re);var z=re(J,$.key);return z===0?($.left===null?me=$.right:(me=s(J,$.left,re),me.right=$.right),this._size--,me):$},_e.prototype.pop=function(){var J=this._root;if(J){for(;J.left;)J=J.left;return this._root=s(J.key,this._root,this._comparator),this._root=this._remove(J.key,this._root,this._comparator),{key:J.key,data:J.data}}return null},_e.prototype.findStatic=function(J){for(var $=this._root,re=this._comparator;$;){var me=re(J,$.key);if(me===0)return $;me<0?$=$.left:$=$.right}return null},_e.prototype.find=function(J){return this._root&&(this._root=s(J,this._root,this._comparator),this._comparator(J,this._root.key)!==0)?null:this._root},_e.prototype.contains=function(J){for(var $=this._root,re=this._comparator;$;){var me=re(J,$.key);if(me===0)return!0;me<0?$=$.left:$=$.right}return!1},_e.prototype.forEach=function(J,$){for(var re=this._root,me=[],z=!1;!z;)re!==null?(me.push(re),re=re.left):me.length!==0?(re=me.pop(),J.call($,re),re=re.right):z=!0;return this},_e.prototype.range=function(J,$,re,me){for(var z=[],Y=this._comparator,xe=this._root,Ce;z.length!==0||xe;)if(xe)z.push(xe),xe=xe.left;else{if(xe=z.pop(),Ce=Y(xe.key,$),Ce>0)break;if(Y(xe.key,J)>=0&&re.call(me,xe))return this;xe=xe.right}return this},_e.prototype.keys=function(){var J=[];return this.forEach(function($){var re=$.key;return J.push(re)}),J},_e.prototype.values=function(){var J=[];return this.forEach(function($){var re=$.data;return J.push(re)}),J},_e.prototype.min=function(){return this._root?this.minNode(this._root).key:null},_e.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},_e.prototype.minNode=function(J){if(J===void 0&&(J=this._root),J)for(;J.left;)J=J.left;return J},_e.prototype.maxNode=function(J){if(J===void 0&&(J=this._root),J)for(;J.right;)J=J.right;return J},_e.prototype.at=function(J){for(var $=this._root,re=!1,me=0,z=[];!re;)if($)z.push($),$=$.left;else if(z.length>0){if($=z.pop(),me===J)return $;me++,$=$.right}else re=!0;return null},_e.prototype.next=function(J){var $=this._root,re=null;if(J.right){for(re=J.right;re.left;)re=re.left;return re}for(var me=this._comparator;$;){var z=me(J.key,$.key);if(z===0)break;z<0?(re=$,$=$.left):$=$.right}return re},_e.prototype.prev=function(J){var $=this._root,re=null;if(J.left!==null){for(re=J.left;re.right;)re=re.right;return re}for(var me=this._comparator;$;){var z=me(J.key,$.key);if(z===0)break;z<0?$=$.left:(re=$,$=$.right)}return re},_e.prototype.clear=function(){return this._root=null,this._size=0,this},_e.prototype.toList=function(){return d(this._root)},_e.prototype.load=function(J,$,re){$===void 0&&($=[]),re===void 0&&(re=!1);var me=J.length,z=this._comparator;if(re&&g(J,$,0,me-1,z),this._root===null)this._root=h(J,$,0,me),this._size=me;else{var Y=m(this.toList(),p(J,$),z);me=this._size+me,this._root=f({head:Y},0,me)}return this},_e.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(_e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(_e.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),_e.prototype.toString=function(J){J===void 0&&(J=function(me){return String(me.key)});var $=[];return c(this._root,"",!0,function(re){return $.push(re)},J),$.join("")},_e.prototype.update=function(J,$,re){var me=this._comparator,z=o(J,this._root,me),Y=z.left,xe=z.right;me(J,$)<0?xe=a($,re,xe,me):Y=a($,re,Y,me),this._root=l(Y,xe,me)},_e.prototype.split=function(J){return o(J,this._root,this._comparator)},_e}();function h(_e,J,$,re){var me=re-$;if(me>0){var z=$+Math.floor(me/2),Y=_e[z],xe=J[z],Ce=new i(Y,xe);return Ce.left=h(_e,J,$,z),Ce.right=h(_e,J,z+1,re),Ce}return null}function p(_e,J){for(var $=new i(null,null),re=$,me=0;me<_e.length;me++)re=re.next=new i(_e[me],J[me]);return re.next=null,$.next}function d(_e){for(var J=_e,$=[],re=!1,me=new i(null,null),z=me;!re;)J?($.push(J),J=J.left):$.length>0?(J=z=z.next=$.pop(),J=J.right):re=!0;return z.next=null,me.next}function f(_e,J,$){var re=$-J;if(re>0){var me=J+Math.floor(re/2),z=f(_e,J,me),Y=_e.head;return Y.left=z,_e.head=_e.head.next,Y.right=f(_e,me+1,$),Y}return null}function m(_e,J,$){for(var re=new i(null,null),me=re,z=_e,Y=J;z!==null&&Y!==null;)$(z.key,Y.key)<0?(me.next=z,z=z.next):(me.next=Y,Y=Y.next),me=me.next;return z!==null?me.next=z:Y!==null&&(me.next=Y),re.next}function g(_e,J,$,re,me){if(!($>=re)){for(var z=_e[$+re>>1],Y=$-1,xe=re+1;;){do Y++;while(me(_e[Y],z)<0);do xe--;while(me(_e[xe],z)>0);if(Y>=xe)break;var Ce=_e[Y];_e[Y]=_e[xe],_e[xe]=Ce,Ce=J[Y],J[Y]=J[xe],J[xe]=Ce}g(_e,J,$,xe,me),g(_e,J,xe+1,re,me)}}var y=function(J,$){return J.ll.x<=$.x&&$.x<=J.ur.x&&J.ll.y<=$.y&&$.y<=J.ur.y},E=function(J,$){if($.ur.xre.x?1:$.yre.y?1:0}}]);function _e(J,$){t(this,_e),J.events===void 0?J.events=[this]:J.events.push(this),this.point=J,this.isLeft=$}return e(_e,[{key:"link",value:function($){if($.point===this.point)throw new Error("Tried to link already linked events");for(var re=$.point.events,me=0,z=re.length;me=0&&ye>=0?ZeRe?-1:0:Ge<0&&ye<0?ZeRe?1:0:yeGe?1:0}}}]),_e}(),j=0,ee=function(){e(_e,null,[{key:"compare",value:function($,re){var me=$.leftSE.point.x,z=re.leftSE.point.x,Y=$.rightSE.point.x,xe=re.rightSE.point.x;if(xeCe&&Ge>Ze)return-1;var ye=$.comparePoint(re.leftSE.point);if(ye<0)return 1;if(ye>0)return-1;var Re=re.comparePoint($.rightSE.point);return Re!==0?Re:-1}if(me>z){if(CeGe&&Ce>gt)return 1;var ut=re.comparePoint($.leftSE.point);if(ut!==0)return ut;var vt=$.comparePoint(re.rightSE.point);return vt<0?1:vt>0?-1:1}if(CeGe)return 1;if(Yxe){var Ct=$.comparePoint(re.rightSE.point);if(Ct<0)return 1;if(Ct>0)return-1}if(Y!==xe){var Dt=Ze-Ce,cr=Y-me,Xt=gt-Ge,gr=xe-z;if(Dt>cr&&Xtgr)return-1}return Y>xe?1:Ygt?1:$.idre.id?1:0}}]);function _e(J,$,re,me){t(this,_e),this.id=++j,this.leftSE=J,J.segment=this,J.otherSE=$,this.rightSE=$,$.segment=this,$.otherSE=J,this.rings=re,this.windings=me}return e(_e,[{key:"replaceRightSE",value:function($){this.rightSE=$,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var $=this.leftSE.point.y,re=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:$re?$:re}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function($){return $.x===this.leftSE.point.x&&$.y===this.leftSE.point.y||$.x===this.rightSE.point.x&&$.y===this.rightSE.point.y}},{key:"comparePoint",value:function($){if(this.isAnEndpoint($))return 0;var re=this.leftSE.point,me=this.rightSE.point,z=this.vector();if(re.x===me.x)return $.x===re.x?0:$.x0&&Ce.swapEvents(),U.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),me&&(z.checkForConsuming(),Y.checkForConsuming()),re}},{key:"swapEvents",value:function(){var $=this.rightSE;this.rightSE=this.leftSE,this.leftSE=$,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var re=0,me=this.windings.length;re0){var Y=re;re=me,me=Y}if(re.prev===me){var xe=re;re=me,me=xe}for(var Ce=0,Ge=me.rings.length;Ce0)z=re,Y=$,xe=-1;else throw new Error("Tried to create degenerate segment at [".concat($.x,", ").concat($.y,"]"));var Ge=new U(z,!0),Ze=new U(Y,!1);return new _e(Ge,Ze,[me],[xe])}}]),_e}(),ae=function(){function _e(J,$,re){if(t(this,_e),!Array.isArray(J)||J.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=$,this.isExterior=re,this.segments=[],typeof J[0][0]!="number"||typeof J[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var me=_.round(J[0][0],J[0][1]);this.bbox={ll:{x:me.x,y:me.y},ur:{x:me.x,y:me.y}};for(var z=me,Y=1,xe=J.length;Ythis.bbox.ur.x&&(this.bbox.ur.x=Ce.x),Ce.y>this.bbox.ur.y&&(this.bbox.ur.y=Ce.y),z=Ce)}(me.x!==z.x||me.y!==z.y)&&this.segments.push(ee.fromRing(z,me,this))}return e(_e,[{key:"getSweepEvents",value:function(){for(var $=[],re=0,me=this.segments.length;rethis.bbox.ur.x&&(this.bbox.ur.x=z.bbox.ur.x),z.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=z.bbox.ur.y),this.interiorRings.push(z)}this.multiPoly=$}return e(_e,[{key:"getSweepEvents",value:function(){for(var $=this.exteriorRing.getSweepEvents(),re=0,me=this.interiorRings.length;rethis.bbox.ur.x&&(this.bbox.ur.x=z.bbox.ur.x),z.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=z.bbox.ur.y),this.polys.push(z)}this.isSubject=$}return e(_e,[{key:"getSweepEvents",value:function(){for(var $=[],re=0,me=this.polys.length;re0&&($=z)}for(var Y=$.segment.prevInResult(),xe=Y?Y.prevInResult():null;;){if(!Y)return null;if(!xe)return Y.ringOut;if(xe.ringOut!==Y.ringOut)return xe.ringOut.enclosingRing()!==Y.ringOut?Y.ringOut:Y.ringOut.enclosingRing();Y=xe.prevInResult(),xe=Y?Y.prevInResult():null}}}]),_e}(),be=function(){function _e(J){t(this,_e),this.exteriorRing=J,J.poly=this,this.interiorRings=[]}return e(_e,[{key:"addInterior",value:function($){this.interiorRings.push($),$.poly=this}},{key:"getGeom",value:function(){var $=[this.exteriorRing.getGeom()];if($[0]===null)return null;for(var re=0,me=this.interiorRings.length;re1&&arguments[1]!==void 0?arguments[1]:ee.compare;t(this,_e),this.queue=J,this.tree=new u($),this.segments=[]}return e(_e,[{key:"process",value:function($){var re=$.segment,me=[];if($.consumedBy)return $.isLeft?this.queue.remove($.otherSE):this.tree.remove(re),me;var z=$.isLeft?this.tree.insert(re):this.tree.find(re);if(!z)throw new Error("Unable to find segment #".concat(re.id," ")+"[".concat(re.leftSE.point.x,", ").concat(re.leftSE.point.y,"] -> ")+"[".concat(re.rightSE.point.x,", ").concat(re.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var Y=z,xe=z,Ce=void 0,Ge=void 0;Ce===void 0;)Y=this.tree.prev(Y),Y===null?Ce=null:Y.key.consumedBy===void 0&&(Ce=Y.key);for(;Ge===void 0;)xe=this.tree.next(xe),xe===null?Ge=null:xe.key.consumedBy===void 0&&(Ge=xe.key);if($.isLeft){var Ze=null;if(Ce){var gt=Ce.getIntersection(re);if(gt!==null&&(re.isAnEndpoint(gt)||(Ze=gt),!Ce.isAnEndpoint(gt)))for(var ye=this._splitSafely(Ce,gt),Re=0,ut=ye.length;Re0?(this.tree.remove(re),me.push($)):(this.segments.push(re),re.prev=Ce)}else{if(Ce&&Ge){var _t=Ce.getIntersection(Ge);if(_t!==null){if(!Ce.isAnEndpoint(_t))for(var Vt=this._splitSafely(Ce,_t),Rr=0,Ki=Vt.length;RrFe)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var gr=new we(vt),Ae=vt.size,Xe=vt.pop();Xe;){var lt=Xe.key;if(vt.size===Ae){var _t=lt.segment;throw new Error("Unable to pop() ".concat(lt.isLeft?"left":"right"," SweepEvent ")+"[".concat(lt.point.x,", ").concat(lt.point.y,"] from segment #").concat(_t.id," ")+"[".concat(_t.leftSE.point.x,", ").concat(_t.leftSE.point.y,"] -> ")+"[".concat(_t.rightSE.point.x,", ").concat(_t.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(vt.size>Fe)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(gr.segments.length>je)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var Vt=gr.process(lt),Rr=0,Ki=Vt.length;Rr1?$-1:0),me=1;me<$;me++)re[me-1]=arguments[me];return dt.run("union",J,re)},ke=function(J){for(var $=arguments.length,re=new Array($>1?$-1:0),me=1;me<$;me++)re[me-1]=arguments[me];return dt.run("intersection",J,re)},nt=function(J){for(var $=arguments.length,re=new Array($>1?$-1:0),me=1;me<$;me++)re[me-1]=arguments[me];return dt.run("xor",J,re)},bt=function(J){for(var $=arguments.length,re=new Array($>1?$-1:0),me=1;me<$;me++)re[me-1]=arguments[me];return dt.run("difference",J,re)},mt={union:Be,intersection:ke,xor:nt,difference:bt};return mt})});var AC=V((Oqt,bpe)=>{"use strict";bpe.exports=jvt;var Epe=+(Math.pow(2,27)+1);function jvt(t,r,e){var i=t*r,n=Epe*t,s=n-t,a=n-s,o=t-a,l=Epe*r,c=l-r,u=l-c,h=r-u,p=i-a*u,d=p-o*u,f=d-a*h,m=o*h-f;return e?(e[0]=m,e[1]=i,e):[m,i]}});var xB=V((Pqt,xpe)=>{"use strict";xpe.exports=qvt;function Wvt(t,r){var e=t+r,i=e-t,n=e-i,s=r-i,a=t-n,o=a+s;return o?[o,e]:[e]}function qvt(t,r){var e=t.length|0,i=r.length|0;if(e===1&&i===1)return Wvt(t[0],r[0]);var n=e+i,s=new Array(n),a=0,o=0,l=0,c=Math.abs,u=t[o],h=c(u),p=r[l],d=c(p),f,m;h=i?(f=u,o+=1,o{"use strict";Ipe.exports=Yvt;function Yvt(t,r,e){var i=t+r,n=i-t,s=i-n,a=r-n,o=t-s;return e?(e[0]=o+a,e[1]=i,e):[o+a,i]}});var SB=V((Lqt,_pe)=>{"use strict";var IB=AC(),Xvt=Spe();_pe.exports=$vt;function $vt(t,r){var e=t.length;if(e===1){var i=IB(t[0],r);return i[0]?i:[i[1]]}var n=new Array(2*e),s=[.1,.1],a=[.1,.1],o=0;IB(t[0],r,s),s[0]&&(n[o++]=s[0]);for(var l=1;l{"use strict";wpe.exports=Zvt;function Zvt(t){for(var r=t.length,e=t[t.length-1],i=r,n=r-2;n>=0;--n){var s=e,a=t[n];e=s+a;var o=e-s,l=a-o;l&&(t[--i]=e,e=l)}for(var c=0,n=i;n{"use strict";Mpe.exports=Jvt;function Kvt(t,r){var e=t+r,i=e-t,n=e-i,s=r-i,a=t-n,o=a+s;return o?[o,e]:[e]}function Jvt(t,r){var e=t.length|0,i=r.length|0;if(e===1&&i===1)return Kvt(t[0],-r[0]);var n=e+i,s=new Array(n),a=0,o=0,l=0,c=Math.abs,u=t[o],h=c(u),p=-r[l],d=c(p),f,m;h=i?(f=u,o+=1,o{"use strict";var Qvt=AC(),eyt=xB(),tyt=SB(),ryt=Dpe(),Cpe=5,OC=11102230246251565e-32,iyt=(3+16*OC)*OC,nyt=(7+56*OC)*OC;function syt(t,r,e,i){return function(s,a,o){var l=t(t(r(a[1],o[0]),r(-o[1],a[0])),t(r(s[1],a[0]),r(-a[1],s[0]))),c=t(r(s[1],o[0]),r(-o[1],s[0])),u=i(l,c);return u[u.length-1]}}function ayt(t,r,e,i){return function(s,a,o,l){var c=t(t(e(t(r(o[1],l[0]),r(-l[1],o[0])),a[2]),t(e(t(r(a[1],l[0]),r(-l[1],a[0])),-o[2]),e(t(r(a[1],o[0]),r(-o[1],a[0])),l[2]))),t(e(t(r(a[1],l[0]),r(-l[1],a[0])),s[2]),t(e(t(r(s[1],l[0]),r(-l[1],s[0])),-a[2]),e(t(r(s[1],a[0]),r(-a[1],s[0])),l[2])))),u=t(t(e(t(r(o[1],l[0]),r(-l[1],o[0])),s[2]),t(e(t(r(s[1],l[0]),r(-l[1],s[0])),-o[2]),e(t(r(s[1],o[0]),r(-o[1],s[0])),l[2]))),t(e(t(r(a[1],o[0]),r(-o[1],a[0])),s[2]),t(e(t(r(s[1],o[0]),r(-o[1],s[0])),-a[2]),e(t(r(s[1],a[0]),r(-a[1],s[0])),o[2])))),h=i(c,u);return h[h.length-1]}}function oyt(t,r,e,i){return function(s,a,o,l,c){var u=t(t(t(e(t(e(t(r(l[1],c[0]),r(-c[1],l[0])),o[2]),t(e(t(r(o[1],c[0]),r(-c[1],o[0])),-l[2]),e(t(r(o[1],l[0]),r(-l[1],o[0])),c[2]))),a[3]),t(e(t(e(t(r(l[1],c[0]),r(-c[1],l[0])),a[2]),t(e(t(r(a[1],c[0]),r(-c[1],a[0])),-l[2]),e(t(r(a[1],l[0]),r(-l[1],a[0])),c[2]))),-o[3]),e(t(e(t(r(o[1],c[0]),r(-c[1],o[0])),a[2]),t(e(t(r(a[1],c[0]),r(-c[1],a[0])),-o[2]),e(t(r(a[1],o[0]),r(-o[1],a[0])),c[2]))),l[3]))),t(e(t(e(t(r(o[1],l[0]),r(-l[1],o[0])),a[2]),t(e(t(r(a[1],l[0]),r(-l[1],a[0])),-o[2]),e(t(r(a[1],o[0]),r(-o[1],a[0])),l[2]))),-c[3]),t(e(t(e(t(r(l[1],c[0]),r(-c[1],l[0])),a[2]),t(e(t(r(a[1],c[0]),r(-c[1],a[0])),-l[2]),e(t(r(a[1],l[0]),r(-l[1],a[0])),c[2]))),s[3]),e(t(e(t(r(l[1],c[0]),r(-c[1],l[0])),s[2]),t(e(t(r(s[1],c[0]),r(-c[1],s[0])),-l[2]),e(t(r(s[1],l[0]),r(-l[1],s[0])),c[2]))),-a[3])))),t(t(e(t(e(t(r(a[1],c[0]),r(-c[1],a[0])),s[2]),t(e(t(r(s[1],c[0]),r(-c[1],s[0])),-a[2]),e(t(r(s[1],a[0]),r(-a[1],s[0])),c[2]))),l[3]),t(e(t(e(t(r(a[1],l[0]),r(-l[1],a[0])),s[2]),t(e(t(r(s[1],l[0]),r(-l[1],s[0])),-a[2]),e(t(r(s[1],a[0]),r(-a[1],s[0])),l[2]))),-c[3]),e(t(e(t(r(o[1],l[0]),r(-l[1],o[0])),a[2]),t(e(t(r(a[1],l[0]),r(-l[1],a[0])),-o[2]),e(t(r(a[1],o[0]),r(-o[1],a[0])),l[2]))),s[3]))),t(e(t(e(t(r(o[1],l[0]),r(-l[1],o[0])),s[2]),t(e(t(r(s[1],l[0]),r(-l[1],s[0])),-o[2]),e(t(r(s[1],o[0]),r(-o[1],s[0])),l[2]))),-a[3]),t(e(t(e(t(r(a[1],l[0]),r(-l[1],a[0])),s[2]),t(e(t(r(s[1],l[0]),r(-l[1],s[0])),-a[2]),e(t(r(s[1],a[0]),r(-a[1],s[0])),l[2]))),o[3]),e(t(e(t(r(a[1],o[0]),r(-o[1],a[0])),s[2]),t(e(t(r(s[1],o[0]),r(-o[1],s[0])),-a[2]),e(t(r(s[1],a[0]),r(-a[1],s[0])),o[2]))),-l[3]))))),h=t(t(t(e(t(e(t(r(l[1],c[0]),r(-c[1],l[0])),o[2]),t(e(t(r(o[1],c[0]),r(-c[1],o[0])),-l[2]),e(t(r(o[1],l[0]),r(-l[1],o[0])),c[2]))),s[3]),e(t(e(t(r(l[1],c[0]),r(-c[1],l[0])),s[2]),t(e(t(r(s[1],c[0]),r(-c[1],s[0])),-l[2]),e(t(r(s[1],l[0]),r(-l[1],s[0])),c[2]))),-o[3])),t(e(t(e(t(r(o[1],c[0]),r(-c[1],o[0])),s[2]),t(e(t(r(s[1],c[0]),r(-c[1],s[0])),-o[2]),e(t(r(s[1],o[0]),r(-o[1],s[0])),c[2]))),l[3]),e(t(e(t(r(o[1],l[0]),r(-l[1],o[0])),s[2]),t(e(t(r(s[1],l[0]),r(-l[1],s[0])),-o[2]),e(t(r(s[1],o[0]),r(-o[1],s[0])),l[2]))),-c[3]))),t(t(e(t(e(t(r(o[1],c[0]),r(-c[1],o[0])),a[2]),t(e(t(r(a[1],c[0]),r(-c[1],a[0])),-o[2]),e(t(r(a[1],o[0]),r(-o[1],a[0])),c[2]))),s[3]),e(t(e(t(r(o[1],c[0]),r(-c[1],o[0])),s[2]),t(e(t(r(s[1],c[0]),r(-c[1],s[0])),-o[2]),e(t(r(s[1],o[0]),r(-o[1],s[0])),c[2]))),-a[3])),t(e(t(e(t(r(a[1],c[0]),r(-c[1],a[0])),s[2]),t(e(t(r(s[1],c[0]),r(-c[1],s[0])),-a[2]),e(t(r(s[1],a[0]),r(-a[1],s[0])),c[2]))),o[3]),e(t(e(t(r(a[1],o[0]),r(-o[1],a[0])),s[2]),t(e(t(r(s[1],o[0]),r(-o[1],s[0])),-a[2]),e(t(r(s[1],a[0]),r(-a[1],s[0])),o[2]))),-c[3])))),p=i(u,h);return p[p.length-1]}}function PC(t){var r=t===3?syt:t===4?ayt:oyt;return r(eyt,Qvt,tyt,ryt)}var lyt=PC(3),cyt=PC(4),Wg=[function(){return 0},function(){return 0},function(r,e){return e[0]-r[0]},function(r,e,i){var n=(r[1]-i[1])*(e[0]-i[0]),s=(r[0]-i[0])*(e[1]-i[1]),a=n-s,o;if(n>0){if(s<=0)return a;o=n+s}else if(n<0){if(s>=0)return a;o=-(n+s)}else return a;var l=iyt*o;return a>=l||a<=-l?a:lyt(r,e,i)},function(r,e,i,n){var s=r[0]-n[0],a=e[0]-n[0],o=i[0]-n[0],l=r[1]-n[1],c=e[1]-n[1],u=i[1]-n[1],h=r[2]-n[2],p=e[2]-n[2],d=i[2]-n[2],f=a*u,m=o*c,g=o*l,y=s*u,E=s*c,b=a*l,x=h*(f-m)+p*(g-y)+d*(E-b),S=(Math.abs(f)+Math.abs(m))*Math.abs(h)+(Math.abs(g)+Math.abs(y))*Math.abs(p)+(Math.abs(E)+Math.abs(b))*Math.abs(d),D=nyt*S;return x>D||-x>D?x:cyt(r,e,i,n)}];function uyt(t){var r=Wg[t.length];return r||(r=Wg[t.length]=PC(t.length)),r.apply(void 0,t)}function hyt(t,r,e,i,n,s,a){return function(l,c,u,h,p){switch(arguments.length){case 0:case 1:return 0;case 2:return i(l,c);case 3:return n(l,c,u);case 4:return s(l,c,u,h);case 5:return a(l,c,u,h,p)}for(var d=new Array(arguments.length),f=0;f{"use strict";Ope.exports=fyt;var NC=Ape()[3];function dyt(t,r,e,i){for(var n=0;n<2;++n){var s=t[n],a=r[n],o=Math.min(s,a),l=Math.max(s,a),c=e[n],u=i[n],h=Math.min(c,u),p=Math.max(c,u);if(p0&&s>0||n<0&&s<0)return!1;var a=NC(e,t,r),o=NC(i,t,r);return a>0&&o>0||a<0&&o<0?!1:n===0&&s===0&&a===0&&o===0?dyt(t,r,e,i):!0}});var Lpe=V((kqt,Npe)=>{"use strict";Npe.exports=gyt;var LC=AC(),Yo=xB(),Hl=SB(),wB=Rpe(),myt=Ppe();function gyt(t,r,e,i){if(!myt(t,r,e,i))return[[0],[0],[0]];var n=Yo([e[1]],[-i[1]]),s=Yo([-e[0]],[i[0]]),a=Yo(Yo(Hl(s,t[1]),Hl(s,-r[1])),Yo(Hl(n,t[0]),Hl(n,-r[0]))),o=Yo(LC(-t[0],r[1]),LC(t[1],r[0])),l=Yo(LC(-e[0],i[1]),LC(e[1],i[0])),c=Yo(Yo(Hl(l,t[0]),Hl(l,-r[0])),Yo(Hl(o,-e[0]),Hl(o,i[0]))),u=Yo(Yo(Hl(l,t[1]),Hl(l,-r[1])),Yo(Hl(o,-e[1]),Hl(o,i[1])));return[wB(c),wB(u),wB(a)]}});var Hpe=V((Gqt,Fpe)=>{Fpe.exports=vyt;function vyt(t){var r=0,e=t.length;switch(e){case 1:r=t[0];break;case 2:r=t[0]+t[1];break;case 3:r=t[0]+t[1]+t[2];break;case 4:r=t[0]+t[1]+t[2]+t[3];break;default:for(var i=0;i{var yyt=Lpe(),RB=Hpe();Upe.exports=Tyt;function Rf(t,r){return t[0]===r[0]&&t[1]===r[1]}var Lx=[0,0],Fx=[0,0],Hx=[0,0],Ux=[0,0];function FC(t,r){Array.isArray(t)?(r[0]=t[0],r[1]=t[1]):(r[0]=t.x,r[1]=t.y)}function Tyt(t,r){for(var e={},i=t.length,n=[],s=0;s{(function(){"use strict";function t(a,o){var l=a.x-o.x,c=a.y-o.y;return l*l+c*c}function r(a,o,l){var c=o.x,u=o.y,h=l.x-c,p=l.y-u;if(h!==0||p!==0){var d=((a.x-c)*h+(a.y-u)*p)/(h*h+p*p);d>1?(c=l.x,u=l.y):d>0&&(c+=h*d,u+=p*d)}return h=a.x-c,p=a.y-u,h*h+p*p}function e(a,o){for(var l=a[0],c=[l],u,h=1,p=a.length;ho&&(c.push(u),l=u);return l!==u&&c.push(u),c}function i(a,o,l,c,u){for(var h=c,p,d=o+1;dh&&(p=d,h=f)}h>c&&(p-o>1&&i(a,o,p,c,u),u.push(a[p]),l-p>1&&i(a,p,l,c,u))}function n(a,o){var l=a.length-1,c=[a[0]];return i(a,0,l,o,c),c.push(a[l]),c}function s(a,o,l){if(a.length<=2)return a;var c=o!==void 0?o*o:1;return a=l?a:e(a,c),a=n(a,c),a}typeof define=="function"&&define.amd?define(function(){return s}):typeof kC!="undefined"?(kC.exports=s,kC.exports.default=s):typeof self!="undefined"?self.simplify=s:window.simplify=s})()});var ede=V((jB,WB)=>{(function(t,r){typeof jB=="object"&&typeof WB!="undefined"?WB.exports=r():typeof define=="function"&&define.amd?define(r):(t=t||self,t.JSBI=r())})(jB,function(){"use strict";var t=Math.imul,r=Math.clz32;function e(_){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},e(_)}function i(_,w){if(!(_ instanceof w))throw new TypeError("Cannot call a class as a function")}function n(_,w){for(var F,X=0;X_.length)&&(w=_.length);for(var F=0,X=Array(w);F=_.length?{done:!0}:{done:!1,value:_[X++]}},e:function(k){throw k},f:H}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var he,C=!0,N=!1;return{s:function(){F=F.call(_)},n:function(){var k=F.next();return C=k.done,k},e:function(k){N=!0,he=k},f:function(){try{C||F.return==null||F.return()}finally{if(N)throw he}}}}var P=function(_){var w=Math.abs,F=Math.max,X=Math.floor;function H(C,N){var k;if(i(this,H),k=he.call(this,C),k.sign=N,Object.setPrototypeOf(d(k),H.prototype),C>H.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return k}a(H,_);var he=m(H);return s(H,[{key:"toDebugString",value:function(){var C,N=["BigInt["],k=D(this);try{for(k.s();!(C=k.n()).done;){var G=C.value;N.push((G&&(G>>>0).toString(16))+", ")}}catch(U){k.e(U)}finally{k.f()}return N.push("]"),N.join("")}},{key:"toString",value:function(){var C=0C||36this.length&&(k=this.length);for(var G=32767&C,U=C>>>15,j=0,ee=N,ae=0;ae>>15,be=H.__imul(ue,G),de=H.__imul(ue,U),we=H.__imul(ve,G),Fe=H.__imul(ve,U),je=ee+be+j;j=je>>>30,je&=1073741823,je+=((32767&de)<<15)+((32767&we)<<15),j+=je>>>30,ee=Fe+(de>>>15)+(we>>>15),this.__setDigit(ae,1073741823&je)}if(j!==0||ee!==0)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(C,N,k){for(var G,U=0,j=0;j>>15,this.__setHalfDigit(N+j,32767&G);return U}},{key:"__inplaceSub",value:function(C,N,k){var G=0;if(1&N){N>>=1;for(var U=this.__digit(N),j=32767&U,ee=0;ee>>1;ee++){var ae=C.__digit(ee),se=(U>>>15)-(32767&ae)-G;G=1&se>>>15,this.__setDigit(N+ee,(32767&se)<<15|32767&j),U=this.__digit(N+ee+1),j=(32767&U)-(ae>>>15)-G,G=1&j>>>15}var ue=C.__digit(ee),ve=(U>>>15)-(32767&ue)-G;if(G=1&ve>>>15,this.__setDigit(N+ee,(32767&ve)<<15|32767&j),N+ee+1>=this.length)throw new RangeError("out of bounds");!(1&k)&&(U=this.__digit(N+ee+1),j=(32767&U)-(ue>>>15)-G,G=1&j>>>15,this.__setDigit(N+C.length,1073709056&U|32767&j))}else{N>>=1;for(var be=0;be>>15;var je=(de>>>15)-(we>>>15)-G;G=1&je>>>15,this.__setDigit(N+be,(32767&je)<<15|32767&Fe)}var Oe=this.__digit(N+be),dt=C.__digit(be),Be=(32767&Oe)-(32767&dt)-G;G=1&Be>>>15;var ke=0;!(1&k)&&(ke=(Oe>>>15)-(dt>>>15)-G,G=1&ke>>>15),this.__setDigit(N+be,(32767&ke)<<15|32767&Be)}return G}},{key:"__inplaceRightShift",value:function(C){if(C!==0){for(var N,k=this.__digit(0)>>>C,G=this.length-1,U=0;U>>C;this.__setDigit(G,k)}}},{key:"__digit",value:function(C){return this[C]}},{key:"__unsignedDigit",value:function(C){return this[C]>>>0}},{key:"__setDigit",value:function(C,N){this[C]=0|N}},{key:"__setDigitGrow",value:function(C,N){this[C]=0|N}},{key:"__halfDigitLength",value:function(){var C=this.length;return 32767>=this.__unsignedDigit(C-1)?2*C-1:2*C}},{key:"__halfDigit",value:function(C){return 32767&this[C>>>1]>>>15*(1&C)}},{key:"__setHalfDigit",value:function(C,N){var k=C>>>1,G=this.__digit(k),U=1&C?32767&G|N<<15:1073709056&G|32767&N;this.__setDigit(k,U)}}],[{key:"BigInt",value:function(C){var N=Number.isFinite;if(typeof C=="number"){if(C===0)return H.__zero();if(H.__isOneDigitInt(C))return 0>C?H.__oneDigit(-C,!0):H.__oneDigit(C,!1);if(!N(C)||X(C)!==C)throw new RangeError("The number "+C+" cannot be converted to BigInt because it is not an integer");return H.__fromDouble(C)}if(typeof C=="string"){var k=H.__fromString(C);if(k===null)throw new SyntaxError("Cannot convert "+C+" to a BigInt");return k}if(typeof C=="boolean")return C===!0?H.__oneDigit(1,!1):H.__zero();if(e(C)==="object"){if(C.constructor===H)return C;var G=H.__toPrimitive(C);return H.BigInt(G)}throw new TypeError("Cannot convert "+C+" to a BigInt")}},{key:"toNumber",value:function(C){var N=C.length;if(N===0)return 0;if(N===1){var k=C.__unsignedDigit(0);return C.sign?-k:k}var G=C.__digit(N-1),U=H.__clz30(G),j=30*N-U;if(1024>>=12;var be=ue-12,de=12<=ue?0:ae<<20+ue,we=20+ue;for(0>>30-be,de=ae<>>30-we,we-=30;var Fe=H.__decideRounding(C,we,se,ae);if((Fe===1||Fe===0&&(1&de)==1)&&(de=de+1>>>0,de===0&&(ve++,ve>>>20!=0&&(ve=0,ee++,1023=H.__kMaxLengthBits)throw new RangeError("BigInt too big");if(C.length===1&&C.__digit(0)===2){var G=1+(0|k/30),U=C.sign&&(1&k)!=0,j=new H(G,U);j.__initializeDigits();var ee=1<>=1;k!==0;k>>=1)se=H.multiply(se,se),1&k&&(ae===null?ae=se:ae=H.multiply(ae,se));return ae}},{key:"multiply",value:function(C,N){if(C.length===0)return C;if(N.length===0)return N;var k=C.length+N.length;30<=C.__clzmsd()+N.__clzmsd()&&k--;var G=new H(k,C.sign!==N.sign);G.__initializeDigits();for(var U=0;UH.__absoluteCompare(C,N))return H.__zero();var k,G=C.sign!==N.sign,U=N.__unsignedDigit(0);if(N.length===1&&32767>=U){if(U===1)return G===C.sign?C:H.unaryMinus(C);k=H.__absoluteDivSmall(C,U,null)}else k=H.__absoluteDivLarge(C,N,!0,!1);return k.sign=G,k.__trim()}},{key:"remainder",value:function(N,k){if(k.length===0)throw new RangeError("Division by zero");if(0>H.__absoluteCompare(N,k))return N;var G=k.__unsignedDigit(0);if(k.length===1&&32767>=G){if(G===1)return H.__zero();var U=H.__absoluteModSmall(N,G);return U===0?H.__zero():H.__oneDigit(U,N.sign)}var j=H.__absoluteDivLarge(N,k,!1,!0);return j.sign=N.sign,j.__trim()}},{key:"add",value:function(C,N){var k=C.sign;return k===N.sign?H.__absoluteAdd(C,N,k):0<=H.__absoluteCompare(C,N)?H.__absoluteSub(C,N,k):H.__absoluteSub(N,C,!k)}},{key:"subtract",value:function(C,N){var k=C.sign;return k===N.sign?0<=H.__absoluteCompare(C,N)?H.__absoluteSub(C,N,k):H.__absoluteSub(N,C,!k):H.__absoluteAdd(C,N,k)}},{key:"leftShift",value:function(C,N){return N.length===0||C.length===0?C:N.sign?H.__rightShiftByAbsolute(C,N):H.__leftShiftByAbsolute(C,N)}},{key:"signedRightShift",value:function(C,N){return N.length===0||C.length===0?C:N.sign?H.__leftShiftByAbsolute(C,N):H.__rightShiftByAbsolute(C,N)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(C,N){return 0>H.__compareToBigInt(C,N)}},{key:"lessThanOrEqual",value:function(C,N){return 0>=H.__compareToBigInt(C,N)}},{key:"greaterThan",value:function(C,N){return 0C)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(C===0)return H.__zero();if(C>=H.__kMaxLengthBits)return N;var k=0|(C+29)/30;if(N.lengthC)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(C===0)return H.__zero();if(N.sign){if(C>H.__kMaxLengthBits)throw new RangeError("BigInt too big");return H.__truncateAndSubFromPowerOfTwo(C,N,!1)}if(C>=H.__kMaxLengthBits)return N;var k=0|(C+29)/30;if(N.length>>G))return N}return H.__truncateToNBits(C,N)}},{key:"ADD",value:function(C,N){if(C=H.__toPrimitive(C),N=H.__toPrimitive(N),typeof C=="string")return typeof N!="string"&&(N=N.toString()),C+N;if(typeof N=="string")return C.toString()+N;if(C=H.__toNumeric(C),N=H.__toNumeric(N),H.__isBigInt(C)&&H.__isBigInt(N))return H.add(C,N);if(typeof C=="number"&&typeof N=="number")return C+N;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(C,N){return H.__compare(C,N,0)}},{key:"LE",value:function(C,N){return H.__compare(C,N,1)}},{key:"GT",value:function(C,N){return H.__compare(C,N,2)}},{key:"GE",value:function(C,N){return H.__compare(C,N,3)}},{key:"EQ",value:function(C,N){for(;;){if(H.__isBigInt(C))return H.__isBigInt(N)?H.equal(C,N):H.EQ(N,C);if(typeof C=="number"){if(H.__isBigInt(N))return H.__equalToNumber(N,C);if(e(N)!=="object")return C==N;N=H.__toPrimitive(N)}else if(typeof C=="string"){if(H.__isBigInt(N))return C=H.__fromString(C),C!==null&&H.equal(C,N);if(e(N)!=="object")return C==N;N=H.__toPrimitive(N)}else if(typeof C=="boolean"){if(H.__isBigInt(N))return H.__equalToNumber(N,+C);if(e(N)!=="object")return C==N;N=H.__toPrimitive(N)}else if(e(C)==="symbol"){if(H.__isBigInt(N))return!1;if(e(N)!=="object")return C==N;N=H.__toPrimitive(N)}else if(e(C)==="object"){if(e(N)==="object"&&N.constructor!==H)return C==N;C=H.__toPrimitive(C)}else return C==N}}},{key:"NE",value:function(C,N){return!H.EQ(C,N)}},{key:"DataViewGetBigInt64",value:function(C,N){var k=2>>30),ue.__setDigit(2,ae>>>28),ue.__trim()}},{key:"DataViewSetBigInt64",value:function(C,N,k){var G=3>>2,2N)U=-N-1;else{if(k===0)return-1;k--,G=C.__digit(k),U=29}var j=1<>>20,G=k-1023,U=(0|G/30)+1,j=new H(U,0>C),ee=1048575&H.__kBitConversionInts[1]|1048576,ae=H.__kBitConversionInts[0],se=20,ue=G%30,ve=0;if(ue>>be,ee=ee<<32-be|ae>>>be,ae<<=32-be}else if(ue===se)ve=32,N=ee,ee=ae,ae=0;else{var de=ue-se;ve=32-de,N=ee<>>32-de,ee=ae<>>2,ee=ee<<30|ae>>>2,ae<<=30):N=0,j.__setDigit(we,N);return j.__trim()}},{key:"__isWhitespace",value:function(C){return 13>=C&&9<=C||(159>=C?C==32:131071>=C?C==160||C==5760:196607>=C?(C&=131071,10>=C||C==40||C==41||C==47||C==95||C==4096):C==65279)}},{key:"__fromString",value:function(C){var N=11073741824/ae)return null;var ue=ae*ee+se>>>H.__kBitsPerCharTableShift,ve=new H(0|(ue+29)/30,!1),be=10>N?N:10,de=10>>0>>0>>H.__kBitsPerCharTableShift)/30;ve.__inplaceMultiplyAdd(_e,mt,$)}while(!ke)}else{ae>>=H.__kBitsPerCharTableShift;var we=[],Fe=[],je=!1;do{for(var Oe,dt=0,Be=0;;){if(Oe=void 0,j-48>>>0>>0>>se-j)}if(U!==0){if(G>=C.length)throw new Error("implementation bug");C.__setDigit(G++,U)}for(;G>>1)+(85&G),G=(51&G>>>2)+(51&G),G=(15&G>>>4)+(15&G);var U=G,j=N-1,ee=C.__digit(k-1),ae=H.__clz30(ee),se=0|(30*k-ae+U-1)/U;if(C.sign&&se++,268435456>>Oe,de=30-Oe;de>=U;)ue[ve--]=H.__kConversionChars[be&j],be>>>=U,de-=U}var dt=(be|ee<>>U-de;be!==0;)ue[ve--]=H.__kConversionChars[be&j],be>>>=U;if(C.sign&&(ue[ve--]="-"),ve!==-1)throw new Error("implementation bug");return ue.join("")}},{key:"__toStringGeneric",value:function(C,N,k){var G=C.length;if(G===0)return"";if(G===1){var U=C.__unsignedDigit(0).toString(N);return k===!1&&C.sign&&(U="-"+U),U}var j=30*G-H.__clz30(C.__digit(G-1)),ee=H.__kMaxBitsPerChar[N],ae=ee-1,se=j*H.__kBitsPerCharTableMultiplier;se+=ae-1,se=0|se/ae;var ue,ve,be=se+1>>1,de=H.exponentiate(H.__oneDigit(N,!1),H.__oneDigit(be,!1)),we=de.__unsignedDigit(0);if(de.length===1&&32767>=we){ue=new H(C.length,!1),ue.__initializeDigits();for(var Fe,je=0,Oe=2*C.length-1;0<=Oe;Oe--)Fe=je<<15|C.__halfDigit(Oe),ue.__setHalfDigit(Oe,0|Fe/we),je=0|Fe%we;ve=je.toString(N)}else{var dt=H.__absoluteDivLarge(C,de,!0,!0);ue=dt.quotient;var Be=dt.remainder.__trim();ve=H.__toStringGeneric(Be,N,!0)}ue.__trim();for(var ke=H.__toStringGeneric(ue,N,!0);ve.lengthG?H.__absoluteLess(k):0}},{key:"__compareToNumber",value:function(C,N){if(H.__isOneDigitInt(N)){var k=C.sign,G=0>N;if(k!==G)return H.__unequalSign(k);if(C.length===0){if(G)throw new Error("implementation bug");return N===0?0:-1}if(1U?H.__absoluteGreater(k):jN)return H.__unequalSign(k);if(N===0)throw new Error("implementation bug: should be handled elsewhere");if(C.length===0)return-1;H.__kBitConversionDouble[0]=N;var G=2047&H.__kBitConversionInts[1]>>>20;if(G==2047)throw new Error("implementation bug: handled elsewhere");var U=G-1023;if(0>U)return H.__absoluteGreater(k);var j=C.length,ee=C.__digit(j-1),ae=H.__clz30(ee),se=30*j-ae,ue=U+1;if(seue)return H.__absoluteGreater(k);var ve=1048576|1048575&H.__kBitConversionInts[1],be=H.__kBitConversionInts[0],de=20,we=29-ae;if(we!==(0|(se-1)%30))throw new Error("implementation bug");var Fe,je=0;if(we>>Oe,ve=ve<<32-Oe|be>>>Oe,be<<=32-Oe}else if(we===de)je=32,Fe=ve,ve=be,be=0;else{var dt=we-de;je=32-dt,Fe=ve<>>32-dt,ve=be<>>=0,Fe>>>=0,ee>Fe)return H.__absoluteGreater(k);if(ee>>2,ve=ve<<30|be>>>2,be<<=30):Fe=0;var ke=C.__unsignedDigit(Be);if(ke>Fe)return H.__absoluteGreater(k);if(keN&&C.__unsignedDigit(0)===w(N):H.__compareToDouble(C,N)===0}},{key:"__comparisonResultToBool",value:function(C,N){return N===0?0>C:N===1?0>=C:N===2?0N;case 3:return C>=N}if(H.__isBigInt(C)&&typeof N=="string")return N=H.__fromString(N),N!==null&&H.__comparisonResultToBool(H.__compareToBigInt(C,N),k);if(typeof C=="string"&&H.__isBigInt(N))return C=H.__fromString(C),C!==null&&H.__comparisonResultToBool(H.__compareToBigInt(C,N),k);if(C=H.__toNumeric(C),N=H.__toNumeric(N),H.__isBigInt(C)){if(H.__isBigInt(N))return H.__comparisonResultToBool(H.__compareToBigInt(C,N),k);if(typeof N!="number")throw new Error("implementation bug");return H.__comparisonResultToBool(H.__compareToNumber(C,N),k)}if(typeof C!="number")throw new Error("implementation bug");if(H.__isBigInt(N))return H.__comparisonResultToBool(H.__compareToNumber(N,C),2^k);if(typeof N!="number")throw new Error("implementation bug");return k===0?CN:k===3?C>=N:void 0}},{key:"__absoluteAdd",value:function(C,N,k){if(C.length>>30,j.__setDigit(ae,1073741823&U);for(;ae>>30,j.__setDigit(ae,1073741823&se)}return ae>>30,U.__setDigit(ee,1073741823&G);for(;ee>>30,U.__setDigit(ee,1073741823&ae)}return U.__trim()}},{key:"__absoluteAddOne",value:function(C,N){var k=2>>30,k.__setDigit(ee,1073741823&U);return j!==0&&k.__setDigitGrow(G,1),k}},{key:"__absoluteSubOne",value:function(C,N){var k=C.length;N=N||k;for(var G,U=new H(N,!1),j=1,ee=0;ee>>30,U.__setDigit(ee,1073741823&G);if(j!==0)throw new Error("implementation bug");for(var ae=k;aeG?0:C.__unsignedDigit(G)>N.__unsignedDigit(G)?1:-1}},{key:"__multiplyAccumulate",value:function(C,N,k,G){if(N!==0){for(var U=32767&N,j=N>>>15,ee=0,ae=0,se=0;se>>15,we=H.__imul(be,U),Fe=H.__imul(be,j),je=H.__imul(de,U),Oe=H.__imul(de,j);ue+=ae+we+ee,ee=ue>>>30,ue&=1073741823,ue+=((32767&Fe)<<15)+((32767&je)<<15),ee+=ue>>>30,ae=Oe+(Fe>>>15)+(je>>>15),k.__setDigit(G,1073741823&ue)}for(;ee!==0||ae!==0;G++){var dt=k.__digit(G);dt+=ee+ae,ae=0,ee=dt>>>30,k.__setDigit(G,1073741823&dt)}}}},{key:"__internalMultiplyAdd",value:function(C,N,k,G,U){for(var j=k,ee=0,ae=0;ae>>15,N),be=ue+((32767&ve)<<15)+ee+j;j=be>>>30,ee=ve>>>15,U.__setDigit(ae,1073741823&be)}if(U.length>G)for(U.__setDigit(G++,j+ee);G>>0,ee=0|j/N;G=0|j%N,j=(G<<15|C.__halfDigit(U-1))>>>0;var ae=0|j/N;G=0|j%N,k.__setDigit(U>>>1,ee<<15|ae)}return k}},{key:"__absoluteModSmall",value:function(C,N){for(var k,G=0,U=2*C.length-1;0<=U;U--)k=(G<<15|C.__halfDigit(U))>>>0,G=0|k%N;return G}},{key:"__absoluteDivLarge",value:function(C,N,k,G){var U=N.__halfDigitLength(),j=N.length,ee=C.__halfDigitLength()-U,ae=null;k&&(ae=new H(ee+2>>>1,!1),ae.__initializeDigits());var se=new H(U+2>>>1,!1);se.__initializeDigits();var ue=H.__clz15(N.__halfDigit(U-1));0>>0;Fe=0|Oe/be;for(var dt=0|Oe%be,Be=N.__halfDigit(U-2),ke=ve.__halfDigit(we+U-2);H.__imul(Fe,Be)>>>0>(dt<<16|ke)>>>0&&(Fe--,dt+=be,!(32767>>1,de|Fe))}if(G)return ve.__inplaceRightShift(ue),k?{quotient:ae,remainder:ve}:ve;if(k)return ae;throw new Error("unreachable")}},{key:"__clz15",value:function(C){return H.__clz30(C)-15}},{key:"__specialLeftShift",value:function(C,N,k){var G=C.length,U=new H(G+k,!1);if(N===0){for(var j=0;j>>30-N;return 0k)throw new RangeError("BigInt too big");var G=0|k/30,U=k%30,j=C.length,ee=U!==0&&C.__digit(j-1)>>>30-U!=0,ae=j+G+(ee?1:0),se=new H(ae,C.sign);if(U===0){for(var ue=0;ue>>30-U;if(ee)se.__setDigit(j+G,ve);else if(ve!==0)throw new Error("implementation bug")}return se.__trim()}},{key:"__rightShiftByAbsolute",value:function(C,N){var k=C.length,G=C.sign,U=H.__toShiftAmount(N);if(0>U)return H.__rightShiftByMaximum(G);var j=0|U/30,ee=U%30,ae=k-j;if(0>=ae)return H.__rightShiftByMaximum(G);var se=!1;if(G){if(C.__digit(j)&(1<>>ee,je=k-j-1,Oe=0;Oe>>ee;be.__setDigit(je,Fe)}return se&&(be=H.__absoluteAddOne(be,!0,be)),be.__trim()}},{key:"__rightShiftByMaximum",value:function(C){return C?H.__oneDigit(1,!0):H.__zero()}},{key:"__toShiftAmount",value:function(C){if(1H.__kMaxLengthBits?-1:N}},{key:"__toPrimitive",value:function(C){var N=1>>ae}return G.__setDigit(U,ee),G.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(C,N,k){for(var G=Math.min,U,j=0|(C+29)/30,ee=new H(j,k),ae=0,se=j-1,ue=0,ve=G(se,N.length);ae>>30,ee.__setDigit(ae,1073741823&U);for(;ae>>Fe;var je=1<<32-Fe;be=je-de-ue,be&=je-1}return ee.__setDigit(se,be),ee.__trim()}},{key:"__digitPow",value:function(C,N){for(var k=1;0>>=1,C*=C;return k}},{key:"__isOneDigitInt",value:function(C){return(1073741823&C)===C}}]),H}(p(Array));return P.__kMaxLength=33554432,P.__kMaxLengthBits=P.__kMaxLength<<5,P.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],P.__kBitsPerCharTableShift=5,P.__kBitsPerCharTableMultiplier=1<>>0)/w)},P.__imul=t||function(_,w){return 0|_*w},P})});var rRe=V((n8,s8)=>{(function(t,r){typeof n8=="object"&&typeof s8!="undefined"?s8.exports=r():typeof define=="function"&&define.amd?define(r):(t=t||self).RBush=r()})(n8,function(){"use strict";function t(g,y,E,b,x){(function S(D,P,_,w,F){for(;w>_;){if(w-_>600){var X=w-_+1,H=P-_+1,he=Math.log(X),C=.5*Math.exp(2*he/3),N=.5*Math.sqrt(he*C*(X-C)/X)*(H-X/2<0?-1:1),k=Math.max(_,Math.floor(P-H*C/X+N)),G=Math.min(w,Math.floor(P+(X-H)*C/X+N));S(D,P,k,G,F)}var U=D[P],j=_,ee=w;for(r(D,_,P),F(D[w],U)>0&&r(D,_,w);j0;)ee--}F(D[_],U)===0?r(D,_,ee):r(D,++ee,w),ee<=P&&(_=ee+1),P<=ee&&(w=ee-1)}})(g,y,E||0,b||g.length-1,x||e)}function r(g,y,E){var b=g[y];g[y]=g[E],g[E]=b}function e(g,y){return gy?1:0}var i=function(g){g===void 0&&(g=9),this._maxEntries=Math.max(4,g),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function n(g,y,E){if(!E)return y.indexOf(g);for(var b=0;b=g.minX&&y.maxY>=g.minY}function f(g){return{children:g,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(g,y,E,b,x){for(var S=[y,E];S.length;)if(!((E=S.pop())-(y=S.pop())<=b)){var D=y+Math.ceil((E-y)/b/2)*b;t(g,D,y,E,x),S.push(y,D,D,E)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(g){var y=this.data,E=[];if(!d(g,y))return E;for(var b=this.toBBox,x=[];y;){for(var S=0;S=0&&x[y].children.length>this._maxEntries;)this._split(x,y),y--;this._adjustParentBBoxes(b,x,y)},i.prototype._split=function(g,y){var E=g[y],b=E.children.length,x=this._minEntries;this._chooseSplitAxis(E,x,b);var S=this._chooseSplitIndex(E,x,b),D=f(E.children.splice(S,E.children.length-S));D.height=E.height,D.leaf=E.leaf,s(E,this.toBBox),s(D,this.toBBox),y?g[y-1].children.push(D):this._splitRoot(E,D)},i.prototype._splitRoot=function(g,y){this.data=f([g,y]),this.data.height=g.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(g,y,E){for(var b,x,S,D,P,_,w,F=1/0,X=1/0,H=y;H<=E-y;H++){var he=a(g,0,H,this.toBBox),C=a(g,H,E,this.toBBox),N=(x=he,S=C,D=void 0,P=void 0,_=void 0,w=void 0,D=Math.max(x.minX,S.minX),P=Math.max(x.minY,S.minY),_=Math.min(x.maxX,S.maxX),w=Math.min(x.maxY,S.maxY),Math.max(0,_-D)*Math.max(0,w-P)),k=u(he)+u(C);N=y;F--){var X=g.children[F];o(D,g.leaf?x(X):X),P+=h(D)}return P},i.prototype._adjustParentBBoxes=function(g,y,E){for(var b=E;b>=0;b--)o(y[b],g)},i.prototype._condense=function(g){for(var y=g.length-1,E=void 0;y>=0;y--)g[y].children.length===0?y>0?(E=g[y-1].children).splice(E.indexOf(g[y]),1):this.clear():s(g[y],this.toBBox)},i})});var iRe=V((a8,o8)=>{(function(t,r){typeof a8=="object"&&typeof o8!="undefined"?o8.exports=r():typeof define=="function"&&define.amd?define(r):(t=t||self,t.TinyQueue=r())})(a8,function(){"use strict";var t=function(i,n){if(i===void 0&&(i=[]),n===void 0&&(n=r),this.data=i,this.length=this.data.length,this.compare=n,this.length>0)for(var s=(this.length>>1)-1;s>=0;s--)this._down(s)};t.prototype.push=function(i){this.data.push(i),this.length++,this._up(this.length-1)},t.prototype.pop=function(){if(this.length!==0){var i=this.data[0],n=this.data.pop();return this.length--,this.length>0&&(this.data[0]=n,this._down(0)),i}},t.prototype.peek=function(){return this.data[0]},t.prototype._up=function(i){for(var n=this,s=n.data,a=n.compare,o=s[i];i>0;){var l=i-1>>1,c=s[l];if(a(o,c)>=0)break;s[i]=c,i=l}s[i]=o},t.prototype._down=function(i){for(var n=this,s=n.data,a=n.compare,o=this.length>>1,l=s[i];i=0)break;s[i]=u,i=c}s[i]=l};function r(e,i){return ei?1:0}return t})});var sRe=V((rmr,nRe)=>{nRe.exports=function(r,e,i,n){var s=r[0],a=r[1],o=!1;i===void 0&&(i=0),n===void 0&&(n=e.length);for(var l=(n-i)/2,c=0,u=l-1;ca!=f>a&&s<(d-h)*(a-p)/(f-p)+h;m&&(o=!o)}return o}});var oRe=V((imr,aRe)=>{aRe.exports=function(r,e,i,n){var s=r[0],a=r[1],o=!1;i===void 0&&(i=0),n===void 0&&(n=e.length);for(var l=n-i,c=0,u=l-1;ca!=f>a&&s<(d-h)*(a-p)/(f-p)+h;m&&(o=!o)}return o}});var uRe=V((nmr,LA)=>{var lRe=sRe(),cRe=oRe();LA.exports=function(r,e,i,n){return e.length>0&&Array.isArray(e[0])?cRe(r,e,i,n):lRe(r,e,i,n)};LA.exports.nested=cRe;LA.exports.flat=lRe});var pRe=V((FA,hRe)=>{(function(t,r){typeof FA=="object"&&typeof hRe!="undefined"?r(FA):typeof define=="function"&&define.amd?define(["exports"],r):r((t=t||self).predicates={})})(FA,function(t){"use strict";let e=33306690738754706e-32;function i(d,f,m,g,y){let E,b,x,S,D=f[0],P=g[0],_=0,w=0;P>D==P>-D?(E=D,D=f[++_]):(E=P,P=g[++w]);let F=0;if(_D==P>-D?(x=E-((b=D+E)-D),D=f[++_]):(x=E-((b=P+E)-P),P=g[++w]),E=b,x!==0&&(y[F++]=x);_D==P>-D?(x=E-((b=E+D)-(S=b-E))+(D-S),D=f[++_]):(x=E-((b=E+P)-(S=b-E))+(P-S),P=g[++w]),E=b,x!==0&&(y[F++]=x);for(;_0!=x>0)return S;let D=Math.abs(b+x);return Math.abs(S)>=s*D?S:-function(P,_,w,F,X,H,he){let C,N,k,G,U,j,ee,ae,se,ue,ve,be,de,we,Fe,je,Oe,dt,Be=P-X,ke=w-X,nt=_-H,bt=F-H;U=(Fe=(ae=Be-(ee=(j=134217729*Be)-(j-Be)))*(ue=bt-(se=(j=134217729*bt)-(j-bt)))-((we=Be*bt)-ee*se-ae*se-ee*ue))-(ve=Fe-(Oe=(ae=nt-(ee=(j=134217729*nt)-(j-nt)))*(ue=ke-(se=(j=134217729*ke)-(j-ke)))-((je=nt*ke)-ee*se-ae*se-ee*ue))),l[0]=Fe-(ve+U)+(U-Oe),U=(de=we-((be=we+ve)-(U=be-we))+(ve-U))-(ve=de-je),l[1]=de-(ve+U)+(U-je),U=(dt=be+ve)-be,l[2]=be-(dt-U)+(ve-U),l[3]=dt;let mt=function(me,z){let Y=z[0];for(let xe=1;xe=_e||-mt>=_e||(C=P-(Be+(U=P-Be))+(U-X),k=w-(ke+(U=w-ke))+(U-X),N=_-(nt+(U=_-nt))+(U-H),G=F-(bt+(U=F-bt))+(U-H),C===0&&N===0&&k===0&&G===0)||(_e=o*he+e*Math.abs(mt),(mt+=Be*G+bt*C-(nt*k+ke*N))>=_e||-mt>=_e))return mt;U=(Fe=(ae=C-(ee=(j=134217729*C)-(j-C)))*(ue=bt-(se=(j=134217729*bt)-(j-bt)))-((we=C*bt)-ee*se-ae*se-ee*ue))-(ve=Fe-(Oe=(ae=N-(ee=(j=134217729*N)-(j-N)))*(ue=ke-(se=(j=134217729*ke)-(j-ke)))-((je=N*ke)-ee*se-ae*se-ee*ue))),p[0]=Fe-(ve+U)+(U-Oe),U=(de=we-((be=we+ve)-(U=be-we))+(ve-U))-(ve=de-je),p[1]=de-(ve+U)+(U-je),U=(dt=be+ve)-be,p[2]=be-(dt-U)+(ve-U),p[3]=dt;let J=i(4,l,4,p,c);U=(Fe=(ae=Be-(ee=(j=134217729*Be)-(j-Be)))*(ue=G-(se=(j=134217729*G)-(j-G)))-((we=Be*G)-ee*se-ae*se-ee*ue))-(ve=Fe-(Oe=(ae=nt-(ee=(j=134217729*nt)-(j-nt)))*(ue=k-(se=(j=134217729*k)-(j-k)))-((je=nt*k)-ee*se-ae*se-ee*ue))),p[0]=Fe-(ve+U)+(U-Oe),U=(de=we-((be=we+ve)-(U=be-we))+(ve-U))-(ve=de-je),p[1]=de-(ve+U)+(U-je),U=(dt=be+ve)-be,p[2]=be-(dt-U)+(ve-U),p[3]=dt;let $=i(J,c,4,p,u);U=(Fe=(ae=C-(ee=(j=134217729*C)-(j-C)))*(ue=G-(se=(j=134217729*G)-(j-G)))-((we=C*G)-ee*se-ae*se-ee*ue))-(ve=Fe-(Oe=(ae=N-(ee=(j=134217729*N)-(j-N)))*(ue=k-(se=(j=134217729*k)-(j-k)))-((je=N*k)-ee*se-ae*se-ee*ue))),p[0]=Fe-(ve+U)+(U-Oe),U=(de=we-((be=we+ve)-(U=be-we))+(ve-U))-(ve=de-je),p[1]=de-(ve+U)+(U-je),U=(dt=be+ve)-be,p[2]=be-(dt-U)+(ve-U),p[3]=dt;let re=i($,u,4,p,h);return h[re-1]}(d,f,m,g,y,E,D)},t.orient2dfast=function(d,f,m,g,y,E){return(f-E)*(m-y)-(d-y)*(g-E)},Object.defineProperty(t,"__esModule",{value:!0})})});var yRe=V((smr,h8)=>{"use strict";var dRe=rRe(),UA=iRe(),Y3t=uRe(),X3t=pRe().orient2d;UA.default&&(UA=UA.default);h8.exports=vRe;h8.exports.default=vRe;function vRe(t,r,e){r=Math.max(0,r===void 0?2:r),e=e||0;var i=Q3t(t),n=new dRe(16);n.toBBox=function(E){return{minX:E[0],minY:E[1],maxX:E[0],maxY:E[1]}},n.compareMinX=function(E,b){return E[0]-b[0]},n.compareMinY=function(E,b){return E[1]-b[1]},n.load(t);for(var s=[],a=0,o;as||o.push({node:u,dist:h})}for(;o.length&&!o.peek().node.children;){var p=o.pop(),d=p.node,f=u8(d,r,e),m=u8(d,i,n);if(p.dist=r.minX&&t[0]<=r.maxX&&t[1]>=r.minY&&t[1]<=r.maxY}function mRe(t,r,e){for(var i=Math.min(t[0],r[0]),n=Math.min(t[1],r[1]),s=Math.max(t[0],r[0]),a=Math.max(t[1],r[1]),o=e.search({minX:i,minY:n,maxX:s,maxY:a}),l=0;l0!=BT(t,r,i)>0&&BT(e,i,t)>0!=BT(e,i,r)>0}function l8(t){var r=t.p,e=t.next.p;return t.minX=Math.min(r[0],e[0]),t.minY=Math.min(r[1],e[1]),t.maxX=Math.max(r[0],e[0]),t.maxY=Math.max(r[1],e[1]),t}function Q3t(t){for(var r=t[0],e=t[0],i=t[0],n=t[0],s=0;si[0]&&(i=a),a[1]n[1]&&(n=a)}var o=[r,e,i,n],l=o.slice();for(s=0;s1?(i=e[0],n=e[1]):o>0&&(i+=s*o,n+=a*o)}return s=t[0]-i,a=t[1]-n,s*s+a*a}function HA(t,r,e,i,n,s,a,o){var l=e-t,c=i-r,u=a-n,h=o-s,p=t-n,d=r-s,f=l*l+c*c,m=l*u+c*h,g=u*u+h*h,y=l*p+c*d,E=u*p+h*d,b=f*g-m*m,x,S,D,P,_=b,w=b;b===0?(S=0,_=1,P=E,w=g):(S=m*E-g*y,P=f*E-m*y,S<0?(S=0,P=E,w=g):S>_&&(S=_,P=E+m,w=g)),P<0?(P=0,-y<0?S=0:-y>f?S=_:(S=-y,_=f)):P>w&&(P=w,-y+m<0?S=0:-y+m>f?S=_:(S=-y+m,_=f)),x=S===0?0:S/_,D=P===0?0:P/w;var F=(1-x)*t+x*e,X=(1-x)*r+x*i,H=(1-D)*n+D*a,he=(1-D)*s+D*o,C=H-F,N=he-X;return C*C+N*N}function ePt(t,r){return t[0]===r[0]?t[1]-r[1]:t[0]-r[0]}function tPt(t){t.sort(ePt);for(var r=[],e=0;e=2&&BT(r[r.length-2],r[r.length-1],t[e])<=0;)r.pop();r.push(t[e])}for(var i=[],n=t.length-1;n>=0;n--){for(;i.length>=2&&BT(i[i.length-2],i[i.length-1],t[n])<=0;)i.pop();i.push(t[n])}return i.pop(),r.pop(),r.concat(i)}});var BRe=V((omr,URe)=>{function fPt(){var t,r=0,e=!1;function i(n,s){return t.list.push({type:n,data:s?JSON.parse(JSON.stringify(s)):void 0}),t}return t={list:[],segmentId:function(){return r++},checkIntersection:function(n,s){return i("check",{seg1:n,seg2:s})},segmentChop:function(n,s){return i("div_seg",{seg:n,pt:s}),i("chop",{seg:n,pt:s})},statusRemove:function(n){return i("pop_seg",{seg:n})},segmentUpdate:function(n){return i("seg_update",{seg:n})},segmentNew:function(n,s){return i("new_seg",{seg:n,primary:s})},segmentRemove:function(n){return i("rem_seg",{seg:n})},tempStatus:function(n,s,a){return i("temp_status",{seg:n,above:s,below:a})},rewind:function(n){return i("rewind",{seg:n})},status:function(n,s,a){return i("status",{seg:n,above:s,below:a})},vert:function(n){return n===e?t:(e=n,i("vert",{x:n}))},log:function(n){return typeof n!="string"&&(n=JSON.stringify(n,!1," ")),i("log",{txt:n})},reset:function(){return i("reset")},selected:function(n){return i("selected",{segs:n})},chainStart:function(n){return i("chain_start",{seg:n})},chainRemoveHead:function(n,s){return i("chain_rem_head",{index:n,pt:s})},chainRemoveTail:function(n,s){return i("chain_rem_tail",{index:n,pt:s})},chainNew:function(n,s){return i("chain_new",{pt1:n,pt2:s})},chainMatch:function(n){return i("chain_match",{index:n})},chainClose:function(n){return i("chain_close",{index:n})},chainAddHead:function(n,s){return i("chain_add_head",{index:n,pt:s})},chainAddTail:function(n,s){return i("chain_add_tail",{index:n,pt:s})},chainConnect:function(n,s){return i("chain_con",{index1:n,index2:s})},chainReverse:function(n){return i("chain_rev",{index:n})},chainJoin:function(n,s){return i("chain_join",{index1:n,index2:s})},done:function(){return i("done")}},t}URe.exports=fPt});var GRe=V((lmr,kRe)=>{function mPt(t){typeof t!="number"&&(t=1e-10);var r={epsilon:function(e){return typeof e=="number"&&(t=e),t},pointAboveOrOnLine:function(e,i,n){var s=i[0],a=i[1],o=n[0],l=n[1],c=e[0],u=e[1];return(o-s)*(u-a)-(l-a)*(c-s)>=-t},pointBetween:function(e,i,n){var s=e[1]-i[1],a=n[0]-i[0],o=e[0]-i[0],l=n[1]-i[1],c=o*a+s*l;if(c-t)},pointsSameX:function(e,i){return Math.abs(e[0]-i[0])t!=o-s>t&&(a-u)*(s-h)/(o-h)+u-n>t&&(l=!l),a=u,o=h}return l}};return r}kRe.exports=mPt});var zRe=V((cmr,VRe)=>{var gPt={create:function(){var t={root:{root:!0,next:null},exists:function(r){return!(r===null||r===t.root)},isEmpty:function(){return t.root.next===null},getHead:function(){return t.root.next},insertBefore:function(r,e){for(var i=t.root,n=t.root.next;n!==null;){if(e(n)){r.prev=n.prev,r.next=n,n.prev.next=r,n.prev=r;return}i=n,n=n.next}i.next=r,r.prev=i,r.next=null},findTransition:function(r){for(var e=t.root,i=t.root.next;i!==null&&!r(i);)e=i,i=i.next;return{before:e===t.root?null:e,after:i,insert:function(n){return n.prev=e,n.next=i,e.next=n,i!==null&&(i.prev=n),n}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&&(t.next.prev=t.prev),t.prev=null,t.next=null},t}};VRe.exports=gPt});var WRe=V((umr,jRe)=>{var PI=zRe();function vPt(t,r,e){function i(f,m){return{id:e?e.segmentId():-1,start:f,end:m,myFill:{above:null,below:null},otherFill:null}}function n(f,m,g){return{id:e?e.segmentId():-1,start:f,end:m,myFill:{above:g.myFill.above,below:g.myFill.below},otherFill:null}}var s=PI.create();function a(f,m,g,y,E,b){var x=r.pointsCompare(m,E);return x!==0?x:r.pointsSame(g,b)?0:f!==y?f?1:-1:r.pointAboveOrOnLine(g,y?E:b,y?b:E)?1:-1}function o(f,m){s.insertBefore(f,function(g){var y=a(f.isStart,f.pt,m,g.isStart,g.pt,g.other.pt);return y<0})}function l(f,m){var g=PI.node({isStart:!0,pt:f.start,seg:f,primary:m,other:null,status:null});return o(g,f.end),g}function c(f,m,g){var y=PI.node({isStart:!1,pt:m.end,seg:m,primary:g,other:f,status:null});f.other=y,o(y,f.pt)}function u(f,m){var g=l(f,m);return c(g,f,m),g}function h(f,m){e&&e.segmentChop(f.seg,m),f.other.remove(),f.seg.end=m,f.other.pt=m,o(f.other,f.pt)}function p(f,m){var g=n(m,f.seg.end,f.seg);return h(f,m),u(g,f.primary)}function d(f,m){var g=PI.create();function y(N,k){var G=N.seg.start,U=N.seg.end,j=k.seg.start,ee=k.seg.end;return r.pointsCollinear(G,j,ee)?r.pointsCollinear(U,j,ee)||r.pointAboveOrOnLine(U,j,ee)?1:-1:r.pointAboveOrOnLine(G,j,ee)?1:-1}function E(N){return g.findTransition(function(k){var G=y(N,k.ev);return G>0})}function b(N,k){var G=N.seg,U=k.seg,j=G.start,ee=G.end,ae=U.start,se=U.end;e&&e.checkIntersection(G,U);var ue=r.linesIntersect(j,ee,ae,se);if(ue===!1){if(!r.pointsCollinear(j,ee,ae)||r.pointsSame(j,se)||r.pointsSame(ee,ae))return!1;var ve=r.pointsSame(j,ae),be=r.pointsSame(ee,se);if(ve&&be)return k;var de=!ve&&r.pointBetween(j,ae,se),we=!be&&r.pointBetween(ee,ae,se);if(ve)return we?p(k,ee):p(N,se),k;de&&(be||(we?p(k,ee):p(N,se)),p(k,j))}else ue.alongA===0&&(ue.alongB===-1?p(N,ae):ue.alongB===0?p(N,ue.pt):ue.alongB===1&&p(N,se)),ue.alongB===0&&(ue.alongA===-1?p(k,j):ue.alongA===0?p(k,ue.pt):ue.alongA===1&&p(k,ee));return!1}for(var x=[];!s.isEmpty();){var S=s.getHead();if(e&&e.vert(S.pt[0]),S.isStart){let N=function(){if(P){var k=b(S,P);if(k)return k}return _?b(S,_):!1};var C=N;e&&e.segmentNew(S.seg,S.primary);var D=E(S),P=D.before?D.before.ev:null,_=D.after?D.after.ev:null;e&&e.tempStatus(S.seg,P?P.seg:!1,_?_.seg:!1);var w=N();if(w){if(t){var F;S.seg.myFill.below===null?F=!0:F=S.seg.myFill.above!==S.seg.myFill.below,F&&(w.seg.myFill.above=!w.seg.myFill.above)}else w.seg.otherFill=S.seg.myFill;e&&e.segmentUpdate(w.seg),S.other.remove(),S.remove()}if(s.getHead()!==S){e&&e.rewind(S.seg);continue}if(t){var F;S.seg.myFill.below===null?F=!0:F=S.seg.myFill.above!==S.seg.myFill.below,_?S.seg.myFill.below=_.seg.myFill.above:S.seg.myFill.below=f,F?S.seg.myFill.above=!S.seg.myFill.below:S.seg.myFill.above=S.seg.myFill.below}else if(S.seg.otherFill===null){var X;_?S.primary===_.primary?X=_.seg.otherFill.above:X=_.seg.myFill.above:X=S.primary?m:f,S.seg.otherFill={above:X,below:X}}e&&e.status(S.seg,P?P.seg:!1,_?_.seg:!1),S.other.status=D.insert(PI.node({ev:S}))}else{var H=S.status;if(H===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(g.exists(H.prev)&&g.exists(H.next)&&b(H.prev.ev,H.next.ev),e&&e.statusRemove(H.ev.seg),H.remove(),!S.primary){var he=S.seg.myFill;S.seg.myFill=S.seg.otherFill,S.seg.otherFill=he}x.push(S.seg)}s.getHead().remove()}return e&&e.done(),x}return t?{addRegion:function(f){for(var m,g=f[f.length-1],y=0;y{function yPt(t,r,e){var i=[],n=[];return t.forEach(function(s){var a=s.start,o=s.end;if(r.pointsSame(a,o)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}e&&e.chainStart(s);var l={index:0,matches_head:!1,matches_pt1:!1},c={index:0,matches_head:!1,matches_pt1:!1},u=l;function h(C,N,k){return u.index=C,u.matches_head=N,u.matches_pt1=k,u===l?(u=c,!1):(u=null,!0)}for(var p=0;p{function NI(t,r,e){var i=[];return t.forEach(function(n){var s=(n.myFill.above?8:0)+(n.myFill.below?4:0)+(n.otherFill&&n.otherFill.above?2:0)+(n.otherFill&&n.otherFill.below?1:0);r[s]!==0&&i.push({id:e?e.segmentId():-1,start:n.start,end:n.end,myFill:{above:r[s]===1,below:r[s]===2},otherFill:null})}),e&&e.selected(i),i}var TPt={union:function(t,r){return NI(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(t,r){return NI(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(t,r){return NI(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(t,r){return NI(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(t,r){return NI(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};XRe.exports=TPt});var KRe=V((dmr,ZRe)=>{var EPt={toPolygon:function(t,r){function e(s){if(s.length<=0)return t.segments({inverted:!1,regions:[]});function a(c){var u=c.slice(0,c.length-1);return t.segments({inverted:!1,regions:[u]})}for(var o=a(s[0]),l=1;l{var bPt=BRe(),xPt=GRe(),JRe=WRe(),IPt=YRe(),LI=$Re(),QRe=KRe(),ql=!1,FI=xPt(),Eo;Eo={buildLog:function(t){return t===!0?ql=bPt():t===!1&&(ql=!1),ql===!1?!1:ql.list},epsilon:function(t){return FI.epsilon(t)},segments:function(t){var r=JRe(!0,FI,ql);return t.regions.forEach(r.addRegion),{segments:r.calculate(t.inverted),inverted:t.inverted}},combine:function(t,r){var e=JRe(!1,FI,ql);return{combined:e.calculate(t.segments,t.inverted,r.segments,r.inverted),inverted1:t.inverted,inverted2:r.inverted}},selectUnion:function(t){return{segments:LI.union(t.combined,ql),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:LI.intersect(t.combined,ql),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:LI.difference(t.combined,ql),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:LI.differenceRev(t.combined,ql),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:LI.xor(t.combined,ql),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:IPt(t.segments,FI,ql),inverted:t.inverted}},polygonFromGeoJSON:function(t){return QRe.toPolygon(Eo,t)},polygonToGeoJSON:function(t){return QRe.fromPolygon(Eo,FI,t)},union:function(t,r){return HI(t,r,Eo.selectUnion)},intersect:function(t,r){return HI(t,r,Eo.selectIntersect)},difference:function(t,r){return HI(t,r,Eo.selectDifference)},differenceRev:function(t,r){return HI(t,r,Eo.selectDifferenceRev)},xor:function(t,r){return HI(t,r,Eo.selectXor)}};function HI(t,r,e){var i=Eo.segments(t),n=Eo.segments(r),s=Eo.combine(i,n),a=e(s);return Eo.polygon(a)}typeof window=="object"&&(window.PolyBool=Eo);eMe.exports=Eo});var iMe=V((ymr,rMe)=>{rMe.exports=el;function el(t){if(t)return SPt(t)}function SPt(t){for(var r in el.prototype)t[r]=el.prototype[r];return t}el.prototype.on=el.prototype.addEventListener=function(t,r){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(r),this};el.prototype.once=function(t,r){var e=this;this._callbacks=this._callbacks||{};function i(){e.off(t,i),r.apply(this,arguments)}return i.fn=r,this.on(t,i),this};el.prototype.off=el.prototype.removeListener=el.prototype.removeAllListeners=el.prototype.removeEventListener=function(t,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks[t];if(!e)return this;if(arguments.length==1)return delete this._callbacks[t],this;for(var i,n=0;n{var nMe=iMe();function UI(){nMe.call(this)}UI.prototype=new nMe;sMe.exports=UI;UI.Stream=UI;UI.prototype.pipe=function(t,r){var e=this;function i(u){t.writable&&t.write(u)===!1&&e.pause&&e.pause()}e.on("data",i);function n(){e.readable&&e.resume&&e.resume()}t.on("drain",n),!t._isStdio&&(!r||r.end!==!1)&&(e.on("end",a),e.on("close",o));var s=!1;function a(){s||(s=!0,t.end())}function o(){s||(s=!0,typeof t.destroy=="function"&&t.destroy())}function l(u){if(c(),!this.hasListeners("error"))throw u}e.on("error",l),t.on("error",l);function c(){e.off("data",i),t.off("drain",n),e.off("end",a),e.off("close",o),e.off("error",l),t.off("error",l),e.off("end",c),e.off("close",c),t.off("end",c),t.off("close",c)}return e.on("end",c),e.on("close",c),t.on("end",c),t.on("close",c),t.emit("pipe",e),t}});var Yl=V((jT,kI)=>{(function(){var t,r="4.17.21",e=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",n="Expected a function",s="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",o=500,l="__lodash_placeholder__",c=1,u=2,h=4,p=1,d=2,f=1,m=2,g=4,y=8,E=16,b=32,x=64,S=128,D=256,P=512,_=30,w="...",F=800,X=16,H=1,he=2,C=3,N=1/0,k=9007199254740991,G=17976931348623157e292,U=0/0,j=4294967295,ee=j-1,ae=j>>>1,se=[["ary",S],["bind",f],["bindKey",m],["curry",y],["curryRight",E],["flip",P],["partial",b],["partialRight",x],["rearg",D]],ue="[object Arguments]",ve="[object Array]",be="[object AsyncFunction]",de="[object Boolean]",we="[object Date]",Fe="[object DOMException]",je="[object Error]",Oe="[object Function]",dt="[object GeneratorFunction]",Be="[object Map]",ke="[object Number]",nt="[object Null]",bt="[object Object]",mt="[object Promise]",_e="[object Proxy]",J="[object RegExp]",$="[object Set]",re="[object String]",me="[object Symbol]",z="[object Undefined]",Y="[object WeakMap]",xe="[object WeakSet]",Ce="[object ArrayBuffer]",Ge="[object DataView]",Ze="[object Float32Array]",gt="[object Float64Array]",ye="[object Int8Array]",Re="[object Int16Array]",ut="[object Int32Array]",vt="[object Uint8Array]",Et="[object Uint8ClampedArray]",Ct="[object Uint16Array]",Dt="[object Uint32Array]",cr=/\b__p \+= '';/g,Xt=/\b(__p \+=) '' \+/g,gr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ae=/&(?:amp|lt|gt|quot|#39);/g,Xe=/[&<>"']/g,lt=RegExp(Ae.source),_t=RegExp(Xe.source),Vt=/<%-([\s\S]+?)%>/g,Rr=/<%([\s\S]+?)%>/g,Ki=/<%=([\s\S]+?)%>/g,Pi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fn=/^\w*$/,Kt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ds=/[\\^$.*+?()[\]{}|]/g,Is=RegExp(ds.source),ic=/^\s+/,um=/\s/,fd=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,js=/\{\n\/\* \[wrapped with (.+)\] \*/,Te=/,? & /,ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qe=/[()=,{}\[\]\/\s]/,Le=/\\(\\)?/g,Ke=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jt=/\w*$/,Ir=/^[-+]0x[0-9a-f]+$/i,Nr=/^0b[01]+$/i,Fr=/^\[object .+?Constructor\]$/,Yr=/^0o[0-7]+$/i,kt=/^(?:0|[1-9]\d*)$/,Vr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ei=/($^)/,dn=/['\n\r\u2028\u2029\\]/g,ki="\\ud800-\\udfff",nr="\\u0300-\\u036f",q="\\ufe20-\\ufe2f",er="\\u20d0-\\u20ff",cu=nr+q+er,fn="\\u2700-\\u27bf",Ha="a-z\\xdf-\\xf6\\xf8-\\xff",nc="\\xac\\xb1\\xd7\\xf7",aa="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",oa="\\u2000-\\u206f",on=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",En="A-Z\\xc0-\\xd6\\xd8-\\xde",Io="\\ufe0e\\ufe0f",Xn=nc+aa+oa+on,sc="['\u2019]",uu="["+ki+"]",ac="["+Xn+"]",hu="["+cu+"]",hm="\\d+",bh="["+fn+"]",Ni="["+Ha+"]",md="[^"+ki+Xn+hm+fn+Ha+En+"]",pu="\\ud83c[\\udffb-\\udfff]",L0="(?:"+hu+"|"+pu+")",xh="[^"+ki+"]",Ih="(?:\\ud83c[\\udde6-\\uddff]){2}",oc="[\\ud800-\\udbff][\\udc00-\\udfff]",Xi="["+En+"]",al="\\u200d",Zr="(?:"+Ni+"|"+md+")",Qt="(?:"+Xi+"|"+md+")",Sh="(?:"+sc+"(?:d|ll|m|re|s|t|ve))?",K="(?:"+sc+"(?:D|LL|M|RE|S|T|VE))?",Z=L0+"?",ce="["+Io+"]?",oe="(?:"+al+"(?:"+[xh,Ih,oc].join("|")+")"+ce+Z+")*",pe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",qe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",et=ce+Z+oe,Ht="(?:"+[bh,Ih,oc].join("|")+")"+et,Mt="(?:"+[xh+hu+"?",hu,Ih,oc,uu].join("|")+")",Ft=RegExp(sc,"g"),$t=RegExp(hu,"g"),pt=RegExp(pu+"(?="+pu+")|"+Mt+et,"g"),qt=RegExp([Xi+"?"+Ni+"+"+Sh+"(?="+[ac,Xi,"$"].join("|")+")",Qt+"+"+K+"(?="+[ac,Xi+Zr,"$"].join("|")+")",Xi+"?"+Zr+"+"+Sh,Xi+"+"+K,qe,pe,hm,Ht].join("|"),"g"),zt=RegExp("["+al+ki+cu+Io+"]"),ur=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,sr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xi=-1,ar={};ar[Ze]=ar[gt]=ar[ye]=ar[Re]=ar[ut]=ar[vt]=ar[Et]=ar[Ct]=ar[Dt]=!0,ar[ue]=ar[ve]=ar[Ce]=ar[de]=ar[Ge]=ar[we]=ar[je]=ar[Oe]=ar[Be]=ar[ke]=ar[bt]=ar[J]=ar[$]=ar[re]=ar[Y]=!1;var Zt={};Zt[ue]=Zt[ve]=Zt[Ce]=Zt[Ge]=Zt[de]=Zt[we]=Zt[Ze]=Zt[gt]=Zt[ye]=Zt[Re]=Zt[ut]=Zt[Be]=Zt[ke]=Zt[bt]=Zt[J]=Zt[$]=Zt[re]=Zt[me]=Zt[vt]=Zt[Et]=Zt[Ct]=Zt[Dt]=!0,Zt[je]=Zt[Oe]=Zt[Y]=!1;var ti={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},So={"&":"&","<":"<",">":">",'"':""","'":"'"},as={"&":"&","<":"<",">":">",""":'"',"'":"'"},du={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},SE=parseFloat,F0=parseInt,e_=typeof global=="object"&&global&&global.Object===Object&&global,P3=typeof self=="object"&&self&&self.Object===Object&&self,os=e_||P3||Function("return this")(),H0=typeof jT=="object"&&jT&&!jT.nodeType&&jT,_h=H0&&typeof kI=="object"&&kI&&!kI.nodeType&&kI,t_=_h&&_h.exports===H0,_E=t_&&e_.process,Ua=function(){try{var Pe=_h&&_h.require&&_h.require("util").types;return Pe||_E&&_E.binding&&_E.binding("util")}catch(tt){}}(),gd=Ua&&Ua.isArrayBuffer,r_=Ua&&Ua.isDate,i_=Ua&&Ua.isMap,pm=Ua&&Ua.isRegExp,n_=Ua&&Ua.isSet,s_=Ua&&Ua.isTypedArray;function wn(Pe,tt,Ye){switch(Ye.length){case 0:return Pe.call(tt);case 1:return Pe.call(tt,Ye[0]);case 2:return Pe.call(tt,Ye[0],Ye[1]);case 3:return Pe.call(tt,Ye[0],Ye[1],Ye[2])}return Pe.apply(tt,Ye)}function a_(Pe,tt,Ye,Gt){for(var Ar=-1,ri=Pe==null?0:Pe.length;++Ar-1}function RE(Pe,tt,Ye){for(var Gt=-1,Ar=Pe==null?0:Pe.length;++Gt-1;);return Ye}function d_(Pe,tt){for(var Ye=Pe.length;Ye--&&vd(tt,Pe[Ye],0)>-1;);return Ye}function ol(Pe,tt){for(var Ye=Pe.length,Gt=0;Ye--;)Pe[Ye]===tt&&++Gt;return Gt}var HE=PE(ti),F3=PE(So);function H3(Pe){return"\\"+du[Pe]}function U3(Pe,tt){return Pe==null?t:Pe[tt]}function yd(Pe){return zt.test(Pe)}function f_(Pe){return ur.test(Pe)}function m_(Pe){for(var tt,Ye=[];!(tt=Pe.next()).done;)Ye.push(tt.value);return Ye}function UE(Pe){var tt=-1,Ye=Array(Pe.size);return Pe.forEach(function(Gt,Ar){Ye[++tt]=[Ar,Gt]}),Ye}function g_(Pe,tt){return function(Ye){return Pe(tt(Ye))}}function mu(Pe,tt){for(var Ye=-1,Gt=Pe.length,Ar=0,ri=[];++Ye-1}function DCe(v,T){var R=this.__data__,B=b_(R,v);return B<0?(++this.size,R.push([v,T])):R[B][1]=T,this}Oh.prototype.clear=_Ce,Oh.prototype.delete=wCe,Oh.prototype.get=RCe,Oh.prototype.has=MCe,Oh.prototype.set=DCe;function Ph(v){var T=-1,R=v==null?0:v.length;for(this.clear();++T=T?v:T)),v}function ul(v,T,R,B,Q,fe){var Se,Me=T&c,He=T&u,st=T&h;if(R&&(Se=Q?R(v,B,Q,fe):R(v)),Se!==t)return Se;if(!Rn(v))return v;var at=Hr(v);if(at){if(Se=PAe(v),!Me)return Ga(v,Se)}else{var Tt=Ws(v),Ut=Tt==Oe||Tt==dt;if(wd(v))return gV(v,Me);if(Tt==bt||Tt==ue||Ut&&!Q){if(Se=He||Ut?{}:LV(v),!Me)return He?xAe(v,WCe(Se,v)):bAe(v,qG(Se,v))}else{if(!Zt[Tt])return Q?v:{};Se=NAe(v,Tt,Me)}}fe||(fe=new uc);var rr=fe.get(v);if(rr)return rr;fe.set(v,Se),u7(v)?v.forEach(function(br){Se.add(ul(br,T,R,br,v,fe))}):l7(v)&&v.forEach(function(br,ii){Se.set(ii,ul(br,T,R,ii,v,fe))});var Er=st?He?EP:TP:He?za:_s,zr=at?t:Er(v);return Ba(zr||v,function(br,ii){zr&&(ii=br,br=v[ii]),WE(Se,ii,ul(br,T,R,ii,v,fe))}),Se}function qCe(v){var T=_s(v);return function(R){return YG(R,v,T)}}function YG(v,T,R){var B=R.length;if(v==null)return!B;for(v=$i(v);B--;){var Q=R[B],fe=T[Q],Se=v[Q];if(Se===t&&!(Q in v)||!fe(Se))return!1}return!0}function XG(v,T,R){if(typeof v!="function")throw new ka(n);return JE(function(){v.apply(t,R)},T)}function qE(v,T,R,B){var Q=-1,fe=wh,Se=!0,Me=v.length,He=[],st=T.length;if(!Me)return He;R&&(T=Ji(T,ca(R))),B?(fe=RE,Se=!1):T.length>=e&&(fe=dm,Se=!1,T=new gm(T));e:for(;++QQ?0:Q+R),B=B===t||B>Q?Q:Br(B),B<0&&(B+=Q),B=R>B?0:p7(B);R0&&R(Me)?T>1?Hs(Me,T-1,R,B,Q):fu(Q,Me):B||(Q[Q.length]=Me)}return Q}var tP=xV(),KG=xV(!0);function yu(v,T){return v&&tP(v,T,_s)}function rP(v,T){return v&&KG(v,T,_s)}function I_(v,T){return lc(T,function(R){return Uh(v[R])})}function ym(v,T){T=Sd(T,v);for(var R=0,B=T.length;v!=null&&RT}function $Ce(v,T){return v!=null&&Ii.call(v,T)}function ZCe(v,T){return v!=null&&T in $i(v)}function KCe(v,T,R){return v>=M(T,R)&&v=120&&at.length>=120)?new gm(Se&&at):t}at=v[0];var Tt=-1,Ut=Me[0];e:for(;++Tt-1;)Me!==v&&Y0.call(Me,He,1),Y0.call(v,He,1);return v}function lV(v,T){for(var R=v?T.length:0,B=R-1;R--;){var Q=T[R];if(R==B||Q!==fe){var fe=Q;Hh(Q)?Y0.call(v,Q,1):pP(v,Q)}}return v}function cP(v,T){return v+bd(te()*(T-v+1))}function uAe(v,T,R,B){for(var Q=-1,fe=I(Ah((T-v)/(R||1)),0),Se=Ye(fe);fe--;)Se[B?fe:++Q]=v,v+=R;return Se}function uP(v,T){var R="";if(!v||T<1||T>k)return R;do T%2&&(R+=v),T=bd(T/2),T&&(v+=v);while(T);return R}function $r(v,T){return RP(UV(v,T,ja),v+"")}function hAe(v){return WG(ev(v))}function pAe(v,T){var R=ev(v);return N_(R,vm(T,0,R.length))}function $E(v,T,R,B){if(!Rn(v))return v;T=Sd(T,v);for(var Q=-1,fe=T.length,Se=fe-1,Me=v;Me!=null&&++QQ?0:Q+T),R=R>Q?Q:R,R<0&&(R+=Q),Q=T>R?0:R-T>>>0,T>>>=0;for(var fe=Ye(Q);++B>>1,Se=v[fe];Se!==null&&!Mo(Se)&&(R?Se<=T:Se=e){var st=T?null:wAe(v);if(st)return B0(st);Se=!1,Q=dm,He=new gm}else He=T?[]:Me;e:for(;++B=B?v:hl(v,T,R)}var mV=X3||function(v){return os.clearTimeout(v)};function gV(v,T){if(T)return v.slice();var R=v.length,B=GE?GE(R):new v.constructor(R);return v.copy(B),B}function gP(v){var T=new v.constructor(v.byteLength);return new kE(T).set(new kE(v)),T}function vAe(v,T){var R=T?gP(v.buffer):v.buffer;return new v.constructor(R,v.byteOffset,v.byteLength)}function yAe(v){var T=new v.constructor(v.source,Jt.exec(v));return T.lastIndex=v.lastIndex,T}function TAe(v){return Kr?$i(Kr.call(v)):{}}function vV(v,T){var R=T?gP(v.buffer):v.buffer;return new v.constructor(R,v.byteOffset,v.length)}function yV(v,T){if(v!==T){var R=v!==t,B=v===null,Q=v===v,fe=Mo(v),Se=T!==t,Me=T===null,He=T===T,st=Mo(T);if(!Me&&!st&&!fe&&v>T||fe&&Se&&He&&!Me&&!st||B&&Se&&He||!R&&He||!Q)return 1;if(!B&&!fe&&!st&&v=Me)return He;var st=R[B];return He*(st=="desc"?-1:1)}}return v.index-T.index}function TV(v,T,R,B){for(var Q=-1,fe=v.length,Se=R.length,Me=-1,He=T.length,st=I(fe-Se,0),at=Ye(He+st),Tt=!B;++Me1?R[Q-1]:t,Se=Q>2?R[2]:t;for(fe=v.length>3&&typeof fe=="function"?(Q--,fe):t,Se&&pa(R[0],R[1],Se)&&(fe=Q<3?t:fe,Q=1),T=$i(T);++B-1?Q[fe?T[Se]:Se]:t}}function _V(v){return Fh(function(T){var R=T.length,B=R,Q=cl.prototype.thru;for(v&&T.reverse();B--;){var fe=T[B];if(typeof fe!="function")throw new ka(n);if(Q&&!Se&&O_(fe)=="wrapper")var Se=new cl([],!0)}for(B=Se?B:R;++B1&&yi.reverse(),at&&HeMe))return!1;var st=fe.get(v),at=fe.get(T);if(st&&at)return st==T&&at==v;var Tt=-1,Ut=!0,rr=R&d?new gm:t;for(fe.set(v,T),fe.set(T,v);++Tt1?"& ":"")+T[B],T=T.join(R>2?", ":" "),v.replace(fd,`{ -/* [wrapped with `+T+`] */ -`)}function FAe(v){return Hr(v)||bm(v)||!!(zE&&v&&v[zE])}function Hh(v,T){var R=typeof v;return T=T==null?k:T,!!T&&(R=="number"||R!="symbol"&&kt.test(v))&&v>-1&&v%1==0&&v0){if(++T>=F)return arguments[0]}else T=0;return v.apply(t,arguments)}}function N_(v,T){var R=-1,B=v.length,Q=B-1;for(T=T===t?B:T;++R1?v[T-1]:t;return R=typeof R=="function"?(v.pop(),R):t,ZV(v,R)});function KV(v){var T=ie(v);return T.__chain__=!0,T}function YOe(v,T){return T(v),v}function L_(v,T){return T(v)}var XOe=Fh(function(v){var T=v.length,R=T?v[0]:0,B=this.__wrapped__,Q=function(fe){return eP(fe,v)};return T>1||this.__actions__.length||!(B instanceof di)||!Hh(R)?this.thru(Q):(B=B.slice(R,+R+(T?1:0)),B.__actions__.push({func:L_,args:[Q],thisArg:t}),new cl(B,this.__chain__).thru(function(fe){return T&&!fe.length&&fe.push(t),fe}))});function $Oe(){return KV(this)}function ZOe(){return new cl(this.value(),this.__chain__)}function KOe(){this.__values__===t&&(this.__values__=h7(this.value()));var v=this.__index__>=this.__values__.length,T=v?t:this.__values__[this.__index__++];return{done:v,value:T}}function JOe(){return this}function QOe(v){for(var T,R=this;R instanceof ll;){var B=jV(R);B.__index__=0,B.__values__=t,T?Q.__wrapped__=B:T=B;var Q=B;R=R.__wrapped__}return Q.__wrapped__=v,T}function e3e(){var v=this.__wrapped__;if(v instanceof di){var T=v;return this.__actions__.length&&(T=new di(this)),T=T.reverse(),T.__actions__.push({func:L_,args:[MP],thisArg:t}),new cl(T,this.__chain__)}return this.thru(MP)}function t3e(){return dV(this.__wrapped__,this.__actions__)}var r3e=R_(function(v,T,R){Ii.call(v,R)?++v[R]:Nh(v,R,1)});function i3e(v,T,R){var B=Hr(v)?wE:YCe;return R&&pa(v,T,R)&&(T=t),B(v,vr(T,3))}function n3e(v,T){var R=Hr(v)?lc:ZG;return R(v,vr(T,3))}var s3e=SV(WV),a3e=SV(qV);function o3e(v,T){return Hs(F_(v,T),1)}function l3e(v,T){return Hs(F_(v,T),N)}function c3e(v,T,R){return R=R===t?1:Br(R),Hs(F_(v,T),R)}function JV(v,T){var R=Hr(v)?Ba:xd;return R(v,vr(T,3))}function QV(v,T){var R=Hr(v)?Fs:$G;return R(v,vr(T,3))}var u3e=R_(function(v,T,R){Ii.call(v,R)?v[R].push(T):Nh(v,R,[T])});function h3e(v,T,R,B){v=Va(v)?v:ev(v),R=R&&!B?Br(R):0;var Q=v.length;return R<0&&(R=I(Q+R,0)),G_(v)?R<=Q&&v.indexOf(T,R)>-1:!!Q&&vd(v,T,R)>-1}var p3e=$r(function(v,T,R){var B=-1,Q=typeof T=="function",fe=Va(v)?Ye(v.length):[];return xd(v,function(Se){fe[++B]=Q?wn(T,Se,R):YE(Se,T,R)}),fe}),d3e=R_(function(v,T,R){Nh(v,R,T)});function F_(v,T){var R=Hr(v)?Ji:rV;return R(v,vr(T,3))}function f3e(v,T,R,B){return v==null?[]:(Hr(T)||(T=T==null?[]:[T]),R=B?t:R,Hr(R)||(R=R==null?[]:[R]),aV(v,T,R))}var m3e=R_(function(v,T,R){v[R?0:1].push(T)},function(){return[[],[]]});function g3e(v,T,R){var B=Hr(v)?ME:u_,Q=arguments.length<3;return B(v,vr(T,4),R,Q,xd)}function v3e(v,T,R){var B=Hr(v)?o_:u_,Q=arguments.length<3;return B(v,vr(T,4),R,Q,$G)}function y3e(v,T){var R=Hr(v)?lc:ZG;return R(v,B_(vr(T,3)))}function T3e(v){var T=Hr(v)?WG:hAe;return T(v)}function E3e(v,T,R){(R?pa(v,T,R):T===t)?T=1:T=Br(T);var B=Hr(v)?VCe:pAe;return B(v,T)}function b3e(v){var T=Hr(v)?zCe:fAe;return T(v)}function x3e(v){if(v==null)return 0;if(Va(v))return G_(v)?Td(v):v.length;var T=Ws(v);return T==Be||T==$?v.size:aP(v).length}function I3e(v,T,R){var B=Hr(v)?DE:mAe;return R&&pa(v,T,R)&&(T=t),B(v,vr(T,3))}var S3e=$r(function(v,T){if(v==null)return[];var R=T.length;return R>1&&pa(v,T[0],T[1])?T=[]:R>2&&pa(T[0],T[1],T[2])&&(T=[T[0]]),aV(v,Hs(T,1),[])}),H_=$3||function(){return os.Date.now()};function _3e(v,T){if(typeof T!="function")throw new ka(n);return v=Br(v),function(){if(--v<1)return T.apply(this,arguments)}}function e7(v,T,R){return T=R?t:T,T=v&&T==null?v.length:T,Lh(v,S,t,t,t,t,T)}function t7(v,T){var R;if(typeof T!="function")throw new ka(n);return v=Br(v),function(){return--v>0&&(R=T.apply(this,arguments)),v<=1&&(T=t),R}}var CP=$r(function(v,T,R){var B=f;if(R.length){var Q=mu(R,J0(CP));B|=b}return Lh(v,B,T,R,Q)}),r7=$r(function(v,T,R){var B=f|m;if(R.length){var Q=mu(R,J0(r7));B|=b}return Lh(T,B,v,R,Q)});function i7(v,T,R){T=R?t:T;var B=Lh(v,y,t,t,t,t,t,T);return B.placeholder=i7.placeholder,B}function n7(v,T,R){T=R?t:T;var B=Lh(v,E,t,t,t,t,t,T);return B.placeholder=n7.placeholder,B}function s7(v,T,R){var B,Q,fe,Se,Me,He,st=0,at=!1,Tt=!1,Ut=!0;if(typeof v!="function")throw new ka(n);T=dl(T)||0,Rn(R)&&(at=!!R.leading,Tt="maxWait"in R,fe=Tt?I(dl(R.maxWait)||0,T):fe,Ut="trailing"in R?!!R.trailing:Ut);function rr(Kn){var pc=B,kh=Q;return B=Q=t,st=Kn,Se=v.apply(kh,pc),Se}function Er(Kn){return st=Kn,Me=JE(ii,T),at?rr(Kn):Se}function zr(Kn){var pc=Kn-He,kh=Kn-st,S7=T-pc;return Tt?M(S7,fe-kh):S7}function br(Kn){var pc=Kn-He,kh=Kn-st;return He===t||pc>=T||pc<0||Tt&&kh>=fe}function ii(){var Kn=H_();if(br(Kn))return yi(Kn);Me=JE(ii,zr(Kn))}function yi(Kn){return Me=t,Ut&&B?rr(Kn):(B=Q=t,Se)}function Do(){Me!==t&&mV(Me),st=0,B=He=Q=Me=t}function da(){return Me===t?Se:yi(H_())}function Co(){var Kn=H_(),pc=br(Kn);if(B=arguments,Q=this,He=Kn,pc){if(Me===t)return Er(He);if(Tt)return mV(Me),Me=JE(ii,T),rr(He)}return Me===t&&(Me=JE(ii,T)),Se}return Co.cancel=Do,Co.flush=da,Co}var w3e=$r(function(v,T){return XG(v,1,T)}),R3e=$r(function(v,T,R){return XG(v,dl(T)||0,R)});function M3e(v){return Lh(v,P)}function U_(v,T){if(typeof v!="function"||T!=null&&typeof T!="function")throw new ka(n);var R=function(){var B=arguments,Q=T?T.apply(this,B):B[0],fe=R.cache;if(fe.has(Q))return fe.get(Q);var Se=v.apply(this,B);return R.cache=fe.set(Q,Se)||fe,Se};return R.cache=new(U_.Cache||Ph),R}U_.Cache=Ph;function B_(v){if(typeof v!="function")throw new ka(n);return function(){var T=arguments;switch(T.length){case 0:return!v.call(this);case 1:return!v.call(this,T[0]);case 2:return!v.call(this,T[0],T[1]);case 3:return!v.call(this,T[0],T[1],T[2])}return!v.apply(this,T)}}function D3e(v){return t7(2,v)}var C3e=gAe(function(v,T){T=T.length==1&&Hr(T[0])?Ji(T[0],ca(vr())):Ji(Hs(T,1),ca(vr()));var R=T.length;return $r(function(B){for(var Q=-1,fe=M(B.length,R);++Q=T}),bm=QG(function(){return arguments}())?QG:function(v){return Hn(v)&&Ii.call(v,"callee")&&!VE.call(v,"callee")},Hr=Ye.isArray,W3e=gd?ca(gd):QCe;function Va(v){return v!=null&&k_(v.length)&&!Uh(v)}function Zn(v){return Hn(v)&&Va(v)}function q3e(v){return v===!0||v===!1||Hn(v)&&ha(v)==de}var wd=K3||VP,Y3e=r_?ca(r_):eAe;function X3e(v){return Hn(v)&&v.nodeType===1&&!QE(v)}function $3e(v){if(v==null)return!0;if(Va(v)&&(Hr(v)||typeof v=="string"||typeof v.splice=="function"||wd(v)||Q0(v)||bm(v)))return!v.length;var T=Ws(v);if(T==Be||T==$)return!v.size;if(KE(v))return!aP(v).length;for(var R in v)if(Ii.call(v,R))return!1;return!0}function Z3e(v,T){return XE(v,T)}function K3e(v,T,R){R=typeof R=="function"?R:t;var B=R?R(v,T):t;return B===t?XE(v,T,t,R):!!B}function OP(v){if(!Hn(v))return!1;var T=ha(v);return T==je||T==Fe||typeof v.message=="string"&&typeof v.name=="string"&&!QE(v)}function J3e(v){return typeof v=="number"&&$0(v)}function Uh(v){if(!Rn(v))return!1;var T=ha(v);return T==Oe||T==dt||T==be||T==_e}function o7(v){return typeof v=="number"&&v==Br(v)}function k_(v){return typeof v=="number"&&v>-1&&v%1==0&&v<=k}function Rn(v){var T=typeof v;return v!=null&&(T=="object"||T=="function")}function Hn(v){return v!=null&&typeof v=="object"}var l7=i_?ca(i_):rAe;function Q3e(v,T){return v===T||sP(v,T,xP(T))}function ePe(v,T,R){return R=typeof R=="function"?R:t,sP(v,T,xP(T),R)}function tPe(v){return c7(v)&&v!=+v}function rPe(v){if(BAe(v))throw new Ar(i);return eV(v)}function iPe(v){return v===null}function nPe(v){return v==null}function c7(v){return typeof v=="number"||Hn(v)&&ha(v)==ke}function QE(v){if(!Hn(v)||ha(v)!=bt)return!1;var T=q0(v);if(T===null)return!0;var R=Ii.call(T,"constructor")&&T.constructor;return typeof R=="function"&&R instanceof R&&Mh.call(R)==T_}var PP=pm?ca(pm):iAe;function sPe(v){return o7(v)&&v>=-k&&v<=k}var u7=n_?ca(n_):nAe;function G_(v){return typeof v=="string"||!Hr(v)&&Hn(v)&&ha(v)==re}function Mo(v){return typeof v=="symbol"||Hn(v)&&ha(v)==me}var Q0=s_?ca(s_):sAe;function aPe(v){return v===t}function oPe(v){return Hn(v)&&Ws(v)==Y}function lPe(v){return Hn(v)&&ha(v)==xe}var cPe=A_(oP),uPe=A_(function(v,T){return v<=T});function h7(v){if(!v)return[];if(Va(v))return G_(v)?wo(v):Ga(v);if(ua&&v[ua])return m_(v[ua]());var T=Ws(v),R=T==Be?UE:T==$?B0:ev;return R(v)}function Bh(v){if(!v)return v===0?v:0;if(v=dl(v),v===N||v===-N){var T=v<0?-1:1;return T*G}return v===v?v:0}function Br(v){var T=Bh(v),R=T%1;return T===T?R?T-R:T:0}function p7(v){return v?vm(Br(v),0,j):0}function dl(v){if(typeof v=="number")return v;if(Mo(v))return U;if(Rn(v)){var T=typeof v.valueOf=="function"?v.valueOf():v;v=Rn(T)?T+"":T}if(typeof v!="string")return v===0?v:+v;v=h_(v);var R=Nr.test(v);return R||Yr.test(v)?F0(v.slice(2),R?2:8):Ir.test(v)?U:+v}function d7(v){return Tu(v,za(v))}function hPe(v){return v?vm(Br(v),-k,k):v===0?v:0}function Gi(v){return v==null?"":Ro(v)}var pPe=Z0(function(v,T){if(KE(T)||Va(T)){Tu(T,_s(T),v);return}for(var R in T)Ii.call(T,R)&&WE(v,R,T[R])}),f7=Z0(function(v,T){Tu(T,za(T),v)}),V_=Z0(function(v,T,R,B){Tu(T,za(T),v,B)}),dPe=Z0(function(v,T,R,B){Tu(T,_s(T),v,B)}),fPe=Fh(eP);function mPe(v,T){var R=Ss(v);return T==null?R:qG(R,T)}var gPe=$r(function(v,T){v=$i(v);var R=-1,B=T.length,Q=B>2?T[2]:t;for(Q&&pa(T[0],T[1],Q)&&(B=1);++R1),fe}),Tu(v,EP(v),R),B&&(R=ul(R,c|u|h,RAe));for(var Q=T.length;Q--;)pP(R,T[Q]);return R});function NPe(v,T){return g7(v,B_(vr(T)))}var LPe=Fh(function(v,T){return v==null?{}:lAe(v,T)});function g7(v,T){if(v==null)return{};var R=Ji(EP(v),function(B){return[B]});return T=vr(T),oV(v,R,function(B,Q){return T(B,Q[0])})}function FPe(v,T,R){T=Sd(T,v);var B=-1,Q=T.length;for(Q||(Q=1,v=t);++BT){var B=v;v=T,T=B}if(R||v%1||T%1){var Q=te();return M(v+Q*(T-v+SE("1e-"+((Q+"").length-1))),T)}return cP(v,T)}var YPe=K0(function(v,T,R){return T=T.toLowerCase(),v+(R?T7(T):T)});function T7(v){return FP(Gi(v).toLowerCase())}function E7(v){return v=Gi(v),v&&v.replace(Vr,HE).replace($t,"")}function XPe(v,T,R){v=Gi(v),T=Ro(T);var B=v.length;R=R===t?B:vm(Br(R),0,B);var Q=R;return R-=T.length,R>=0&&v.slice(R,Q)==T}function $Pe(v){return v=Gi(v),v&&_t.test(v)?v.replace(Xe,F3):v}function ZPe(v){return v=Gi(v),v&&Is.test(v)?v.replace(ds,"\\$&"):v}var KPe=K0(function(v,T,R){return v+(R?"-":"")+T.toLowerCase()}),JPe=K0(function(v,T,R){return v+(R?" ":"")+T.toLowerCase()}),QPe=IV("toLowerCase");function e2e(v,T,R){v=Gi(v),T=Br(T);var B=T?Td(v):0;if(!T||B>=T)return v;var Q=(T-B)/2;return C_(bd(Q),R)+v+C_(Ah(Q),R)}function t2e(v,T,R){v=Gi(v),T=Br(T);var B=T?Td(v):0;return T&&B>>0,R?(v=Gi(v),v&&(typeof T=="string"||T!=null&&!PP(T))&&(T=Ro(T),!T&&yd(v))?_d(wo(v),0,R):v.split(T,R)):[]}var l2e=K0(function(v,T,R){return v+(R?" ":"")+FP(T)});function c2e(v,T,R){return v=Gi(v),R=R==null?0:vm(Br(R),0,v.length),T=Ro(T),v.slice(R,R+T.length)==T}function u2e(v,T,R){var B=ie.templateSettings;R&&pa(v,T,R)&&(T=t),v=Gi(v),T=V_({},T,B,CV);var Q=V_({},T.imports,B.imports,CV),fe=_s(Q),Se=FE(Q,fe),Me,He,st=0,at=T.interpolate||ei,Tt="__p += '",Ut=BE((T.escape||ei).source+"|"+at.source+"|"+(at===Ki?Ke:ei).source+"|"+(T.evaluate||ei).source+"|$","g"),rr="//# sourceURL="+(Ii.call(T,"sourceURL")?(T.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++xi+"]")+` -`;v.replace(Ut,function(br,ii,yi,Do,da,Co){return yi||(yi=Do),Tt+=v.slice(st,Co).replace(dn,H3),ii&&(Me=!0,Tt+=`' + -__e(`+ii+`) + -'`),da&&(He=!0,Tt+=`'; -`+da+`; -__p += '`),yi&&(Tt+=`' + -((__t = (`+yi+`)) == null ? '' : __t) + -'`),st=Co+br.length,br}),Tt+=`'; -`;var Er=Ii.call(T,"variable")&&T.variable;if(!Er)Tt=`with (obj) { -`+Tt+` -} -`;else if(Qe.test(Er))throw new Ar(s);Tt=(He?Tt.replace(cr,""):Tt).replace(Xt,"$1").replace(gr,"$1;"),Tt="function("+(Er||"obj")+`) { -`+(Er?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(Me?", __e = _.escape":"")+(He?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Tt+`return __p -}`;var zr=x7(function(){return ri(fe,rr+"return "+Tt).apply(t,Se)});if(zr.source=Tt,OP(zr))throw zr;return zr}function h2e(v){return Gi(v).toLowerCase()}function p2e(v){return Gi(v).toUpperCase()}function d2e(v,T,R){if(v=Gi(v),v&&(R||T===t))return h_(v);if(!v||!(T=Ro(T)))return v;var B=wo(v),Q=wo(T),fe=p_(B,Q),Se=d_(B,Q)+1;return _d(B,fe,Se).join("")}function f2e(v,T,R){if(v=Gi(v),v&&(R||T===t))return v.slice(0,v_(v)+1);if(!v||!(T=Ro(T)))return v;var B=wo(v),Q=d_(B,wo(T))+1;return _d(B,0,Q).join("")}function m2e(v,T,R){if(v=Gi(v),v&&(R||T===t))return v.replace(ic,"");if(!v||!(T=Ro(T)))return v;var B=wo(v),Q=p_(B,wo(T));return _d(B,Q).join("")}function g2e(v,T){var R=_,B=w;if(Rn(T)){var Q="separator"in T?T.separator:Q;R="length"in T?Br(T.length):R,B="omission"in T?Ro(T.omission):B}v=Gi(v);var fe=v.length;if(yd(v)){var Se=wo(v);fe=Se.length}if(R>=fe)return v;var Me=R-Td(B);if(Me<1)return B;var He=Se?_d(Se,0,Me).join(""):v.slice(0,Me);if(Q===t)return He+B;if(Se&&(Me+=He.length-Me),PP(Q)){if(v.slice(Me).search(Q)){var st,at=He;for(Q.global||(Q=BE(Q.source,Gi(Jt.exec(Q))+"g")),Q.lastIndex=0;st=Q.exec(at);)var Tt=st.index;He=He.slice(0,Tt===t?Me:Tt)}}else if(v.indexOf(Ro(Q),Me)!=Me){var Ut=He.lastIndexOf(Q);Ut>-1&&(He=He.slice(0,Ut))}return He+B}function v2e(v){return v=Gi(v),v&<.test(v)?v.replace(Ae,V3):v}var y2e=K0(function(v,T,R){return v+(R?" ":"")+T.toUpperCase()}),FP=IV("toUpperCase");function b7(v,T,R){return v=Gi(v),T=R?t:T,T===t?f_(v)?j3(v):AE(v):v.match(T)||[]}var x7=$r(function(v,T){try{return wn(v,t,T)}catch(R){return OP(R)?R:new Ar(R)}}),T2e=Fh(function(v,T){return Ba(T,function(R){R=Eu(R),Nh(v,R,CP(v[R],v))}),v});function E2e(v){var T=v==null?0:v.length,R=vr();return v=T?Ji(v,function(B){if(typeof B[1]!="function")throw new ka(n);return[R(B[0]),B[1]]}):[],$r(function(B){for(var Q=-1;++Qk)return[];var R=j,B=M(v,j);T=vr(T),v-=j;for(var Q=LE(B,T);++R0||T<0)?new di(R):(v<0?R=R.takeRight(-v):v&&(R=R.drop(v)),T!==t&&(T=Br(T),R=T<0?R.dropRight(-T):R.take(T-v)),R)},di.prototype.takeRightWhile=function(v){return this.reverse().takeWhile(v).reverse()},di.prototype.toArray=function(){return this.take(j)},yu(di.prototype,function(v,T){var R=/^(?:filter|find|map|reject)|While$/.test(T),B=/^(?:head|last)$/.test(T),Q=ie[B?"take"+(T=="last"?"Right":""):T],fe=B||/^find/.test(T);Q&&(ie.prototype[T]=function(){var Se=this.__wrapped__,Me=B?[1]:arguments,He=Se instanceof di,st=Me[0],at=He||Hr(Se),Tt=function(ii){var yi=Q.apply(ie,fu([ii],Me));return B&&Ut?yi[0]:yi};at&&R&&typeof st=="function"&&st.length!=1&&(He=at=!1);var Ut=this.__chain__,rr=!!this.__actions__.length,Er=fe&&!Ut,zr=He&&!rr;if(!fe&&at){Se=zr?Se:new di(this);var br=v.apply(Se,Me);return br.__actions__.push({func:L_,args:[Tt],thisArg:t}),new cl(br,Ut)}return Er&&zr?v.apply(this,Me):(br=this.thru(Tt),Er?B?br.value()[0]:br.value():br)})}),Ba(["pop","push","shift","sort","splice","unshift"],function(v){var T=G0[v],R=/^(?:push|sort|unshift)$/.test(v)?"tap":"thru",B=/^(?:pop|shift)$/.test(v);ie.prototype[v]=function(){var Q=arguments;if(B&&!this.__chain__){var fe=this.value();return T.apply(Hr(fe)?fe:[],Q)}return this[R](function(Se){return T.apply(Hr(Se)?Se:[],Q)})}}),yu(di.prototype,function(v,T){var R=ie[T];if(R){var B=R.name+"";Ii.call(wt,B)||(wt[B]=[]),wt[B].push({name:T,func:R})}}),wt[M_(t,m).name]=[{name:"wrapper",func:t}],di.prototype.clone=vCe,di.prototype.reverse=yCe,di.prototype.value=TCe,ie.prototype.at=XOe,ie.prototype.chain=$Oe,ie.prototype.commit=ZOe,ie.prototype.next=KOe,ie.prototype.plant=QOe,ie.prototype.reverse=e3e,ie.prototype.toJSON=ie.prototype.valueOf=ie.prototype.value=t3e,ie.prototype.first=ie.prototype.head,ua&&(ie.prototype[ua]=JOe),ie},gu=W3();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(os._=gu,define(function(){return gu})):_h?((_h.exports=gu)._=gu,H0._=gu):os._=gu}).call(jT)});(function(){if(!document.getElementById("3e9889bc77866f2718605a78878686cd050621630450736d1211402bd06b6b09")){var t=document.createElement("style");t.id="3e9889bc77866f2718605a78878686cd050621630450736d1211402bd06b6b09",t.textContent=`@import"https://at.alicdn.com/t/font_2809422_tyv73h24h8.css";@import"https://at.alicdn.com/t/c/font_2802048_la37g7yevws.css";.axesRenderer{width:100px;height:100px;position:absolute;display:block;bottom:1px;left:10px;background:#ffffff00}.overview-map{width:200px;height:200px;top:10px;left:10px;position:absolute;z-index:1;border:1px #50505090 solid;background-color:#80808030}.statsOutput{position:absolute;opacity:.6;top:1px;left:1px}#navCube{position:absolute;bottom:10px;right:10px;z-index:1;pointer-events:none;cursor:pointer}#navCube:hover{opacity:1}.css3d-navcube .navcube-plane{backface-visibility:hidden;z-index:1;transition:all .2s}.css3d-navcube .navcube-plane.outer{opacity:.7;background:linear-gradient(-45deg,transparent 15px,#efefef 0) bottom right,linear-gradient(-135deg,transparent 15px,#efefef 0) top right,linear-gradient(135deg,transparent 15px,#efefef 0) top left,linear-gradient(45deg,transparent 15px,#efefef 0) bottom left;background-size:70% 70%;background-repeat:no-repeat}.css3d-navcube .navcube-plane.inner{margin:2px;font-size:30px;text-align:center;line-height:100px;background:linear-gradient(-45deg,transparent 14px,#2c7be5 0) bottom right,linear-gradient(-135deg,transparent 14px,#2c7be5 0) top right,linear-gradient(135deg,transparent 14px,#2c7be5 0) top left,linear-gradient(45deg,transparent 14px,#2c7be5 0) bottom left;background-size:70% 70%;background-repeat:no-repeat}.css3d-navcube .navcube-plane:hover{opacity:1!important}.css3d-navcube .navcube-edge{opacity:0;z-index:2;transition:all .2s}.css3d-navcube .navcube-edge:hover{opacity:1!important}.css3d-navcube .navcube-corner{opacity:.7;backface-visibility:hidden;box-sizing:content-box;transform-origin:50% 33%;top:4px;z-index:3;transition:all .2s}.css3d-navcube .navcube-corner-plane{opacity:0;backface-visibility:hidden;transform-origin:bottom;top:-6.5px;z-index:3;transition:all .2s}.css3d-navcube .highlight{opacity:1}.progress-bar{z-index:3;bottom:20%;left:25%;position:absolute;color:#ffffffa0;width:50%;user-select:none}.progress-bar.hidden{display:none}.progress-bar .progress-bar-item{width:100%;text-align:center;padding:2px}.pop-panel{z-index:99999999;top:calc(70% - 100px);left:calc(90% - 160px);position:absolute;background:#ffffff;color:#333;border-radius:4px;width:160px;box-shadow:0 12px 48px 16px #00000008,0 9px 28px #0000000d,0 6px 16px -8px #00000014}.pop-panel .pop-panel-header{font-size:16px;font-weight:bolder;padding:16px 24px 8px;color:#333;border-bottom:1px solid #EFEFEF;cursor:move;user-select:none}.pop-panel .pop-panel-body{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px 24px}.pop-panel .pop-panel-body .pop-panel-item{display:inline-block;cursor:pointer;margin-right:16px;font-size:16px}.pop-panel .pop-panel-body .pop-panel-item .gemini-viewer-icon{font-size:24px}.pop-panel .pop-panel-body .pop-panel-item:last-child{margin-right:0}.pop-panel .pop-panel-body .pop-panel-item:hover,.pop-panel .pop-panel-body .pop-panel-item.active{color:#2c7be5}.pop-panel .pop-panel-body .pop-panel-item.disable{color:#999;cursor:not-allowed}.model-layout-switch-bar{position:absolute;bottom:0;width:100%;height:24px;background:#ffffff;opacity:.7;display:flex;font-size:12px;line-height:1;overflow-x:scroll;z-index:1}.model-layout-switch-bar .model-layout-switch-bar-content{white-space:nowrap}.model-layout-switch-bar .model-layout-switch-bar-content .model-layout-switch-item{position:relative;display:inline-block;padding:4px 16px 0;color:#000;height:22px;margin-left:8px;cursor:pointer;transform:translate(0)}.model-layout-switch-bar .model-layout-switch-bar-content .model-layout-switch-item:before{content:"";position:absolute;inset:0;z-index:-1;background:#fff;border:1px solid #000;border-radius:0 0 5px 5px;border-top:0px;transform:perspective(8px) rotateX(-5deg) scaleY(.8);transform-origin:bottom}.model-layout-switch-bar .model-layout-switch-bar-content .model-layout-switch-item:hover{color:#8080f0}.model-layout-switch-bar .model-layout-switch-bar-content .model-layout-switch-item:nth-child(n+2){margin-left:15px}.model-layout-switch-bar .model-layout-switch-bar-content .model-layout-switch-item.activate{color:#fff!important}.model-layout-switch-bar .model-layout-switch-bar-content .model-layout-switch-item.activate:before{background:#000!important}.model-layout-switch-bar.hidden{display:none}.follow-tooltip{z-index:99999999;position:absolute;left:-500px;padding:6px;background:rgba(25,25,25,.3);color:#fffc;font-size:12px;border-radius:2px}.context-menu{position:absolute;box-sizing:border-box;background-color:#fff;width:200px;padding:2px;border-radius:2px;box-shadow:0 4px 8px #0003,0 6px 20px #00000030;cursor:pointer;z-index:2}.context-menu ul{list-style:none;padding:0}.context-menu ul:last-child li{border-bottom:0px}.context-menu li{height:2rem;padding:.5rem;box-sizing:border-box}.context-menu li:hover{background-color:#d3d3d3}.context-menu li.disabled{color:#ccc;cursor:not-allowed}.context-menu li:last-child{border-bottom:1px solid #000}.toolbar{position:absolute;display:flex;box-sizing:border-box;height:68px;left:50%;bottom:40px;padding:8px 20px;border:rgba(153,153,153,.8) 1px solid;border-radius:4px;background:rgba(255,255,255,.8);transform:translate(-50%);align-items:center;z-index:10;user-select:none}.toolbar .toolbar-group{display:flex;padding:0 2px;box-sizing:border-box}.toolbar .toolbar-group-division{width:1px;background-color:#999c;height:60%}.toolbar .toolbar-menu{display:flex;box-sizing:border-box;flex-direction:column;width:50px;height:50px;padding:3px 0;margin:0 2px;transition:all .3s;cursor:pointer;color:#666;border-radius:4px}.toolbar .toolbar-menu.active{color:#2c7be5}.toolbar .toolbar-menu .icon{width:24px;height:24px;margin:auto;font-size:24px;line-height:normal}.toolbar .toolbar-menu span{display:block;width:100%;margin:auto;font-size:.75em;text-align:center;user-select:none}.toolbar .toolbar-menu:hover{color:#2c7be5;background-color:#fffc}.toolbar .toolbar-parent-menu{position:relative}.toolbar .toolbar-parent-menu:hover .toolbar-sub-menu{display:block}.toolbar .toolbar-parent-menu:hover .toolbar-sub-menu-list{background:rgba(255,255,255,.8)}.toolbar .toolbar-parent-menu:after{content:"";position:absolute;box-sizing:border-box;width:0;height:0;right:2px;top:2px;border-width:4px;border-style:solid;border-top-color:#666;border-right-color:#666;border-bottom-color:transparent;border-left-color:transparent;border-radius:1px}.toolbar .toolbar-sub-menu{display:none;position:absolute;width:50px;bottom:100%}.toolbar .toolbar-sub-menu .toolbar-sub-menu-list{margin-bottom:2px;border-radius:4px}.toolbar .toolbar-sub-menu .toolbar-sub-menu-list .toolbar-menu{margin:0}.bottom-bar{position:absolute;bottom:0;right:0;display:flex;color:#666;z-index:3;overflow:hidden;user-select:none}.bottom-bar i{font-size:18px;padding:3px;align-self:center;opacity:.4;cursor:pointer;line-height:1}.bottom-bar i:hover,.bottom-bar i.active{color:#2c7be5;opacity:1}.bottom-bar .fps{width:4rem}.bottom-bar span{align-self:center;padding:4px;font-size:14px}#statistics-tooltip,#tips-tooltip,#cameraInfo-tooltip{position:absolute;right:5px;bottom:30px;background:#666666;color:#fff;padding:8px 8px 5px;font-size:.8rem;border-radius:4px;z-index:3;opacity:.9;user-select:none}#statistics-tooltip p,#tips-tooltip p,#cameraInfo-tooltip p{padding-bottom:3px;margin:3px}#statistics-tooltip p span,#tips-tooltip p span,#cameraInfo-tooltip p span{float:left;margin-right:10px}.hide{display:none}.bim-viewer-spinner{position:absolute;display:flex;top:calc(50% - 20px);left:calc(50% - 20px);opacity:.8;justify-content:center;align-items:center;z-index:10}.bim-viewer-spinner>div{font-size:3rem;animation:spin 1s infinite linear;color:#2c7be5}.bim-viewer-spinner.hidden{display:none}.svg-renderer{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}.spinner{position:absolute;display:flex;width:100%;height:100%;opacity:.8;background-color:#fff;justify-content:center;align-items:center;z-index:10}.spinner>div{font-size:3rem;animation:spin 1s infinite linear;color:#2c7be5}.spinner.hidden{display:none}.compare-markups-canvas{position:absolute;top:0;left:0;pointer-events:none;user-select:none}.anchor{position:absolute;top:0;left:0;opacity:0;width:20px;height:20px;transform:translate(-50%,-50%);pointer-events:none;user-select:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAADjRJREFUeF7tXQnQttUYvq4Zxr5MqBgaihRlKakUU7SYSBQljUhaxijtso2MTCrRn8YoldKIUlIIJRplSyKyqzGyJDSDLGHmMtfvvOb19n7fe7Zn+/7nnnnn+/7/O8t9zrne+5xzn3sh1hCS9GUA20UO9xqS20eWHXQxDpr7BOZHAMyfrBEA8+dllAAJX65BFB0lwCgBxjPAHAyMW8C4BQxCghczOW4B4xYwbgHjFjDqAWYxMJ4BxjNA8fY6iAbGM8B4BhjPAGvKGUDSYwA8FcAmAJ4EYOPw8/6R4upvAH4I4Efh580AbiJ5W2T9wRRbEWcASTuFBX/a1KLfq/Iq/HsKDN8NgLiych+tNzdYAEh6JoAXAdgtLHrrkwfAkuEyAJeTvL4LBkr7HBQAJK0fFtwLH/u0WzpHsfWvMRAMCJK3xlbqutwgACDplVMLf++uJ21B//+aAsL5PecVvQaApB0BHA3AP4dIVwE4maR/9pJ6CYBwij8GwOt7OWvpTJ0O4KQ+3iJ6BwBJXnQvvq9yK4l8hTQIDIbeUG8AsALEfeyi9mpb6AUAJL0bwBtjZ3CFlDuR5LFdj6VzAEi6EMCeXU9ER/1fRHKvjvpe3W1nAJC0NoDPAnhGwxNwF4DbZz6/m/q3u183fNaZ+n3yfw9smL8bALyA5B0N9zO3+U4AIMmL/gUAazU0aKtor/CH5M9K+pD0BAC7hI9Vzk3QnQB2JmkwtEqtA0DS7gAuqTxKn7C96F8EcBXJP1Zuf3Vzkh4WdBI7ADAYat9U9iD5ySZ4X6rNVgEg6TAA76s4wKsBnBa+6X6saY0k+bHJkuFQAM+r2PHhJE+t2N6yTbUGAEkHADiz0sBu8sKTPKdSe0XNSHpNAIKfoGvQgSQ/VKOhRW20AoDwcvfNRcxE/P034Rvvxf97RPnWiki6XwCBJcKjKnS8ZRsvjI0DILzg3VI4IX5gsahf1Ud16vTYghr7DQEMpQ9XGzT9stgoACQ9BMD3Cw9LlhyvI3ljIYharS5pMwAfALBlQcc+3G5K8k8FbXR3BpDkE+1LCpj3+/o+JH2XHxxJsg7ho8FwJZf/S0n65tQINSYBJH0QwEEFXJ9F0gfHwZMkH+heWzCQM0geXFB/yaqNAEDS8QDeUsDwsSRPLKjfu6qS/NbhN49cehfJt+ZWXqpedQCEV70SY8ltSX619kD70J6kbQBcV8DLTrWNS5oAgBc/y4KHZHV+Cia7saqSlNm4tZxV1dFVJzwYc7w/c3BPJPnTzLqDqiZpQwA/yWT6kJpGJdUAEO6/Ft05+vFdSX4mc0IGWU3SCwF8OoN5Xw23qaUPqQkAf/NzbPiOJPnejIkYfBVJRwA4JWMgp5M8JKPePapUAUDBwa+x602NyWmjjYLrcpUDYS0A5Bz87Ky5C8l/tDHRs31IesTUdnUbyd93xMd9g+1CalzCKgfCYgAEp42PJE6edftbtaXeDWrZ59ryJiz6owHcZ4bnuwH8CoD3WFsqfall/r4BIPXtYF+SRc4nNQBwMYA9EgFwCsmjEuskFZe0c7A1tAuZXcpyyC5edvmy7Z4tmBojSe8BcGRiB5eQfGlinf8rXgSA8NL340Tk+knX3/5GXK0l+U3ehievLpmYOXXPBXAqSdsiVKdwi7IUSHlKtiTdqOTFsBQAhwNIPcE3ouaVZN9/q0q9+H6bb4Jsg2BrneNJOoZAVcpUFx9BMtvKqhQAKVE3PFn+9mxd25hD0tMB+PHJLuNtkF3BDyb5nZqdBaOSr4dYB7FNF4W1zQZAppXP/rXNuCS9HMDHYmercrm9SX68ZpvBvOzsxDazrYdKAJD64nc1SVvTViNJbwdwXLUG8xo6juQ78qrOryXJ1s0phqbZL4UlALClj2PwxNJuJG3gUYXCKf/zVRorb+RZJC26q5AkB8Bw5JFYupnkprGFp8tlASBD8/dbAOuRrGK6XeFZNWeuFtV5HMlfLCoU8/dgcv5LAI+MKR/KZGkGcwHg+6rvrbF0Acl9YgsvVy5c8+z1k3JdqtH1ojasDfWj1j8XFYz5uySbkr0ipmwocxTJ5HeFXAD4TvyqBOaq2blL8jaya0LfbRY9geSba3SY4UdxHslk3UcuAL4NwFavsbRODefHgifUWD5Ly1lP4GtusbIoOM/aiTWWbiS5eWzhSblkAEiy6PVeF6u3vpbkc1IZm1e+59/+Ccvnktyv0ni/AuDZkW1ZK/hYkta0RlMOAGySlKIXr6L5G8C3f3rSn1/j7SBDM2gP4yR7zBwApKp/Nybp94IiknQBgL2LGmmvctZ+PMuepI1CuNpYzpPVwjkAsJbKzpAxdBfJB8UUXK6MJLfxawDFbZXyElnf9gXrRZZdtpikvwCIDVJxDsn9U/rNAYBdtWJ17j8n6QALRSRpXwDnFTXSfuUqyiFJDnDx+Ej2ryeZ5IrGEEc/sv3VxbYA8IDICteRjD3ELNlkBRezSHarFnsbSavLi0jStQC2jWzkrwC+FVl2dTEDINdGPaafi0m+LKbggi2gSR5L2VuqftEr3aRRSZ8AUGT0sdwAmwZAsfWqpAcDaMw7tqnVB3ALyVjRvZz0y7W2jhpa0wAoFoOSbL/XiPVQ1AzlF7qbpA0+i0iSjVzeWdTIMpWbBsABJM8qYV6SM378oKSNDuuuXWptLMlexY2Fi2kaAMUeP5K2BvC1DhexpOvNSy2Lm1aAjQAoWd7Fddd4AIxbQKHDydC3gPEQuFhKLFti6IfA8RpYDoBBXwNHRVA5ABpXBNm2P4X8DhCbgLGWKjjVPCplPE2VPZpkitncXD4SVcF2VklKX5fzGGRdc2yI91qPQQ4112oQ5QqoKL4BmIfEx6AbSPqtJppyAGBPYKdxi6Faz8F+DrXnrgNPDoFuJblBDUYTn4PPJ+mX02jKAYDTnJwQ3QOwYWnM/vBNSAFeAnuNFE1+l5/HRchVkBI36U0kk0LR5QAgNbbNYSRXlU5z0xqxUv5m6tcyCXPM4ZTQ8cma1xwAOAiU/eZjkzNfSdK++sW0BhqF2vYyNiycnW7WT3W7TwZAEMc2e35Kwoo+vEYWjwFIgZpm4c5O8oeEOf4eyeR8BbkASL2WVfOi7bkUqOkYkur1nOV9lQsA5/M9KQGdZ5MsCZb8v64kbQXgcwAemtB/G0V9/96+VuAISX5GTzHwPIbkyakDzQVAqm+ADTq8P9VyDrXPnKVQn2izWgEjgnOoz1kpQTeTfQI8eVkACOeArt3DHSjRWUT6QNW2uDC3/XYPD0yOASL+C701NkCE3wRSE0E1ESLGV8yuAkVUue9Pi7DBhIgJUqAvQaIch/+iFmMG2AFzz9p5DQYVJCoAINVP0NWqOIvObvwhcIStZ5uOHeAI3zZ0KXYBnzOGnKwiyf6A0/1mHwIDAByBs2+BIq2qPrABIHjhz2wqrP0gA0UGEPQ1VKyB4Ouif+Y6ldox03kMrGRpNJ/BIEPFBgD4abi3waKDZ7HtCV6ckMLuUgCfAuCUbQZBoxSCWQ8zWHQAQU64eN8gdmg7J2BwNbO7mT8T+wK7nv3ZH5L+2RqF3IKOC5jk1RuypMc+FC05nqIzwKTVjLBxk6qXk9yttdnuYUeSHA/Qip9UygoLN9tJFQAEKZBrvbpiEkSmrmBBQslia+sJrzUBYL11btKoRq6GqQvSZvmM+D8T9vqZNCpIASeNyk0bt2ITRs6575ckkOxn2rip80DOgXB19TFx5EIZVCVP0HQv1baACgfCSRMrNoFkYcJIz0+Vg1+jAAhbgS1TrdbMpWTjxtyO2qpXwZztRJK2yK5K1SXAlCS4MCRtymV4xSSULEgQOZk7J63aK3cil6vXGACCJEjxIprH5xnOAdRVbsHSCZfkEDE26z6ooK1kb5+UvpoGwNoh0uVaKUzNlPWTs0Oh31jQRutVg3rXvoGpCSGneb0TgCOt3tHUABoFQJAC9iNMil03Z7AOhGzzr1Wpdu9NTdxS7YZXPTt0HJoQUHup5rYgeUOTY2gcAAEEuwO4pMJAbIhhIJxWO/NYKW/BmMOL7k+NZBZ7kGzcIbYVAAQQOJ9fdn67mQWyMYZBcE7pwtWoH8y4vPDJjhlL9H84yRSXsOxhtAaAAIIDbFSRze09K14dJMIVtUzOY3kLptu7hG98SoavRV1Uy66yqCP/vVUABBDkGJMuGouTUvmw6Dy/lzV1aApZPPx66XzEPtylJHVaNAb/PTv/X0zj88q0DoAAApuSebFSHB9SxugAy84AbjAU5SoIMfu96M48Xhz4eolB+IFnu5IcwCmTM122EwAEENgY48MJVjq5Y7wLwO0zH+fimfyf2103fNaZ+n3yf7Gx+nP5s/XRfiQ7iYfcGQAmsyXJOX9LFCW5E9+HemeQPLhLRjoHQJAGqV5GXc5Zrb6z073WYqCTQ+BSzAezMnsd71hzgD1s6yoAJ5P0z86pFxJgehYk2ajkmAYPiF1Nug96J5E8vSsGenMLWDQBQZ1qEBgMK4G86F783uU96J0EmJEG3g6GvC30StwPRgLMMirJzie+i9t8OjZjaVeSww9Xzm9sHcT5XTER22+vJcAcIFiBNAGCtXF9Iiu2Jgvv6B6DoEEBYGZ7sErZEsGA2KSj2b7Z33QvPMmkGL0d8XuPbgcLgDlnBYet23TqU3ursGh3WJzJx2HZenGVKwHTigDAnK3C7/GWCk8OPye/xya8dAJGJ6ryN9yf1b+nZuYuWZi26q5IAMybvJAhNfbcUCXpY1uLWNLPCID5szcCoARVfaw7SoD5qzJKgFEC9PH7Wp+nUQKMEiAlpN14Bqj/Hey2xVECjBJglABzMDAeAsdDYLeiua3exy1g3ALGLWDcAlY7dMTQGnML+A8qtnUcTFYqYAAAAABJRU5ErkJggg==) no-repeat center center;background-size:100% 100%;background-blend-mode:lighten;filter:invert(61%) sepia(87%) saturate(845%) hue-rotate(120deg) brightness(94%) contrast(101%);transition:opacity .5s ease-in-out}.anchor.active{opacity:1}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}} -`,document.head.appendChild(t)}})();var dNe=fetch;window.fetch=(...t)=>Promise.resolve(dNe(...t));var bLr=Un(X7(),1),xLr=Un(Jle(),1),ILr=Un(Qle(),1);var Pt={};z_(Pt,{ACESFilmicToneMapping:()=>Gue,AddEquation:()=>Sa,AddOperation:()=>Hue,AdditiveAnimationBlendMode:()=>_U,AdditiveBlending:()=>fp,AlphaFormat:()=>Xue,AlwaysDepth:()=>Cue,AlwaysStencilFunc:()=>ohe,AmbientLight:()=>Ol,AmbientLightProbe:()=>F4,AnimationClip:()=>so,AnimationLoader:()=>M4,AnimationMixer:()=>j4,AnimationObjectGroup:()=>V4,AnimationUtils:()=>z0t,ArcCurve:()=>Eg,ArrayCamera:()=>ID,ArrowHelper:()=>Fg,Audio:()=>zD,AudioAnalyser:()=>k4,AudioContext:()=>vx,AudioListener:()=>U4,AudioLoader:()=>N4,AxesHelper:()=>iU,BackSide:()=>Gn,BasicDepthPacking:()=>she,BasicShadowMap:()=>Uht,Bone:()=>Rl,BooleanKeyframeTrack:()=>Dp,Box2:()=>Ds,Box3:()=>Ot,Box3Helper:()=>tU,BoxBufferGeometry:()=>nU,BoxGeometry:()=>Qa,BoxHelper:()=>Lg,BufferAttribute:()=>jt,BufferGeometry:()=>it,BufferGeometryLoader:()=>VD,ByteType:()=>zue,Cache:()=>Og,Camera:()=>vg,CameraHelper:()=>bx,CanvasTexture:()=>I4,CapsuleBufferGeometry:()=>sU,CapsuleGeometry:()=>xg,CatmullRomCurve3:()=>RD,CineonToneMapping:()=>kue,CircleBufferGeometry:()=>aU,CircleGeometry:()=>Ig,ClampToEdgeWrapping:()=>mn,Clock:()=>df,Color:()=>Ve,ColorKeyframeTrack:()=>dx,ColorManagement:()=>Xs,CompressedArrayTexture:()=>x4,CompressedTexture:()=>sx,CompressedTextureLoader:()=>D4,ConeBufferGeometry:()=>oU,ConeGeometry:()=>Sg,CubeCamera:()=>bD,CubeReflectionMapping:()=>sf,CubeRefractionMapping:()=>af,CubeTexture:()=>yg,CubeTextureLoader:()=>fx,CubeUVReflectionMapping:()=>By,CubicBezierCurve:()=>ax,CubicBezierCurve3:()=>MD,CubicInterpolant:()=>FD,CullFaceBack:()=>wH,CullFaceFront:()=>bue,CullFaceFrontBack:()=>Hht,CullFaceNone:()=>Eue,Curve:()=>Ma,CurvePath:()=>CD,CustomBlending:()=>Op,CustomToneMapping:()=>Vue,CylinderBufferGeometry:()=>lU,CylinderGeometry:()=>Dl,Cylindrical:()=>$4,Data3DTexture:()=>rx,DataArrayTexture:()=>Ry,DataTexture:()=>_l,DataTextureLoader:()=>Ng,DataUtils:()=>zy,DecrementStencilOp:()=>Xht,DecrementWrapStencilOp:()=>Zht,DefaultLoadingManager:()=>oo,DepthFormat:()=>nf,DepthStencilFormat:()=>gp,DepthTexture:()=>lf,DirectionalLight:()=>$s,DirectionalLightHelper:()=>Ex,DiscreteInterpolant:()=>HD,DodecahedronBufferGeometry:()=>cU,DodecahedronGeometry:()=>_g,DoubleSide:()=>wi,DstAlphaFactor:()=>Hy,DstColorFactor:()=>Uy,DynamicCopyUsage:()=>hpt,DynamicDrawUsage:()=>spt,DynamicReadUsage:()=>lpt,EdgesGeometry:()=>Ip,EllipseCurve:()=>xp,EqualDepth:()=>Oue,EqualStencilFunc:()=>ept,EquirectangularReflectionMapping:()=>mg,EquirectangularRefractionMapping:()=>Zb,Euler:()=>Sr,EventDispatcher:()=>Ra,ExtrudeBufferGeometry:()=>uU,ExtrudeGeometry:()=>Sp,FileLoader:()=>ci,Float16BufferAttribute:()=>u4,Float32BufferAttribute:()=>ct,Float64BufferAttribute:()=>h4,FloatType:()=>_a,Fog:()=>Uu,FogExp2:()=>Cy,FramebufferTexture:()=>b4,FrontSide:()=>en,Frustum:()=>eo,GLBufferAttribute:()=>Y4,GLSL1:()=>dpt,GLSL3:()=>e4,GreaterDepth:()=>Nue,GreaterEqualDepth:()=>Pue,GreaterEqualStencilFunc:()=>npt,GreaterStencilFunc:()=>rpt,GridHelper:()=>Tx,Group:()=>hr,HalfFloatType:()=>Go,HemisphereLight:()=>pf,HemisphereLightHelper:()=>Q4,HemisphereLightProbe:()=>L4,IcosahedronBufferGeometry:()=>hU,IcosahedronGeometry:()=>Rg,ImageBitmapLoader:()=>gx,ImageLoader:()=>Pg,ImageUtils:()=>tx,IncrementStencilOp:()=>Yht,IncrementWrapStencilOp:()=>$ht,InstancedBufferAttribute:()=>bp,InstancedBufferGeometry:()=>GD,InstancedInterleavedBuffer:()=>q4,InstancedMesh:()=>tn,Int16BufferAttribute:()=>l4,Int32BufferAttribute:()=>c4,Int8BufferAttribute:()=>s4,IntType:()=>Wue,InterleavedBuffer:()=>Ep,InterleavedBufferAttribute:()=>to,Interpolant:()=>Mp,InterpolateDiscrete:()=>vp,InterpolateLinear:()=>Hu,InterpolateSmooth:()=>mD,InvertStencilOp:()=>Kht,KeepStencilOp:()=>gD,KeyframeTrack:()=>zo,LOD:()=>wD,LatheBufferGeometry:()=>pU,LatheGeometry:()=>cf,Layers:()=>My,LessDepth:()=>Aue,LessEqualDepth:()=>yD,LessEqualStencilFunc:()=>tpt,LessStencilFunc:()=>Qht,Light:()=>Al,LightProbe:()=>Py,Line:()=>_r,Line3:()=>Ca,LineBasicMaterial:()=>Tr,LineCurve:()=>Oy,LineCurve3:()=>DD,LineDashedMaterial:()=>Rp,LineLoop:()=>Ay,LineSegments:()=>oi,LinearEncoding:()=>wl,LinearFilter:()=>ai,LinearInterpolant:()=>px,LinearMipMapLinearFilter:()=>zht,LinearMipMapNearestFilter:()=>Vht,LinearMipmapLinearFilter:()=>wa,LinearMipmapNearestFilter:()=>Hg,LinearSRGBColorSpace:()=>wy,LinearToneMapping:()=>Uue,Loader:()=>li,LoaderUtils:()=>ks,LoadingManager:()=>Ap,LoopOnce:()=>rhe,LoopPingPong:()=>nhe,LoopRepeat:()=>ihe,LuminanceAlphaFormat:()=>$ue,LuminanceFormat:()=>YD,MOUSE:()=>bi,Material:()=>Gr,MaterialLoader:()=>Ny,MathUtils:()=>wr,Matrix3:()=>Qi,Matrix4:()=>Ue,MaxEquation:()=>CH,Mesh:()=>Je,MeshBasicMaterial:()=>or,MeshDepthMaterial:()=>Tp,MeshDistanceMaterial:()=>nx,MeshLambertMaterial:()=>io,MeshMatcapMaterial:()=>LD,MeshNormalMaterial:()=>hf,MeshPhongMaterial:()=>Ts,MeshPhysicalMaterial:()=>Cl,MeshStandardMaterial:()=>Gu,MeshToonMaterial:()=>ND,MinEquation:()=>DH,MirroredRepeatWrapping:()=>mp,MixOperation:()=>Fue,MultiplyBlending:()=>MH,MultiplyOperation:()=>Sx,NearestFilter:()=>Di,NearestMipMapLinearFilter:()=>Ght,NearestMipMapNearestFilter:()=>kht,NearestMipmapLinearFilter:()=>pp,NearestMipmapNearestFilter:()=>of,NeverDepth:()=>Due,NeverStencilFunc:()=>Jht,NoBlending:()=>Fi,NoColorSpace:()=>jht,NoToneMapping:()=>Lu,NormalAnimationBlendMode:()=>$D,NormalBlending:()=>pg,NotEqualDepth:()=>Lue,NotEqualStencilFunc:()=>ipt,NumberKeyframeTrack:()=>Cc,Object3D:()=>pr,ObjectLoader:()=>P4,ObjectSpaceNormalMap:()=>ahe,OctahedronBufferGeometry:()=>dU,OctahedronGeometry:()=>uf,OneFactor:()=>Fy,OneMinusDstAlphaFactor:()=>wue,OneMinusDstColorFactor:()=>Rue,OneMinusSrcAlphaFactor:()=>SU,OneMinusSrcColorFactor:()=>_ue,OrthographicCamera:()=>Zi,PCFShadowMap:()=>IU,PCFSoftShadowMap:()=>Ly,PMREMGenerator:()=>yp,Path:()=>ku,PerspectiveCamera:()=>qr,Plane:()=>Ei,PlaneBufferGeometry:()=>fU,PlaneGeometry:()=>ts,PlaneHelper:()=>rU,PointLight:()=>Ac,PointLightHelper:()=>J4,Points:()=>rn,PointsMaterial:()=>Vn,PolarGridHelper:()=>eU,PolyhedronBufferGeometry:()=>mU,PolyhedronGeometry:()=>Dc,PositionalAudio:()=>B4,PropertyBinding:()=>Cr,PropertyMixer:()=>jD,QuadraticBezierCurve:()=>ox,QuadraticBezierCurve3:()=>lx,Quaternion:()=>Or,QuaternionKeyframeTrack:()=>Da,QuaternionLinearInterpolant:()=>UD,RED_GREEN_RGTC2_Format:()=>JH,RED_RGTC1_Format:()=>the,REVISION:()=>WD,RGBADepthPacking:()=>Gy,RGBAFormat:()=>Bs,RGBAIntegerFormat:()=>Que,RGBA_ASTC_10x10_Format:()=>XH,RGBA_ASTC_10x5_Format:()=>WH,RGBA_ASTC_10x6_Format:()=>qH,RGBA_ASTC_10x8_Format:()=>YH,RGBA_ASTC_12x10_Format:()=>$H,RGBA_ASTC_12x12_Format:()=>ZH,RGBA_ASTC_4x4_Format:()=>HH,RGBA_ASTC_5x4_Format:()=>UH,RGBA_ASTC_5x5_Format:()=>BH,RGBA_ASTC_6x5_Format:()=>kH,RGBA_ASTC_6x6_Format:()=>GH,RGBA_ASTC_8x5_Format:()=>VH,RGBA_ASTC_8x6_Format:()=>zH,RGBA_ASTC_8x8_Format:()=>jH,RGBA_BPTC_Format:()=>fD,RGBA_ETC2_EAC_Format:()=>FH,RGBA_PVRTC_2BPPV1_Format:()=>NH,RGBA_PVRTC_4BPPV1_Format:()=>PH,RGBA_S3TC_DXT1_Format:()=>hD,RGBA_S3TC_DXT3_Format:()=>pD,RGBA_S3TC_DXT5_Format:()=>dD,RGB_ETC1_Format:()=>ehe,RGB_ETC2_Format:()=>LH,RGB_PVRTC_2BPPV1_Format:()=>OH,RGB_PVRTC_4BPPV1_Format:()=>AH,RGB_S3TC_DXT1_Format:()=>uD,RGFormat:()=>Kue,RGIntegerFormat:()=>Jue,RawShaderMaterial:()=>PD,Ray:()=>Vo,Raycaster:()=>Oc,RectAreaLight:()=>BD,RedFormat:()=>XD,RedIntegerFormat:()=>Zue,ReinhardToneMapping:()=>Bue,RepeatWrapping:()=>gn,ReplaceStencilOp:()=>qht,ReverseSubtractEquation:()=>Iue,RingBufferGeometry:()=>gU,RingGeometry:()=>Mg,SIGNED_RED_GREEN_RGTC2_Format:()=>QH,SIGNED_RED_RGTC1_Format:()=>KH,SRGBColorSpace:()=>wc,Scene:()=>On,ShaderChunk:()=>Wr,ShaderLib:()=>Rc,ShaderMaterial:()=>Yt,ShadowMaterial:()=>OD,Shape:()=>Ja,ShapeBufferGeometry:()=>vU,ShapeGeometry:()=>_p,ShapePath:()=>xx,ShapeUtils:()=>es,ShortType:()=>jue,Skeleton:()=>Ml,SkeletonHelper:()=>K4,SkinnedMesh:()=>Bu,Source:()=>Mc,Sphere:()=>zi,SphereBufferGeometry:()=>yU,SphereGeometry:()=>ro,Spherical:()=>Pc,SphericalHarmonics3:()=>kD,SplineCurve:()=>bg,SpotLight:()=>Vu,SpotLightHelper:()=>Z4,Sprite:()=>_D,SpriteMaterial:()=>Tg,SrcAlphaFactor:()=>Ix,SrcAlphaSaturateFactor:()=>Mue,SrcColorFactor:()=>Sue,StaticCopyUsage:()=>upt,StaticDrawUsage:()=>Jb,StaticReadUsage:()=>opt,StereoCamera:()=>H4,StreamCopyUsage:()=>ppt,StreamDrawUsage:()=>apt,StreamReadUsage:()=>cpt,StringKeyframeTrack:()=>Cp,SubtractEquation:()=>xue,SubtractiveBlending:()=>RH,TOUCH:()=>ao,TangentSpaceNormalMap:()=>mf,TetrahedronBufferGeometry:()=>TU,TetrahedronGeometry:()=>Dg,Texture:()=>Hi,TextureLoader:()=>Es,TorusBufferGeometry:()=>EU,TorusGeometry:()=>wp,TorusKnotBufferGeometry:()=>bU,TorusKnotGeometry:()=>Cg,Triangle:()=>un,TriangleFanDrawMode:()=>ky,TriangleStripDrawMode:()=>wx,TrianglesDrawMode:()=>wU,TubeBufferGeometry:()=>xU,TubeGeometry:()=>Ag,TwoPassDoubleSide:()=>Bht,UVMapping:()=>qD,Uint16BufferAttribute:()=>gg,Uint32BufferAttribute:()=>ix,Uint8BufferAttribute:()=>a4,Uint8ClampedBufferAttribute:()=>o4,Uniform:()=>yx,UniformsGroup:()=>W4,UniformsLib:()=>At,UniformsUtils:()=>hn,UnsignedByteType:()=>Fu,UnsignedInt248Type:()=>dp,UnsignedIntType:()=>rf,UnsignedShort4444Type:()=>que,UnsignedShort5551Type:()=>Yue,UnsignedShortType:()=>_x,VSMShadowMap:()=>by,Vector2:()=>le,Vector3:()=>A,Vector4:()=>Jr,VectorKeyframeTrack:()=>no,VideoTexture:()=>E4,WebGL1Renderer:()=>SD,WebGL3DRenderTarget:()=>i4,WebGLArrayRenderTarget:()=>r4,WebGLCubeRenderTarget:()=>xD,WebGLMultipleRenderTargets:()=>n4,WebGLRenderTarget:()=>kr,WebGLRenderer:()=>Pl,WebGLUtils:()=>vhe,WireframeGeometry:()=>AD,WrapAroundEnding:()=>Kb,ZeroCurvatureEnding:()=>cg,ZeroFactor:()=>ff,ZeroSlopeEnding:()=>ug,ZeroStencilOp:()=>Wht,_SRGBAFormat:()=>TD,sRGBEncoding:()=>yr});var WD="149",bi={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},ao={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Eue=0,wH=1,bue=2,Hht=3,Uht=0,IU=1,Ly=2,by=3,en=0,Gn=1,wi=2,Bht=2,Fi=0,pg=1,fp=2,RH=3,MH=4,Op=5,Sa=100,xue=101,Iue=102,DH=103,CH=104,ff=200,Fy=201,Sue=202,_ue=203,Ix=204,SU=205,Hy=206,wue=207,Uy=208,Rue=209,Mue=210,Due=0,Cue=1,Aue=2,yD=3,Oue=4,Pue=5,Nue=6,Lue=7,Sx=0,Fue=1,Hue=2,Lu=0,Uue=1,Bue=2,kue=3,Gue=4,Vue=5,qD=300,sf=301,af=302,mg=303,Zb=304,By=306,gn=1e3,mn=1001,mp=1002,Di=1003,of=1004,kht=1004,pp=1005,Ght=1005,ai=1006,Hg=1007,Vht=1007,wa=1008,zht=1008,Fu=1009,zue=1010,jue=1011,_x=1012,Wue=1013,rf=1014,_a=1015,Go=1016,que=1017,Yue=1018,dp=1020,Xue=1021,Bs=1023,YD=1024,$ue=1025,nf=1026,gp=1027,XD=1028,Zue=1029,Kue=1030,Jue=1031,Que=1033,uD=33776,hD=33777,pD=33778,dD=33779,AH=35840,OH=35841,PH=35842,NH=35843,ehe=36196,LH=37492,FH=37496,HH=37808,UH=37809,BH=37810,kH=37811,GH=37812,VH=37813,zH=37814,jH=37815,WH=37816,qH=37817,YH=37818,XH=37819,$H=37820,ZH=37821,fD=36492,the=36283,KH=36284,JH=36285,QH=36286,rhe=2200,ihe=2201,nhe=2202,vp=2300,Hu=2301,mD=2302,cg=2400,ug=2401,Kb=2402,$D=2500,_U=2501,wU=0,wx=1,ky=2,wl=3e3,yr=3001,she=3200,Gy=3201,mf=0,ahe=1,jht="",wc="srgb",wy="srgb-linear",Wht=0,gD=7680,qht=7681,Yht=7682,Xht=7683,$ht=34055,Zht=34056,Kht=5386,Jht=512,Qht=513,ept=514,tpt=515,rpt=516,ipt=517,npt=518,ohe=519,Jb=35044,spt=35048,apt=35040,opt=35045,lpt=35049,cpt=35041,upt=35046,hpt=35050,ppt=35042,dpt="100",e4="300 es",TD=1035,Ra=class{addEventListener(r,e){this._listeners===void 0&&(this._listeners={});let i=this._listeners;i[r]===void 0&&(i[r]=[]),i[r].indexOf(e)===-1&&i[r].push(e)}hasEventListener(r,e){if(this._listeners===void 0)return!1;let i=this._listeners;return i[r]!==void 0&&i[r].indexOf(e)!==-1}removeEventListener(r,e){if(this._listeners===void 0)return;let n=this._listeners[r];if(n!==void 0){let s=n.indexOf(e);s!==-1&&n.splice(s,1)}}dispatchEvent(r){if(this._listeners===void 0)return;let i=this._listeners[r.type];if(i!==void 0){r.target=this;let n=i.slice(0);for(let s=0,a=n.length;s>8&255]+Ys[t>>16&255]+Ys[t>>24&255]+"-"+Ys[r&255]+Ys[r>>8&255]+"-"+Ys[r>>16&15|64]+Ys[r>>24&255]+"-"+Ys[e&63|128]+Ys[e>>8&255]+"-"+Ys[e>>16&255]+Ys[e>>24&255]+Ys[i&255]+Ys[i>>8&255]+Ys[i>>16&255]+Ys[i>>24&255]).toLowerCase()}function Qn(t,r,e){return Math.max(r,Math.min(e,t))}function RU(t,r){return(t%r+r)%r}function fpt(t,r,e,i,n){return i+(t-r)*(n-i)/(e-r)}function mpt(t,r,e){return t!==r?(e-t)/(r-t):0}function qb(t,r,e){return(1-e)*t+e*r}function gpt(t,r,e,i){return qb(t,r,1-Math.exp(-e*i))}function vpt(t,r=1){return r-Math.abs(RU(t,r*2)-r)}function ypt(t,r,e){return t<=r?0:t>=e?1:(t=(t-r)/(e-r),t*t*(3-2*t))}function Tpt(t,r,e){return t<=r?0:t>=e?1:(t=(t-r)/(e-r),t*t*t*(t*(t*6-15)+10))}function Ept(t,r){return t+Math.floor(Math.random()*(r-t+1))}function bpt(t,r){return t+Math.random()*(r-t)}function xpt(t){return t*(.5-Math.random())}function Ipt(t){t!==void 0&&(ece=t);let r=ece+=1831565813;return r=Math.imul(r^r>>>15,r|1),r^=r+Math.imul(r^r>>>7,r|61),((r^r>>>14)>>>0)/4294967296}function Spt(t){return t*dg}function _pt(t){return t*Qb}function t4(t){return(t&t-1)===0&&t!==0}function lhe(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function ED(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function wpt(t,r,e,i,n){let s=Math.cos,a=Math.sin,o=s(e/2),l=a(e/2),c=s((r+i)/2),u=a((r+i)/2),h=s((r-i)/2),p=a((r-i)/2),d=s((i-r)/2),f=a((i-r)/2);switch(n){case"XYX":t.set(o*u,l*h,l*p,o*c);break;case"YZY":t.set(l*p,o*u,l*h,o*c);break;case"ZXZ":t.set(l*h,l*p,o*u,o*c);break;case"XZX":t.set(o*u,l*f,l*d,o*c);break;case"YXY":t.set(l*d,o*u,l*f,o*c);break;case"ZYZ":t.set(l*f,l*d,o*u,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+n)}}function hp(t,r){switch(r.constructor){case Float32Array:return t;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function cn(t,r){switch(r.constructor){case Float32Array:return t;case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}var wr=Object.freeze({__proto__:null,DEG2RAD:dg,RAD2DEG:Qb,ceilPowerOfTwo:lhe,clamp:Qn,damp:gpt,degToRad:Spt,denormalize:hp,euclideanModulo:RU,floorPowerOfTwo:ED,generateUUID:ko,inverseLerp:mpt,isPowerOfTwo:t4,lerp:qb,mapLinear:fpt,normalize:cn,pingpong:vpt,radToDeg:_pt,randFloat:bpt,randFloatSpread:xpt,randInt:Ept,seededRandom:Ipt,setQuaternionFromProperEuler:wpt,smootherstep:Tpt,smoothstep:ypt}),le=class{constructor(r=0,e=0){le.prototype.isVector2=!0,this.x=r,this.y=e}get width(){return this.x}set width(r){this.x=r}get height(){return this.y}set height(r){this.y=r}set(r,e){return this.x=r,this.y=e,this}setScalar(r){return this.x=r,this.y=r,this}setX(r){return this.x=r,this}setY(r){return this.y=r,this}setComponent(r,e){switch(r){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+r)}return this}getComponent(r){switch(r){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+r)}}clone(){return new this.constructor(this.x,this.y)}copy(r){return this.x=r.x,this.y=r.y,this}add(r){return this.x+=r.x,this.y+=r.y,this}addScalar(r){return this.x+=r,this.y+=r,this}addVectors(r,e){return this.x=r.x+e.x,this.y=r.y+e.y,this}addScaledVector(r,e){return this.x+=r.x*e,this.y+=r.y*e,this}sub(r){return this.x-=r.x,this.y-=r.y,this}subScalar(r){return this.x-=r,this.y-=r,this}subVectors(r,e){return this.x=r.x-e.x,this.y=r.y-e.y,this}multiply(r){return this.x*=r.x,this.y*=r.y,this}multiplyScalar(r){return this.x*=r,this.y*=r,this}divide(r){return this.x/=r.x,this.y/=r.y,this}divideScalar(r){return this.multiplyScalar(1/r)}applyMatrix3(r){let e=this.x,i=this.y,n=r.elements;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this}min(r){return this.x=Math.min(this.x,r.x),this.y=Math.min(this.y,r.y),this}max(r){return this.x=Math.max(this.x,r.x),this.y=Math.max(this.y,r.y),this}clamp(r,e){return this.x=Math.max(r.x,Math.min(e.x,this.x)),this.y=Math.max(r.y,Math.min(e.y,this.y)),this}clampScalar(r,e){return this.x=Math.max(r,Math.min(e,this.x)),this.y=Math.max(r,Math.min(e,this.y)),this}clampLength(r,e){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(r,Math.min(e,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(r){return this.x*r.x+this.y*r.y}cross(r){return this.x*r.y-this.y*r.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(r){return Math.sqrt(this.distanceToSquared(r))}distanceToSquared(r){let e=this.x-r.x,i=this.y-r.y;return e*e+i*i}manhattanDistanceTo(r){return Math.abs(this.x-r.x)+Math.abs(this.y-r.y)}setLength(r){return this.normalize().multiplyScalar(r)}lerp(r,e){return this.x+=(r.x-this.x)*e,this.y+=(r.y-this.y)*e,this}lerpVectors(r,e,i){return this.x=r.x+(e.x-r.x)*i,this.y=r.y+(e.y-r.y)*i,this}equals(r){return r.x===this.x&&r.y===this.y}fromArray(r,e=0){return this.x=r[e],this.y=r[e+1],this}toArray(r=[],e=0){return r[e]=this.x,r[e+1]=this.y,r}fromBufferAttribute(r,e){return this.x=r.getX(e),this.y=r.getY(e),this}rotateAround(r,e){let i=Math.cos(e),n=Math.sin(e),s=this.x-r.x,a=this.y-r.y;return this.x=s*i-a*n+r.x,this.y=s*n+a*i+r.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Qi=class{constructor(){Qi.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(r,e,i,n,s,a,o,l,c){let u=this.elements;return u[0]=r,u[1]=n,u[2]=o,u[3]=e,u[4]=s,u[5]=l,u[6]=i,u[7]=a,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(r){let e=this.elements,i=r.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}extractBasis(r,e,i){return r.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(r){let e=r.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(r){return this.multiplyMatrices(this,r)}premultiply(r){return this.multiplyMatrices(r,this)}multiplyMatrices(r,e){let i=r.elements,n=e.elements,s=this.elements,a=i[0],o=i[3],l=i[6],c=i[1],u=i[4],h=i[7],p=i[2],d=i[5],f=i[8],m=n[0],g=n[3],y=n[6],E=n[1],b=n[4],x=n[7],S=n[2],D=n[5],P=n[8];return s[0]=a*m+o*E+l*S,s[3]=a*g+o*b+l*D,s[6]=a*y+o*x+l*P,s[1]=c*m+u*E+h*S,s[4]=c*g+u*b+h*D,s[7]=c*y+u*x+h*P,s[2]=p*m+d*E+f*S,s[5]=p*g+d*b+f*D,s[8]=p*y+d*x+f*P,this}multiplyScalar(r){let e=this.elements;return e[0]*=r,e[3]*=r,e[6]*=r,e[1]*=r,e[4]*=r,e[7]*=r,e[2]*=r,e[5]*=r,e[8]*=r,this}determinant(){let r=this.elements,e=r[0],i=r[1],n=r[2],s=r[3],a=r[4],o=r[5],l=r[6],c=r[7],u=r[8];return e*a*u-e*o*c-i*s*u+i*o*l+n*s*c-n*a*l}invert(){let r=this.elements,e=r[0],i=r[1],n=r[2],s=r[3],a=r[4],o=r[5],l=r[6],c=r[7],u=r[8],h=u*a-o*c,p=o*l-u*s,d=c*s-a*l,f=e*h+i*p+n*d;if(f===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/f;return r[0]=h*m,r[1]=(n*c-u*i)*m,r[2]=(o*i-n*a)*m,r[3]=p*m,r[4]=(u*e-n*l)*m,r[5]=(n*s-o*e)*m,r[6]=d*m,r[7]=(i*l-c*e)*m,r[8]=(a*e-i*s)*m,this}transpose(){let r,e=this.elements;return r=e[1],e[1]=e[3],e[3]=r,r=e[2],e[2]=e[6],e[6]=r,r=e[5],e[5]=e[7],e[7]=r,this}getNormalMatrix(r){return this.setFromMatrix4(r).invert().transpose()}transposeIntoArray(r){let e=this.elements;return r[0]=e[0],r[1]=e[3],r[2]=e[6],r[3]=e[1],r[4]=e[4],r[5]=e[7],r[6]=e[2],r[7]=e[5],r[8]=e[8],this}setUvTransform(r,e,i,n,s,a,o){let l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*a+c*o)+a+r,-n*c,n*l,-n*(-c*a+l*o)+o+e,0,0,1),this}scale(r,e){return this.premultiply(Y6.makeScale(r,e)),this}rotate(r){return this.premultiply(Y6.makeRotation(-r)),this}translate(r,e){return this.premultiply(Y6.makeTranslation(r,e)),this}makeTranslation(r,e){return this.set(1,0,r,0,1,e,0,0,1),this}makeRotation(r){let e=Math.cos(r),i=Math.sin(r);return this.set(e,-i,0,i,e,0,0,0,1),this}makeScale(r,e){return this.set(r,0,0,0,e,0,0,0,1),this}equals(r){let e=this.elements,i=r.elements;for(let n=0;n<9;n++)if(e[n]!==i[n])return!1;return!0}fromArray(r,e=0){for(let i=0;i<9;i++)this.elements[i]=r[i+e];return this}toArray(r=[],e=0){let i=this.elements;return r[e]=i[0],r[e+1]=i[1],r[e+2]=i[2],r[e+3]=i[3],r[e+4]=i[4],r[e+5]=i[5],r[e+6]=i[6],r[e+7]=i[7],r[e+8]=i[8],r}clone(){return new this.constructor().fromArray(this.elements)}},Y6=new Qi;function che(t){for(let r=t.length-1;r>=0;--r)if(t[r]>=65535)return!0;return!1}var Rpt={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function xy(t,r){return new Rpt[t](r)}function ex(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function fg(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function vD(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}var X6={[wc]:{[wy]:fg},[wy]:{[wc]:vD}},Xs={legacyMode:!0,get workingColorSpace(){return wy},set workingColorSpace(t){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(t,r,e){if(this.legacyMode||r===e||!r||!e)return t;if(X6[r]&&X6[r][e]!==void 0){let i=X6[r][e];return t.r=i(t.r),t.g=i(t.g),t.b=i(t.b),t}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(t,r){return this.convert(t,this.workingColorSpace,r)},toWorkingColorSpace:function(t,r){return this.convert(t,r,this.workingColorSpace)}},uhe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},gs={r:0,g:0,b:0},Ic={h:0,s:0,l:0},_M={h:0,s:0,l:0};function $6(t,r,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+(r-t)*6*e:e<1/2?r:e<2/3?t+(r-t)*6*(2/3-e):t}function wM(t,r){return r.r=t.r,r.g=t.g,r.b=t.b,r}var Ve=class{constructor(r,e,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,e===void 0&&i===void 0?this.set(r):this.setRGB(r,e,i)}set(r){return r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r),this}setScalar(r){return this.r=r,this.g=r,this.b=r,this}setHex(r,e=wc){return r=Math.floor(r),this.r=(r>>16&255)/255,this.g=(r>>8&255)/255,this.b=(r&255)/255,Xs.toWorkingColorSpace(this,e),this}setRGB(r,e,i,n=Xs.workingColorSpace){return this.r=r,this.g=e,this.b=i,Xs.toWorkingColorSpace(this,n),this}setHSL(r,e,i,n=Xs.workingColorSpace){if(r=RU(r,1),e=Qn(e,0,1),i=Qn(i,0,1),e===0)this.r=this.g=this.b=i;else{let s=i<=.5?i*(1+e):i+e-i*e,a=2*i-s;this.r=$6(a,s,r+1/3),this.g=$6(a,s,r),this.b=$6(a,s,r-1/3)}return Xs.toWorkingColorSpace(this,n),this}setStyle(r,e=wc){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+r+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(r)){let s,a=n[1],o=n[2];switch(a){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(s[1],10))/255,this.g=Math.min(255,parseInt(s[2],10))/255,this.b=Math.min(255,parseInt(s[3],10))/255,Xs.toWorkingColorSpace(this,e),i(s[4]),this;if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(s[1],10))/100,this.g=Math.min(100,parseInt(s[2],10))/100,this.b=Math.min(100,parseInt(s[3],10))/100,Xs.toWorkingColorSpace(this,e),i(s[4]),this;break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){let l=parseFloat(s[1])/360,c=parseFloat(s[2])/100,u=parseFloat(s[3])/100;return i(s[4]),this.setHSL(l,c,u,e)}break}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(r)){let s=n[1],a=s.length;if(a===3)return this.r=parseInt(s.charAt(0)+s.charAt(0),16)/255,this.g=parseInt(s.charAt(1)+s.charAt(1),16)/255,this.b=parseInt(s.charAt(2)+s.charAt(2),16)/255,Xs.toWorkingColorSpace(this,e),this;if(a===6)return this.r=parseInt(s.charAt(0)+s.charAt(1),16)/255,this.g=parseInt(s.charAt(2)+s.charAt(3),16)/255,this.b=parseInt(s.charAt(4)+s.charAt(5),16)/255,Xs.toWorkingColorSpace(this,e),this}return r&&r.length>0?this.setColorName(r,e):this}setColorName(r,e=wc){let i=uhe[r.toLowerCase()];return i!==void 0?this.setHex(i,e):console.warn("THREE.Color: Unknown color "+r),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(r){return this.r=r.r,this.g=r.g,this.b=r.b,this}copySRGBToLinear(r){return this.r=fg(r.r),this.g=fg(r.g),this.b=fg(r.b),this}copyLinearToSRGB(r){return this.r=vD(r.r),this.g=vD(r.g),this.b=vD(r.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(r=wc){return Xs.fromWorkingColorSpace(wM(this,gs),r),Qn(gs.r*255,0,255)<<16^Qn(gs.g*255,0,255)<<8^Qn(gs.b*255,0,255)<<0}getHexString(r=wc){return("000000"+this.getHex(r).toString(16)).slice(-6)}getHSL(r,e=Xs.workingColorSpace){Xs.fromWorkingColorSpace(wM(this,gs),e);let i=gs.r,n=gs.g,s=gs.b,a=Math.max(i,n,s),o=Math.min(i,n,s),l,c,u=(o+a)/2;if(o===a)l=0,c=0;else{let h=a-o;switch(c=u<=.5?h/(a+o):h/(2-a-o),a){case i:l=(n-s)/h+(n2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",r),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(r){if(typeof HTMLImageElement!="undefined"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&r instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&r instanceof ImageBitmap){let e=ex("canvas");e.width=r.width,e.height=r.height;let i=e.getContext("2d");i.drawImage(r,0,0,r.width,r.height);let n=i.getImageData(0,0,r.width,r.height),s=n.data;for(let a=0;a0&&(i.userData=this.userData),e||(r.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(r){if(this.mapping!==qD)return r;if(r.applyMatrix3(this.matrix),r.x<0||r.x>1)switch(this.wrapS){case gn:r.x=r.x-Math.floor(r.x);break;case mn:r.x=r.x<0?0:1;break;case mp:Math.abs(Math.floor(r.x)%2)===1?r.x=Math.ceil(r.x)-r.x:r.x=r.x-Math.floor(r.x);break}if(r.y<0||r.y>1)switch(this.wrapT){case gn:r.y=r.y-Math.floor(r.y);break;case mn:r.y=r.y<0?0:1;break;case mp:Math.abs(Math.floor(r.y)%2)===1?r.y=Math.ceil(r.y)-r.y:r.y=r.y-Math.floor(r.y);break}return this.flipY&&(r.y=1-r.y),r}set needsUpdate(r){r===!0&&(this.version++,this.source.needsUpdate=!0)}};Hi.DEFAULT_IMAGE=null;Hi.DEFAULT_MAPPING=qD;Hi.DEFAULT_ANISOTROPY=1;var Jr=class{constructor(r=0,e=0,i=0,n=1){Jr.prototype.isVector4=!0,this.x=r,this.y=e,this.z=i,this.w=n}get width(){return this.z}set width(r){this.z=r}get height(){return this.w}set height(r){this.w=r}set(r,e,i,n){return this.x=r,this.y=e,this.z=i,this.w=n,this}setScalar(r){return this.x=r,this.y=r,this.z=r,this.w=r,this}setX(r){return this.x=r,this}setY(r){return this.y=r,this}setZ(r){return this.z=r,this}setW(r){return this.w=r,this}setComponent(r,e){switch(r){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+r)}return this}getComponent(r){switch(r){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+r)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(r){return this.x=r.x,this.y=r.y,this.z=r.z,this.w=r.w!==void 0?r.w:1,this}add(r){return this.x+=r.x,this.y+=r.y,this.z+=r.z,this.w+=r.w,this}addScalar(r){return this.x+=r,this.y+=r,this.z+=r,this.w+=r,this}addVectors(r,e){return this.x=r.x+e.x,this.y=r.y+e.y,this.z=r.z+e.z,this.w=r.w+e.w,this}addScaledVector(r,e){return this.x+=r.x*e,this.y+=r.y*e,this.z+=r.z*e,this.w+=r.w*e,this}sub(r){return this.x-=r.x,this.y-=r.y,this.z-=r.z,this.w-=r.w,this}subScalar(r){return this.x-=r,this.y-=r,this.z-=r,this.w-=r,this}subVectors(r,e){return this.x=r.x-e.x,this.y=r.y-e.y,this.z=r.z-e.z,this.w=r.w-e.w,this}multiply(r){return this.x*=r.x,this.y*=r.y,this.z*=r.z,this.w*=r.w,this}multiplyScalar(r){return this.x*=r,this.y*=r,this.z*=r,this.w*=r,this}applyMatrix4(r){let e=this.x,i=this.y,n=this.z,s=this.w,a=r.elements;return this.x=a[0]*e+a[4]*i+a[8]*n+a[12]*s,this.y=a[1]*e+a[5]*i+a[9]*n+a[13]*s,this.z=a[2]*e+a[6]*i+a[10]*n+a[14]*s,this.w=a[3]*e+a[7]*i+a[11]*n+a[15]*s,this}divideScalar(r){return this.multiplyScalar(1/r)}setAxisAngleFromQuaternion(r){this.w=2*Math.acos(r.w);let e=Math.sqrt(1-r.w*r.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=r.x/e,this.y=r.y/e,this.z=r.z/e),this}setAxisAngleFromRotationMatrix(r){let e,i,n,s,l=r.elements,c=l[0],u=l[4],h=l[8],p=l[1],d=l[5],f=l[9],m=l[2],g=l[6],y=l[10];if(Math.abs(u-p)<.01&&Math.abs(h-m)<.01&&Math.abs(f-g)<.01){if(Math.abs(u+p)<.1&&Math.abs(h+m)<.1&&Math.abs(f+g)<.1&&Math.abs(c+d+y-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let b=(c+1)/2,x=(d+1)/2,S=(y+1)/2,D=(u+p)/4,P=(h+m)/4,_=(f+g)/4;return b>x&&b>S?b<.01?(i=0,n=.707106781,s=.707106781):(i=Math.sqrt(b),n=D/i,s=P/i):x>S?x<.01?(i=.707106781,n=0,s=.707106781):(n=Math.sqrt(x),i=D/n,s=_/n):S<.01?(i=.707106781,n=.707106781,s=0):(s=Math.sqrt(S),i=P/s,n=_/s),this.set(i,n,s,e),this}let E=Math.sqrt((g-f)*(g-f)+(h-m)*(h-m)+(p-u)*(p-u));return Math.abs(E)<.001&&(E=1),this.x=(g-f)/E,this.y=(h-m)/E,this.z=(p-u)/E,this.w=Math.acos((c+d+y-1)/2),this}min(r){return this.x=Math.min(this.x,r.x),this.y=Math.min(this.y,r.y),this.z=Math.min(this.z,r.z),this.w=Math.min(this.w,r.w),this}max(r){return this.x=Math.max(this.x,r.x),this.y=Math.max(this.y,r.y),this.z=Math.max(this.z,r.z),this.w=Math.max(this.w,r.w),this}clamp(r,e){return this.x=Math.max(r.x,Math.min(e.x,this.x)),this.y=Math.max(r.y,Math.min(e.y,this.y)),this.z=Math.max(r.z,Math.min(e.z,this.z)),this.w=Math.max(r.w,Math.min(e.w,this.w)),this}clampScalar(r,e){return this.x=Math.max(r,Math.min(e,this.x)),this.y=Math.max(r,Math.min(e,this.y)),this.z=Math.max(r,Math.min(e,this.z)),this.w=Math.max(r,Math.min(e,this.w)),this}clampLength(r,e){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(r,Math.min(e,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(r){return this.x*r.x+this.y*r.y+this.z*r.z+this.w*r.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(r){return this.normalize().multiplyScalar(r)}lerp(r,e){return this.x+=(r.x-this.x)*e,this.y+=(r.y-this.y)*e,this.z+=(r.z-this.z)*e,this.w+=(r.w-this.w)*e,this}lerpVectors(r,e,i){return this.x=r.x+(e.x-r.x)*i,this.y=r.y+(e.y-r.y)*i,this.z=r.z+(e.z-r.z)*i,this.w=r.w+(e.w-r.w)*i,this}equals(r){return r.x===this.x&&r.y===this.y&&r.z===this.z&&r.w===this.w}fromArray(r,e=0){return this.x=r[e],this.y=r[e+1],this.z=r[e+2],this.w=r[e+3],this}toArray(r=[],e=0){return r[e]=this.x,r[e+1]=this.y,r[e+2]=this.z,r[e+3]=this.w,r}fromBufferAttribute(r,e){return this.x=r.getX(e),this.y=r.getY(e),this.z=r.getZ(e),this.w=r.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},kr=class extends Ra{constructor(r=1,e=1,i={}){super(),this.isWebGLRenderTarget=!0,this.width=r,this.height=e,this.depth=1,this.scissor=new Jr(0,0,r,e),this.scissorTest=!1,this.viewport=new Jr(0,0,r,e);let n={width:r,height:e,depth:1};this.texture=new Hi(n,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!1,this.texture.internalFormat=i.internalFormat!==void 0?i.internalFormat:null,this.texture.minFilter=i.minFilter!==void 0?i.minFilter:ai,this.depthBuffer=i.depthBuffer!==void 0?i.depthBuffer:!0,this.stencilBuffer=i.stencilBuffer!==void 0?i.stencilBuffer:!1,this.depthTexture=i.depthTexture!==void 0?i.depthTexture:null,this.samples=i.samples!==void 0?i.samples:0}setSize(r,e,i=1){(this.width!==r||this.height!==e||this.depth!==i)&&(this.width=r,this.height=e,this.depth=i,this.texture.image.width=r,this.texture.image.height=e,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,r,e),this.scissor.set(0,0,r,e)}clone(){return new this.constructor().copy(this)}copy(r){this.width=r.width,this.height=r.height,this.depth=r.depth,this.viewport.copy(r.viewport),this.texture=r.texture.clone(),this.texture.isRenderTargetTexture=!0;let e=Object.assign({},r.texture.image);return this.texture.source=new Mc(e),this.depthBuffer=r.depthBuffer,this.stencilBuffer=r.stencilBuffer,r.depthTexture!==null&&(this.depthTexture=r.depthTexture.clone()),this.samples=r.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},Ry=class extends Hi{constructor(r=null,e=1,i=1,n=1){super(null),this.isDataArrayTexture=!0,this.image={data:r,width:e,height:i,depth:n},this.magFilter=Di,this.minFilter=Di,this.wrapR=mn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},r4=class extends kr{constructor(r=1,e=1,i=1){super(r,e),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new Ry(null,r,e,i),this.texture.isRenderTargetTexture=!0}},rx=class extends Hi{constructor(r=null,e=1,i=1,n=1){super(null),this.isData3DTexture=!0,this.image={data:r,width:e,height:i,depth:n},this.magFilter=Di,this.minFilter=Di,this.wrapR=mn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},i4=class extends kr{constructor(r=1,e=1,i=1){super(r,e),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new rx(null,r,e,i),this.texture.isRenderTargetTexture=!0}},n4=class extends kr{constructor(r=1,e=1,i=1,n={}){super(r,e,n),this.isWebGLMultipleRenderTargets=!0;let s=this.texture;this.texture=[];for(let a=0;a=0?1:-1,b=1-y*y;if(b>Number.EPSILON){let S=Math.sqrt(b),D=Math.atan2(S,y*E);g=Math.sin(g*D)/S,o=Math.sin(o*D)/S}let x=o*E;if(l=l*g+p*x,c=c*g+d*x,u=u*g+f*x,h=h*g+m*x,g===1-o){let S=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=S,c*=S,u*=S,h*=S}}r[e]=l,r[e+1]=c,r[e+2]=u,r[e+3]=h}static multiplyQuaternionsFlat(r,e,i,n,s,a){let o=i[n],l=i[n+1],c=i[n+2],u=i[n+3],h=s[a],p=s[a+1],d=s[a+2],f=s[a+3];return r[e]=o*f+u*h+l*d-c*p,r[e+1]=l*f+u*p+c*h-o*d,r[e+2]=c*f+u*d+o*p-l*h,r[e+3]=u*f-o*h-l*p-c*d,r}get x(){return this._x}set x(r){this._x=r,this._onChangeCallback()}get y(){return this._y}set y(r){this._y=r,this._onChangeCallback()}get z(){return this._z}set z(r){this._z=r,this._onChangeCallback()}get w(){return this._w}set w(r){this._w=r,this._onChangeCallback()}set(r,e,i,n){return this._x=r,this._y=e,this._z=i,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(r){return this._x=r.x,this._y=r.y,this._z=r.z,this._w=r.w,this._onChangeCallback(),this}setFromEuler(r,e){let i=r._x,n=r._y,s=r._z,a=r._order,o=Math.cos,l=Math.sin,c=o(i/2),u=o(n/2),h=o(s/2),p=l(i/2),d=l(n/2),f=l(s/2);switch(a){case"XYZ":this._x=p*u*h+c*d*f,this._y=c*d*h-p*u*f,this._z=c*u*f+p*d*h,this._w=c*u*h-p*d*f;break;case"YXZ":this._x=p*u*h+c*d*f,this._y=c*d*h-p*u*f,this._z=c*u*f-p*d*h,this._w=c*u*h+p*d*f;break;case"ZXY":this._x=p*u*h-c*d*f,this._y=c*d*h+p*u*f,this._z=c*u*f+p*d*h,this._w=c*u*h-p*d*f;break;case"ZYX":this._x=p*u*h-c*d*f,this._y=c*d*h+p*u*f,this._z=c*u*f-p*d*h,this._w=c*u*h+p*d*f;break;case"YZX":this._x=p*u*h+c*d*f,this._y=c*d*h+p*u*f,this._z=c*u*f-p*d*h,this._w=c*u*h-p*d*f;break;case"XZY":this._x=p*u*h-c*d*f,this._y=c*d*h-p*u*f,this._z=c*u*f+p*d*h,this._w=c*u*h+p*d*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return e!==!1&&this._onChangeCallback(),this}setFromAxisAngle(r,e){let i=e/2,n=Math.sin(i);return this._x=r.x*n,this._y=r.y*n,this._z=r.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(r){let e=r.elements,i=e[0],n=e[4],s=e[8],a=e[1],o=e[5],l=e[9],c=e[2],u=e[6],h=e[10],p=i+o+h;if(p>0){let d=.5/Math.sqrt(p+1);this._w=.25/d,this._x=(u-l)*d,this._y=(s-c)*d,this._z=(a-n)*d}else if(i>o&&i>h){let d=2*Math.sqrt(1+i-o-h);this._w=(u-l)/d,this._x=.25*d,this._y=(n+a)/d,this._z=(s+c)/d}else if(o>h){let d=2*Math.sqrt(1+o-i-h);this._w=(s-c)/d,this._x=(n+a)/d,this._y=.25*d,this._z=(l+u)/d}else{let d=2*Math.sqrt(1+h-i-o);this._w=(a-n)/d,this._x=(s+c)/d,this._y=(l+u)/d,this._z=.25*d}return this._onChangeCallback(),this}setFromUnitVectors(r,e){let i=r.dot(e)+1;return iMath.abs(r.z)?(this._x=-r.y,this._y=r.x,this._z=0,this._w=i):(this._x=0,this._y=-r.z,this._z=r.y,this._w=i)):(this._x=r.y*e.z-r.z*e.y,this._y=r.z*e.x-r.x*e.z,this._z=r.x*e.y-r.y*e.x,this._w=i),this.normalize()}angleTo(r){return 2*Math.acos(Math.abs(Qn(this.dot(r),-1,1)))}rotateTowards(r,e){let i=this.angleTo(r);if(i===0)return this;let n=Math.min(1,e/i);return this.slerp(r,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(r){return this._x*r._x+this._y*r._y+this._z*r._z+this._w*r._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let r=this.length();return r===0?(this._x=0,this._y=0,this._z=0,this._w=1):(r=1/r,this._x=this._x*r,this._y=this._y*r,this._z=this._z*r,this._w=this._w*r),this._onChangeCallback(),this}multiply(r){return this.multiplyQuaternions(this,r)}premultiply(r){return this.multiplyQuaternions(r,this)}multiplyQuaternions(r,e){let i=r._x,n=r._y,s=r._z,a=r._w,o=e._x,l=e._y,c=e._z,u=e._w;return this._x=i*u+a*o+n*c-s*l,this._y=n*u+a*l+s*o-i*c,this._z=s*u+a*c+i*l-n*o,this._w=a*u-i*o-n*l-s*c,this._onChangeCallback(),this}slerp(r,e){if(e===0)return this;if(e===1)return this.copy(r);let i=this._x,n=this._y,s=this._z,a=this._w,o=a*r._w+i*r._x+n*r._y+s*r._z;if(o<0?(this._w=-r._w,this._x=-r._x,this._y=-r._y,this._z=-r._z,o=-o):this.copy(r),o>=1)return this._w=a,this._x=i,this._y=n,this._z=s,this;let l=1-o*o;if(l<=Number.EPSILON){let d=1-e;return this._w=d*a+e*this._w,this._x=d*i+e*this._x,this._y=d*n+e*this._y,this._z=d*s+e*this._z,this.normalize(),this._onChangeCallback(),this}let c=Math.sqrt(l),u=Math.atan2(c,o),h=Math.sin((1-e)*u)/c,p=Math.sin(e*u)/c;return this._w=a*h+this._w*p,this._x=i*h+this._x*p,this._y=n*h+this._y*p,this._z=s*h+this._z*p,this._onChangeCallback(),this}slerpQuaternions(r,e,i){return this.copy(r).slerp(e,i)}random(){let r=Math.random(),e=Math.sqrt(1-r),i=Math.sqrt(r),n=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(e*Math.cos(n),i*Math.sin(s),i*Math.cos(s),e*Math.sin(n))}equals(r){return r._x===this._x&&r._y===this._y&&r._z===this._z&&r._w===this._w}fromArray(r,e=0){return this._x=r[e],this._y=r[e+1],this._z=r[e+2],this._w=r[e+3],this._onChangeCallback(),this}toArray(r=[],e=0){return r[e]=this._x,r[e+1]=this._y,r[e+2]=this._z,r[e+3]=this._w,r}fromBufferAttribute(r,e){return this._x=r.getX(e),this._y=r.getY(e),this._z=r.getZ(e),this._w=r.getW(e),this}_onChange(r){return this._onChangeCallback=r,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},A=class{constructor(r=0,e=0,i=0){A.prototype.isVector3=!0,this.x=r,this.y=e,this.z=i}set(r,e,i){return i===void 0&&(i=this.z),this.x=r,this.y=e,this.z=i,this}setScalar(r){return this.x=r,this.y=r,this.z=r,this}setX(r){return this.x=r,this}setY(r){return this.y=r,this}setZ(r){return this.z=r,this}setComponent(r,e){switch(r){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+r)}return this}getComponent(r){switch(r){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+r)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(r){return this.x=r.x,this.y=r.y,this.z=r.z,this}add(r){return this.x+=r.x,this.y+=r.y,this.z+=r.z,this}addScalar(r){return this.x+=r,this.y+=r,this.z+=r,this}addVectors(r,e){return this.x=r.x+e.x,this.y=r.y+e.y,this.z=r.z+e.z,this}addScaledVector(r,e){return this.x+=r.x*e,this.y+=r.y*e,this.z+=r.z*e,this}sub(r){return this.x-=r.x,this.y-=r.y,this.z-=r.z,this}subScalar(r){return this.x-=r,this.y-=r,this.z-=r,this}subVectors(r,e){return this.x=r.x-e.x,this.y=r.y-e.y,this.z=r.z-e.z,this}multiply(r){return this.x*=r.x,this.y*=r.y,this.z*=r.z,this}multiplyScalar(r){return this.x*=r,this.y*=r,this.z*=r,this}multiplyVectors(r,e){return this.x=r.x*e.x,this.y=r.y*e.y,this.z=r.z*e.z,this}applyEuler(r){return this.applyQuaternion(tce.setFromEuler(r))}applyAxisAngle(r,e){return this.applyQuaternion(tce.setFromAxisAngle(r,e))}applyMatrix3(r){let e=this.x,i=this.y,n=this.z,s=r.elements;return this.x=s[0]*e+s[3]*i+s[6]*n,this.y=s[1]*e+s[4]*i+s[7]*n,this.z=s[2]*e+s[5]*i+s[8]*n,this}applyNormalMatrix(r){return this.applyMatrix3(r).normalize()}applyMatrix4(r){let e=this.x,i=this.y,n=this.z,s=r.elements,a=1/(s[3]*e+s[7]*i+s[11]*n+s[15]);return this.x=(s[0]*e+s[4]*i+s[8]*n+s[12])*a,this.y=(s[1]*e+s[5]*i+s[9]*n+s[13])*a,this.z=(s[2]*e+s[6]*i+s[10]*n+s[14])*a,this}applyQuaternion(r){let e=this.x,i=this.y,n=this.z,s=r.x,a=r.y,o=r.z,l=r.w,c=l*e+a*n-o*i,u=l*i+o*e-s*n,h=l*n+s*i-a*e,p=-s*e-a*i-o*n;return this.x=c*l+p*-s+u*-o-h*-a,this.y=u*l+p*-a+h*-s-c*-o,this.z=h*l+p*-o+c*-a-u*-s,this}project(r){return this.applyMatrix4(r.matrixWorldInverse).applyMatrix4(r.projectionMatrix)}unproject(r){return this.applyMatrix4(r.projectionMatrixInverse).applyMatrix4(r.matrixWorld)}transformDirection(r){let e=this.x,i=this.y,n=this.z,s=r.elements;return this.x=s[0]*e+s[4]*i+s[8]*n,this.y=s[1]*e+s[5]*i+s[9]*n,this.z=s[2]*e+s[6]*i+s[10]*n,this.normalize()}divide(r){return this.x/=r.x,this.y/=r.y,this.z/=r.z,this}divideScalar(r){return this.multiplyScalar(1/r)}min(r){return this.x=Math.min(this.x,r.x),this.y=Math.min(this.y,r.y),this.z=Math.min(this.z,r.z),this}max(r){return this.x=Math.max(this.x,r.x),this.y=Math.max(this.y,r.y),this.z=Math.max(this.z,r.z),this}clamp(r,e){return this.x=Math.max(r.x,Math.min(e.x,this.x)),this.y=Math.max(r.y,Math.min(e.y,this.y)),this.z=Math.max(r.z,Math.min(e.z,this.z)),this}clampScalar(r,e){return this.x=Math.max(r,Math.min(e,this.x)),this.y=Math.max(r,Math.min(e,this.y)),this.z=Math.max(r,Math.min(e,this.z)),this}clampLength(r,e){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(r,Math.min(e,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(r){return this.x*r.x+this.y*r.y+this.z*r.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(r){return this.normalize().multiplyScalar(r)}lerp(r,e){return this.x+=(r.x-this.x)*e,this.y+=(r.y-this.y)*e,this.z+=(r.z-this.z)*e,this}lerpVectors(r,e,i){return this.x=r.x+(e.x-r.x)*i,this.y=r.y+(e.y-r.y)*i,this.z=r.z+(e.z-r.z)*i,this}cross(r){return this.crossVectors(this,r)}crossVectors(r,e){let i=r.x,n=r.y,s=r.z,a=e.x,o=e.y,l=e.z;return this.x=n*l-s*o,this.y=s*a-i*l,this.z=i*o-n*a,this}projectOnVector(r){let e=r.lengthSq();if(e===0)return this.set(0,0,0);let i=r.dot(this)/e;return this.copy(r).multiplyScalar(i)}projectOnPlane(r){return K6.copy(this).projectOnVector(r),this.sub(K6)}reflect(r){return this.sub(K6.copy(r).multiplyScalar(2*this.dot(r)))}angleTo(r){let e=Math.sqrt(this.lengthSq()*r.lengthSq());if(e===0)return Math.PI/2;let i=this.dot(r)/e;return Math.acos(Qn(i,-1,1))}distanceTo(r){return Math.sqrt(this.distanceToSquared(r))}distanceToSquared(r){let e=this.x-r.x,i=this.y-r.y,n=this.z-r.z;return e*e+i*i+n*n}manhattanDistanceTo(r){return Math.abs(this.x-r.x)+Math.abs(this.y-r.y)+Math.abs(this.z-r.z)}setFromSpherical(r){return this.setFromSphericalCoords(r.radius,r.phi,r.theta)}setFromSphericalCoords(r,e,i){let n=Math.sin(e)*r;return this.x=n*Math.sin(i),this.y=Math.cos(e)*r,this.z=n*Math.cos(i),this}setFromCylindrical(r){return this.setFromCylindricalCoords(r.radius,r.theta,r.y)}setFromCylindricalCoords(r,e,i){return this.x=r*Math.sin(e),this.y=i,this.z=r*Math.cos(e),this}setFromMatrixPosition(r){let e=r.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(r){let e=this.setFromMatrixColumn(r,0).length(),i=this.setFromMatrixColumn(r,1).length(),n=this.setFromMatrixColumn(r,2).length();return this.x=e,this.y=i,this.z=n,this}setFromMatrixColumn(r,e){return this.fromArray(r.elements,e*4)}setFromMatrix3Column(r,e){return this.fromArray(r.elements,e*3)}setFromEuler(r){return this.x=r._x,this.y=r._y,this.z=r._z,this}equals(r){return r.x===this.x&&r.y===this.y&&r.z===this.z}fromArray(r,e=0){return this.x=r[e],this.y=r[e+1],this.z=r[e+2],this}toArray(r=[],e=0){return r[e]=this.x,r[e+1]=this.y,r[e+2]=this.z,r}fromBufferAttribute(r,e){return this.x=r.getX(e),this.y=r.getY(e),this.z=r.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let r=(Math.random()-.5)*2,e=Math.random()*Math.PI*2,i=Math.sqrt(1-Gh(r,2));return this.x=i*Math.cos(e),this.y=i*Math.sin(e),this.z=r,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},K6=new A,tce=new Or,Ot=class{constructor(r=new A(1/0,1/0,1/0),e=new A(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=r,this.max=e}set(r,e){return this.min.copy(r),this.max.copy(e),this}setFromArray(r){let e=1/0,i=1/0,n=1/0,s=-1/0,a=-1/0,o=-1/0;for(let l=0,c=r.length;ls&&(s=u),h>a&&(a=h),p>o&&(o=p)}return this.min.set(e,i,n),this.max.set(s,a,o),this}setFromBufferAttribute(r){let e=1/0,i=1/0,n=1/0,s=-1/0,a=-1/0,o=-1/0;for(let l=0,c=r.count;ls&&(s=u),h>a&&(a=h),p>o&&(o=p)}return this.min.set(e,i,n),this.max.set(s,a,o),this}setFromPoints(r){this.makeEmpty();for(let e=0,i=r.length;ethis.max.x||r.ythis.max.y||r.zthis.max.z)}containsBox(r){return this.min.x<=r.min.x&&r.max.x<=this.max.x&&this.min.y<=r.min.y&&r.max.y<=this.max.y&&this.min.z<=r.min.z&&r.max.z<=this.max.z}getParameter(r,e){return e.set((r.x-this.min.x)/(this.max.x-this.min.x),(r.y-this.min.y)/(this.max.y-this.min.y),(r.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(r){return!(r.max.xthis.max.x||r.max.ythis.max.y||r.max.zthis.max.z)}intersectsSphere(r){return this.clampPoint(r.center,Qm),Qm.distanceToSquared(r.center)<=r.radius*r.radius}intersectsPlane(r){let e,i;return r.normal.x>0?(e=r.normal.x*this.min.x,i=r.normal.x*this.max.x):(e=r.normal.x*this.max.x,i=r.normal.x*this.min.x),r.normal.y>0?(e+=r.normal.y*this.min.y,i+=r.normal.y*this.max.y):(e+=r.normal.y*this.max.y,i+=r.normal.y*this.min.y),r.normal.z>0?(e+=r.normal.z*this.min.z,i+=r.normal.z*this.max.z):(e+=r.normal.z*this.max.z,i+=r.normal.z*this.min.z),e<=-r.constant&&i>=-r.constant}intersectsTriangle(r){if(this.isEmpty())return!1;this.getCenter(Pb),RM.subVectors(this.max,Pb),ny.subVectors(r.a,Pb),sy.subVectors(r.b,Pb),ay.subVectors(r.c,Pb),Kd.subVectors(sy,ny),Jd.subVectors(ay,sy),eg.subVectors(ny,ay);let e=[0,-Kd.z,Kd.y,0,-Jd.z,Jd.y,0,-eg.z,eg.y,Kd.z,0,-Kd.x,Jd.z,0,-Jd.x,eg.z,0,-eg.x,-Kd.y,Kd.x,0,-Jd.y,Jd.x,0,-eg.y,eg.x,0];return!Q6(e,ny,sy,ay,RM)||(e=[1,0,0,0,1,0,0,0,1],!Q6(e,ny,sy,ay,RM))?!1:(MM.crossVectors(Kd,Jd),e=[MM.x,MM.y,MM.z],Q6(e,ny,sy,ay,RM))}clampPoint(r,e){return e.copy(r).clamp(this.min,this.max)}distanceToPoint(r){return Qm.copy(r).clamp(this.min,this.max).sub(r).length()}getBoundingSphere(r){return this.getCenter(r.center),r.radius=this.getSize(Qm).length()*.5,r}intersect(r){return this.min.max(r.min),this.max.min(r.max),this.isEmpty()&&this.makeEmpty(),this}union(r){return this.min.min(r.min),this.max.max(r.max),this}applyMatrix4(r){return this.isEmpty()?this:(np[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(r),np[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(r),np[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(r),np[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(r),np[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(r),np[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(r),np[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(r),np[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(r),this.setFromPoints(np),this)}translate(r){return this.min.add(r),this.max.add(r),this}equals(r){return r.min.equals(this.min)&&r.max.equals(this.max)}},np=[new A,new A,new A,new A,new A,new A,new A,new A],Qm=new A,J6=new Ot,ny=new A,sy=new A,ay=new A,Kd=new A,Jd=new A,eg=new A,Pb=new A,RM=new A,MM=new A,tg=new A;function Q6(t,r,e,i,n){for(let s=0,a=t.length-3;s<=a;s+=3){tg.fromArray(t,s);let o=n.x*Math.abs(tg.x)+n.y*Math.abs(tg.y)+n.z*Math.abs(tg.z),l=r.dot(tg),c=e.dot(tg),u=i.dot(tg);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>o)return!1}return!0}var Dpt=new Ot,Nb=new A,eH=new A,zi=class{constructor(r=new A,e=-1){this.center=r,this.radius=e}set(r,e){return this.center.copy(r),this.radius=e,this}setFromPoints(r,e){let i=this.center;e!==void 0?i.copy(e):Dpt.setFromPoints(r).getCenter(i);let n=0;for(let s=0,a=r.length;sthis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(r){return this.isEmpty()?(r.makeEmpty(),r):(r.set(this.center,this.center),r.expandByScalar(this.radius),r)}applyMatrix4(r){return this.center.applyMatrix4(r),this.radius=this.radius*r.getMaxScaleOnAxis(),this}translate(r){return this.center.add(r),this}expandByPoint(r){if(this.isEmpty())return this.center.copy(r),this.radius=0,this;Nb.subVectors(r,this.center);let e=Nb.lengthSq();if(e>this.radius*this.radius){let i=Math.sqrt(e),n=(i-this.radius)*.5;this.center.addScaledVector(Nb,n/i),this.radius+=n}return this}union(r){return r.isEmpty()?this:this.isEmpty()?(this.copy(r),this):(this.center.equals(r.center)===!0?this.radius=Math.max(this.radius,r.radius):(eH.subVectors(r.center,this.center).setLength(r.radius),this.expandByPoint(Nb.copy(r.center).add(eH)),this.expandByPoint(Nb.copy(r.center).sub(eH))),this)}equals(r){return r.center.equals(this.center)&&r.radius===this.radius}clone(){return new this.constructor().copy(this)}},sp=new A,tH=new A,DM=new A,Qd=new A,rH=new A,CM=new A,iH=new A,Vo=class{constructor(r=new A,e=new A(0,0,-1)){this.origin=r,this.direction=e}set(r,e){return this.origin.copy(r),this.direction.copy(e),this}copy(r){return this.origin.copy(r.origin),this.direction.copy(r.direction),this}at(r,e){return e.copy(this.direction).multiplyScalar(r).add(this.origin)}lookAt(r){return this.direction.copy(r).sub(this.origin).normalize(),this}recast(r){return this.origin.copy(this.at(r,sp)),this}closestPointToPoint(r,e){e.subVectors(r,this.origin);let i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(i).add(this.origin)}distanceToPoint(r){return Math.sqrt(this.distanceSqToPoint(r))}distanceSqToPoint(r){let e=sp.subVectors(r,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(r):(sp.copy(this.direction).multiplyScalar(e).add(this.origin),sp.distanceToSquared(r))}distanceSqToSegment(r,e,i,n){tH.copy(r).add(e).multiplyScalar(.5),DM.copy(e).sub(r).normalize(),Qd.copy(this.origin).sub(tH);let s=r.distanceTo(e)*.5,a=-this.direction.dot(DM),o=Qd.dot(this.direction),l=-Qd.dot(DM),c=Qd.lengthSq(),u=Math.abs(1-a*a),h,p,d,f;if(u>0)if(h=a*l-o,p=a*o-l,f=s*u,h>=0)if(p>=-f)if(p<=f){let m=1/u;h*=m,p*=m,d=h*(h+a*p+2*o)+p*(a*h+p+2*l)+c}else p=s,h=Math.max(0,-(a*p+o)),d=-h*h+p*(p+2*l)+c;else p=-s,h=Math.max(0,-(a*p+o)),d=-h*h+p*(p+2*l)+c;else p<=-f?(h=Math.max(0,-(-a*s+o)),p=h>0?-s:Math.min(Math.max(-s,-l),s),d=-h*h+p*(p+2*l)+c):p<=f?(h=0,p=Math.min(Math.max(-s,-l),s),d=p*(p+2*l)+c):(h=Math.max(0,-(a*s+o)),p=h>0?s:Math.min(Math.max(-s,-l),s),d=-h*h+p*(p+2*l)+c);else p=a>0?-s:s,h=Math.max(0,-(a*p+o)),d=-h*h+p*(p+2*l)+c;return i&&i.copy(this.direction).multiplyScalar(h).add(this.origin),n&&n.copy(DM).multiplyScalar(p).add(tH),d}intersectSphere(r,e){sp.subVectors(r.center,this.origin);let i=sp.dot(this.direction),n=sp.dot(sp)-i*i,s=r.radius*r.radius;if(n>s)return null;let a=Math.sqrt(s-n),o=i-a,l=i+a;return o<0&&l<0?null:o<0?this.at(l,e):this.at(o,e)}intersectsSphere(r){return this.distanceSqToPoint(r.center)<=r.radius*r.radius}distanceToPlane(r){let e=r.normal.dot(this.direction);if(e===0)return r.distanceToPoint(this.origin)===0?0:null;let i=-(this.origin.dot(r.normal)+r.constant)/e;return i>=0?i:null}intersectPlane(r,e){let i=this.distanceToPlane(r);return i===null?null:this.at(i,e)}intersectsPlane(r){let e=r.distanceToPoint(this.origin);return e===0||r.normal.dot(this.direction)*e<0}intersectBox(r,e){let i,n,s,a,o,l,c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,p=this.origin;return c>=0?(i=(r.min.x-p.x)*c,n=(r.max.x-p.x)*c):(i=(r.max.x-p.x)*c,n=(r.min.x-p.x)*c),u>=0?(s=(r.min.y-p.y)*u,a=(r.max.y-p.y)*u):(s=(r.max.y-p.y)*u,a=(r.min.y-p.y)*u),i>a||s>n||((s>i||isNaN(i))&&(i=s),(a=0?(o=(r.min.z-p.z)*h,l=(r.max.z-p.z)*h):(o=(r.max.z-p.z)*h,l=(r.min.z-p.z)*h),i>l||o>n)||((o>i||i!==i)&&(i=o),(l=0?i:n,e)}intersectsBox(r){return this.intersectBox(r,sp)!==null}intersectTriangle(r,e,i,n,s){rH.subVectors(e,r),CM.subVectors(i,r),iH.crossVectors(rH,CM);let a=this.direction.dot(iH),o;if(a>0){if(n)return null;o=1}else if(a<0)o=-1,a=-a;else return null;Qd.subVectors(this.origin,r);let l=o*this.direction.dot(CM.crossVectors(Qd,CM));if(l<0)return null;let c=o*this.direction.dot(rH.cross(Qd));if(c<0||l+c>a)return null;let u=-o*Qd.dot(iH);return u<0?null:this.at(u/a,s)}applyMatrix4(r){return this.origin.applyMatrix4(r),this.direction.transformDirection(r),this}equals(r){return r.origin.equals(this.origin)&&r.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Ue=class{constructor(){Ue.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(r,e,i,n,s,a,o,l,c,u,h,p,d,f,m,g){let y=this.elements;return y[0]=r,y[4]=e,y[8]=i,y[12]=n,y[1]=s,y[5]=a,y[9]=o,y[13]=l,y[2]=c,y[6]=u,y[10]=h,y[14]=p,y[3]=d,y[7]=f,y[11]=m,y[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Ue().fromArray(this.elements)}copy(r){let e=this.elements,i=r.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this}copyPosition(r){let e=this.elements,i=r.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this}setFromMatrix3(r){let e=r.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(r,e,i){return r.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(r,e,i){return this.set(r.x,e.x,i.x,0,r.y,e.y,i.y,0,r.z,e.z,i.z,0,0,0,0,1),this}extractRotation(r){let e=this.elements,i=r.elements,n=1/oy.setFromMatrixColumn(r,0).length(),s=1/oy.setFromMatrixColumn(r,1).length(),a=1/oy.setFromMatrixColumn(r,2).length();return e[0]=i[0]*n,e[1]=i[1]*n,e[2]=i[2]*n,e[3]=0,e[4]=i[4]*s,e[5]=i[5]*s,e[6]=i[6]*s,e[7]=0,e[8]=i[8]*a,e[9]=i[9]*a,e[10]=i[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(r){let e=this.elements,i=r.x,n=r.y,s=r.z,a=Math.cos(i),o=Math.sin(i),l=Math.cos(n),c=Math.sin(n),u=Math.cos(s),h=Math.sin(s);if(r.order==="XYZ"){let p=a*u,d=a*h,f=o*u,m=o*h;e[0]=l*u,e[4]=-l*h,e[8]=c,e[1]=d+f*c,e[5]=p-m*c,e[9]=-o*l,e[2]=m-p*c,e[6]=f+d*c,e[10]=a*l}else if(r.order==="YXZ"){let p=l*u,d=l*h,f=c*u,m=c*h;e[0]=p+m*o,e[4]=f*o-d,e[8]=a*c,e[1]=a*h,e[5]=a*u,e[9]=-o,e[2]=d*o-f,e[6]=m+p*o,e[10]=a*l}else if(r.order==="ZXY"){let p=l*u,d=l*h,f=c*u,m=c*h;e[0]=p-m*o,e[4]=-a*h,e[8]=f+d*o,e[1]=d+f*o,e[5]=a*u,e[9]=m-p*o,e[2]=-a*c,e[6]=o,e[10]=a*l}else if(r.order==="ZYX"){let p=a*u,d=a*h,f=o*u,m=o*h;e[0]=l*u,e[4]=f*c-d,e[8]=p*c+m,e[1]=l*h,e[5]=m*c+p,e[9]=d*c-f,e[2]=-c,e[6]=o*l,e[10]=a*l}else if(r.order==="YZX"){let p=a*l,d=a*c,f=o*l,m=o*c;e[0]=l*u,e[4]=m-p*h,e[8]=f*h+d,e[1]=h,e[5]=a*u,e[9]=-o*u,e[2]=-c*u,e[6]=d*h+f,e[10]=p-m*h}else if(r.order==="XZY"){let p=a*l,d=a*c,f=o*l,m=o*c;e[0]=l*u,e[4]=-h,e[8]=c*u,e[1]=p*h+m,e[5]=a*u,e[9]=d*h-f,e[2]=f*h-d,e[6]=o*u,e[10]=m*h+p}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(r){return this.compose(Cpt,r,Apt)}lookAt(r,e,i){let n=this.elements;return Uo.subVectors(r,e),Uo.lengthSq()===0&&(Uo.z=1),Uo.normalize(),ef.crossVectors(i,Uo),ef.lengthSq()===0&&(Math.abs(i.z)===1?Uo.x+=1e-4:Uo.z+=1e-4,Uo.normalize(),ef.crossVectors(i,Uo)),ef.normalize(),AM.crossVectors(Uo,ef),n[0]=ef.x,n[4]=AM.x,n[8]=Uo.x,n[1]=ef.y,n[5]=AM.y,n[9]=Uo.y,n[2]=ef.z,n[6]=AM.z,n[10]=Uo.z,this}multiply(r){return this.multiplyMatrices(this,r)}premultiply(r){return this.multiplyMatrices(r,this)}multiplyMatrices(r,e){let i=r.elements,n=e.elements,s=this.elements,a=i[0],o=i[4],l=i[8],c=i[12],u=i[1],h=i[5],p=i[9],d=i[13],f=i[2],m=i[6],g=i[10],y=i[14],E=i[3],b=i[7],x=i[11],S=i[15],D=n[0],P=n[4],_=n[8],w=n[12],F=n[1],X=n[5],H=n[9],he=n[13],C=n[2],N=n[6],k=n[10],G=n[14],U=n[3],j=n[7],ee=n[11],ae=n[15];return s[0]=a*D+o*F+l*C+c*U,s[4]=a*P+o*X+l*N+c*j,s[8]=a*_+o*H+l*k+c*ee,s[12]=a*w+o*he+l*G+c*ae,s[1]=u*D+h*F+p*C+d*U,s[5]=u*P+h*X+p*N+d*j,s[9]=u*_+h*H+p*k+d*ee,s[13]=u*w+h*he+p*G+d*ae,s[2]=f*D+m*F+g*C+y*U,s[6]=f*P+m*X+g*N+y*j,s[10]=f*_+m*H+g*k+y*ee,s[14]=f*w+m*he+g*G+y*ae,s[3]=E*D+b*F+x*C+S*U,s[7]=E*P+b*X+x*N+S*j,s[11]=E*_+b*H+x*k+S*ee,s[15]=E*w+b*he+x*G+S*ae,this}multiplyScalar(r){let e=this.elements;return e[0]*=r,e[4]*=r,e[8]*=r,e[12]*=r,e[1]*=r,e[5]*=r,e[9]*=r,e[13]*=r,e[2]*=r,e[6]*=r,e[10]*=r,e[14]*=r,e[3]*=r,e[7]*=r,e[11]*=r,e[15]*=r,this}determinant(){let r=this.elements,e=r[0],i=r[4],n=r[8],s=r[12],a=r[1],o=r[5],l=r[9],c=r[13],u=r[2],h=r[6],p=r[10],d=r[14],f=r[3],m=r[7],g=r[11],y=r[15];return f*(+s*l*h-n*c*h-s*o*p+i*c*p+n*o*d-i*l*d)+m*(+e*l*d-e*c*p+s*a*p-n*a*d+n*c*u-s*l*u)+g*(+e*c*h-e*o*d-s*a*h+i*a*d+s*o*u-i*c*u)+y*(-n*o*u-e*l*h+e*o*p+n*a*h-i*a*p+i*l*u)}transpose(){let r=this.elements,e;return e=r[1],r[1]=r[4],r[4]=e,e=r[2],r[2]=r[8],r[8]=e,e=r[6],r[6]=r[9],r[9]=e,e=r[3],r[3]=r[12],r[12]=e,e=r[7],r[7]=r[13],r[13]=e,e=r[11],r[11]=r[14],r[14]=e,this}setPosition(r,e,i){let n=this.elements;return r.isVector3?(n[12]=r.x,n[13]=r.y,n[14]=r.z):(n[12]=r,n[13]=e,n[14]=i),this}invert(){let r=this.elements,e=r[0],i=r[1],n=r[2],s=r[3],a=r[4],o=r[5],l=r[6],c=r[7],u=r[8],h=r[9],p=r[10],d=r[11],f=r[12],m=r[13],g=r[14],y=r[15],E=h*g*c-m*p*c+m*l*d-o*g*d-h*l*y+o*p*y,b=f*p*c-u*g*c-f*l*d+a*g*d+u*l*y-a*p*y,x=u*m*c-f*h*c+f*o*d-a*m*d-u*o*y+a*h*y,S=f*h*l-u*m*l-f*o*p+a*m*p+u*o*g-a*h*g,D=e*E+i*b+n*x+s*S;if(D===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let P=1/D;return r[0]=E*P,r[1]=(m*p*s-h*g*s-m*n*d+i*g*d+h*n*y-i*p*y)*P,r[2]=(o*g*s-m*l*s+m*n*c-i*g*c-o*n*y+i*l*y)*P,r[3]=(h*l*s-o*p*s-h*n*c+i*p*c+o*n*d-i*l*d)*P,r[4]=b*P,r[5]=(u*g*s-f*p*s+f*n*d-e*g*d-u*n*y+e*p*y)*P,r[6]=(f*l*s-a*g*s-f*n*c+e*g*c+a*n*y-e*l*y)*P,r[7]=(a*p*s-u*l*s+u*n*c-e*p*c-a*n*d+e*l*d)*P,r[8]=x*P,r[9]=(f*h*s-u*m*s-f*i*d+e*m*d+u*i*y-e*h*y)*P,r[10]=(a*m*s-f*o*s+f*i*c-e*m*c-a*i*y+e*o*y)*P,r[11]=(u*o*s-a*h*s-u*i*c+e*h*c+a*i*d-e*o*d)*P,r[12]=S*P,r[13]=(u*m*n-f*h*n+f*i*p-e*m*p-u*i*g+e*h*g)*P,r[14]=(f*o*n-a*m*n-f*i*l+e*m*l+a*i*g-e*o*g)*P,r[15]=(a*h*n-u*o*n+u*i*l-e*h*l-a*i*p+e*o*p)*P,this}scale(r){let e=this.elements,i=r.x,n=r.y,s=r.z;return e[0]*=i,e[4]*=n,e[8]*=s,e[1]*=i,e[5]*=n,e[9]*=s,e[2]*=i,e[6]*=n,e[10]*=s,e[3]*=i,e[7]*=n,e[11]*=s,this}getMaxScaleOnAxis(){let r=this.elements,e=r[0]*r[0]+r[1]*r[1]+r[2]*r[2],i=r[4]*r[4]+r[5]*r[5]+r[6]*r[6],n=r[8]*r[8]+r[9]*r[9]+r[10]*r[10];return Math.sqrt(Math.max(e,i,n))}makeTranslation(r,e,i){return this.set(1,0,0,r,0,1,0,e,0,0,1,i,0,0,0,1),this}makeRotationX(r){let e=Math.cos(r),i=Math.sin(r);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}makeRotationY(r){let e=Math.cos(r),i=Math.sin(r);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}makeRotationZ(r){let e=Math.cos(r),i=Math.sin(r);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(r,e){let i=Math.cos(e),n=Math.sin(e),s=1-i,a=r.x,o=r.y,l=r.z,c=s*a,u=s*o;return this.set(c*a+i,c*o-n*l,c*l+n*o,0,c*o+n*l,u*o+i,u*l-n*a,0,c*l-n*o,u*l+n*a,s*l*l+i,0,0,0,0,1),this}makeScale(r,e,i){return this.set(r,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}makeShear(r,e,i,n,s,a){return this.set(1,i,s,0,r,1,a,0,e,n,1,0,0,0,0,1),this}compose(r,e,i){let n=this.elements,s=e._x,a=e._y,o=e._z,l=e._w,c=s+s,u=a+a,h=o+o,p=s*c,d=s*u,f=s*h,m=a*u,g=a*h,y=o*h,E=l*c,b=l*u,x=l*h,S=i.x,D=i.y,P=i.z;return n[0]=(1-(m+y))*S,n[1]=(d+x)*S,n[2]=(f-b)*S,n[3]=0,n[4]=(d-x)*D,n[5]=(1-(p+y))*D,n[6]=(g+E)*D,n[7]=0,n[8]=(f+b)*P,n[9]=(g-E)*P,n[10]=(1-(p+m))*P,n[11]=0,n[12]=r.x,n[13]=r.y,n[14]=r.z,n[15]=1,this}decompose(r,e,i){let n=this.elements,s=oy.set(n[0],n[1],n[2]).length(),a=oy.set(n[4],n[5],n[6]).length(),o=oy.set(n[8],n[9],n[10]).length();this.determinant()<0&&(s=-s),r.x=n[12],r.y=n[13],r.z=n[14],Sc.copy(this);let c=1/s,u=1/a,h=1/o;return Sc.elements[0]*=c,Sc.elements[1]*=c,Sc.elements[2]*=c,Sc.elements[4]*=u,Sc.elements[5]*=u,Sc.elements[6]*=u,Sc.elements[8]*=h,Sc.elements[9]*=h,Sc.elements[10]*=h,e.setFromRotationMatrix(Sc),i.x=s,i.y=a,i.z=o,this}makePerspective(r,e,i,n,s,a){let o=this.elements,l=2*s/(e-r),c=2*s/(i-n),u=(e+r)/(e-r),h=(i+n)/(i-n),p=-(a+s)/(a-s),d=-2*a*s/(a-s);return o[0]=l,o[4]=0,o[8]=u,o[12]=0,o[1]=0,o[5]=c,o[9]=h,o[13]=0,o[2]=0,o[6]=0,o[10]=p,o[14]=d,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(r,e,i,n,s,a){let o=this.elements,l=1/(e-r),c=1/(i-n),u=1/(a-s),h=(e+r)*l,p=(i+n)*c,d=(a+s)*u;return o[0]=2*l,o[4]=0,o[8]=0,o[12]=-h,o[1]=0,o[5]=2*c,o[9]=0,o[13]=-p,o[2]=0,o[6]=0,o[10]=-2*u,o[14]=-d,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(r){let e=this.elements,i=r.elements;for(let n=0;n<16;n++)if(e[n]!==i[n])return!1;return!0}fromArray(r,e=0){for(let i=0;i<16;i++)this.elements[i]=r[i+e];return this}toArray(r=[],e=0){let i=this.elements;return r[e]=i[0],r[e+1]=i[1],r[e+2]=i[2],r[e+3]=i[3],r[e+4]=i[4],r[e+5]=i[5],r[e+6]=i[6],r[e+7]=i[7],r[e+8]=i[8],r[e+9]=i[9],r[e+10]=i[10],r[e+11]=i[11],r[e+12]=i[12],r[e+13]=i[13],r[e+14]=i[14],r[e+15]=i[15],r}},oy=new A,Sc=new Ue,Cpt=new A(0,0,0),Apt=new A(1,1,1),ef=new A,AM=new A,Uo=new A,rce=new Ue,ice=new Or,Sr=class{constructor(r=0,e=0,i=0,n=Sr.DEFAULT_ORDER){this.isEuler=!0,this._x=r,this._y=e,this._z=i,this._order=n}get x(){return this._x}set x(r){this._x=r,this._onChangeCallback()}get y(){return this._y}set y(r){this._y=r,this._onChangeCallback()}get z(){return this._z}set z(r){this._z=r,this._onChangeCallback()}get order(){return this._order}set order(r){this._order=r,this._onChangeCallback()}set(r,e,i,n=this._order){return this._x=r,this._y=e,this._z=i,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(r){return this._x=r._x,this._y=r._y,this._z=r._z,this._order=r._order,this._onChangeCallback(),this}setFromRotationMatrix(r,e=this._order,i=!0){let n=r.elements,s=n[0],a=n[4],o=n[8],l=n[1],c=n[5],u=n[9],h=n[2],p=n[6],d=n[10];switch(e){case"XYZ":this._y=Math.asin(Qn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(p,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Qn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(o,d),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,s),this._z=0);break;case"ZXY":this._x=Math.asin(Qn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Qn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(p,d),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(Qn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-h,s)):(this._x=0,this._y=Math.atan2(o,d));break;case"XZY":this._z=Math.asin(-Qn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(p,c),this._y=Math.atan2(o,s)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,i===!0&&this._onChangeCallback(),this}setFromQuaternion(r,e,i){return rce.makeRotationFromQuaternion(r),this.setFromRotationMatrix(rce,e,i)}setFromVector3(r,e=this._order){return this.set(r.x,r.y,r.z,e)}reorder(r){return ice.setFromEuler(this),this.setFromQuaternion(ice,r)}equals(r){return r._x===this._x&&r._y===this._y&&r._z===this._z&&r._order===this._order}fromArray(r){return this._x=r[0],this._y=r[1],this._z=r[2],r[3]!==void 0&&(this._order=r[3]),this._onChangeCallback(),this}toArray(r=[],e=0){return r[e]=this._x,r[e+1]=this._y,r[e+2]=this._z,r[e+3]=this._order,r}_onChange(r){return this._onChangeCallback=r,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};Sr.DEFAULT_ORDER="XYZ";var My=class{constructor(){this.mask=1}set(r){this.mask=(1<>>0}enable(r){this.mask|=1<1){for(let e=0;e1){for(let i=0;i0&&(i=i.concat(a))}return i}getWorldPosition(r){return this.updateWorldMatrix(!0,!1),r.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(r){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Lb,r,Ppt),r}getWorldScale(r){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Lb,Npt,r),r}getWorldDirection(r){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return r.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(r){r(this);let e=this.children;for(let i=0,n=e.length;i0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(n.instanceColor=this.instanceColor.toJSON()));function s(o,l){return o[l.uuid]===void 0&&(o[l.uuid]=l.toJSON(r)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(r).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(n.environment=this.environment.toJSON(r).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=s(r.geometries,this.geometry);let o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){let l=o.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){n.children=[];for(let o=0;o0){n.animations=[];for(let o=0;o0&&(i.geometries=o),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),u.length>0&&(i.images=u),h.length>0&&(i.shapes=h),p.length>0&&(i.skeletons=p),d.length>0&&(i.animations=d),f.length>0&&(i.nodes=f)}return i.object=n,i;function a(o){let l=[];for(let c in o){let u=o[c];delete u.metadata,l.push(u)}return l}}clone(r){return new this.constructor().copy(this,r)}copy(r,e=!0){if(this.name=r.name,this.up.copy(r.up),this.position.copy(r.position),this.rotation.order=r.rotation.order,this.quaternion.copy(r.quaternion),this.scale.copy(r.scale),this.matrix.copy(r.matrix),this.matrixWorld.copy(r.matrixWorld),this.matrixAutoUpdate=r.matrixAutoUpdate,this.matrixWorldNeedsUpdate=r.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=r.matrixWorldAutoUpdate,this.layers.mask=r.layers.mask,this.visible=r.visible,this.castShadow=r.castShadow,this.receiveShadow=r.receiveShadow,this.frustumCulled=r.frustumCulled,this.renderOrder=r.renderOrder,this.userData=JSON.parse(JSON.stringify(r.userData)),e===!0)for(let i=0;i0?n.multiplyScalar(1/Math.sqrt(s)):n.set(0,0,0)}static getBarycoord(r,e,i,n,s){_c.subVectors(n,e),op.subVectors(i,e),nH.subVectors(r,e);let a=_c.dot(_c),o=_c.dot(op),l=_c.dot(nH),c=op.dot(op),u=op.dot(nH),h=a*c-o*o;if(h===0)return s.set(-2,-1,-1);let p=1/h,d=(c*l-o*u)*p,f=(a*u-o*l)*p;return s.set(1-d-f,f,d)}static containsPoint(r,e,i,n){return this.getBarycoord(r,e,i,n,lp),lp.x>=0&&lp.y>=0&&lp.x+lp.y<=1}static getUV(r,e,i,n,s,a,o,l){return this.getBarycoord(r,e,i,n,lp),l.set(0,0),l.addScaledVector(s,lp.x),l.addScaledVector(a,lp.y),l.addScaledVector(o,lp.z),l}static isFrontFacing(r,e,i,n){return _c.subVectors(i,e),op.subVectors(r,e),_c.cross(op).dot(n)<0}set(r,e,i){return this.a.copy(r),this.b.copy(e),this.c.copy(i),this}setFromPointsAndIndices(r,e,i,n){return this.a.copy(r[e]),this.b.copy(r[i]),this.c.copy(r[n]),this}setFromAttributeAndIndices(r,e,i,n){return this.a.fromBufferAttribute(r,e),this.b.fromBufferAttribute(r,i),this.c.fromBufferAttribute(r,n),this}clone(){return new this.constructor().copy(this)}copy(r){return this.a.copy(r.a),this.b.copy(r.b),this.c.copy(r.c),this}getArea(){return _c.subVectors(this.c,this.b),op.subVectors(this.a,this.b),_c.cross(op).length()*.5}getMidpoint(r){return r.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(r){return un.getNormal(this.a,this.b,this.c,r)}getPlane(r){return r.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(r,e){return un.getBarycoord(r,this.a,this.b,this.c,e)}getUV(r,e,i,n,s){return un.getUV(r,this.a,this.b,this.c,e,i,n,s)}containsPoint(r){return un.containsPoint(r,this.a,this.b,this.c)}isFrontFacing(r){return un.isFrontFacing(this.a,this.b,this.c,r)}intersectsBox(r){return r.intersectsTriangle(this)}closestPointToPoint(r,e){let i=this.a,n=this.b,s=this.c,a,o;cy.subVectors(n,i),uy.subVectors(s,i),sH.subVectors(r,i);let l=cy.dot(sH),c=uy.dot(sH);if(l<=0&&c<=0)return e.copy(i);aH.subVectors(r,n);let u=cy.dot(aH),h=uy.dot(aH);if(u>=0&&h<=u)return e.copy(n);let p=l*h-u*c;if(p<=0&&l>=0&&u<=0)return a=l/(l-u),e.copy(i).addScaledVector(cy,a);oH.subVectors(r,s);let d=cy.dot(oH),f=uy.dot(oH);if(f>=0&&d<=f)return e.copy(s);let m=d*c-l*f;if(m<=0&&c>=0&&f<=0)return o=c/(c-f),e.copy(i).addScaledVector(uy,o);let g=u*f-d*h;if(g<=0&&h-u>=0&&d-f>=0)return cce.subVectors(s,n),o=(h-u)/(h-u+(d-f)),e.copy(n).addScaledVector(cce,o);let y=1/(g+m+p);return a=m*y,o=p*y,e.copy(i).addScaledVector(cy,a).addScaledVector(uy,o)}equals(r){return r.a.equals(this.a)&&r.b.equals(this.b)&&r.c.equals(this.c)}},Fpt=0,Gr=class extends Ra{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Fpt++}),this.uuid=ko(),this.name="",this.type="Material",this.blending=pg,this.side=en,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=Ix,this.blendDst=SU,this.blendEquation=Sa,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=yD,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=ohe,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=gD,this.stencilZFail=gD,this.stencilZPass=gD,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(r){this._alphaTest>0!=r>0&&this.version++,this._alphaTest=r}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(r){if(r!==void 0)for(let e in r){let i=r[e];if(i===void 0){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}let n=this[e];if(n===void 0){console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.");continue}n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]=i}}toJSON(r){let e=r===void 0||typeof r=="string";e&&(r={textures:{},images:{}});let i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(r).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(r).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(r).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(r).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(r).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(r).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(r).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(r).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(r).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(r).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(r).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(r).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(r).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(r).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(r).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(r).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(r).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(r).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(r).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(r).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(r).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(r).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(r).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==pg&&(i.blending=this.blending),this.side!==en&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(i.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(i.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=this.flatShading),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function n(s){let a=[];for(let o in s){let l=s[o];delete l.metadata,a.push(l)}return a}if(e){let s=n(r.textures),a=n(r.images);s.length>0&&(i.textures=s),a.length>0&&(i.images=a)}return i}clone(){return new this.constructor().copy(this)}copy(r){this.name=r.name,this.blending=r.blending,this.side=r.side,this.vertexColors=r.vertexColors,this.opacity=r.opacity,this.transparent=r.transparent,this.blendSrc=r.blendSrc,this.blendDst=r.blendDst,this.blendEquation=r.blendEquation,this.blendSrcAlpha=r.blendSrcAlpha,this.blendDstAlpha=r.blendDstAlpha,this.blendEquationAlpha=r.blendEquationAlpha,this.depthFunc=r.depthFunc,this.depthTest=r.depthTest,this.depthWrite=r.depthWrite,this.stencilWriteMask=r.stencilWriteMask,this.stencilFunc=r.stencilFunc,this.stencilRef=r.stencilRef,this.stencilFuncMask=r.stencilFuncMask,this.stencilFail=r.stencilFail,this.stencilZFail=r.stencilZFail,this.stencilZPass=r.stencilZPass,this.stencilWrite=r.stencilWrite;let e=r.clippingPlanes,i=null;if(e!==null){let n=e.length;i=new Array(n);for(let s=0;s!==n;++s)i[s]=e[s].clone()}return this.clippingPlanes=i,this.clipIntersection=r.clipIntersection,this.clipShadows=r.clipShadows,this.shadowSide=r.shadowSide,this.colorWrite=r.colorWrite,this.precision=r.precision,this.polygonOffset=r.polygonOffset,this.polygonOffsetFactor=r.polygonOffsetFactor,this.polygonOffsetUnits=r.polygonOffsetUnits,this.dithering=r.dithering,this.alphaTest=r.alphaTest,this.alphaToCoverage=r.alphaToCoverage,this.premultipliedAlpha=r.premultipliedAlpha,this.forceSinglePass=r.forceSinglePass,this.visible=r.visible,this.toneMapped=r.toneMapped,this.userData=JSON.parse(JSON.stringify(r.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(r){r===!0&&this.version++}},or=class extends Gr{constructor(r){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Ve(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Sx,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.specularMap=r.specularMap,this.alphaMap=r.alphaMap,this.envMap=r.envMap,this.combine=r.combine,this.reflectivity=r.reflectivity,this.refractionRatio=r.refractionRatio,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.fog=r.fog,this}},us=new A,PM=new le,jt=class{constructor(r,e,i=!1){if(Array.isArray(r))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=r,this.itemSize=e,this.count=r!==void 0?r.length/e:0,this.normalized=i,this.usage=Jb,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(r){r===!0&&this.version++}setUsage(r){return this.usage=r,this}copy(r){return this.name=r.name,this.array=new r.array.constructor(r.array),this.itemSize=r.itemSize,this.count=r.count,this.normalized=r.normalized,this.usage=r.usage,this}copyAt(r,e,i){r*=this.itemSize,i*=e.itemSize;for(let n=0,s=this.itemSize;n0&&(r.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(r[c]=l[c]);return r}r.data={attributes:{}};let e=this.index;e!==null&&(r.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});let i=this.attributes;for(let l in i){let c=i[l];r.data.attributes[l]=c.toJSON(r.data)}let n={},s=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],u=[];for(let h=0,p=c.length;h0&&(n[l]=u,s=!0)}s&&(r.data.morphAttributes=n,r.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(r.data.groups=JSON.parse(JSON.stringify(a)));let o=this.boundingSphere;return o!==null&&(r.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),r}clone(){return new this.constructor().copy(this)}copy(r){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=r.name;let i=r.index;i!==null&&this.setIndex(i.clone(e));let n=r.attributes;for(let c in n){let u=n[c];this.setAttribute(c,u.clone(e))}let s=r.morphAttributes;for(let c in s){let u=[],h=s[c];for(let p=0,d=h.length;p0){let n=e[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;se.far?null:{distance:c,point:UM.clone(),object:t}}function BM(t,r,e,i,n,s,a,o,l){t.getVertexPosition(a,Hb),t.getVertexPosition(o,Ub),t.getVertexPosition(l,Bb);let c=Upt(t,r,e,i,Hb,Ub,Bb,hH);if(c){n&&(LM.fromBufferAttribute(n,a),FM.fromBufferAttribute(n,o),HM.fromBufferAttribute(n,l),c.uv=un.getUV(hH,Hb,Ub,Bb,LM,FM,HM,new le)),s&&(LM.fromBufferAttribute(s,a),FM.fromBufferAttribute(s,o),HM.fromBufferAttribute(s,l),c.uv2=un.getUV(hH,Hb,Ub,Bb,LM,FM,HM,new le));let u={a,b:o,c:l,normal:new A,materialIndex:0};un.getNormal(Hb,Ub,Bb,u.normal),c.face=u}return c}var Qa=class extends it{constructor(r=1,e=1,i=1,n=1,s=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:r,height:e,depth:i,widthSegments:n,heightSegments:s,depthSegments:a};let o=this;n=Math.floor(n),s=Math.floor(s),a=Math.floor(a);let l=[],c=[],u=[],h=[],p=0,d=0;f("z","y","x",-1,-1,i,e,r,a,s,0),f("z","y","x",1,-1,i,e,-r,a,s,1),f("x","z","y",1,1,r,i,e,n,a,2),f("x","z","y",1,-1,r,i,-e,n,a,3),f("x","y","z",1,-1,r,e,i,n,s,4),f("x","y","z",-1,-1,r,e,-i,n,s,5),this.setIndex(l),this.setAttribute("position",new ct(c,3)),this.setAttribute("normal",new ct(u,3)),this.setAttribute("uv",new ct(h,2));function f(m,g,y,E,b,x,S,D,P,_,w){let F=x/P,X=S/_,H=x/2,he=S/2,C=D/2,N=P+1,k=_+1,G=0,U=0,j=new A;for(let ee=0;ee0?1:-1,u.push(j.x,j.y,j.z),h.push(se/P),h.push(1-ee/_),G+=1}}for(let ee=0;ee<_;ee++)for(let ae=0;ae0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;let i={};for(let n in this.extensions)this.extensions[n]===!0&&(i[n]=!0);return Object.keys(i).length>0&&(e.extensions=i),e}},vg=class extends pr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Ue,this.projectionMatrix=new Ue,this.projectionMatrixInverse=new Ue}copy(r,e){return super.copy(r,e),this.matrixWorldInverse.copy(r.matrixWorldInverse),this.projectionMatrix.copy(r.projectionMatrix),this.projectionMatrixInverse.copy(r.projectionMatrixInverse),this}getWorldDirection(r){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return r.set(-e[8],-e[9],-e[10]).normalize()}updateMatrixWorld(r){super.updateMatrixWorld(r),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(r,e){super.updateWorldMatrix(r,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}},qr=class extends vg{constructor(r=50,e=1,i=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=r,this.zoom=1,this.near=i,this.far=n,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(r,e){return super.copy(r,e),this.fov=r.fov,this.zoom=r.zoom,this.near=r.near,this.far=r.far,this.focus=r.focus,this.aspect=r.aspect,this.view=r.view===null?null:Object.assign({},r.view),this.filmGauge=r.filmGauge,this.filmOffset=r.filmOffset,this}setFocalLength(r){let e=.5*this.getFilmHeight()/r;this.fov=Qb*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){let r=Math.tan(dg*.5*this.fov);return .5*this.getFilmHeight()/r}getEffectiveFOV(){return Qb*2*Math.atan(Math.tan(dg*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(r,e,i,n,s,a){this.aspect=r/e,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=r,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let r=this.near,e=r*Math.tan(dg*.5*this.fov)/this.zoom,i=2*e,n=this.aspect*i,s=-.5*n,a=this.view;if(this.view!==null&&this.view.enabled){let l=a.fullWidth,c=a.fullHeight;s+=a.offsetX*n/l,e-=a.offsetY*i/c,n*=a.width/l,i*=a.height/c}let o=this.filmOffset;o!==0&&(s+=r*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+n,e,e-i,r,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(r){let e=super.toJSON(r);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}},dy=-90,fy=1,bD=class extends pr{constructor(r,e,i){super(),this.type="CubeCamera",this.renderTarget=i;let n=new qr(dy,fy,r,e);n.layers=this.layers,n.up.set(0,1,0),n.lookAt(1,0,0),this.add(n);let s=new qr(dy,fy,r,e);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(-1,0,0),this.add(s);let a=new qr(dy,fy,r,e);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(0,1,0),this.add(a);let o=new qr(dy,fy,r,e);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(0,-1,0),this.add(o);let l=new qr(dy,fy,r,e);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,1),this.add(l);let c=new qr(dy,fy,r,e);c.layers=this.layers,c.up.set(0,1,0),c.lookAt(0,0,-1),this.add(c)}update(r,e){this.parent===null&&this.updateMatrixWorld();let i=this.renderTarget,[n,s,a,o,l,c]=this.children,u=r.getRenderTarget(),h=r.toneMapping,p=r.xr.enabled;r.toneMapping=Lu,r.xr.enabled=!1;let d=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,r.setRenderTarget(i,0),r.render(e,n),r.setRenderTarget(i,1),r.render(e,s),r.setRenderTarget(i,2),r.render(e,a),r.setRenderTarget(i,3),r.render(e,o),r.setRenderTarget(i,4),r.render(e,l),i.texture.generateMipmaps=d,r.setRenderTarget(i,5),r.render(e,c),r.setRenderTarget(u),r.toneMapping=h,r.xr.enabled=p,i.texture.needsPMREMUpdate=!0}},yg=class extends Hi{constructor(r,e,i,n,s,a,o,l,c,u){r=r!==void 0?r:[],e=e!==void 0?e:sf,super(r,e,i,n,s,a,o,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(r){this.image=r}},xD=class extends kr{constructor(r=1,e={}){super(r,r,e),this.isWebGLCubeRenderTarget=!0;let i={width:r,height:r,depth:1},n=[i,i,i,i,i,i];this.texture=new yg(n,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=e.generateMipmaps!==void 0?e.generateMipmaps:!1,this.texture.minFilter=e.minFilter!==void 0?e.minFilter:ai}fromEquirectangularTexture(r,e){this.texture.type=e.type,this.texture.encoding=e.encoding,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;let i={uniforms:{tEquirect:{value:null}},vertexShader:` - - varying vec3 vWorldDirection; - - vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); - - } - - void main() { - - vWorldDirection = transformDirection( position, modelMatrix ); - - #include - #include - - } - `,fragmentShader:` - - uniform sampler2D tEquirect; - - varying vec3 vWorldDirection; - - #include - - void main() { - - vec3 direction = normalize( vWorldDirection ); - - vec2 sampleUV = equirectUv( direction ); - - gl_FragColor = texture2D( tEquirect, sampleUV ); - - } - `},n=new Qa(5,5,5),s=new Yt({name:"CubemapFromEquirect",uniforms:Dy(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Gn,blending:Fi});s.uniforms.tEquirect.value=e;let a=new Je(n,s),o=e.minFilter;return e.minFilter===wa&&(e.minFilter=ai),new bD(1,10,this).update(r,a),e.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(r,e,i,n){let s=r.getRenderTarget();for(let a=0;a<6;a++)r.setRenderTarget(this,a),r.clear(e,i,n);r.setRenderTarget(s)}},pH=new A,Vpt=new A,zpt=new Qi,Ei=class{constructor(r=new A(1,0,0),e=0){this.isPlane=!0,this.normal=r,this.constant=e}set(r,e){return this.normal.copy(r),this.constant=e,this}setComponents(r,e,i,n){return this.normal.set(r,e,i),this.constant=n,this}setFromNormalAndCoplanarPoint(r,e){return this.normal.copy(r),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(r,e,i){let n=pH.subVectors(i,e).cross(Vpt.subVectors(r,e)).normalize();return this.setFromNormalAndCoplanarPoint(n,r),this}copy(r){return this.normal.copy(r.normal),this.constant=r.constant,this}normalize(){let r=1/this.normal.length();return this.normal.multiplyScalar(r),this.constant*=r,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(r){return this.normal.dot(r)+this.constant}distanceToSphere(r){return this.distanceToPoint(r.center)-r.radius}projectPoint(r,e){return e.copy(this.normal).multiplyScalar(-this.distanceToPoint(r)).add(r)}intersectLine(r,e){let i=r.delta(pH),n=this.normal.dot(i);if(n===0)return this.distanceToPoint(r.start)===0?e.copy(r.start):null;let s=-(r.start.dot(this.normal)+this.constant)/n;return s<0||s>1?null:e.copy(i).multiplyScalar(s).add(r.start)}intersectsLine(r){let e=this.distanceToPoint(r.start),i=this.distanceToPoint(r.end);return e<0&&i>0||i<0&&e>0}intersectsBox(r){return r.intersectsPlane(this)}intersectsSphere(r){return r.intersectsPlane(this)}coplanarPoint(r){return r.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(r,e){let i=e||zpt.getNormalMatrix(r),n=this.coplanarPoint(pH).applyMatrix4(r),s=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(s),this}translate(r){return this.constant-=r.dot(this.normal),this}equals(r){return r.normal.equals(this.normal)&&r.constant===this.constant}clone(){return new this.constructor().copy(this)}},my=new zi,kM=new A,eo=class{constructor(r=new Ei,e=new Ei,i=new Ei,n=new Ei,s=new Ei,a=new Ei){this.planes=[r,e,i,n,s,a]}set(r,e,i,n,s,a){let o=this.planes;return o[0].copy(r),o[1].copy(e),o[2].copy(i),o[3].copy(n),o[4].copy(s),o[5].copy(a),this}copy(r){let e=this.planes;for(let i=0;i<6;i++)e[i].copy(r.planes[i]);return this}setFromProjectionMatrix(r){let e=this.planes,i=r.elements,n=i[0],s=i[1],a=i[2],o=i[3],l=i[4],c=i[5],u=i[6],h=i[7],p=i[8],d=i[9],f=i[10],m=i[11],g=i[12],y=i[13],E=i[14],b=i[15];return e[0].setComponents(o-n,h-l,m-p,b-g).normalize(),e[1].setComponents(o+n,h+l,m+p,b+g).normalize(),e[2].setComponents(o+s,h+c,m+d,b+y).normalize(),e[3].setComponents(o-s,h-c,m-d,b-y).normalize(),e[4].setComponents(o-a,h-u,m-f,b-E).normalize(),e[5].setComponents(o+a,h+u,m+f,b+E).normalize(),this}intersectsObject(r){let e=r.geometry;return e.boundingSphere===null&&e.computeBoundingSphere(),my.copy(e.boundingSphere).applyMatrix4(r.matrixWorld),this.intersectsSphere(my)}intersectsSprite(r){return my.center.set(0,0,0),my.radius=.7071067811865476,my.applyMatrix4(r.matrixWorld),this.intersectsSphere(my)}intersectsSphere(r){let e=this.planes,i=r.center,n=-r.radius;for(let s=0;s<6;s++)if(e[s].distanceToPoint(i)0?r.max.x:r.min.x,kM.y=n.normal.y>0?r.max.y:r.min.y,kM.z=n.normal.z>0?r.max.z:r.min.z,n.distanceToPoint(kM)<0)return!1}return!0}containsPoint(r){let e=this.planes;for(let i=0;i<6;i++)if(e[i].distanceToPoint(r)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function phe(){let t=null,r=!1,e=null,i=null;function n(s,a){e(s,a),i=t.requestAnimationFrame(n)}return{start:function(){r!==!0&&e!==null&&(i=t.requestAnimationFrame(n),r=!0)},stop:function(){t.cancelAnimationFrame(i),r=!1},setAnimationLoop:function(s){e=s},setContext:function(s){t=s}}}function jpt(t,r){let e=r.isWebGL2,i=new WeakMap;function n(c,u){let h=c.array,p=c.usage,d=t.createBuffer();t.bindBuffer(u,d),t.bufferData(u,h,p),c.onUploadCallback();let f;if(h instanceof Float32Array)f=5126;else if(h instanceof Uint16Array)if(c.isFloat16BufferAttribute)if(e)f=5131;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else f=5123;else if(h instanceof Int16Array)f=5122;else if(h instanceof Uint32Array)f=5125;else if(h instanceof Int32Array)f=5124;else if(h instanceof Int8Array)f=5120;else if(h instanceof Uint8Array)f=5121;else if(h instanceof Uint8ClampedArray)f=5121;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+h);return{buffer:d,type:f,bytesPerElement:h.BYTES_PER_ELEMENT,version:c.version}}function s(c,u,h){let p=u.array,d=u.updateRange;t.bindBuffer(h,c),d.count===-1?t.bufferSubData(h,0,p):(e?t.bufferSubData(h,d.offset*p.BYTES_PER_ELEMENT,p,d.offset,d.count):t.bufferSubData(h,d.offset*p.BYTES_PER_ELEMENT,p.subarray(d.offset,d.offset+d.count)),d.count=-1),u.onUploadCallback()}function a(c){return c.isInterleavedBufferAttribute&&(c=c.data),i.get(c)}function o(c){c.isInterleavedBufferAttribute&&(c=c.data);let u=i.get(c);u&&(t.deleteBuffer(u.buffer),i.delete(c))}function l(c,u){if(c.isGLBufferAttribute){let p=i.get(c);(!p||p.version 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; - return cross( v1, v2 ) * theta_sintheta; -} -vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { - vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; - vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; - vec3 lightNormal = cross( v1, v2 ); - if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); - vec3 T1, T2; - T1 = normalize( V - N * dot( V, N ) ); - T2 = - cross( N, T1 ); - mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); - vec3 coords[ 4 ]; - coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); - coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); - coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); - coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); - coords[ 0 ] = normalize( coords[ 0 ] ); - coords[ 1 ] = normalize( coords[ 1 ] ); - coords[ 2 ] = normalize( coords[ 2 ] ); - coords[ 3 ] = normalize( coords[ 3 ] ); - vec3 vectorFormFactor = vec3( 0.0 ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); - float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); - return vec3( result ); -} -float G_BlinnPhong_Implicit( ) { - return 0.25; -} -float D_BlinnPhong( const in float shininess, const in float dotNH ) { - return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); -} -vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNH = saturate( dot( normal, halfDir ) ); - float dotVH = saturate( dot( viewDir, halfDir ) ); - vec3 F = F_Schlick( specularColor, 1.0, dotVH ); - float G = G_BlinnPhong_Implicit( ); - float D = D_BlinnPhong( shininess, dotNH ); - return F * ( G * D ); -} -#if defined( USE_SHEEN ) -float D_Charlie( float roughness, float dotNH ) { - float alpha = pow2( roughness ); - float invAlpha = 1.0 / alpha; - float cos2h = dotNH * dotNH; - float sin2h = max( 1.0 - cos2h, 0.0078125 ); - return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); -} -float V_Neubelt( float dotNV, float dotNL ) { - return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); -} -vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float D = D_Charlie( sheenRoughness, dotNH ); - float V = V_Neubelt( dotNV, dotNL ); - return sheenColor * ( D * V ); -} -#endif`,edt=`#ifdef USE_IRIDESCENCE - const mat3 XYZ_TO_REC709 = mat3( - 3.2404542, -0.9692660, 0.0556434, - -1.5371385, 1.8760108, -0.2040259, - -0.4985314, 0.0415560, 1.0572252 - ); - vec3 Fresnel0ToIor( vec3 fresnel0 ) { - vec3 sqrtF0 = sqrt( fresnel0 ); - return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); - } - vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { - return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); - } - float IorToFresnel0( float transmittedIor, float incidentIor ) { - return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); - } - vec3 evalSensitivity( float OPD, vec3 shift ) { - float phase = 2.0 * PI * OPD * 1.0e-9; - vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); - vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); - vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); - vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); - xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) ); - xyz /= 1.0685e-7; - vec3 rgb = XYZ_TO_REC709 * xyz; - return rgb; - } - vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { - vec3 I; - float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); - float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); - float cosTheta2Sq = 1.0 - sinTheta2Sq; - if ( cosTheta2Sq < 0.0 ) { - return vec3( 1.0 ); - } - float cosTheta2 = sqrt( cosTheta2Sq ); - float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); - float R12 = F_Schlick( R0, 1.0, cosTheta1 ); - float R21 = R12; - float T121 = 1.0 - R12; - float phi12 = 0.0; - if ( iridescenceIOR < outsideIOR ) phi12 = PI; - float phi21 = PI - phi12; - vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); - vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); - vec3 phi23 = vec3( 0.0 ); - if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; - if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; - if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; - float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; - vec3 phi = vec3( phi21 ) + phi23; - vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); - vec3 r123 = sqrt( R123 ); - vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); - vec3 C0 = R12 + Rs; - I = C0; - vec3 Cm = Rs - T121; - for ( int m = 1; m <= 2; ++ m ) { - Cm *= r123; - vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); - I += Cm * Sm; - } - return max( I, vec3( 0.0 ) ); - } -#endif`,tdt=`#ifdef USE_BUMPMAP - uniform sampler2D bumpMap; - uniform float bumpScale; - vec2 dHdxy_fwd() { - vec2 dSTdx = dFdx( vUv ); - vec2 dSTdy = dFdy( vUv ); - float Hll = bumpScale * texture2D( bumpMap, vUv ).x; - float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll; - float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll; - return vec2( dBx, dBy ); - } - vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { - vec3 vSigmaX = dFdx( surf_pos.xyz ); - vec3 vSigmaY = dFdy( surf_pos.xyz ); - vec3 vN = surf_norm; - vec3 R1 = cross( vSigmaY, vN ); - vec3 R2 = cross( vN, vSigmaX ); - float fDet = dot( vSigmaX, R1 ) * faceDirection; - vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); - return normalize( abs( fDet ) * surf_norm - vGrad ); - } -#endif`,rdt=`#if NUM_CLIPPING_PLANES > 0 - vec4 plane; - #pragma unroll_loop_start - for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; - } - #pragma unroll_loop_end - #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES - bool clipped = true; - #pragma unroll_loop_start - for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; - } - #pragma unroll_loop_end - if ( clipped ) discard; - #endif -#endif`,idt=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; - uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,ndt=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; -#endif`,sdt=`#if NUM_CLIPPING_PLANES > 0 - vClipPosition = - mvPosition.xyz; -#endif`,adt=`#if defined( USE_COLOR_ALPHA ) - diffuseColor *= vColor; -#elif defined( USE_COLOR ) - diffuseColor.rgb *= vColor; -#endif`,odt=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) - varying vec3 vColor; -#endif`,ldt=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - varying vec3 vColor; -#endif`,cdt=`#if defined( USE_COLOR_ALPHA ) - vColor = vec4( 1.0 ); -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - vColor = vec3( 1.0 ); -#endif -#ifdef USE_COLOR - vColor *= color; -#endif -#ifdef USE_INSTANCING_COLOR - vColor.xyz *= instanceColor.xyz; -#endif`,udt=`#define PI 3.141592653589793 -#define PI2 6.283185307179586 -#define PI_HALF 1.5707963267948966 -#define RECIPROCAL_PI 0.3183098861837907 -#define RECIPROCAL_PI2 0.15915494309189535 -#define EPSILON 1e-6 -#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -#define whiteComplement( a ) ( 1.0 - saturate( a ) ) -float pow2( const in float x ) { return x*x; } -vec3 pow2( const in vec3 x ) { return x*x; } -float pow3( const in float x ) { return x*x*x; } -float pow4( const in float x ) { float x2 = x*x; return x2*x2; } -float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } -float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } -highp float rand( const in vec2 uv ) { - const highp float a = 12.9898, b = 78.233, c = 43758.5453; - highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); - return fract( sin( sn ) * c ); -} -#ifdef HIGH_PRECISION - float precisionSafeLength( vec3 v ) { return length( v ); } -#else - float precisionSafeLength( vec3 v ) { - float maxComponent = max3( abs( v ) ); - return length( v / maxComponent ) * maxComponent; - } -#endif -struct IncidentLight { - vec3 color; - vec3 direction; - bool visible; -}; -struct ReflectedLight { - vec3 directDiffuse; - vec3 directSpecular; - vec3 indirectDiffuse; - vec3 indirectSpecular; -}; -struct GeometricContext { - vec3 position; - vec3 normal; - vec3 viewDir; -#ifdef USE_CLEARCOAT - vec3 clearcoatNormal; -#endif -}; -vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); -} -vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); -} -mat3 transposeMat3( const in mat3 m ) { - mat3 tmp; - tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); - tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); - tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); - return tmp; -} -float luminance( const in vec3 rgb ) { - const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); - return dot( weights, rgb ); -} -bool isPerspectiveMatrix( mat4 m ) { - return m[ 2 ][ 3 ] == - 1.0; -} -vec2 equirectUv( in vec3 dir ) { - float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; - float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; - return vec2( u, v ); -}`,hdt=`#ifdef ENVMAP_TYPE_CUBE_UV - #define cubeUV_minMipLevel 4.0 - #define cubeUV_minTileSize 16.0 - float getFace( vec3 direction ) { - vec3 absDirection = abs( direction ); - float face = - 1.0; - if ( absDirection.x > absDirection.z ) { - if ( absDirection.x > absDirection.y ) - face = direction.x > 0.0 ? 0.0 : 3.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } else { - if ( absDirection.z > absDirection.y ) - face = direction.z > 0.0 ? 2.0 : 5.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } - return face; - } - vec2 getUV( vec3 direction, float face ) { - vec2 uv; - if ( face == 0.0 ) { - uv = vec2( direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 1.0 ) { - uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); - } else if ( face == 2.0 ) { - uv = vec2( - direction.x, direction.y ) / abs( direction.z ); - } else if ( face == 3.0 ) { - uv = vec2( - direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 4.0 ) { - uv = vec2( - direction.x, direction.z ) / abs( direction.y ); - } else { - uv = vec2( direction.x, direction.y ) / abs( direction.z ); - } - return 0.5 * ( uv + 1.0 ); - } - vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { - float face = getFace( direction ); - float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); - mipInt = max( mipInt, cubeUV_minMipLevel ); - float faceSize = exp2( mipInt ); - highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; - if ( face > 2.0 ) { - uv.y += faceSize; - face -= 3.0; - } - uv.x += face * faceSize; - uv.x += filterInt * 3.0 * cubeUV_minTileSize; - uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); - uv.x *= CUBEUV_TEXEL_WIDTH; - uv.y *= CUBEUV_TEXEL_HEIGHT; - #ifdef texture2DGradEXT - return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; - #else - return texture2D( envMap, uv ).rgb; - #endif - } - #define cubeUV_r0 1.0 - #define cubeUV_v0 0.339 - #define cubeUV_m0 - 2.0 - #define cubeUV_r1 0.8 - #define cubeUV_v1 0.276 - #define cubeUV_m1 - 1.0 - #define cubeUV_r4 0.4 - #define cubeUV_v4 0.046 - #define cubeUV_m4 2.0 - #define cubeUV_r5 0.305 - #define cubeUV_v5 0.016 - #define cubeUV_m5 3.0 - #define cubeUV_r6 0.21 - #define cubeUV_v6 0.0038 - #define cubeUV_m6 4.0 - float roughnessToMip( float roughness ) { - float mip = 0.0; - if ( roughness >= cubeUV_r1 ) { - mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; - } else if ( roughness >= cubeUV_r4 ) { - mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; - } else if ( roughness >= cubeUV_r5 ) { - mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; - } else if ( roughness >= cubeUV_r6 ) { - mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; - } else { - mip = - 2.0 * log2( 1.16 * roughness ); } - return mip; - } - vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { - float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); - float mipF = fract( mip ); - float mipInt = floor( mip ); - vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); - if ( mipF == 0.0 ) { - return vec4( color0, 1.0 ); - } else { - vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); - return vec4( mix( color0, color1, mipF ), 1.0 ); - } - } -#endif`,pdt=`vec3 transformedNormal = objectNormal; -#ifdef USE_INSTANCING - mat3 m = mat3( instanceMatrix ); - transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); - transformedNormal = m * transformedNormal; -#endif -transformedNormal = normalMatrix * transformedNormal; -#ifdef FLIP_SIDED - transformedNormal = - transformedNormal; -#endif -#ifdef USE_TANGENT - vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #ifdef FLIP_SIDED - transformedTangent = - transformedTangent; - #endif -#endif`,ddt=`#ifdef USE_DISPLACEMENTMAP - uniform sampler2D displacementMap; - uniform float displacementScale; - uniform float displacementBias; -#endif`,fdt=`#ifdef USE_DISPLACEMENTMAP - transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias ); -#endif`,mdt=`#ifdef USE_EMISSIVEMAP - vec4 emissiveColor = texture2D( emissiveMap, vUv ); - totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,gdt=`#ifdef USE_EMISSIVEMAP - uniform sampler2D emissiveMap; -#endif`,vdt="gl_FragColor = linearToOutputTexel( gl_FragColor );",ydt=`vec4 LinearToLinear( in vec4 value ) { - return value; -} -vec4 LinearTosRGB( in vec4 value ) { - return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); -}`,Tdt=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vec3 cameraToFrag; - if ( isOrthographic ) { - cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToFrag = normalize( vWorldPosition - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vec3 reflectVec = reflect( cameraToFrag, worldNormal ); - #else - vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); - #endif - #else - vec3 reflectVec = vReflect; - #endif - #ifdef ENVMAP_TYPE_CUBE - vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); - #else - vec4 envColor = vec4( 0.0 ); - #endif - #ifdef ENVMAP_BLENDING_MULTIPLY - outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_MIX ) - outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_ADD ) - outgoingLight += envColor.xyz * specularStrength * reflectivity; - #endif -#endif`,Edt=`#ifdef USE_ENVMAP - uniform float envMapIntensity; - uniform float flipEnvMap; - #ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; - #else - uniform sampler2D envMap; - #endif - -#endif`,bdt=`#ifdef USE_ENVMAP - uniform float reflectivity; - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - varying vec3 vWorldPosition; - uniform float refractionRatio; - #else - varying vec3 vReflect; - #endif -#endif`,xdt=`#ifdef USE_ENVMAP - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - - varying vec3 vWorldPosition; - #else - varying vec3 vReflect; - uniform float refractionRatio; - #endif -#endif`,Idt=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vWorldPosition = worldPosition.xyz; - #else - vec3 cameraToVertex; - if ( isOrthographic ) { - cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vReflect = reflect( cameraToVertex, worldNormal ); - #else - vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); - #endif - #endif -#endif`,Sdt=`#ifdef USE_FOG - vFogDepth = - mvPosition.z; -#endif`,_dt=`#ifdef USE_FOG - varying float vFogDepth; -#endif`,wdt=`#ifdef USE_FOG - #ifdef FOG_EXP2 - float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); - #else - float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); - #endif - gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,Rdt=`#ifdef USE_FOG - uniform vec3 fogColor; - varying float vFogDepth; - #ifdef FOG_EXP2 - uniform float fogDensity; - #else - uniform float fogNear; - uniform float fogFar; - #endif -#endif`,Mdt=`#ifdef USE_GRADIENTMAP - uniform sampler2D gradientMap; -#endif -vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { - float dotNL = dot( normal, lightDirection ); - vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); - #ifdef USE_GRADIENTMAP - return vec3( texture2D( gradientMap, coord ).r ); - #else - vec2 fw = fwidth( coord ) * 0.5; - return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); - #endif -}`,Ddt=`#ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vUv2 ); - vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; - reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,Cdt=`#ifdef USE_LIGHTMAP - uniform sampler2D lightMap; - uniform float lightMapIntensity; -#endif`,Adt=`LambertMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,Odt=`varying vec3 vViewPosition; -struct LambertMaterial { - vec3 diffuseColor; - float specularStrength; -}; -void RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Pdt=`uniform bool receiveShadow; -uniform vec3 ambientLightColor; -uniform vec3 lightProbe[ 9 ]; -vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { - float x = normal.x, y = normal.y, z = normal.z; - vec3 result = shCoefficients[ 0 ] * 0.886227; - result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; - result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; - result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; - result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; - result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; - result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); - result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; - result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); - return result; -} -vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); - return irradiance; -} -vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { - vec3 irradiance = ambientLightColor; - return irradiance; -} -float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { - #if defined ( PHYSICALLY_CORRECT_LIGHTS ) - float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); - if ( cutoffDistance > 0.0 ) { - distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); - } - return distanceFalloff; - #else - if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { - return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); - } - return 1.0; - #endif -} -float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { - return smoothstep( coneCosine, penumbraCosine, angleCosine ); -} -#if NUM_DIR_LIGHTS > 0 - struct DirectionalLight { - vec3 direction; - vec3 color; - }; - uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; - void getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) { - light.color = directionalLight.color; - light.direction = directionalLight.direction; - light.visible = true; - } -#endif -#if NUM_POINT_LIGHTS > 0 - struct PointLight { - vec3 position; - vec3 color; - float distance; - float decay; - }; - uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; - void getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) { - vec3 lVector = pointLight.position - geometry.position; - light.direction = normalize( lVector ); - float lightDistance = length( lVector ); - light.color = pointLight.color; - light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } -#endif -#if NUM_SPOT_LIGHTS > 0 - struct SpotLight { - vec3 position; - vec3 direction; - vec3 color; - float distance; - float decay; - float coneCos; - float penumbraCos; - }; - uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; - void getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) { - vec3 lVector = spotLight.position - geometry.position; - light.direction = normalize( lVector ); - float angleCos = dot( light.direction, spotLight.direction ); - float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); - if ( spotAttenuation > 0.0 ) { - float lightDistance = length( lVector ); - light.color = spotLight.color * spotAttenuation; - light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } else { - light.color = vec3( 0.0 ); - light.visible = false; - } - } -#endif -#if NUM_RECT_AREA_LIGHTS > 0 - struct RectAreaLight { - vec3 color; - vec3 position; - vec3 halfWidth; - vec3 halfHeight; - }; - uniform sampler2D ltc_1; uniform sampler2D ltc_2; - uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; -#endif -#if NUM_HEMI_LIGHTS > 0 - struct HemisphereLight { - vec3 direction; - vec3 skyColor; - vec3 groundColor; - }; - uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; - vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { - float dotNL = dot( normal, hemiLight.direction ); - float hemiDiffuseWeight = 0.5 * dotNL + 0.5; - vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); - return irradiance; - } -#endif`,Ndt=`#if defined( USE_ENVMAP ) - vec3 getIBLIrradiance( const in vec3 normal ) { - #if defined( ENVMAP_TYPE_CUBE_UV ) - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); - return PI * envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } - vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { - #if defined( ENVMAP_TYPE_CUBE_UV ) - vec3 reflectVec = reflect( - viewDir, normal ); - reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); - reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); - return envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } -#endif`,Ldt=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,Fdt=`varying vec3 vViewPosition; -struct ToonMaterial { - vec3 diffuseColor; -}; -void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Hdt=`BlinnPhongMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularColor = specular; -material.specularShininess = shininess; -material.specularStrength = specularStrength;`,Udt=`varying vec3 vViewPosition; -struct BlinnPhongMaterial { - vec3 diffuseColor; - vec3 specularColor; - float specularShininess; - float specularStrength; -}; -void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); - reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength; -} -void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Bdt=`PhysicalMaterial material; -material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); -vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); -float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); -material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; -material.roughness = min( material.roughness, 1.0 ); -#ifdef IOR - material.ior = ior; - #ifdef SPECULAR - float specularIntensityFactor = specularIntensity; - vec3 specularColorFactor = specularColor; - #ifdef USE_SPECULARINTENSITYMAP - specularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a; - #endif - #ifdef USE_SPECULARCOLORMAP - specularColorFactor *= texture2D( specularColorMap, vUv ).rgb; - #endif - material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); - #else - float specularIntensityFactor = 1.0; - vec3 specularColorFactor = vec3( 1.0 ); - material.specularF90 = 1.0; - #endif - material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); -#else - material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); - material.specularF90 = 1.0; -#endif -#ifdef USE_CLEARCOAT - material.clearcoat = clearcoat; - material.clearcoatRoughness = clearcoatRoughness; - material.clearcoatF0 = vec3( 0.04 ); - material.clearcoatF90 = 1.0; - #ifdef USE_CLEARCOATMAP - material.clearcoat *= texture2D( clearcoatMap, vUv ).x; - #endif - #ifdef USE_CLEARCOAT_ROUGHNESSMAP - material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y; - #endif - material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); - material.clearcoatRoughness += geometryRoughness; - material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); -#endif -#ifdef USE_IRIDESCENCE - material.iridescence = iridescence; - material.iridescenceIOR = iridescenceIOR; - #ifdef USE_IRIDESCENCEMAP - material.iridescence *= texture2D( iridescenceMap, vUv ).r; - #endif - #ifdef USE_IRIDESCENCE_THICKNESSMAP - material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vUv ).g + iridescenceThicknessMinimum; - #else - material.iridescenceThickness = iridescenceThicknessMaximum; - #endif -#endif -#ifdef USE_SHEEN - material.sheenColor = sheenColor; - #ifdef USE_SHEENCOLORMAP - material.sheenColor *= texture2D( sheenColorMap, vUv ).rgb; - #endif - material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); - #ifdef USE_SHEENROUGHNESSMAP - material.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a; - #endif -#endif`,kdt=`struct PhysicalMaterial { - vec3 diffuseColor; - float roughness; - vec3 specularColor; - float specularF90; - #ifdef USE_CLEARCOAT - float clearcoat; - float clearcoatRoughness; - vec3 clearcoatF0; - float clearcoatF90; - #endif - #ifdef USE_IRIDESCENCE - float iridescence; - float iridescenceIOR; - float iridescenceThickness; - vec3 iridescenceFresnel; - vec3 iridescenceF0; - #endif - #ifdef USE_SHEEN - vec3 sheenColor; - float sheenRoughness; - #endif - #ifdef IOR - float ior; - #endif - #ifdef USE_TRANSMISSION - float transmission; - float transmissionAlpha; - float thickness; - float attenuationDistance; - vec3 attenuationColor; - #endif -}; -vec3 clearcoatSpecular = vec3( 0.0 ); -vec3 sheenSpecular = vec3( 0.0 ); -float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - float r2 = roughness * roughness; - float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; - float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; - float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); - return saturate( DG * RECIPROCAL_PI ); -} -vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); - const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); - vec4 r = roughness * c0 + c1; - float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; - vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; - return fab; -} -vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { - vec2 fab = DFGApprox( normal, viewDir, roughness ); - return specularColor * fab.x + specularF90 * fab.y; -} -#ifdef USE_IRIDESCENCE -void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { -#else -void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { -#endif - vec2 fab = DFGApprox( normal, viewDir, roughness ); - #ifdef USE_IRIDESCENCE - vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); - #else - vec3 Fr = specularColor; - #endif - vec3 FssEss = Fr * fab.x + specularF90 * fab.y; - float Ess = fab.x + fab.y; - float Ems = 1.0 - Ess; - vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); - singleScatter += FssEss; - multiScatter += Fms * Ems; -} -#if NUM_RECT_AREA_LIGHTS > 0 - void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - vec3 normal = geometry.normal; - vec3 viewDir = geometry.viewDir; - vec3 position = geometry.position; - vec3 lightPos = rectAreaLight.position; - vec3 halfWidth = rectAreaLight.halfWidth; - vec3 halfHeight = rectAreaLight.halfHeight; - vec3 lightColor = rectAreaLight.color; - float roughness = material.roughness; - vec3 rectCoords[ 4 ]; - rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; - rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; - rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; - vec2 uv = LTC_Uv( normal, viewDir, roughness ); - vec4 t1 = texture2D( ltc_1, uv ); - vec4 t2 = texture2D( ltc_2, uv ); - mat3 mInv = mat3( - vec3( t1.x, 0, t1.y ), - vec3( 0, 1, 0 ), - vec3( t1.z, 0, t1.w ) - ); - vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); - reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); - reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); - } -#endif -void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - #ifdef USE_CLEARCOAT - float dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) ); - vec3 ccIrradiance = dotNLcc * directLight.color; - clearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); - #endif - #ifdef USE_SHEEN - sheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness ); - #endif - #ifdef USE_IRIDESCENCE - reflectedLight.directSpecular += irradiance * BRDF_GGX_Iridescence( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness ); - #else - reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness ); - #endif - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { - #ifdef USE_CLEARCOAT - clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); - #endif - #ifdef USE_SHEEN - sheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness ); - #endif - vec3 singleScattering = vec3( 0.0 ); - vec3 multiScattering = vec3( 0.0 ); - vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; - #ifdef USE_IRIDESCENCE - computeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); - #else - computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); - #endif - vec3 totalScattering = singleScattering + multiScattering; - vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); - reflectedLight.indirectSpecular += radiance * singleScattering; - reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; - reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; -} -#define RE_Direct RE_Direct_Physical -#define RE_Direct_RectArea RE_Direct_RectArea_Physical -#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical -#define RE_IndirectSpecular RE_IndirectSpecular_Physical -float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { - return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,Gdt=` -GeometricContext geometry; -geometry.position = - vViewPosition; -geometry.normal = normal; -geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); -#ifdef USE_CLEARCOAT - geometry.clearcoatNormal = clearcoatNormal; -#endif -#ifdef USE_IRIDESCENCE - float dotNVi = saturate( dot( normal, geometry.viewDir ) ); - if ( material.iridescenceThickness == 0.0 ) { - material.iridescence = 0.0; - } else { - material.iridescence = saturate( material.iridescence ); - } - if ( material.iridescence > 0.0 ) { - material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); - material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); - } -#endif -IncidentLight directLight; -#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) - PointLight pointLight; - #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { - pointLight = pointLights[ i ]; - getPointLightInfo( pointLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) - pointLightShadow = pointLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) - SpotLight spotLight; - vec4 spotColor; - vec3 spotLightCoord; - bool inSpotLightMap; - #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { - spotLight = spotLights[ i ]; - getSpotLightInfo( spotLight, geometry, directLight ); - #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX - #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS - #else - #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #endif - #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) - spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; - inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); - spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); - directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; - #endif - #undef SPOT_LIGHT_MAP_INDEX - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - spotLightShadow = spotLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) - DirectionalLight directionalLight; - #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { - directionalLight = directionalLights[ i ]; - getDirectionalLightInfo( directionalLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) - directionalLightShadow = directionalLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) - RectAreaLight rectAreaLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { - rectAreaLight = rectAreaLights[ i ]; - RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if defined( RE_IndirectDiffuse ) - vec3 iblIrradiance = vec3( 0.0 ); - vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); - irradiance += getLightProbeIrradiance( lightProbe, geometry.normal ); - #if ( NUM_HEMI_LIGHTS > 0 ) - #pragma unroll_loop_start - for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { - irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal ); - } - #pragma unroll_loop_end - #endif -#endif -#if defined( RE_IndirectSpecular ) - vec3 radiance = vec3( 0.0 ); - vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,Vdt=`#if defined( RE_IndirectDiffuse ) - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vUv2 ); - vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; - irradiance += lightMapIrradiance; - #endif - #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) - iblIrradiance += getIBLIrradiance( geometry.normal ); - #endif -#endif -#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) - radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness ); - #ifdef USE_CLEARCOAT - clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness ); - #endif -#endif`,zdt=`#if defined( RE_IndirectDiffuse ) - RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); -#endif -#if defined( RE_IndirectSpecular ) - RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); -#endif`,jdt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,Wdt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - uniform float logDepthBufFC; - varying float vFragDepth; - varying float vIsPerspective; -#endif`,qdt=`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - varying float vFragDepth; - varying float vIsPerspective; - #else - uniform float logDepthBufFC; - #endif -#endif`,Ydt=`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - vFragDepth = 1.0 + gl_Position.w; - vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); - #else - if ( isPerspectiveMatrix( projectionMatrix ) ) { - gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; - gl_Position.z *= gl_Position.w; - } - #endif -#endif`,Xdt=`#ifdef USE_MAP - vec4 sampledDiffuseColor = texture2D( map, vUv ); - #ifdef DECODE_VIDEO_TEXTURE - sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); - #endif - diffuseColor *= sampledDiffuseColor; -#endif`,$dt=`#ifdef USE_MAP - uniform sampler2D map; -#endif`,Zdt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; -#endif -#ifdef USE_MAP - diffuseColor *= texture2D( map, uv ); -#endif -#ifdef USE_ALPHAMAP - diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,Kdt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - uniform mat3 uvTransform; -#endif -#ifdef USE_MAP - uniform sampler2D map; -#endif -#ifdef USE_ALPHAMAP - uniform sampler2D alphaMap; -#endif`,Jdt=`float metalnessFactor = metalness; -#ifdef USE_METALNESSMAP - vec4 texelMetalness = texture2D( metalnessMap, vUv ); - metalnessFactor *= texelMetalness.b; -#endif`,Qdt=`#ifdef USE_METALNESSMAP - uniform sampler2D metalnessMap; -#endif`,eft=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) - vColor *= morphTargetBaseInfluence; - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - #if defined( USE_COLOR_ALPHA ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; - #elif defined( USE_COLOR ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; - #endif - } -#endif`,tft=`#ifdef USE_MORPHNORMALS - objectNormal *= morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; - } - #else - objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; - objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; - objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; - objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; - #endif -#endif`,rft=`#ifdef USE_MORPHTARGETS - uniform float morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; - uniform sampler2DArray morphTargetsTexture; - uniform ivec2 morphTargetsTextureSize; - vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { - int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; - int y = texelIndex / morphTargetsTextureSize.x; - int x = texelIndex - y * morphTargetsTextureSize.x; - ivec3 morphUV = ivec3( x, y, morphTargetIndex ); - return texelFetch( morphTargetsTexture, morphUV, 0 ); - } - #else - #ifndef USE_MORPHNORMALS - uniform float morphTargetInfluences[ 8 ]; - #else - uniform float morphTargetInfluences[ 4 ]; - #endif - #endif -#endif`,ift=`#ifdef USE_MORPHTARGETS - transformed *= morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; - } - #else - transformed += morphTarget0 * morphTargetInfluences[ 0 ]; - transformed += morphTarget1 * morphTargetInfluences[ 1 ]; - transformed += morphTarget2 * morphTargetInfluences[ 2 ]; - transformed += morphTarget3 * morphTargetInfluences[ 3 ]; - #ifndef USE_MORPHNORMALS - transformed += morphTarget4 * morphTargetInfluences[ 4 ]; - transformed += morphTarget5 * morphTargetInfluences[ 5 ]; - transformed += morphTarget6 * morphTargetInfluences[ 6 ]; - transformed += morphTarget7 * morphTargetInfluences[ 7 ]; - #endif - #endif -#endif`,nft=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; -#ifdef FLAT_SHADED - vec3 fdx = dFdx( vViewPosition ); - vec3 fdy = dFdy( vViewPosition ); - vec3 normal = normalize( cross( fdx, fdy ) ); -#else - vec3 normal = normalize( vNormal ); - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - #ifdef USE_TANGENT - vec3 tangent = normalize( vTangent ); - vec3 bitangent = normalize( vBitangent ); - #ifdef DOUBLE_SIDED - tangent = tangent * faceDirection; - bitangent = bitangent * faceDirection; - #endif - #if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP ) - mat3 vTBN = mat3( tangent, bitangent, normal ); - #endif - #endif -#endif -vec3 geometryNormal = normal;`,sft=`#ifdef OBJECTSPACE_NORMALMAP - normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; - #ifdef FLIP_SIDED - normal = - normal; - #endif - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - normal = normalize( normalMatrix * normal ); -#elif defined( TANGENTSPACE_NORMALMAP ) - vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; - mapN.xy *= normalScale; - #ifdef USE_TANGENT - normal = normalize( vTBN * mapN ); - #else - normal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection ); - #endif -#elif defined( USE_BUMPMAP ) - normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,aft=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,oft=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,lft=`#ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); - #ifdef USE_TANGENT - vTangent = normalize( transformedTangent ); - vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); - #endif -#endif`,cft=`#ifdef USE_NORMALMAP - uniform sampler2D normalMap; - uniform vec2 normalScale; -#endif -#ifdef OBJECTSPACE_NORMALMAP - uniform mat3 normalMatrix; -#endif -#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) ) - vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) { - vec3 q0 = dFdx( eye_pos.xyz ); - vec3 q1 = dFdy( eye_pos.xyz ); - vec2 st0 = dFdx( vUv.st ); - vec2 st1 = dFdy( vUv.st ); - vec3 N = surf_norm; - vec3 q1perp = cross( q1, N ); - vec3 q0perp = cross( N, q0 ); - vec3 T = q1perp * st0.x + q0perp * st1.x; - vec3 B = q1perp * st0.y + q0perp * st1.y; - float det = max( dot( T, T ), dot( B, B ) ); - float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det ); - return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z ); - } -#endif`,uft=`#ifdef USE_CLEARCOAT - vec3 clearcoatNormal = geometryNormal; -#endif`,hft=`#ifdef USE_CLEARCOAT_NORMALMAP - vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0; - clearcoatMapN.xy *= clearcoatNormalScale; - #ifdef USE_TANGENT - clearcoatNormal = normalize( vTBN * clearcoatMapN ); - #else - clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection ); - #endif -#endif`,pft=`#ifdef USE_CLEARCOATMAP - uniform sampler2D clearcoatMap; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - uniform sampler2D clearcoatRoughnessMap; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - uniform sampler2D clearcoatNormalMap; - uniform vec2 clearcoatNormalScale; -#endif`,dft=`#ifdef USE_IRIDESCENCEMAP - uniform sampler2D iridescenceMap; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - uniform sampler2D iridescenceThicknessMap; -#endif`,fft=`#ifdef OPAQUE -diffuseColor.a = 1.0; -#endif -#ifdef USE_TRANSMISSION -diffuseColor.a *= material.transmissionAlpha + 0.1; -#endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,mft=`vec3 packNormalToRGB( const in vec3 normal ) { - return normalize( normal ) * 0.5 + 0.5; -} -vec3 unpackRGBToNormal( const in vec3 rgb ) { - return 2.0 * rgb.xyz - 1.0; -} -const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; -const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); -const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); -const float ShiftRight8 = 1. / 256.; -vec4 packDepthToRGBA( const in float v ) { - vec4 r = vec4( fract( v * PackFactors ), v ); - r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; -} -float unpackRGBAToDepth( const in vec4 v ) { - return dot( v, UnpackFactors ); -} -vec2 packDepthToRG( in highp float v ) { - return packDepthToRGBA( v ).yx; -} -float unpackRGToDepth( const in highp vec2 v ) { - return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); -} -vec4 pack2HalfToRGBA( vec2 v ) { - vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); - return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); -} -vec2 unpackRGBATo2Half( vec4 v ) { - return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); -} -float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { - return ( viewZ + near ) / ( near - far ); -} -float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) { - return linearClipZ * ( near - far ) - near; -} -float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { - return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); -} -float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) { - return ( near * far ) / ( ( far - near ) * invClipZ - far ); -}`,gft=`#ifdef PREMULTIPLIED_ALPHA - gl_FragColor.rgb *= gl_FragColor.a; -#endif`,vft=`vec4 mvPosition = vec4( transformed, 1.0 ); -#ifdef USE_INSTANCING - mvPosition = instanceMatrix * mvPosition; -#endif -mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,yft=`#ifdef DITHERING - gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,Tft=`#ifdef DITHERING - vec3 dithering( vec3 color ) { - float grid_position = rand( gl_FragCoord.xy ); - vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); - dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); - return color + dither_shift_RGB; - } -#endif`,Eft=`float roughnessFactor = roughness; -#ifdef USE_ROUGHNESSMAP - vec4 texelRoughness = texture2D( roughnessMap, vUv ); - roughnessFactor *= texelRoughness.g; -#endif`,bft=`#ifdef USE_ROUGHNESSMAP - uniform sampler2D roughnessMap; -#endif`,xft=`#if NUM_SPOT_LIGHT_COORDS > 0 - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#if NUM_SPOT_LIGHT_MAPS > 0 - uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif - float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { - return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); - } - vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { - return unpackRGBATo2Half( texture2D( shadow, uv ) ); - } - float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ - float occlusion = 1.0; - vec2 distribution = texture2DDistribution( shadow, uv ); - float hard_shadow = step( compare , distribution.x ); - if (hard_shadow != 1.0 ) { - float distance = compare - distribution.x ; - float variance = max( 0.00000, distribution.y * distribution.y ); - float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); - } - return occlusion; - } - float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { - float shadow = 1.0; - shadowCoord.xyz /= shadowCoord.w; - shadowCoord.z += shadowBias; - bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; - bool frustumTest = inFrustum && shadowCoord.z <= 1.0; - if ( frustumTest ) { - #if defined( SHADOWMAP_TYPE_PCF ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx0 = - texelSize.x * shadowRadius; - float dy0 = - texelSize.y * shadowRadius; - float dx1 = + texelSize.x * shadowRadius; - float dy1 = + texelSize.y * shadowRadius; - float dx2 = dx0 / 2.0; - float dy2 = dy0 / 2.0; - float dx3 = dx1 / 2.0; - float dy3 = dy1 / 2.0; - shadow = ( - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) - ) * ( 1.0 / 17.0 ); - #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx = texelSize.x; - float dy = texelSize.y; - vec2 uv = shadowCoord.xy; - vec2 f = fract( uv * shadowMapSize + 0.5 ); - uv -= f * texelSize; - shadow = ( - texture2DCompare( shadowMap, uv, shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), - f.x ), - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), - f.x ), - f.y ) - ) * ( 1.0 / 9.0 ); - #elif defined( SHADOWMAP_TYPE_VSM ) - shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); - #else - shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); - #endif - } - return shadow; - } - vec2 cubeToUV( vec3 v, float texelSizeY ) { - vec3 absV = abs( v ); - float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); - absV *= scaleToCube; - v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); - vec2 planar = v.xy; - float almostATexel = 1.5 * texelSizeY; - float almostOne = 1.0 - almostATexel; - if ( absV.z >= almostOne ) { - if ( v.z > 0.0 ) - planar.x = 4.0 - v.x; - } else if ( absV.x >= almostOne ) { - float signX = sign( v.x ); - planar.x = v.z * signX + 2.0 * signX; - } else if ( absV.y >= almostOne ) { - float signY = sign( v.y ); - planar.x = v.x + 2.0 * signY + 2.0; - planar.y = v.z * signY - 2.0; - } - return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); - } - float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { - vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); - vec3 lightToPosition = shadowCoord.xyz; - float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; - vec3 bd3D = normalize( lightToPosition ); - #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) - vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; - return ( - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) - ) * ( 1.0 / 9.0 ); - #else - return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); - #endif - } -#endif`,Ift=`#if NUM_SPOT_LIGHT_COORDS > 0 - uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif -#endif`,Sft=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) - vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - vec4 shadowWorldPosition; -#endif -#if defined( USE_SHADOWMAP ) - #if NUM_DIR_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); - vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); - vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif -#endif -#if NUM_SPOT_LIGHT_COORDS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { - shadowWorldPosition = worldPosition; - #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; - #endif - vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end -#endif`,_ft=`float getShadowMask() { - float shadow = 1.0; - #ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - directionalLight = directionalLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { - spotLight = spotLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - pointLight = pointLightShadows[ i ]; - shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; - } - #pragma unroll_loop_end - #endif - #endif - return shadow; -}`,wft=`#ifdef USE_SKINNING - mat4 boneMatX = getBoneMatrix( skinIndex.x ); - mat4 boneMatY = getBoneMatrix( skinIndex.y ); - mat4 boneMatZ = getBoneMatrix( skinIndex.z ); - mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,Rft=`#ifdef USE_SKINNING - uniform mat4 bindMatrix; - uniform mat4 bindMatrixInverse; - uniform highp sampler2D boneTexture; - uniform int boneTextureSize; - mat4 getBoneMatrix( const in float i ) { - float j = i * 4.0; - float x = mod( j, float( boneTextureSize ) ); - float y = floor( j / float( boneTextureSize ) ); - float dx = 1.0 / float( boneTextureSize ); - float dy = 1.0 / float( boneTextureSize ); - y = dy * ( y + 0.5 ); - vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); - vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); - vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); - vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); - mat4 bone = mat4( v1, v2, v3, v4 ); - return bone; - } -#endif`,Mft=`#ifdef USE_SKINNING - vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); - vec4 skinned = vec4( 0.0 ); - skinned += boneMatX * skinVertex * skinWeight.x; - skinned += boneMatY * skinVertex * skinWeight.y; - skinned += boneMatZ * skinVertex * skinWeight.z; - skinned += boneMatW * skinVertex * skinWeight.w; - transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,Dft=`#ifdef USE_SKINNING - mat4 skinMatrix = mat4( 0.0 ); - skinMatrix += skinWeight.x * boneMatX; - skinMatrix += skinWeight.y * boneMatY; - skinMatrix += skinWeight.z * boneMatZ; - skinMatrix += skinWeight.w * boneMatW; - skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; - objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; - #ifdef USE_TANGENT - objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #endif -#endif`,Cft=`float specularStrength; -#ifdef USE_SPECULARMAP - vec4 texelSpecular = texture2D( specularMap, vUv ); - specularStrength = texelSpecular.r; -#else - specularStrength = 1.0; -#endif`,Aft=`#ifdef USE_SPECULARMAP - uniform sampler2D specularMap; -#endif`,Oft=`#if defined( TONE_MAPPING ) - gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,Pft=`#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -uniform float toneMappingExposure; -vec3 LinearToneMapping( vec3 color ) { - return toneMappingExposure * color; -} -vec3 ReinhardToneMapping( vec3 color ) { - color *= toneMappingExposure; - return saturate( color / ( vec3( 1.0 ) + color ) ); -} -vec3 OptimizedCineonToneMapping( vec3 color ) { - color *= toneMappingExposure; - color = max( vec3( 0.0 ), color - 0.004 ); - return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); -} -vec3 RRTAndODTFit( vec3 v ) { - vec3 a = v * ( v + 0.0245786 ) - 0.000090537; - vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; - return a / b; -} -vec3 ACESFilmicToneMapping( vec3 color ) { - const mat3 ACESInputMat = mat3( - vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), - vec3( 0.04823, 0.01566, 0.83777 ) - ); - const mat3 ACESOutputMat = mat3( - vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), - vec3( -0.07367, -0.00605, 1.07602 ) - ); - color *= toneMappingExposure / 0.6; - color = ACESInputMat * color; - color = RRTAndODTFit( color ); - color = ACESOutputMat * color; - return saturate( color ); -} -vec3 CustomToneMapping( vec3 color ) { return color; }`,Nft=`#ifdef USE_TRANSMISSION - material.transmission = transmission; - material.transmissionAlpha = 1.0; - material.thickness = thickness; - material.attenuationDistance = attenuationDistance; - material.attenuationColor = attenuationColor; - #ifdef USE_TRANSMISSIONMAP - material.transmission *= texture2D( transmissionMap, vUv ).r; - #endif - #ifdef USE_THICKNESSMAP - material.thickness *= texture2D( thicknessMap, vUv ).g; - #endif - vec3 pos = vWorldPosition; - vec3 v = normalize( cameraPosition - pos ); - vec3 n = inverseTransformDirection( normal, viewMatrix ); - vec4 transmission = getIBLVolumeRefraction( - n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, - pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, - material.attenuationColor, material.attenuationDistance ); - material.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission ); - totalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission ); -#endif`,Lft=`#ifdef USE_TRANSMISSION - uniform float transmission; - uniform float thickness; - uniform float attenuationDistance; - uniform vec3 attenuationColor; - #ifdef USE_TRANSMISSIONMAP - uniform sampler2D transmissionMap; - #endif - #ifdef USE_THICKNESSMAP - uniform sampler2D thicknessMap; - #endif - uniform vec2 transmissionSamplerSize; - uniform sampler2D transmissionSamplerMap; - uniform mat4 modelMatrix; - uniform mat4 projectionMatrix; - varying vec3 vWorldPosition; - vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { - vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); - vec3 modelScale; - modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); - modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); - modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); - return normalize( refractionVector ) * thickness * modelScale; - } - float applyIorToRoughness( const in float roughness, const in float ior ) { - return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); - } - vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { - float framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); - #ifdef texture2DLodEXT - return texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod ); - #else - return texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod ); - #endif - } - vec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { - if ( isinf( attenuationDistance ) ) { - return radiance; - } else { - vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; - vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance * radiance; - } - } - vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, - const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, - const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, - const in vec3 attenuationColor, const in float attenuationDistance ) { - vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); - vec3 refractedRayExit = position + transmissionRay; - vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); - vec2 refractionCoords = ndcPos.xy / ndcPos.w; - refractionCoords += 1.0; - refractionCoords /= 2.0; - vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); - vec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance ); - vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); - return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a ); - } -#endif`,Fft=`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) - varying vec2 vUv; -#endif`,Hft=`#ifdef USE_UV - #ifdef UVS_VERTEX_ONLY - vec2 vUv; - #else - varying vec2 vUv; - #endif - uniform mat3 uvTransform; -#endif`,Uft=`#ifdef USE_UV - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; -#endif`,Bft=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - varying vec2 vUv2; -#endif`,kft=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - attribute vec2 uv2; - varying vec2 vUv2; - uniform mat3 uv2Transform; -#endif`,Gft=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy; -#endif`,Vft=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 - vec4 worldPosition = vec4( transformed, 1.0 ); - #ifdef USE_INSTANCING - worldPosition = instanceMatrix * worldPosition; - #endif - worldPosition = modelMatrix * worldPosition; -#endif`,zft=`varying vec2 vUv; -uniform mat3 uvTransform; -void main() { - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,jft=`uniform sampler2D t2D; -uniform float backgroundIntensity; -varying vec2 vUv; -void main() { - vec4 texColor = texture2D( t2D, vUv ); - #ifdef DECODE_VIDEO_TEXTURE - texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}`,Wft=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,qft=`#ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; -#elif defined( ENVMAP_TYPE_CUBE_UV ) - uniform sampler2D envMap; -#endif -uniform float flipEnvMap; -uniform float backgroundBlurriness; -uniform float backgroundIntensity; -varying vec3 vWorldDirection; -#include -void main() { - #ifdef ENVMAP_TYPE_CUBE - vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); - #elif defined( ENVMAP_TYPE_CUBE_UV ) - vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness ); - #else - vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}`,Yft=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,Xft=`uniform samplerCube tCube; -uniform float tFlip; -uniform float opacity; -varying vec3 vWorldDirection; -void main() { - vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); - gl_FragColor = texColor; - gl_FragColor.a *= opacity; - #include - #include -}`,$ft=`#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vHighPrecisionZW = gl_Position.zw; -}`,Zft=`#if DEPTH_PACKING == 3200 - uniform float opacity; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - vec4 diffuseColor = vec4( 1.0 ); - #if DEPTH_PACKING == 3200 - diffuseColor.a = opacity; - #endif - #include - #include - #include - #include - float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; - #if DEPTH_PACKING == 3200 - gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); - #elif DEPTH_PACKING == 3201 - gl_FragColor = packDepthToRGBA( fragCoordZ ); - #endif -}`,Kft=`#define DISTANCE -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vWorldPosition = worldPosition.xyz; -}`,Jft=`#define DISTANCE -uniform vec3 referencePosition; -uniform float nearDistance; -uniform float farDistance; -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -#include -void main () { - #include - vec4 diffuseColor = vec4( 1.0 ); - #include - #include - #include - float dist = length( vWorldPosition - referencePosition ); - dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); - dist = saturate( dist ); - gl_FragColor = packDepthToRGBA( dist ); -}`,Qft=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include -}`,emt=`uniform sampler2D tEquirect; -varying vec3 vWorldDirection; -#include -void main() { - vec3 direction = normalize( vWorldDirection ); - vec2 sampleUV = equirectUv( direction ); - gl_FragColor = texture2D( tEquirect, sampleUV ); - #include - #include -}`,tmt=`uniform float scale; -attribute float lineDistance; -varying float vLineDistance; -#include -#include -#include -#include -#include -#include -void main() { - vLineDistance = scale * lineDistance; - #include - #include - #include - #include - #include - #include - #include - #include -}`,rmt=`uniform vec3 diffuse; -uniform float opacity; -uniform float dashSize; -uniform float totalSize; -varying float vLineDistance; -#include -#include -#include -#include -#include -void main() { - #include - if ( mod( vLineDistance, totalSize ) > dashSize ) { - discard; - } - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}`,imt=`#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) - #include - #include - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,nmt=`uniform vec3 diffuse; -uniform float opacity; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vUv2 ); - reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; - #else - reflectedLight.indirectDiffuse += vec3( 1.0 ); - #endif - #include - reflectedLight.indirectDiffuse *= diffuseColor.rgb; - vec3 outgoingLight = reflectedLight.indirectDiffuse; - #include - #include - #include - #include - #include - #include - #include -}`,smt=`#define LAMBERT -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}`,amt=`#define LAMBERT -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}`,omt=`#define MATCAP -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; -}`,lmt=`#define MATCAP -uniform vec3 diffuse; -uniform float opacity; -uniform sampler2D matcap; -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - #include - vec3 viewDir = normalize( vViewPosition ); - vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); - vec3 y = cross( viewDir, x ); - vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; - #ifdef USE_MATCAP - vec4 matcapColor = texture2D( matcap, uv ); - #else - vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); - #endif - vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; - #include - #include - #include - #include - #include - #include -}`,cmt=`#define NORMAL -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - vViewPosition = - mvPosition.xyz; -#endif -}`,umt=`#define NORMAL -uniform float opacity; -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); - #ifdef OPAQUE - gl_FragColor.a = 1.0; - #endif -}`,hmt=`#define PHONG -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}`,pmt=`#define PHONG -uniform vec3 diffuse; -uniform vec3 emissive; -uniform vec3 specular; -uniform float shininess; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}`,dmt=`#define STANDARD -varying vec3 vViewPosition; -#ifdef USE_TRANSMISSION - varying vec3 vWorldPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -#ifdef USE_TRANSMISSION - vWorldPosition = worldPosition.xyz; -#endif -}`,fmt=`#define STANDARD -#ifdef PHYSICAL - #define IOR - #define SPECULAR -#endif -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float roughness; -uniform float metalness; -uniform float opacity; -#ifdef IOR - uniform float ior; -#endif -#ifdef SPECULAR - uniform float specularIntensity; - uniform vec3 specularColor; - #ifdef USE_SPECULARINTENSITYMAP - uniform sampler2D specularIntensityMap; - #endif - #ifdef USE_SPECULARCOLORMAP - uniform sampler2D specularColorMap; - #endif -#endif -#ifdef USE_CLEARCOAT - uniform float clearcoat; - uniform float clearcoatRoughness; -#endif -#ifdef USE_IRIDESCENCE - uniform float iridescence; - uniform float iridescenceIOR; - uniform float iridescenceThicknessMinimum; - uniform float iridescenceThicknessMaximum; -#endif -#ifdef USE_SHEEN - uniform vec3 sheenColor; - uniform float sheenRoughness; - #ifdef USE_SHEENCOLORMAP - uniform sampler2D sheenColorMap; - #endif - #ifdef USE_SHEENROUGHNESSMAP - uniform sampler2D sheenRoughnessMap; - #endif -#endif -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; - vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; - #include - vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; - #ifdef USE_SHEEN - float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); - outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular; - #endif - #ifdef USE_CLEARCOAT - float dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) ); - vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); - outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat; - #endif - #include - #include - #include - #include - #include - #include -}`,mmt=`#define TOON -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -}`,gmt=`#define TOON -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include -}`,vmt=`uniform float size; -uniform float scale; -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - gl_PointSize = size; - #ifdef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); - #endif - #include - #include - #include - #include -}`,ymt=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}`,Tmt=`#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,Emt=`uniform vec3 color; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -void main() { - gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); - #include - #include - #include -}`,bmt=`uniform float rotation; -uniform vec2 center; -#include -#include -#include -#include -#include -void main() { - #include - vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); - vec2 scale; - scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); - scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); - #ifndef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) scale *= - mvPosition.z; - #endif - vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; - vec2 rotatedPosition; - rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; - rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; - mvPosition.xy += rotatedPosition; - gl_Position = projectionMatrix * mvPosition; - #include - #include - #include -}`,xmt=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include -}`,Wr={alphamap_fragment:Wpt,alphamap_pars_fragment:qpt,alphatest_fragment:Ypt,alphatest_pars_fragment:Xpt,aomap_fragment:$pt,aomap_pars_fragment:Zpt,begin_vertex:Kpt,beginnormal_vertex:Jpt,bsdfs:Qpt,iridescence_fragment:edt,bumpmap_pars_fragment:tdt,clipping_planes_fragment:rdt,clipping_planes_pars_fragment:idt,clipping_planes_pars_vertex:ndt,clipping_planes_vertex:sdt,color_fragment:adt,color_pars_fragment:odt,color_pars_vertex:ldt,color_vertex:cdt,common:udt,cube_uv_reflection_fragment:hdt,defaultnormal_vertex:pdt,displacementmap_pars_vertex:ddt,displacementmap_vertex:fdt,emissivemap_fragment:mdt,emissivemap_pars_fragment:gdt,encodings_fragment:vdt,encodings_pars_fragment:ydt,envmap_fragment:Tdt,envmap_common_pars_fragment:Edt,envmap_pars_fragment:bdt,envmap_pars_vertex:xdt,envmap_physical_pars_fragment:Ndt,envmap_vertex:Idt,fog_vertex:Sdt,fog_pars_vertex:_dt,fog_fragment:wdt,fog_pars_fragment:Rdt,gradientmap_pars_fragment:Mdt,lightmap_fragment:Ddt,lightmap_pars_fragment:Cdt,lights_lambert_fragment:Adt,lights_lambert_pars_fragment:Odt,lights_pars_begin:Pdt,lights_toon_fragment:Ldt,lights_toon_pars_fragment:Fdt,lights_phong_fragment:Hdt,lights_phong_pars_fragment:Udt,lights_physical_fragment:Bdt,lights_physical_pars_fragment:kdt,lights_fragment_begin:Gdt,lights_fragment_maps:Vdt,lights_fragment_end:zdt,logdepthbuf_fragment:jdt,logdepthbuf_pars_fragment:Wdt,logdepthbuf_pars_vertex:qdt,logdepthbuf_vertex:Ydt,map_fragment:Xdt,map_pars_fragment:$dt,map_particle_fragment:Zdt,map_particle_pars_fragment:Kdt,metalnessmap_fragment:Jdt,metalnessmap_pars_fragment:Qdt,morphcolor_vertex:eft,morphnormal_vertex:tft,morphtarget_pars_vertex:rft,morphtarget_vertex:ift,normal_fragment_begin:nft,normal_fragment_maps:sft,normal_pars_fragment:aft,normal_pars_vertex:oft,normal_vertex:lft,normalmap_pars_fragment:cft,clearcoat_normal_fragment_begin:uft,clearcoat_normal_fragment_maps:hft,clearcoat_pars_fragment:pft,iridescence_pars_fragment:dft,output_fragment:fft,packing:mft,premultiplied_alpha_fragment:gft,project_vertex:vft,dithering_fragment:yft,dithering_pars_fragment:Tft,roughnessmap_fragment:Eft,roughnessmap_pars_fragment:bft,shadowmap_pars_fragment:xft,shadowmap_pars_vertex:Ift,shadowmap_vertex:Sft,shadowmask_pars_fragment:_ft,skinbase_vertex:wft,skinning_pars_vertex:Rft,skinning_vertex:Mft,skinnormal_vertex:Dft,specularmap_fragment:Cft,specularmap_pars_fragment:Aft,tonemapping_fragment:Oft,tonemapping_pars_fragment:Pft,transmission_fragment:Nft,transmission_pars_fragment:Lft,uv_pars_fragment:Fft,uv_pars_vertex:Hft,uv_vertex:Uft,uv2_pars_fragment:Bft,uv2_pars_vertex:kft,uv2_vertex:Gft,worldpos_vertex:Vft,background_vert:zft,background_frag:jft,backgroundCube_vert:Wft,backgroundCube_frag:qft,cube_vert:Yft,cube_frag:Xft,depth_vert:$ft,depth_frag:Zft,distanceRGBA_vert:Kft,distanceRGBA_frag:Jft,equirect_vert:Qft,equirect_frag:emt,linedashed_vert:tmt,linedashed_frag:rmt,meshbasic_vert:imt,meshbasic_frag:nmt,meshlambert_vert:smt,meshlambert_frag:amt,meshmatcap_vert:omt,meshmatcap_frag:lmt,meshnormal_vert:cmt,meshnormal_frag:umt,meshphong_vert:hmt,meshphong_frag:pmt,meshphysical_vert:dmt,meshphysical_frag:fmt,meshtoon_vert:mmt,meshtoon_frag:gmt,points_vert:vmt,points_frag:ymt,shadow_vert:Tmt,shadow_frag:Emt,sprite_vert:bmt,sprite_frag:xmt},At={common:{diffuse:{value:new Ve(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Qi},uv2Transform:{value:new Qi},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new le(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ve(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 Ve(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Qi}},sprite:{diffuse:{value:new Ve(16777215)},opacity:{value:1},center:{value:new le(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Qi}}},Rc={basic:{uniforms:Ia([At.common,At.specularmap,At.envmap,At.aomap,At.lightmap,At.fog]),vertexShader:Wr.meshbasic_vert,fragmentShader:Wr.meshbasic_frag},lambert:{uniforms:Ia([At.common,At.specularmap,At.envmap,At.aomap,At.lightmap,At.emissivemap,At.bumpmap,At.normalmap,At.displacementmap,At.fog,At.lights,{emissive:{value:new Ve(0)}}]),vertexShader:Wr.meshlambert_vert,fragmentShader:Wr.meshlambert_frag},phong:{uniforms:Ia([At.common,At.specularmap,At.envmap,At.aomap,At.lightmap,At.emissivemap,At.bumpmap,At.normalmap,At.displacementmap,At.fog,At.lights,{emissive:{value:new Ve(0)},specular:{value:new Ve(1118481)},shininess:{value:30}}]),vertexShader:Wr.meshphong_vert,fragmentShader:Wr.meshphong_frag},standard:{uniforms:Ia([At.common,At.envmap,At.aomap,At.lightmap,At.emissivemap,At.bumpmap,At.normalmap,At.displacementmap,At.roughnessmap,At.metalnessmap,At.fog,At.lights,{emissive:{value:new Ve(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Wr.meshphysical_vert,fragmentShader:Wr.meshphysical_frag},toon:{uniforms:Ia([At.common,At.aomap,At.lightmap,At.emissivemap,At.bumpmap,At.normalmap,At.displacementmap,At.gradientmap,At.fog,At.lights,{emissive:{value:new Ve(0)}}]),vertexShader:Wr.meshtoon_vert,fragmentShader:Wr.meshtoon_frag},matcap:{uniforms:Ia([At.common,At.bumpmap,At.normalmap,At.displacementmap,At.fog,{matcap:{value:null}}]),vertexShader:Wr.meshmatcap_vert,fragmentShader:Wr.meshmatcap_frag},points:{uniforms:Ia([At.points,At.fog]),vertexShader:Wr.points_vert,fragmentShader:Wr.points_frag},dashed:{uniforms:Ia([At.common,At.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Wr.linedashed_vert,fragmentShader:Wr.linedashed_frag},depth:{uniforms:Ia([At.common,At.displacementmap]),vertexShader:Wr.depth_vert,fragmentShader:Wr.depth_frag},normal:{uniforms:Ia([At.common,At.bumpmap,At.normalmap,At.displacementmap,{opacity:{value:1}}]),vertexShader:Wr.meshnormal_vert,fragmentShader:Wr.meshnormal_frag},sprite:{uniforms:Ia([At.sprite,At.fog]),vertexShader:Wr.sprite_vert,fragmentShader:Wr.sprite_frag},background:{uniforms:{uvTransform:{value:new Qi},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Wr.background_vert,fragmentShader:Wr.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Wr.backgroundCube_vert,fragmentShader:Wr.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Wr.cube_vert,fragmentShader:Wr.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Wr.equirect_vert,fragmentShader:Wr.equirect_frag},distanceRGBA:{uniforms:Ia([At.common,At.displacementmap,{referencePosition:{value:new A},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Wr.distanceRGBA_vert,fragmentShader:Wr.distanceRGBA_frag},shadow:{uniforms:Ia([At.lights,At.fog,{color:{value:new Ve(0)},opacity:{value:1}}]),vertexShader:Wr.shadow_vert,fragmentShader:Wr.shadow_frag}};Rc.physical={uniforms:Ia([Rc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new le(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new Ve(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new le},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Ve(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Ve(1,1,1)},specularColorMap:{value:null}}]),vertexShader:Wr.meshphysical_vert,fragmentShader:Wr.meshphysical_frag};var GM={r:0,b:0,g:0};function Imt(t,r,e,i,n,s,a){let o=new Ve(0),l=s===!0?0:1,c,u,h=null,p=0,d=null;function f(g,y){let E=!1,b=y.isScene===!0?y.background:null;b&&b.isTexture&&(b=(y.backgroundBlurriness>0?e:r).get(b));let x=t.xr,S=x.getSession&&x.getSession();S&&S.environmentBlendMode==="additive"&&(b=null),b===null?m(o,l):b&&b.isColor&&(m(b,1),E=!0),(t.autoClear||E)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),b&&(b.isCubeTexture||b.mapping===By)?(u===void 0&&(u=new Je(new Qa(1,1,1),new Yt({name:"BackgroundCubeMaterial",uniforms:Dy(Rc.backgroundCube.uniforms),vertexShader:Rc.backgroundCube.vertexShader,fragmentShader:Rc.backgroundCube.fragmentShader,side:Gn,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(D,P,_){this.matrixWorld.copyPosition(_.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(u)),u.material.uniforms.envMap.value=b,u.material.uniforms.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=y.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,u.material.toneMapped=b.encoding!==yr,(h!==b||p!==b.version||d!==t.toneMapping)&&(u.material.needsUpdate=!0,h=b,p=b.version,d=t.toneMapping),u.layers.enableAll(),g.unshift(u,u.geometry,u.material,0,0,null)):b&&b.isTexture&&(c===void 0&&(c=new Je(new ts(2,2),new Yt({name:"BackgroundMaterial",uniforms:Dy(Rc.background.uniforms),vertexShader:Rc.background.vertexShader,fragmentShader:Rc.background.fragmentShader,side:en,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(c)),c.material.uniforms.t2D.value=b,c.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,c.material.toneMapped=b.encoding!==yr,b.matrixAutoUpdate===!0&&b.updateMatrix(),c.material.uniforms.uvTransform.value.copy(b.matrix),(h!==b||p!==b.version||d!==t.toneMapping)&&(c.material.needsUpdate=!0,h=b,p=b.version,d=t.toneMapping),c.layers.enableAll(),g.unshift(c,c.geometry,c.material,0,0,null))}function m(g,y){g.getRGB(GM,hhe(t)),i.buffers.color.setClear(GM.r,GM.g,GM.b,y,a)}return{getClearColor:function(){return o},setClearColor:function(g,y=1){o.set(g),l=y,m(o,l)},getClearAlpha:function(){return l},setClearAlpha:function(g){l=g,m(o,l)},render:f}}function Smt(t,r,e,i){let n=t.getParameter(34921),s=i.isWebGL2?null:r.get("OES_vertex_array_object"),a=i.isWebGL2||s!==null,o={},l=g(null),c=l,u=!1;function h(C,N,k,G,U){let j=!1;if(a){let ee=m(G,k,N);c!==ee&&(c=ee,d(c.object)),j=y(C,G,k,U),j&&E(C,G,k,U)}else{let ee=N.wireframe===!0;(c.geometry!==G.id||c.program!==k.id||c.wireframe!==ee)&&(c.geometry=G.id,c.program=k.id,c.wireframe=ee,j=!0)}U!==null&&e.update(U,34963),(j||u)&&(u=!1,_(C,N,k,G),U!==null&&t.bindBuffer(34963,e.get(U).buffer))}function p(){return i.isWebGL2?t.createVertexArray():s.createVertexArrayOES()}function d(C){return i.isWebGL2?t.bindVertexArray(C):s.bindVertexArrayOES(C)}function f(C){return i.isWebGL2?t.deleteVertexArray(C):s.deleteVertexArrayOES(C)}function m(C,N,k){let G=k.wireframe===!0,U=o[C.id];U===void 0&&(U={},o[C.id]=U);let j=U[N.id];j===void 0&&(j={},U[N.id]=j);let ee=j[G];return ee===void 0&&(ee=g(p()),j[G]=ee),ee}function g(C){let N=[],k=[],G=[];for(let U=0;U=0){let ve=U[se],be=j[se];if(be===void 0&&(se==="instanceMatrix"&&C.instanceMatrix&&(be=C.instanceMatrix),se==="instanceColor"&&C.instanceColor&&(be=C.instanceColor)),ve===void 0||ve.attribute!==be||be&&ve.data!==be.data)return!0;ee++}return c.attributesNum!==ee||c.index!==G}function E(C,N,k,G){let U={},j=N.attributes,ee=0,ae=k.getAttributes();for(let se in ae)if(ae[se].location>=0){let ve=j[se];ve===void 0&&(se==="instanceMatrix"&&C.instanceMatrix&&(ve=C.instanceMatrix),se==="instanceColor"&&C.instanceColor&&(ve=C.instanceColor));let be={};be.attribute=ve,ve&&ve.data&&(be.data=ve.data),U[se]=be,ee++}c.attributes=U,c.attributesNum=ee,c.index=G}function b(){let C=c.newAttributes;for(let N=0,k=C.length;N=0){let ue=U[ae];if(ue===void 0&&(ae==="instanceMatrix"&&C.instanceMatrix&&(ue=C.instanceMatrix),ae==="instanceColor"&&C.instanceColor&&(ue=C.instanceColor)),ue!==void 0){let ve=ue.normalized,be=ue.itemSize,de=e.get(ue);if(de===void 0)continue;let we=de.buffer,Fe=de.type,je=de.bytesPerElement;if(ue.isInterleavedBufferAttribute){let Oe=ue.data,dt=Oe.stride,Be=ue.offset;if(Oe.isInstancedInterleavedBuffer){for(let ke=0;ke0&&t.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";P="mediump"}return P==="mediump"&&t.getShaderPrecisionFormat(35633,36337).precision>0&&t.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let a=typeof WebGL2RenderingContext!="undefined"&&t instanceof WebGL2RenderingContext,o=e.precision!==void 0?e.precision:"highp",l=s(o);l!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",l,"instead."),o=l);let c=a||r.has("WEBGL_draw_buffers"),u=e.logarithmicDepthBuffer===!0,h=t.getParameter(34930),p=t.getParameter(35660),d=t.getParameter(3379),f=t.getParameter(34076),m=t.getParameter(34921),g=t.getParameter(36347),y=t.getParameter(36348),E=t.getParameter(36349),b=p>0,x=a||r.has("OES_texture_float"),S=b&&x,D=a?t.getParameter(36183):0;return{isWebGL2:a,drawBuffers:c,getMaxAnisotropy:n,getMaxPrecision:s,precision:o,logarithmicDepthBuffer:u,maxTextures:h,maxVertexTextures:p,maxTextureSize:d,maxCubemapSize:f,maxAttributes:m,maxVertexUniforms:g,maxVaryings:y,maxFragmentUniforms:E,vertexTextures:b,floatFragmentTextures:x,floatVertexTextures:S,maxSamples:D}}function Rmt(t){let r=this,e=null,i=0,n=!1,s=!1,a=new Ei,o=new Qi,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(h,p){let d=h.length!==0||p||i!==0||n;return n=p,i=h.length,d},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(h,p){e=u(h,p,0)},this.setState=function(h,p,d){let f=h.clippingPlanes,m=h.clipIntersection,g=h.clipShadows,y=t.get(h);if(!n||f===null||f.length===0||s&&!g)s?u(null):c();else{let E=s?0:i,b=E*4,x=y.clippingState||null;l.value=x,x=u(f,p,b,d);for(let S=0;S!==b;++S)x[S]=e[S];y.clippingState=x,this.numIntersection=m?this.numPlanes:0,this.numPlanes+=E}};function c(){l.value!==e&&(l.value=e,l.needsUpdate=i>0),r.numPlanes=i,r.numIntersection=0}function u(h,p,d,f){let m=h!==null?h.length:0,g=null;if(m!==0){if(g=l.value,f!==!0||g===null){let y=d+m*4,E=p.matrixWorldInverse;o.getNormalMatrix(E),(g===null||g.length0){let c=new xD(l.height/2);return c.fromEquirectangularTexture(t,a),r.set(a,c),a.addEventListener("dispose",n),e(c.texture,a.mapping)}else return null}}return a}function n(a){let o=a.target;o.removeEventListener("dispose",n);let l=r.get(o);l!==void 0&&(r.delete(o),l.dispose())}function s(){r=new WeakMap}return{get:i,dispose:s}}var Zi=class extends vg{constructor(r=-1,e=1,i=1,n=-1,s=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=r,this.right=e,this.top=i,this.bottom=n,this.near=s,this.far=a,this.updateProjectionMatrix()}copy(r,e){return super.copy(r,e),this.left=r.left,this.right=r.right,this.top=r.top,this.bottom=r.bottom,this.near=r.near,this.far=r.far,this.zoom=r.zoom,this.view=r.view===null?null:Object.assign({},r.view),this}setViewOffset(r,e,i,n,s,a){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=r,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let r=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,s=i-r,a=i+r,o=n+e,l=n-e;if(this.view!==null&&this.view.enabled){let c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,a=s+c*this.view.width,o-=u*this.view.offsetY,l=o-u*this.view.height}this.projectionMatrix.makeOrthographic(s,a,o,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(r){let e=super.toJSON(r);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}},Iy=4,hce=[.125,.215,.35,.446,.526,.582],lg=20,dH=new Zi,pce=new Ve,fH=null,og=(1+Math.sqrt(5))/2,gy=1/og,dce=[new A(1,1,1),new A(-1,1,1),new A(1,1,-1),new A(-1,1,-1),new A(0,og,gy),new A(0,og,-gy),new A(gy,0,og),new A(-gy,0,og),new A(og,gy,0),new A(-og,gy,0)],yp=class{constructor(r){this._renderer=r,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(r,e=0,i=.1,n=100){fH=this._renderer.getRenderTarget(),this._setSize(256);let s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(r,i,n,s),e>0&&this._blur(s,0,0,e),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(r,e=null){return this._fromTexture(r,e)}fromCubemap(r,e=null){return this._fromTexture(r,e)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=gce(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=mce(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(r){this._lodMax=Math.floor(Math.log2(r)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let r=0;r2?b:0,b,b),u.setRenderTarget(n),m&&u.render(f,o),u.render(r,o)}f.geometry.dispose(),f.material.dispose(),u.toneMapping=p,u.autoClear=h,r.background=g}_textureToCubeUV(r,e){let i=this._renderer,n=r.mapping===sf||r.mapping===af;n?(this._cubemapMaterial===null&&(this._cubemapMaterial=gce()),this._cubemapMaterial.uniforms.flipEnvMap.value=r.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=mce());let s=n?this._cubemapMaterial:this._equirectMaterial,a=new Je(this._lodPlanes[0],s),o=s.uniforms;o.envMap.value=r;let l=this._cubeSize;VM(e,0,0,3*l,2*l),i.setRenderTarget(e),i.render(a,dH)}_applyPMREM(r){let e=this._renderer,i=e.autoClear;e.autoClear=!1;for(let n=1;nlg&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${g} samples when the maximum is set to ${lg}`);let y=[],E=0;for(let P=0;Pb-Iy?n-b+Iy:0),D=4*(this._cubeSize-x);VM(e,S,D,3*x,2*x),l.setRenderTarget(e),l.render(h,dH)}};function Dmt(t){let r=[],e=[],i=[],n=t,s=t-Iy+1+hce.length;for(let a=0;at-Iy?l=hce[a-t+Iy-1]:a===0&&(l=0),i.push(l);let c=1/(o-2),u=-c,h=1+c,p=[u,u,h,u,h,h,u,u,h,h,u,h],d=6,f=6,m=3,g=2,y=1,E=new Float32Array(m*f*d),b=new Float32Array(g*f*d),x=new Float32Array(y*f*d);for(let D=0;D2?0:-1,w=[P,_,0,P+2/3,_,0,P+2/3,_+1,0,P,_,0,P+2/3,_+1,0,P,_+1,0];E.set(w,m*f*D),b.set(p,g*f*D);let F=[D,D,D,D,D,D];x.set(F,y*f*D)}let S=new it;S.setAttribute("position",new jt(E,m)),S.setAttribute("uv",new jt(b,g)),S.setAttribute("faceIndex",new jt(x,y)),r.push(S),n>Iy&&n--}return{lodPlanes:r,sizeLods:e,sigmas:i}}function fce(t,r,e){let i=new kr(t,r,e);return i.texture.mapping=By,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function VM(t,r,e,i,n){t.viewport.set(r,e,i,n),t.scissor.set(r,e,i,n)}function Cmt(t,r,e){let i=new Float32Array(lg),n=new A(0,1,0);return new Yt({name:"SphericalGaussianBlur",defines:{n:lg,CUBEUV_TEXEL_WIDTH:1/r,CUBEUV_TEXEL_HEIGHT:1/e,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n}},vertexShader:MU(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform int samples; - uniform float weights[ n ]; - uniform bool latitudinal; - uniform float dTheta; - uniform float mipInt; - uniform vec3 poleAxis; - - #define ENVMAP_TYPE_CUBE_UV - #include - - vec3 getSample( float theta, vec3 axis ) { - - float cosTheta = cos( theta ); - // Rodrigues' axis-angle rotation - vec3 sampleDirection = vOutputDirection * cosTheta - + cross( axis, vOutputDirection ) * sin( theta ) - + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); - - return bilinearCubeUV( envMap, sampleDirection, mipInt ); - - } - - void main() { - - vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); - - if ( all( equal( axis, vec3( 0.0 ) ) ) ) { - - axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); - - } - - axis = normalize( axis ); - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); - - for ( int i = 1; i < n; i++ ) { - - if ( i >= samples ) { - - break; - - } - - float theta = dTheta * float( i ); - gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); - gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); - - } - - } - `,blending:Fi,depthTest:!1,depthWrite:!1})}function mce(){return new Yt({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:MU(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - - #include - - void main() { - - vec3 outputDirection = normalize( vOutputDirection ); - vec2 uv = equirectUv( outputDirection ); - - gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); - - } - `,blending:Fi,depthTest:!1,depthWrite:!1})}function gce(){return new Yt({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:MU(),fragmentShader:` - - precision mediump float; - precision mediump int; - - uniform float flipEnvMap; - - varying vec3 vOutputDirection; - - uniform samplerCube envMap; - - void main() { - - gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); - - } - `,blending:Fi,depthTest:!1,depthWrite:!1})}function MU(){return` - - precision mediump float; - precision mediump int; - - attribute float faceIndex; - - varying vec3 vOutputDirection; - - // RH coordinate system; PMREM face-indexing convention - vec3 getDirection( vec2 uv, float face ) { - - uv = 2.0 * uv - 1.0; - - vec3 direction = vec3( uv, 1.0 ); - - if ( face == 0.0 ) { - - direction = direction.zyx; // ( 1, v, u ) pos x - - } else if ( face == 1.0 ) { - - direction = direction.xzy; - direction.xz *= -1.0; // ( -u, 1, -v ) pos y - - } else if ( face == 2.0 ) { - - direction.x *= -1.0; // ( -u, v, 1 ) pos z - - } else if ( face == 3.0 ) { - - direction = direction.zyx; - direction.xz *= -1.0; // ( -1, v, -u ) neg x - - } else if ( face == 4.0 ) { - - direction = direction.xzy; - direction.xy *= -1.0; // ( -u, -1, v ) neg y - - } else if ( face == 5.0 ) { - - direction.z *= -1.0; // ( u, v, -1 ) neg z - - } - - return direction; - - } - - void main() { - - vOutputDirection = getDirection( uv, faceIndex ); - gl_Position = vec4( position, 1.0 ); - - } - `}function Amt(t){let r=new WeakMap,e=null;function i(o){if(o&&o.isTexture){let l=o.mapping,c=l===mg||l===Zb,u=l===sf||l===af;if(c||u)if(o.isRenderTargetTexture&&o.needsPMREMUpdate===!0){o.needsPMREMUpdate=!1;let h=r.get(o);return e===null&&(e=new yp(t)),h=c?e.fromEquirectangular(o,h):e.fromCubemap(o,h),r.set(o,h),h.texture}else{if(r.has(o))return r.get(o).texture;{let h=o.image;if(c&&h&&h.height>0||u&&h&&n(h)){e===null&&(e=new yp(t));let p=c?e.fromEquirectangular(o):e.fromCubemap(o);return r.set(o,p),o.addEventListener("dispose",s),p.texture}else return null}}}return o}function n(o){let l=0,c=6;for(let u=0;ur.maxTextureSize&&(X=Math.ceil(F/r.maxTextureSize),F=r.maxTextureSize);let H=new Float32Array(F*X*4*m),he=new Ry(H,F,X,m);he.type=_a,he.needsUpdate=!0;let C=w*4;for(let k=0;k0)return t;let n=r*e,s=vce[n];if(s===void 0&&(s=new Float32Array(n),vce[n]=s),r!==0){i.toArray(s,0);for(let a=1,o=0;a!==r;++a)o+=e,t[a].toArray(s,o)}return s}function vs(t,r){if(t.length!==r.length)return!1;for(let e=0,i=t.length;e":" "} ${o}: ${e[a]}`)}return i.join(` -`)}function Dgt(t){switch(t){case wl:return["Linear","( value )"];case yr:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",t),["Linear","( value )"]}}function Sce(t,r,e){let i=t.getShaderParameter(r,35713),n=t.getShaderInfoLog(r).trim();if(i&&n==="")return"";let s=/ERROR: 0:(\d+)/.exec(n);if(s){let a=parseInt(s[1]);return e.toUpperCase()+` - -`+n+` - -`+Mgt(t.getShaderSource(r),a)}else return n}function Cgt(t,r){let e=Dgt(r);return"vec4 "+t+"( vec4 value ) { return LinearTo"+e[0]+e[1]+"; }"}function Agt(t,r){let e;switch(r){case Uue:e="Linear";break;case Bue:e="Reinhard";break;case kue:e="OptimizedCineon";break;case Gue:e="ACESFilmic";break;case Vue:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",r),e="Linear"}return"vec3 "+t+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}function Ogt(t){return[t.extensionDerivatives||t.envMapCubeUVHeight||t.bumpMap||t.tangentSpaceNormalMap||t.clearcoatNormalMap||t.flatShading||t.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap||t.transmission)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Wb).join(` -`)}function Pgt(t){let r=[];for(let e in t){let i=t[e];i!==!1&&r.push("#define "+e+" "+i)}return r.join(` -`)}function Ngt(t,r){let e={},i=t.getProgramParameter(r,35721);for(let n=0;n/gm;function m4(t){return t.replace(Lgt,Fgt)}function Fgt(t,r){let e=Wr[r];if(e===void 0)throw new Error("Can not resolve #include <"+r+">");return m4(e)}var Hgt=/#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 Rce(t){return t.replace(Hgt,Ugt)}function Ugt(t,r,e,i){let n="";for(let s=parseInt(r);s0&&(g+=` -`),y=[d,f].filter(Wb).join(` -`),y.length>0&&(y+=` -`)):(g=[Mce(e),"#define SHADER_NAME "+e.shaderName,f,e.instancing?"#define USE_INSTANCING":"",e.instancingColor?"#define USE_INSTANCING_COLOR":"",e.supportsVertexTextures?"#define VERTEX_TEXTURES":"",e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+u:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.displacementMap&&e.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.flatShading?"#define FLAT_SHADED":"",e.skinning?"#define USE_SKINNING":"",e.morphTargets?"#define USE_MORPHTARGETS":"",e.morphNormals&&e.flatShading===!1?"#define USE_MORPHNORMALS":"",e.morphColors&&e.isWebGL2?"#define USE_MORPHCOLORS":"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+e.morphTextureStride:"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_COUNT "+e.morphTargetsCount:"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+l:"",e.sizeAttenuation?"#define USE_SIZEATTENUATION":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.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_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",` -`].filter(Wb).join(` -`),y=[d,Mce(e),"#define SHADER_NAME "+e.shaderName,f,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.matcap?"#define USE_MATCAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+c:"",e.envMap?"#define "+u:"",e.envMap?"#define "+h:"",p?"#define CUBEUV_TEXEL_WIDTH "+p.texelWidth:"",p?"#define CUBEUV_TEXEL_HEIGHT "+p.texelHeight:"",p?"#define CUBEUV_MAX_MIP "+p.maxMip+".0":"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoat?"#define USE_CLEARCOAT":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescence?"#define USE_IRIDESCENCE":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaTest?"#define USE_ALPHATEST":"",e.sheen?"#define USE_SHEEN":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors||e.instancingColor?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.gradientMap?"#define USE_GRADIENTMAP":"",e.flatShading?"#define FLAT_SHADED":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+l:"",e.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",e.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==Lu?"#define TONE_MAPPING":"",e.toneMapping!==Lu?Wr.tonemapping_pars_fragment:"",e.toneMapping!==Lu?Agt("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",Wr.encodings_pars_fragment,Cgt("linearToOutputTexel",e.outputEncoding),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"",` -`].filter(Wb).join(` -`)),a=m4(a),a=_ce(a,e),a=wce(a,e),o=m4(o),o=_ce(o,e),o=wce(o,e),a=Rce(a),o=Rce(o),e.isWebGL2&&e.isRawShaderMaterial!==!0&&(E=`#version 300 es -`,g=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` -`)+` -`+g,y=["#define varying in",e.glslVersion===e4?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===e4?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` -`)+` -`+y);let b=E+g+a,x=E+y+o,S=Ice(n,35633,b),D=Ice(n,35632,x);if(n.attachShader(m,S),n.attachShader(m,D),e.index0AttributeName!==void 0?n.bindAttribLocation(m,0,e.index0AttributeName):e.morphTargets===!0&&n.bindAttribLocation(m,0,"position"),n.linkProgram(m),t.debug.checkShaderErrors){let w=n.getProgramInfoLog(m).trim(),F=n.getShaderInfoLog(S).trim(),X=n.getShaderInfoLog(D).trim(),H=!0,he=!0;if(n.getProgramParameter(m,35714)===!1){H=!1;let C=Sce(n,S,"vertex"),N=Sce(n,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+n.getError()+" - VALIDATE_STATUS "+n.getProgramParameter(m,35715)+` - -Program Info Log: `+w+` -`+C+` -`+N)}else w!==""?console.warn("THREE.WebGLProgram: Program Info Log:",w):(F===""||X==="")&&(he=!1);he&&(this.diagnostics={runnable:H,programLog:w,vertexShader:{log:F,prefix:g},fragmentShader:{log:X,prefix:y}})}n.deleteShader(S),n.deleteShader(D);let P;this.getUniforms=function(){return P===void 0&&(P=new _y(n,m)),P};let _;return this.getAttributes=function(){return _===void 0&&(_=Ngt(n,m)),_},this.destroy=function(){i.releaseStatesOfProgram(this),n.deleteProgram(m),this.program=void 0},this.name=e.shaderName,this.id=Rgt++,this.cacheKey=r,this.usedTimes=1,this.program=m,this.vertexShader=S,this.fragmentShader=D,this}var Wgt=0,g4=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(r){let e=r.vertexShader,i=r.fragmentShader,n=this._getShaderStage(e),s=this._getShaderStage(i),a=this._getShaderCacheForMaterial(r);return a.has(n)===!1&&(a.add(n),n.usedTimes++),a.has(s)===!1&&(a.add(s),s.usedTimes++),this}remove(r){let e=this.materialCache.get(r);for(let i of e)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(r),this}getVertexShaderID(r){return this._getShaderStage(r.vertexShader).id}getFragmentShaderID(r){return this._getShaderStage(r.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(r){let e=this.materialCache,i=e.get(r);return i===void 0&&(i=new Set,e.set(r,i)),i}_getShaderStage(r){let e=this.shaderCache,i=e.get(r);return i===void 0&&(i=new v4(r),e.set(r,i)),i}},v4=class{constructor(r){this.id=Wgt++,this.code=r,this.usedTimes=0}};function qgt(t,r,e,i,n,s,a){let o=new My,l=new g4,c=[],u=n.isWebGL2,h=n.logarithmicDepthBuffer,p=n.vertexTextures,d=n.precision,f={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 m(_,w,F,X,H){let he=X.fog,C=H.geometry,N=_.isMeshStandardMaterial?X.environment:null,k=(_.isMeshStandardMaterial?e:r).get(_.envMap||N),G=k&&k.mapping===By?k.image.height:null,U=f[_.type];_.precision!==null&&(d=n.getMaxPrecision(_.precision),d!==_.precision&&console.warn("THREE.WebGLProgram.getParameters:",_.precision,"not supported, using",d,"instead."));let j=C.morphAttributes.position||C.morphAttributes.normal||C.morphAttributes.color,ee=j!==void 0?j.length:0,ae=0;C.morphAttributes.position!==void 0&&(ae=1),C.morphAttributes.normal!==void 0&&(ae=2),C.morphAttributes.color!==void 0&&(ae=3);let se,ue,ve,be;if(U){let dt=Rc[U];se=dt.vertexShader,ue=dt.fragmentShader}else se=_.vertexShader,ue=_.fragmentShader,l.update(_),ve=l.getVertexShaderID(_),be=l.getFragmentShaderID(_);let de=t.getRenderTarget(),we=_.alphaTest>0,Fe=_.clearcoat>0,je=_.iridescence>0;return{isWebGL2:u,shaderID:U,shaderName:_.type,vertexShader:se,fragmentShader:ue,defines:_.defines,customVertexShaderID:ve,customFragmentShaderID:be,isRawShaderMaterial:_.isRawShaderMaterial===!0,glslVersion:_.glslVersion,precision:d,instancing:H.isInstancedMesh===!0,instancingColor:H.isInstancedMesh===!0&&H.instanceColor!==null,supportsVertexTextures:p,outputEncoding:de===null?t.outputEncoding:de.isXRRenderTarget===!0?de.texture.encoding:wl,map:!!_.map,matcap:!!_.matcap,envMap:!!k,envMapMode:k&&k.mapping,envMapCubeUVHeight:G,lightMap:!!_.lightMap,aoMap:!!_.aoMap,emissiveMap:!!_.emissiveMap,bumpMap:!!_.bumpMap,normalMap:!!_.normalMap,objectSpaceNormalMap:_.normalMapType===ahe,tangentSpaceNormalMap:_.normalMapType===mf,decodeVideoTexture:!!_.map&&_.map.isVideoTexture===!0&&_.map.encoding===yr,clearcoat:Fe,clearcoatMap:Fe&&!!_.clearcoatMap,clearcoatRoughnessMap:Fe&&!!_.clearcoatRoughnessMap,clearcoatNormalMap:Fe&&!!_.clearcoatNormalMap,iridescence:je,iridescenceMap:je&&!!_.iridescenceMap,iridescenceThicknessMap:je&&!!_.iridescenceThicknessMap,displacementMap:!!_.displacementMap,roughnessMap:!!_.roughnessMap,metalnessMap:!!_.metalnessMap,specularMap:!!_.specularMap,specularIntensityMap:!!_.specularIntensityMap,specularColorMap:!!_.specularColorMap,opaque:_.transparent===!1&&_.blending===pg,alphaMap:!!_.alphaMap,alphaTest:we,gradientMap:!!_.gradientMap,sheen:_.sheen>0,sheenColorMap:!!_.sheenColorMap,sheenRoughnessMap:!!_.sheenRoughnessMap,transmission:_.transmission>0,transmissionMap:!!_.transmissionMap,thicknessMap:!!_.thicknessMap,combine:_.combine,vertexTangents:!!_.normalMap&&!!C.attributes.tangent,vertexColors:_.vertexColors,vertexAlphas:_.vertexColors===!0&&!!C.attributes.color&&C.attributes.color.itemSize===4,vertexUvs:!!_.map||!!_.bumpMap||!!_.normalMap||!!_.specularMap||!!_.alphaMap||!!_.emissiveMap||!!_.roughnessMap||!!_.metalnessMap||!!_.clearcoatMap||!!_.clearcoatRoughnessMap||!!_.clearcoatNormalMap||!!_.iridescenceMap||!!_.iridescenceThicknessMap||!!_.displacementMap||!!_.transmissionMap||!!_.thicknessMap||!!_.specularIntensityMap||!!_.specularColorMap||!!_.sheenColorMap||!!_.sheenRoughnessMap,uvsVertexOnly:!(_.map||_.bumpMap||_.normalMap||_.specularMap||_.alphaMap||_.emissiveMap||_.roughnessMap||_.metalnessMap||_.clearcoatNormalMap||_.iridescenceMap||_.iridescenceThicknessMap||_.transmission>0||_.transmissionMap||_.thicknessMap||_.specularIntensityMap||_.specularColorMap||_.sheen>0||_.sheenColorMap||_.sheenRoughnessMap)&&!!_.displacementMap,fog:!!he,useFog:_.fog===!0,fogExp2:he&&he.isFogExp2,flatShading:!!_.flatShading,sizeAttenuation:_.sizeAttenuation,logarithmicDepthBuffer:h,skinning:H.isSkinnedMesh===!0,morphTargets:C.morphAttributes.position!==void 0,morphNormals:C.morphAttributes.normal!==void 0,morphColors:C.morphAttributes.color!==void 0,morphTargetsCount:ee,morphTextureStride:ae,numDirLights:w.directional.length,numPointLights:w.point.length,numSpotLights:w.spot.length,numSpotLightMaps:w.spotLightMap.length,numRectAreaLights:w.rectArea.length,numHemiLights:w.hemi.length,numDirLightShadows:w.directionalShadowMap.length,numPointLightShadows:w.pointShadowMap.length,numSpotLightShadows:w.spotShadowMap.length,numSpotLightShadowsWithMaps:w.numSpotLightShadowsWithMaps,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:_.dithering,shadowMapEnabled:t.shadowMap.enabled&&F.length>0,shadowMapType:t.shadowMap.type,toneMapping:_.toneMapped?t.toneMapping:Lu,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:_.premultipliedAlpha,doubleSided:_.side===wi,flipSided:_.side===Gn,useDepthPacking:!!_.depthPacking,depthPacking:_.depthPacking||0,index0AttributeName:_.index0AttributeName,extensionDerivatives:_.extensions&&_.extensions.derivatives,extensionFragDepth:_.extensions&&_.extensions.fragDepth,extensionDrawBuffers:_.extensions&&_.extensions.drawBuffers,extensionShaderTextureLOD:_.extensions&&_.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),customProgramCacheKey:_.customProgramCacheKey()}}function g(_){let w=[];if(_.shaderID?w.push(_.shaderID):(w.push(_.customVertexShaderID),w.push(_.customFragmentShaderID)),_.defines!==void 0)for(let F in _.defines)w.push(F),w.push(_.defines[F]);return _.isRawShaderMaterial===!1&&(y(w,_),E(w,_),w.push(t.outputEncoding)),w.push(_.customProgramCacheKey),w.join()}function y(_,w){_.push(w.precision),_.push(w.outputEncoding),_.push(w.envMapMode),_.push(w.envMapCubeUVHeight),_.push(w.combine),_.push(w.vertexUvs),_.push(w.fogExp2),_.push(w.sizeAttenuation),_.push(w.morphTargetsCount),_.push(w.morphAttributeCount),_.push(w.numDirLights),_.push(w.numPointLights),_.push(w.numSpotLights),_.push(w.numSpotLightMaps),_.push(w.numHemiLights),_.push(w.numRectAreaLights),_.push(w.numDirLightShadows),_.push(w.numPointLightShadows),_.push(w.numSpotLightShadows),_.push(w.numSpotLightShadowsWithMaps),_.push(w.shadowMapType),_.push(w.toneMapping),_.push(w.numClippingPlanes),_.push(w.numClipIntersection),_.push(w.depthPacking)}function E(_,w){o.disableAll(),w.isWebGL2&&o.enable(0),w.supportsVertexTextures&&o.enable(1),w.instancing&&o.enable(2),w.instancingColor&&o.enable(3),w.map&&o.enable(4),w.matcap&&o.enable(5),w.envMap&&o.enable(6),w.lightMap&&o.enable(7),w.aoMap&&o.enable(8),w.emissiveMap&&o.enable(9),w.bumpMap&&o.enable(10),w.normalMap&&o.enable(11),w.objectSpaceNormalMap&&o.enable(12),w.tangentSpaceNormalMap&&o.enable(13),w.clearcoat&&o.enable(14),w.clearcoatMap&&o.enable(15),w.clearcoatRoughnessMap&&o.enable(16),w.clearcoatNormalMap&&o.enable(17),w.iridescence&&o.enable(18),w.iridescenceMap&&o.enable(19),w.iridescenceThicknessMap&&o.enable(20),w.displacementMap&&o.enable(21),w.specularMap&&o.enable(22),w.roughnessMap&&o.enable(23),w.metalnessMap&&o.enable(24),w.gradientMap&&o.enable(25),w.alphaMap&&o.enable(26),w.alphaTest&&o.enable(27),w.vertexColors&&o.enable(28),w.vertexAlphas&&o.enable(29),w.vertexUvs&&o.enable(30),w.vertexTangents&&o.enable(31),w.uvsVertexOnly&&o.enable(32),_.push(o.mask),o.disableAll(),w.fog&&o.enable(0),w.useFog&&o.enable(1),w.flatShading&&o.enable(2),w.logarithmicDepthBuffer&&o.enable(3),w.skinning&&o.enable(4),w.morphTargets&&o.enable(5),w.morphNormals&&o.enable(6),w.morphColors&&o.enable(7),w.premultipliedAlpha&&o.enable(8),w.shadowMapEnabled&&o.enable(9),w.physicallyCorrectLights&&o.enable(10),w.doubleSided&&o.enable(11),w.flipSided&&o.enable(12),w.useDepthPacking&&o.enable(13),w.dithering&&o.enable(14),w.specularIntensityMap&&o.enable(15),w.specularColorMap&&o.enable(16),w.transmission&&o.enable(17),w.transmissionMap&&o.enable(18),w.thicknessMap&&o.enable(19),w.sheen&&o.enable(20),w.sheenColorMap&&o.enable(21),w.sheenRoughnessMap&&o.enable(22),w.decodeVideoTexture&&o.enable(23),w.opaque&&o.enable(24),_.push(o.mask)}function b(_){let w=f[_.type],F;if(w){let X=Rc[w];F=hn.clone(X.uniforms)}else F=_.uniforms;return F}function x(_,w){let F;for(let X=0,H=c.length;X0?i.push(y):d.transparent===!0?n.push(y):e.push(y)}function l(h,p,d,f,m,g){let y=a(h,p,d,f,m,g);d.transmission>0?i.unshift(y):d.transparent===!0?n.unshift(y):e.unshift(y)}function c(h,p){e.length>1&&e.sort(h||Xgt),i.length>1&&i.sort(p||Dce),n.length>1&&n.sort(p||Dce)}function u(){for(let h=r,p=t.length;h=s.length?(a=new Cce,s.push(a)):a=s[n],a}function e(){t=new WeakMap}return{get:r,dispose:e}}function Zgt(){let t={};return{get:function(r){if(t[r.id]!==void 0)return t[r.id];let e;switch(r.type){case"DirectionalLight":e={direction:new A,color:new Ve};break;case"SpotLight":e={position:new A,direction:new A,color:new Ve,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new A,color:new Ve,distance:0,decay:0};break;case"HemisphereLight":e={direction:new A,skyColor:new Ve,groundColor:new Ve};break;case"RectAreaLight":e={color:new Ve,position:new A,halfWidth:new A,halfHeight:new A};break}return t[r.id]=e,e}}}function Kgt(){let t={};return{get:function(r){if(t[r.id]!==void 0)return t[r.id];let e;switch(r.type){case"DirectionalLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new le};break;case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new le};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new le,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[r.id]=e,e}}}var Jgt=0;function Qgt(t,r){return(r.castShadow?2:0)-(t.castShadow?2:0)+(r.map?1:0)-(t.map?1:0)}function e0t(t,r){let e=new Zgt,i=Kgt(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-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};for(let u=0;u<9;u++)n.probe.push(new A);let s=new A,a=new Ue,o=new Ue;function l(u,h){let p=0,d=0,f=0;for(let X=0;X<9;X++)n.probe[X].set(0,0,0);let m=0,g=0,y=0,E=0,b=0,x=0,S=0,D=0,P=0,_=0;u.sort(Qgt);let w=h!==!0?Math.PI:1;for(let X=0,H=u.length;X0&&(r.isWebGL2||t.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=At.LTC_FLOAT_1,n.rectAreaLTC2=At.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(n.rectAreaLTC1=At.LTC_HALF_1,n.rectAreaLTC2=At.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),n.ambient[0]=p,n.ambient[1]=d,n.ambient[2]=f;let F=n.hash;(F.directionalLength!==m||F.pointLength!==g||F.spotLength!==y||F.rectAreaLength!==E||F.hemiLength!==b||F.numDirectionalShadows!==x||F.numPointShadows!==S||F.numSpotShadows!==D||F.numSpotMaps!==P)&&(n.directional.length=m,n.spot.length=y,n.rectArea.length=E,n.point.length=g,n.hemi.length=b,n.directionalShadow.length=x,n.directionalShadowMap.length=x,n.pointShadow.length=S,n.pointShadowMap.length=S,n.spotShadow.length=D,n.spotShadowMap.length=D,n.directionalShadowMatrix.length=x,n.pointShadowMatrix.length=S,n.spotLightMatrix.length=D+P-_,n.spotLightMap.length=P,n.numSpotLightShadowsWithMaps=_,F.directionalLength=m,F.pointLength=g,F.spotLength=y,F.rectAreaLength=E,F.hemiLength=b,F.numDirectionalShadows=x,F.numPointShadows=S,F.numSpotShadows=D,F.numSpotMaps=P,n.version=Jgt++)}function c(u,h){let p=0,d=0,f=0,m=0,g=0,y=h.matrixWorldInverse;for(let E=0,b=u.length;E=o.length?(l=new Ace(t,r),o.push(l)):l=o[a],l}function n(){e=new WeakMap}return{get:i,dispose:n}}var Tp=class extends Gr{constructor(r){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=she,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(r)}copy(r){return super.copy(r),this.depthPacking=r.depthPacking,this.map=r.map,this.alphaMap=r.alphaMap,this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this}},nx=class extends Gr{constructor(r){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.referencePosition=new A,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(r)}copy(r){return super.copy(r),this.referencePosition.copy(r.referencePosition),this.nearDistance=r.nearDistance,this.farDistance=r.farDistance,this.map=r.map,this.alphaMap=r.alphaMap,this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this}},r0t=`void main() { - gl_Position = vec4( position, 1.0 ); -}`,i0t=`uniform sampler2D shadow_pass; -uniform vec2 resolution; -uniform float radius; -#include -void main() { - const float samples = float( VSM_SAMPLES ); - float mean = 0.0; - float squared_mean = 0.0; - float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); - float uvStart = samples <= 1.0 ? 0.0 : - 1.0; - for ( float i = 0.0; i < samples; i ++ ) { - float uvOffset = uvStart + i * uvStride; - #ifdef HORIZONTAL_PASS - vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); - mean += distribution.x; - squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; - #else - float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); - mean += depth; - squared_mean += depth * depth; - #endif - } - mean = mean / samples; - squared_mean = squared_mean / samples; - float std_dev = sqrt( squared_mean - mean * mean ); - gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function n0t(t,r,e){let i=new eo,n=new le,s=new le,a=new Jr,o=new Tp({depthPacking:Gy}),l=new nx,c={},u=e.maxTextureSize,h={[en]:Gn,[Gn]:en,[wi]:wi},p=new Yt({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new le},radius:{value:4}},vertexShader:r0t,fragmentShader:i0t}),d=p.clone();d.defines.HORIZONTAL_PASS=1;let f=new it;f.setAttribute("position",new jt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let m=new Je(f,p),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=IU,this.render=function(x,S,D){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||x.length===0)return;let P=t.getRenderTarget(),_=t.getActiveCubeFace(),w=t.getActiveMipmapLevel(),F=t.state;F.setBlending(Fi),F.buffers.color.setClear(1,1,1,1),F.buffers.depth.setTest(!0),F.setScissorTest(!1);for(let X=0,H=x.length;Xu||n.y>u)&&(n.x>u&&(s.x=Math.floor(u/N.x),n.x=s.x*N.x,C.mapSize.x=s.x),n.y>u&&(s.y=Math.floor(u/N.y),n.y=s.y*N.y,C.mapSize.y=s.y)),C.map===null){let G=this.type!==by?{minFilter:Di,magFilter:Di}:{};C.map=new kr(n.x,n.y,G),C.map.texture.name=he.name+".shadowMap",C.camera.updateProjectionMatrix()}t.setRenderTarget(C.map),t.clear();let k=C.getViewportCount();for(let G=0;G0||S.map&&S.alphaTest>0){let H=F.uuid,he=S.uuid,C=c[H];C===void 0&&(C={},c[H]=C);let N=C[he];N===void 0&&(N=F.clone(),C[he]=N),F=N}return F.visible=S.visible,F.wireframe=S.wireframe,w===by?F.side=S.shadowSide!==null?S.shadowSide:S.side:F.side=S.shadowSide!==null?S.shadowSide:h[S.side],F.alphaMap=S.alphaMap,F.alphaTest=S.alphaTest,F.map=S.map,F.clipShadows=S.clipShadows,F.clippingPlanes=S.clippingPlanes,F.clipIntersection=S.clipIntersection,F.displacementMap=S.displacementMap,F.displacementScale=S.displacementScale,F.displacementBias=S.displacementBias,F.wireframeLinewidth=S.wireframeLinewidth,F.linewidth=S.linewidth,D.isPointLight===!0&&F.isMeshDistanceMaterial===!0&&(F.referencePosition.setFromMatrixPosition(D.matrixWorld),F.nearDistance=P,F.farDistance=_),F}function b(x,S,D,P,_){if(x.visible===!1)return;if(x.layers.test(S.layers)&&(x.isMesh||x.isLine||x.isPoints)&&(x.castShadow||x.receiveShadow&&_===by)&&(!x.frustumCulled||i.intersectsObject(x))){x.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,x.matrixWorld);let X=r.update(x),H=x.material;if(Array.isArray(H)){let he=X.groups;for(let C=0,N=he.length;C=1):U.indexOf("OpenGL ES")!==-1&&(G=parseFloat(/^OpenGL ES (\d)/.exec(U)[1]),k=G>=2);let j=null,ee={},ae=t.getParameter(3088),se=t.getParameter(2978),ue=new Jr().fromArray(ae),ve=new Jr().fromArray(se);function be(Ae,Xe,lt){let _t=new Uint8Array(4),Vt=t.createTexture();t.bindTexture(Ae,Vt),t.texParameteri(Ae,10241,9728),t.texParameteri(Ae,10240,9728);for(let Rr=0;RrCe||z.height>Ce)&&(Ge=Ce/Math.max(z.width,z.height)),Ge<1||Y===!0)if(typeof HTMLImageElement!="undefined"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&z instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&z instanceof ImageBitmap){let Ze=Y?ED:Math.floor,gt=Ze(Ge*z.width),ye=Ze(Ge*z.height);m===void 0&&(m=E(gt,ye));let Re=xe?E(gt,ye):m;return Re.width=gt,Re.height=ye,Re.getContext("2d").drawImage(z,0,0,gt,ye),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+z.width+"x"+z.height+") to ("+gt+"x"+ye+")."),Re}else return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+z.width+"x"+z.height+")."),z;return z}function x(z){return t4(z.width)&&t4(z.height)}function S(z){return o?!1:z.wrapS!==mn||z.wrapT!==mn||z.minFilter!==Di&&z.minFilter!==ai}function D(z,Y){return z.generateMipmaps&&Y&&z.minFilter!==Di&&z.minFilter!==ai}function P(z){t.generateMipmap(z)}function _(z,Y,xe,Ce,Ge=!1){if(o===!1)return Y;if(z!==null){if(t[z]!==void 0)return t[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ze=Y;return Y===6403&&(xe===5126&&(Ze=33326),xe===5131&&(Ze=33325),xe===5121&&(Ze=33321)),Y===33319&&(xe===5126&&(Ze=33328),xe===5131&&(Ze=33327),xe===5121&&(Ze=33323)),Y===6408&&(xe===5126&&(Ze=34836),xe===5131&&(Ze=34842),xe===5121&&(Ze=Ce===yr&&Ge===!1?35907:32856),xe===32819&&(Ze=32854),xe===32820&&(Ze=32855)),(Ze===33325||Ze===33326||Ze===33327||Ze===33328||Ze===34842||Ze===34836)&&r.get("EXT_color_buffer_float"),Ze}function w(z,Y,xe){return D(z,xe)===!0||z.isFramebufferTexture&&z.minFilter!==Di&&z.minFilter!==ai?Math.log2(Math.max(Y.width,Y.height))+1:z.mipmaps!==void 0&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?Y.mipmaps.length:1}function F(z){return z===Di||z===of||z===pp?9728:9729}function X(z){let Y=z.target;Y.removeEventListener("dispose",X),he(Y),Y.isVideoTexture&&f.delete(Y)}function H(z){let Y=z.target;Y.removeEventListener("dispose",H),N(Y)}function he(z){let Y=i.get(z);if(Y.__webglInit===void 0)return;let xe=z.source,Ce=g.get(xe);if(Ce){let Ge=Ce[Y.__cacheKey];Ge.usedTimes--,Ge.usedTimes===0&&C(z),Object.keys(Ce).length===0&&g.delete(xe)}i.remove(z)}function C(z){let Y=i.get(z);t.deleteTexture(Y.__webglTexture);let xe=z.source,Ce=g.get(xe);delete Ce[Y.__cacheKey],a.memory.textures--}function N(z){let Y=z.texture,xe=i.get(z),Ce=i.get(Y);if(Ce.__webglTexture!==void 0&&(t.deleteTexture(Ce.__webglTexture),a.memory.textures--),z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Ge=0;Ge<6;Ge++)t.deleteFramebuffer(xe.__webglFramebuffer[Ge]),xe.__webglDepthbuffer&&t.deleteRenderbuffer(xe.__webglDepthbuffer[Ge]);else{if(t.deleteFramebuffer(xe.__webglFramebuffer),xe.__webglDepthbuffer&&t.deleteRenderbuffer(xe.__webglDepthbuffer),xe.__webglMultisampledFramebuffer&&t.deleteFramebuffer(xe.__webglMultisampledFramebuffer),xe.__webglColorRenderbuffer)for(let Ge=0;Ge=l&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+l),k+=1,z}function j(z){let Y=[];return Y.push(z.wrapS),Y.push(z.wrapT),Y.push(z.wrapR||0),Y.push(z.magFilter),Y.push(z.minFilter),Y.push(z.anisotropy),Y.push(z.internalFormat),Y.push(z.format),Y.push(z.type),Y.push(z.generateMipmaps),Y.push(z.premultiplyAlpha),Y.push(z.flipY),Y.push(z.unpackAlignment),Y.push(z.encoding),Y.join()}function ee(z,Y){let xe=i.get(z);if(z.isVideoTexture&&re(z),z.isRenderTargetTexture===!1&&z.version>0&&xe.__version!==z.version){let Ce=z.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{Fe(xe,z,Y);return}}e.bindTexture(3553,xe.__webglTexture,33984+Y)}function ae(z,Y){let xe=i.get(z);if(z.version>0&&xe.__version!==z.version){Fe(xe,z,Y);return}e.bindTexture(35866,xe.__webglTexture,33984+Y)}function se(z,Y){let xe=i.get(z);if(z.version>0&&xe.__version!==z.version){Fe(xe,z,Y);return}e.bindTexture(32879,xe.__webglTexture,33984+Y)}function ue(z,Y){let xe=i.get(z);if(z.version>0&&xe.__version!==z.version){je(xe,z,Y);return}e.bindTexture(34067,xe.__webglTexture,33984+Y)}let ve={[gn]:10497,[mn]:33071,[mp]:33648},be={[Di]:9728,[of]:9984,[pp]:9986,[ai]:9729,[Hg]:9985,[wa]:9987};function de(z,Y,xe){if(xe?(t.texParameteri(z,10242,ve[Y.wrapS]),t.texParameteri(z,10243,ve[Y.wrapT]),(z===32879||z===35866)&&t.texParameteri(z,32882,ve[Y.wrapR]),t.texParameteri(z,10240,be[Y.magFilter]),t.texParameteri(z,10241,be[Y.minFilter])):(t.texParameteri(z,10242,33071),t.texParameteri(z,10243,33071),(z===32879||z===35866)&&t.texParameteri(z,32882,33071),(Y.wrapS!==mn||Y.wrapT!==mn)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(z,10240,F(Y.magFilter)),t.texParameteri(z,10241,F(Y.minFilter)),Y.minFilter!==Di&&Y.minFilter!==ai&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),r.has("EXT_texture_filter_anisotropic")===!0){let Ce=r.get("EXT_texture_filter_anisotropic");if(Y.magFilter===Di||Y.minFilter!==pp&&Y.minFilter!==wa||Y.type===_a&&r.has("OES_texture_float_linear")===!1||o===!1&&Y.type===Go&&r.has("OES_texture_half_float_linear")===!1)return;(Y.anisotropy>1||i.get(Y).__currentAnisotropy)&&(t.texParameterf(z,Ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Y.anisotropy,n.getMaxAnisotropy())),i.get(Y).__currentAnisotropy=Y.anisotropy)}}function we(z,Y){let xe=!1;z.__webglInit===void 0&&(z.__webglInit=!0,Y.addEventListener("dispose",X));let Ce=Y.source,Ge=g.get(Ce);Ge===void 0&&(Ge={},g.set(Ce,Ge));let Ze=j(Y);if(Ze!==z.__cacheKey){Ge[Ze]===void 0&&(Ge[Ze]={texture:t.createTexture(),usedTimes:0},a.memory.textures++,xe=!0),Ge[Ze].usedTimes++;let gt=Ge[z.__cacheKey];gt!==void 0&&(Ge[z.__cacheKey].usedTimes--,gt.usedTimes===0&&C(Y)),z.__cacheKey=Ze,z.__webglTexture=Ge[Ze].texture}return xe}function Fe(z,Y,xe){let Ce=3553;(Y.isDataArrayTexture||Y.isCompressedArrayTexture)&&(Ce=35866),Y.isData3DTexture&&(Ce=32879);let Ge=we(z,Y),Ze=Y.source;e.bindTexture(Ce,z.__webglTexture,33984+xe);let gt=i.get(Ze);if(Ze.version!==gt.__version||Ge===!0){e.activeTexture(33984+xe),t.pixelStorei(37440,Y.flipY),t.pixelStorei(37441,Y.premultiplyAlpha),t.pixelStorei(3317,Y.unpackAlignment),t.pixelStorei(37443,0);let ye=S(Y)&&x(Y.image)===!1,Re=b(Y.image,ye,!1,u);Re=me(Y,Re);let ut=x(Re)||o,vt=s.convert(Y.format,Y.encoding),Et=s.convert(Y.type),Ct=_(Y.internalFormat,vt,Et,Y.encoding,Y.isVideoTexture);de(Ce,Y,ut);let Dt,cr=Y.mipmaps,Xt=o&&Y.isVideoTexture!==!0,gr=gt.__version===void 0||Ge===!0,Ae=w(Y,Re,ut);if(Y.isDepthTexture)Ct=6402,o?Y.type===_a?Ct=36012:Y.type===rf?Ct=33190:Y.type===dp?Ct=35056:Ct=33189:Y.type===_a&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),Y.format===nf&&Ct===6402&&Y.type!==_x&&Y.type!==rf&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),Y.type=rf,Et=s.convert(Y.type)),Y.format===gp&&Ct===6402&&(Ct=34041,Y.type!==dp&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),Y.type=dp,Et=s.convert(Y.type))),gr&&(Xt?e.texStorage2D(3553,1,Ct,Re.width,Re.height):e.texImage2D(3553,0,Ct,Re.width,Re.height,0,vt,Et,null));else if(Y.isDataTexture)if(cr.length>0&&ut){Xt&&gr&&e.texStorage2D(3553,Ae,Ct,cr[0].width,cr[0].height);for(let Xe=0,lt=cr.length;Xe>=1,lt>>=1}}else if(cr.length>0&&ut){Xt&&gr&&e.texStorage2D(3553,Ae,Ct,cr[0].width,cr[0].height);for(let Xe=0,lt=cr.length;Xe0&&gr++,e.texStorage2D(34067,gr,Dt,Re[0].width,Re[0].height));for(let Xe=0;Xe<6;Xe++)if(ye){cr?e.texSubImage2D(34069+Xe,0,0,0,Re[Xe].width,Re[Xe].height,Et,Ct,Re[Xe].data):e.texImage2D(34069+Xe,0,Dt,Re[Xe].width,Re[Xe].height,0,Et,Ct,Re[Xe].data);for(let lt=0;lt=34069&&Ge<=34074)&&t.framebufferTexture2D(36160,Ce,Ge,i.get(xe).__webglTexture,0),e.bindFramebuffer(36160,null)}function dt(z,Y,xe){if(t.bindRenderbuffer(36161,z),Y.depthBuffer&&!Y.stencilBuffer){let Ce=33189;if(xe||$(Y)){let Ge=Y.depthTexture;Ge&&Ge.isDepthTexture&&(Ge.type===_a?Ce=36012:Ge.type===rf&&(Ce=33190));let Ze=J(Y);$(Y)?p.renderbufferStorageMultisampleEXT(36161,Ze,Ce,Y.width,Y.height):t.renderbufferStorageMultisample(36161,Ze,Ce,Y.width,Y.height)}else t.renderbufferStorage(36161,Ce,Y.width,Y.height);t.framebufferRenderbuffer(36160,36096,36161,z)}else if(Y.depthBuffer&&Y.stencilBuffer){let Ce=J(Y);xe&&$(Y)===!1?t.renderbufferStorageMultisample(36161,Ce,35056,Y.width,Y.height):$(Y)?p.renderbufferStorageMultisampleEXT(36161,Ce,35056,Y.width,Y.height):t.renderbufferStorage(36161,34041,Y.width,Y.height),t.framebufferRenderbuffer(36160,33306,36161,z)}else{let Ce=Y.isWebGLMultipleRenderTargets===!0?Y.texture:[Y.texture];for(let Ge=0;Ge0&&$(z)===!1){let ye=Ze?Y:[Y];xe.__webglMultisampledFramebuffer=t.createFramebuffer(),xe.__webglColorRenderbuffer=[],e.bindFramebuffer(36160,xe.__webglMultisampledFramebuffer);for(let Re=0;Re0&&$(z)===!1){let Y=z.isWebGLMultipleRenderTargets?z.texture:[z.texture],xe=z.width,Ce=z.height,Ge=16384,Ze=[],gt=z.stencilBuffer?33306:36096,ye=i.get(z),Re=z.isWebGLMultipleRenderTargets===!0;if(Re)for(let ut=0;ut0&&r.has("WEBGL_multisampled_render_to_texture")===!0&&Y.__useRenderToTexture!==!1}function re(z){let Y=a.render.frame;f.get(z)!==Y&&(f.set(z,Y),z.update())}function me(z,Y){let xe=z.encoding,Ce=z.format,Ge=z.type;return z.isCompressedTexture===!0||z.isVideoTexture===!0||z.format===TD||xe!==wl&&(xe===yr?o===!1?r.has("EXT_sRGB")===!0&&Ce===Bs?(z.format=TD,z.minFilter=ai,z.generateMipmaps=!1):Y=tx.sRGBToLinear(Y):(Ce!==Bs||Ge!==Fu)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",xe)),Y}this.allocateTextureUnit=U,this.resetTextureUnits=G,this.setTexture2D=ee,this.setTexture2DArray=ae,this.setTexture3D=se,this.setTextureCube=ue,this.rebindTextures=nt,this.setupRenderTarget=bt,this.updateRenderTargetMipmap=mt,this.updateMultisampleRenderTarget=_e,this.setupDepthRenderbuffer=ke,this.setupFrameBufferTexture=Oe,this.useMultisampledRTT=$}function vhe(t,r,e){let i=e.isWebGL2;function n(s,a=null){let o;if(s===Fu)return 5121;if(s===que)return 32819;if(s===Yue)return 32820;if(s===zue)return 5120;if(s===jue)return 5122;if(s===_x)return 5123;if(s===Wue)return 5124;if(s===rf)return 5125;if(s===_a)return 5126;if(s===Go)return i?5131:(o=r.get("OES_texture_half_float"),o!==null?o.HALF_FLOAT_OES:null);if(s===Xue)return 6406;if(s===Bs)return 6408;if(s===YD)return 6409;if(s===$ue)return 6410;if(s===nf)return 6402;if(s===gp)return 34041;if(s===TD)return o=r.get("EXT_sRGB"),o!==null?o.SRGB_ALPHA_EXT:null;if(s===XD)return 6403;if(s===Zue)return 36244;if(s===Kue)return 33319;if(s===Jue)return 33320;if(s===Que)return 36249;if(s===uD||s===hD||s===pD||s===dD)if(a===yr)if(o=r.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(s===uD)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===hD)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===pD)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===dD)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=r.get("WEBGL_compressed_texture_s3tc"),o!==null){if(s===uD)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===hD)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===pD)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===dD)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===AH||s===OH||s===PH||s===NH)if(o=r.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(s===AH)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===OH)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===PH)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===NH)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===ehe)return o=r.get("WEBGL_compressed_texture_etc1"),o!==null?o.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===LH||s===FH)if(o=r.get("WEBGL_compressed_texture_etc"),o!==null){if(s===LH)return a===yr?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(s===FH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===HH||s===UH||s===BH||s===kH||s===GH||s===VH||s===zH||s===jH||s===WH||s===qH||s===YH||s===XH||s===$H||s===ZH)if(o=r.get("WEBGL_compressed_texture_astc"),o!==null){if(s===HH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===UH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===BH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===kH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===GH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===VH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===zH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===jH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===WH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===qH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===YH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===XH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===$H)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===ZH)return a===yr?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===fD)if(o=r.get("EXT_texture_compression_bptc"),o!==null){if(s===fD)return a===yr?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(s===the||s===KH||s===JH||s===QH)if(o=r.get("EXT_texture_compression_rgtc"),o!==null){if(s===fD)return o.COMPRESSED_RED_RGTC1_EXT;if(s===KH)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===JH)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===QH)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===dp?i?34042:(o=r.get("WEBGL_depth_texture"),o!==null?o.UNSIGNED_INT_24_8_WEBGL:null):t[s]!==void 0?t[s]:null}return{convert:n}}var ID=class extends qr{constructor(r=[]){super(),this.isArrayCamera=!0,this.cameras=r}},hr=class extends pr{constructor(){super(),this.isGroup=!0,this.type="Group"}},o0t={type:"move"},Yb=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new hr,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 hr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new A,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new A),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new hr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new A,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new A),this._grip}dispatchEvent(r){return this._targetRay!==null&&this._targetRay.dispatchEvent(r),this._grip!==null&&this._grip.dispatchEvent(r),this._hand!==null&&this._hand.dispatchEvent(r),this}connect(r){if(r&&r.hand){let e=this._hand;if(e)for(let i of r.hand.values())this._getHandJoint(e,i)}return this.dispatchEvent({type:"connected",data:r}),this}disconnect(r){return this.dispatchEvent({type:"disconnected",data:r}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(r,e,i){let n=null,s=null,a=null,o=this._targetRay,l=this._grip,c=this._hand;if(r&&e.session.visibilityState!=="visible-blurred"){if(c&&r.hand){a=!0;for(let m of r.hand.values()){let g=e.getJointPose(m,i),y=this._getHandJoint(c,m);g!==null&&(y.matrix.fromArray(g.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.jointRadius=g.radius),y.visible=g!==null}let u=c.joints["index-finger-tip"],h=c.joints["thumb-tip"],p=u.position.distanceTo(h.position),d=.02,f=.005;c.inputState.pinching&&p>d+f?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:r.handedness,target:this})):!c.inputState.pinching&&p<=d-f&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:r.handedness,target:this}))}else l!==null&&r.gripSpace&&(s=e.getPose(r.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));o!==null&&(n=e.getPose(r.targetRaySpace,i),n===null&&s!==null&&(n=s),n!==null&&(o.matrix.fromArray(n.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),n.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(n.linearVelocity)):o.hasLinearVelocity=!1,n.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(n.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(o0t)))}return o!==null&&(o.visible=n!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(r,e){if(r.joints[e.jointName]===void 0){let i=new hr;i.matrixAutoUpdate=!1,i.visible=!1,r.joints[e.jointName]=i,r.add(i)}return r.joints[e.jointName]}},lf=class extends Hi{constructor(r,e,i,n,s,a,o,l,c,u){if(u=u!==void 0?u:nf,u!==nf&&u!==gp)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&u===nf&&(i=rf),i===void 0&&u===gp&&(i=dp),super(null,n,s,a,o,l,u,i,c),this.isDepthTexture=!0,this.image={width:r,height:e},this.magFilter=o!==void 0?o:Di,this.minFilter=l!==void 0?l:Di,this.flipY=!1,this.generateMipmaps=!1}},y4=class extends Ra{constructor(r,e){super();let i=this,n=null,s=1,a=null,o="local-floor",l=1,c=null,u=null,h=null,p=null,d=null,f=null,m=e.getContextAttributes(),g=null,y=null,E=[],b=[],x=new Set,S=new Map,D=new qr;D.layers.enable(1),D.viewport=new Jr;let P=new qr;P.layers.enable(2),P.viewport=new Jr;let _=[D,P],w=new ID;w.layers.enable(1),w.layers.enable(2);let F=null,X=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(se){let ue=E[se];return ue===void 0&&(ue=new Yb,E[se]=ue),ue.getTargetRaySpace()},this.getControllerGrip=function(se){let ue=E[se];return ue===void 0&&(ue=new Yb,E[se]=ue),ue.getGripSpace()},this.getHand=function(se){let ue=E[se];return ue===void 0&&(ue=new Yb,E[se]=ue),ue.getHandSpace()};function H(se){let ue=b.indexOf(se.inputSource);if(ue===-1)return;let ve=E[ue];ve!==void 0&&ve.dispatchEvent({type:se.type,data:se.inputSource})}function he(){n.removeEventListener("select",H),n.removeEventListener("selectstart",H),n.removeEventListener("selectend",H),n.removeEventListener("squeeze",H),n.removeEventListener("squeezestart",H),n.removeEventListener("squeezeend",H),n.removeEventListener("end",he),n.removeEventListener("inputsourceschange",C);for(let se=0;se=0&&(b[be]=null,E[be].disconnect(ve))}for(let ue=0;ue=b.length){b.push(ve),be=we;break}else if(b[we]===null){b[we]=ve,be=we;break}if(be===-1)break}let de=E[be];de&&de.connect(ve)}}let N=new A,k=new A;function G(se,ue,ve){N.setFromMatrixPosition(ue.matrixWorld),k.setFromMatrixPosition(ve.matrixWorld);let be=N.distanceTo(k),de=ue.projectionMatrix.elements,we=ve.projectionMatrix.elements,Fe=de[14]/(de[10]-1),je=de[14]/(de[10]+1),Oe=(de[9]+1)/de[5],dt=(de[9]-1)/de[5],Be=(de[8]-1)/de[0],ke=(we[8]+1)/we[0],nt=Fe*Be,bt=Fe*ke,mt=be/(-Be+ke),_e=mt*-Be;ue.matrixWorld.decompose(se.position,se.quaternion,se.scale),se.translateX(_e),se.translateZ(mt),se.matrixWorld.compose(se.position,se.quaternion,se.scale),se.matrixWorldInverse.copy(se.matrixWorld).invert();let J=Fe+mt,$=je+mt,re=nt-_e,me=bt+(be-_e),z=Oe*je/$*J,Y=dt*je/$*J;se.projectionMatrix.makePerspective(re,me,z,Y,J,$)}function U(se,ue){ue===null?se.matrixWorld.copy(se.matrix):se.matrixWorld.multiplyMatrices(ue.matrixWorld,se.matrix),se.matrixWorldInverse.copy(se.matrixWorld).invert()}this.updateCamera=function(se){if(n===null)return;w.near=P.near=D.near=se.near,w.far=P.far=D.far=se.far,(F!==w.near||X!==w.far)&&(n.updateRenderState({depthNear:w.near,depthFar:w.far}),F=w.near,X=w.far);let ue=se.parent,ve=w.cameras;U(w,ue);for(let de=0;dede&&(S.set(be,be.lastChangedTime),i.dispatchEvent({type:"planechanged",data:be}))}}f=null}let ae=new phe;ae.setAnimationLoop(ee),this.setAnimationLoop=function(se){j=se},this.dispose=function(){}}};function l0t(t,r){function e(m,g){g.color.getRGB(m.fogColor.value,hhe(t)),g.isFog?(m.fogNear.value=g.near,m.fogFar.value=g.far):g.isFogExp2&&(m.fogDensity.value=g.density)}function i(m,g,y,E,b){g.isMeshBasicMaterial||g.isMeshLambertMaterial?n(m,g):g.isMeshToonMaterial?(n(m,g),u(m,g)):g.isMeshPhongMaterial?(n(m,g),c(m,g)):g.isMeshStandardMaterial?(n(m,g),h(m,g),g.isMeshPhysicalMaterial&&p(m,g,b)):g.isMeshMatcapMaterial?(n(m,g),d(m,g)):g.isMeshDepthMaterial?n(m,g):g.isMeshDistanceMaterial?(n(m,g),f(m,g)):g.isMeshNormalMaterial?n(m,g):g.isLineBasicMaterial?(s(m,g),g.isLineDashedMaterial&&a(m,g)):g.isPointsMaterial?o(m,g,y,E):g.isSpriteMaterial?l(m,g):g.isShadowMaterial?(m.color.value.copy(g.color),m.opacity.value=g.opacity):g.isShaderMaterial&&(g.uniformsNeedUpdate=!1)}function n(m,g){m.opacity.value=g.opacity,g.color&&m.diffuse.value.copy(g.color),g.emissive&&m.emissive.value.copy(g.emissive).multiplyScalar(g.emissiveIntensity),g.map&&(m.map.value=g.map),g.alphaMap&&(m.alphaMap.value=g.alphaMap),g.bumpMap&&(m.bumpMap.value=g.bumpMap,m.bumpScale.value=g.bumpScale,g.side===Gn&&(m.bumpScale.value*=-1)),g.displacementMap&&(m.displacementMap.value=g.displacementMap,m.displacementScale.value=g.displacementScale,m.displacementBias.value=g.displacementBias),g.emissiveMap&&(m.emissiveMap.value=g.emissiveMap),g.normalMap&&(m.normalMap.value=g.normalMap,m.normalScale.value.copy(g.normalScale),g.side===Gn&&m.normalScale.value.negate()),g.specularMap&&(m.specularMap.value=g.specularMap),g.alphaTest>0&&(m.alphaTest.value=g.alphaTest);let y=r.get(g).envMap;if(y&&(m.envMap.value=y,m.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=g.reflectivity,m.ior.value=g.ior,m.refractionRatio.value=g.refractionRatio),g.lightMap){m.lightMap.value=g.lightMap;let x=t.physicallyCorrectLights!==!0?Math.PI:1;m.lightMapIntensity.value=g.lightMapIntensity*x}g.aoMap&&(m.aoMap.value=g.aoMap,m.aoMapIntensity.value=g.aoMapIntensity);let E;g.map?E=g.map:g.specularMap?E=g.specularMap:g.displacementMap?E=g.displacementMap:g.normalMap?E=g.normalMap:g.bumpMap?E=g.bumpMap:g.roughnessMap?E=g.roughnessMap:g.metalnessMap?E=g.metalnessMap:g.alphaMap?E=g.alphaMap:g.emissiveMap?E=g.emissiveMap:g.clearcoatMap?E=g.clearcoatMap:g.clearcoatNormalMap?E=g.clearcoatNormalMap:g.clearcoatRoughnessMap?E=g.clearcoatRoughnessMap:g.iridescenceMap?E=g.iridescenceMap:g.iridescenceThicknessMap?E=g.iridescenceThicknessMap:g.specularIntensityMap?E=g.specularIntensityMap:g.specularColorMap?E=g.specularColorMap:g.transmissionMap?E=g.transmissionMap:g.thicknessMap?E=g.thicknessMap:g.sheenColorMap?E=g.sheenColorMap:g.sheenRoughnessMap&&(E=g.sheenRoughnessMap),E!==void 0&&(E.isWebGLRenderTarget&&(E=E.texture),E.matrixAutoUpdate===!0&&E.updateMatrix(),m.uvTransform.value.copy(E.matrix));let b;g.aoMap?b=g.aoMap:g.lightMap&&(b=g.lightMap),b!==void 0&&(b.isWebGLRenderTarget&&(b=b.texture),b.matrixAutoUpdate===!0&&b.updateMatrix(),m.uv2Transform.value.copy(b.matrix))}function s(m,g){m.diffuse.value.copy(g.color),m.opacity.value=g.opacity}function a(m,g){m.dashSize.value=g.dashSize,m.totalSize.value=g.dashSize+g.gapSize,m.scale.value=g.scale}function o(m,g,y,E){m.diffuse.value.copy(g.color),m.opacity.value=g.opacity,m.size.value=g.size*y,m.scale.value=E*.5,g.map&&(m.map.value=g.map),g.alphaMap&&(m.alphaMap.value=g.alphaMap),g.alphaTest>0&&(m.alphaTest.value=g.alphaTest);let b;g.map?b=g.map:g.alphaMap&&(b=g.alphaMap),b!==void 0&&(b.matrixAutoUpdate===!0&&b.updateMatrix(),m.uvTransform.value.copy(b.matrix))}function l(m,g){m.diffuse.value.copy(g.color),m.opacity.value=g.opacity,m.rotation.value=g.rotation,g.map&&(m.map.value=g.map),g.alphaMap&&(m.alphaMap.value=g.alphaMap),g.alphaTest>0&&(m.alphaTest.value=g.alphaTest);let y;g.map?y=g.map:g.alphaMap&&(y=g.alphaMap),y!==void 0&&(y.matrixAutoUpdate===!0&&y.updateMatrix(),m.uvTransform.value.copy(y.matrix))}function c(m,g){m.specular.value.copy(g.specular),m.shininess.value=Math.max(g.shininess,1e-4)}function u(m,g){g.gradientMap&&(m.gradientMap.value=g.gradientMap)}function h(m,g){m.roughness.value=g.roughness,m.metalness.value=g.metalness,g.roughnessMap&&(m.roughnessMap.value=g.roughnessMap),g.metalnessMap&&(m.metalnessMap.value=g.metalnessMap),r.get(g).envMap&&(m.envMapIntensity.value=g.envMapIntensity)}function p(m,g,y){m.ior.value=g.ior,g.sheen>0&&(m.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),m.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(m.sheenColorMap.value=g.sheenColorMap),g.sheenRoughnessMap&&(m.sheenRoughnessMap.value=g.sheenRoughnessMap)),g.clearcoat>0&&(m.clearcoat.value=g.clearcoat,m.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(m.clearcoatMap.value=g.clearcoatMap),g.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap),g.clearcoatNormalMap&&(m.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),m.clearcoatNormalMap.value=g.clearcoatNormalMap,g.side===Gn&&m.clearcoatNormalScale.value.negate())),g.iridescence>0&&(m.iridescence.value=g.iridescence,m.iridescenceIOR.value=g.iridescenceIOR,m.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(m.iridescenceMap.value=g.iridescenceMap),g.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=g.iridescenceThicknessMap)),g.transmission>0&&(m.transmission.value=g.transmission,m.transmissionSamplerMap.value=y.texture,m.transmissionSamplerSize.value.set(y.width,y.height),g.transmissionMap&&(m.transmissionMap.value=g.transmissionMap),m.thickness.value=g.thickness,g.thicknessMap&&(m.thicknessMap.value=g.thicknessMap),m.attenuationDistance.value=g.attenuationDistance,m.attenuationColor.value.copy(g.attenuationColor)),m.specularIntensity.value=g.specularIntensity,m.specularColor.value.copy(g.specularColor),g.specularIntensityMap&&(m.specularIntensityMap.value=g.specularIntensityMap),g.specularColorMap&&(m.specularColorMap.value=g.specularColorMap)}function d(m,g){g.matcap&&(m.matcap.value=g.matcap)}function f(m,g){m.referencePosition.value.copy(g.referencePosition),m.nearDistance.value=g.nearDistance,m.farDistance.value=g.farDistance}return{refreshFogUniforms:e,refreshMaterialUniforms:i}}function c0t(t,r,e,i){let n={},s={},a=[],o=e.isWebGL2?t.getParameter(35375):0;function l(E,b){let x=b.program;i.uniformBlockBinding(E,x)}function c(E,b){let x=n[E.id];x===void 0&&(f(E),x=u(E),n[E.id]=x,E.addEventListener("dispose",g));let S=b.program;i.updateUBOMapping(E,S);let D=r.render.frame;s[E.id]!==D&&(p(E),s[E.id]=D)}function u(E){let b=h();E.__bindingPointIndex=b;let x=t.createBuffer(),S=E.__size,D=E.usage;return t.bindBuffer(35345,x),t.bufferData(35345,S,D),t.bindBuffer(35345,null),t.bindBufferBase(35345,b,x),x}function h(){for(let E=0;E0){D=x%S;let H=S-D;D!==0&&H-F.boundary<0&&(x+=S-D,w.__offset=x)}x+=F.storage}return D=x%S,D>0&&(x+=S-D),E.__size=x,E.__cache={},this}function m(E){let b={boundary:0,storage:0};return typeof E=="number"?(b.boundary=4,b.storage=4):E.isVector2?(b.boundary=8,b.storage=8):E.isVector3||E.isColor?(b.boundary=16,b.storage=12):E.isVector4?(b.boundary=16,b.storage=16):E.isMatrix3?(b.boundary=48,b.storage=48):E.isMatrix4?(b.boundary=64,b.storage=64):E.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",E),b}function g(E){let b=E.target;b.removeEventListener("dispose",g);let x=a.indexOf(b.__bindingPointIndex);a.splice(x,1),t.deleteBuffer(n[b.id]),delete n[b.id],delete s[b.id]}function y(){for(let E in n)t.deleteBuffer(n[E]);a=[],n={},s={}}return{bind:l,update:c,dispose:y}}function u0t(){let t=ex("canvas");return t.style.display="block",t}function Pl(t={}){this.isWebGLRenderer=!0;let r=t.canvas!==void 0?t.canvas:u0t(),e=t.context!==void 0?t.context:null,i=t.depth!==void 0?t.depth:!0,n=t.stencil!==void 0?t.stencil:!0,s=t.antialias!==void 0?t.antialias:!1,a=t.premultipliedAlpha!==void 0?t.premultipliedAlpha:!0,o=t.preserveDrawingBuffer!==void 0?t.preserveDrawingBuffer:!1,l=t.powerPreference!==void 0?t.powerPreference:"default",c=t.failIfMajorPerformanceCaveat!==void 0?t.failIfMajorPerformanceCaveat:!1,u;e!==null?u=e.getContextAttributes().alpha:u=t.alpha!==void 0?t.alpha:!1;let h=null,p=null,d=[],f=[];this.domElement=r,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=wl,this.physicallyCorrectLights=!1,this.toneMapping=Lu,this.toneMappingExposure=1;let m=this,g=!1,y=0,E=0,b=null,x=-1,S=null,D=new Jr,P=new Jr,_=null,w=r.width,F=r.height,X=1,H=null,he=null,C=new Jr(0,0,w,F),N=new Jr(0,0,w,F),k=!1,G=new eo,U=!1,j=!1,ee=null,ae=new Ue,se=new le,ue=new A,ve={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function be(){return b===null?X:1}let de=e;function we(Te,ze){for(let Qe=0;Qe0?p=f[f.length-1]:p=null,d.pop(),d.length>0?h=d[d.length-1]:h=null};function Ki(Te,ze,Qe,Le){if(Te.visible===!1)return;if(Te.layers.test(ze.layers)){if(Te.isGroup)Qe=Te.renderOrder;else if(Te.isLOD)Te.autoUpdate===!0&&Te.update(ze);else if(Te.isLight)p.pushLight(Te),Te.castShadow&&p.pushShadow(Te);else if(Te.isSprite){if(!Te.frustumCulled||G.intersectsSprite(Te)){Le&&ue.setFromMatrixPosition(Te.matrixWorld).applyMatrix4(ae);let Ir=J.update(Te),Nr=Te.material;Nr.visible&&h.push(Te,Ir,Nr,Qe,ue.z,null)}}else if((Te.isMesh||Te.isLine||Te.isPoints)&&(Te.isSkinnedMesh&&Te.skeleton.frame!==dt.render.frame&&(Te.skeleton.update(),Te.skeleton.frame=dt.render.frame),!Te.frustumCulled||G.intersectsObject(Te))){Le&&ue.setFromMatrixPosition(Te.matrixWorld).applyMatrix4(ae);let Ir=J.update(Te),Nr=Te.material;if(Array.isArray(Nr)){let Fr=Ir.groups;for(let Yr=0,kt=Fr.length;Yr0&&Fn(Ke,ze,Qe),Le&&Oe.viewport(D.copy(Le)),Ke.length>0&&Kt(Ke,ze,Qe),Jt.length>0&&Kt(Jt,ze,Qe),Ir.length>0&&Kt(Ir,ze,Qe),Oe.buffers.depth.setTest(!0),Oe.buffers.depth.setMask(!0),Oe.buffers.color.setMask(!0),Oe.setPolygonOffset(!1)}function Fn(Te,ze,Qe){let Le=je.isWebGL2;ee===null&&(ee=new kr(1,1,{generateMipmaps:!0,type:Fe.has("EXT_color_buffer_half_float")?Go:Fu,minFilter:wa,samples:Le&&s===!0?4:0})),m.getDrawingBufferSize(se),Le?ee.setSize(se.x,se.y):ee.setSize(ED(se.x),ED(se.y));let Ke=m.getRenderTarget();m.setRenderTarget(ee),m.clear();let Jt=m.toneMapping;m.toneMapping=Lu,Kt(Te,ze,Qe),m.toneMapping=Jt,ke.updateMultisampleRenderTarget(ee),ke.updateRenderTargetMipmap(ee),m.setRenderTarget(Ke)}function Kt(Te,ze,Qe){let Le=ze.isScene===!0?ze.overrideMaterial:null;for(let Ke=0,Jt=Te.length;Ke0&&ke.useMultisampledRTT(Te)===!1?Ke=Be.get(Te).__webglMultisampledFramebuffer:Ke=kt,D.copy(Te.viewport),P.copy(Te.scissor),_=Te.scissorTest}else D.copy(C).multiplyScalar(X).floor(),P.copy(N).multiplyScalar(X).floor(),_=k;if(Oe.bindFramebuffer(36160,Ke)&&je.drawBuffers&&Le&&Oe.drawBuffers(Te,Ke),Oe.viewport(D),Oe.scissor(P),Oe.setScissorTest(_),Jt){let Fr=Be.get(Te.texture);de.framebufferTexture2D(36160,36064,34069+ze,Fr.__webglTexture,Qe)}else if(Ir){let Fr=Be.get(Te.texture),Yr=ze||0;de.framebufferTextureLayer(36160,36064,Fr.__webglTexture,Qe||0,Yr)}x=-1},this.readRenderTargetPixels=function(Te,ze,Qe,Le,Ke,Jt,Ir){if(!(Te&&Te.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Nr=Be.get(Te).__webglFramebuffer;if(Te.isWebGLCubeRenderTarget&&Ir!==void 0&&(Nr=Nr[Ir]),Nr){Oe.bindFramebuffer(36160,Nr);try{let Fr=Te.texture,Yr=Fr.format,kt=Fr.type;if(Yr!==Bs&&ye.convert(Yr)!==de.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let Vr=kt===Go&&(Fe.has("EXT_color_buffer_half_float")||je.isWebGL2&&Fe.has("EXT_color_buffer_float"));if(kt!==Fu&&ye.convert(kt)!==de.getParameter(35738)&&!(kt===_a&&(je.isWebGL2||Fe.has("OES_texture_float")||Fe.has("WEBGL_color_buffer_float")))&&!Vr){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ze>=0&&ze<=Te.width-Le&&Qe>=0&&Qe<=Te.height-Ke&&de.readPixels(ze,Qe,Le,Ke,ye.convert(Yr),ye.convert(kt),Jt)}finally{let Fr=b!==null?Be.get(b).__webglFramebuffer:null;Oe.bindFramebuffer(36160,Fr)}}},this.copyFramebufferToTexture=function(Te,ze,Qe=0){let Le=Math.pow(2,-Qe),Ke=Math.floor(ze.image.width*Le),Jt=Math.floor(ze.image.height*Le);ke.setTexture2D(ze,0),de.copyTexSubImage2D(3553,Qe,0,0,Te.x,Te.y,Ke,Jt),Oe.unbindTexture()},this.copyTextureToTexture=function(Te,ze,Qe,Le=0){let Ke=ze.image.width,Jt=ze.image.height,Ir=ye.convert(Qe.format),Nr=ye.convert(Qe.type);ke.setTexture2D(Qe,0),de.pixelStorei(37440,Qe.flipY),de.pixelStorei(37441,Qe.premultiplyAlpha),de.pixelStorei(3317,Qe.unpackAlignment),ze.isDataTexture?de.texSubImage2D(3553,Le,Te.x,Te.y,Ke,Jt,Ir,Nr,ze.image.data):ze.isCompressedTexture?de.compressedTexSubImage2D(3553,Le,Te.x,Te.y,ze.mipmaps[0].width,ze.mipmaps[0].height,Ir,ze.mipmaps[0].data):de.texSubImage2D(3553,Le,Te.x,Te.y,Ir,Nr,ze.image),Le===0&&Qe.generateMipmaps&&de.generateMipmap(3553),Oe.unbindTexture()},this.copyTextureToTexture3D=function(Te,ze,Qe,Le,Ke=0){if(m.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let Jt=Te.max.x-Te.min.x+1,Ir=Te.max.y-Te.min.y+1,Nr=Te.max.z-Te.min.z+1,Fr=ye.convert(Le.format),Yr=ye.convert(Le.type),kt;if(Le.isData3DTexture)ke.setTexture3D(Le,0),kt=32879;else if(Le.isDataArrayTexture)ke.setTexture2DArray(Le,0),kt=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}de.pixelStorei(37440,Le.flipY),de.pixelStorei(37441,Le.premultiplyAlpha),de.pixelStorei(3317,Le.unpackAlignment);let Vr=de.getParameter(3314),ei=de.getParameter(32878),dn=de.getParameter(3316),ki=de.getParameter(3315),nr=de.getParameter(32877),q=Qe.isCompressedTexture?Qe.mipmaps[0]:Qe.image;de.pixelStorei(3314,q.width),de.pixelStorei(32878,q.height),de.pixelStorei(3316,Te.min.x),de.pixelStorei(3315,Te.min.y),de.pixelStorei(32877,Te.min.z),Qe.isDataTexture||Qe.isData3DTexture?de.texSubImage3D(kt,Ke,ze.x,ze.y,ze.z,Jt,Ir,Nr,Fr,Yr,q.data):Qe.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),de.compressedTexSubImage3D(kt,Ke,ze.x,ze.y,ze.z,Jt,Ir,Nr,Fr,q.data)):de.texSubImage3D(kt,Ke,ze.x,ze.y,ze.z,Jt,Ir,Nr,Fr,Yr,q),de.pixelStorei(3314,Vr),de.pixelStorei(32878,ei),de.pixelStorei(3316,dn),de.pixelStorei(3315,ki),de.pixelStorei(32877,nr),Ke===0&&Le.generateMipmaps&&de.generateMipmap(kt),Oe.unbindTexture()},this.initTexture=function(Te){Te.isCubeTexture?ke.setTextureCube(Te,0):Te.isData3DTexture?ke.setTexture3D(Te,0):Te.isDataArrayTexture||Te.isCompressedArrayTexture?ke.setTexture2DArray(Te,0):ke.setTexture2D(Te,0),Oe.unbindTexture()},this.resetState=function(){y=0,E=0,b=null,Oe.reset(),Re.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}var SD=class extends Pl{};SD.prototype.isWebGL1Renderer=!0;var Cy=class{constructor(r,e=25e-5){this.isFogExp2=!0,this.name="",this.color=new Ve(r),this.density=e}clone(){return new Cy(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}},Uu=class{constructor(r,e=1,i=1e3){this.isFog=!0,this.name="",this.color=new Ve(r),this.near=e,this.far=i}clone(){return new Uu(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}},On=class extends pr{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__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(r,e){return super.copy(r,e),r.background!==null&&(this.background=r.background.clone()),r.environment!==null&&(this.environment=r.environment.clone()),r.fog!==null&&(this.fog=r.fog.clone()),this.backgroundBlurriness=r.backgroundBlurriness,this.backgroundIntensity=r.backgroundIntensity,r.overrideMaterial!==null&&(this.overrideMaterial=r.overrideMaterial.clone()),this.matrixAutoUpdate=r.matrixAutoUpdate,this}toJSON(r){let e=super.toJSON(r);return this.fog!==null&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(e.object.backgroundIntensity=this.backgroundIntensity),e}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(r){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=r}},Ep=class{constructor(r,e){this.isInterleavedBuffer=!0,this.array=r,this.stride=e,this.count=r!==void 0?r.length/e:0,this.usage=Jb,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=ko()}onUploadCallback(){}set needsUpdate(r){r===!0&&this.version++}setUsage(r){return this.usage=r,this}copy(r){return this.array=new r.array.constructor(r.array),this.count=r.count,this.stride=r.stride,this.usage=r.usage,this}copyAt(r,e,i){r*=this.stride,i*=e.stride;for(let n=0,s=this.stride;nr.far||e.push({distance:l,point:kb.clone(),uv:un.getUV(kb,zM,Vb,jM,Oce,gH,Pce,new le),face:null,object:this})}copy(r,e){return super.copy(r,e),r.center!==void 0&&this.center.copy(r.center),this.material=r.material,this}};function WM(t,r,e,i,n,s){Ey.subVectors(t,e).addScalar(.5).multiply(i),n!==void 0?(Gb.x=s*Ey.x-n*Ey.y,Gb.y=n*Ey.x+s*Ey.y):Gb.copy(Ey),t.copy(r),t.x+=Gb.x,t.y+=Gb.y,t.applyMatrix4(yhe)}var qM=new A,Nce=new A,wD=class extends pr{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(r){super.copy(r,!1);let e=r.levels;for(let i=0,n=e.length;i0){let i,n;for(i=1,n=e.length;i0){qM.setFromMatrixPosition(this.matrixWorld);let n=r.ray.origin.distanceTo(qM);this.getObjectForDistance(n).raycast(r,e)}}update(r){let e=this.levels;if(e.length>1){qM.setFromMatrixPosition(r.matrixWorld),Nce.setFromMatrixPosition(this.matrixWorld);let i=qM.distanceTo(Nce)/r.zoom;e[0].object.visible=!0;let n,s;for(n=1,s=e.length;n=a)e[n-1].object.visible=!1,e[n].object.visible=!0;else break}for(this._currentLevel=n-1;nl)continue;p.applyMatrix4(this.matrixWorld);let _=r.ray.origin.distanceTo(p);_r.far||e.push({distance:_,point:h.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}else{let y=Math.max(0,a.start),E=Math.min(g.count,a.start+a.count);for(let b=y,x=E-1;bl)continue;p.applyMatrix4(this.matrixWorld);let D=r.ray.origin.distanceTo(p);Dr.far||e.push({distance:D,point:h.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){let e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){let n=e[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;s0){let n=e[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;sn.far)return;s.push({distance:c,distanceToRay:Math.sqrt(o),point:l,index:r,face:null,object:a})}}var E4=class extends Hi{constructor(r,e,i,n,s,a,o,l,c){super(r,e,i,n,s,a,o,l,c),this.isVideoTexture=!0,this.minFilter=a!==void 0?a:ai,this.magFilter=s!==void 0?s:ai,this.generateMipmaps=!1;let u=this;function h(){u.needsUpdate=!0,r.requestVideoFrameCallback(h)}"requestVideoFrameCallback"in r&&r.requestVideoFrameCallback(h)}clone(){return new this.constructor(this.image).copy(this)}update(){let r=this.image;"requestVideoFrameCallback"in r===!1&&r.readyState>=r.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}},b4=class extends Hi{constructor(r,e,i){super({width:r,height:e}),this.isFramebufferTexture=!0,this.format=i,this.magFilter=Di,this.minFilter=Di,this.generateMipmaps=!1,this.needsUpdate=!0}},sx=class extends Hi{constructor(r,e,i,n,s,a,o,l,c,u,h,p){super(null,a,o,l,c,u,n,s,h,p),this.isCompressedTexture=!0,this.image={width:e,height:i},this.mipmaps=r,this.flipY=!1,this.generateMipmaps=!1}},x4=class extends sx{constructor(r,e,i,n,s,a){super(r,e,i,s,a),this.isCompressedArrayTexture=!0,this.image.depth=n,this.wrapR=mn}},I4=class extends Hi{constructor(r,e,i,n,s,a,o,l,c){super(r,e,i,n,s,a,o,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}},Ma=class{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(r,e){let i=this.getUtoTmapping(r);return this.getPoint(i,e)}getPoints(r=5){let e=[];for(let i=0;i<=r;i++)e.push(this.getPoint(i/r));return e}getSpacedPoints(r=5){let e=[];for(let i=0;i<=r;i++)e.push(this.getPointAt(i/r));return e}getLength(){let r=this.getLengths();return r[r.length-1]}getLengths(r=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===r+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let e=[],i,n=this.getPoint(0),s=0;e.push(0);for(let a=1;a<=r;a++)i=this.getPoint(a/r),s+=i.distanceTo(n),e.push(s),n=i;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(r,e){let i=this.getLengths(),n=0,s=i.length,a;e?a=e:a=r*i[s-1];let o=0,l=s-1,c;for(;o<=l;)if(n=Math.floor(o+(l-o)/2),c=i[n]-a,c<0)o=n+1;else if(c>0)l=n-1;else{l=n;break}if(n=l,i[n]===a)return n/(s-1);let u=i[n],p=i[n+1]-u,d=(a-u)/p;return(n+d)/(s-1)}getTangent(r,e){let n=r-1e-4,s=r+1e-4;n<0&&(n=0),s>1&&(s=1);let a=this.getPoint(n),o=this.getPoint(s),l=e||(a.isVector2?new le:new A);return l.copy(o).sub(a).normalize(),l}getTangentAt(r,e){let i=this.getUtoTmapping(r);return this.getTangent(i,e)}computeFrenetFrames(r,e){let i=new A,n=[],s=[],a=[],o=new A,l=new Ue;for(let d=0;d<=r;d++){let f=d/r;n[d]=this.getTangentAt(f,new A)}s[0]=new A,a[0]=new A;let c=Number.MAX_VALUE,u=Math.abs(n[0].x),h=Math.abs(n[0].y),p=Math.abs(n[0].z);u<=c&&(c=u,i.set(1,0,0)),h<=c&&(c=h,i.set(0,1,0)),p<=c&&i.set(0,0,1),o.crossVectors(n[0],i).normalize(),s[0].crossVectors(n[0],o),a[0].crossVectors(n[0],s[0]);for(let d=1;d<=r;d++){if(s[d]=s[d-1].clone(),a[d]=a[d-1].clone(),o.crossVectors(n[d-1],n[d]),o.length()>Number.EPSILON){o.normalize();let f=Math.acos(Qn(n[d-1].dot(n[d]),-1,1));s[d].applyMatrix4(l.makeRotationAxis(o,f))}a[d].crossVectors(n[d],s[d])}if(e===!0){let d=Math.acos(Qn(s[0].dot(s[r]),-1,1));d/=r,n[0].dot(o.crossVectors(s[0],s[r]))>0&&(d=-d);for(let f=1;f<=r;f++)s[f].applyMatrix4(l.makeRotationAxis(n[f],d*f)),a[f].crossVectors(n[f],s[f])}return{tangents:n,normals:s,binormals:a}}clone(){return new this.constructor().copy(this)}copy(r){return this.arcLengthDivisions=r.arcLengthDivisions,this}toJSON(){let r={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return r.arcLengthDivisions=this.arcLengthDivisions,r.type=this.type,r}fromJSON(r){return this.arcLengthDivisions=r.arcLengthDivisions,this}},xp=class extends Ma{constructor(r=0,e=0,i=1,n=1,s=0,a=Math.PI*2,o=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=r,this.aY=e,this.xRadius=i,this.yRadius=n,this.aStartAngle=s,this.aEndAngle=a,this.aClockwise=o,this.aRotation=l}getPoint(r,e){let i=e||new le,n=Math.PI*2,s=this.aEndAngle-this.aStartAngle,a=Math.abs(s)n;)s-=n;s0?0:(Math.floor(Math.abs(o)/s)+1)*s:l===0&&o===s-1&&(o=s-2,l=1);let c,u;this.closed||o>0?c=n[(o-1)%s]:(KM.subVectors(n[0],n[1]).add(n[0]),c=KM);let h=n[o%s],p=n[(o+1)%s];if(this.closed||o+2n.length-2?n.length-1:a+1],h=n[a>n.length-3?n.length-1:a+2];return i.set($ce(o,l.x,c.x,u.x,h.x),$ce(o,l.y,c.y,u.y,h.y)),i}copy(r){super.copy(r),this.points=[];for(let e=0,i=r.points.length;e=i){let a=n[s]-i,o=this.curves[s],l=o.getLength(),c=l===0?0:1-a/l;return o.getPointAt(c,e)}s++}return null}getLength(){let r=this.getCurveLengths();return r[r.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let r=[],e=0;for(let i=0,n=this.curves.length;i1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(r){super.copy(r),this.curves=[];for(let e=0,i=r.curves.length;e0){let h=c.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(c);let u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(r){return super.copy(r),this.currentPoint.copy(r.currentPoint),this}toJSON(){let r=super.toJSON();return r.currentPoint=this.currentPoint.toArray(),r}fromJSON(r){return super.fromJSON(r),this.currentPoint.fromArray(r.currentPoint),this}},cf=class extends it{constructor(r=[new le(0,-.5),new le(.5,0),new le(0,.5)],e=12,i=0,n=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:r,segments:e,phiStart:i,phiLength:n},e=Math.floor(e),n=Qn(n,0,Math.PI*2);let s=[],a=[],o=[],l=[],c=[],u=1/e,h=new A,p=new le,d=new A,f=new A,m=new A,g=0,y=0;for(let E=0;E<=r.length-1;E++)switch(E){case 0:g=r[E+1].x-r[E].x,y=r[E+1].y-r[E].y,d.x=y*1,d.y=-g,d.z=y*0,m.copy(d),d.normalize(),l.push(d.x,d.y,d.z);break;case r.length-1:l.push(m.x,m.y,m.z);break;default:g=r[E+1].x-r[E].x,y=r[E+1].y-r[E].y,d.x=y*1,d.y=-g,d.z=y*0,f.copy(d),d.x+=m.x,d.y+=m.y,d.z+=m.z,d.normalize(),l.push(d.x,d.y,d.z),m.copy(f)}for(let E=0;E<=e;E++){let b=i+E*u*n,x=Math.sin(b),S=Math.cos(b);for(let D=0;D<=r.length-1;D++){h.x=r[D].x*x,h.y=r[D].y,h.z=r[D].x*S,a.push(h.x,h.y,h.z),p.x=E/e,p.y=D/(r.length-1),o.push(p.x,p.y);let P=l[3*D+0]*x,_=l[3*D+1],w=l[3*D+0]*S;c.push(P,_,w)}}for(let E=0;E0&&b(!0),e>0&&b(!1)),this.setIndex(u),this.setAttribute("position",new ct(h,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(d,2));function E(){let x=new A,S=new A,D=0,P=(e-r)/i;for(let _=0;_<=s;_++){let w=[],F=_/s,X=F*(e-r)+r;for(let H=0;H<=n;H++){let he=H/n,C=he*l+o,N=Math.sin(C),k=Math.cos(C);S.x=X*N,S.y=-F*i+g,S.z=X*k,h.push(S.x,S.y,S.z),x.set(N,P,k).normalize(),p.push(x.x,x.y,x.z),d.push(he,1-F),w.push(f++)}m.push(w)}for(let _=0;_.9&&P<.1&&(b<.2&&(a[E+0]+=1),x<.2&&(a[E+2]+=1),S<.2&&(a[E+4]+=1))}}function p(E){s.push(E.x,E.y,E.z)}function d(E,b){let x=E*3;b.x=r[x+0],b.y=r[x+1],b.z=r[x+2]}function f(){let E=new A,b=new A,x=new A,S=new A,D=new le,P=new le,_=new le;for(let w=0,F=0;w80*e){o=c=t[0],l=u=t[1];for(let f=e;fc&&(c=h),p>u&&(u=p);d=Math.max(c-o,u-l),d=d!==0?32767/d:0}return cx(s,a,e,o,l,d,0),a}};function The(t,r,e,i,n){let s,a;if(n===H0t(t,r,e,i)>0)for(s=r;s=r;s-=i)a=Zce(s,t[s],t[s+1],a);return a&&KD(a,a.next)&&(hx(a),a=a.next),a}function wg(t,r){if(!t)return t;r||(r=t);let e=t,i;do if(i=!1,!e.steiner&&(KD(e,e.next)||An(e.prev,e,e.next)===0)){if(hx(e),e=r=e.prev,e===e.next)break;i=!0}else e=e.next;while(i||e!==r);return r}function cx(t,r,e,i,n,s,a){if(!t)return;!a&&s&&A0t(t,i,n,s);let o=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,s?I0t(t,i,n,s):x0t(t)){r.push(l.i/e|0),r.push(t.i/e|0),r.push(c.i/e|0),hx(t),t=c.next,o=c.next;continue}if(t=c,t===o){a?a===1?(t=S0t(wg(t),r,e),cx(t,r,e,i,n,s,2)):a===2&&_0t(t,r,e,i,n,s):cx(wg(t),r,e,i,n,s,1);break}}}function x0t(t){let r=t.prev,e=t,i=t.next;if(An(r,e,i)>=0)return!1;let n=r.x,s=e.x,a=i.x,o=r.y,l=e.y,c=i.y,u=ns?n>a?n:a:s>a?s:a,d=o>l?o>c?o:c:l>c?l:c,f=i.next;for(;f!==r;){if(f.x>=u&&f.x<=p&&f.y>=h&&f.y<=d&&Sy(n,o,s,l,a,c,f.x,f.y)&&An(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function I0t(t,r,e,i){let n=t.prev,s=t,a=t.next;if(An(n,s,a)>=0)return!1;let o=n.x,l=s.x,c=a.x,u=n.y,h=s.y,p=a.y,d=ol?o>c?o:c:l>c?l:c,g=u>h?u>p?u:p:h>p?h:p,y=S4(d,f,r,e,i),E=S4(m,g,r,e,i),b=t.prevZ,x=t.nextZ;for(;b&&b.z>=y&&x&&x.z<=E;){if(b.x>=d&&b.x<=m&&b.y>=f&&b.y<=g&&b!==n&&b!==a&&Sy(o,u,l,h,c,p,b.x,b.y)&&An(b.prev,b,b.next)>=0||(b=b.prevZ,x.x>=d&&x.x<=m&&x.y>=f&&x.y<=g&&x!==n&&x!==a&&Sy(o,u,l,h,c,p,x.x,x.y)&&An(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;b&&b.z>=y;){if(b.x>=d&&b.x<=m&&b.y>=f&&b.y<=g&&b!==n&&b!==a&&Sy(o,u,l,h,c,p,b.x,b.y)&&An(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;x&&x.z<=E;){if(x.x>=d&&x.x<=m&&x.y>=f&&x.y<=g&&x!==n&&x!==a&&Sy(o,u,l,h,c,p,x.x,x.y)&&An(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function S0t(t,r,e){let i=t;do{let n=i.prev,s=i.next.next;!KD(n,s)&&Ehe(n,i,i.next,s)&&ux(n,s)&&ux(s,n)&&(r.push(n.i/e|0),r.push(i.i/e|0),r.push(s.i/e|0),hx(i),hx(i.next),i=t=s),i=i.next}while(i!==t);return wg(i)}function _0t(t,r,e,i,n,s){let a=t;do{let o=a.next.next;for(;o!==a.prev;){if(a.i!==o.i&&N0t(a,o)){let l=bhe(a,o);a=wg(a,a.next),l=wg(l,l.next),cx(a,r,e,i,n,s,0),cx(l,r,e,i,n,s,0);return}o=o.next}a=a.next}while(a!==t)}function w0t(t,r,e,i){let n=[],s,a,o,l,c;for(s=0,a=r.length;s=e.next.y&&e.next.y!==e.y){let p=e.x+(a-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(p<=s&&p>i&&(i=p,n=e.x=e.x&&e.x>=l&&s!==e.x&&Sy(an.x||e.x===n.x&&C0t(n,e)))&&(n=e,u=h)),e=e.next;while(e!==o);return n}function C0t(t,r){return An(t.prev,t,r.prev)<0&&An(r.next,t,t.next)<0}function A0t(t,r,e,i){let n=t;do n.z===0&&(n.z=S4(n.x,n.y,r,e,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,O0t(n)}function O0t(t){let r,e,i,n,s,a,o,l,c=1;do{for(e=t,t=null,s=null,a=0;e;){for(a++,i=e,o=0,r=0;r0||l>0&&i;)o!==0&&(l===0||!i||e.z<=i.z)?(n=e,e=e.nextZ,o--):(n=i,i=i.nextZ,l--),s?s.nextZ=n:t=n,n.prevZ=s,s=n;e=i}s.nextZ=null,c*=2}while(a>1);return t}function S4(t,r,e,i,n){return t=(t-e)*n|0,r=(r-i)*n|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,t|r<<1}function P0t(t){let r=t,e=t;do(r.x=(t-a)*(s-o)&&(t-a)*(i-o)>=(e-a)*(r-o)&&(e-a)*(s-o)>=(n-a)*(i-o)}function N0t(t,r){return t.next.i!==r.i&&t.prev.i!==r.i&&!L0t(t,r)&&(ux(t,r)&&ux(r,t)&&F0t(t,r)&&(An(t.prev,t,r.prev)||An(t,r.prev,r))||KD(t,r)&&An(t.prev,t,t.next)>0&&An(r.prev,r,r.next)>0)}function An(t,r,e){return(r.y-t.y)*(e.x-r.x)-(r.x-t.x)*(e.y-r.y)}function KD(t,r){return t.x===r.x&&t.y===r.y}function Ehe(t,r,e,i){let n=rD(An(t,r,e)),s=rD(An(t,r,i)),a=rD(An(e,i,t)),o=rD(An(e,i,r));return!!(n!==s&&a!==o||n===0&&tD(t,e,r)||s===0&&tD(t,i,r)||a===0&&tD(e,t,i)||o===0&&tD(e,r,i))}function tD(t,r,e){return r.x<=Math.max(t.x,e.x)&&r.x>=Math.min(t.x,e.x)&&r.y<=Math.max(t.y,e.y)&&r.y>=Math.min(t.y,e.y)}function rD(t){return t>0?1:t<0?-1:0}function L0t(t,r){let e=t;do{if(e.i!==t.i&&e.next.i!==t.i&&e.i!==r.i&&e.next.i!==r.i&&Ehe(e,e.next,t,r))return!0;e=e.next}while(e!==t);return!1}function ux(t,r){return An(t.prev,t,t.next)<0?An(t,r,t.next)>=0&&An(t,t.prev,r)>=0:An(t,r,t.prev)<0||An(t,t.next,r)<0}function F0t(t,r){let e=t,i=!1,n=(t.x+r.x)/2,s=(t.y+r.y)/2;do e.y>s!=e.next.y>s&&e.next.y!==e.y&&n<(e.next.x-e.x)*(s-e.y)/(e.next.y-e.y)+e.x&&(i=!i),e=e.next;while(e!==t);return i}function bhe(t,r){let e=new _4(t.i,t.x,t.y),i=new _4(r.i,r.x,r.y),n=t.next,s=r.prev;return t.next=r,r.prev=t,e.next=n,n.prev=e,i.next=e,e.prev=i,s.next=i,i.prev=s,i}function Zce(t,r,e,i){let n=new _4(t,r,e);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function hx(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function _4(t,r,e){this.i=t,this.x=r,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function H0t(t,r,e,i){let n=0;for(let s=r,a=e-i;s2&&t[r-1].equals(t[0])&&t.pop()}function Jce(t,r){for(let e=0;eNumber.EPSILON){let xe=Math.sqrt(z),Ce=Math.sqrt(re*re+me*me),Ge=ke.x-$/xe,Ze=ke.y+J/xe,gt=nt.x-me/Ce,ye=nt.y+re/Ce,Re=((gt-Ge)*me-(ye-Ze)*re)/(J*me-$*re);bt=Ge+J*Re-Be.x,mt=Ze+$*Re-Be.y;let ut=bt*bt+mt*mt;if(ut<=2)return new le(bt,mt);_e=Math.sqrt(ut/2)}else{let xe=!1;J>Number.EPSILON?re>Number.EPSILON&&(xe=!0):J<-Number.EPSILON?re<-Number.EPSILON&&(xe=!0):Math.sign($)===Math.sign(me)&&(xe=!0),xe?(bt=-$,mt=J,_e=Math.sqrt(z)):(bt=J,mt=$,_e=Math.sqrt(z/2))}return new le(bt/_e,mt/_e)}let j=[];for(let Be=0,ke=C.length,nt=ke-1,bt=Be+1;Be=0;Be--){let ke=Be/g,nt=d*Math.cos(ke*Math.PI/2),bt=f*Math.sin(ke*Math.PI/2)+m;for(let mt=0,_e=C.length;mt<_e;mt++){let J=N(C[mt],j[mt],bt);we(J.x,J.y,h+nt)}for(let mt=0,_e=X.length;mt<_e;mt++){let J=X[mt];ae=ee[mt];for(let $=0,re=J.length;$=0;){let bt=nt,mt=nt-1;mt<0&&(mt=Be.length-1);for(let _e=0,J=u+g*2;_e0)&&d.push(b,x,D),(y!==i-1||l0!=r>0&&this.version++,this._sheen=r}get clearcoat(){return this._clearcoat}set clearcoat(r){this._clearcoat>0!=r>0&&this.version++,this._clearcoat=r}get iridescence(){return this._iridescence}set iridescence(r){this._iridescence>0!=r>0&&this.version++,this._iridescence=r}get transmission(){return this._transmission}set transmission(r){this._transmission>0!=r>0&&this.version++,this._transmission=r}copy(r){return super.copy(r),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=r.clearcoat,this.clearcoatMap=r.clearcoatMap,this.clearcoatRoughness=r.clearcoatRoughness,this.clearcoatRoughnessMap=r.clearcoatRoughnessMap,this.clearcoatNormalMap=r.clearcoatNormalMap,this.clearcoatNormalScale.copy(r.clearcoatNormalScale),this.ior=r.ior,this.iridescence=r.iridescence,this.iridescenceMap=r.iridescenceMap,this.iridescenceIOR=r.iridescenceIOR,this.iridescenceThicknessRange=[...r.iridescenceThicknessRange],this.iridescenceThicknessMap=r.iridescenceThicknessMap,this.sheen=r.sheen,this.sheenColor.copy(r.sheenColor),this.sheenColorMap=r.sheenColorMap,this.sheenRoughness=r.sheenRoughness,this.sheenRoughnessMap=r.sheenRoughnessMap,this.transmission=r.transmission,this.transmissionMap=r.transmissionMap,this.thickness=r.thickness,this.thicknessMap=r.thicknessMap,this.attenuationDistance=r.attenuationDistance,this.attenuationColor.copy(r.attenuationColor),this.specularIntensity=r.specularIntensity,this.specularIntensityMap=r.specularIntensityMap,this.specularColor.copy(r.specularColor),this.specularColorMap=r.specularColorMap,this}},Ts=class extends Gr{constructor(r){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Ve(16777215),this.specular=new Ve(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ve(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mf,this.normalScale=new le(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Sx,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.specular.copy(r.specular),this.shininess=r.shininess,this.map=r.map,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.emissive.copy(r.emissive),this.emissiveMap=r.emissiveMap,this.emissiveIntensity=r.emissiveIntensity,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.specularMap=r.specularMap,this.alphaMap=r.alphaMap,this.envMap=r.envMap,this.combine=r.combine,this.reflectivity=r.reflectivity,this.refractionRatio=r.refractionRatio,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.flatShading=r.flatShading,this.fog=r.fog,this}},ND=class extends Gr{constructor(r){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ve(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ve(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mf,this.normalScale=new le(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.gradientMap=r.gradientMap,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.emissive.copy(r.emissive),this.emissiveMap=r.emissiveMap,this.emissiveIntensity=r.emissiveIntensity,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.alphaMap=r.alphaMap,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.fog=r.fog,this}},hf=class extends Gr{constructor(r){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mf,this.normalScale=new le(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(r)}copy(r){return super.copy(r),this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.flatShading=r.flatShading,this}},io=class extends Gr{constructor(r){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Ve(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ve(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mf,this.normalScale=new le(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Sx,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.emissive.copy(r.emissive),this.emissiveMap=r.emissiveMap,this.emissiveIntensity=r.emissiveIntensity,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.specularMap=r.specularMap,this.alphaMap=r.alphaMap,this.envMap=r.envMap,this.combine=r.combine,this.reflectivity=r.reflectivity,this.refractionRatio=r.refractionRatio,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.flatShading=r.flatShading,this.fog=r.fog,this}},LD=class extends Gr{constructor(r){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ve(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=mf,this.normalScale=new le(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.defines={MATCAP:""},this.color.copy(r.color),this.matcap=r.matcap,this.map=r.map,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.alphaMap=r.alphaMap,this.flatShading=r.flatShading,this.fog=r.fog,this}},Rp=class extends Tr{constructor(r){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(r)}copy(r){return super.copy(r),this.scale=r.scale,this.dashSize=r.dashSize,this.gapSize=r.gapSize,this}};function Sl(t,r,e){return AU(t)?new t.constructor(t.subarray(r,e!==void 0?e:t.length)):t.slice(r,e)}function hg(t,r,e){return!t||!e&&t.constructor===r?t:typeof r.BYTES_PER_ELEMENT=="number"?new r(t):Array.prototype.slice.call(t)}function AU(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function xhe(t){function r(n,s){return t[n]-t[s]}let e=t.length,i=new Array(e);for(let n=0;n!==e;++n)i[n]=n;return i.sort(r),i}function w4(t,r,e){let i=t.length,n=new t.constructor(i);for(let s=0,a=0;a!==i;++s){let o=e[s]*r;for(let l=0;l!==r;++l)n[a++]=t[o+l]}return n}function OU(t,r,e,i){let n=1,s=t[0];for(;s!==void 0&&s[i]===void 0;)s=t[n++];if(s===void 0)return;let a=s[i];if(a!==void 0)if(Array.isArray(a))do a=s[i],a!==void 0&&(r.push(s.time),e.push.apply(e,a)),s=t[n++];while(s!==void 0);else if(a.toArray!==void 0)do a=s[i],a!==void 0&&(r.push(s.time),a.toArray(e,e.length)),s=t[n++];while(s!==void 0);else do a=s[i],a!==void 0&&(r.push(s.time),e.push(a)),s=t[n++];while(s!==void 0)}function G0t(t,r,e,i,n=30){let s=t.clone();s.name=r;let a=[];for(let l=0;l=i)){h.push(c.times[d]);for(let m=0;ms.tracks[l].times[0]&&(o=s.tracks[l].times[0]);for(let l=0;l=o.times[f]){let y=f*h+u,E=y+h-u;m=Sl(o.values,y,E)}else{let y=o.createInterpolant(),E=u,b=h-u;y.evaluate(s),m=Sl(y.resultBuffer,E,b)}l==="quaternion"&&new Or().fromArray(m).normalize().conjugate().toArray(m);let g=c.times.length;for(let y=0;y=s)){let o=e[1];r=s)break t}a=i,i=0;break r}break e}for(;i>>1;re;)--a;if(++a,s!==0||a!==n){s>=a&&(a=Math.max(a,1),s=a-1);let o=this.getValueSize();this.times=Sl(i,s,a),this.values=Sl(this.values,s*o,a*o)}return this}validate(){let r=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),r=!1);let i=this.times,n=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),r=!1);let a=null;for(let o=0;o!==s;o++){let l=i[o];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,l),r=!1;break}if(a!==null&&a>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,l,a),r=!1;break}a=l}if(n!==void 0&&AU(n))for(let o=0,l=n.length;o!==l;++o){let c=n[o];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,c),r=!1;break}}return r}optimize(){let r=Sl(this.times),e=Sl(this.values),i=this.getValueSize(),n=this.getInterpolation()===mD,s=r.length-1,a=1;for(let o=1;o0){r[a]=r[s];for(let o=s*i,l=a*i,c=0;c!==i;++c)e[l+c]=e[o+c];++a}return a!==r.length?(this.times=Sl(r,0,a),this.values=Sl(e,0,a*i)):(this.times=r,this.values=e),this}clone(){let r=Sl(this.times,0),e=Sl(this.values,0),i=this.constructor,n=new i(this.name,r,e);return n.createInterpolant=this.createInterpolant,n}};zo.prototype.TimeBufferType=Float32Array;zo.prototype.ValueBufferType=Float32Array;zo.prototype.DefaultInterpolation=Hu;var Dp=class extends zo{};Dp.prototype.ValueTypeName="bool";Dp.prototype.ValueBufferType=Array;Dp.prototype.DefaultInterpolation=vp;Dp.prototype.InterpolantFactoryMethodLinear=void 0;Dp.prototype.InterpolantFactoryMethodSmooth=void 0;var dx=class extends zo{};dx.prototype.ValueTypeName="color";var Cc=class extends zo{};Cc.prototype.ValueTypeName="number";var UD=class extends Mp{constructor(r,e,i,n){super(r,e,i,n)}interpolate_(r,e,i,n){let s=this.resultBuffer,a=this.sampleValues,o=this.valueSize,l=(i-e)/(n-e),c=r*o;for(let u=c+o;c!==u;c+=4)Or.slerpFlat(s,0,a,c-o,a,c,l);return s}},Da=class extends zo{InterpolantFactoryMethodLinear(r){return new UD(this.times,this.values,this.getValueSize(),r)}};Da.prototype.ValueTypeName="quaternion";Da.prototype.DefaultInterpolation=Hu;Da.prototype.InterpolantFactoryMethodSmooth=void 0;var Cp=class extends zo{};Cp.prototype.ValueTypeName="string";Cp.prototype.ValueBufferType=Array;Cp.prototype.DefaultInterpolation=vp;Cp.prototype.InterpolantFactoryMethodLinear=void 0;Cp.prototype.InterpolantFactoryMethodSmooth=void 0;var no=class extends zo{};no.prototype.ValueTypeName="vector";var so=class{constructor(r,e=-1,i,n=$D){this.name=r,this.tracks=i,this.duration=e,this.blendMode=n,this.uuid=ko(),this.duration<0&&this.resetDuration()}static parse(r){let e=[],i=r.tracks,n=1/(r.fps||1);for(let a=0,o=i.length;a!==o;++a)e.push(W0t(i[a]).scale(n));let s=new this(r.name,r.duration,e,r.blendMode);return s.uuid=r.uuid,s}static toJSON(r){let e=[],i=r.tracks,n={name:r.name,duration:r.duration,tracks:e,uuid:r.uuid,blendMode:r.blendMode};for(let s=0,a=i.length;s!==a;++s)e.push(zo.toJSON(i[s]));return n}static CreateFromMorphTargetSequence(r,e,i,n){let s=e.length,a=[];for(let o=0;o1){let h=u[1],p=n[h];p||(n[h]=p=[]),p.push(c)}}let a=[];for(let o in n)a.push(this.CreateFromMorphTargetSequence(o,n[o],e,i));return a}static parseAnimation(r,e){if(!r)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let i=function(h,p,d,f,m){if(d.length!==0){let g=[],y=[];OU(d,g,y,f),g.length!==0&&m.push(new h(p,g,y))}},n=[],s=r.name||"default",a=r.fps||30,o=r.blendMode,l=r.length||-1,c=r.hierarchy||[];for(let h=0;h{e&&e(s),this.manager.itemEnd(r)},0),s;if(cp[r]!==void 0){cp[r].push({onLoad:e,onProgress:i,onError:n});return}cp[r]=[],cp[r].push({onLoad:e,onProgress:i,onError:n});let a=new Request(r,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,l=this.responseType;fetch(a).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream=="undefined"||c.body===void 0||c.body.getReader===void 0)return c;let u=cp[r],h=c.body.getReader(),p=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),d=p?parseInt(p):0,f=d!==0,m=0,g=new ReadableStream({start(y){E();function E(){h.read().then(({done:b,value:x})=>{if(b)y.close();else{m+=x.byteLength;let S=new ProgressEvent("progress",{lengthComputable:f,loaded:m,total:d});for(let D=0,P=u.length;D{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,o));case"json":return c.json();default:if(o===void 0)return c.text();{let h=/charset="?([^;"\s]*)"?/i.exec(o),p=h&&h[1]?h[1].toLowerCase():void 0,d=new TextDecoder(p);return c.arrayBuffer().then(f=>d.decode(f))}}}).then(c=>{Og.add(r,c);let u=cp[r];delete cp[r];for(let h=0,p=u.length;h{let u=cp[r];if(u===void 0)throw this.manager.itemError(r),c;delete cp[r];for(let h=0,p=u.length;h{this.manager.itemEnd(r)}),this.manager.itemStart(r)}setResponseType(r){return this.responseType=r,this}setMimeType(r){return this.mimeType=r,this}},M4=class extends li{constructor(r){super(r)}load(r,e,i,n){let s=this,a=new ci(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(r,function(o){try{e(s.parse(JSON.parse(o)))}catch(l){n?n(l):console.error(l),s.manager.itemError(r)}},i,n)}parse(r){let e=[];for(let i=0;i0:n.vertexColors=r.vertexColors),r.uniforms!==void 0)for(let s in r.uniforms){let a=r.uniforms[s];switch(n.uniforms[s]={},a.type){case"t":n.uniforms[s].value=i(a.value);break;case"c":n.uniforms[s].value=new Ve().setHex(a.value);break;case"v2":n.uniforms[s].value=new le().fromArray(a.value);break;case"v3":n.uniforms[s].value=new A().fromArray(a.value);break;case"v4":n.uniforms[s].value=new Jr().fromArray(a.value);break;case"m3":n.uniforms[s].value=new Qi().fromArray(a.value);break;case"m4":n.uniforms[s].value=new Ue().fromArray(a.value);break;default:n.uniforms[s].value=a.value}}if(r.defines!==void 0&&(n.defines=r.defines),r.vertexShader!==void 0&&(n.vertexShader=r.vertexShader),r.fragmentShader!==void 0&&(n.fragmentShader=r.fragmentShader),r.glslVersion!==void 0&&(n.glslVersion=r.glslVersion),r.extensions!==void 0)for(let s in r.extensions)n.extensions[s]=r.extensions[s];if(r.size!==void 0&&(n.size=r.size),r.sizeAttenuation!==void 0&&(n.sizeAttenuation=r.sizeAttenuation),r.map!==void 0&&(n.map=i(r.map)),r.matcap!==void 0&&(n.matcap=i(r.matcap)),r.alphaMap!==void 0&&(n.alphaMap=i(r.alphaMap)),r.bumpMap!==void 0&&(n.bumpMap=i(r.bumpMap)),r.bumpScale!==void 0&&(n.bumpScale=r.bumpScale),r.normalMap!==void 0&&(n.normalMap=i(r.normalMap)),r.normalMapType!==void 0&&(n.normalMapType=r.normalMapType),r.normalScale!==void 0){let s=r.normalScale;Array.isArray(s)===!1&&(s=[s,s]),n.normalScale=new le().fromArray(s)}return r.displacementMap!==void 0&&(n.displacementMap=i(r.displacementMap)),r.displacementScale!==void 0&&(n.displacementScale=r.displacementScale),r.displacementBias!==void 0&&(n.displacementBias=r.displacementBias),r.roughnessMap!==void 0&&(n.roughnessMap=i(r.roughnessMap)),r.metalnessMap!==void 0&&(n.metalnessMap=i(r.metalnessMap)),r.emissiveMap!==void 0&&(n.emissiveMap=i(r.emissiveMap)),r.emissiveIntensity!==void 0&&(n.emissiveIntensity=r.emissiveIntensity),r.specularMap!==void 0&&(n.specularMap=i(r.specularMap)),r.specularIntensityMap!==void 0&&(n.specularIntensityMap=i(r.specularIntensityMap)),r.specularColorMap!==void 0&&(n.specularColorMap=i(r.specularColorMap)),r.envMap!==void 0&&(n.envMap=i(r.envMap)),r.envMapIntensity!==void 0&&(n.envMapIntensity=r.envMapIntensity),r.reflectivity!==void 0&&(n.reflectivity=r.reflectivity),r.refractionRatio!==void 0&&(n.refractionRatio=r.refractionRatio),r.lightMap!==void 0&&(n.lightMap=i(r.lightMap)),r.lightMapIntensity!==void 0&&(n.lightMapIntensity=r.lightMapIntensity),r.aoMap!==void 0&&(n.aoMap=i(r.aoMap)),r.aoMapIntensity!==void 0&&(n.aoMapIntensity=r.aoMapIntensity),r.gradientMap!==void 0&&(n.gradientMap=i(r.gradientMap)),r.clearcoatMap!==void 0&&(n.clearcoatMap=i(r.clearcoatMap)),r.clearcoatRoughnessMap!==void 0&&(n.clearcoatRoughnessMap=i(r.clearcoatRoughnessMap)),r.clearcoatNormalMap!==void 0&&(n.clearcoatNormalMap=i(r.clearcoatNormalMap)),r.clearcoatNormalScale!==void 0&&(n.clearcoatNormalScale=new le().fromArray(r.clearcoatNormalScale)),r.iridescenceMap!==void 0&&(n.iridescenceMap=i(r.iridescenceMap)),r.iridescenceThicknessMap!==void 0&&(n.iridescenceThicknessMap=i(r.iridescenceThicknessMap)),r.transmissionMap!==void 0&&(n.transmissionMap=i(r.transmissionMap)),r.thicknessMap!==void 0&&(n.thicknessMap=i(r.thicknessMap)),r.sheenColorMap!==void 0&&(n.sheenColorMap=i(r.sheenColorMap)),r.sheenRoughnessMap!==void 0&&(n.sheenRoughnessMap=i(r.sheenRoughnessMap)),n}setTextures(r){return this.textures=r,this}static createMaterialFromType(r){let e={ShadowMaterial:OD,SpriteMaterial:Tg,RawShaderMaterial:PD,ShaderMaterial:Yt,PointsMaterial:Vn,MeshPhysicalMaterial:Cl,MeshStandardMaterial:Gu,MeshPhongMaterial:Ts,MeshToonMaterial:ND,MeshNormalMaterial:hf,MeshLambertMaterial:io,MeshDepthMaterial:Tp,MeshDistanceMaterial:nx,MeshBasicMaterial:or,MeshMatcapMaterial:LD,LineDashedMaterial:Rp,LineBasicMaterial:Tr,Material:Gr};return new e[r]}},ks=class{static decodeText(r){if(typeof TextDecoder!="undefined")return new TextDecoder().decode(r);let e="";for(let i=0,n=r.length;i0){let l=new Ap(e);s=new Pg(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,u=r.length;c0){n=new Pg(this.manager),n.setCrossOrigin(this.crossOrigin);for(let a=0,o=r.length;a0){this.source.connect(this.filters[0]);for(let r=1,e=this.filters.length;r0){this.source.disconnect(this.filters[0]);for(let r=1,e=this.filters.length;r0&&this._mixBufferRegionAdditive(i,n,this._addIndex*e,1,e);for(let l=e,c=e+e;l!==c;++l)if(i[l]!==i[l+e]){o.setValue(i,n);break}}saveOriginalState(){let r=this.binding,e=this.buffer,i=this.valueSize,n=i*this._origIndex;r.getValue(e,n);for(let s=i,a=n;s!==a;++s)e[s]=e[n+s%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let r=this.valueSize*3;this.binding.setValue(this.buffer,r)}_setAdditiveIdentityNumeric(){let r=this._addIndex*this.valueSize,e=r+this.valueSize;for(let i=r;i=.5)for(let a=0;a!==s;++a)r[e+a]=r[i+a]}_slerp(r,e,i,n){Or.slerpFlat(r,e,r,e,r,i,n)}_slerpAdditive(r,e,i,n,s){let a=this._workIndex*s;Or.multiplyQuaternionsFlat(r,a,r,e,r,i),Or.slerpFlat(r,e,r,e,r,a,n)}_lerp(r,e,i,n,s){let a=1-n;for(let o=0;o!==s;++o){let l=e+o;r[l]=r[l]*a+r[i+o]*n}}_lerpAdditive(r,e,i,n,s){for(let a=0;a!==s;++a){let o=e+a;r[o]=r[o]+r[i+a]*n}}},PU="\\[\\]\\.:\\/",$0t=new RegExp("["+PU+"]","g"),NU="[^"+PU+"]",Z0t="[^"+PU.replace("\\.","")+"]",K0t=/((?:WC+[\/:])*)/.source.replace("WC",NU),J0t=/(WCOD+)?/.source.replace("WCOD",Z0t),Q0t=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",NU),evt=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",NU),tvt=new RegExp("^"+K0t+J0t+Q0t+evt+"$"),rvt=["material","materials","bones","map"],G4=class{constructor(r,e,i){let n=i||Cr.parseTrackName(e);this._targetGroup=r,this._bindings=r.subscribe_(e,n)}getValue(r,e){this.bind();let i=this._targetGroup.nCachedObjects_,n=this._bindings[i];n!==void 0&&n.getValue(r,e)}setValue(r,e){let i=this._bindings;for(let n=this._targetGroup.nCachedObjects_,s=i.length;n!==s;++n)i[n].setValue(r,e)}bind(){let r=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=r.length;e!==i;++e)r[e].bind()}unbind(){let r=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=r.length;e!==i;++e)r[e].unbind()}},Cr=class{constructor(r,e,i){this.path=e,this.parsedPath=i||Cr.parseTrackName(e),this.node=Cr.findNode(r,this.parsedPath.nodeName)||r,this.rootNode=r,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(r,e,i){return r&&r.isAnimationObjectGroup?new Cr.Composite(r,e,i):new Cr(r,e,i)}static sanitizeNodeName(r){return r.replace(/\s/g,"_").replace($0t,"")}static parseTrackName(r){let e=tvt.exec(r);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+r);let i={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},n=i.nodeName&&i.nodeName.lastIndexOf(".");if(n!==void 0&&n!==-1){let s=i.nodeName.substring(n+1);rvt.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,n),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+r);return i}static findNode(r,e){if(e===void 0||e===""||e==="."||e===-1||e===r.name||e===r.uuid)return r;if(r.skeleton){let i=r.skeleton.getBoneByName(e);if(i!==void 0)return i}if(r.children){let i=function(s){for(let a=0;a=s){let h=s++,p=r[h];e[p.uuid]=u,r[u]=p,e[c]=h,r[h]=l;for(let d=0,f=n;d!==f;++d){let m=i[d],g=m[h],y=m[u];m[u]=g,m[h]=y}}}this.nCachedObjects_=s}uncache(){let r=this._objects,e=this._indicesByUUID,i=this._bindings,n=i.length,s=this.nCachedObjects_,a=r.length;for(let o=0,l=arguments.length;o!==l;++o){let c=arguments[o],u=c.uuid,h=e[u];if(h!==void 0)if(delete e[u],h0&&(e[d.uuid]=h),r[h]=d,r.pop();for(let f=0,m=n;f!==m;++f){let g=i[f];g[h]=g[p],g.pop()}}}this.nCachedObjects_=s}subscribe_(r,e){let i=this._bindingsIndicesByPath,n=i[r],s=this._bindings;if(n!==void 0)return s[n];let a=this._paths,o=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,h=new Array(c);n=s.length,i[r]=n,a.push(r),o.push(e),s.push(h);for(let p=u,d=l.length;p!==d;++p){let f=l[p];h[p]=new Cr(f,r,e)}return h}unsubscribe_(r){let e=this._bindingsIndicesByPath,i=e[r];if(i!==void 0){let n=this._paths,s=this._parsedPaths,a=this._bindings,o=a.length-1,l=a[o],c=r[o];e[c]=i,a[i]=l,a.pop(),s[i]=s[o],s.pop(),n[i]=n[o],n.pop()}}},z4=class{constructor(r,e,i=null,n=e.blendMode){this._mixer=r,this._clip=e,this._localRoot=i,this.blendMode=n;let s=e.tracks,a=s.length,o=new Array(a),l={endingStart:cg,endingEnd:cg};for(let c=0;c!==a;++c){let u=s[c].createInterpolant(null);o[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=o,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=ihe,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(r){return this._startTime=r,this}setLoop(r,e){return this.loop=r,this.repetitions=e,this}setEffectiveWeight(r){return this.weight=r,this._effectiveWeight=this.enabled?r:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(r){return this._scheduleFading(r,0,1)}fadeOut(r){return this._scheduleFading(r,1,0)}crossFadeFrom(r,e,i){if(r.fadeOut(e),this.fadeIn(e),i){let n=this._clip.duration,s=r._clip.duration,a=s/n,o=n/s;r.warp(1,a,e),this.warp(o,1,e)}return this}crossFadeTo(r,e,i){return r.crossFadeFrom(this,e,i)}stopFading(){let r=this._weightInterpolant;return r!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(r)),this}setEffectiveTimeScale(r){return this.timeScale=r,this._effectiveTimeScale=this.paused?0:r,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(r){return this.timeScale=this._clip.duration/r,this.stopWarping()}syncWith(r){return this.time=r.time,this.timeScale=r.timeScale,this.stopWarping()}halt(r){return this.warp(this._effectiveTimeScale,0,r)}warp(r,e,i){let n=this._mixer,s=n.time,a=this.timeScale,o=this._timeScaleInterpolant;o===null&&(o=n._lendControlInterpolant(),this._timeScaleInterpolant=o);let l=o.parameterPositions,c=o.sampleValues;return l[0]=s,l[1]=s+i,c[0]=r/a,c[1]=e/a,this}stopWarping(){let r=this._timeScaleInterpolant;return r!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(r)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(r,e,i,n){if(!this.enabled){this._updateWeight(r);return}let s=this._startTime;if(s!==null){let l=(r-s)*i;l<0||i===0?e=0:(this._startTime=null,e=i*l)}e*=this._updateTimeScale(r);let a=this._updateTime(e),o=this._updateWeight(r);if(o>0){let l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case _U:for(let u=0,h=l.length;u!==h;++u)l[u].evaluate(a),c[u].accumulateAdditive(o);break;case $D:default:for(let u=0,h=l.length;u!==h;++u)l[u].evaluate(a),c[u].accumulate(n,o)}}}_updateWeight(r){let e=0;if(this.enabled){e=this.weight;let i=this._weightInterpolant;if(i!==null){let n=i.evaluate(r)[0];e*=n,r>i.parameterPositions[1]&&(this.stopFading(),n===0&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(r){let e=0;if(!this.paused){e=this.timeScale;let i=this._timeScaleInterpolant;if(i!==null){let n=i.evaluate(r)[0];e*=n,r>i.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e}_updateTime(r){let e=this._clip.duration,i=this.loop,n=this.time+r,s=this._loopCount,a=i===nhe;if(r===0)return s===-1?n:a&&(s&1)===1?e-n:n;if(i===rhe){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(n>=e)n=e;else if(n<0)n=0;else{this.time=n;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:r<0?-1:1})}}else{if(s===-1&&(r>=0?(s=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),n>=e||n<0){let o=Math.floor(n/e);n-=e*o,s+=Math.abs(o);let l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=r>0?e:0,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:r>0?1:-1});else{if(l===1){let c=r<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=s,this.time=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this.time=n;if(a&&(s&1)===1)return e-n}return n}_setEndings(r,e,i){let n=this._interpolantSettings;i?(n.endingStart=ug,n.endingEnd=ug):(r?n.endingStart=this.zeroSlopeAtStart?ug:cg:n.endingStart=Kb,e?n.endingEnd=this.zeroSlopeAtEnd?ug:cg:n.endingEnd=Kb)}_scheduleFading(r,e,i){let n=this._mixer,s=n.time,a=this._weightInterpolant;a===null&&(a=n._lendControlInterpolant(),this._weightInterpolant=a);let o=a.parameterPositions,l=a.sampleValues;return o[0]=s,l[0]=e,o[1]=s+r,l[1]=i,this}},ivt=new Float32Array(1),j4=class extends Ra{constructor(r){super(),this._root=r,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(r,e){let i=r._localRoot||this._root,n=r._clip.tracks,s=n.length,a=r._propertyBindings,o=r._interpolants,l=i.uuid,c=this._bindingsByRootAndName,u=c[l];u===void 0&&(u={},c[l]=u);for(let h=0;h!==s;++h){let p=n[h],d=p.name,f=u[d];if(f!==void 0)++f.referenceCount,a[h]=f;else{if(f=a[h],f!==void 0){f._cacheIndex===null&&(++f.referenceCount,this._addInactiveBinding(f,l,d));continue}let m=e&&e._propertyBindings[h].binding.parsedPath;f=new jD(Cr.create(i,d,m),p.ValueTypeName,p.getValueSize()),++f.referenceCount,this._addInactiveBinding(f,l,d),a[h]=f}o[h].resultBuffer=f.buffer}}_activateAction(r){if(!this._isActiveAction(r)){if(r._cacheIndex===null){let i=(r._localRoot||this._root).uuid,n=r._clip.uuid,s=this._actionsByClip[n];this._bindAction(r,s&&s.knownActions[0]),this._addInactiveAction(r,n,i)}let e=r._propertyBindings;for(let i=0,n=e.length;i!==n;++i){let s=e[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(r)}}_deactivateAction(r){if(this._isActiveAction(r)){let e=r._propertyBindings;for(let i=0,n=e.length;i!==n;++i){let s=e[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(r)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let r=this;this.stats={actions:{get total(){return r._actions.length},get inUse(){return r._nActiveActions}},bindings:{get total(){return r._bindings.length},get inUse(){return r._nActiveBindings}},controlInterpolants:{get total(){return r._controlInterpolants.length},get inUse(){return r._nActiveControlInterpolants}}}}_isActiveAction(r){let e=r._cacheIndex;return e!==null&&e=0;--i)r[i].stop();return this}update(r){r*=this.timeScale;let e=this._actions,i=this._nActiveActions,n=this.time+=r,s=Math.sign(r),a=this._accuIndex^=1;for(let c=0;c!==i;++c)e[c]._update(n,r,s,a);let o=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)o[c].apply(a);return this}setTime(r){this.time=0;for(let e=0;ethis.max.x||r.ythis.max.y)}containsBox(r){return this.min.x<=r.min.x&&r.max.x<=this.max.x&&this.min.y<=r.min.y&&r.max.y<=this.max.y}getParameter(r,e){return e.set((r.x-this.min.x)/(this.max.x-this.min.x),(r.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(r){return!(r.max.xthis.max.x||r.max.ythis.max.y)}clampPoint(r,e){return e.copy(r).clamp(this.min,this.max)}distanceToPoint(r){return pue.copy(r).clamp(this.min,this.max).sub(r).length()}intersect(r){return this.min.max(r.min),this.max.min(r.max),this}union(r){return this.min.min(r.min),this.max.max(r.max),this}translate(r){return this.min.add(r),this.max.add(r),this}equals(r){return r.min.equals(this.min)&&r.max.equals(this.max)}},due=new A,nD=new A,Ca=class{constructor(r=new A,e=new A){this.start=r,this.end=e}set(r,e){return this.start.copy(r),this.end.copy(e),this}copy(r){return this.start.copy(r.start),this.end.copy(r.end),this}getCenter(r){return r.addVectors(this.start,this.end).multiplyScalar(.5)}delta(r){return r.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(r,e){return this.delta(e).multiplyScalar(r).add(this.start)}closestPointToPointParameter(r,e){due.subVectors(r,this.start),nD.subVectors(this.end,this.start);let i=nD.dot(nD),s=nD.dot(due)/i;return e&&(s=Qn(s,0,1)),s}closestPointToPoint(r,e,i){let n=this.closestPointToPointParameter(r,e);return this.delta(i).multiplyScalar(n).add(this.start)}applyMatrix4(r){return this.start.applyMatrix4(r),this.end.applyMatrix4(r),this}equals(r){return r.start.equals(this.start)&&r.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},fue=new A,Z4=class extends pr{constructor(r,e){super(),this.light=r,this.matrix=r.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,this.type="SpotLightHelper";let i=new it,n=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let a=0,o=1,l=32;a1)for(let h=0;h.99999)this.quaternion.set(0,0,0,1);else if(r.y<-.99999)this.quaternion.set(1,0,0,0);else{Tue.set(r.z,0,-r.x).normalize();let e=Math.acos(r.y);this.quaternion.setFromAxisAngle(Tue,e)}}setLength(r,e=r*.2,i=e*.2){this.line.scale.set(1,Math.max(1e-4,r-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=r,this.cone.updateMatrix()}setColor(r){this.line.material.color.set(r),this.cone.material.color.set(r)}copy(r){return super.copy(r,!1),this.line.copy(r.line),this.cone.copy(r.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},iU=class extends oi{constructor(r=1){let e=[0,0,0,r,0,0,0,0,0,0,r,0,0,0,0,0,0,r],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],n=new it;n.setAttribute("position",new ct(e,3)),n.setAttribute("color",new ct(i,3));let s=new Tr({vertexColors:!0,toneMapped:!1});super(n,s),this.type="AxesHelper"}setColors(r,e,i){let n=new Ve,s=this.geometry.attributes.color.array;return n.set(r),n.toArray(s,0),n.toArray(s,3),n.set(e),n.toArray(s,6),n.toArray(s,9),n.set(i),n.toArray(s,12),n.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},xx=class{constructor(){this.type="ShapePath",this.color=new Ve,this.subPaths=[],this.currentPath=null}moveTo(r,e){return this.currentPath=new ku,this.subPaths.push(this.currentPath),this.currentPath.moveTo(r,e),this}lineTo(r,e){return this.currentPath.lineTo(r,e),this}quadraticCurveTo(r,e,i,n){return this.currentPath.quadraticCurveTo(r,e,i,n),this}bezierCurveTo(r,e,i,n,s,a){return this.currentPath.bezierCurveTo(r,e,i,n,s,a),this}splineThru(r){return this.currentPath.splineThru(r),this}toShapes(r){function e(y){let E=[];for(let b=0,x=y.length;bNumber.EPSILON){if(F<0&&(P=E[D],w=-w,_=E[S],F=-F),y.y_.y)continue;if(y.y===P.y){if(y.x===P.x)return!0}else{let X=F*(y.x-P.x)-w*(y.y-P.y);if(X===0)return!0;if(X<0)continue;x=!x}}else{if(y.y!==P.y)continue;if(_.x<=y.x&&y.x<=P.x||P.x<=y.x&&y.x<=_.x)return!0}}return x}let n=es.isClockWise,s=this.subPaths;if(s.length===0)return[];let a,o,l,c=[];if(s.length===1)return o=s[0],l=new Ja,l.curves=o.curves,c.push(l),c;let u=!n(s[0].getPoints());u=r?!u:u;let h=[],p=[],d=[],f=0,m;p[f]=void 0,d[f]=[];for(let y=0,E=s.length;y1){let y=!1,E=0;for(let b=0,x=p.length;b0&&y===!1&&(d=h)}let g;for(let y=0,E=p.length;y>-c-14,i[l|256]=1024>>-c-14|32768,n[l]=-c-1,n[l|256]=-c-1):c<=15?(i[l]=c+15<<10,i[l|256]=c+15<<10|32768,n[l]=13,n[l|256]=13):c<128?(i[l]=31744,i[l|256]=64512,n[l]=24,n[l|256]=24):(i[l]=31744,i[l|256]=64512,n[l]=13,n[l|256]=13)}let s=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;!(c&8388608);)c<<=1,u-=8388608;c&=-8388609,u+=947912704,s[l]=c|u}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)a[l]=l<<23;a[31]=1199570944,a[32]=2147483648;for(let l=33;l<63;++l)a[l]=2147483648+(l-32<<23);a[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(o[l]=1024);return{floatView:r,uint32View:e,baseTable:i,shiftTable:n,mantissaTable:s,exponentTable:a,offsetTable:o}}function ovt(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Qn(t,-65504,65504),up.floatView[0]=t;let r=up.uint32View[0],e=r>>23&511;return up.baseTable[e]+((r&8388607)>>up.shiftTable[e])}function lvt(t){let r=t>>10;return up.uint32View[0]=up.mantissaTable[up.offsetTable[r]+(t&1023)]+up.exponentTable[r],up.floatView[0]}var zy=Object.freeze({__proto__:null,fromHalfFloat:lvt,toHalfFloat:ovt}),nU=class extends Qa{constructor(r,e,i,n,s,a){console.warn("THREE.BoxBufferGeometry has been renamed to THREE.BoxGeometry."),super(r,e,i,n,s,a)}},sU=class extends xg{constructor(r,e,i,n){console.warn("THREE.CapsuleBufferGeometry has been renamed to THREE.CapsuleGeometry."),super(r,e,i,n)}},aU=class extends Ig{constructor(r,e,i,n){console.warn("THREE.CircleBufferGeometry has been renamed to THREE.CircleGeometry."),super(r,e,i,n)}},oU=class extends Sg{constructor(r,e,i,n,s,a,o){console.warn("THREE.ConeBufferGeometry has been renamed to THREE.ConeGeometry."),super(r,e,i,n,s,a,o)}},lU=class extends Dl{constructor(r,e,i,n,s,a,o,l){console.warn("THREE.CylinderBufferGeometry has been renamed to THREE.CylinderGeometry."),super(r,e,i,n,s,a,o,l)}},cU=class extends _g{constructor(r,e){console.warn("THREE.DodecahedronBufferGeometry has been renamed to THREE.DodecahedronGeometry."),super(r,e)}},uU=class extends Sp{constructor(r,e){console.warn("THREE.ExtrudeBufferGeometry has been renamed to THREE.ExtrudeGeometry."),super(r,e)}},hU=class extends Rg{constructor(r,e){console.warn("THREE.IcosahedronBufferGeometry has been renamed to THREE.IcosahedronGeometry."),super(r,e)}},pU=class extends cf{constructor(r,e,i,n){console.warn("THREE.LatheBufferGeometry has been renamed to THREE.LatheGeometry."),super(r,e,i,n)}},dU=class extends uf{constructor(r,e){console.warn("THREE.OctahedronBufferGeometry has been renamed to THREE.OctahedronGeometry."),super(r,e)}},fU=class extends ts{constructor(r,e,i,n){console.warn("THREE.PlaneBufferGeometry has been renamed to THREE.PlaneGeometry."),super(r,e,i,n)}},mU=class extends Dc{constructor(r,e,i,n){console.warn("THREE.PolyhedronBufferGeometry has been renamed to THREE.PolyhedronGeometry."),super(r,e,i,n)}},gU=class extends Mg{constructor(r,e,i,n,s,a){console.warn("THREE.RingBufferGeometry has been renamed to THREE.RingGeometry."),super(r,e,i,n,s,a)}},vU=class extends _p{constructor(r,e){console.warn("THREE.ShapeBufferGeometry has been renamed to THREE.ShapeGeometry."),super(r,e)}},yU=class extends ro{constructor(r,e,i,n,s,a,o){console.warn("THREE.SphereBufferGeometry has been renamed to THREE.SphereGeometry."),super(r,e,i,n,s,a,o)}},TU=class extends Dg{constructor(r,e){console.warn("THREE.TetrahedronBufferGeometry has been renamed to THREE.TetrahedronGeometry."),super(r,e)}},EU=class extends wp{constructor(r,e,i,n,s){console.warn("THREE.TorusBufferGeometry has been renamed to THREE.TorusGeometry."),super(r,e,i,n,s)}},bU=class extends Cg{constructor(r,e,i,n,s,a){console.warn("THREE.TorusKnotBufferGeometry has been renamed to THREE.TorusKnotGeometry."),super(r,e,i,n,s,a)}},xU=class extends Ag{constructor(r,e,i,n,s){console.warn("THREE.TubeBufferGeometry has been renamed to THREE.TubeGeometry."),super(r,e,i,n,s)}};typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:WD}}));typeof window!="undefined"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=WD);var zu=new zi,She=new A,_he=new A,whe=new A,Rhe=new A;_r.prototype.raycast=function(t,r){let e=this.geometry,i=this.matrixWorld,n=t.params.Line.threshold,s=e.drawRange;if(e.boundingSphere===null&&e.computeBoundingSphere(),zu.copy(e.boundingSphere),zu.applyMatrix4(i),zu.radius+=n,t.ray.intersectsSphere(zu)===!1)return;let a=n*n,o=this.isLineSegments?2:1,l=e.index,u=e.attributes.position,h=r.length;if(l!==null){let p=this.userData.batches;if(p&&p.length>0&&p[0].boundingSphere)for(let d=0;d=1))return}}else{let d=Math.max(0,s.start),f=Math.min(l.count,s.start+s.count);for(let m=d,g=f-1;m=1))return}}}else{let p=this.userData.batches;if(p&&p.length>0&&p[0].boundingSphere)for(let d=0;d=1)return}}else{let d=Math.max(0,s.start),f=Math.min(u.count,s.start+s.count);for(let m=d,g=f-1;m=1)return}}};function JD(t,r,e,i,n,s,a){if(She.fromBufferAttribute(r,i).applyMatrix4(t.matrixWorld),_he.fromBufferAttribute(r,n).applyMatrix4(t.matrixWorld),e.ray.distanceSqToSegment(She,_he,Rhe,whe)>s)return!1;let l=e.ray.origin.distanceTo(Rhe);return le.far?!1:(a.push({distance:l,point:whe.clone(),index:i,object:t}),!0)}var Mhe=Math.pow(2,-24);var Ug=class{constructor(){}};function Ll(t,r,e){return e.min.x=r[t],e.min.y=r[t+1],e.min.z=r[t+2],e.max.x=r[t+3],e.max.y=r[t+4],e.max.z=r[t+5],e}function LU(t){let r=-1,e=-1/0;for(let i=0;i<3;i++){let n=t[i+3]-t[i];n>e&&(e=n,r=i)}return r}function FU(t,r){r.set(t)}function HU(t,r,e){let i,n;for(let s=0;s<3;s++){let a=s+3;i=t[s],n=r[s],e[s]=in?i:n}}function Rx(t,r,e){for(let i=0;i<3;i++){let n=r[t+2*i],s=r[t+2*i+1],a=n-s,o=n+s;ae[i+3]&&(e[i+3]=o)}}function jy(t){let r=t[3]-t[0],e=t[4]-t[1],i=t[5]-t[2];return 2*(r*e+e*i+i*r)}function hvt(t,r){if(!t.index){let e=t.attributes.position.count,i=r.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,n;e>65535?n=new Uint32Array(new i(4*e)):n=new Uint16Array(new i(2*e)),t.setIndex(new jt(n,1));for(let s=0;sn-s);for(let n=0;nl&&(l=P),y&&xf&&(f=x);let _=t[E+2],w=t[E+3],F=_-w,X=_+w;Fc&&(c=X),y&&_m&&(m=_);let H=t[E+4],he=t[E+5],C=H-he,N=H+he;Cu&&(u=N),y&&Hg&&(g=H)}i[0]=s,i[1]=a,i[2]=o,i[3]=l,i[4]=c,i[5]=u,y&&(n[0]=h,n[1]=p,n[2]=d,n[3]=f,n[4]=m,n[5]=g)}function dvt(t,r,e,i){let n=1/0,s=1/0,a=1/0,o=-1/0,l=-1/0,c=-1/0;for(let u=r*6,h=(r+e)*6;uo&&(o=p);let d=t[u+2];dl&&(l=d);let f=t[u+4];fc&&(c=f)}i[0]=n,i[1]=s,i[2]=a,i[3]=o,i[4]=l,i[5]=c}function fvt(t,r,e,i,n){let s=e,a=e+i-1,o=n.pos,l=n.axis*2;for(;;){for(;s<=a&&r[s*6+l]=o;)a--;if(st.candidate-r.candidate,gf=new Array(Pp).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),QD=new Float32Array(6);function gvt(t,r,e,i,n,s){let a=-1,o=0;if(s===0)a=LU(r),a!==-1&&(o=(r[a]+r[a+3])/2);else if(s===1)a=LU(t),a!==-1&&(o=vvt(e,i,n,a));else if(s===2){let l=jy(t),c=1.25*n,u=i*6,h=(i+n)*6;for(let p=0;p<3;p++){let d=r[p],g=(r[p+3]-d)/Pp;if(n=P.candidate?Rx(x,e,P.rightCacheBounds):(Rx(x,e,P.leftCacheBounds),P.count++)}}for(let x=0;x=Pp&&(D=Pp-1);let P=gf[D];P.count++,Rx(b,e,P.bounds)}let y=gf[Pp-1];FU(y.bounds,y.rightCacheBounds);for(let b=Pp-2;b>=0;b--){let x=gf[b],S=gf[b+1];HU(x.bounds,S.rightCacheBounds,x.rightCacheBounds)}let E=0;for(let b=0;bD&&(D=b),x>D&&(D=x);let P=(D-S)/2,_=y*2;s[d+_+0]=S+P,s[d+_+1]=P+(Math.abs(S)+P)*Mhe,Sr[y+3]&&(r[y+3]=D)}}return s}function Tvt(t,r){function e(y){p&&p(y/d)}function i(y,E,b,x=null,S=0){if(!f&&S>=l&&(f=!0,c&&(console.warn(`MeshBVH: Max depth of ${l} reached when generating BVH. Consider increasing maxDepth.`),console.warn(t))),b<=u||S>=l)return e(E+b),y.offset=E,y.count=b,y;let D=gvt(y.boundingData,x,a,E,b,h);if(D.axis===-1)return e(E+b),y.offset=E,y.count=b,y;let P=fvt(o,a,E,b,D);if(P===E||P===E+b)e(E+b),y.offset=E,y.count=b;else{y.splitAxis=D.axis;let _=new Ug,w=E,F=P-E;y.left=_,_.boundingData=new Float32Array(6),BU(a,w,F,_.boundingData,s),i(_,w,F,s,S+1);let X=new Ug,H=P,he=b-F;y.right=X,X.boundingData=new Float32Array(6),BU(a,H,he,X.boundingData,s),i(X,H,he,s,S+1)}return y}hvt(t,r);let n=new Float32Array(6),s=new Float32Array(6),a=yvt(t,n),o=t.index.array,l=r.maxDepth,c=r.verbose,u=r.maxLeafTris,h=r.strategy,p=r.onProgress,d=t.index.count/3,f=!1,m=[],g=pvt(t);if(g.length===1){let y=g[0],E=new Ug;E.boundingData=n,dvt(a,y.offset,y.count,s),i(E,y.offset,y.count,s),m.push(E)}else for(let y of g){let E=new Ug;E.boundingData=new Float32Array(6),BU(a,y.offset,y.count,E.boundingData,s),i(E,y.offset,y.count,s),m.push(E)}return m}function Ahe(t,r){let e=Tvt(t,r),i,n,s,a=[],o=r.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let u=0;uMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return n[p+6]=b/4,b=c(b,y),n[p+7]=E,b}}}var lo=class{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(r,e){let i=1/0,n=-1/0;for(let s=0,a=r.length;sn?l:n}this.min=i,this.max=n}setFromPoints(r,e){let i=1/0,n=-1/0;for(let s=0,a=e.length;sn?l:n}this.min=i,this.max=n}isSeparated(r){return this.min>r.max||r.min>this.max}};lo.prototype.setFromBox=function(){let t=new A;return function(e,i){let n=i.min,s=i.max,a=1/0,o=-1/0;for(let l=0;l<=1;l++)for(let c=0;c<=1;c++)for(let u=0;u<=1;u++){t.x=n.x*l+s.x*(1-l),t.y=n.y*c+s.y*(1-c),t.z=n.z*u+s.z*(1-u);let h=e.dot(t);a=Math.min(h,a),o=Math.max(h,o)}this.min=a,this.max=o}}();var kzt=function(){let t=new lo;return function(e,i){let n=e.points,s=e.satAxes,a=e.satBounds,o=i.points,l=i.satAxes,c=i.satBounds;for(let u=0;u<3;u++){let h=a[u],p=s[u];if(t.setFromPoints(p,o),h.isSeparated(t))return!1}for(let u=0;u<3;u++){let h=c[u],p=l[u];if(t.setFromPoints(p,n),h.isSeparated(t))return!1}}}();var Evt=function(){let t=new A,r=new A,e=new A;return function(n,s,a){let o=n.start,l=t,c=s.start,u=r;e.subVectors(o,c),t.subVectors(n.end,n.start),r.subVectors(s.end,s.start);let h=e.dot(u),p=u.dot(l),d=u.dot(u),f=e.dot(l),g=l.dot(l)*d-p*p,y,E;g!==0?y=(h*p-f*d)/g:y=0,E=(h+y*p)/d,a.x=y,a.y=E}}(),Mx=function(){let t=new le,r=new A,e=new A;return function(n,s,a,o){Evt(n,s,t);let l=t.x,c=t.y;if(l>=0&&l<=1&&c>=0&&c<=1){n.at(l,a),s.at(c,o);return}else if(l>=0&&l<=1){c<0?s.at(0,o):s.at(1,o),n.closestPointToPoint(o,!0,a);return}else if(c>=0&&c<=1){l<0?n.at(0,a):n.at(1,a),s.closestPointToPoint(a,!0,o);return}else{let u;l<0?u=n.start:u=n.end;let h;c<0?h=s.start:h=s.end;let p=r,d=e;if(n.closestPointToPoint(h,!0,r),s.closestPointToPoint(u,!0,e),p.distanceToSquared(h)<=d.distanceToSquared(u)){a.copy(p),o.copy(h);return}else{a.copy(u),o.copy(d);return}}}}(),Ohe=function(){let t=new A,r=new A,e=new Ei,i=new Ca;return function(s,a){let{radius:o,center:l}=s,{a:c,b:u,c:h}=a;if(i.start=c,i.end=u,i.closestPointToPoint(l,!0,t).distanceTo(l)<=o||(i.start=c,i.end=h,i.closestPointToPoint(l,!0,t).distanceTo(l)<=o)||(i.start=u,i.end=h,i.closestPointToPoint(l,!0,t).distanceTo(l)<=o))return!0;let m=a.getPlane(e);if(Math.abs(m.distanceToPoint(l))<=o){let y=m.projectPoint(l,r);if(a.containsPoint(y))return!0}return!1}}();var bvt=1e-15;function Wy(t){return Math.abs(t)new A),this.satBounds=new Array(4).fill().map(()=>new lo),this.points=[this.a,this.b,this.c],this.sphere=new zi,this.plane=new Ei,this.needsUpdate=!0}intersectsSphere(r){return Ohe(r,this)}update(){let r=this.a,e=this.b,i=this.c,n=this.points,s=this.satAxes,a=this.satBounds,o=s[0],l=a[0];this.getNormal(o),l.setFromPoints(o,n);let c=s[1],u=a[1];c.subVectors(r,e),u.setFromPoints(c,n);let h=s[2],p=a[2];h.subVectors(e,i),p.setFromPoints(h,n);let d=s[3],f=a[3];d.subVectors(i,r),f.setFromPoints(d,n),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,r),this.needsUpdate=!1}};co.prototype.closestPointToSegment=function(){let t=new A,r=new A,e=new Ca;return function(n,s=null,a=null){let{start:o,end:l}=n,c=this.points,u,h=1/0;for(let p=0;p<3;p++){let d=(p+1)%3;e.start.copy(c[p]),e.end.copy(c[d]),Mx(e,n,t,r),u=t.distanceToSquared(r),u1-1e-10){let E=this.satBounds,b=this.satAxes;e[0]=d.a,e[1]=d.b,e[2]=d.c;for(let D=0;D<4;D++){let P=E[D],_=b[D];if(i.setFromPoints(_,e),P.isSeparated(i))return!1}let x=d.satBounds,S=d.satAxes;r[0]=this.a,r[1]=this.b,r[2]=this.c;for(let D=0;D<4;D++){let P=x[D],_=S[D];if(i.setFromPoints(_,r),P.isSeparated(i))return!1}for(let D=0;D<4;D++){let P=b[D];for(let _=0;_<4;_++){let w=S[_];if(s.crossVectors(P,w),i.setFromPoints(s,r),n.setFromPoints(s,e),i.isSeparated(n))return!1}}return f&&(m||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),f.start.set(0,0,0),f.end.set(0,0,0)),!0}else{let E=this.points,b=!1,x=0;for(let C=0;C<3;C++){let N=E[C],k=E[(C+1)%3];c.start.copy(N),c.end.copy(k),c.delta(a);let G=b?u.start:u.end,U=Wy(y.distanceToPoint(N));if(Wy(y.normal.dot(a))&&U){u.copy(c),x=2;break}if((y.intersectLine(c,G)||U)&&!Wy(G.distanceTo(k))){if(x++,b)break;b=!0}}if(x===1&&d.containsPoint(u.end))return f&&(f.start.copy(u.end),f.end.copy(u.end)),!0;if(x!==2)return!1;let S=d.points,D=!1,P=0;for(let C=0;C<3;C++){let N=S[C],k=S[(C+1)%3];c.start.copy(N),c.end.copy(k),c.delta(o);let G=D?h.start:h.end,U=Wy(g.distanceToPoint(N));if(Wy(g.normal.dot(o))&&U){h.copy(c),P=2;break}if((g.intersectLine(c,G)||U)&&!Wy(G.distanceTo(k))){if(P++,D)break;D=!0}}if(P===1&&this.containsPoint(h.end))return f&&(f.start.copy(h.end),f.end.copy(h.end)),!0;if(P!==2)return!1;if(u.delta(a),h.delta(o),a.dot(o)<0){let C=h.start;h.start=h.end,h.end=C}let _=u.start.dot(a),w=u.end.dot(a),F=h.start.dot(a),X=h.end.dot(a),H=w0?f.start.copy(u.start):f.start.copy(h.start),l.subVectors(u.end,h.end),l.dot(a)<0?f.end.copy(u.end):f.end.copy(h.end)),!0)}}}();co.prototype.distanceToPoint=function(){let t=new A;return function(e){return this.closestPointToPoint(e,t),e.distanceTo(t)}}();co.prototype.distanceToTriangle=function(){let t=new A,r=new A,e=["a","b","c"],i=new Ca,n=new Ca;return function(a,o=null,l=null){let c=o||l?i:null;if(this.intersectsTriangle(a,c))return(o||l)&&(o&&c.getCenter(o),l&&c.getCenter(l)),0;let u=1/0;for(let h=0;h<3;h++){let p,d=e[h],f=a[d];this.closestPointToPoint(f,t),p=f.distanceToSquared(t),pnew A),this.satAxes=new Array(3).fill().map(()=>new A),this.satBounds=new Array(3).fill().map(()=>new lo),this.alignedSatBounds=new Array(3).fill().map(()=>new lo),this.needsUpdate=!1,r&&this.min.copy(r),e&&this.max.copy(e),i&&this.matrix.copy(i)}set(r,e,i){this.min.copy(r),this.max.copy(e),this.matrix.copy(i),this.needsUpdate=!0}copy(r){this.min.copy(r.min),this.max.copy(r.max),this.matrix.copy(r.matrix),this.needsUpdate=!0}};uo.prototype.update=function(){return function(){let r=this.matrix,e=this.min,i=this.max,n=this.points;for(let c=0;c<=1;c++)for(let u=0;u<=1;u++)for(let h=0;h<=1;h++){let p=1*c|2*u|4*h,d=n[p];d.x=c?i.x:e.x,d.y=u?i.y:e.y,d.z=h?i.z:e.z,d.applyMatrix4(r)}let s=this.satBounds,a=this.satAxes,o=n[0];for(let c=0;c<3;c++){let u=a[c],h=s[c],p=1<new Ca),e=new Array(12).fill().map(()=>new Ca),i=new A,n=new A;return function(a,o=0,l=null,c=null){if(this.needsUpdate&&this.update(),this.intersectsBox(a))return(l||c)&&(a.getCenter(n),this.closestPointToPoint(n,i),a.closestPointToPoint(i,n),l&&l.copy(i),c&&c.copy(n)),0;let u=o*o,h=a.min,p=a.max,d=this.points,f=1/0;for(let g=0;g<8;g++){let y=d[g];n.copy(y).clamp(h,p);let E=y.distanceToSquared(n);if(Ee.far)?null:t}function Fl(t,r,e,i){let n=t.a,s=t.b,a=t.c,o=r,l=r+1,c=r+2;e&&(o=e.getX(r),l=e.getX(r+1),c=e.getX(r+2)),n.x=i.getX(o),n.y=i.getY(o),n.z=i.getZ(o),s.x=i.getX(l),s.y=i.getY(l),s.z=i.getZ(l),a.x=i.getX(c),a.y=i.getY(c),a.z=i.getZ(c)}function zU(t,r,e,i,n,s,a){let o=e.index,l=e.attributes.position;for(let c=t,u=r+t;c=0,d,f;p?(d=Xy(t),f=$y(t,o)):(d=$y(t,o),f=Xy(t));let g=lC(d,s,i,sC)?oC(d,r,e,i):null;if(g){let b=g.point[u];if(p?b<=s[f+c]:b>=s[f+c+3])return g}let E=lC(f,s,i,sC)?oC(f,r,e,i):null;return g&&E?g.distance<=E.distance?g:E:g||E||null}}var khe=function(){let t,r,e=[],i=new qy(()=>new Ot);return function(...a){t=i.getPrimitive(),r=i.getPrimitive(),e.push(t,r);let o=n(...a);i.releasePrimitive(t),i.releasePrimitive(r),e.pop(),e.pop();let l=e.length;return l>0&&(r=e[l-1],t=e[l-2]),o};function n(s,a,o,l,c=null,u=0,h=0){function p(b){let x=b*2,S=vf,D=yf;for(;!Np(x,S);)b=Xy(b),x=b*2;return Bg(b,D)}function d(b){let x=b*2,S=vf,D=yf;for(;!Np(x,S);)b=$y(b,D),x=b*2;return Bg(b,D)+Yy(x,S)}let f=s*2,m=Ky,g=vf,y=yf;if(Np(f,g)){let b=Bg(s,y),x=Yy(f,g);return Ll(s,m,t),l(b,x,!1,h,u+s,t)}else{let b=Xy(s),x=$y(s,y),S=b,D=x,P,_,w,F;if(c&&(w=t,F=r,Ll(S,m,w),Ll(D,m,F),P=c(w),_=c(F),_n.intersectsBox(_),intersectsTriangle:_=>{_.a.applyMatrix4(c),_.b.applyMatrix4(c),_.c.applyMatrix4(c),_.needsUpdate=!0;for(let w=S*3,F=(D+S)*3;wnew co),Nc=class{static serialize(r,e={}){if(e.isBufferGeometry)return console.warn("MeshBVH.serialize: The arguments for the function have changed. See documentation for new signature."),Nc.serialize(arguments[0],{cloneBuffers:arguments[2]===void 0?!0:arguments[2]});e=Ur({cloneBuffers:!0},e);let i=r.geometry,n=r._roots,s=i.getIndex(),a;return e.cloneBuffers?a={roots:n.map(o=>o.slice()),index:s.array.slice()}:a={roots:n,index:s.array},a}static deserialize(r,e,i={}){if(typeof i=="boolean")return console.warn("MeshBVH.deserialize: The arguments for the function have changed. See documentation for new signature."),Nc.deserialize(arguments[0],arguments[1],{setIndex:arguments[2]===void 0?!0:arguments[2]});i=Ur({setIndex:!0},i);let{index:n,roots:s}=r,a=new Nc(e,Mn(Ur({},i),{[WU]:!0}));if(a._roots=s,i.setIndex){let o=e.getIndex();if(o===null){let l=new jt(r.index,1,!1);e.setIndex(l)}else o.array!==n&&(o.array.set(n),o.needsUpdate=!0)}return a}constructor(r,e={}){if(r.isBufferGeometry){if(r.index&&r.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(e=Object.assign({strategy:0,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,[WU]:!1},e),e.useSharedArrayBuffer&&typeof SharedArrayBuffer=="undefined")throw new Error("MeshBVH: SharedArrayBuffer is not available.");this._roots=null,e[WU]||(this._roots=Ahe(r,e),!r.boundingBox&&e.setBoundingBox&&(r.boundingBox=this.getBoundingBox(new Ot))),this.geometry=r}refit(r=null){r&&Array.isArray(r)&&(r=new Set(r));let e=this.geometry,i=e.index.array,n=e.attributes.position,s,a,o,l,c=0,u=this._roots;for(let p=0,d=u.length;pD&&(D=H),heP&&(P=he),C_&&(_=C)}return l[p+0]!==b||l[p+1]!==x||l[p+2]!==S||l[p+3]!==D||l[p+4]!==P||l[p+5]!==_?(l[p+0]=b,l[p+1]=x,l[p+2]=S,l[p+3]=D,l[p+4]=P,l[p+5]=_,!0):!1}else{let y=p+8,E=a[p+6],b=y+d,x=E+d,S=f,D=!1,P=!1;r?S||(D=r.has(b),P=r.has(x),S=!D&&!P):(D=!0,P=!0);let _=S||D,w=S||P,F=!1;_&&(F=h(y,d,S));let X=!1;w&&(X=h(E,d,S));let H=F||X;if(H)for(let he=0;he<3;he++){let C=y+he,N=E+he,k=l[C],G=l[C+3],U=l[N],j=l[N+3];l[p+he]=kj?G:j}return H}}}traverse(r,e=0){let i=this._roots[e],n=new Uint32Array(i),s=new Uint16Array(i);a(0);function a(o,l=0){let c=o*2,u=s[c+15]===65535;if(u){let h=n[o+6],p=s[c+14];r(l,u,new Float32Array(i,o*4,6),h,p)}else{let h=o+32/4,p=n[o+6],d=n[o+7];r(l,u,new Float32Array(i,o*4,6),d)||(a(h,l+1),a(p,l+1))}}}raycast(r,e=en){let i=this._roots,n=this.geometry,s=[],a=e.isMaterial,o=Array.isArray(e),l=n.groups,c=a?e.side:e;for(let u=0,h=i.length;u{let y=f*3;return p(d,y,y+1,y+2,m,g)}}r={boundsTraverseOrder:i,intersectsBounds:r,intersectsTriangle:e,intersectsRange:null},console.warn("MeshBVH: Shapecast function signature has changed and now takes an object of callbacks as a second argument. See docs for new signature.")}let s=ju.getPrimitive(),{boundsTraverseOrder:a,intersectsBounds:o,intersectsRange:l,intersectsTriangle:c}=r;if(l&&c){let p=l;l=(d,f,m,g,y)=>p(d,f,m,g,y)?!0:zU(d,f,n,c,m,g,s)}else l||(c?l=(p,d,f,m)=>zU(p,d,n,c,f,m,s):l=(p,d,f)=>f);let u=!1,h=0;for(let p of this._roots){if(Jy(p),u=khe(0,n,o,l,a,h),Dx(),u)break;h+=p.byteLength}return ju.releasePrimitive(s),u}bvhcast(r,e,i){let{intersectsRanges:n,intersectsTriangles:s}=i,a=this.geometry.index,o=this.geometry.attributes.position,l=r.geometry.index,c=r.geometry.attributes.position;Qy.copy(e).invert();let u=ju.getPrimitive(),h=ju.getPrimitive();if(s){let d=function(f,m,g,y,E,b,x,S){for(let D=g,P=g+y;DYU.intersectsBox(d),intersectsRange:(d,f,m,g,y,E)=>(qU.copy(E),qU.applyMatrix4(Qy),r.shapecast({intersectsBounds:b=>qU.intersectsBox(b),intersectsRange:(b,x,S,D,P)=>n(d,f,b,x,g,y,D,P)}))});return ju.releasePrimitive(u),ju.releasePrimitive(h),p}intersectsBox(r,e){return kg.set(r.min,r.max,e),kg.needsUpdate=!0,this.shapecast({intersectsBounds:i=>kg.intersectsBox(i),intersectsTriangle:i=>kg.intersectsTriangle(i)})}intersectsSphere(r){return this.shapecast({intersectsBounds:e=>r.intersectsBox(e),intersectsTriangle:e=>e.intersectsSphere(r)})}closestPointToGeometry(r,e,i={},n={},s=0,a=1/0){r.boundingBox||r.computeBoundingBox(),kg.set(r.boundingBox.min,r.boundingBox.max,e),kg.needsUpdate=!0;let o=this.geometry,l=o.attributes.position,c=o.index,u=r.attributes.position,h=r.index,p=ju.getPrimitive(),d=ju.getPrimitive(),f=cC,m=wvt,g=null,y=null;n&&(g=Rvt,y=Mvt);let E=1/0,b=null,x=null;return Qy.copy(e).invert(),Cx.matrix.copy(Qy),this.shapecast({boundsTraverseOrder:S=>kg.distanceToBox(S),intersectsBounds:(S,D,P)=>P{if(r.boundsTree)return r.boundsTree.shapecast({boundsTraverseOrder:P=>Cx.distanceToBox(P),intersectsBounds:(P,_,w)=>w{for(let w=P*3,F=(P+_)*3;w(Ax.copy(r).clamp(u.min,u.max),Ax.distanceToSquared(r)),intersectsBounds:(u,h,p)=>p{u.closestPointToPoint(r,Ax);let p=r.distanceToSquared(Ax);return p{Ll(0,new Float32Array(i),Vhe),r.union(Vhe)}),r}};var XU=new Vo,zhe=new Ue,Dvt=Je.prototype.raycast;function $U(t,r){if(this.geometry.boundsTree){if(this.material===void 0)return;zhe.copy(this.matrixWorld).invert(),XU.copy(t.ray).applyMatrix4(zhe);let e=this.geometry.boundsTree;if(t.firstHitOnly===!0){let i=VU(e.raycastFirst(XU,this.material),this,t);i&&r.push(i)}else{let i=e.raycast(XU,this.material);for(let n=0,s=i.length;n=1)return}}else{let m=Math.max(0,d.start),g=Math.min(a.count,d.start+d.count);for(let y=m,E=g;y=1)return}}else if(o!==void 0)if(Array.isArray(i))for(let m=0,g=p.length;m=1)return}}else{let m=Math.max(0,d.start),g=Math.min(o.count,d.start+d.count);for(let y=m,E=g;y=1)return}}};Je.prototype.raycast=$U;function Cvt(t,r,e,i,n,s,a,o){let l;if(r.side===Gn?l=i.intersectTriangle(a,s,n,!0,o):l=i.intersectTriangle(n,s,a,r.side!==wi,o),l===null)return null;gC.copy(o),gC.applyMatrix4(t.matrixWorld);let c=e.ray.origin.distanceTo(gC);return ce.far?null:{distance:c,point:gC.clone(),object:t}}function vC(t,r,e,i,n,s,a,o,l,c,u,h){Tf.fromBufferAttribute(n,c),Ef.fromBufferAttribute(n,u),bf.fromBufferAttribute(n,h);let p=t.morphTargetInfluences;if(s&&p){uC.set(0,0,0),hC.set(0,0,0),pC.set(0,0,0);for(let f=0,m=s.length;f=1)return}}else{let h=Math.max(0,s.start),p=Math.min(c.count,s.start+s.count);for(let d=h,f=p;d=1)return}};function Whe(t,r,e,i,n,s){let a=i.ray.distanceSqToPoint(t);if(ai.far)return;n.push({distance:l,distanceToRay:Math.sqrt(a),point:o,index:r,face:null,object:s})}}var rT=class extends pr{constructor(r=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=r,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.addEventListener("removed",function(){this.traverse(function(e){e.element instanceof Element&&e.element.parentNode!==null&&e.element.parentNode.removeChild(e.element)})})}copy(r,e){return super.copy(r,e),this.element=r.element.cloneNode(!0),this}},tT=new A,qhe=new Ue,Yhe=new Ue,Xhe=new A,$he=new A,xf=class{constructor(r={}){let e=this,i,n,s,a,o={objects:new WeakMap},l=r.element!==void 0?r.element:document.createElement("div");l.style.overflow="hidden",this.domElement=l,this.getSize=function(){return{width:i,height:n}},this.render=function(d,f){d.matrixWorldAutoUpdate===!0&&d.updateMatrixWorld(),f.parent===null&&f.matrixWorldAutoUpdate===!0&&f.updateMatrixWorld(),qhe.copy(f.matrixWorldInverse),Yhe.multiplyMatrices(f.projectionMatrix,qhe),c(d,d,f),p(d)},this.setSize=function(d,f){i=d,n=f,s=i/2,a=n/2,l.style.width=d+"px",l.style.height=f+"px"};function c(d,f,m){if(d.isCSS2DObject){tT.setFromMatrixPosition(d.matrixWorld),tT.applyMatrix4(Yhe);let g=d.visible===!0&&tT.z>=-1&&tT.z<=1&&d.layers.test(m.layers)===!0;if(d.element.style.display=g===!0?"":"none",g===!0){d.onBeforeRender(e,f,m);let E=d.element;E.style.transform="translate(-50%,-50%) translate("+(tT.x*s+s)+"px,"+(-tT.y*a+a)+"px)",E.parentNode!==l&&l.appendChild(E),d.onAfterRender(e,f,m)}let y={distanceToCameraSquared:u(m,d)};o.objects.set(d,y)}for(let g=0,y=d.children.length;g{this.cancelReject=n});this.promise=Promise.race([e,r])}cancel(){this.cancelReject&&this.cancelReject({type:"cancel"})}};var Avt=Un(Khe(),1),ne=Avt;ne.setLevel("info");var xC=class extends pr{constructor(r){super(),this.isSVGObject=!0,this.node=r}};var Jhe="#7fffbf",Qhe=10,epe=14,Ovt=2.5;var nT=class{static createSVGObject(r){return new xC(r)}static createPointMarker(r=Qhe){return nT.createSnapIcon("Dot",Jhe,r,"#ffffff","2")}static createSnapIcon(r,e="none",i=Qhe,n=Jhe,s="2"){let a=document.createElementNS("http://www.w3.org/2000/svg","path"),o=i,l="";switch(r){case"Dot":o=i/3,l=` - M ${-o}, 0 - a ${o}, ${o} 0 1, 0 ${2*o}, 0 - a ${o}, ${o} 0 1, 0 -${2*o}, 0 - `;break;case"Square":o=i/1.2,l=` - M ${-o/2}, ${-o/2} - h ${o} - v ${o} - h ${-o} - z - `;break;case"Triangle":o=i/2,l=` - M 0, ${-o} - L ${-.87*o}, ${o/2} - L ${.87*o}, ${o/2} - z - `;break;case"Cross":o=i/1.2,l=` - M ${-o/2}, ${-o/2} - L ${o/2}, ${o/2} - M ${o/2}, ${-o/2} - L ${-o/2}, ${o/2} - `;break;case"Perpendicular":o=i,l=` - M 0, 0 - L ${-o/2}, 0 - M 0, 0 - L 0, ${o/2} - M ${o/2}, ${o/2} - L ${-o/2}, ${o/2} - M ${-o/2}, ${o/2} - L ${-o/2}, ${-o/2} - `;break;default:break}a.setAttribute("d",l);let c=`fill: ${e}; stroke: ${n}; stroke-width: ${s};`;return a.setAttribute("style",c),this.createSVGObject(a)}static createLine(r=6,e="#fff000",i=Ovt){let n=document.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("x1",`${-r}`),n.setAttribute("y1","0"),n.setAttribute("x2",`${r}`),n.setAttribute("y2","0");let s=`stroke: ${e}; stroke-width: ${i};`;return n.setAttribute("style",s),this.createSVGObject(n)}static createLabel(r,e="#ffffff",i=epe,n=epe/2){let s=document.createElementNS("http://www.w3.org/2000/svg","text");s.innerHTML=r,s.setAttribute("x","0"),s.setAttribute("y",`${n}`);let a=`font-size: ${i}; text-anchor: middle; fill: ${e};`;return s.setAttribute("style",a),this.createSVGObject(s)}};var St=class{static isFullScreen(){return!!(document.fullscreenElement||document.mozFullScreenElement)}static fullScreen(r=document.documentElement){(r.requestFullscreen||r.mozRequestFullScreen||r.webkitRequestFullscreen||r.msRequestFullscreen).call(r)}static exitFullscreen(){(document.exitFullscreen||document.mozCancelFullscreen||document.webkitExitFullscreen||document.msExitFullscreen).call(document)}static displayPointMarker(r,e,i=1e3,n=10){let s=nT.createPointMarker(n);return s.position.set(e.x,e.y,e.z),r.add(s),i&&setTimeout(()=>{r.remove(s)},i),s}static joinStrings(...r){return r.join("")}static numberToString(r){let e=2;return Math.abs(r)<1e-6?e=2:Math.abs(r)<1e-5?e=7:Math.abs(r)<1e-4?e=6:Math.abs(r)<.001?e=5:Math.abs(r)<.01?e=4:Math.abs(r)<.1&&(e=3),r.toFixed(e)}static hexToBase64(r){return btoa((r.match(/\w{2}/g)||[]).map(function(e){return String.fromCharCode(parseInt(e,16))}).join(""))}static vectorToString(r){return r instanceof A?`(${this.numberToString(r.x)}, ${this.numberToString(r.y)}, ${this.numberToString(r.z)})`:`(${this.numberToString(r.x)}, ${this.numberToString(r.y)})`}static arrayToVector2(r){if(r){if(r instanceof le)return r;if(Array.isArray(r)&&r.length>=2)return new le(r[0],r[1])}else return r}static arrayToVector3(r){if(r){if(r instanceof A)return r;if(Array.isArray(r)&&r.length>=2)return new A(r[0],r[1],r.length>2?r[2]:0)}else return r}static arrayToEuler(r){if(r){if(r instanceof Sr)return r;if(Array.isArray(r)&&r.length>=3)return new Sr(r[0],r[1],r[2])}else return r}static arrayOrObjectToVector3(r){if(r){if(r instanceof A)return r;if(r instanceof le)return new A(r.x,r.y,0);if(Array.isArray(r)&&r.length>=2)return new A(r[0],r[1],r[2]||0)}else return r;let e=r;if(e.x!=null&&e.y!=null)return new A(e.x,e.y,e.z||0)}static isVectorValid(r){let e=r&&!isNaN(r.x)&&!isNaN(r.y)&&isFinite(r.x)&&isFinite(r.y);return e&&r instanceof A&&(e=!isNaN(r.z)&&isFinite(r.z)),e}static isBoxValid(r){return r&&!r.isEmpty()&&this.isVectorValid(r.min)&&this.isVectorValid(r.max)}static isMatrixValid(r){let e=r&&r.elements;if(!e||e.length<16)return!1;for(let i=0;i<16;++i){let n=e[i];if(Number.isNaN(n))return!1}return!0}static guid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let e=Math.random()*16|0;return(r=="x"?e:e&3|8).toString(16)})}static expandBoxByScale(r,e){let i=new A;r.getCenter(i);let n=(r.max.x-r.min.x)*e,s=(r.max.y-r.min.y)*e,a=(r.max.z-r.min.z)*e,o=new A(i.x-n/2,i.y-s/2,i.z-a/2),l=new A(i.x+n/2,i.y+s/2,i.z+a/2);r.set(o,l)}static expandBoxByMinSize(r,e){let i=new A;r.getCenter(i);let n=r.max.x-r.min.x,s=r.max.y-r.min.y,a=r.max.z-r.min.z;n{i.onload=function(){n(i)}})}static renderingContextToImage(r,e,i="image/png",n=.8){if(e){let s=Math.max(e.min.x,0),a=Math.max(e.min.y,0),o=Math.max(e.max.x-s,0),l=Math.max(e.max.y-a,0),c=r.getImageData(s,a,o,l),u=document.createElement("canvas");return u.width=o,u.height=l,u.getContext("2d").putImageData(c,0,0),u.toDataURL(i,n)}return r.canvas.toDataURL(i,n)}static printMemory(r){let e=performance.memory;if(!e){ne.warn("[CommonUtils] performance.memory is not available in this browser");return}let i=(e.jsHeapSizeLimit/(1024*1024)).toFixed(2),n=(e.totalJSHeapSize/(1024*1024)).toFixed(2),s=(e.usedJSHeapSize/(1024*1024)).toFixed(2);ne.info(`[CommonUtils] ${r}. jsHeapSizeLimit: ${i}M , totalJSHeapSize: ${n}M , usedJSHeapSize: ${s}M `)}static printGpuInfo(r){let e=r.getExtension("webgl_debug_renderer_info"),i=r.getParameter(e.UNMASKED_RENDERER_WEBGL);ne.info("[CommonUtils] gpu:",i)}},IC=(t,r,e)=>{let{default:i,active:n}=r;e?(t.remove(i),t.add(n||i)):(n&&t.remove(n),t.add(i))};var Mr=class{static getScreenPointByEvent(r,e){let i=new le,{left:n,top:s}=e.getBoundingClientRect();return i.x=r.clientX-n,i.y=r.clientY-s,i}static getScreenPointByTouchEvent(r,e){let i=new le,{left:n,top:s}=e.getBoundingClientRect();return i.x=r.touches[0].clientX-n,i.y=r.touches[0].clientY-s,i}static worldPosition2ScreenPoint(r,e,i){let{clientWidth:n,clientHeight:s}=i,a=r.clone(),o=new le;return a.project(e),o.x=Math.round((.5+a.x/2)*n),o.y=Math.round((.5-a.y/2)*s),o}static screenPoint2worldPosition(r,e,i){let n=Mr.screenPoint2NdcPoint(r,e,i);return new A(n.x,n.y,1).unproject(e)}static screenPoint2NdcPoint(r,e,i){let{clientWidth:n,clientHeight:s}=i,a=new le;return a.x=r.x/n*2-1,a.y=-(r.y/s)*2+1,a}};var Sf=class{static createCSS2DObject(r){let e=new rT(r);return r.dataset.objectId=e.id.toString(),e}static createDefaultHotpoint(r=12){let e=document.createElement("div"),i=e.style;return i.width=`${r}px`,i.height=`${r}px`,i.opacity="0.8",i.cursor="pointer",i.top=`${-r/2}px`,i.left=`${-r/2}px`,i.backgroundColor="#ffffff",i.border="2px solid #00DAB7",i.borderRadius="50%",this.createCSS2DObject(e)}static createHotpoint(r){if(r){let e=document.createElement("div"),i=e.style;return i.top="0px",i.left="0px",e.innerHTML=r,this.createCSS2DObject(e)}return this.createDefaultHotpoint()}static createLabel(r,e=""){let i=document.createElement("div");if(i.innerHTML=r,e)i.classList.add(e);else{let n=i.style;n.padding="5px 9px",n.color="#ffffffdd",n.fontSize="12px",n.position="absolute",n.backgroundColor="rgba(0, 0, 0, 0.3)",n.borderRadius="12px",n.cursor="pointer",n.top="0px",n.left="0px"}return this.createCSS2DObject(i)}static tryFindObjectId(r){if(r.dataset.objectId!=null)return parseInt(r.dataset.objectId);let e=r.parentElement;if(e&&!(e instanceof HTMLBodyElement))return this.tryFindObjectId(e)}};var sT={unit:"file",decimalPrecision:99,camera:{near:.1,far:3e4},mouse:{sensitivity:3},keyboard:{sensitivity:3}};var tpe={"Precision from file":99,"0(1)":0,"0.1(1/2)":1,"0.01(1/4)":2,"0.001(1/8)":3,"0.0001(1/16)":4,"0.00001(1/32)":5,"0.000001(1/64)":6};var Wu=(t,r)=>t.toFixed(r===tpe["Precision from file"]?2:r);var aT=class{static isTouchScreenDevice(){return"ontouchstart"in window}static printDeviceInfo(){let r=navigator.userAgent,e=/(?:Android)/.test(r),i=/(?:Firefox)/.test(r),n=/(?:Chrome|CriOS)/.test(r),s=/(?:iPad|PlayBook)/.test(r)||e&&!/(?:Mobile)/.test(r)||i&&/(?:Tablet)/.test(r),a=/(?:iPhone)/.test(r)&&!s,o=!a&&!e,l=aT.isTouchScreenDevice();e&&ne.debug("[DI] is android"),i&&ne.debug("[DI] is fireFox"),n&&ne.debug("[DI] is chrome"),s&&ne.debug("[DI] is tablet"),a&&ne.debug("[DI] is iPhone"),o&&ne.debug("[DI] is PC"),l&&ne.debug("[DI] is touch device")}};var jo=class{constructor(){this.eventList=new Map}addEventListener(r,e){let i=this.eventList.get(r);i?i.push(e):this.eventList.set(r,[e])}dispatchEvent(r,e){let i=this.eventList.get(r);i&&i.forEach(n=>n(e))}removeEventListener(r,e){let i=this.eventList.get(r);if(i){let n=i.indexOf(e);n>-1&&i.splice(n,1)}}clearEventListeners(r){this.eventList.delete(r)}clearAllEventListener(){this.eventList.clear()}};var Zs=class{parse(r,e={}){if(e=Object.assign({decodeSpeed:5,encodeSpeed:5,encoderMethod:Zs.MESH_EDGEBREAKER_ENCODING,quantization:[16,8,8,8,8],exportUvs:!0,exportNormals:!0,exportColor:!1},e),DracoEncoderModule===void 0)throw new Error("THREE.DRACOExporter: required the draco_encoder to work.");let i=r.geometry,n=DracoEncoderModule(),s=new n.Encoder,a,o;if(r.isMesh===!0){a=new n.MeshBuilder,o=new n.Mesh;let d=i.getAttribute("position");a.AddFloatAttributeToMesh(o,n.POSITION,d.count,d.itemSize,d.array);let f=i.getIndex();if(f!==null)a.AddFacesToMesh(o,f.count/3,f.array);else{let m=new(d.count>65535?Uint32Array:Uint16Array)(d.count);for(let g=0;g4?a=t.array[n*t.itemSize+s]:(s===0?a=t.getX(n):s===1?a=t.getY(n):s===2?a=t.getZ(n):s===3&&(a=t.getW(n)),t.normalized===!0&&(a=wr.normalize(a,t.array))),i.min[s]=Math.min(i.min[s],a),i.max[s]=Math.max(i.max[s],a)}return i}function ope(t){return Math.ceil(t/4)*4}function tB(t,r=0){let e=ope(t.byteLength);if(e!==t.byteLength){let i=new Uint8Array(e);if(i.set(new Uint8Array(t)),r!==0)for(let n=t.byteLength;nt.toBlob(i,r));let e;return r==="image/jpeg"?e=.92:r==="image/webp"&&(e=.8),t.convertToBlob({type:r,quality:e})}var rB=class{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(r){this.plugins=r}write(n,s){return ot(this,arguments,function*(r,e,i={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},i),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(r),yield Promise.all(this.pending);let a=this,o=a.buffers,l=a.json;i=a.options;let c=a.extensionsUsed,u=new Blob(o,{type:"application/octet-stream"}),h=Object.keys(c);if(h.length>0&&(l.extensionsUsed=h),l.buffers&&l.buffers.length>0&&(l.buffers[0].byteLength=u.size),i.binary===!0){let p=new FileReader;p.readAsArrayBuffer(u),p.onloadend=function(){let d=tB(p.result),f=new DataView(new ArrayBuffer(npe));f.setUint32(0,d.byteLength,!0),f.setUint32(4,Hvt,!0);let m=tB(Uvt(JSON.stringify(l)),32),g=new DataView(new ArrayBuffer(npe));g.setUint32(0,m.byteLength,!0),g.setUint32(4,Fvt,!0);let y=new ArrayBuffer(ipe),E=new DataView(y);E.setUint32(0,Nvt,!0),E.setUint32(4,Lvt,!0);let b=ipe+g.byteLength+m.byteLength+f.byteLength+d.byteLength;E.setUint32(8,b,!0);let x=new Blob([y,g,m,f,d],{type:"application/octet-stream"}),S=new FileReader;S.readAsArrayBuffer(x),S.onloadend=function(){e(S.result)}}}else if(l.buffers&&l.buffers.length>0){let p=new FileReader;p.readAsDataURL(u),p.onloadend=function(){let d=p.result;l.buffers[0].uri=d,e(l)}}else e(l)})}serializeUserData(r,e){if(Object.keys(r.userData).length===0)return;let i=this.options,n=this.extensionsUsed;try{let s=JSON.parse(JSON.stringify(r.userData));if(i.includeCustomExtensions&&s.gltfExtensions){e.extensions===void 0&&(e.extensions={});for(let a in s.gltfExtensions)e.extensions[a]=s.gltfExtensions[a],n[a]=!0;delete s.gltfExtensions}Object.keys(s).length>0&&(e.extras=s)}catch(s){console.warn("THREE.GLTFExporter: userData of '"+r.name+"' won't be serialized because of JSON.stringify error - "+s.message)}}getUID(r,e=!1){if(this.uids.has(r)===!1){let n=new Map;n.set(!0,this.uid++),n.set(!1,this.uid++),this.uids.set(r,n)}return this.uids.get(r).get(e)}isNormalizedNormalAttribute(r){if(this.cache.attributesNormalized.has(r))return!1;let i=new A;for(let n=0,s=r.count;n5e-4)return!1;return!0}createNormalizedNormalAttribute(r){let e=this.cache;if(e.attributesNormalized.has(r))return e.attributesNormalized.get(r);let i=r.clone(),n=new A;for(let s=0,a=i.count;s4?m=r.array[d*r.itemSize+f]:(f===0?m=r.getX(d):f===1?m=r.getY(d):f===2?m=r.getZ(d):f===3&&(m=r.getW(d)),r.normalized===!0&&(m=wr.normalize(m,r.array))),e===nn.FLOAT?c.setFloat32(u,m,!0):e===nn.UNSIGNED_INT?c.setUint32(u,m,!0):e===nn.UNSIGNED_SHORT?c.setUint16(u,m,!0):e===nn.UNSIGNED_BYTE&&c.setUint8(u,m),u+=o}let h={buffer:this.processBuffer(c.buffer),byteOffset:this.byteOffset,byteLength:l};return s!==void 0&&(h.target=s),s===nn.ARRAY_BUFFER&&(h.byteStride=r.itemSize*o),this.byteOffset+=l,a.bufferViews.push(h),{id:a.bufferViews.length-1,byteLength:0}}processBufferViewImage(r){let e=this,i=e.json;return i.bufferViews||(i.bufferViews=[]),new Promise(function(n){let s=new FileReader;s.readAsArrayBuffer(r),s.onloadend=function(){let a=tB(s.result),o={buffer:e.processBuffer(a),byteOffset:e.byteOffset,byteLength:a.byteLength};e.byteOffset+=a.byteLength,n(i.bufferViews.push(o)-1)}})}processAccessor(r,e,i,n){let s=this.json,a={1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",16:"MAT4"},o;if(r.array.constructor===Float32Array)o=nn.FLOAT;else if(r.array.constructor===Uint32Array)o=nn.UNSIGNED_INT;else if(r.array.constructor===Uint16Array)o=nn.UNSIGNED_SHORT;else if(r.array.constructor===Uint8Array)o=nn.UNSIGNED_BYTE;else throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type.");if(i===void 0&&(i=0),n===void 0&&(n=r.count),n===0)return null;let l=kvt(r,i,n),c;e!==void 0&&(c=r===e.index?nn.ELEMENT_ARRAY_BUFFER:nn.ARRAY_BUFFER);let u=this.processBufferView(r,o,i,n,c),h={bufferView:u.id,byteOffset:u.byteOffset,componentType:o,count:n,max:l.max,min:l.min,type:a[r.itemSize]};return r.normalized===!0&&(h.normalized=!0),s.accessors||(s.accessors=[]),s.accessors.push(h)-1}processImage(r,e,i,n="image/png"){if(r!==null){let s=this,a=s.cache,o=s.json,l=s.options,c=s.pending;a.images.has(r)||a.images.set(r,{});let u=a.images.get(r),h=n+":flipY/"+i.toString();if(u[h]!==void 0)return u[h];o.images||(o.images=[]);let p={mimeType:n},d=spe();d.width=Math.min(r.width,l.maxTextureSize),d.height=Math.min(r.height,l.maxTextureSize);let f=d.getContext("2d");if(i===!0&&(f.translate(0,d.height),f.scale(1,-1)),r.data!==void 0){e!==Bs&&console.error("GLTFExporter: Only RGBAFormat is supported."),(r.width>l.maxTextureSize||r.height>l.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",r);let g=new Uint8ClampedArray(r.height*r.width*4);for(let y=0;ys.processBufferViewImage(g)).then(g=>{p.bufferView=g})):d.toDataURL!==void 0?p.uri=d.toDataURL(n):c.push(ape(d,n).then(g=>new FileReader().readAsDataURL(g)).then(g=>{p.uri=g}));let m=o.images.push(p)-1;return u[h]=m,m}else throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(r){let e=this.json;e.samplers||(e.samplers=[]);let i={magFilter:Wo[r.magFilter],minFilter:Wo[r.minFilter],wrapS:Wo[r.wrapS],wrapT:Wo[r.wrapT]};return e.samplers.push(i)-1}processTexture(r){let e=this.cache,i=this.json;if(e.textures.has(r))return e.textures.get(r);i.textures||(i.textures=[]);let n=r.userData.mimeType;n==="image/webp"&&(n="image/png");let s={sampler:this.processSampler(r),source:this.processImage(r.image,r.format,r.flipY,n)};r.name&&(s.name=r.name),this._invokeAll(function(o){o.writeTexture&&o.writeTexture(r,s)});let a=i.textures.push(s)-1;return e.textures.set(r,a),a}processMaterial(r){let e=this.cache,i=this.json;if(e.materials.has(r))return e.materials.get(r);if(r.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;i.materials||(i.materials=[]);let n={pbrMetallicRoughness:{}};r.isMeshStandardMaterial!==!0&&r.isMeshBasicMaterial!==!0&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");let s=r.color.toArray().concat([r.opacity]);if(Ox(s,[1,1,1,1])||(n.pbrMetallicRoughness.baseColorFactor=s),r.isMeshStandardMaterial?(n.pbrMetallicRoughness.metallicFactor=r.metalness,n.pbrMetallicRoughness.roughnessFactor=r.roughness):(n.pbrMetallicRoughness.metallicFactor=.5,n.pbrMetallicRoughness.roughnessFactor=.5),r.metalnessMap||r.roughnessMap){let o=this.buildMetalRoughTexture(r.metalnessMap,r.roughnessMap),l={index:this.processTexture(o)};this.applyTextureTransform(l,o),n.pbrMetallicRoughness.metallicRoughnessTexture=l}if(r.map){let o={index:this.processTexture(r.map)};this.applyTextureTransform(o,r.map),n.pbrMetallicRoughness.baseColorTexture=o}if(r.emissive){let o=r.emissive.clone().multiplyScalar(r.emissiveIntensity),l=Math.max(o.r,o.g,o.b);if(l>1&&(o.multiplyScalar(1/l),console.warn("THREE.GLTFExporter: Some emissive components exceed 1; emissive has been limited")),l>0&&(n.emissiveFactor=o.toArray()),r.emissiveMap){let c={index:this.processTexture(r.emissiveMap)};this.applyTextureTransform(c,r.emissiveMap),n.emissiveTexture=c}}if(r.normalMap){let o={index:this.processTexture(r.normalMap)};r.normalScale&&r.normalScale.x!==1&&(o.scale=r.normalScale.x),this.applyTextureTransform(o,r.normalMap),n.normalTexture=o}if(r.aoMap){let o={index:this.processTexture(r.aoMap),texCoord:1};r.aoMapIntensity!==1&&(o.strength=r.aoMapIntensity),this.applyTextureTransform(o,r.aoMap),n.occlusionTexture=o}r.transparent?n.alphaMode="BLEND":r.alphaTest>0&&(n.alphaMode="MASK",n.alphaCutoff=r.alphaTest),r.side===wi&&(n.doubleSided=!0),r.name!==""&&(n.name=r.name),this.serializeUserData(r,n),this._invokeAll(function(o){o.writeMaterial&&o.writeMaterial(r,n)});let a=i.materials.push(n)-1;return e.materials.set(r,a),a}processMesh(r){let e=this.cache,i=this.json,n=[r.geometry.uuid];if(Array.isArray(r.material))for(let b=0,x=r.material.length;b0){let b=[],x=[],S={};if(r.morphTargetDictionary!==void 0)for(let D in r.morphTargetDictionary)S[r.morphTargetDictionary[D]]=D;for(let D=0;D0&&(l.extras={},l.extras.targetNames=x)}let m=Array.isArray(r.material);if(m&&a.groups.length===0)return null;let g=m?r.material:[r.material],y=m?a.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let b=0,x=y.length;b0&&(S.targets=h),a.index!==null){let P=this.getUID(a.index);(y[b].start!==void 0||y[b].count!==void 0)&&(P+=":"+y[b].start+":"+y[b].count),e.attributes.has(P)?S.indices=e.attributes.get(P):(S.indices=this.processAccessor(a.index,a,y[b].start,y[b].count),e.attributes.set(P,S.indices)),S.indices===null&&delete S.indices}let D=this.processMaterial(g[y[b].materialIndex]);D!==null&&(S.material=D),u.push(S)}l.primitives=u,i.meshes||(i.meshes=[]),this._invokeAll(function(b){b.writeMesh&&b.writeMesh(r,l)});let E=i.meshes.push(l)-1;return e.meshes.set(s,E),E}processCamera(r){let e=this.json;e.cameras||(e.cameras=[]);let i=r.isOrthographicCamera,n={type:i?"orthographic":"perspective"};return i?n.orthographic={xmag:r.right*2,ymag:r.top*2,zfar:r.far<=0?.001:r.far,znear:r.near<0?0:r.near}:n.perspective={aspectRatio:r.aspect,yfov:wr.degToRad(r.fov),zfar:r.far<=0?.001:r.far,znear:r.near<0?0:r.near},r.name!==""&&(n.name=r.type),e.cameras.push(n)-1}processAnimation(r,e){let i=this.json,n=this.nodeMap;i.animations||(i.animations=[]),r=oT.Utils.mergeMorphTargetTracks(r.clone(),e);let s=r.tracks,a=[],o=[];for(let l=0;l0){let o=[];for(let l=0,c=r.children.length;l0&&(s.children=o)}this._invokeAll(function(o){o.writeNode&&o.writeNode(r,s)});let a=e.nodes.push(s)-1;return n.set(r,a),a}processScene(r){let e=this.json,i=this.options;e.scenes||(e.scenes=[],e.scene=0);let n={};r.name!==""&&(n.name=r.name),e.scenes.push(n);let s=[];for(let a=0,o=r.children.length;a0&&(n.nodes=s),this.serializeUserData(r,n)}processObjects(r){let e=new On;e.name="AuxScene";for(let i=0;i0&&this.processObjects(i);for(let n=0;n0&&(a.range=r.distance)):r.isSpotLight&&(a.type="spot",r.distance>0&&(a.range=r.distance),a.spot={},a.spot.innerConeAngle=(r.penumbra-1)*r.angle*-1,a.spot.outerConeAngle=r.angle),r.decay!==void 0&&r.decay!==2&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),r.target&&(r.target.parent!==r||r.target.position.x!==0||r.target.position.y!==0||r.target.position.z!==-1)&&console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),s[this.name]||(n.extensions=n.extensions||{},n.extensions[this.name]={lights:[]},s[this.name]=!0);let o=n.extensions[this.name].lights;o.push(a),e.extensions=e.extensions||{},e.extensions[this.name]={light:o.length-1}}},nB=class{constructor(r){this.writer=r,this.name="KHR_materials_unlit"}writeMaterial(r,e){if(!r.isMeshBasicMaterial)return;let n=this.writer.extensionsUsed;e.extensions=e.extensions||{},e.extensions[this.name]={},n[this.name]=!0,e.pbrMetallicRoughness.metallicFactor=0,e.pbrMetallicRoughness.roughnessFactor=.9}},sB=class{constructor(r){this.writer=r,this.name="KHR_materials_clearcoat"}writeMaterial(r,e){if(!r.isMeshPhysicalMaterial||r.clearcoat===0)return;let i=this.writer,n=i.extensionsUsed,s={};if(s.clearcoatFactor=r.clearcoat,r.clearcoatMap){let a={index:i.processTexture(r.clearcoatMap)};i.applyTextureTransform(a,r.clearcoatMap),s.clearcoatTexture=a}if(s.clearcoatRoughnessFactor=r.clearcoatRoughness,r.clearcoatRoughnessMap){let a={index:i.processTexture(r.clearcoatRoughnessMap)};i.applyTextureTransform(a,r.clearcoatRoughnessMap),s.clearcoatRoughnessTexture=a}if(r.clearcoatNormalMap){let a={index:i.processTexture(r.clearcoatNormalMap)};i.applyTextureTransform(a,r.clearcoatNormalMap),s.clearcoatNormalTexture=a}e.extensions=e.extensions||{},e.extensions[this.name]=s,n[this.name]=!0}},aB=class{constructor(r){this.writer=r,this.name="KHR_materials_iridescence"}writeMaterial(r,e){if(!r.isMeshPhysicalMaterial||r.iridescence===0)return;let i=this.writer,n=i.extensionsUsed,s={};if(s.iridescenceFactor=r.iridescence,r.iridescenceMap){let a={index:i.processTexture(r.iridescenceMap)};i.applyTextureTransform(a,r.iridescenceMap),s.iridescenceTexture=a}if(s.iridescenceIor=r.iridescenceIOR,s.iridescenceThicknessMinimum=r.iridescenceThicknessRange[0],s.iridescenceThicknessMaximum=r.iridescenceThicknessRange[1],r.iridescenceThicknessMap){let a={index:i.processTexture(r.iridescenceThicknessMap)};i.applyTextureTransform(a,r.iridescenceThicknessMap),s.iridescenceThicknessTexture=a}e.extensions=e.extensions||{},e.extensions[this.name]=s,n[this.name]=!0}},oB=class{constructor(r){this.writer=r,this.name="KHR_materials_transmission"}writeMaterial(r,e){if(!r.isMeshPhysicalMaterial||r.transmission===0)return;let i=this.writer,n=i.extensionsUsed,s={};if(s.transmissionFactor=r.transmission,r.transmissionMap){let a={index:i.processTexture(r.transmissionMap)};i.applyTextureTransform(a,r.transmissionMap),s.transmissionTexture=a}e.extensions=e.extensions||{},e.extensions[this.name]=s,n[this.name]=!0}},lB=class{constructor(r){this.writer=r,this.name="KHR_materials_volume"}writeMaterial(r,e){if(!r.isMeshPhysicalMaterial||r.transmission===0)return;let i=this.writer,n=i.extensionsUsed,s={};if(s.thicknessFactor=r.thickness,r.thicknessMap){let a={index:i.processTexture(r.thicknessMap)};i.applyTextureTransform(a,r.thicknessMap),s.thicknessTexture=a}s.attenuationDistance=r.attenuationDistance,s.attenuationColor=r.attenuationColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=s,n[this.name]=!0}},cB=class{constructor(r){this.writer=r,this.name="KHR_materials_ior"}writeMaterial(r,e){if(!r.isMeshPhysicalMaterial||r.ior===1.5)return;let n=this.writer.extensionsUsed,s={};s.ior=r.ior,e.extensions=e.extensions||{},e.extensions[this.name]=s,n[this.name]=!0}},uB=class{constructor(r){this.writer=r,this.name="KHR_materials_specular"}writeMaterial(r,e){if(!r.isMeshPhysicalMaterial||r.specularIntensity===1&&r.specularColor.equals(Pvt)&&!r.specularIntensityMap&&!r.specularColorTexture)return;let i=this.writer,n=i.extensionsUsed,s={};if(r.specularIntensityMap){let a={index:i.processTexture(r.specularIntensityMap)};i.applyTextureTransform(a,r.specularIntensityMap),s.specularTexture=a}if(r.specularColorMap){let a={index:i.processTexture(r.specularColorMap)};i.applyTextureTransform(a,r.specularColorMap),s.specularColorTexture=a}s.specularFactor=r.specularIntensity,s.specularColorFactor=r.specularColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=s,n[this.name]=!0}};oT.Utils={insertKeyframe:function(t,r){let i=t.getValueSize(),n=new t.TimeBufferType(t.times.length+1),s=new t.ValueBufferType(t.values.length+i),a=t.createInterpolant(new t.ValueBufferType(i)),o;if(t.times.length===0){n[0]=r;for(let l=0;lt.times[t.times.length-1]){if(Math.abs(t.times[t.times.length-1]-r)<.001)return t.times.length-1;n[n.length-1]=r,n.set(t.times,0),s.set(t.values,0),s.set(a.evaluate(r),t.values.length),o=n.length-1}else for(let l=0;lr){n.set(t.times.slice(0,l+1),0),n[l+1]=r,n.set(t.times.slice(l+1),l+2),s.set(t.values.slice(0,(l+1)*i),0),s.set(a.evaluate(r),(l+1)*i),s.set(t.values.slice((l+1)*i),(l+2)*i),o=l+1;break}}return t.times=n,t.values=s,o},mergeMorphTargetTracks:function(t,r){let e=[],i={},n=t.tracks;for(let s=0;s{if(i.binary){e=xn.addExtention(e,xn.EXTENSION_GLB);let o=a;xn.saveArrayBuffer(o,e)}else e=xn.addExtention(e,xn.EXTENSION_GLTF),xn.saveJson(a,e)},a=>console.log(a),i)}static exportToObj(r,e){if(!r||!e)throw new Error("Invalid input or filename!");e=xn.addExtention(e,xn.EXTENSION_OBJ);let n=new SC().parse(r);xn.saveString(n,e)}static exportToDraco(r,e,i={}){if(!r||!e)throw new Error("Invalid input or filename!");e=xn.addExtention(e,xn.EXTENSION_DRACO);let n=new Zs;i=Object.assign({},{encodeSpeed:5},i);let a=n.parse(r,i);xn.saveArrayBuffer(a,e)}static exportToThreeJsJson(r,e){let i=r.toJSON();e.toLowerCase().endsWith(xn.EXTENSION_JSON)||(e+=xn.EXTENSION_JSON),xn.saveJson(i,e)}static save(r,e){let i=xn.downloadLink;i||(i=document.createElement("a"),i.style.display="none",document.body.appendChild(i),xn.downloadLink=i),i.href=URL.createObjectURL(r),i.download=e,i.click()}static saveArrayBuffer(r,e){xn.save(new Blob([r],{type:"application/octet-stream"}),e)}static saveJson(r,e){xn.saveJsonString(JSON.stringify(r),e)}static saveJsonString(r,e){xn.save(new Blob([r],{type:"application/json"}),e)}static saveString(r,e){xn.save(new Blob([r],{type:"text/csv"}),e)}static addExtention(r,e){return r.toLowerCase().endsWith(e.toLowerCase())||(r+=e),r}},Gg=xn;Gg.EXTENSION_GLTF=".gltf",Gg.EXTENSION_GLB=".glb",Gg.EXTENSION_OBJ=".obj",Gg.EXTENSION_DRACO=".drc",Gg.EXTENSION_JSON=".json";var _C=class{constructor(){this.prevTime=(performance||Date).now();this.beginTime=(performance||Date).now();this.frames=0;this.fps=Number.NaN}begin(){this.beginTime=(performance||Date).now()}end(){this.frames++;let r=(performance||Date).now();return r>=this.prevTime+1e3&&(this.fps=Math.round(this.frames*1e3/(r-this.prevTime)),this.frames=0,this.prevTime=r),r}update(){this.beginTime=this.end()}};var hB=1e-15,lr=class{static roundNumber(r,e){return Math.round(r*Math.pow(10,e))/Math.pow(10,e)}static floorNumber(r,e){return Math.floor(r*Math.pow(10,e))/Math.pow(10,e)}static areNumbersEqual(r,e,i=1e-7){return Math.abs(r-e)t[0]===r[0]&&t[1]===r[1],fB=t=>Array.isArray(t)&&t.length,upe=(t,r=0,e=!1)=>{let i,n;if(fB(t)&&typeof t[0][0]=="number"){let s=0,a=t;for(i=0,n=a.length;i0||e&&s<0)&&a.reverse()}else for(i=0,n=t.length;i0);if(r===0&&fB(t)&&fB(t[0])&&typeof t[0][0][0]=="number"){let s=t[0].slice(0,1)[0];t[0].pop(),t[0].push([s[0],s[1]])}return t},wC=class{constructor(r,e=5){if(this.distance=0,this.arcSegments=e,!Px(r))throw new Error("Offset requires at least one coodinate to work with");this.edges=[],Px(r)&&typeof r[0]=="number"?this.vertices=r:(this.vertices=upe(r),this.processContour(this.vertices,this.edges))}processContour(r,e){let i,n;if(Px(r[0])&&typeof r[0][0]=="number")for(r=r,e=e,n=r.length,cpe(r[0],r[n-1])&&(n-=1),i=0;iu?c-u:c+l-u,p=(o?-h:l-h)/a;r.push(n);for(let d=1;d0?this.margin(this.distance):this.padding(-this.distance)}offsetSegment(r,e,i,n){let s=[i.offset(i.inNormal[0]*n,i.inNormal[1]*n),i.inverseOffset(i.outNormal[0]*n,i.outNormal[1]*n)],a=[];for(let o=0,l=2;o0&&i.push(a)}i.length>0&&(e=i.length===1?i[0]:(0,Vg.union)(i[0],...i.slice(1)))}else e=this.vertices.length===1?this.offsetPoint(r):this.offsetContour(this.vertices,this.edges);return e}offsetContour(r,e){let i=[],n=0,s=0;if(Px(r[0])&&typeof r[0][0]=="number"){for(n=0,s=r.length-1;n0&&(i=i.length===1?[i[0]]:(0,Vg.union)(i[0],i.slice(1)))}else{let a=[];for(n=0,s=e.length;n0&&a.push(o)}a.length>0&&(i=a.length===1?a[0]:(0,Vg.union)(a[0],...a.slice(1)))}return i}offsetPoint(r){this.setDistance(r);let e=this.arcSegments*2,i=[],n=this.vertices,s=this.distance,a=0;e%2===0&&e++;for(let o=0;o{let i=r.attributes[e];if(i instanceof to){let n=i.clone();r.attributes[e]=n}})}static isPointInPolygon(r,e,i=!1){let n=r.x,s=r.y,a=!1,o=e.length;for(let l=0,c=o-1;ls!=d>s;i&&(f=h>=s!=d>=s),f&&n<(p-u)*(s-h)/(d-h)+u&&(a=!a)}return a}static caculateGeometryCenter(r){if(!r.hasAttribute("position"))return null;let e=r.getAttribute("position");if(e.count===0)return null;let i=new A,n=e.itemSize,s=e.array,a=[0,0,0];for(let o=0;o0&&i<0||n<0&&i>0)return!1;i=n}}return!0}static areLineSegmentsIntersecting(r,e){let{start:i,end:n}=r,{start:s,end:a}=e,o=s.clone().sub(i),l=n.clone().sub(i),c=a.clone().sub(i),u=o.cross(l).dot(c.cross(l)),h=i.clone().sub(s),p=a.clone().sub(s),d=n.clone().sub(s),f=h.cross(p).dot(d.cross(p));return u<0&&f<0}static getLineSegmentsIntersectingPoint(r,e){let{start:i,end:n}=r,{start:s,end:a}=e,o=dpe.subVectors(n,i).normalize(),l=fpe.subVectors(a,s).normalize();if(o.dot(l)===1)return null;let c=mpe.subVectors(s,i),u=o.clone().cross(l),h=c.clone().cross(l),p=c.clone().dot(u);if(p>=1e-5||p<=-1e-5)return null;let d=u.lengthSq();if(lr.areNumbersEqual(0,d))return;let f=h.clone().dot(u)/d,m=i.clone().add(o.multiplyScalar(f));return m.equals(i)||m.equals(n)?null:m}static isPointOnLineSegment(r,e,i=.001){let{start:n,end:s}=e,a=dpe.subVectors(n,s).length(),o=fpe.subVectors(r,n).length(),l=mpe.subVectors(r,s).length();return Math.abs(a-(o+l))<=i}static isPointOnLineSegments(r,e,i=.001){let n=!1;for(let s=0;s{i?e.add(s):(e.x+=s.x,e.y+=s.y)}),e.divideScalar(r.length);let n=!1;if(Wt.shouldRebasePositionOnRTC(e)){n=!0;for(let s=0;smB||Math.abs(r.y)>mB||r instanceof A&&Math.abs(r.z)>mB}static calculateSurfaceArea(r){let e=0,i=r.getAttribute("position"),n=r.index;if(n)for(let s=0;s2&&(a=e?s*2:s*2-2);let o=new n(a),l=0;for(let c=0;c0&&c{let f=r.geometry.attributes.position.array;return r.localToWorld(new A(f[3*p],f[3*p+1],f[3*p+2]))};r.updateWorldMatrix(!0,!1);let n=((c=r.geometry.getIndex())==null?void 0:c.array)||[],s=(u=n[e])!=null?u:e,a=(h=n[e+1])!=null?h:e+1,o=i(s),l=i(a);return[o,l]}static arePolygonsIntersect(r,e){if(r.length===0||e.length===0||(hpe.setFromPoints(r),ppe.setFromPoints(e),!hpe.intersectsBox(ppe)))return!1;for(let i=0;i1-s)return;let l=e.y-r.y,c=r.x-e.x,u=l*r.x+c*r.y,h=n.y-i.y,p=i.x-n.x,d=h*i.x+p*i.y,f=l*p-h*c;if(Math.abs(f){i.push([u.x,u.y])});let n;try{n=new wC(i).setArcSegments(2).offsetLine(e/2)}catch(u){return}if(!n||n.length===0)return;n=n[0];let s=[],a=[];for(let u=0;u{s.push(new le(h[0],h[1]))}),es.isClockWise(s)||s.reverse();else{let h=[];n[u].forEach(p=>{h.push(new le(p[0],p[1]))}),es.isClockWise(h)&&h.reverse(),a.push(h)}let o=es.triangulateShape(s,a),l=[];for(let u=0;us.push(...u));let c=new it().setFromPoints(s);return c.setIndex(l),c}static releaseGeometryManually(r){r.index=null,r.attributes={}}static getAdjacentNonRepeatPoints(r,e=1e-7){let i=[],n=r.length;for(let s=0;s(i.ObjectsBoxSection="ObjectsBoxSection",i.PickPlaneSection="PickPlaneSection",i.AxisPlaneSection="AxisPlaneSection",i))(zg||{});var Ks=class{static createGroundGrid(r,e,i){r=r||this.DEFAULT_WIDTH,e=e||this.DEFAULT_WIDTH_SEGS;let n=new Tx(r,e);i?n.position.set(i.x,i.y,i.z):n.position.y=0;let s=n.material;return Array.isArray(s)||(s.opacity=this.DEFAULT_MAT_PARAMS.opacity,s.transparent=this.DEFAULT_MAT_PARAMS.transparent),n.name=this.GROUND_GRID_NAME,n.layers.set(11),n.matrixAutoUpdate=!1,n.updateMatrix(),n}static createGrassGround(r,e,i,n,s){return ot(this,null,function*(){return e=e||this.DEFAULT_WIDTH,i=i||this.DEFAULT_HEIGHT,new Promise(a=>{new Es().load(r||"images/terrain/grass.jpg",l=>{l.wrapS=l.wrapT=gn,l.repeat.set(n||this.DEFAULT_WIDTH_SEGS/5,s||this.DEFAULT_HEIGHT_SETS/5),l.anisotropy=16,l.encoding=yr;let c=new io({map:l});c.side=en;let u=new Je(new ts(e,i),c);return u.rotation.x=-Math.PI/2,u.position.y=0,u.receiveShadow=!0,u.name=this.GRASS_GROUND_NAME,u.layers.set(11),u.matrixAutoUpdate=!1,u.updateMatrix(),a(u)})})})}};Ks.GROUND_GRID_NAME="GROUND_GRID",Ks.GRASS_GROUND_NAME="GRASS_GROUND",Ks.DEFAULT_WIDTH=1e3,Ks.DEFAULT_HEIGHT=1e3,Ks.DEFAULT_WIDTH_SEGS=100,Ks.DEFAULT_HEIGHT_SETS=100,Ks.DEFAULT_MAT_PARAMS={color:12829635,transparent:!0,opacity:.5,wireframeLinewidth:.5};var gpe={NavCube:{front:"Front",back:"Back",top:"Top",bottom:"Bottom",left:"Left",right:"Right"},ContextMenu:{viewFitAll:"View Fit All",hideAll:"Hide All",showAll:"Show All",xRayAll:"X-Ray",xRayNone:"X-Ray None",selectNone:"Select None",resetView:"Reset View",viewFitEntity:"View Fit",hideEntity:"Hide",hideOthers:"Hide Others",xRayEntity:"X-Ray",xRayOthers:"X-Ray Others",select:"Select",deselect:"Undo Select",showSectionPlane:"Show Section Plane",showSectionBox:"Show Section Box",showAxisSection:"Show Axis Section",hideSectionPlane:"Hide Section Plane",hideSectionBox:"Hide Section Box",hideAxisSection:"Hide Axis Section",undoSection:"Undo Section"},ProgressBar:{Loading:"Loading",Comparing:"Comparing"},Toolbar:{homeView:"Home",orthoView:"Ortho View",measurement:"Measure",distanceMeasurement:"Distance",areaMeasurement:"Area",angleMeasurement:"Angle",coordinateMeasurement:"Coordinate",clearMeasurement:"Clear",markup:"Markup",markupArrow:"Arrow",markupRect:"Rect",markupCloudRect:"CloudRect",markupPolyLine:"PolyLine",markupCloudLine:"CloudLine",markupEllipse:"Ellipse",markupCircle:"Circle",markupDot:"Dot",markupText:"Text",markupX:"X",markupStroke:"Stroke Style",markupLineWidth:"Line Width",markupLineWidth2:"Line Width 2",markupLineWidth5:"Line Width 5",markupLineWidth10:"Line Width 10",markupFontSize:"Font Size",markupFontSize14:"14",markupFontSize18:"18",markupFontSize24:"24",clearMarkup:"Clear Markup",quitMarkup:"Quit markup",section:"Section",axisSection:"Axis Section",pickSectionPlane:"Pick Section Plane",sectionBox:"Section Box",bimTree:"BIM Tree",viewpoint:"Viewpoint",annotation:"Annotation",property:"Property",settings:"Settings",compared:"Compared",quitCompare:"Quit compare",fullscreen:"Full Screen",layers:"Layers",zoomToRectangle:"Zoom",screenshot:"Screenshot"},Tooltip:{measure:"Pick a point to continue, pressing ESC to exit",areaMeasurement:"Pick a point to continue, pressing ESC to exit, right click to finish",section:"Click to pick a section plane",boxSelect:"Box select an area"},PopPanel:{reset:"Reset"}},vpe={NavCube:{front:"\u524D",back:"\u540E",top:"\u4E0A",bottom:"\u4E0B",left:"\u5DE6",right:"\u53F3"},ContextMenu:{viewFitAll:"\u7F29\u653E\u89C6\u53E3\u5230\u6240\u6709\u6A21\u578B",hideAll:"\u5168\u90E8\u9690\u85CF",showAll:"\u5168\u90E8\u663E\u793A",xRayAll:"\u5168\u90E8\u5E94\u7528 X \u5149\u6A21\u5F0F",xRayNone:"\u6E05\u9664 X \u5149\u6A21\u5F0F",selectNone:"\u6E05\u7A7A\u9009\u62E9",resetView:"\u91CD\u7F6E\u89C6\u56FE",viewFitEntity:"\u7F29\u653E\u89C6\u53E3\u5230\u5B9E\u4F53",hideEntity:"\u9690\u85CF",hideOthers:"\u9690\u85CF\u5176\u4ED6 (\u9694\u79BB)",xRayEntity:"\u5E94\u7528 X \u5149\u6A21\u5F0F",xRayOthers:"\u5BF9\u5176\u4ED6\u5B9E\u4F53\u5E94\u7528 X \u5149\u6A21\u5F0F",select:"\u9009\u62E9",deselect:"\u53D6\u6D88\u9009\u62E9",showSectionPlane:"\u663E\u793A\u5256\u5207\u9762",showSectionBox:"\u663E\u793A\u5256\u5207\u76D2",showAxisSection:"\u663E\u793A\u8F74\u5411\u5256\u5207",hideSectionPlane:"\u9690\u85CF\u5256\u5207\u9762",hideSectionBox:"\u9690\u85CF\u5256\u5207\u76D2",hideAxisSection:"\u9690\u85CF\u8F74\u5411\u5256\u5207",undoSection:"\u53D6\u6D88\u5256\u5207"},ProgressBar:{Loading:"\u6B63\u5728\u52A0\u8F7D",Comparing:"\u6B63\u5728\u5BF9\u6BD4"},Toolbar:{homeView:"\u4E3B\u89C6\u56FE",orthoView:"\u6B63\u4EA4\u89C6\u56FE",measurement:"\u6D4B\u91CF",distanceMeasurement:"\u8DDD\u79BB\u6D4B\u91CF",areaMeasurement:"\u9762\u79EF\u6D4B\u91CF",angleMeasurement:"\u89D2\u5EA6\u6D4B\u91CF",coordinateMeasurement:"\u5750\u6807\u6D4B\u91CF",clearMeasurement:"\u6E05\u9664\u6D4B\u91CF",markup:"\u6279\u6CE8",markupArrow:"\u7BAD\u5934",markupRect:"\u77E9\u5F62\u6846",markupCloudRect:"\u4E91\u7EBF\u6846",markupPolyLine:"\u591A\u6BB5\u7EBF",markupCloudLine:"\u4E91\u7EBF",markupEllipse:"\u692D\u5706",markupCircle:"\u5706",markupDot:"\u70B9",markupText:"\u6587\u5B57",markupX:"\u53C9\u53F7",markupStroke:"\u753B\u7B14\u989C\u8272",markupLineWidth:"\u7EBF\u5BBD",markupLineWidth2:"\u7EBF\u5BBD 2",markupLineWidth5:"\u7EBF\u5BBD 5",markupLineWidth10:"\u7EBF\u5BBD 10",markupFontSize:"\u5B57\u53F7",markupFontSize14:"14",markupFontSize18:"18",markupFontSize24:"24",clearMarkup:"\u6E05\u9664\u6279\u6CE8",quitMarkup:"\u9000\u51FA\u6279\u6CE8",section:"\u5256\u5207",axisSection:"\u8F74\u5411\u5256\u5207",pickSectionPlane:"\u9762\u5256\u5207",sectionBox:"\u5256\u5207\u76D2",bimTree:"BIM\u6811",viewpoint:"\u89C6\u70B9",annotation:"\u6279\u6CE8",property:"\u5C5E\u6027",settings:"\u8BBE\u7F6E",compared:"\u56FE\u7EB8\u5BF9\u6BD4",quitCompare:"\u9000\u51FA\u56FE\u7EB8\u5BF9\u6BD4",fullscreen:"\u5168\u5C4F",layers:"\u56FE\u5C42",zoomToRectangle:"\u6846\u9009\u653E\u5927",screenshot:"\u622A\u5C4F"},Tooltip:{measure:"\u70B9\u51FB\u7EE7\u7EED\u6D4B\u91CF, ESC \u53D6\u6D88\u6D4B\u91CF",areaMeasurement:"\u70B9\u51FB\u7EE7\u7EED\u6D4B\u91CF, ESC \u53D6\u6D88\u6D4B\u91CF\uFF0C\u53F3\u952E\u5B8C\u6210\u6D4B\u91CF",section:"\u70B9\u51FB\u786E\u5B9A\u5256\u5207\u9762",boxSelect:"\u6846\u9009\u4E00\u4E2A\u533A\u57DF"},PopPanel:{reset:"\u91CD\u7F6E"}};var Cs=class{static materialEquals(r,e){if(r===e)return!0;if(r.type!==e.type)return!1;if(r instanceof Gr&&e instanceof Gr){let i=r,n=e;return r.alphaTest===e.alphaTest&&r.opacity===e.opacity&&r.side===e.side&&r.visible===e.visible&&r.name===e.name&&r.transparent===e.transparent&&this.colorEquals(i.color,n.color)&&this.colorEquals(i.emissive,n.emissive)&&i.roughness===n.roughness&&i.metalness===n.metalness&&i.alphaMap===n.alphaMap&&i.uniforms===n.uniforms&&i.defines===n.defines&&i.vertexShader===n.vertexShader&&i.fragmentShader===n.fragmentShader&&i.clippingPlanes===n.clippingPlanes&&i.map===n.map&&i.clipIntersection===n.clipIntersection}return!1}static materialsEquals(r,e){if(r===e)return!0;if(Array.isArray(r)&&Array.isArray(e)&&r.length===e.length){for(let i=0;i0){let n=[];return i.forEach(s=>{n.push(this.clonedHighlightMaterial(s,e))}),n}else{if(i instanceof Gr)return this.clonedHighlightMaterial(i,e);console.warn(`[MaterialUtils] Invalid material: ${i}`)}}static clonedHighlightMaterial(r,e={}){var o;let{depthTest:i=void 0,highlightColor:n=new Ve(583902),opacity:s=.7}=e,a=r.clone();return a instanceof Gu||a instanceof Ts?(a.emissive.set(n),a.color.set(n)):a instanceof or||a instanceof io||a instanceof Tr||a instanceof Rp?a.color.set(n):a instanceof Yt?(o=a.uniforms.u_color)==null||o.value.set(n):a instanceof Tg?a.color.set(n):console.warn("[MaterialUtils] Unsupported Material:",a.type),a.opacity=s,a.transparent=!0,i!==void 0&&(a.depthTest=!1,a.side=wi),a}static cloneMaterial(r){if(!r)return r;if(Array.isArray(r)){let e=[];return r.forEach(i=>{e.push(i.clone())}),e}return r.clone()}static getMaterialColor(r){let e=new Ve(16777215);return r instanceof Vn||r instanceof Tr||r instanceof or?e=r.color:r instanceof Yt&&r.uniforms.u_color&&(e=r.uniforms.u_color.value),e}static setMaterialColor(r,e){r instanceof Vn||r instanceof Tr||r instanceof or?r.color=e:r instanceof Yt&&r.uniforms.u_color&&(r.uniforms.u_color.value=e)}static cloneMaterials(r){let e=new Map,i=n=>{let s;return Array.isArray(n)?(s=[],n.forEach(a=>{if(e.has(a))s.push(e.get(a));else{let o=a.clone();e.set(a,o),s.push(o)}})):n&&(e.has(n)?s=e.get(n):(s=n.clone(),e.set(n,s))),s};r.traverse(n=>{n.material&&(n.material=i(n.material))})}};function qo(t,r=!1){let e=t[0].index!==null,i=new Set(Object.keys(t[0].attributes)),n=new Set(Object.keys(t[0].morphAttributes)),s={},a={},o=t[0].morphTargetsRelative,l=new it,c=0;for(let u=0;ut in r?Sc(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Zi=(r,t)=>{for(var e in t||(t={}))Ec.call(t,e)&&Eo(r,e,t[e]);if(Ao)for(var e of Ao(t))Cc.call(t,e)&&Eo(r,e,t[e]);return r},Co=(r,t)=>Tc(r,Ac(t));var ro="149";var Pc=0,Po=1,Rc=2;var Wa=1,Lc=2,Ni=3,Ue=0,he=1,We=2;var pn=0,ri=1,Ro=2,Lo=3,Io=4,Ic=5,ni=100,Dc=101,Nc=102,Do=103,No=104,Fc=200,zc=201,Oc=202,Bc=203,qa=204,Xa=205,Uc=206,kc=207,Vc=208,Gc=209,Hc=210,Wc=0,qc=1,Xc=2,Er=3,Yc=4,Zc=5,Jc=6,$c=7,Ya=0,Kc=1,jc=2,nn=0,Qc=1,tl=2,el=3,nl=4,il=5,Za=300,ci=301,li=302,Cr=303,Pr=304,Ls=306,Rr=1e3,Oe=1001,Lr=1002,ce=1003,Fo=1004;var Zs=1005;var Re=1006,sl=1007;var Oi=1008;var Dn=1009,rl=1010,ol=1011,Ja=1012,al=1013,Pn=1014,Rn=1015,Bi=1016,cl=1017,ll=1018,oi=1020,hl=1021,Be=1023,ul=1024,fl=1025,Ln=1026,hi=1027,dl=1028,pl=1029,ml=1030,gl=1031,xl=1033,Js=33776,$s=33777,Ks=33778,js=33779,zo=35840,Oo=35841,Bo=35842,Uo=35843,_l=36196,ko=37492,Vo=37496,Go=37808,Ho=37809,Wo=37810,qo=37811,Xo=37812,Yo=37813,Zo=37814,Jo=37815,$o=37816,Ko=37817,jo=37818,Qo=37819,ta=37820,ea=37821,Qs=36492,yl=36283,na=36284,ia=36285,sa=36286;var xs=2300,_s=2301,tr=2302,ra=2400,oa=2401,aa=2402;var Nn=3e3,Ot=3001,vl=3200,Ml=3201,bl=0,wl=1;var Ge="srgb",Ui="srgb-linear";var er=7680;var Sl=519,ca=35044;var la="300 es",Ir=1035,mn=class{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[t]===void 0&&(n[t]=[]),n[t].indexOf(e)===-1&&n[t].push(e)}hasEventListener(t,e){if(this._listeners===void 0)return!1;let n=this._listeners;return n[t]!==void 0&&n[t].indexOf(e)!==-1}removeEventListener(t,e){if(this._listeners===void 0)return;let i=this._listeners[t];if(i!==void 0){let s=i.indexOf(e);s!==-1&&i.splice(s,1)}}dispatchEvent(t){if(this._listeners===void 0)return;let n=this._listeners[t.type];if(n!==void 0){t.target=this;let i=n.slice(0);for(let s=0,a=i.length;s>8&255]+ne[r>>16&255]+ne[r>>24&255]+"-"+ne[t&255]+ne[t>>8&255]+"-"+ne[t>>16&15|64]+ne[t>>24&255]+"-"+ne[e&63|128]+ne[e>>8&255]+"-"+ne[e>>16&255]+ne[e>>24&255]+ne[n&255]+ne[n>>8&255]+ne[n>>16&255]+ne[n>>24&255]).toLowerCase()}function de(r,t,e){return Math.max(t,Math.min(e,r))}function Tl(r,t){return(r%t+t)%t}function ir(r,t,e){return(1-e)*r+e*t}function ua(r){return(r&r-1)===0&&r!==0}function Dr(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}function Ji(r,t){switch(t.constructor){case Float32Array:return r;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function Me(r,t){switch(t.constructor){case Float32Array:return r;case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}var At=class{constructor(t=0,e=0){At.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){let n=Math.cos(e),i=Math.sin(e),s=this.x-t.x,a=this.y-t.y;return this.x=s*n-a*i+t.x,this.y=s*i+a*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},le=class{constructor(){le.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(t,e,n,i,s,a,o,c,l){let h=this.elements;return h[0]=t,h[1]=i,h[2]=o,h[3]=e,h[4]=s,h[5]=c,h[6]=n,h[7]=a,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,a=n[0],o=n[3],c=n[6],l=n[1],h=n[4],f=n[7],u=n[2],m=n[5],x=n[8],p=i[0],d=i[3],g=i[6],M=i[1],_=i[4],v=i[7],b=i[2],A=i[5],C=i[8];return s[0]=a*p+o*M+c*b,s[3]=a*d+o*_+c*A,s[6]=a*g+o*v+c*C,s[1]=l*p+h*M+f*b,s[4]=l*d+h*_+f*A,s[7]=l*g+h*v+f*C,s[2]=u*p+m*M+x*b,s[5]=u*d+m*_+x*A,s[8]=u*g+m*v+x*C,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],a=t[4],o=t[5],c=t[6],l=t[7],h=t[8];return e*a*h-e*o*l-n*s*h+n*o*c+i*s*l-i*a*c}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],a=t[4],o=t[5],c=t[6],l=t[7],h=t[8],f=h*a-o*l,u=o*c-h*s,m=l*s-a*c,x=e*f+n*u+i*m;if(x===0)return this.set(0,0,0,0,0,0,0,0,0);let p=1/x;return t[0]=f*p,t[1]=(i*l-h*n)*p,t[2]=(o*n-i*a)*p,t[3]=u*p,t[4]=(h*e-i*c)*p,t[5]=(i*s-o*e)*p,t[6]=m*p,t[7]=(n*c-l*e)*p,t[8]=(a*e-n*s)*p,this}transpose(){let t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,s,a,o){let c=Math.cos(s),l=Math.sin(s);return this.set(n*c,n*l,-n*(c*a+l*o)+a+t,-i*l,i*c,-i*(-l*a+c*o)+o+e,0,0,1),this}scale(t,e){return this.premultiply(sr.makeScale(t,e)),this}rotate(t){return this.premultiply(sr.makeRotation(-t)),this}translate(t,e){return this.premultiply(sr.makeTranslation(t,e)),this}makeTranslation(t,e){return this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<9;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return new this.constructor().fromArray(this.elements)}},sr=new le;function $a(r){for(let t=r.length-1;t>=0;--t)if(r[t]>=65535)return!0;return!1}function ys(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function In(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function gs(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}var rr={[Ge]:{[Ui]:In},[Ui]:{[Ge]:gs}},oe={legacyMode:!0,get workingColorSpace(){return Ui},set workingColorSpace(r){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(r,t,e){if(this.legacyMode||t===e||!t||!e)return r;if(rr[t]&&rr[t][e]!==void 0){let n=rr[t][e];return r.r=n(r.r),r.g=n(r.g),r.b=n(r.b),r}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(r,t){return this.convert(r,this.workingColorSpace,t)},toWorkingColorSpace:function(r,t){return this.convert(r,t,this.workingColorSpace)}},Ka={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},qt={r:0,g:0,b:0},Ne={h:0,s:0,l:0},$i={h:0,s:0,l:0};function or(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*6*(2/3-e):r}function Ki(r,t){return t.r=r.r,t.g=r.g,t.b=r.b,t}var Bt=class{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,e===void 0&&n===void 0?this.set(t):this.setRGB(t,e,n)}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Ge){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,oe.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=oe.workingColorSpace){return this.r=t,this.g=e,this.b=n,oe.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=oe.workingColorSpace){if(t=Tl(t,1),e=de(e,0,1),n=de(n,0,1),e===0)this.r=this.g=this.b=n;else{let s=n<=.5?n*(1+e):n+e-n*e,a=2*n-s;this.r=or(a,s,t+1/3),this.g=or(a,s,t),this.b=or(a,s,t-1/3)}return oe.toWorkingColorSpace(this,i),this}setStyle(t,e=Ge){function n(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^((?:rgb|hsl)a?)\\(([^\\)]*)\\)/.exec(t)){let s,a=i[1],o=i[2];switch(a){case"rgb":case"rgba":if(s=/^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(s[1],10))/255,this.g=Math.min(255,parseInt(s[2],10))/255,this.b=Math.min(255,parseInt(s[3],10))/255,oe.toWorkingColorSpace(this,e),n(s[4]),this;if(s=/^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(s[1],10))/100,this.g=Math.min(100,parseInt(s[2],10))/100,this.b=Math.min(100,parseInt(s[3],10))/100,oe.toWorkingColorSpace(this,e),n(s[4]),this;break;case"hsl":case"hsla":if(s=/^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(o)){let c=parseFloat(s[1])/360,l=parseFloat(s[2])/100,h=parseFloat(s[3])/100;return n(s[4]),this.setHSL(c,l,h,e)}break}}else if(i=/^\\#([A-Fa-f\\d]+)$/.exec(t)){let s=i[1],a=s.length;if(a===3)return this.r=parseInt(s.charAt(0)+s.charAt(0),16)/255,this.g=parseInt(s.charAt(1)+s.charAt(1),16)/255,this.b=parseInt(s.charAt(2)+s.charAt(2),16)/255,oe.toWorkingColorSpace(this,e),this;if(a===6)return this.r=parseInt(s.charAt(0)+s.charAt(1),16)/255,this.g=parseInt(s.charAt(2)+s.charAt(3),16)/255,this.b=parseInt(s.charAt(4)+s.charAt(5),16)/255,oe.toWorkingColorSpace(this,e),this}return t&&t.length>0?this.setColorName(t,e):this}setColorName(t,e=Ge){let n=Ka[t.toLowerCase()];return n!==void 0?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=In(t.r),this.g=In(t.g),this.b=In(t.b),this}copyLinearToSRGB(t){return this.r=gs(t.r),this.g=gs(t.g),this.b=gs(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Ge){return oe.fromWorkingColorSpace(Ki(this,qt),t),de(qt.r*255,0,255)<<16^de(qt.g*255,0,255)<<8^de(qt.b*255,0,255)<<0}getHexString(t=Ge){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=oe.workingColorSpace){oe.fromWorkingColorSpace(Ki(this,qt),e);let n=qt.r,i=qt.g,s=qt.b,a=Math.max(n,i,s),o=Math.min(n,i,s),c,l,h=(o+a)/2;if(o===a)c=0,l=0;else{let f=a-o;switch(l=h<=.5?f/(a+o):f/(2-a-o),a){case n:c=(i-s)/f+(i2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement!="undefined"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&t instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&t instanceof ImageBitmap){let e=ys("canvas");e.width=t.width,e.height=t.height;let n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);let i=n.getImageData(0,0,t.width,t.height),s=i.data;for(let a=0;a0&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==Za)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Rr:t.x=t.x-Math.floor(t.x);break;case Oe:t.x=t.x<0?0:1;break;case Lr:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Rr:t.y=t.y-Math.floor(t.y);break;case Oe:t.y=t.y<0?0:1;break;case Lr:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}};ue.DEFAULT_IMAGE=null;ue.DEFAULT_MAPPING=Za;ue.DEFAULT_ANISOTROPY=1;var Xt=class{constructor(t=0,e=0,n=0,i=1){Xt.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=this.w,a=t.elements;return this.x=a[0]*e+a[4]*n+a[8]*i+a[12]*s,this.y=a[1]*e+a[5]*n+a[9]*i+a[13]*s,this.z=a[2]*e+a[6]*n+a[10]*i+a[14]*s,this.w=a[3]*e+a[7]*n+a[11]*i+a[15]*s,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,s,c=t.elements,l=c[0],h=c[4],f=c[8],u=c[1],m=c[5],x=c[9],p=c[2],d=c[6],g=c[10];if(Math.abs(h-u)<.01&&Math.abs(f-p)<.01&&Math.abs(x-d)<.01){if(Math.abs(h+u)<.1&&Math.abs(f+p)<.1&&Math.abs(x+d)<.1&&Math.abs(l+m+g-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let _=(l+1)/2,v=(m+1)/2,b=(g+1)/2,A=(h+u)/4,C=(f+p)/4,y=(x+d)/4;return _>v&&_>b?_<.01?(n=0,i=.707106781,s=.707106781):(n=Math.sqrt(_),i=A/n,s=C/n):v>b?v<.01?(n=.707106781,i=0,s=.707106781):(i=Math.sqrt(v),n=A/i,s=y/i):b<.01?(n=.707106781,i=.707106781,s=0):(s=Math.sqrt(b),n=C/s,i=y/s),this.set(n,i,s,e),this}let M=Math.sqrt((d-x)*(d-x)+(f-p)*(f-p)+(u-h)*(u-h));return Math.abs(M)<.001&&(M=1),this.x=(d-x)/M,this.y=(f-p)/M,this.z=(u-h)/M,this.w=Math.acos((l+m+g-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},rn=class extends mn{constructor(t=1,e=1,n={}){super(),this.isWebGLRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new Xt(0,0,t,e),this.scissorTest=!1,this.viewport=new Xt(0,0,t,e);let i={width:t,height:e,depth:1};this.texture=new ue(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.internalFormat=n.internalFormat!==void 0?n.internalFormat:null,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Re,this.depthBuffer=n.depthBuffer!==void 0?n.depthBuffer:!0,this.stencilBuffer=n.stencilBuffer!==void 0?n.stencilBuffer:!1,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null,this.samples=n.samples!==void 0?n.samples:0}setSize(t,e,n=1){(this.width!==t||this.height!==e||this.depth!==n)&&(this.width=t,this.height=e,this.depth=n,this.texture.image.width=t,this.texture.image.height=e,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.isRenderTargetTexture=!0;let e=Object.assign({},t.texture.image);return this.texture.source=new Ms(e),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},bs=class extends ue{constructor(t=null,e=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=ce,this.minFilter=ce,this.wrapR=Oe,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Nr=class extends ue{constructor(t=null,e=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=ce,this.minFilter=ce,this.wrapR=Oe,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var gn=class{constructor(t=0,e=0,n=0,i=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,s,a,o){let c=n[i+0],l=n[i+1],h=n[i+2],f=n[i+3],u=s[a+0],m=s[a+1],x=s[a+2],p=s[a+3];if(o===0){t[e+0]=c,t[e+1]=l,t[e+2]=h,t[e+3]=f;return}if(o===1){t[e+0]=u,t[e+1]=m,t[e+2]=x,t[e+3]=p;return}if(f!==p||c!==u||l!==m||h!==x){let d=1-o,g=c*u+l*m+h*x+f*p,M=g>=0?1:-1,_=1-g*g;if(_>Number.EPSILON){let b=Math.sqrt(_),A=Math.atan2(b,g*M);d=Math.sin(d*A)/b,o=Math.sin(o*A)/b}let v=o*M;if(c=c*d+u*v,l=l*d+m*v,h=h*d+x*v,f=f*d+p*v,d===1-o){let b=1/Math.sqrt(c*c+l*l+h*h+f*f);c*=b,l*=b,h*=b,f*=b}}t[e]=c,t[e+1]=l,t[e+2]=h,t[e+3]=f}static multiplyQuaternionsFlat(t,e,n,i,s,a){let o=n[i],c=n[i+1],l=n[i+2],h=n[i+3],f=s[a],u=s[a+1],m=s[a+2],x=s[a+3];return t[e]=o*x+h*f+c*m-l*u,t[e+1]=c*x+h*u+l*f-o*m,t[e+2]=l*x+h*m+o*u-c*f,t[e+3]=h*x-o*f-c*u-l*m,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){let n=t._x,i=t._y,s=t._z,a=t._order,o=Math.cos,c=Math.sin,l=o(n/2),h=o(i/2),f=o(s/2),u=c(n/2),m=c(i/2),x=c(s/2);switch(a){case"XYZ":this._x=u*h*f+l*m*x,this._y=l*m*f-u*h*x,this._z=l*h*x+u*m*f,this._w=l*h*f-u*m*x;break;case"YXZ":this._x=u*h*f+l*m*x,this._y=l*m*f-u*h*x,this._z=l*h*x-u*m*f,this._w=l*h*f+u*m*x;break;case"ZXY":this._x=u*h*f-l*m*x,this._y=l*m*f+u*h*x,this._z=l*h*x+u*m*f,this._w=l*h*f-u*m*x;break;case"ZYX":this._x=u*h*f-l*m*x,this._y=l*m*f+u*h*x,this._z=l*h*x-u*m*f,this._w=l*h*f+u*m*x;break;case"YZX":this._x=u*h*f+l*m*x,this._y=l*m*f+u*h*x,this._z=l*h*x-u*m*f,this._w=l*h*f-u*m*x;break;case"XZY":this._x=u*h*f-l*m*x,this._y=l*m*f-u*h*x,this._z=l*h*x+u*m*f,this._w=l*h*f+u*m*x;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return e!==!1&&this._onChangeCallback(),this}setFromAxisAngle(t,e){let n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){let e=t.elements,n=e[0],i=e[4],s=e[8],a=e[1],o=e[5],c=e[9],l=e[2],h=e[6],f=e[10],u=n+o+f;if(u>0){let m=.5/Math.sqrt(u+1);this._w=.25/m,this._x=(h-c)*m,this._y=(s-l)*m,this._z=(a-i)*m}else if(n>o&&n>f){let m=2*Math.sqrt(1+n-o-f);this._w=(h-c)/m,this._x=.25*m,this._y=(i+a)/m,this._z=(s+l)/m}else if(o>f){let m=2*Math.sqrt(1+o-n-f);this._w=(s-l)/m,this._x=(i+a)/m,this._y=.25*m,this._z=(c+h)/m}else{let m=2*Math.sqrt(1+f-n-o);this._w=(a-i)/m,this._x=(s+l)/m,this._y=(c+h)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return nMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(de(this.dot(t),-1,1)))}rotateTowards(t,e){let n=this.angleTo(t);if(n===0)return this;let i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let n=t._x,i=t._y,s=t._z,a=t._w,o=e._x,c=e._y,l=e._z,h=e._w;return this._x=n*h+a*o+i*l-s*c,this._y=i*h+a*c+s*o-n*l,this._z=s*h+a*l+n*c-i*o,this._w=a*h-n*o-i*c-s*l,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);let n=this._x,i=this._y,s=this._z,a=this._w,o=a*t._w+n*t._x+i*t._y+s*t._z;if(o<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),o>=1)return this._w=a,this._x=n,this._y=i,this._z=s,this;let c=1-o*o;if(c<=Number.EPSILON){let m=1-e;return this._w=m*a+e*this._w,this._x=m*n+e*this._x,this._y=m*i+e*this._y,this._z=m*s+e*this._z,this.normalize(),this._onChangeCallback(),this}let l=Math.sqrt(c),h=Math.atan2(l,o),f=Math.sin((1-e)*h)/l,u=Math.sin(e*h)/l;return this._w=a*f+this._w*u,this._x=n*f+this._x*u,this._y=i*f+this._y*u,this._z=s*f+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){let t=Math.random(),e=Math.sqrt(1-t),n=Math.sqrt(t),i=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(e*Math.cos(i),n*Math.sin(s),n*Math.cos(s),e*Math.sin(i))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},R=class{constructor(t=0,e=0,n=0){R.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return n===void 0&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(fa.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(fa.setFromAxisAngle(t,e))}applyMatrix3(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[3]*n+s[6]*i,this.y=s[1]*e+s[4]*n+s[7]*i,this.z=s[2]*e+s[5]*n+s[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=t.elements,a=1/(s[3]*e+s[7]*n+s[11]*i+s[15]);return this.x=(s[0]*e+s[4]*n+s[8]*i+s[12])*a,this.y=(s[1]*e+s[5]*n+s[9]*i+s[13])*a,this.z=(s[2]*e+s[6]*n+s[10]*i+s[14])*a,this}applyQuaternion(t){let e=this.x,n=this.y,i=this.z,s=t.x,a=t.y,o=t.z,c=t.w,l=c*e+a*i-o*n,h=c*n+o*e-s*i,f=c*i+s*n-a*e,u=-s*e-a*n-o*i;return this.x=l*c+u*-s+h*-o-f*-a,this.y=h*c+u*-a+f*-s-l*-o,this.z=f*c+u*-o+l*-a-h*-s,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i,this.y=s[1]*e+s[5]*n+s[9]*i,this.z=s[2]*e+s[6]*n+s[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){let n=t.x,i=t.y,s=t.z,a=e.x,o=e.y,c=e.z;return this.x=i*c-s*o,this.y=s*a-n*c,this.z=n*o-i*a,this}projectOnVector(t){let e=t.lengthSq();if(e===0)return this.set(0,0,0);let n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return cr.copy(this).projectOnVector(t),this.sub(cr)}reflect(t){return this.sub(cr.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;let n=this.dot(t)/e;return Math.acos(de(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){let i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){let e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=(Math.random()-.5)*2,e=Math.random()*Math.PI*2,n=Math.sqrt(1-t**2);return this.x=n*Math.cos(e),this.y=n*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},cr=new R,fa=new gn,fe=class{constructor(t=new R(1/0,1/0,1/0),e=new R(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){let e=1/0,n=1/0,i=1/0,s=-1/0,a=-1/0,o=-1/0;for(let c=0,l=t.length;cs&&(s=h),f>a&&(a=f),u>o&&(o=u)}return this.min.set(e,n,i),this.max.set(s,a,o),this}setFromBufferAttribute(t){let e=1/0,n=1/0,i=1/0,s=-1/0,a=-1/0,o=-1/0;for(let c=0,l=t.count;cs&&(s=h),f>a&&(a=f),u>o&&(o=u)}return this.min.set(e,n,i),this.max.set(s,a,o),this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,Sn),Sn.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Ei),ji.subVectors(this.max,Ei),Hn.subVectors(t.a,Ei),Wn.subVectors(t.b,Ei),qn.subVectors(t.c,Ei),ln.subVectors(Wn,Hn),hn.subVectors(qn,Wn),Tn.subVectors(Hn,qn);let e=[0,-ln.z,ln.y,0,-hn.z,hn.y,0,-Tn.z,Tn.y,ln.z,0,-ln.x,hn.z,0,-hn.x,Tn.z,0,-Tn.x,-ln.y,ln.x,0,-hn.y,hn.x,0,-Tn.y,Tn.x,0];return!hr(e,Hn,Wn,qn,ji)||(e=[1,0,0,0,1,0,0,0,1],!hr(e,Hn,Wn,qn,ji))?!1:(Qi.crossVectors(ln,hn),e=[Qi.x,Qi.y,Qi.z],hr(e,Hn,Wn,qn,ji))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return Sn.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=this.getSize(Sn).length()*.5,t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(Ke[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Ke[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Ke[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Ke[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Ke[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Ke[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Ke[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Ke[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Ke),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},Ke=[new R,new R,new R,new R,new R,new R,new R,new R],Sn=new R,lr=new fe,Hn=new R,Wn=new R,qn=new R,ln=new R,hn=new R,Tn=new R,Ei=new R,ji=new R,Qi=new R,An=new R;function hr(r,t,e,n,i){for(let s=0,a=r.length-3;s<=a;s+=3){An.fromArray(r,s);let o=i.x*Math.abs(An.x)+i.y*Math.abs(An.y)+i.z*Math.abs(An.z),c=t.dot(An),l=e.dot(An),h=n.dot(An);if(Math.max(-Math.max(c,l,h),Math.min(c,l,h))>o)return!1}return!0}var El=new fe,Ci=new R,ur=new R,Fn=class{constructor(t=new R,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){let n=this.center;e!==void 0?n.copy(e):El.setFromPoints(t).getCenter(n);let i=0;for(let s=0,a=t.length;sthis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Ci.subVectors(t,this.center);let e=Ci.lengthSq();if(e>this.radius*this.radius){let n=Math.sqrt(e),i=(n-this.radius)*.5;this.center.addScaledVector(Ci,i/n),this.radius+=i}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(ur.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Ci.copy(t.center).add(ur)),this.expandByPoint(Ci.copy(t.center).sub(ur))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},je=new R,fr=new R,ts=new R,un=new R,dr=new R,es=new R,pr=new R,Fr=class{constructor(t=new R,e=new R(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,je)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);let n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=je.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(je.copy(this.direction).multiplyScalar(e).add(this.origin),je.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){fr.copy(t).add(e).multiplyScalar(.5),ts.copy(e).sub(t).normalize(),un.copy(this.origin).sub(fr);let s=t.distanceTo(e)*.5,a=-this.direction.dot(ts),o=un.dot(this.direction),c=-un.dot(ts),l=un.lengthSq(),h=Math.abs(1-a*a),f,u,m,x;if(h>0)if(f=a*c-o,u=a*o-c,x=s*h,f>=0)if(u>=-x)if(u<=x){let p=1/h;f*=p,u*=p,m=f*(f+a*u+2*o)+u*(a*f+u+2*c)+l}else u=s,f=Math.max(0,-(a*u+o)),m=-f*f+u*(u+2*c)+l;else u=-s,f=Math.max(0,-(a*u+o)),m=-f*f+u*(u+2*c)+l;else u<=-x?(f=Math.max(0,-(-a*s+o)),u=f>0?-s:Math.min(Math.max(-s,-c),s),m=-f*f+u*(u+2*c)+l):u<=x?(f=0,u=Math.min(Math.max(-s,-c),s),m=u*(u+2*c)+l):(f=Math.max(0,-(a*s+o)),u=f>0?s:Math.min(Math.max(-s,-c),s),m=-f*f+u*(u+2*c)+l);else u=a>0?-s:s,f=Math.max(0,-(a*u+o)),m=-f*f+u*(u+2*c)+l;return n&&n.copy(this.direction).multiplyScalar(f).add(this.origin),i&&i.copy(ts).multiplyScalar(u).add(fr),m}intersectSphere(t,e){je.subVectors(t.center,this.origin);let n=je.dot(this.direction),i=je.dot(je)-n*n,s=t.radius*t.radius;if(i>s)return null;let a=Math.sqrt(s-i),o=n-a,c=n+a;return o<0&&c<0?null:o<0?this.at(c,e):this.at(o,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){let n=this.distanceToPlane(t);return n===null?null:this.at(n,e)}intersectsPlane(t){let e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,s,a,o,c,l=1/this.direction.x,h=1/this.direction.y,f=1/this.direction.z,u=this.origin;return l>=0?(n=(t.min.x-u.x)*l,i=(t.max.x-u.x)*l):(n=(t.max.x-u.x)*l,i=(t.min.x-u.x)*l),h>=0?(s=(t.min.y-u.y)*h,a=(t.max.y-u.y)*h):(s=(t.max.y-u.y)*h,a=(t.min.y-u.y)*h),n>a||s>i||((s>n||isNaN(n))&&(n=s),(a=0?(o=(t.min.z-u.z)*f,c=(t.max.z-u.z)*f):(o=(t.max.z-u.z)*f,c=(t.min.z-u.z)*f),n>c||o>i)||((o>n||n!==n)&&(n=o),(c=0?n:i,e)}intersectsBox(t){return this.intersectBox(t,je)!==null}intersectTriangle(t,e,n,i,s){dr.subVectors(e,t),es.subVectors(n,t),pr.crossVectors(dr,es);let a=this.direction.dot(pr),o;if(a>0){if(i)return null;o=1}else if(a<0)o=-1,a=-a;else return null;un.subVectors(this.origin,t);let c=o*this.direction.dot(es.crossVectors(un,es));if(c<0)return null;let l=o*this.direction.dot(dr.cross(un));if(l<0||c+l>a)return null;let h=-o*un.dot(pr);return h<0?null:this.at(h/a,s)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},zt=class{constructor(){zt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(t,e,n,i,s,a,o,c,l,h,f,u,m,x,p,d){let g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=i,g[1]=s,g[5]=a,g[9]=o,g[13]=c,g[2]=l,g[6]=h,g[10]=f,g[14]=u,g[3]=m,g[7]=x,g[11]=p,g[15]=d,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new zt().fromArray(this.elements)}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){let e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){let e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){let e=this.elements,n=t.elements,i=1/Xn.setFromMatrixColumn(t,0).length(),s=1/Xn.setFromMatrixColumn(t,1).length(),a=1/Xn.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*s,e[5]=n[5]*s,e[6]=n[6]*s,e[7]=0,e[8]=n[8]*a,e[9]=n[9]*a,e[10]=n[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){let e=this.elements,n=t.x,i=t.y,s=t.z,a=Math.cos(n),o=Math.sin(n),c=Math.cos(i),l=Math.sin(i),h=Math.cos(s),f=Math.sin(s);if(t.order==="XYZ"){let u=a*h,m=a*f,x=o*h,p=o*f;e[0]=c*h,e[4]=-c*f,e[8]=l,e[1]=m+x*l,e[5]=u-p*l,e[9]=-o*c,e[2]=p-u*l,e[6]=x+m*l,e[10]=a*c}else if(t.order==="YXZ"){let u=c*h,m=c*f,x=l*h,p=l*f;e[0]=u+p*o,e[4]=x*o-m,e[8]=a*l,e[1]=a*f,e[5]=a*h,e[9]=-o,e[2]=m*o-x,e[6]=p+u*o,e[10]=a*c}else if(t.order==="ZXY"){let u=c*h,m=c*f,x=l*h,p=l*f;e[0]=u-p*o,e[4]=-a*f,e[8]=x+m*o,e[1]=m+x*o,e[5]=a*h,e[9]=p-u*o,e[2]=-a*l,e[6]=o,e[10]=a*c}else if(t.order==="ZYX"){let u=a*h,m=a*f,x=o*h,p=o*f;e[0]=c*h,e[4]=x*l-m,e[8]=u*l+p,e[1]=c*f,e[5]=p*l+u,e[9]=m*l-x,e[2]=-l,e[6]=o*c,e[10]=a*c}else if(t.order==="YZX"){let u=a*c,m=a*l,x=o*c,p=o*l;e[0]=c*h,e[4]=p-u*f,e[8]=x*f+m,e[1]=f,e[5]=a*h,e[9]=-o*h,e[2]=-l*h,e[6]=m*f+x,e[10]=u-p*f}else if(t.order==="XZY"){let u=a*c,m=a*l,x=o*c,p=o*l;e[0]=c*h,e[4]=-f,e[8]=l*h,e[1]=u*f+p,e[5]=a*h,e[9]=m*f-x,e[2]=x*f-m,e[6]=o*h,e[10]=p*f+u}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Cl,t,Pl)}lookAt(t,e,n){let i=this.elements;return be.subVectors(t,e),be.lengthSq()===0&&(be.z=1),be.normalize(),fn.crossVectors(n,be),fn.lengthSq()===0&&(Math.abs(n.z)===1?be.x+=1e-4:be.z+=1e-4,be.normalize(),fn.crossVectors(n,be)),fn.normalize(),ns.crossVectors(be,fn),i[0]=fn.x,i[4]=ns.x,i[8]=be.x,i[1]=fn.y,i[5]=ns.y,i[9]=be.y,i[2]=fn.z,i[6]=ns.z,i[10]=be.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,a=n[0],o=n[4],c=n[8],l=n[12],h=n[1],f=n[5],u=n[9],m=n[13],x=n[2],p=n[6],d=n[10],g=n[14],M=n[3],_=n[7],v=n[11],b=n[15],A=i[0],C=i[4],y=i[8],S=i[12],P=i[1],O=i[5],B=i[9],D=i[13],I=i[2],k=i[6],Y=i[10],Z=i[14],H=i[3],$=i[7],J=i[11],dt=i[15];return s[0]=a*A+o*P+c*I+l*H,s[4]=a*C+o*O+c*k+l*$,s[8]=a*y+o*B+c*Y+l*J,s[12]=a*S+o*D+c*Z+l*dt,s[1]=h*A+f*P+u*I+m*H,s[5]=h*C+f*O+u*k+m*$,s[9]=h*y+f*B+u*Y+m*J,s[13]=h*S+f*D+u*Z+m*dt,s[2]=x*A+p*P+d*I+g*H,s[6]=x*C+p*O+d*k+g*$,s[10]=x*y+p*B+d*Y+g*J,s[14]=x*S+p*D+d*Z+g*dt,s[3]=M*A+_*P+v*I+b*H,s[7]=M*C+_*O+v*k+b*$,s[11]=M*y+_*B+v*Y+b*J,s[15]=M*S+_*D+v*Z+b*dt,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[4],i=t[8],s=t[12],a=t[1],o=t[5],c=t[9],l=t[13],h=t[2],f=t[6],u=t[10],m=t[14],x=t[3],p=t[7],d=t[11],g=t[15];return x*(+s*c*f-i*l*f-s*o*u+n*l*u+i*o*m-n*c*m)+p*(+e*c*m-e*l*u+s*a*u-i*a*m+i*l*h-s*c*h)+d*(+e*l*f-e*o*m-s*a*f+n*a*m+s*o*h-n*l*h)+g*(-i*o*h-e*c*f+e*o*u+i*a*f-n*a*u+n*c*h)}transpose(){let t=this.elements,e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){let i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],a=t[4],o=t[5],c=t[6],l=t[7],h=t[8],f=t[9],u=t[10],m=t[11],x=t[12],p=t[13],d=t[14],g=t[15],M=f*d*l-p*u*l+p*c*m-o*d*m-f*c*g+o*u*g,_=x*u*l-h*d*l-x*c*m+a*d*m+h*c*g-a*u*g,v=h*p*l-x*f*l+x*o*m-a*p*m-h*o*g+a*f*g,b=x*f*c-h*p*c-x*o*u+a*p*u+h*o*d-a*f*d,A=e*M+n*_+i*v+s*b;if(A===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let C=1/A;return t[0]=M*C,t[1]=(p*u*s-f*d*s-p*i*m+n*d*m+f*i*g-n*u*g)*C,t[2]=(o*d*s-p*c*s+p*i*l-n*d*l-o*i*g+n*c*g)*C,t[3]=(f*c*s-o*u*s-f*i*l+n*u*l+o*i*m-n*c*m)*C,t[4]=_*C,t[5]=(h*d*s-x*u*s+x*i*m-e*d*m-h*i*g+e*u*g)*C,t[6]=(x*c*s-a*d*s-x*i*l+e*d*l+a*i*g-e*c*g)*C,t[7]=(a*u*s-h*c*s+h*i*l-e*u*l-a*i*m+e*c*m)*C,t[8]=v*C,t[9]=(x*f*s-h*p*s-x*n*m+e*p*m+h*n*g-e*f*g)*C,t[10]=(a*p*s-x*o*s+x*n*l-e*p*l-a*n*g+e*o*g)*C,t[11]=(h*o*s-a*f*s-h*n*l+e*f*l+a*n*m-e*o*m)*C,t[12]=b*C,t[13]=(h*p*i-x*f*i+x*n*u-e*p*u-h*n*d+e*f*d)*C,t[14]=(x*o*i-a*p*i-x*n*c+e*p*c+a*n*d-e*o*d)*C,t[15]=(a*f*i-h*o*i+h*n*c-e*f*c-a*n*u+e*o*u)*C,this}scale(t){let e=this.elements,n=t.x,i=t.y,s=t.z;return e[0]*=n,e[4]*=i,e[8]*=s,e[1]*=n,e[5]*=i,e[9]*=s,e[2]*=n,e[6]*=i,e[10]*=s,e[3]*=n,e[7]*=i,e[11]*=s,this}getMaxScaleOnAxis(){let t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){let e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){let n=Math.cos(e),i=Math.sin(e),s=1-n,a=t.x,o=t.y,c=t.z,l=s*a,h=s*o;return this.set(l*a+n,l*o-i*c,l*c+i*o,0,l*o+i*c,h*o+n,h*c-i*a,0,l*c-i*o,h*c+i*a,s*c*c+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,s,a){return this.set(1,n,s,0,t,1,a,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){let i=this.elements,s=e._x,a=e._y,o=e._z,c=e._w,l=s+s,h=a+a,f=o+o,u=s*l,m=s*h,x=s*f,p=a*h,d=a*f,g=o*f,M=c*l,_=c*h,v=c*f,b=n.x,A=n.y,C=n.z;return i[0]=(1-(p+g))*b,i[1]=(m+v)*b,i[2]=(x-_)*b,i[3]=0,i[4]=(m-v)*A,i[5]=(1-(u+g))*A,i[6]=(d+M)*A,i[7]=0,i[8]=(x+_)*C,i[9]=(d-M)*C,i[10]=(1-(u+p))*C,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){let i=this.elements,s=Xn.set(i[0],i[1],i[2]).length(),a=Xn.set(i[4],i[5],i[6]).length(),o=Xn.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),t.x=i[12],t.y=i[13],t.z=i[14],Fe.copy(this);let l=1/s,h=1/a,f=1/o;return Fe.elements[0]*=l,Fe.elements[1]*=l,Fe.elements[2]*=l,Fe.elements[4]*=h,Fe.elements[5]*=h,Fe.elements[6]*=h,Fe.elements[8]*=f,Fe.elements[9]*=f,Fe.elements[10]*=f,e.setFromRotationMatrix(Fe),n.x=s,n.y=a,n.z=o,this}makePerspective(t,e,n,i,s,a){let o=this.elements,c=2*s/(e-t),l=2*s/(n-i),h=(e+t)/(e-t),f=(n+i)/(n-i),u=-(a+s)/(a-s),m=-2*a*s/(a-s);return o[0]=c,o[4]=0,o[8]=h,o[12]=0,o[1]=0,o[5]=l,o[9]=f,o[13]=0,o[2]=0,o[6]=0,o[10]=u,o[14]=m,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(t,e,n,i,s,a){let o=this.elements,c=1/(e-t),l=1/(n-i),h=1/(a-s),f=(e+t)*c,u=(n+i)*l,m=(a+s)*h;return o[0]=2*c,o[4]=0,o[8]=0,o[12]=-f,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-u,o[2]=0,o[6]=0,o[10]=-2*h,o[14]=-m,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<16;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}},Xn=new R,Fe=new zt,Cl=new R(0,0,0),Pl=new R(1,1,1),fn=new R,ns=new R,be=new R,da=new zt,pa=new gn,ui=class{constructor(t=0,e=0,n=0,i=ui.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){let i=t.elements,s=i[0],a=i[4],o=i[8],c=i[1],l=i[5],h=i[9],f=i[2],u=i[6],m=i[10];switch(e){case"XYZ":this._y=Math.asin(de(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-h,m),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-de(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(o,m),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(de(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-de(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(u,m),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(de(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(o,m));break;case"XZY":this._z=Math.asin(-de(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(o,s)):(this._x=Math.atan2(-h,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return da.makeRotationFromQuaternion(t),this.setFromRotationMatrix(da,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return pa.setFromEuler(this),this.setFromQuaternion(pa,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};ui.DEFAULT_ORDER="XYZ";var ws=class{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let e=0;e1){for(let n=0;n0&&(n=n.concat(a))}return n}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Pi,t,Ll),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Pi,Il,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);let e=this.children;for(let n=0,i=e.length;n0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON()));function s(o,c){return o[c.uuid]===void 0&&(o[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(t.geometries,this.geometry);let o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){let c=o.shapes;if(Array.isArray(c))for(let l=0,h=c.length;l0){i.children=[];for(let o=0;o0){i.animations=[];for(let o=0;o0&&(n.geometries=o),c.length>0&&(n.materials=c),l.length>0&&(n.textures=l),h.length>0&&(n.images=h),f.length>0&&(n.shapes=f),u.length>0&&(n.skeletons=u),m.length>0&&(n.animations=m),x.length>0&&(n.nodes=x)}return n.object=i,n;function a(o){let c=[];for(let l in o){let h=o[l];delete h.metadata,c.push(h)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let n=0;n0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(t,e,n,i,s){ze.subVectors(i,e),tn.subVectors(n,e),mr.subVectors(t,e);let a=ze.dot(ze),o=ze.dot(tn),c=ze.dot(mr),l=tn.dot(tn),h=tn.dot(mr),f=a*l-o*o;if(f===0)return s.set(-2,-1,-1);let u=1/f,m=(l*c-o*h)*u,x=(a*h-o*c)*u;return s.set(1-m-x,x,m)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,en),en.x>=0&&en.y>=0&&en.x+en.y<=1}static getUV(t,e,n,i,s,a,o,c){return this.getBarycoord(t,e,n,i,en),c.set(0,0),c.addScaledVector(s,en.x),c.addScaledVector(a,en.y),c.addScaledVector(o,en.z),c}static isFrontFacing(t,e,n,i){return ze.subVectors(n,e),tn.subVectors(t,e),ze.cross(tn).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return ze.subVectors(this.c,this.b),tn.subVectors(this.a,this.b),ze.cross(tn).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return ie.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return ie.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,n,i,s){return ie.getUV(t,this.a,this.b,this.c,e,n,i,s)}containsPoint(t){return ie.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return ie.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){let n=this.a,i=this.b,s=this.c,a,o;Zn.subVectors(i,n),Jn.subVectors(s,n),gr.subVectors(t,n);let c=Zn.dot(gr),l=Jn.dot(gr);if(c<=0&&l<=0)return e.copy(n);xr.subVectors(t,i);let h=Zn.dot(xr),f=Jn.dot(xr);if(h>=0&&f<=h)return e.copy(i);let u=c*f-h*l;if(u<=0&&c>=0&&h<=0)return a=c/(c-h),e.copy(n).addScaledVector(Zn,a);_r.subVectors(t,s);let m=Zn.dot(_r),x=Jn.dot(_r);if(x>=0&&m<=x)return e.copy(s);let p=m*l-c*x;if(p<=0&&l>=0&&x<=0)return o=l/(l-x),e.copy(n).addScaledVector(Jn,o);let d=h*x-m*f;if(d<=0&&f-h>=0&&m-x>=0)return va.subVectors(s,i),o=(f-h)/(f-h+(m-x)),e.copy(i).addScaledVector(va,o);let g=1/(d+p+u);return a=p*g,o=u*g,e.copy(n).addScaledVector(Zn,a).addScaledVector(Jn,o)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},Nl=0,fi=class extends mn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Nl++}),this.uuid=Gi(),this.name="",this.type="Material",this.blending=ri,this.side=Ue,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=qa,this.blendDst=Xa,this.blendEquation=ni,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Er,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Sl,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=er,this.stencilZFail=er,this.stencilZPass=er,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(let e in t){let n=t[e];if(n===void 0){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}let i=this[e];if(i===void 0){console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.");continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n}}toJSON(t){let e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});let n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==ri&&(n.blending=this.blending),this.side!==Ue&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(n.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(s){let a=[];for(let o in s){let c=s[o];delete c.metadata,a.push(c)}return a}if(e){let s=i(t.textures),a=i(t.images);s.length>0&&(n.textures=s),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;let e=t.clippingPlanes,n=null;if(e!==null){let i=e.length;n=new Array(i);for(let s=0;s!==i;++s)n[s]=e[s].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}},Ss=class extends fi{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Bt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Ya,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}},Ht=new R,ss=new At,Yt=class{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=n,this.usage=ca,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,s=this.itemSize;i0&&(t.userData=this.userData),this.parameters!==void 0){let c=this.parameters;for(let l in c)c[l]!==void 0&&(t[l]=c[l]);return t}t.data={attributes:{}};let e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});let n=this.attributes;for(let c in n){let l=n[c];t.data.attributes[c]=l.toJSON(t.data)}let i={},s=!1;for(let c in this.morphAttributes){let l=this.morphAttributes[c],h=[];for(let f=0,u=l.length;f0&&(i[c]=h,s=!0)}s&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(t.data.groups=JSON.parse(JSON.stringify(a)));let o=this.boundingSphere;return o!==null&&(t.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=t.name;let n=t.index;n!==null&&this.setIndex(n.clone(e));let i=t.attributes;for(let l in i){let h=i[l];this.setAttribute(l,h.clone(e))}let s=t.morphAttributes;for(let l in s){let h=[],f=s[l];for(let u=0,m=f.length;u0){let i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=i.length;se.far?null:{distance:l,point:ls.clone(),object:r}}function hs(r,t,e,n,i,s,a,o,c){r.getVertexPosition(a,Li),r.getVertexPosition(o,Ii),r.getVertexPosition(c,Di);let l=zl(r,t,e,n,Li,Ii,Di,br);if(l){i&&(os.fromBufferAttribute(i,a),as.fromBufferAttribute(i,o),cs.fromBufferAttribute(i,c),l.uv=ie.getUV(br,Li,Ii,Di,os,as,cs,new At)),s&&(os.fromBufferAttribute(s,a),as.fromBufferAttribute(s,o),cs.fromBufferAttribute(s,c),l.uv2=ie.getUV(br,Li,Ii,Di,os,as,cs,new At));let h={a,b:o,c,normal:new R,materialIndex:0};ie.getNormal(Li,Ii,Di,h.normal),l.face=h}return l}var zn=class extends ke{constructor(t=1,e=1,n=1,i=1,s=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:s,depthSegments:a};let o=this;i=Math.floor(i),s=Math.floor(s),a=Math.floor(a);let c=[],l=[],h=[],f=[],u=0,m=0;x("z","y","x",-1,-1,n,e,t,a,s,0),x("z","y","x",1,-1,n,e,-t,a,s,1),x("x","z","y",1,1,t,n,e,i,a,2),x("x","z","y",1,-1,t,n,-e,i,a,3),x("x","y","z",1,-1,t,e,n,i,s,4),x("x","y","z",-1,-1,t,e,-n,i,s,5),this.setIndex(c),this.setAttribute("position",new sn(l,3)),this.setAttribute("normal",new sn(h,3)),this.setAttribute("uv",new sn(f,2));function x(p,d,g,M,_,v,b,A,C,y,S){let P=v/C,O=b/y,B=v/2,D=b/2,I=A/2,k=C+1,Y=y+1,Z=0,H=0,$=new R;for(let J=0;J0?1:-1,h.push($.x,$.y,$.z),f.push(z/C),f.push(1-J/y),Z+=1}}for(let J=0;J0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;let n={};for(let i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}},Es=class extends pe{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new zt,this.projectionMatrix=new zt,this.projectionMatrixInverse=new zt}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}},Se=class extends Es{constructor(t=50,e=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){let e=.5*this.getFilmHeight()/t;this.fov=ha*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){let t=Math.tan(nr*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return ha*2*Math.atan(Math.tan(nr*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,n,i,s,a){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=this.near,e=t*Math.tan(nr*.5*this.fov)/this.zoom,n=2*e,i=this.aspect*n,s=-.5*i,a=this.view;if(this.view!==null&&this.view.enabled){let c=a.fullWidth,l=a.fullHeight;s+=a.offsetX*i/c,e-=a.offsetY*n/l,i*=a.width/c,n*=a.height/l}let o=this.filmOffset;o!==0&&(s+=t*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+i,e,e-n,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}},jn=-90,Qn=1,zr=class extends pe{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n;let i=new Se(jn,Qn,t,e);i.layers=this.layers,i.up.set(0,1,0),i.lookAt(1,0,0),this.add(i);let s=new Se(jn,Qn,t,e);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(-1,0,0),this.add(s);let a=new Se(jn,Qn,t,e);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(0,1,0),this.add(a);let o=new Se(jn,Qn,t,e);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(0,-1,0),this.add(o);let c=new Se(jn,Qn,t,e);c.layers=this.layers,c.up.set(0,1,0),c.lookAt(0,0,1),this.add(c);let l=new Se(jn,Qn,t,e);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,-1),this.add(l)}update(t,e){this.parent===null&&this.updateMatrixWorld();let n=this.renderTarget,[i,s,a,o,c,l]=this.children,h=t.getRenderTarget(),f=t.toneMapping,u=t.xr.enabled;t.toneMapping=nn,t.xr.enabled=!1;let m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0),t.render(e,i),t.setRenderTarget(n,1),t.render(e,s),t.setRenderTarget(n,2),t.render(e,a),t.setRenderTarget(n,3),t.render(e,o),t.setRenderTarget(n,4),t.render(e,c),n.texture.generateMipmaps=m,t.setRenderTarget(n,5),t.render(e,l),t.setRenderTarget(h),t.toneMapping=f,t.xr.enabled=u,n.texture.needsPMREMUpdate=!0}},Cs=class extends ue{constructor(t,e,n,i,s,a,o,c,l,h){t=t!==void 0?t:[],e=e!==void 0?e:ci,super(t,e,n,i,s,a,o,c,l,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}},Or=class extends rn{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;let n={width:t,height:t,depth:1},i=[n,n,n,n,n,n];this.texture=new Cs(i,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=e.generateMipmaps!==void 0?e.generateMipmaps:!1,this.texture.minFilter=e.minFilter!==void 0?e.minFilter:Re}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.encoding=e.encoding,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:\` - - varying vec3 vWorldDirection; - - vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); - - } - - void main() { - - vWorldDirection = transformDirection( position, modelMatrix ); - - #include - #include - - } - \`,fragmentShader:\` - - uniform sampler2D tEquirect; - - varying vec3 vWorldDirection; - - #include - - void main() { - - vec3 direction = normalize( vWorldDirection ); - - vec2 sampleUV = equirectUv( direction ); - - gl_FragColor = texture2D( tEquirect, sampleUV ); - - } - \`},i=new zn(5,5,5),s=new on({name:"CubemapFromEquirect",uniforms:di(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:he,blending:pn});s.uniforms.tEquirect.value=e;let a=new qe(i,s),o=e.minFilter;return e.minFilter===Oi&&(e.minFilter=Re),new zr(1,10,this).update(t,a),e.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(t,e,n,i){let s=t.getRenderTarget();for(let a=0;a<6;a++)t.setRenderTarget(this,a),t.clear(e,n,i);t.setRenderTarget(s)}},wr=new R,Vl=new R,Gl=new le,Te=class{constructor(t=new R(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){let i=wr.subVectors(n,e).cross(Vl.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){let t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,e){let n=t.delta(wr),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;let s=-(t.start.dot(this.normal)+this.constant)/i;return s<0||s>1?null:e.copy(n).multiplyScalar(s).add(t.start)}intersectsLine(t){let e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){let n=e||Gl.getNormalMatrix(t),i=this.coplanarPoint(wr).applyMatrix4(t),s=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(s),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}},ti=new Fn,us=new R,Ps=class{constructor(t=new Te,e=new Te,n=new Te,i=new Te,s=new Te,a=new Te){this.planes=[t,e,n,i,s,a]}set(t,e,n,i,s,a){let o=this.planes;return o[0].copy(t),o[1].copy(e),o[2].copy(n),o[3].copy(i),o[4].copy(s),o[5].copy(a),this}copy(t){let e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t){let e=this.planes,n=t.elements,i=n[0],s=n[1],a=n[2],o=n[3],c=n[4],l=n[5],h=n[6],f=n[7],u=n[8],m=n[9],x=n[10],p=n[11],d=n[12],g=n[13],M=n[14],_=n[15];return e[0].setComponents(o-i,f-c,p-u,_-d).normalize(),e[1].setComponents(o+i,f+c,p+u,_+d).normalize(),e[2].setComponents(o+s,f+l,p+m,_+g).normalize(),e[3].setComponents(o-s,f-l,p-m,_-g).normalize(),e[4].setComponents(o-a,f-h,p-x,_-M).normalize(),e[5].setComponents(o+a,f+h,p+x,_+M).normalize(),this}intersectsObject(t){let e=t.geometry;return e.boundingSphere===null&&e.computeBoundingSphere(),ti.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(ti)}intersectsSprite(t){return ti.center.set(0,0,0),ti.radius=.7071067811865476,ti.applyMatrix4(t.matrixWorld),this.intersectsSphere(ti)}intersectsSphere(t){let e=this.planes,n=t.center,i=-t.radius;for(let s=0;s<6;s++)if(e[s].distanceToPoint(n)0?t.max.x:t.min.x,us.y=i.normal.y>0?t.max.y:t.min.y,us.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(us)<0)return!1}return!0}containsPoint(t){let e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function Qa(){let r=null,t=!1,e=null,n=null;function i(s,a){e(s,a),n=r.requestAnimationFrame(i)}return{start:function(){t!==!0&&e!==null&&(n=r.requestAnimationFrame(i),t=!0)},stop:function(){r.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(s){e=s},setContext:function(s){r=s}}}function Hl(r,t){let e=t.isWebGL2,n=new WeakMap;function i(l,h){let f=l.array,u=l.usage,m=r.createBuffer();r.bindBuffer(h,m),r.bufferData(h,f,u),l.onUploadCallback();let x;if(f instanceof Float32Array)x=5126;else if(f instanceof Uint16Array)if(l.isFloat16BufferAttribute)if(e)x=5131;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else x=5123;else if(f instanceof Int16Array)x=5122;else if(f instanceof Uint32Array)x=5125;else if(f instanceof Int32Array)x=5124;else if(f instanceof Int8Array)x=5120;else if(f instanceof Uint8Array)x=5121;else if(f instanceof Uint8ClampedArray)x=5121;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:m,type:x,bytesPerElement:f.BYTES_PER_ELEMENT,version:l.version}}function s(l,h,f){let u=h.array,m=h.updateRange;r.bindBuffer(f,l),m.count===-1?r.bufferSubData(f,0,u):(e?r.bufferSubData(f,m.offset*u.BYTES_PER_ELEMENT,u,m.offset,m.count):r.bufferSubData(f,m.offset*u.BYTES_PER_ELEMENT,u.subarray(m.offset,m.offset+m.count)),m.count=-1),h.onUploadCallback()}function a(l){return l.isInterleavedBufferAttribute&&(l=l.data),n.get(l)}function o(l){l.isInterleavedBufferAttribute&&(l=l.data);let h=n.get(l);h&&(r.deleteBuffer(h.buffer),n.delete(l))}function c(l,h){if(l.isGLBufferAttribute){let u=n.get(l);(!u||u.version 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; - return cross( v1, v2 ) * theta_sintheta; -} -vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { - vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; - vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; - vec3 lightNormal = cross( v1, v2 ); - if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); - vec3 T1, T2; - T1 = normalize( V - N * dot( V, N ) ); - T2 = - cross( N, T1 ); - mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); - vec3 coords[ 4 ]; - coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); - coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); - coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); - coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); - coords[ 0 ] = normalize( coords[ 0 ] ); - coords[ 1 ] = normalize( coords[ 1 ] ); - coords[ 2 ] = normalize( coords[ 2 ] ); - coords[ 3 ] = normalize( coords[ 3 ] ); - vec3 vectorFormFactor = vec3( 0.0 ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); - float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); - return vec3( result ); -} -float G_BlinnPhong_Implicit( ) { - return 0.25; -} -float D_BlinnPhong( const in float shininess, const in float dotNH ) { - return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); -} -vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNH = saturate( dot( normal, halfDir ) ); - float dotVH = saturate( dot( viewDir, halfDir ) ); - vec3 F = F_Schlick( specularColor, 1.0, dotVH ); - float G = G_BlinnPhong_Implicit( ); - float D = D_BlinnPhong( shininess, dotNH ); - return F * ( G * D ); -} -#if defined( USE_SHEEN ) -float D_Charlie( float roughness, float dotNH ) { - float alpha = pow2( roughness ); - float invAlpha = 1.0 / alpha; - float cos2h = dotNH * dotNH; - float sin2h = max( 1.0 - cos2h, 0.0078125 ); - return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); -} -float V_Neubelt( float dotNV, float dotNL ) { - return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); -} -vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float D = D_Charlie( sheenRoughness, dotNH ); - float V = V_Neubelt( dotNV, dotNL ); - return sheenColor * ( D * V ); -} -#endif\`,Ql=\`#ifdef USE_IRIDESCENCE - const mat3 XYZ_TO_REC709 = mat3( - 3.2404542, -0.9692660, 0.0556434, - -1.5371385, 1.8760108, -0.2040259, - -0.4985314, 0.0415560, 1.0572252 - ); - vec3 Fresnel0ToIor( vec3 fresnel0 ) { - vec3 sqrtF0 = sqrt( fresnel0 ); - return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); - } - vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { - return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); - } - float IorToFresnel0( float transmittedIor, float incidentIor ) { - return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); - } - vec3 evalSensitivity( float OPD, vec3 shift ) { - float phase = 2.0 * PI * OPD * 1.0e-9; - vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); - vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); - vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); - vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); - xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) ); - xyz /= 1.0685e-7; - vec3 rgb = XYZ_TO_REC709 * xyz; - return rgb; - } - vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { - vec3 I; - float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); - float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); - float cosTheta2Sq = 1.0 - sinTheta2Sq; - if ( cosTheta2Sq < 0.0 ) { - return vec3( 1.0 ); - } - float cosTheta2 = sqrt( cosTheta2Sq ); - float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); - float R12 = F_Schlick( R0, 1.0, cosTheta1 ); - float R21 = R12; - float T121 = 1.0 - R12; - float phi12 = 0.0; - if ( iridescenceIOR < outsideIOR ) phi12 = PI; - float phi21 = PI - phi12; - vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); - vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); - vec3 phi23 = vec3( 0.0 ); - if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; - if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; - if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; - float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; - vec3 phi = vec3( phi21 ) + phi23; - vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); - vec3 r123 = sqrt( R123 ); - vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); - vec3 C0 = R12 + Rs; - I = C0; - vec3 Cm = Rs - T121; - for ( int m = 1; m <= 2; ++ m ) { - Cm *= r123; - vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); - I += Cm * Sm; - } - return max( I, vec3( 0.0 ) ); - } -#endif\`,th=\`#ifdef USE_BUMPMAP - uniform sampler2D bumpMap; - uniform float bumpScale; - vec2 dHdxy_fwd() { - vec2 dSTdx = dFdx( vUv ); - vec2 dSTdy = dFdy( vUv ); - float Hll = bumpScale * texture2D( bumpMap, vUv ).x; - float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll; - float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll; - return vec2( dBx, dBy ); - } - vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { - vec3 vSigmaX = dFdx( surf_pos.xyz ); - vec3 vSigmaY = dFdy( surf_pos.xyz ); - vec3 vN = surf_norm; - vec3 R1 = cross( vSigmaY, vN ); - vec3 R2 = cross( vN, vSigmaX ); - float fDet = dot( vSigmaX, R1 ) * faceDirection; - vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); - return normalize( abs( fDet ) * surf_norm - vGrad ); - } -#endif\`,eh=\`#if NUM_CLIPPING_PLANES > 0 - vec4 plane; - #pragma unroll_loop_start - for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; - } - #pragma unroll_loop_end - #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES - bool clipped = true; - #pragma unroll_loop_start - for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; - } - #pragma unroll_loop_end - if ( clipped ) discard; - #endif -#endif\`,nh=\`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; - uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif\`,ih=\`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; -#endif\`,sh=\`#if NUM_CLIPPING_PLANES > 0 - vClipPosition = - mvPosition.xyz; -#endif\`,rh=\`#if defined( USE_COLOR_ALPHA ) - diffuseColor *= vColor; -#elif defined( USE_COLOR ) - diffuseColor.rgb *= vColor; -#endif\`,oh=\`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) - varying vec3 vColor; -#endif\`,ah=\`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - varying vec3 vColor; -#endif\`,ch=\`#if defined( USE_COLOR_ALPHA ) - vColor = vec4( 1.0 ); -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - vColor = vec3( 1.0 ); -#endif -#ifdef USE_COLOR - vColor *= color; -#endif -#ifdef USE_INSTANCING_COLOR - vColor.xyz *= instanceColor.xyz; -#endif\`,lh=\`#define PI 3.141592653589793 -#define PI2 6.283185307179586 -#define PI_HALF 1.5707963267948966 -#define RECIPROCAL_PI 0.3183098861837907 -#define RECIPROCAL_PI2 0.15915494309189535 -#define EPSILON 1e-6 -#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -#define whiteComplement( a ) ( 1.0 - saturate( a ) ) -float pow2( const in float x ) { return x*x; } -vec3 pow2( const in vec3 x ) { return x*x; } -float pow3( const in float x ) { return x*x*x; } -float pow4( const in float x ) { float x2 = x*x; return x2*x2; } -float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } -float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } -highp float rand( const in vec2 uv ) { - const highp float a = 12.9898, b = 78.233, c = 43758.5453; - highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); - return fract( sin( sn ) * c ); -} -#ifdef HIGH_PRECISION - float precisionSafeLength( vec3 v ) { return length( v ); } -#else - float precisionSafeLength( vec3 v ) { - float maxComponent = max3( abs( v ) ); - return length( v / maxComponent ) * maxComponent; - } -#endif -struct IncidentLight { - vec3 color; - vec3 direction; - bool visible; -}; -struct ReflectedLight { - vec3 directDiffuse; - vec3 directSpecular; - vec3 indirectDiffuse; - vec3 indirectSpecular; -}; -struct GeometricContext { - vec3 position; - vec3 normal; - vec3 viewDir; -#ifdef USE_CLEARCOAT - vec3 clearcoatNormal; -#endif -}; -vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); -} -vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); -} -mat3 transposeMat3( const in mat3 m ) { - mat3 tmp; - tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); - tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); - tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); - return tmp; -} -float luminance( const in vec3 rgb ) { - const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); - return dot( weights, rgb ); -} -bool isPerspectiveMatrix( mat4 m ) { - return m[ 2 ][ 3 ] == - 1.0; -} -vec2 equirectUv( in vec3 dir ) { - float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; - float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; - return vec2( u, v ); -}\`,hh=\`#ifdef ENVMAP_TYPE_CUBE_UV - #define cubeUV_minMipLevel 4.0 - #define cubeUV_minTileSize 16.0 - float getFace( vec3 direction ) { - vec3 absDirection = abs( direction ); - float face = - 1.0; - if ( absDirection.x > absDirection.z ) { - if ( absDirection.x > absDirection.y ) - face = direction.x > 0.0 ? 0.0 : 3.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } else { - if ( absDirection.z > absDirection.y ) - face = direction.z > 0.0 ? 2.0 : 5.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } - return face; - } - vec2 getUV( vec3 direction, float face ) { - vec2 uv; - if ( face == 0.0 ) { - uv = vec2( direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 1.0 ) { - uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); - } else if ( face == 2.0 ) { - uv = vec2( - direction.x, direction.y ) / abs( direction.z ); - } else if ( face == 3.0 ) { - uv = vec2( - direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 4.0 ) { - uv = vec2( - direction.x, direction.z ) / abs( direction.y ); - } else { - uv = vec2( direction.x, direction.y ) / abs( direction.z ); - } - return 0.5 * ( uv + 1.0 ); - } - vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { - float face = getFace( direction ); - float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); - mipInt = max( mipInt, cubeUV_minMipLevel ); - float faceSize = exp2( mipInt ); - highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; - if ( face > 2.0 ) { - uv.y += faceSize; - face -= 3.0; - } - uv.x += face * faceSize; - uv.x += filterInt * 3.0 * cubeUV_minTileSize; - uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); - uv.x *= CUBEUV_TEXEL_WIDTH; - uv.y *= CUBEUV_TEXEL_HEIGHT; - #ifdef texture2DGradEXT - return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; - #else - return texture2D( envMap, uv ).rgb; - #endif - } - #define cubeUV_r0 1.0 - #define cubeUV_v0 0.339 - #define cubeUV_m0 - 2.0 - #define cubeUV_r1 0.8 - #define cubeUV_v1 0.276 - #define cubeUV_m1 - 1.0 - #define cubeUV_r4 0.4 - #define cubeUV_v4 0.046 - #define cubeUV_m4 2.0 - #define cubeUV_r5 0.305 - #define cubeUV_v5 0.016 - #define cubeUV_m5 3.0 - #define cubeUV_r6 0.21 - #define cubeUV_v6 0.0038 - #define cubeUV_m6 4.0 - float roughnessToMip( float roughness ) { - float mip = 0.0; - if ( roughness >= cubeUV_r1 ) { - mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; - } else if ( roughness >= cubeUV_r4 ) { - mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; - } else if ( roughness >= cubeUV_r5 ) { - mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; - } else if ( roughness >= cubeUV_r6 ) { - mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; - } else { - mip = - 2.0 * log2( 1.16 * roughness ); } - return mip; - } - vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { - float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); - float mipF = fract( mip ); - float mipInt = floor( mip ); - vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); - if ( mipF == 0.0 ) { - return vec4( color0, 1.0 ); - } else { - vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); - return vec4( mix( color0, color1, mipF ), 1.0 ); - } - } -#endif\`,uh=\`vec3 transformedNormal = objectNormal; -#ifdef USE_INSTANCING - mat3 m = mat3( instanceMatrix ); - transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); - transformedNormal = m * transformedNormal; -#endif -transformedNormal = normalMatrix * transformedNormal; -#ifdef FLIP_SIDED - transformedNormal = - transformedNormal; -#endif -#ifdef USE_TANGENT - vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #ifdef FLIP_SIDED - transformedTangent = - transformedTangent; - #endif -#endif\`,fh=\`#ifdef USE_DISPLACEMENTMAP - uniform sampler2D displacementMap; - uniform float displacementScale; - uniform float displacementBias; -#endif\`,dh=\`#ifdef USE_DISPLACEMENTMAP - transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias ); -#endif\`,ph=\`#ifdef USE_EMISSIVEMAP - vec4 emissiveColor = texture2D( emissiveMap, vUv ); - totalEmissiveRadiance *= emissiveColor.rgb; -#endif\`,mh=\`#ifdef USE_EMISSIVEMAP - uniform sampler2D emissiveMap; -#endif\`,gh="gl_FragColor = linearToOutputTexel( gl_FragColor );",xh=\`vec4 LinearToLinear( in vec4 value ) { - return value; -} -vec4 LinearTosRGB( in vec4 value ) { - return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); -}\`,_h=\`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vec3 cameraToFrag; - if ( isOrthographic ) { - cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToFrag = normalize( vWorldPosition - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vec3 reflectVec = reflect( cameraToFrag, worldNormal ); - #else - vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); - #endif - #else - vec3 reflectVec = vReflect; - #endif - #ifdef ENVMAP_TYPE_CUBE - vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); - #else - vec4 envColor = vec4( 0.0 ); - #endif - #ifdef ENVMAP_BLENDING_MULTIPLY - outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_MIX ) - outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_ADD ) - outgoingLight += envColor.xyz * specularStrength * reflectivity; - #endif -#endif\`,yh=\`#ifdef USE_ENVMAP - uniform float envMapIntensity; - uniform float flipEnvMap; - #ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; - #else - uniform sampler2D envMap; - #endif - -#endif\`,vh=\`#ifdef USE_ENVMAP - uniform float reflectivity; - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - varying vec3 vWorldPosition; - uniform float refractionRatio; - #else - varying vec3 vReflect; - #endif -#endif\`,Mh=\`#ifdef USE_ENVMAP - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - - varying vec3 vWorldPosition; - #else - varying vec3 vReflect; - uniform float refractionRatio; - #endif -#endif\`,bh=\`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vWorldPosition = worldPosition.xyz; - #else - vec3 cameraToVertex; - if ( isOrthographic ) { - cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vReflect = reflect( cameraToVertex, worldNormal ); - #else - vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); - #endif - #endif -#endif\`,wh=\`#ifdef USE_FOG - vFogDepth = - mvPosition.z; -#endif\`,Sh=\`#ifdef USE_FOG - varying float vFogDepth; -#endif\`,Th=\`#ifdef USE_FOG - #ifdef FOG_EXP2 - float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); - #else - float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); - #endif - gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif\`,Ah=\`#ifdef USE_FOG - uniform vec3 fogColor; - varying float vFogDepth; - #ifdef FOG_EXP2 - uniform float fogDensity; - #else - uniform float fogNear; - uniform float fogFar; - #endif -#endif\`,Eh=\`#ifdef USE_GRADIENTMAP - uniform sampler2D gradientMap; -#endif -vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { - float dotNL = dot( normal, lightDirection ); - vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); - #ifdef USE_GRADIENTMAP - return vec3( texture2D( gradientMap, coord ).r ); - #else - vec2 fw = fwidth( coord ) * 0.5; - return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); - #endif -}\`,Ch=\`#ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vUv2 ); - vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; - reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif\`,Ph=\`#ifdef USE_LIGHTMAP - uniform sampler2D lightMap; - uniform float lightMapIntensity; -#endif\`,Rh=\`LambertMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;\`,Lh=\`varying vec3 vViewPosition; -struct LambertMaterial { - vec3 diffuseColor; - float specularStrength; -}; -void RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert\`,Ih=\`uniform bool receiveShadow; -uniform vec3 ambientLightColor; -uniform vec3 lightProbe[ 9 ]; -vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { - float x = normal.x, y = normal.y, z = normal.z; - vec3 result = shCoefficients[ 0 ] * 0.886227; - result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; - result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; - result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; - result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; - result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; - result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); - result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; - result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); - return result; -} -vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); - return irradiance; -} -vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { - vec3 irradiance = ambientLightColor; - return irradiance; -} -float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { - #if defined ( PHYSICALLY_CORRECT_LIGHTS ) - float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); - if ( cutoffDistance > 0.0 ) { - distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); - } - return distanceFalloff; - #else - if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { - return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); - } - return 1.0; - #endif -} -float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { - return smoothstep( coneCosine, penumbraCosine, angleCosine ); -} -#if NUM_DIR_LIGHTS > 0 - struct DirectionalLight { - vec3 direction; - vec3 color; - }; - uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; - void getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) { - light.color = directionalLight.color; - light.direction = directionalLight.direction; - light.visible = true; - } -#endif -#if NUM_POINT_LIGHTS > 0 - struct PointLight { - vec3 position; - vec3 color; - float distance; - float decay; - }; - uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; - void getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) { - vec3 lVector = pointLight.position - geometry.position; - light.direction = normalize( lVector ); - float lightDistance = length( lVector ); - light.color = pointLight.color; - light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } -#endif -#if NUM_SPOT_LIGHTS > 0 - struct SpotLight { - vec3 position; - vec3 direction; - vec3 color; - float distance; - float decay; - float coneCos; - float penumbraCos; - }; - uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; - void getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) { - vec3 lVector = spotLight.position - geometry.position; - light.direction = normalize( lVector ); - float angleCos = dot( light.direction, spotLight.direction ); - float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); - if ( spotAttenuation > 0.0 ) { - float lightDistance = length( lVector ); - light.color = spotLight.color * spotAttenuation; - light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } else { - light.color = vec3( 0.0 ); - light.visible = false; - } - } -#endif -#if NUM_RECT_AREA_LIGHTS > 0 - struct RectAreaLight { - vec3 color; - vec3 position; - vec3 halfWidth; - vec3 halfHeight; - }; - uniform sampler2D ltc_1; uniform sampler2D ltc_2; - uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; -#endif -#if NUM_HEMI_LIGHTS > 0 - struct HemisphereLight { - vec3 direction; - vec3 skyColor; - vec3 groundColor; - }; - uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; - vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { - float dotNL = dot( normal, hemiLight.direction ); - float hemiDiffuseWeight = 0.5 * dotNL + 0.5; - vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); - return irradiance; - } -#endif\`,Dh=\`#if defined( USE_ENVMAP ) - vec3 getIBLIrradiance( const in vec3 normal ) { - #if defined( ENVMAP_TYPE_CUBE_UV ) - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); - return PI * envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } - vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { - #if defined( ENVMAP_TYPE_CUBE_UV ) - vec3 reflectVec = reflect( - viewDir, normal ); - reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); - reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); - return envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } -#endif\`,Nh=\`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;\`,Fh=\`varying vec3 vViewPosition; -struct ToonMaterial { - vec3 diffuseColor; -}; -void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon\`,zh=\`BlinnPhongMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularColor = specular; -material.specularShininess = shininess; -material.specularStrength = specularStrength;\`,Oh=\`varying vec3 vViewPosition; -struct BlinnPhongMaterial { - vec3 diffuseColor; - vec3 specularColor; - float specularShininess; - float specularStrength; -}; -void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); - reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength; -} -void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong\`,Bh=\`PhysicalMaterial material; -material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); -vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); -float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); -material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; -material.roughness = min( material.roughness, 1.0 ); -#ifdef IOR - material.ior = ior; - #ifdef SPECULAR - float specularIntensityFactor = specularIntensity; - vec3 specularColorFactor = specularColor; - #ifdef USE_SPECULARINTENSITYMAP - specularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a; - #endif - #ifdef USE_SPECULARCOLORMAP - specularColorFactor *= texture2D( specularColorMap, vUv ).rgb; - #endif - material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); - #else - float specularIntensityFactor = 1.0; - vec3 specularColorFactor = vec3( 1.0 ); - material.specularF90 = 1.0; - #endif - material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); -#else - material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); - material.specularF90 = 1.0; -#endif -#ifdef USE_CLEARCOAT - material.clearcoat = clearcoat; - material.clearcoatRoughness = clearcoatRoughness; - material.clearcoatF0 = vec3( 0.04 ); - material.clearcoatF90 = 1.0; - #ifdef USE_CLEARCOATMAP - material.clearcoat *= texture2D( clearcoatMap, vUv ).x; - #endif - #ifdef USE_CLEARCOAT_ROUGHNESSMAP - material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y; - #endif - material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); - material.clearcoatRoughness += geometryRoughness; - material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); -#endif -#ifdef USE_IRIDESCENCE - material.iridescence = iridescence; - material.iridescenceIOR = iridescenceIOR; - #ifdef USE_IRIDESCENCEMAP - material.iridescence *= texture2D( iridescenceMap, vUv ).r; - #endif - #ifdef USE_IRIDESCENCE_THICKNESSMAP - material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vUv ).g + iridescenceThicknessMinimum; - #else - material.iridescenceThickness = iridescenceThicknessMaximum; - #endif -#endif -#ifdef USE_SHEEN - material.sheenColor = sheenColor; - #ifdef USE_SHEENCOLORMAP - material.sheenColor *= texture2D( sheenColorMap, vUv ).rgb; - #endif - material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); - #ifdef USE_SHEENROUGHNESSMAP - material.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a; - #endif -#endif\`,Uh=\`struct PhysicalMaterial { - vec3 diffuseColor; - float roughness; - vec3 specularColor; - float specularF90; - #ifdef USE_CLEARCOAT - float clearcoat; - float clearcoatRoughness; - vec3 clearcoatF0; - float clearcoatF90; - #endif - #ifdef USE_IRIDESCENCE - float iridescence; - float iridescenceIOR; - float iridescenceThickness; - vec3 iridescenceFresnel; - vec3 iridescenceF0; - #endif - #ifdef USE_SHEEN - vec3 sheenColor; - float sheenRoughness; - #endif - #ifdef IOR - float ior; - #endif - #ifdef USE_TRANSMISSION - float transmission; - float transmissionAlpha; - float thickness; - float attenuationDistance; - vec3 attenuationColor; - #endif -}; -vec3 clearcoatSpecular = vec3( 0.0 ); -vec3 sheenSpecular = vec3( 0.0 ); -float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - float r2 = roughness * roughness; - float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; - float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; - float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); - return saturate( DG * RECIPROCAL_PI ); -} -vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); - const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); - vec4 r = roughness * c0 + c1; - float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; - vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; - return fab; -} -vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { - vec2 fab = DFGApprox( normal, viewDir, roughness ); - return specularColor * fab.x + specularF90 * fab.y; -} -#ifdef USE_IRIDESCENCE -void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { -#else -void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { -#endif - vec2 fab = DFGApprox( normal, viewDir, roughness ); - #ifdef USE_IRIDESCENCE - vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); - #else - vec3 Fr = specularColor; - #endif - vec3 FssEss = Fr * fab.x + specularF90 * fab.y; - float Ess = fab.x + fab.y; - float Ems = 1.0 - Ess; - vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); - singleScatter += FssEss; - multiScatter += Fms * Ems; -} -#if NUM_RECT_AREA_LIGHTS > 0 - void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - vec3 normal = geometry.normal; - vec3 viewDir = geometry.viewDir; - vec3 position = geometry.position; - vec3 lightPos = rectAreaLight.position; - vec3 halfWidth = rectAreaLight.halfWidth; - vec3 halfHeight = rectAreaLight.halfHeight; - vec3 lightColor = rectAreaLight.color; - float roughness = material.roughness; - vec3 rectCoords[ 4 ]; - rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; - rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; - rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; - vec2 uv = LTC_Uv( normal, viewDir, roughness ); - vec4 t1 = texture2D( ltc_1, uv ); - vec4 t2 = texture2D( ltc_2, uv ); - mat3 mInv = mat3( - vec3( t1.x, 0, t1.y ), - vec3( 0, 1, 0 ), - vec3( t1.z, 0, t1.w ) - ); - vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); - reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); - reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); - } -#endif -void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - #ifdef USE_CLEARCOAT - float dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) ); - vec3 ccIrradiance = dotNLcc * directLight.color; - clearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); - #endif - #ifdef USE_SHEEN - sheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness ); - #endif - #ifdef USE_IRIDESCENCE - reflectedLight.directSpecular += irradiance * BRDF_GGX_Iridescence( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness ); - #else - reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness ); - #endif - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { - #ifdef USE_CLEARCOAT - clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); - #endif - #ifdef USE_SHEEN - sheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness ); - #endif - vec3 singleScattering = vec3( 0.0 ); - vec3 multiScattering = vec3( 0.0 ); - vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; - #ifdef USE_IRIDESCENCE - computeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); - #else - computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); - #endif - vec3 totalScattering = singleScattering + multiScattering; - vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); - reflectedLight.indirectSpecular += radiance * singleScattering; - reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; - reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; -} -#define RE_Direct RE_Direct_Physical -#define RE_Direct_RectArea RE_Direct_RectArea_Physical -#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical -#define RE_IndirectSpecular RE_IndirectSpecular_Physical -float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { - return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}\`,kh=\` -GeometricContext geometry; -geometry.position = - vViewPosition; -geometry.normal = normal; -geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); -#ifdef USE_CLEARCOAT - geometry.clearcoatNormal = clearcoatNormal; -#endif -#ifdef USE_IRIDESCENCE - float dotNVi = saturate( dot( normal, geometry.viewDir ) ); - if ( material.iridescenceThickness == 0.0 ) { - material.iridescence = 0.0; - } else { - material.iridescence = saturate( material.iridescence ); - } - if ( material.iridescence > 0.0 ) { - material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); - material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); - } -#endif -IncidentLight directLight; -#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) - PointLight pointLight; - #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { - pointLight = pointLights[ i ]; - getPointLightInfo( pointLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) - pointLightShadow = pointLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) - SpotLight spotLight; - vec4 spotColor; - vec3 spotLightCoord; - bool inSpotLightMap; - #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { - spotLight = spotLights[ i ]; - getSpotLightInfo( spotLight, geometry, directLight ); - #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX - #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS - #else - #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #endif - #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) - spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; - inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); - spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); - directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; - #endif - #undef SPOT_LIGHT_MAP_INDEX - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - spotLightShadow = spotLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) - DirectionalLight directionalLight; - #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { - directionalLight = directionalLights[ i ]; - getDirectionalLightInfo( directionalLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) - directionalLightShadow = directionalLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) - RectAreaLight rectAreaLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { - rectAreaLight = rectAreaLights[ i ]; - RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if defined( RE_IndirectDiffuse ) - vec3 iblIrradiance = vec3( 0.0 ); - vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); - irradiance += getLightProbeIrradiance( lightProbe, geometry.normal ); - #if ( NUM_HEMI_LIGHTS > 0 ) - #pragma unroll_loop_start - for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { - irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal ); - } - #pragma unroll_loop_end - #endif -#endif -#if defined( RE_IndirectSpecular ) - vec3 radiance = vec3( 0.0 ); - vec3 clearcoatRadiance = vec3( 0.0 ); -#endif\`,Vh=\`#if defined( RE_IndirectDiffuse ) - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vUv2 ); - vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; - irradiance += lightMapIrradiance; - #endif - #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) - iblIrradiance += getIBLIrradiance( geometry.normal ); - #endif -#endif -#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) - radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness ); - #ifdef USE_CLEARCOAT - clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness ); - #endif -#endif\`,Gh=\`#if defined( RE_IndirectDiffuse ) - RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); -#endif -#if defined( RE_IndirectSpecular ) - RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); -#endif\`,Hh=\`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif\`,Wh=\`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - uniform float logDepthBufFC; - varying float vFragDepth; - varying float vIsPerspective; -#endif\`,qh=\`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - varying float vFragDepth; - varying float vIsPerspective; - #else - uniform float logDepthBufFC; - #endif -#endif\`,Xh=\`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - vFragDepth = 1.0 + gl_Position.w; - vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); - #else - if ( isPerspectiveMatrix( projectionMatrix ) ) { - gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; - gl_Position.z *= gl_Position.w; - } - #endif -#endif\`,Yh=\`#ifdef USE_MAP - vec4 sampledDiffuseColor = texture2D( map, vUv ); - #ifdef DECODE_VIDEO_TEXTURE - sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); - #endif - diffuseColor *= sampledDiffuseColor; -#endif\`,Zh=\`#ifdef USE_MAP - uniform sampler2D map; -#endif\`,Jh=\`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; -#endif -#ifdef USE_MAP - diffuseColor *= texture2D( map, uv ); -#endif -#ifdef USE_ALPHAMAP - diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif\`,$h=\`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - uniform mat3 uvTransform; -#endif -#ifdef USE_MAP - uniform sampler2D map; -#endif -#ifdef USE_ALPHAMAP - uniform sampler2D alphaMap; -#endif\`,Kh=\`float metalnessFactor = metalness; -#ifdef USE_METALNESSMAP - vec4 texelMetalness = texture2D( metalnessMap, vUv ); - metalnessFactor *= texelMetalness.b; -#endif\`,jh=\`#ifdef USE_METALNESSMAP - uniform sampler2D metalnessMap; -#endif\`,Qh=\`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) - vColor *= morphTargetBaseInfluence; - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - #if defined( USE_COLOR_ALPHA ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; - #elif defined( USE_COLOR ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; - #endif - } -#endif\`,tu=\`#ifdef USE_MORPHNORMALS - objectNormal *= morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; - } - #else - objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; - objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; - objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; - objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; - #endif -#endif\`,eu=\`#ifdef USE_MORPHTARGETS - uniform float morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; - uniform sampler2DArray morphTargetsTexture; - uniform ivec2 morphTargetsTextureSize; - vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { - int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; - int y = texelIndex / morphTargetsTextureSize.x; - int x = texelIndex - y * morphTargetsTextureSize.x; - ivec3 morphUV = ivec3( x, y, morphTargetIndex ); - return texelFetch( morphTargetsTexture, morphUV, 0 ); - } - #else - #ifndef USE_MORPHNORMALS - uniform float morphTargetInfluences[ 8 ]; - #else - uniform float morphTargetInfluences[ 4 ]; - #endif - #endif -#endif\`,nu=\`#ifdef USE_MORPHTARGETS - transformed *= morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; - } - #else - transformed += morphTarget0 * morphTargetInfluences[ 0 ]; - transformed += morphTarget1 * morphTargetInfluences[ 1 ]; - transformed += morphTarget2 * morphTargetInfluences[ 2 ]; - transformed += morphTarget3 * morphTargetInfluences[ 3 ]; - #ifndef USE_MORPHNORMALS - transformed += morphTarget4 * morphTargetInfluences[ 4 ]; - transformed += morphTarget5 * morphTargetInfluences[ 5 ]; - transformed += morphTarget6 * morphTargetInfluences[ 6 ]; - transformed += morphTarget7 * morphTargetInfluences[ 7 ]; - #endif - #endif -#endif\`,iu=\`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; -#ifdef FLAT_SHADED - vec3 fdx = dFdx( vViewPosition ); - vec3 fdy = dFdy( vViewPosition ); - vec3 normal = normalize( cross( fdx, fdy ) ); -#else - vec3 normal = normalize( vNormal ); - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - #ifdef USE_TANGENT - vec3 tangent = normalize( vTangent ); - vec3 bitangent = normalize( vBitangent ); - #ifdef DOUBLE_SIDED - tangent = tangent * faceDirection; - bitangent = bitangent * faceDirection; - #endif - #if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP ) - mat3 vTBN = mat3( tangent, bitangent, normal ); - #endif - #endif -#endif -vec3 geometryNormal = normal;\`,su=\`#ifdef OBJECTSPACE_NORMALMAP - normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; - #ifdef FLIP_SIDED - normal = - normal; - #endif - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - normal = normalize( normalMatrix * normal ); -#elif defined( TANGENTSPACE_NORMALMAP ) - vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; - mapN.xy *= normalScale; - #ifdef USE_TANGENT - normal = normalize( vTBN * mapN ); - #else - normal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection ); - #endif -#elif defined( USE_BUMPMAP ) - normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif\`,ru=\`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif\`,ou=\`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif\`,au=\`#ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); - #ifdef USE_TANGENT - vTangent = normalize( transformedTangent ); - vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); - #endif -#endif\`,cu=\`#ifdef USE_NORMALMAP - uniform sampler2D normalMap; - uniform vec2 normalScale; -#endif -#ifdef OBJECTSPACE_NORMALMAP - uniform mat3 normalMatrix; -#endif -#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) ) - vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) { - vec3 q0 = dFdx( eye_pos.xyz ); - vec3 q1 = dFdy( eye_pos.xyz ); - vec2 st0 = dFdx( vUv.st ); - vec2 st1 = dFdy( vUv.st ); - vec3 N = surf_norm; - vec3 q1perp = cross( q1, N ); - vec3 q0perp = cross( N, q0 ); - vec3 T = q1perp * st0.x + q0perp * st1.x; - vec3 B = q1perp * st0.y + q0perp * st1.y; - float det = max( dot( T, T ), dot( B, B ) ); - float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det ); - return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z ); - } -#endif\`,lu=\`#ifdef USE_CLEARCOAT - vec3 clearcoatNormal = geometryNormal; -#endif\`,hu=\`#ifdef USE_CLEARCOAT_NORMALMAP - vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0; - clearcoatMapN.xy *= clearcoatNormalScale; - #ifdef USE_TANGENT - clearcoatNormal = normalize( vTBN * clearcoatMapN ); - #else - clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection ); - #endif -#endif\`,uu=\`#ifdef USE_CLEARCOATMAP - uniform sampler2D clearcoatMap; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - uniform sampler2D clearcoatRoughnessMap; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - uniform sampler2D clearcoatNormalMap; - uniform vec2 clearcoatNormalScale; -#endif\`,fu=\`#ifdef USE_IRIDESCENCEMAP - uniform sampler2D iridescenceMap; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - uniform sampler2D iridescenceThicknessMap; -#endif\`,du=\`#ifdef OPAQUE -diffuseColor.a = 1.0; -#endif -#ifdef USE_TRANSMISSION -diffuseColor.a *= material.transmissionAlpha + 0.1; -#endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );\`,pu=\`vec3 packNormalToRGB( const in vec3 normal ) { - return normalize( normal ) * 0.5 + 0.5; -} -vec3 unpackRGBToNormal( const in vec3 rgb ) { - return 2.0 * rgb.xyz - 1.0; -} -const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; -const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); -const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); -const float ShiftRight8 = 1. / 256.; -vec4 packDepthToRGBA( const in float v ) { - vec4 r = vec4( fract( v * PackFactors ), v ); - r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; -} -float unpackRGBAToDepth( const in vec4 v ) { - return dot( v, UnpackFactors ); -} -vec2 packDepthToRG( in highp float v ) { - return packDepthToRGBA( v ).yx; -} -float unpackRGToDepth( const in highp vec2 v ) { - return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); -} -vec4 pack2HalfToRGBA( vec2 v ) { - vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); - return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); -} -vec2 unpackRGBATo2Half( vec4 v ) { - return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); -} -float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { - return ( viewZ + near ) / ( near - far ); -} -float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) { - return linearClipZ * ( near - far ) - near; -} -float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { - return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); -} -float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) { - return ( near * far ) / ( ( far - near ) * invClipZ - far ); -}\`,mu=\`#ifdef PREMULTIPLIED_ALPHA - gl_FragColor.rgb *= gl_FragColor.a; -#endif\`,gu=\`vec4 mvPosition = vec4( transformed, 1.0 ); -#ifdef USE_INSTANCING - mvPosition = instanceMatrix * mvPosition; -#endif -mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;\`,xu=\`#ifdef DITHERING - gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif\`,_u=\`#ifdef DITHERING - vec3 dithering( vec3 color ) { - float grid_position = rand( gl_FragCoord.xy ); - vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); - dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); - return color + dither_shift_RGB; - } -#endif\`,yu=\`float roughnessFactor = roughness; -#ifdef USE_ROUGHNESSMAP - vec4 texelRoughness = texture2D( roughnessMap, vUv ); - roughnessFactor *= texelRoughness.g; -#endif\`,vu=\`#ifdef USE_ROUGHNESSMAP - uniform sampler2D roughnessMap; -#endif\`,Mu=\`#if NUM_SPOT_LIGHT_COORDS > 0 - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#if NUM_SPOT_LIGHT_MAPS > 0 - uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif - float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { - return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); - } - vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { - return unpackRGBATo2Half( texture2D( shadow, uv ) ); - } - float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ - float occlusion = 1.0; - vec2 distribution = texture2DDistribution( shadow, uv ); - float hard_shadow = step( compare , distribution.x ); - if (hard_shadow != 1.0 ) { - float distance = compare - distribution.x ; - float variance = max( 0.00000, distribution.y * distribution.y ); - float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); - } - return occlusion; - } - float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { - float shadow = 1.0; - shadowCoord.xyz /= shadowCoord.w; - shadowCoord.z += shadowBias; - bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; - bool frustumTest = inFrustum && shadowCoord.z <= 1.0; - if ( frustumTest ) { - #if defined( SHADOWMAP_TYPE_PCF ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx0 = - texelSize.x * shadowRadius; - float dy0 = - texelSize.y * shadowRadius; - float dx1 = + texelSize.x * shadowRadius; - float dy1 = + texelSize.y * shadowRadius; - float dx2 = dx0 / 2.0; - float dy2 = dy0 / 2.0; - float dx3 = dx1 / 2.0; - float dy3 = dy1 / 2.0; - shadow = ( - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) - ) * ( 1.0 / 17.0 ); - #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx = texelSize.x; - float dy = texelSize.y; - vec2 uv = shadowCoord.xy; - vec2 f = fract( uv * shadowMapSize + 0.5 ); - uv -= f * texelSize; - shadow = ( - texture2DCompare( shadowMap, uv, shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), - f.x ), - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), - f.x ), - f.y ) - ) * ( 1.0 / 9.0 ); - #elif defined( SHADOWMAP_TYPE_VSM ) - shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); - #else - shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); - #endif - } - return shadow; - } - vec2 cubeToUV( vec3 v, float texelSizeY ) { - vec3 absV = abs( v ); - float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); - absV *= scaleToCube; - v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); - vec2 planar = v.xy; - float almostATexel = 1.5 * texelSizeY; - float almostOne = 1.0 - almostATexel; - if ( absV.z >= almostOne ) { - if ( v.z > 0.0 ) - planar.x = 4.0 - v.x; - } else if ( absV.x >= almostOne ) { - float signX = sign( v.x ); - planar.x = v.z * signX + 2.0 * signX; - } else if ( absV.y >= almostOne ) { - float signY = sign( v.y ); - planar.x = v.x + 2.0 * signY + 2.0; - planar.y = v.z * signY - 2.0; - } - return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); - } - float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { - vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); - vec3 lightToPosition = shadowCoord.xyz; - float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; - vec3 bd3D = normalize( lightToPosition ); - #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) - vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; - return ( - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) - ) * ( 1.0 / 9.0 ); - #else - return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); - #endif - } -#endif\`,bu=\`#if NUM_SPOT_LIGHT_COORDS > 0 - uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif -#endif\`,wu=\`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) - vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - vec4 shadowWorldPosition; -#endif -#if defined( USE_SHADOWMAP ) - #if NUM_DIR_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); - vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); - vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif -#endif -#if NUM_SPOT_LIGHT_COORDS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { - shadowWorldPosition = worldPosition; - #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; - #endif - vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end -#endif\`,Su=\`float getShadowMask() { - float shadow = 1.0; - #ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - directionalLight = directionalLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { - spotLight = spotLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - pointLight = pointLightShadows[ i ]; - shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; - } - #pragma unroll_loop_end - #endif - #endif - return shadow; -}\`,Tu=\`#ifdef USE_SKINNING - mat4 boneMatX = getBoneMatrix( skinIndex.x ); - mat4 boneMatY = getBoneMatrix( skinIndex.y ); - mat4 boneMatZ = getBoneMatrix( skinIndex.z ); - mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif\`,Au=\`#ifdef USE_SKINNING - uniform mat4 bindMatrix; - uniform mat4 bindMatrixInverse; - uniform highp sampler2D boneTexture; - uniform int boneTextureSize; - mat4 getBoneMatrix( const in float i ) { - float j = i * 4.0; - float x = mod( j, float( boneTextureSize ) ); - float y = floor( j / float( boneTextureSize ) ); - float dx = 1.0 / float( boneTextureSize ); - float dy = 1.0 / float( boneTextureSize ); - y = dy * ( y + 0.5 ); - vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); - vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); - vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); - vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); - mat4 bone = mat4( v1, v2, v3, v4 ); - return bone; - } -#endif\`,Eu=\`#ifdef USE_SKINNING - vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); - vec4 skinned = vec4( 0.0 ); - skinned += boneMatX * skinVertex * skinWeight.x; - skinned += boneMatY * skinVertex * skinWeight.y; - skinned += boneMatZ * skinVertex * skinWeight.z; - skinned += boneMatW * skinVertex * skinWeight.w; - transformed = ( bindMatrixInverse * skinned ).xyz; -#endif\`,Cu=\`#ifdef USE_SKINNING - mat4 skinMatrix = mat4( 0.0 ); - skinMatrix += skinWeight.x * boneMatX; - skinMatrix += skinWeight.y * boneMatY; - skinMatrix += skinWeight.z * boneMatZ; - skinMatrix += skinWeight.w * boneMatW; - skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; - objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; - #ifdef USE_TANGENT - objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #endif -#endif\`,Pu=\`float specularStrength; -#ifdef USE_SPECULARMAP - vec4 texelSpecular = texture2D( specularMap, vUv ); - specularStrength = texelSpecular.r; -#else - specularStrength = 1.0; -#endif\`,Ru=\`#ifdef USE_SPECULARMAP - uniform sampler2D specularMap; -#endif\`,Lu=\`#if defined( TONE_MAPPING ) - gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif\`,Iu=\`#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -uniform float toneMappingExposure; -vec3 LinearToneMapping( vec3 color ) { - return toneMappingExposure * color; -} -vec3 ReinhardToneMapping( vec3 color ) { - color *= toneMappingExposure; - return saturate( color / ( vec3( 1.0 ) + color ) ); -} -vec3 OptimizedCineonToneMapping( vec3 color ) { - color *= toneMappingExposure; - color = max( vec3( 0.0 ), color - 0.004 ); - return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); -} -vec3 RRTAndODTFit( vec3 v ) { - vec3 a = v * ( v + 0.0245786 ) - 0.000090537; - vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; - return a / b; -} -vec3 ACESFilmicToneMapping( vec3 color ) { - const mat3 ACESInputMat = mat3( - vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), - vec3( 0.04823, 0.01566, 0.83777 ) - ); - const mat3 ACESOutputMat = mat3( - vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), - vec3( -0.07367, -0.00605, 1.07602 ) - ); - color *= toneMappingExposure / 0.6; - color = ACESInputMat * color; - color = RRTAndODTFit( color ); - color = ACESOutputMat * color; - return saturate( color ); -} -vec3 CustomToneMapping( vec3 color ) { return color; }\`,Du=\`#ifdef USE_TRANSMISSION - material.transmission = transmission; - material.transmissionAlpha = 1.0; - material.thickness = thickness; - material.attenuationDistance = attenuationDistance; - material.attenuationColor = attenuationColor; - #ifdef USE_TRANSMISSIONMAP - material.transmission *= texture2D( transmissionMap, vUv ).r; - #endif - #ifdef USE_THICKNESSMAP - material.thickness *= texture2D( thicknessMap, vUv ).g; - #endif - vec3 pos = vWorldPosition; - vec3 v = normalize( cameraPosition - pos ); - vec3 n = inverseTransformDirection( normal, viewMatrix ); - vec4 transmission = getIBLVolumeRefraction( - n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, - pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, - material.attenuationColor, material.attenuationDistance ); - material.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission ); - totalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission ); -#endif\`,Nu=\`#ifdef USE_TRANSMISSION - uniform float transmission; - uniform float thickness; - uniform float attenuationDistance; - uniform vec3 attenuationColor; - #ifdef USE_TRANSMISSIONMAP - uniform sampler2D transmissionMap; - #endif - #ifdef USE_THICKNESSMAP - uniform sampler2D thicknessMap; - #endif - uniform vec2 transmissionSamplerSize; - uniform sampler2D transmissionSamplerMap; - uniform mat4 modelMatrix; - uniform mat4 projectionMatrix; - varying vec3 vWorldPosition; - vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { - vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); - vec3 modelScale; - modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); - modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); - modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); - return normalize( refractionVector ) * thickness * modelScale; - } - float applyIorToRoughness( const in float roughness, const in float ior ) { - return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); - } - vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { - float framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); - #ifdef texture2DLodEXT - return texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod ); - #else - return texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod ); - #endif - } - vec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { - if ( isinf( attenuationDistance ) ) { - return radiance; - } else { - vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; - vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance * radiance; - } - } - vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, - const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, - const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, - const in vec3 attenuationColor, const in float attenuationDistance ) { - vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); - vec3 refractedRayExit = position + transmissionRay; - vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); - vec2 refractionCoords = ndcPos.xy / ndcPos.w; - refractionCoords += 1.0; - refractionCoords /= 2.0; - vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); - vec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance ); - vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); - return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a ); - } -#endif\`,Fu=\`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) - varying vec2 vUv; -#endif\`,zu=\`#ifdef USE_UV - #ifdef UVS_VERTEX_ONLY - vec2 vUv; - #else - varying vec2 vUv; - #endif - uniform mat3 uvTransform; -#endif\`,Ou=\`#ifdef USE_UV - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; -#endif\`,Bu=\`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - varying vec2 vUv2; -#endif\`,Uu=\`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - attribute vec2 uv2; - varying vec2 vUv2; - uniform mat3 uv2Transform; -#endif\`,ku=\`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy; -#endif\`,Vu=\`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 - vec4 worldPosition = vec4( transformed, 1.0 ); - #ifdef USE_INSTANCING - worldPosition = instanceMatrix * worldPosition; - #endif - worldPosition = modelMatrix * worldPosition; -#endif\`,Gu=\`varying vec2 vUv; -uniform mat3 uvTransform; -void main() { - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - gl_Position = vec4( position.xy, 1.0, 1.0 ); -}\`,Hu=\`uniform sampler2D t2D; -uniform float backgroundIntensity; -varying vec2 vUv; -void main() { - vec4 texColor = texture2D( t2D, vUv ); - #ifdef DECODE_VIDEO_TEXTURE - texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}\`,Wu=\`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}\`,qu=\`#ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; -#elif defined( ENVMAP_TYPE_CUBE_UV ) - uniform sampler2D envMap; -#endif -uniform float flipEnvMap; -uniform float backgroundBlurriness; -uniform float backgroundIntensity; -varying vec3 vWorldDirection; -#include -void main() { - #ifdef ENVMAP_TYPE_CUBE - vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); - #elif defined( ENVMAP_TYPE_CUBE_UV ) - vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness ); - #else - vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}\`,Xu=\`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}\`,Yu=\`uniform samplerCube tCube; -uniform float tFlip; -uniform float opacity; -varying vec3 vWorldDirection; -void main() { - vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); - gl_FragColor = texColor; - gl_FragColor.a *= opacity; - #include - #include -}\`,Zu=\`#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vHighPrecisionZW = gl_Position.zw; -}\`,Ju=\`#if DEPTH_PACKING == 3200 - uniform float opacity; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - vec4 diffuseColor = vec4( 1.0 ); - #if DEPTH_PACKING == 3200 - diffuseColor.a = opacity; - #endif - #include - #include - #include - #include - float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; - #if DEPTH_PACKING == 3200 - gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); - #elif DEPTH_PACKING == 3201 - gl_FragColor = packDepthToRGBA( fragCoordZ ); - #endif -}\`,$u=\`#define DISTANCE -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vWorldPosition = worldPosition.xyz; -}\`,Ku=\`#define DISTANCE -uniform vec3 referencePosition; -uniform float nearDistance; -uniform float farDistance; -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -#include -void main () { - #include - vec4 diffuseColor = vec4( 1.0 ); - #include - #include - #include - float dist = length( vWorldPosition - referencePosition ); - dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); - dist = saturate( dist ); - gl_FragColor = packDepthToRGBA( dist ); -}\`,ju=\`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include -}\`,Qu=\`uniform sampler2D tEquirect; -varying vec3 vWorldDirection; -#include -void main() { - vec3 direction = normalize( vWorldDirection ); - vec2 sampleUV = equirectUv( direction ); - gl_FragColor = texture2D( tEquirect, sampleUV ); - #include - #include -}\`,tf=\`uniform float scale; -attribute float lineDistance; -varying float vLineDistance; -#include -#include -#include -#include -#include -#include -void main() { - vLineDistance = scale * lineDistance; - #include - #include - #include - #include - #include - #include - #include - #include -}\`,ef=\`uniform vec3 diffuse; -uniform float opacity; -uniform float dashSize; -uniform float totalSize; -varying float vLineDistance; -#include -#include -#include -#include -#include -void main() { - #include - if ( mod( vLineDistance, totalSize ) > dashSize ) { - discard; - } - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}\`,nf=\`#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) - #include - #include - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include -}\`,sf=\`uniform vec3 diffuse; -uniform float opacity; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vUv2 ); - reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; - #else - reflectedLight.indirectDiffuse += vec3( 1.0 ); - #endif - #include - reflectedLight.indirectDiffuse *= diffuseColor.rgb; - vec3 outgoingLight = reflectedLight.indirectDiffuse; - #include - #include - #include - #include - #include - #include - #include -}\`,rf=\`#define LAMBERT -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}\`,of=\`#define LAMBERT -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}\`,af=\`#define MATCAP -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; -}\`,cf=\`#define MATCAP -uniform vec3 diffuse; -uniform float opacity; -uniform sampler2D matcap; -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - #include - vec3 viewDir = normalize( vViewPosition ); - vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); - vec3 y = cross( viewDir, x ); - vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; - #ifdef USE_MATCAP - vec4 matcapColor = texture2D( matcap, uv ); - #else - vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); - #endif - vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; - #include - #include - #include - #include - #include - #include -}\`,lf=\`#define NORMAL -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - vViewPosition = - mvPosition.xyz; -#endif -}\`,hf=\`#define NORMAL -uniform float opacity; -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); - #ifdef OPAQUE - gl_FragColor.a = 1.0; - #endif -}\`,uf=\`#define PHONG -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}\`,ff=\`#define PHONG -uniform vec3 diffuse; -uniform vec3 emissive; -uniform vec3 specular; -uniform float shininess; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}\`,df=\`#define STANDARD -varying vec3 vViewPosition; -#ifdef USE_TRANSMISSION - varying vec3 vWorldPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -#ifdef USE_TRANSMISSION - vWorldPosition = worldPosition.xyz; -#endif -}\`,pf=\`#define STANDARD -#ifdef PHYSICAL - #define IOR - #define SPECULAR -#endif -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float roughness; -uniform float metalness; -uniform float opacity; -#ifdef IOR - uniform float ior; -#endif -#ifdef SPECULAR - uniform float specularIntensity; - uniform vec3 specularColor; - #ifdef USE_SPECULARINTENSITYMAP - uniform sampler2D specularIntensityMap; - #endif - #ifdef USE_SPECULARCOLORMAP - uniform sampler2D specularColorMap; - #endif -#endif -#ifdef USE_CLEARCOAT - uniform float clearcoat; - uniform float clearcoatRoughness; -#endif -#ifdef USE_IRIDESCENCE - uniform float iridescence; - uniform float iridescenceIOR; - uniform float iridescenceThicknessMinimum; - uniform float iridescenceThicknessMaximum; -#endif -#ifdef USE_SHEEN - uniform vec3 sheenColor; - uniform float sheenRoughness; - #ifdef USE_SHEENCOLORMAP - uniform sampler2D sheenColorMap; - #endif - #ifdef USE_SHEENROUGHNESSMAP - uniform sampler2D sheenRoughnessMap; - #endif -#endif -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; - vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; - #include - vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; - #ifdef USE_SHEEN - float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); - outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular; - #endif - #ifdef USE_CLEARCOAT - float dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) ); - vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); - outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat; - #endif - #include - #include - #include - #include - #include - #include -}\`,mf=\`#define TOON -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -}\`,gf=\`#define TOON -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include -}\`,xf=\`uniform float size; -uniform float scale; -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - gl_PointSize = size; - #ifdef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); - #endif - #include - #include - #include - #include -}\`,_f=\`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}\`,yf=\`#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}\`,vf=\`uniform vec3 color; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -void main() { - gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); - #include - #include - #include -}\`,Mf=\`uniform float rotation; -uniform vec2 center; -#include -#include -#include -#include -#include -void main() { - #include - vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); - vec2 scale; - scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); - scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); - #ifndef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) scale *= - mvPosition.z; - #endif - vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; - vec2 rotatedPosition; - rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; - rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; - mvPosition.xy += rotatedPosition; - gl_Position = projectionMatrix * mvPosition; - #include - #include - #include -}\`,bf=\`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include -}\`,wt={alphamap_fragment:Wl,alphamap_pars_fragment:ql,alphatest_fragment:Xl,alphatest_pars_fragment:Yl,aomap_fragment:Zl,aomap_pars_fragment:Jl,begin_vertex:$l,beginnormal_vertex:Kl,bsdfs:jl,iridescence_fragment:Ql,bumpmap_pars_fragment:th,clipping_planes_fragment:eh,clipping_planes_pars_fragment:nh,clipping_planes_pars_vertex:ih,clipping_planes_vertex:sh,color_fragment:rh,color_pars_fragment:oh,color_pars_vertex:ah,color_vertex:ch,common:lh,cube_uv_reflection_fragment:hh,defaultnormal_vertex:uh,displacementmap_pars_vertex:fh,displacementmap_vertex:dh,emissivemap_fragment:ph,emissivemap_pars_fragment:mh,encodings_fragment:gh,encodings_pars_fragment:xh,envmap_fragment:_h,envmap_common_pars_fragment:yh,envmap_pars_fragment:vh,envmap_pars_vertex:Mh,envmap_physical_pars_fragment:Dh,envmap_vertex:bh,fog_vertex:wh,fog_pars_vertex:Sh,fog_fragment:Th,fog_pars_fragment:Ah,gradientmap_pars_fragment:Eh,lightmap_fragment:Ch,lightmap_pars_fragment:Ph,lights_lambert_fragment:Rh,lights_lambert_pars_fragment:Lh,lights_pars_begin:Ih,lights_toon_fragment:Nh,lights_toon_pars_fragment:Fh,lights_phong_fragment:zh,lights_phong_pars_fragment:Oh,lights_physical_fragment:Bh,lights_physical_pars_fragment:Uh,lights_fragment_begin:kh,lights_fragment_maps:Vh,lights_fragment_end:Gh,logdepthbuf_fragment:Hh,logdepthbuf_pars_fragment:Wh,logdepthbuf_pars_vertex:qh,logdepthbuf_vertex:Xh,map_fragment:Yh,map_pars_fragment:Zh,map_particle_fragment:Jh,map_particle_pars_fragment:$h,metalnessmap_fragment:Kh,metalnessmap_pars_fragment:jh,morphcolor_vertex:Qh,morphnormal_vertex:tu,morphtarget_pars_vertex:eu,morphtarget_vertex:nu,normal_fragment_begin:iu,normal_fragment_maps:su,normal_pars_fragment:ru,normal_pars_vertex:ou,normal_vertex:au,normalmap_pars_fragment:cu,clearcoat_normal_fragment_begin:lu,clearcoat_normal_fragment_maps:hu,clearcoat_pars_fragment:uu,iridescence_pars_fragment:fu,output_fragment:du,packing:pu,premultiplied_alpha_fragment:mu,project_vertex:gu,dithering_fragment:xu,dithering_pars_fragment:_u,roughnessmap_fragment:yu,roughnessmap_pars_fragment:vu,shadowmap_pars_fragment:Mu,shadowmap_pars_vertex:bu,shadowmap_vertex:wu,shadowmask_pars_fragment:Su,skinbase_vertex:Tu,skinning_pars_vertex:Au,skinning_vertex:Eu,skinnormal_vertex:Cu,specularmap_fragment:Pu,specularmap_pars_fragment:Ru,tonemapping_fragment:Lu,tonemapping_pars_fragment:Iu,transmission_fragment:Du,transmission_pars_fragment:Nu,uv_pars_fragment:Fu,uv_pars_vertex:zu,uv_vertex:Ou,uv2_pars_fragment:Bu,uv2_pars_vertex:Uu,uv2_vertex:ku,worldpos_vertex:Vu,background_vert:Gu,background_frag:Hu,backgroundCube_vert:Wu,backgroundCube_frag:qu,cube_vert:Xu,cube_frag:Yu,depth_vert:Zu,depth_frag:Ju,distanceRGBA_vert:$u,distanceRGBA_frag:Ku,equirect_vert:ju,equirect_frag:Qu,linedashed_vert:tf,linedashed_frag:ef,meshbasic_vert:nf,meshbasic_frag:sf,meshlambert_vert:rf,meshlambert_frag:of,meshmatcap_vert:af,meshmatcap_frag:cf,meshnormal_vert:lf,meshnormal_frag:hf,meshphong_vert:uf,meshphong_frag:ff,meshphysical_vert:df,meshphysical_frag:pf,meshtoon_vert:mf,meshtoon_frag:gf,points_vert:xf,points_frag:_f,shadow_vert:yf,shadow_frag:vf,sprite_vert:Mf,sprite_frag:bf},et={common:{diffuse:{value:new Bt(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new le},uv2Transform:{value:new le},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new At(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Bt(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 Bt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new le}},sprite:{diffuse:{value:new Bt(16777215)},opacity:{value:1},center:{value:new At(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new le}}},He={basic:{uniforms:ae([et.common,et.specularmap,et.envmap,et.aomap,et.lightmap,et.fog]),vertexShader:wt.meshbasic_vert,fragmentShader:wt.meshbasic_frag},lambert:{uniforms:ae([et.common,et.specularmap,et.envmap,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.fog,et.lights,{emissive:{value:new Bt(0)}}]),vertexShader:wt.meshlambert_vert,fragmentShader:wt.meshlambert_frag},phong:{uniforms:ae([et.common,et.specularmap,et.envmap,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.fog,et.lights,{emissive:{value:new Bt(0)},specular:{value:new Bt(1118481)},shininess:{value:30}}]),vertexShader:wt.meshphong_vert,fragmentShader:wt.meshphong_frag},standard:{uniforms:ae([et.common,et.envmap,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.roughnessmap,et.metalnessmap,et.fog,et.lights,{emissive:{value:new Bt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:wt.meshphysical_vert,fragmentShader:wt.meshphysical_frag},toon:{uniforms:ae([et.common,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.gradientmap,et.fog,et.lights,{emissive:{value:new Bt(0)}}]),vertexShader:wt.meshtoon_vert,fragmentShader:wt.meshtoon_frag},matcap:{uniforms:ae([et.common,et.bumpmap,et.normalmap,et.displacementmap,et.fog,{matcap:{value:null}}]),vertexShader:wt.meshmatcap_vert,fragmentShader:wt.meshmatcap_frag},points:{uniforms:ae([et.points,et.fog]),vertexShader:wt.points_vert,fragmentShader:wt.points_frag},dashed:{uniforms:ae([et.common,et.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:wt.linedashed_vert,fragmentShader:wt.linedashed_frag},depth:{uniforms:ae([et.common,et.displacementmap]),vertexShader:wt.depth_vert,fragmentShader:wt.depth_frag},normal:{uniforms:ae([et.common,et.bumpmap,et.normalmap,et.displacementmap,{opacity:{value:1}}]),vertexShader:wt.meshnormal_vert,fragmentShader:wt.meshnormal_frag},sprite:{uniforms:ae([et.sprite,et.fog]),vertexShader:wt.sprite_vert,fragmentShader:wt.sprite_frag},background:{uniforms:{uvTransform:{value:new le},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:wt.background_vert,fragmentShader:wt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:wt.backgroundCube_vert,fragmentShader:wt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:wt.cube_vert,fragmentShader:wt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:wt.equirect_vert,fragmentShader:wt.equirect_frag},distanceRGBA:{uniforms:ae([et.common,et.displacementmap,{referencePosition:{value:new R},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:wt.distanceRGBA_vert,fragmentShader:wt.distanceRGBA_frag},shadow:{uniforms:ae([et.lights,et.fog,{color:{value:new Bt(0)},opacity:{value:1}}]),vertexShader:wt.shadow_vert,fragmentShader:wt.shadow_frag}};He.physical={uniforms:ae([He.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new At(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new Bt(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new At},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Bt(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Bt(1,1,1)},specularColorMap:{value:null}}]),vertexShader:wt.meshphysical_vert,fragmentShader:wt.meshphysical_frag};var fs={r:0,b:0,g:0};function wf(r,t,e,n,i,s,a){let o=new Bt(0),c=s===!0?0:1,l,h,f=null,u=0,m=null;function x(d,g){let M=!1,_=g.isScene===!0?g.background:null;_&&_.isTexture&&(_=(g.backgroundBlurriness>0?e:t).get(_));let v=r.xr,b=v.getSession&&v.getSession();b&&b.environmentBlendMode==="additive"&&(_=null),_===null?p(o,c):_&&_.isColor&&(p(_,1),M=!0),(r.autoClear||M)&&r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil),_&&(_.isCubeTexture||_.mapping===Ls)?(h===void 0&&(h=new qe(new zn(1,1,1),new on({name:"BackgroundCubeMaterial",uniforms:di(He.backgroundCube.uniforms),vertexShader:He.backgroundCube.vertexShader,fragmentShader:He.backgroundCube.fragmentShader,side:he,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(A,C,y){this.matrixWorld.copyPosition(y.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(h)),h.material.uniforms.envMap.value=_,h.material.uniforms.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,h.material.toneMapped=_.encoding!==Ot,(f!==_||u!==_.version||m!==r.toneMapping)&&(h.material.needsUpdate=!0,f=_,u=_.version,m=r.toneMapping),h.layers.enableAll(),d.unshift(h,h.geometry,h.material,0,0,null)):_&&_.isTexture&&(l===void 0&&(l=new qe(new ki(2,2),new on({name:"BackgroundMaterial",uniforms:di(He.background.uniforms),vertexShader:He.background.vertexShader,fragmentShader:He.background.fragmentShader,side:Ue,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=_,l.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,l.material.toneMapped=_.encoding!==Ot,_.matrixAutoUpdate===!0&&_.updateMatrix(),l.material.uniforms.uvTransform.value.copy(_.matrix),(f!==_||u!==_.version||m!==r.toneMapping)&&(l.material.needsUpdate=!0,f=_,u=_.version,m=r.toneMapping),l.layers.enableAll(),d.unshift(l,l.geometry,l.material,0,0,null))}function p(d,g){d.getRGB(fs,ja(r)),n.buffers.color.setClear(fs.r,fs.g,fs.b,g,a)}return{getClearColor:function(){return o},setClearColor:function(d,g=1){o.set(d),c=g,p(o,c)},getClearAlpha:function(){return c},setClearAlpha:function(d){c=d,p(o,c)},render:x}}function Sf(r,t,e,n){let i=r.getParameter(34921),s=n.isWebGL2?null:t.get("OES_vertex_array_object"),a=n.isWebGL2||s!==null,o={},c=d(null),l=c,h=!1;function f(I,k,Y,Z,H){let $=!1;if(a){let J=p(Z,Y,k);l!==J&&(l=J,m(l.object)),$=g(I,Z,Y,H),$&&M(I,Z,Y,H)}else{let J=k.wireframe===!0;(l.geometry!==Z.id||l.program!==Y.id||l.wireframe!==J)&&(l.geometry=Z.id,l.program=Y.id,l.wireframe=J,$=!0)}H!==null&&e.update(H,34963),($||h)&&(h=!1,y(I,k,Y,Z),H!==null&&r.bindBuffer(34963,e.get(H).buffer))}function u(){return n.isWebGL2?r.createVertexArray():s.createVertexArrayOES()}function m(I){return n.isWebGL2?r.bindVertexArray(I):s.bindVertexArrayOES(I)}function x(I){return n.isWebGL2?r.deleteVertexArray(I):s.deleteVertexArrayOES(I)}function p(I,k,Y){let Z=Y.wireframe===!0,H=o[I.id];H===void 0&&(H={},o[I.id]=H);let $=H[k.id];$===void 0&&($={},H[k.id]=$);let J=$[Z];return J===void 0&&(J=d(u()),$[Z]=J),J}function d(I){let k=[],Y=[],Z=[];for(let H=0;H=0){let nt=H[z],it=$[z];if(it===void 0&&(z==="instanceMatrix"&&I.instanceMatrix&&(it=I.instanceMatrix),z==="instanceColor"&&I.instanceColor&&(it=I.instanceColor)),nt===void 0||nt.attribute!==it||it&&nt.data!==it.data)return!0;J++}return l.attributesNum!==J||l.index!==Z}function M(I,k,Y,Z){let H={},$=k.attributes,J=0,dt=Y.getAttributes();for(let z in dt)if(dt[z].location>=0){let nt=$[z];nt===void 0&&(z==="instanceMatrix"&&I.instanceMatrix&&(nt=I.instanceMatrix),z==="instanceColor"&&I.instanceColor&&(nt=I.instanceColor));let it={};it.attribute=nt,nt&&nt.data&&(it.data=nt.data),H[z]=it,J++}l.attributes=H,l.attributesNum=J,l.index=Z}function _(){let I=l.newAttributes;for(let k=0,Y=I.length;k=0){let K=H[dt];if(K===void 0&&(dt==="instanceMatrix"&&I.instanceMatrix&&(K=I.instanceMatrix),dt==="instanceColor"&&I.instanceColor&&(K=I.instanceColor)),K!==void 0){let nt=K.normalized,it=K.itemSize,U=e.get(K);if(U===void 0)continue;let Mt=U.buffer,ht=U.type,ut=U.bytesPerElement;if(K.isInterleavedBufferAttribute){let at=K.data,Ft=at.stride,bt=K.offset;if(at.isInstancedInterleavedBuffer){for(let _t=0;_t0&&r.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";C="mediump"}return C==="mediump"&&r.getShaderPrecisionFormat(35633,36337).precision>0&&r.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let a=typeof WebGL2RenderingContext!="undefined"&&r instanceof WebGL2RenderingContext,o=e.precision!==void 0?e.precision:"highp",c=s(o);c!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",c,"instead."),o=c);let l=a||t.has("WEBGL_draw_buffers"),h=e.logarithmicDepthBuffer===!0,f=r.getParameter(34930),u=r.getParameter(35660),m=r.getParameter(3379),x=r.getParameter(34076),p=r.getParameter(34921),d=r.getParameter(36347),g=r.getParameter(36348),M=r.getParameter(36349),_=u>0,v=a||t.has("OES_texture_float"),b=_&&v,A=a?r.getParameter(36183):0;return{isWebGL2:a,drawBuffers:l,getMaxAnisotropy:i,getMaxPrecision:s,precision:o,logarithmicDepthBuffer:h,maxTextures:f,maxVertexTextures:u,maxTextureSize:m,maxCubemapSize:x,maxAttributes:p,maxVertexUniforms:d,maxVaryings:g,maxFragmentUniforms:M,vertexTextures:_,floatFragmentTextures:v,floatVertexTextures:b,maxSamples:A}}function Ef(r){let t=this,e=null,n=0,i=!1,s=!1,a=new Te,o=new le,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(f,u){let m=f.length!==0||u||n!==0||i;return i=u,n=f.length,m},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(f,u){e=h(f,u,0)},this.setState=function(f,u,m){let x=f.clippingPlanes,p=f.clipIntersection,d=f.clipShadows,g=r.get(f);if(!i||x===null||x.length===0||s&&!d)s?h(null):l();else{let M=s?0:n,_=M*4,v=g.clippingState||null;c.value=v,v=h(x,u,_,m);for(let b=0;b!==_;++b)v[b]=e[b];g.clippingState=v,this.numIntersection=p?this.numPlanes:0,this.numPlanes+=M}};function l(){c.value!==e&&(c.value=e,c.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function h(f,u,m,x){let p=f!==null?f.length:0,d=null;if(p!==0){if(d=c.value,x!==!0||d===null){let g=m+p*4,M=u.matrixWorldInverse;o.getNormalMatrix(M),(d===null||d.length0){let l=new Or(c.height/2);return l.fromEquirectangularTexture(r,a),t.set(a,l),a.addEventListener("dispose",i),e(l.texture,a.mapping)}else return null}}return a}function i(a){let o=a.target;o.removeEventListener("dispose",i);let c=t.get(o);c!==void 0&&(t.delete(o),c.dispose())}function s(){t=new WeakMap}return{get:n,dispose:s}}var Br=class extends Es{constructor(t=-1,e=1,n=1,i=-1,s=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=i,this.near=s,this.far=a,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,n,i,s,a){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=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,s=n-t,a=n+t,o=i+e,c=i-e;if(this.view!==null&&this.view.enabled){let l=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=l*this.view.offsetX,a=s+l*this.view.width,o-=h*this.view.offsetY,c=o-h*this.view.height}this.projectionMatrix.makeOrthographic(s,a,o,c,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}},ii=4,ba=[.125,.215,.35,.446,.526,.582],Cn=20,Sr=new Br,wa=new Bt,Tr=null,En=(1+Math.sqrt(5))/2,ei=1/En,Sa=[new R(1,1,1),new R(-1,1,1),new R(1,1,-1),new R(-1,1,-1),new R(0,En,ei),new R(0,En,-ei),new R(ei,0,En),new R(-ei,0,En),new R(En,ei,0),new R(-En,ei,0)],Rs=class{constructor(t){this._renderer=t,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(t,e=0,n=.1,i=100){Tr=this._renderer.getRenderTarget(),this._setSize(256);let s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(t,n,i,s),e>0&&this._blur(s,0,0,e),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Ea(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Aa(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let t=0;t2?_:0,_,_),h.setRenderTarget(i),p&&h.render(x,o),h.render(t,o)}x.geometry.dispose(),x.material.dispose(),h.toneMapping=u,h.autoClear=f,t.background=d}_textureToCubeUV(t,e){let n=this._renderer,i=t.mapping===ci||t.mapping===li;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Ea()),this._cubemapMaterial.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Aa());let s=i?this._cubemapMaterial:this._equirectMaterial,a=new qe(this._lodPlanes[0],s),o=s.uniforms;o.envMap.value=t;let c=this._cubeSize;ds(e,0,0,3*c,2*c),n.setRenderTarget(e),n.render(a,Sr)}_applyPMREM(t){let e=this._renderer,n=e.autoClear;e.autoClear=!1;for(let i=1;iCn&&console.warn(\`sigmaRadians, \${s}, is too large and will clip, as it requested \${d} samples when the maximum is set to \${Cn}\`);let g=[],M=0;for(let C=0;C_-ii?i-_+ii:0),A=4*(this._cubeSize-v);ds(e,b,A,3*v,2*v),c.setRenderTarget(e),c.render(f,Sr)}};function Pf(r){let t=[],e=[],n=[],i=r,s=r-ii+1+ba.length;for(let a=0;ar-ii?c=ba[a-r+ii-1]:a===0&&(c=0),n.push(c);let l=1/(o-2),h=-l,f=1+l,u=[h,h,f,h,f,f,h,h,f,f,h,f],m=6,x=6,p=3,d=2,g=1,M=new Float32Array(p*x*m),_=new Float32Array(d*x*m),v=new Float32Array(g*x*m);for(let A=0;A2?0:-1,S=[C,y,0,C+2/3,y,0,C+2/3,y+1,0,C,y,0,C+2/3,y+1,0,C,y+1,0];M.set(S,p*x*A),_.set(u,d*x*A);let P=[A,A,A,A,A,A];v.set(P,g*x*A)}let b=new ke;b.setAttribute("position",new Yt(M,p)),b.setAttribute("uv",new Yt(_,d)),b.setAttribute("faceIndex",new Yt(v,g)),t.push(b),i>ii&&i--}return{lodPlanes:t,sizeLods:e,sigmas:n}}function Ta(r,t,e){let n=new rn(r,t,e);return n.texture.mapping=Ls,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function ds(r,t,e,n,i){r.viewport.set(t,e,n,i),r.scissor.set(t,e,n,i)}function Rf(r,t,e){let n=new Float32Array(Cn),i=new R(0,1,0);return new on({name:"SphericalGaussianBlur",defines:{n:Cn,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/e,CUBEUV_MAX_MIP:\`\${r}.0\`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:oo(),fragmentShader:\` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform int samples; - uniform float weights[ n ]; - uniform bool latitudinal; - uniform float dTheta; - uniform float mipInt; - uniform vec3 poleAxis; - - #define ENVMAP_TYPE_CUBE_UV - #include - - vec3 getSample( float theta, vec3 axis ) { - - float cosTheta = cos( theta ); - // Rodrigues' axis-angle rotation - vec3 sampleDirection = vOutputDirection * cosTheta - + cross( axis, vOutputDirection ) * sin( theta ) - + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); - - return bilinearCubeUV( envMap, sampleDirection, mipInt ); - - } - - void main() { - - vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); - - if ( all( equal( axis, vec3( 0.0 ) ) ) ) { - - axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); - - } - - axis = normalize( axis ); - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); - - for ( int i = 1; i < n; i++ ) { - - if ( i >= samples ) { - - break; - - } - - float theta = dTheta * float( i ); - gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); - gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); - - } - - } - \`,blending:pn,depthTest:!1,depthWrite:!1})}function Aa(){return new on({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:oo(),fragmentShader:\` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - - #include - - void main() { - - vec3 outputDirection = normalize( vOutputDirection ); - vec2 uv = equirectUv( outputDirection ); - - gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); - - } - \`,blending:pn,depthTest:!1,depthWrite:!1})}function Ea(){return new on({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:oo(),fragmentShader:\` - - precision mediump float; - precision mediump int; - - uniform float flipEnvMap; - - varying vec3 vOutputDirection; - - uniform samplerCube envMap; - - void main() { - - gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); - - } - \`,blending:pn,depthTest:!1,depthWrite:!1})}function oo(){return\` - - precision mediump float; - precision mediump int; - - attribute float faceIndex; - - varying vec3 vOutputDirection; - - // RH coordinate system; PMREM face-indexing convention - vec3 getDirection( vec2 uv, float face ) { - - uv = 2.0 * uv - 1.0; - - vec3 direction = vec3( uv, 1.0 ); - - if ( face == 0.0 ) { - - direction = direction.zyx; // ( 1, v, u ) pos x - - } else if ( face == 1.0 ) { - - direction = direction.xzy; - direction.xz *= -1.0; // ( -u, 1, -v ) pos y - - } else if ( face == 2.0 ) { - - direction.x *= -1.0; // ( -u, v, 1 ) pos z - - } else if ( face == 3.0 ) { - - direction = direction.zyx; - direction.xz *= -1.0; // ( -1, v, -u ) neg x - - } else if ( face == 4.0 ) { - - direction = direction.xzy; - direction.xy *= -1.0; // ( -u, -1, v ) neg y - - } else if ( face == 5.0 ) { - - direction.z *= -1.0; // ( u, v, -1 ) neg z - - } - - return direction; - - } - - void main() { - - vOutputDirection = getDirection( uv, faceIndex ); - gl_Position = vec4( position, 1.0 ); - - } - \`}function Lf(r){let t=new WeakMap,e=null;function n(o){if(o&&o.isTexture){let c=o.mapping,l=c===Cr||c===Pr,h=c===ci||c===li;if(l||h)if(o.isRenderTargetTexture&&o.needsPMREMUpdate===!0){o.needsPMREMUpdate=!1;let f=t.get(o);return e===null&&(e=new Rs(r)),f=l?e.fromEquirectangular(o,f):e.fromCubemap(o,f),t.set(o,f),f.texture}else{if(t.has(o))return t.get(o).texture;{let f=o.image;if(l&&f&&f.height>0||h&&f&&i(f)){e===null&&(e=new Rs(r));let u=l?e.fromEquirectangular(o):e.fromCubemap(o);return t.set(o,u),o.addEventListener("dispose",s),u.texture}else return null}}}return o}function i(o){let c=0,l=6;for(let h=0;ht.maxTextureSize&&(O=Math.ceil(P/t.maxTextureSize),P=t.maxTextureSize);let B=new Float32Array(P*O*4*p),D=new bs(B,P,O,p);D.type=Rn,D.needsUpdate=!0;let I=S*4;for(let Y=0;Y0)return r;let i=t*e,s=Ca[i];if(s===void 0&&(s=new Float32Array(i),Ca[i]=s),t!==0){n.toArray(s,0);for(let a=1,o=0;a!==t;++a)o+=e,r[a].toArray(s,o)}return s}function Zt(r,t){if(r.length!==t.length)return!1;for(let e=0,n=r.length;e":" "} \${o}: \${e[a]}\`)}return n.join(\` -\`)}function Pd(r){switch(r){case Nn:return["Linear","( value )"];case Ot:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",r),["Linear","( value )"]}}function Fa(r,t,e){let n=r.getShaderParameter(t,35713),i=r.getShaderInfoLog(t).trim();if(n&&i==="")return"";let s=/ERROR: 0:(\\d+)/.exec(i);if(s){let a=parseInt(s[1]);return e.toUpperCase()+\` - -\`+i+\` - -\`+Cd(r.getShaderSource(t),a)}else return i}function Rd(r,t){let e=Pd(t);return"vec4 "+r+"( vec4 value ) { return LinearTo"+e[0]+e[1]+"; }"}function Ld(r,t){let e;switch(t){case Qc:e="Linear";break;case tl:e="Reinhard";break;case el:e="OptimizedCineon";break;case nl:e="ACESFilmic";break;case il:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+r+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}function Id(r){return[r.extensionDerivatives||r.envMapCubeUVHeight||r.bumpMap||r.tangentSpaceNormalMap||r.clearcoatNormalMap||r.flatShading||r.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(r.extensionFragDepth||r.logarithmicDepthBuffer)&&r.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",r.extensionDrawBuffers&&r.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(r.extensionShaderTextureLOD||r.envMap||r.transmission)&&r.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Fi).join(\` -\`)}function Dd(r){let t=[];for(let e in r){let n=r[e];n!==!1&&t.push("#define "+e+" "+n)}return t.join(\` -\`)}function Nd(r,t){let e={},n=r.getProgramParameter(t,35721);for(let i=0;i/gm;function Gr(r){return r.replace(Fd,zd)}function zd(r,t){let e=wt[t];if(e===void 0)throw new Error("Can not resolve #include <"+t+">");return Gr(e)}var Od=/#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 Ba(r){return r.replace(Od,Bd)}function Bd(r,t,e,n){let i="";for(let s=parseInt(t);s0&&(d+=\` -\`),g=[m,x].filter(Fi).join(\` -\`),g.length>0&&(g+=\` -\`)):(d=[Ua(e),"#define SHADER_NAME "+e.shaderName,x,e.instancing?"#define USE_INSTANCING":"",e.instancingColor?"#define USE_INSTANCING_COLOR":"",e.supportsVertexTextures?"#define VERTEX_TEXTURES":"",e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+h:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.displacementMap&&e.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.flatShading?"#define FLAT_SHADED":"",e.skinning?"#define USE_SKINNING":"",e.morphTargets?"#define USE_MORPHTARGETS":"",e.morphNormals&&e.flatShading===!1?"#define USE_MORPHNORMALS":"",e.morphColors&&e.isWebGL2?"#define USE_MORPHCOLORS":"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+e.morphTextureStride:"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_COUNT "+e.morphTargetsCount:"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+c:"",e.sizeAttenuation?"#define USE_SIZEATTENUATION":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.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_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",\` -\`].filter(Fi).join(\` -\`),g=[m,Ua(e),"#define SHADER_NAME "+e.shaderName,x,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.matcap?"#define USE_MATCAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+l:"",e.envMap?"#define "+h:"",e.envMap?"#define "+f:"",u?"#define CUBEUV_TEXEL_WIDTH "+u.texelWidth:"",u?"#define CUBEUV_TEXEL_HEIGHT "+u.texelHeight:"",u?"#define CUBEUV_MAX_MIP "+u.maxMip+".0":"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoat?"#define USE_CLEARCOAT":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescence?"#define USE_IRIDESCENCE":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaTest?"#define USE_ALPHATEST":"",e.sheen?"#define USE_SHEEN":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors||e.instancingColor?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.gradientMap?"#define USE_GRADIENTMAP":"",e.flatShading?"#define FLAT_SHADED":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+c:"",e.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",e.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==nn?"#define TONE_MAPPING":"",e.toneMapping!==nn?wt.tonemapping_pars_fragment:"",e.toneMapping!==nn?Ld("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",wt.encodings_pars_fragment,Rd("linearToOutputTexel",e.outputEncoding),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"",\` -\`].filter(Fi).join(\` -\`)),a=Gr(a),a=za(a,e),a=Oa(a,e),o=Gr(o),o=za(o,e),o=Oa(o,e),a=Ba(a),o=Ba(o),e.isWebGL2&&e.isRawShaderMaterial!==!0&&(M=\`#version 300 es -\`,d=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(\` -\`)+\` -\`+d,g=["#define varying in",e.glslVersion===la?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===la?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(\` -\`)+\` -\`+g);let _=M+d+a,v=M+g+o,b=Na(i,35633,_),A=Na(i,35632,v);if(i.attachShader(p,b),i.attachShader(p,A),e.index0AttributeName!==void 0?i.bindAttribLocation(p,0,e.index0AttributeName):e.morphTargets===!0&&i.bindAttribLocation(p,0,"position"),i.linkProgram(p),r.debug.checkShaderErrors){let S=i.getProgramInfoLog(p).trim(),P=i.getShaderInfoLog(b).trim(),O=i.getShaderInfoLog(A).trim(),B=!0,D=!0;if(i.getProgramParameter(p,35714)===!1){B=!1;let I=Fa(i,b,"vertex"),k=Fa(i,A,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(p,35715)+\` - -Program Info Log: \`+S+\` -\`+I+\` -\`+k)}else S!==""?console.warn("THREE.WebGLProgram: Program Info Log:",S):(P===""||O==="")&&(D=!1);D&&(this.diagnostics={runnable:B,programLog:S,vertexShader:{log:P,prefix:d},fragmentShader:{log:O,prefix:g}})}i.deleteShader(b),i.deleteShader(A);let C;this.getUniforms=function(){return C===void 0&&(C=new ai(i,p)),C};let y;return this.getAttributes=function(){return y===void 0&&(y=Nd(i,p)),y},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(p),this.program=void 0},this.name=e.shaderName,this.id=Ed++,this.cacheKey=t,this.usedTimes=1,this.program=p,this.vertexShader=b,this.fragmentShader=A,this}var qd=0,Hr=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){let e=t.vertexShader,n=t.fragmentShader,i=this._getShaderStage(e),s=this._getShaderStage(n),a=this._getShaderCacheForMaterial(t);return a.has(i)===!1&&(a.add(i),i.usedTimes++),a.has(s)===!1&&(a.add(s),s.usedTimes++),this}remove(t){let e=this.materialCache.get(t);for(let n of e)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){let e=this.materialCache,n=e.get(t);return n===void 0&&(n=new Set,e.set(t,n)),n}_getShaderStage(t){let e=this.shaderCache,n=e.get(t);return n===void 0&&(n=new Wr(t),e.set(t,n)),n}},Wr=class{constructor(t){this.id=qd++,this.code=t,this.usedTimes=0}};function Xd(r,t,e,n,i,s,a){let o=new ws,c=new Hr,l=[],h=i.isWebGL2,f=i.logarithmicDepthBuffer,u=i.vertexTextures,m=i.precision,x={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 p(y,S,P,O,B){let D=O.fog,I=B.geometry,k=y.isMeshStandardMaterial?O.environment:null,Y=(y.isMeshStandardMaterial?e:t).get(y.envMap||k),Z=Y&&Y.mapping===Ls?Y.image.height:null,H=x[y.type];y.precision!==null&&(m=i.getMaxPrecision(y.precision),m!==y.precision&&console.warn("THREE.WebGLProgram.getParameters:",y.precision,"not supported, using",m,"instead."));let $=I.morphAttributes.position||I.morphAttributes.normal||I.morphAttributes.color,J=$!==void 0?$.length:0,dt=0;I.morphAttributes.position!==void 0&&(dt=1),I.morphAttributes.normal!==void 0&&(dt=2),I.morphAttributes.color!==void 0&&(dt=3);let z,K,nt,it;if(H){let Ft=He[H];z=Ft.vertexShader,K=Ft.fragmentShader}else z=y.vertexShader,K=y.fragmentShader,c.update(y),nt=c.getVertexShaderID(y),it=c.getFragmentShaderID(y);let U=r.getRenderTarget(),Mt=y.alphaTest>0,ht=y.clearcoat>0,ut=y.iridescence>0;return{isWebGL2:h,shaderID:H,shaderName:y.type,vertexShader:z,fragmentShader:K,defines:y.defines,customVertexShaderID:nt,customFragmentShaderID:it,isRawShaderMaterial:y.isRawShaderMaterial===!0,glslVersion:y.glslVersion,precision:m,instancing:B.isInstancedMesh===!0,instancingColor:B.isInstancedMesh===!0&&B.instanceColor!==null,supportsVertexTextures:u,outputEncoding:U===null?r.outputEncoding:U.isXRRenderTarget===!0?U.texture.encoding:Nn,map:!!y.map,matcap:!!y.matcap,envMap:!!Y,envMapMode:Y&&Y.mapping,envMapCubeUVHeight:Z,lightMap:!!y.lightMap,aoMap:!!y.aoMap,emissiveMap:!!y.emissiveMap,bumpMap:!!y.bumpMap,normalMap:!!y.normalMap,objectSpaceNormalMap:y.normalMapType===wl,tangentSpaceNormalMap:y.normalMapType===bl,decodeVideoTexture:!!y.map&&y.map.isVideoTexture===!0&&y.map.encoding===Ot,clearcoat:ht,clearcoatMap:ht&&!!y.clearcoatMap,clearcoatRoughnessMap:ht&&!!y.clearcoatRoughnessMap,clearcoatNormalMap:ht&&!!y.clearcoatNormalMap,iridescence:ut,iridescenceMap:ut&&!!y.iridescenceMap,iridescenceThicknessMap:ut&&!!y.iridescenceThicknessMap,displacementMap:!!y.displacementMap,roughnessMap:!!y.roughnessMap,metalnessMap:!!y.metalnessMap,specularMap:!!y.specularMap,specularIntensityMap:!!y.specularIntensityMap,specularColorMap:!!y.specularColorMap,opaque:y.transparent===!1&&y.blending===ri,alphaMap:!!y.alphaMap,alphaTest:Mt,gradientMap:!!y.gradientMap,sheen:y.sheen>0,sheenColorMap:!!y.sheenColorMap,sheenRoughnessMap:!!y.sheenRoughnessMap,transmission:y.transmission>0,transmissionMap:!!y.transmissionMap,thicknessMap:!!y.thicknessMap,combine:y.combine,vertexTangents:!!y.normalMap&&!!I.attributes.tangent,vertexColors:y.vertexColors,vertexAlphas:y.vertexColors===!0&&!!I.attributes.color&&I.attributes.color.itemSize===4,vertexUvs:!!y.map||!!y.bumpMap||!!y.normalMap||!!y.specularMap||!!y.alphaMap||!!y.emissiveMap||!!y.roughnessMap||!!y.metalnessMap||!!y.clearcoatMap||!!y.clearcoatRoughnessMap||!!y.clearcoatNormalMap||!!y.iridescenceMap||!!y.iridescenceThicknessMap||!!y.displacementMap||!!y.transmissionMap||!!y.thicknessMap||!!y.specularIntensityMap||!!y.specularColorMap||!!y.sheenColorMap||!!y.sheenRoughnessMap,uvsVertexOnly:!(y.map||y.bumpMap||y.normalMap||y.specularMap||y.alphaMap||y.emissiveMap||y.roughnessMap||y.metalnessMap||y.clearcoatNormalMap||y.iridescenceMap||y.iridescenceThicknessMap||y.transmission>0||y.transmissionMap||y.thicknessMap||y.specularIntensityMap||y.specularColorMap||y.sheen>0||y.sheenColorMap||y.sheenRoughnessMap)&&!!y.displacementMap,fog:!!D,useFog:y.fog===!0,fogExp2:D&&D.isFogExp2,flatShading:!!y.flatShading,sizeAttenuation:y.sizeAttenuation,logarithmicDepthBuffer:f,skinning:B.isSkinnedMesh===!0,morphTargets:I.morphAttributes.position!==void 0,morphNormals:I.morphAttributes.normal!==void 0,morphColors:I.morphAttributes.color!==void 0,morphTargetsCount:J,morphTextureStride:dt,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:y.dithering,shadowMapEnabled:r.shadowMap.enabled&&P.length>0,shadowMapType:r.shadowMap.type,toneMapping:y.toneMapped?r.toneMapping:nn,physicallyCorrectLights:r.physicallyCorrectLights,premultipliedAlpha:y.premultipliedAlpha,doubleSided:y.side===We,flipSided:y.side===he,useDepthPacking:!!y.depthPacking,depthPacking:y.depthPacking||0,index0AttributeName:y.index0AttributeName,extensionDerivatives:y.extensions&&y.extensions.derivatives,extensionFragDepth:y.extensions&&y.extensions.fragDepth,extensionDrawBuffers:y.extensions&&y.extensions.drawBuffers,extensionShaderTextureLOD:y.extensions&&y.extensions.shaderTextureLOD,rendererExtensionFragDepth:h||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||n.has("EXT_shader_texture_lod"),customProgramCacheKey:y.customProgramCacheKey()}}function d(y){let S=[];if(y.shaderID?S.push(y.shaderID):(S.push(y.customVertexShaderID),S.push(y.customFragmentShaderID)),y.defines!==void 0)for(let P in y.defines)S.push(P),S.push(y.defines[P]);return y.isRawShaderMaterial===!1&&(g(S,y),M(S,y),S.push(r.outputEncoding)),S.push(y.customProgramCacheKey),S.join()}function g(y,S){y.push(S.precision),y.push(S.outputEncoding),y.push(S.envMapMode),y.push(S.envMapCubeUVHeight),y.push(S.combine),y.push(S.vertexUvs),y.push(S.fogExp2),y.push(S.sizeAttenuation),y.push(S.morphTargetsCount),y.push(S.morphAttributeCount),y.push(S.numDirLights),y.push(S.numPointLights),y.push(S.numSpotLights),y.push(S.numSpotLightMaps),y.push(S.numHemiLights),y.push(S.numRectAreaLights),y.push(S.numDirLightShadows),y.push(S.numPointLightShadows),y.push(S.numSpotLightShadows),y.push(S.numSpotLightShadowsWithMaps),y.push(S.shadowMapType),y.push(S.toneMapping),y.push(S.numClippingPlanes),y.push(S.numClipIntersection),y.push(S.depthPacking)}function M(y,S){o.disableAll(),S.isWebGL2&&o.enable(0),S.supportsVertexTextures&&o.enable(1),S.instancing&&o.enable(2),S.instancingColor&&o.enable(3),S.map&&o.enable(4),S.matcap&&o.enable(5),S.envMap&&o.enable(6),S.lightMap&&o.enable(7),S.aoMap&&o.enable(8),S.emissiveMap&&o.enable(9),S.bumpMap&&o.enable(10),S.normalMap&&o.enable(11),S.objectSpaceNormalMap&&o.enable(12),S.tangentSpaceNormalMap&&o.enable(13),S.clearcoat&&o.enable(14),S.clearcoatMap&&o.enable(15),S.clearcoatRoughnessMap&&o.enable(16),S.clearcoatNormalMap&&o.enable(17),S.iridescence&&o.enable(18),S.iridescenceMap&&o.enable(19),S.iridescenceThicknessMap&&o.enable(20),S.displacementMap&&o.enable(21),S.specularMap&&o.enable(22),S.roughnessMap&&o.enable(23),S.metalnessMap&&o.enable(24),S.gradientMap&&o.enable(25),S.alphaMap&&o.enable(26),S.alphaTest&&o.enable(27),S.vertexColors&&o.enable(28),S.vertexAlphas&&o.enable(29),S.vertexUvs&&o.enable(30),S.vertexTangents&&o.enable(31),S.uvsVertexOnly&&o.enable(32),y.push(o.mask),o.disableAll(),S.fog&&o.enable(0),S.useFog&&o.enable(1),S.flatShading&&o.enable(2),S.logarithmicDepthBuffer&&o.enable(3),S.skinning&&o.enable(4),S.morphTargets&&o.enable(5),S.morphNormals&&o.enable(6),S.morphColors&&o.enable(7),S.premultipliedAlpha&&o.enable(8),S.shadowMapEnabled&&o.enable(9),S.physicallyCorrectLights&&o.enable(10),S.doubleSided&&o.enable(11),S.flipSided&&o.enable(12),S.useDepthPacking&&o.enable(13),S.dithering&&o.enable(14),S.specularIntensityMap&&o.enable(15),S.specularColorMap&&o.enable(16),S.transmission&&o.enable(17),S.transmissionMap&&o.enable(18),S.thicknessMap&&o.enable(19),S.sheen&&o.enable(20),S.sheenColorMap&&o.enable(21),S.sheenRoughnessMap&&o.enable(22),S.decodeVideoTexture&&o.enable(23),S.opaque&&o.enable(24),y.push(o.mask)}function _(y){let S=x[y.type],P;if(S){let O=He[S];P=Bl.clone(O.uniforms)}else P=y.uniforms;return P}function v(y,S){let P;for(let O=0,B=l.length;O0?n.push(g):m.transparent===!0?i.push(g):e.push(g)}function c(f,u,m,x,p,d){let g=a(f,u,m,x,p,d);m.transmission>0?n.unshift(g):m.transparent===!0?i.unshift(g):e.unshift(g)}function l(f,u){e.length>1&&e.sort(f||Zd),n.length>1&&n.sort(u||ka),i.length>1&&i.sort(u||ka)}function h(){for(let f=t,u=r.length;f=s.length?(a=new Va,s.push(a)):a=s[i],a}function e(){r=new WeakMap}return{get:t,dispose:e}}function $d(){let r={};return{get:function(t){if(r[t.id]!==void 0)return r[t.id];let e;switch(t.type){case"DirectionalLight":e={direction:new R,color:new Bt};break;case"SpotLight":e={position:new R,direction:new R,color:new Bt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new R,color:new Bt,distance:0,decay:0};break;case"HemisphereLight":e={direction:new R,skyColor:new Bt,groundColor:new Bt};break;case"RectAreaLight":e={color:new Bt,position:new R,halfWidth:new R,halfHeight:new R};break}return r[t.id]=e,e}}}function Kd(){let r={};return{get:function(t){if(r[t.id]!==void 0)return r[t.id];let e;switch(t.type){case"DirectionalLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new At};break;case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new At};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new At,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[t.id]=e,e}}}var jd=0;function Qd(r,t){return(t.castShadow?2:0)-(r.castShadow?2:0)+(t.map?1:0)-(r.map?1:0)}function tp(r,t){let e=new $d,n=Kd(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-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};for(let h=0;h<9;h++)i.probe.push(new R);let s=new R,a=new zt,o=new zt;function c(h,f){let u=0,m=0,x=0;for(let O=0;O<9;O++)i.probe[O].set(0,0,0);let p=0,d=0,g=0,M=0,_=0,v=0,b=0,A=0,C=0,y=0;h.sort(Qd);let S=f!==!0?Math.PI:1;for(let O=0,B=h.length;O0&&(t.isWebGL2||r.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=et.LTC_FLOAT_1,i.rectAreaLTC2=et.LTC_FLOAT_2):r.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=et.LTC_HALF_1,i.rectAreaLTC2=et.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=u,i.ambient[1]=m,i.ambient[2]=x;let P=i.hash;(P.directionalLength!==p||P.pointLength!==d||P.spotLength!==g||P.rectAreaLength!==M||P.hemiLength!==_||P.numDirectionalShadows!==v||P.numPointShadows!==b||P.numSpotShadows!==A||P.numSpotMaps!==C)&&(i.directional.length=p,i.spot.length=g,i.rectArea.length=M,i.point.length=d,i.hemi.length=_,i.directionalShadow.length=v,i.directionalShadowMap.length=v,i.pointShadow.length=b,i.pointShadowMap.length=b,i.spotShadow.length=A,i.spotShadowMap.length=A,i.directionalShadowMatrix.length=v,i.pointShadowMatrix.length=b,i.spotLightMatrix.length=A+C-y,i.spotLightMap.length=C,i.numSpotLightShadowsWithMaps=y,P.directionalLength=p,P.pointLength=d,P.spotLength=g,P.rectAreaLength=M,P.hemiLength=_,P.numDirectionalShadows=v,P.numPointShadows=b,P.numSpotShadows=A,P.numSpotMaps=C,i.version=jd++)}function l(h,f){let u=0,m=0,x=0,p=0,d=0,g=f.matrixWorldInverse;for(let M=0,_=h.length;M<_;M++){let v=h[M];if(v.isDirectionalLight){let b=i.directional[u];b.direction.setFromMatrixPosition(v.matrixWorld),s.setFromMatrixPosition(v.target.matrixWorld),b.direction.sub(s),b.direction.transformDirection(g),u++}else if(v.isSpotLight){let b=i.spot[x];b.position.setFromMatrixPosition(v.matrixWorld),b.position.applyMatrix4(g),b.direction.setFromMatrixPosition(v.matrixWorld),s.setFromMatrixPosition(v.target.matrixWorld),b.direction.sub(s),b.direction.transformDirection(g),x++}else if(v.isRectAreaLight){let b=i.rectArea[p];b.position.setFromMatrixPosition(v.matrixWorld),b.position.applyMatrix4(g),o.identity(),a.copy(v.matrixWorld),a.premultiply(g),o.extractRotation(a),b.halfWidth.set(v.width*.5,0,0),b.halfHeight.set(0,v.height*.5,0),b.halfWidth.applyMatrix4(o),b.halfHeight.applyMatrix4(o),p++}else if(v.isPointLight){let b=i.point[m];b.position.setFromMatrixPosition(v.matrixWorld),b.position.applyMatrix4(g),m++}else if(v.isHemisphereLight){let b=i.hemi[d];b.direction.setFromMatrixPosition(v.matrixWorld),b.direction.transformDirection(g),d++}}}return{setup:c,setupView:l,state:i}}function Ga(r,t){let e=new tp(r,t),n=[],i=[];function s(){n.length=0,i.length=0}function a(f){n.push(f)}function o(f){i.push(f)}function c(f){e.setup(n,f)}function l(f){e.setupView(n,f)}return{init:s,state:{lightsArray:n,shadowsArray:i,lights:e},setupLights:c,setupLightsView:l,pushLight:a,pushShadow:o}}function ep(r,t){let e=new WeakMap;function n(s,a=0){let o=e.get(s),c;return o===void 0?(c=new Ga(r,t),e.set(s,[c])):a>=o.length?(c=new Ga(r,t),o.push(c)):c=o[a],c}function i(){e=new WeakMap}return{get:n,dispose:i}}var qr=class extends fi{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=vl,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}},Xr=class extends fi{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.referencePosition=new R,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}},np=\`void main() { - gl_Position = vec4( position, 1.0 ); -}\`,ip=\`uniform sampler2D shadow_pass; -uniform vec2 resolution; -uniform float radius; -#include -void main() { - const float samples = float( VSM_SAMPLES ); - float mean = 0.0; - float squared_mean = 0.0; - float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); - float uvStart = samples <= 1.0 ? 0.0 : - 1.0; - for ( float i = 0.0; i < samples; i ++ ) { - float uvOffset = uvStart + i * uvStride; - #ifdef HORIZONTAL_PASS - vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); - mean += distribution.x; - squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; - #else - float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); - mean += depth; - squared_mean += depth * depth; - #endif - } - mean = mean / samples; - squared_mean = squared_mean / samples; - float std_dev = sqrt( squared_mean - mean * mean ); - gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}\`;function sp(r,t,e){let n=new Ps,i=new At,s=new At,a=new Xt,o=new qr({depthPacking:Ml}),c=new Xr,l={},h=e.maxTextureSize,f={[Ue]:he,[he]:Ue,[We]:We},u=new on({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new At},radius:{value:4}},vertexShader:np,fragmentShader:ip}),m=u.clone();m.defines.HORIZONTAL_PASS=1;let x=new ke;x.setAttribute("position",new Yt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let p=new qe(x,u),d=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Wa,this.render=function(v,b,A){if(d.enabled===!1||d.autoUpdate===!1&&d.needsUpdate===!1||v.length===0)return;let C=r.getRenderTarget(),y=r.getActiveCubeFace(),S=r.getActiveMipmapLevel(),P=r.state;P.setBlending(pn),P.buffers.color.setClear(1,1,1,1),P.buffers.depth.setTest(!0),P.setScissorTest(!1);for(let O=0,B=v.length;Oh||i.y>h)&&(i.x>h&&(s.x=Math.floor(h/k.x),i.x=s.x*k.x,I.mapSize.x=s.x),i.y>h&&(s.y=Math.floor(h/k.y),i.y=s.y*k.y,I.mapSize.y=s.y)),I.map===null){let Z=this.type!==Ni?{minFilter:ce,magFilter:ce}:{};I.map=new rn(i.x,i.y,Z),I.map.texture.name=D.name+".shadowMap",I.camera.updateProjectionMatrix()}r.setRenderTarget(I.map),r.clear();let Y=I.getViewportCount();for(let Z=0;Z0||b.map&&b.alphaTest>0){let B=P.uuid,D=b.uuid,I=l[B];I===void 0&&(I={},l[B]=I);let k=I[D];k===void 0&&(k=P.clone(),I[D]=k),P=k}return P.visible=b.visible,P.wireframe=b.wireframe,S===Ni?P.side=b.shadowSide!==null?b.shadowSide:b.side:P.side=b.shadowSide!==null?b.shadowSide:f[b.side],P.alphaMap=b.alphaMap,P.alphaTest=b.alphaTest,P.map=b.map,P.clipShadows=b.clipShadows,P.clippingPlanes=b.clippingPlanes,P.clipIntersection=b.clipIntersection,P.displacementMap=b.displacementMap,P.displacementScale=b.displacementScale,P.displacementBias=b.displacementBias,P.wireframeLinewidth=b.wireframeLinewidth,P.linewidth=b.linewidth,A.isPointLight===!0&&P.isMeshDistanceMaterial===!0&&(P.referencePosition.setFromMatrixPosition(A.matrixWorld),P.nearDistance=C,P.farDistance=y),P}function _(v,b,A,C,y){if(v.visible===!1)return;if(v.layers.test(b.layers)&&(v.isMesh||v.isLine||v.isPoints)&&(v.castShadow||v.receiveShadow&&y===Ni)&&(!v.frustumCulled||n.intersectsObject(v))){v.modelViewMatrix.multiplyMatrices(A.matrixWorldInverse,v.matrixWorld);let O=t.update(v),B=v.material;if(Array.isArray(B)){let D=O.groups;for(let I=0,k=D.length;I=1):H.indexOf("OpenGL ES")!==-1&&(Z=parseFloat(/^OpenGL ES (\\d)/.exec(H)[1]),Y=Z>=2);let $=null,J={},dt=r.getParameter(3088),z=r.getParameter(2978),K=new Xt().fromArray(dt),nt=new Xt().fromArray(z);function it(L,V,j){let ot=new Uint8Array(4),lt=r.createTexture();r.bindTexture(L,lt),r.texParameteri(L,10241,9728),r.texParameteri(L,10240,9728);for(let It=0;ItQ||E.height>Q)&&(tt=Q/Math.max(E.width,E.height)),tt<1||w===!0)if(typeof HTMLImageElement!="undefined"&&E instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&E instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&E instanceof ImageBitmap){let st=w?Dr:Math.floor,yt=st(tt*E.width),rt=st(tt*E.height);p===void 0&&(p=M(yt,rt));let X=W?M(yt,rt):p;return X.width=yt,X.height=rt,X.getContext("2d").drawImage(E,0,0,yt,rt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+E.width+"x"+E.height+") to ("+yt+"x"+rt+")."),X}else return"data"in E&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+E.width+"x"+E.height+")."),E;return E}function v(E){return ua(E.width)&&ua(E.height)}function b(E){return o?!1:E.wrapS!==Oe||E.wrapT!==Oe||E.minFilter!==ce&&E.minFilter!==Re}function A(E,w){return E.generateMipmaps&&w&&E.minFilter!==ce&&E.minFilter!==Re}function C(E){r.generateMipmap(E)}function y(E,w,W,Q,tt=!1){if(o===!1)return w;if(E!==null){if(r[E]!==void 0)return r[E];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+E+"'")}let st=w;return w===6403&&(W===5126&&(st=33326),W===5131&&(st=33325),W===5121&&(st=33321)),w===33319&&(W===5126&&(st=33328),W===5131&&(st=33327),W===5121&&(st=33323)),w===6408&&(W===5126&&(st=34836),W===5131&&(st=34842),W===5121&&(st=Q===Ot&&tt===!1?35907:32856),W===32819&&(st=32854),W===32820&&(st=32855)),(st===33325||st===33326||st===33327||st===33328||st===34842||st===34836)&&t.get("EXT_color_buffer_float"),st}function S(E,w,W){return A(E,W)===!0||E.isFramebufferTexture&&E.minFilter!==ce&&E.minFilter!==Re?Math.log2(Math.max(w.width,w.height))+1:E.mipmaps!==void 0&&E.mipmaps.length>0?E.mipmaps.length:E.isCompressedTexture&&Array.isArray(E.image)?w.mipmaps.length:1}function P(E){return E===ce||E===Fo||E===Zs?9728:9729}function O(E){let w=E.target;w.removeEventListener("dispose",O),D(w),w.isVideoTexture&&x.delete(w)}function B(E){let w=E.target;w.removeEventListener("dispose",B),k(w)}function D(E){let w=n.get(E);if(w.__webglInit===void 0)return;let W=E.source,Q=d.get(W);if(Q){let tt=Q[w.__cacheKey];tt.usedTimes--,tt.usedTimes===0&&I(E),Object.keys(Q).length===0&&d.delete(W)}n.remove(E)}function I(E){let w=n.get(E);r.deleteTexture(w.__webglTexture);let W=E.source,Q=d.get(W);delete Q[w.__cacheKey],a.memory.textures--}function k(E){let w=E.texture,W=n.get(E),Q=n.get(w);if(Q.__webglTexture!==void 0&&(r.deleteTexture(Q.__webglTexture),a.memory.textures--),E.depthTexture&&E.depthTexture.dispose(),E.isWebGLCubeRenderTarget)for(let tt=0;tt<6;tt++)r.deleteFramebuffer(W.__webglFramebuffer[tt]),W.__webglDepthbuffer&&r.deleteRenderbuffer(W.__webglDepthbuffer[tt]);else{if(r.deleteFramebuffer(W.__webglFramebuffer),W.__webglDepthbuffer&&r.deleteRenderbuffer(W.__webglDepthbuffer),W.__webglMultisampledFramebuffer&&r.deleteFramebuffer(W.__webglMultisampledFramebuffer),W.__webglColorRenderbuffer)for(let tt=0;tt=c&&console.warn("THREE.WebGLTextures: Trying to use "+E+" texture units while this GPU supports only "+c),Y+=1,E}function $(E){let w=[];return w.push(E.wrapS),w.push(E.wrapT),w.push(E.wrapR||0),w.push(E.magFilter),w.push(E.minFilter),w.push(E.anisotropy),w.push(E.internalFormat),w.push(E.format),w.push(E.type),w.push(E.generateMipmaps),w.push(E.premultiplyAlpha),w.push(E.flipY),w.push(E.unpackAlignment),w.push(E.encoding),w.join()}function J(E,w){let W=n.get(E);if(E.isVideoTexture&&Ze(E),E.isRenderTargetTexture===!1&&E.version>0&&W.__version!==E.version){let Q=E.image;if(Q===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Q.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ht(W,E,w);return}}e.bindTexture(3553,W.__webglTexture,33984+w)}function dt(E,w){let W=n.get(E);if(E.version>0&&W.__version!==E.version){ht(W,E,w);return}e.bindTexture(35866,W.__webglTexture,33984+w)}function z(E,w){let W=n.get(E);if(E.version>0&&W.__version!==E.version){ht(W,E,w);return}e.bindTexture(32879,W.__webglTexture,33984+w)}function K(E,w){let W=n.get(E);if(E.version>0&&W.__version!==E.version){ut(W,E,w);return}e.bindTexture(34067,W.__webglTexture,33984+w)}let nt={[Rr]:10497,[Oe]:33071,[Lr]:33648},it={[ce]:9728,[Fo]:9984,[Zs]:9986,[Re]:9729,[sl]:9985,[Oi]:9987};function U(E,w,W){if(W?(r.texParameteri(E,10242,nt[w.wrapS]),r.texParameteri(E,10243,nt[w.wrapT]),(E===32879||E===35866)&&r.texParameteri(E,32882,nt[w.wrapR]),r.texParameteri(E,10240,it[w.magFilter]),r.texParameteri(E,10241,it[w.minFilter])):(r.texParameteri(E,10242,33071),r.texParameteri(E,10243,33071),(E===32879||E===35866)&&r.texParameteri(E,32882,33071),(w.wrapS!==Oe||w.wrapT!==Oe)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),r.texParameteri(E,10240,P(w.magFilter)),r.texParameteri(E,10241,P(w.minFilter)),w.minFilter!==ce&&w.minFilter!==Re&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),t.has("EXT_texture_filter_anisotropic")===!0){let Q=t.get("EXT_texture_filter_anisotropic");if(w.magFilter===ce||w.minFilter!==Zs&&w.minFilter!==Oi||w.type===Rn&&t.has("OES_texture_float_linear")===!1||o===!1&&w.type===Bi&&t.has("OES_texture_half_float_linear")===!1)return;(w.anisotropy>1||n.get(w).__currentAnisotropy)&&(r.texParameterf(E,Q.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(w.anisotropy,i.getMaxAnisotropy())),n.get(w).__currentAnisotropy=w.anisotropy)}}function Mt(E,w){let W=!1;E.__webglInit===void 0&&(E.__webglInit=!0,w.addEventListener("dispose",O));let Q=w.source,tt=d.get(Q);tt===void 0&&(tt={},d.set(Q,tt));let st=$(w);if(st!==E.__cacheKey){tt[st]===void 0&&(tt[st]={texture:r.createTexture(),usedTimes:0},a.memory.textures++,W=!0),tt[st].usedTimes++;let yt=tt[E.__cacheKey];yt!==void 0&&(tt[E.__cacheKey].usedTimes--,yt.usedTimes===0&&I(w)),E.__cacheKey=st,E.__webglTexture=tt[st].texture}return W}function ht(E,w,W){let Q=3553;(w.isDataArrayTexture||w.isCompressedArrayTexture)&&(Q=35866),w.isData3DTexture&&(Q=32879);let tt=Mt(E,w),st=w.source;e.bindTexture(Q,E.__webglTexture,33984+W);let yt=n.get(st);if(st.version!==yt.__version||tt===!0){e.activeTexture(33984+W),r.pixelStorei(37440,w.flipY),r.pixelStorei(37441,w.premultiplyAlpha),r.pixelStorei(3317,w.unpackAlignment),r.pixelStorei(37443,0);let rt=b(w)&&v(w.image)===!1,X=_(w.image,rt,!1,h);X=De(w,X);let mt=v(X)||o,xt=s.convert(w.format,w.encoding),ct=s.convert(w.type),gt=y(w.internalFormat,xt,ct,w.encoding,w.isVideoTexture);U(Q,w,mt);let ft,Rt=w.mipmaps,Ut=o&&w.isVideoTexture!==!0,$t=yt.__version===void 0||tt===!0,L=S(w,X,mt);if(w.isDepthTexture)gt=6402,o?w.type===Rn?gt=36012:w.type===Pn?gt=33190:w.type===oi?gt=35056:gt=33189:w.type===Rn&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),w.format===Ln&>===6402&&w.type!==Ja&&w.type!==Pn&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),w.type=Pn,ct=s.convert(w.type)),w.format===hi&>===6402&&(gt=34041,w.type!==oi&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),w.type=oi,ct=s.convert(w.type))),$t&&(Ut?e.texStorage2D(3553,1,gt,X.width,X.height):e.texImage2D(3553,0,gt,X.width,X.height,0,xt,ct,null));else if(w.isDataTexture)if(Rt.length>0&&mt){Ut&&$t&&e.texStorage2D(3553,L,gt,Rt[0].width,Rt[0].height);for(let V=0,j=Rt.length;V>=1,j>>=1}}else if(Rt.length>0&&mt){Ut&&$t&&e.texStorage2D(3553,L,gt,Rt[0].width,Rt[0].height);for(let V=0,j=Rt.length;V0&&$t++,e.texStorage2D(34067,$t,ft,X[0].width,X[0].height));for(let V=0;V<6;V++)if(rt){Rt?e.texSubImage2D(34069+V,0,0,0,X[V].width,X[V].height,ct,gt,X[V].data):e.texImage2D(34069+V,0,ft,X[V].width,X[V].height,0,ct,gt,X[V].data);for(let j=0;j=34069&&tt<=34074)&&r.framebufferTexture2D(36160,Q,tt,n.get(W).__webglTexture,0),e.bindFramebuffer(36160,null)}function Ft(E,w,W){if(r.bindRenderbuffer(36161,E),w.depthBuffer&&!w.stencilBuffer){let Q=33189;if(W||Nt(w)){let tt=w.depthTexture;tt&&tt.isDepthTexture&&(tt.type===Rn?Q=36012:tt.type===Pn&&(Q=33190));let st=Wt(w);Nt(w)?u.renderbufferStorageMultisampleEXT(36161,st,Q,w.width,w.height):r.renderbufferStorageMultisample(36161,st,Q,w.width,w.height)}else r.renderbufferStorage(36161,Q,w.width,w.height);r.framebufferRenderbuffer(36160,36096,36161,E)}else if(w.depthBuffer&&w.stencilBuffer){let Q=Wt(w);W&&Nt(w)===!1?r.renderbufferStorageMultisample(36161,Q,35056,w.width,w.height):Nt(w)?u.renderbufferStorageMultisampleEXT(36161,Q,35056,w.width,w.height):r.renderbufferStorage(36161,34041,w.width,w.height),r.framebufferRenderbuffer(36160,33306,36161,E)}else{let Q=w.isWebGLMultipleRenderTargets===!0?w.texture:[w.texture];for(let tt=0;tt0&&Nt(E)===!1){let rt=st?w:[w];W.__webglMultisampledFramebuffer=r.createFramebuffer(),W.__webglColorRenderbuffer=[],e.bindFramebuffer(36160,W.__webglMultisampledFramebuffer);for(let X=0;X0&&Nt(E)===!1){let w=E.isWebGLMultipleRenderTargets?E.texture:[E.texture],W=E.width,Q=E.height,tt=16384,st=[],yt=E.stencilBuffer?33306:36096,rt=n.get(E),X=E.isWebGLMultipleRenderTargets===!0;if(X)for(let mt=0;mt0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&w.__useRenderToTexture!==!1}function Ze(E){let w=a.render.frame;x.get(E)!==w&&(x.set(E,w),E.update())}function De(E,w){let W=E.encoding,Q=E.format,tt=E.type;return E.isCompressedTexture===!0||E.isVideoTexture===!0||E.format===Ir||W!==Nn&&(W===Ot?o===!1?t.has("EXT_sRGB")===!0&&Q===Be?(E.format=Ir,E.minFilter=Re,E.generateMipmaps=!1):w=vs.sRGBToLinear(w):(Q!==Be||tt!==Dn)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",W)),w}this.allocateTextureUnit=H,this.resetTextureUnits=Z,this.setTexture2D=J,this.setTexture2DArray=dt,this.setTexture3D=z,this.setTextureCube=K,this.rebindTextures=se,this.setupRenderTarget=Ae,this.updateRenderTargetMipmap=te,this.updateMultisampleRenderTarget=Ee,this.setupDepthRenderbuffer=_t,this.setupFrameBufferTexture=at,this.useMultisampledRTT=Nt}function ap(r,t,e){let n=e.isWebGL2;function i(s,a=null){let o;if(s===Dn)return 5121;if(s===cl)return 32819;if(s===ll)return 32820;if(s===rl)return 5120;if(s===ol)return 5122;if(s===Ja)return 5123;if(s===al)return 5124;if(s===Pn)return 5125;if(s===Rn)return 5126;if(s===Bi)return n?5131:(o=t.get("OES_texture_half_float"),o!==null?o.HALF_FLOAT_OES:null);if(s===hl)return 6406;if(s===Be)return 6408;if(s===ul)return 6409;if(s===fl)return 6410;if(s===Ln)return 6402;if(s===hi)return 34041;if(s===Ir)return o=t.get("EXT_sRGB"),o!==null?o.SRGB_ALPHA_EXT:null;if(s===dl)return 6403;if(s===pl)return 36244;if(s===ml)return 33319;if(s===gl)return 33320;if(s===xl)return 36249;if(s===Js||s===$s||s===Ks||s===js)if(a===Ot)if(o=t.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(s===Js)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===$s)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===Ks)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===js)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=t.get("WEBGL_compressed_texture_s3tc"),o!==null){if(s===Js)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===$s)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===Ks)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===js)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===zo||s===Oo||s===Bo||s===Uo)if(o=t.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(s===zo)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===Oo)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===Bo)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===Uo)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===_l)return o=t.get("WEBGL_compressed_texture_etc1"),o!==null?o.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===ko||s===Vo)if(o=t.get("WEBGL_compressed_texture_etc"),o!==null){if(s===ko)return a===Ot?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(s===Vo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===Go||s===Ho||s===Wo||s===qo||s===Xo||s===Yo||s===Zo||s===Jo||s===$o||s===Ko||s===jo||s===Qo||s===ta||s===ea)if(o=t.get("WEBGL_compressed_texture_astc"),o!==null){if(s===Go)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===Ho)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===Wo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===qo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===Xo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===Yo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===Zo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===Jo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===$o)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===Ko)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===jo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===Qo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===ta)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===ea)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===Qs)if(o=t.get("EXT_texture_compression_bptc"),o!==null){if(s===Qs)return a===Ot?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(s===yl||s===na||s===ia||s===sa)if(o=t.get("EXT_texture_compression_rgtc"),o!==null){if(s===Qs)return o.COMPRESSED_RED_RGTC1_EXT;if(s===na)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===ia)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===sa)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===oi?n?34042:(o=t.get("WEBGL_depth_texture"),o!==null?o.UNSIGNED_INT_24_8_WEBGL:null):r[s]!==void 0?r[s]:null}return{convert:i}}var Yr=class extends Se{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}},si=class extends pe{constructor(){super(),this.isGroup=!0,this.type="Group"}},cp={type:"move"},zi=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new si,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 si,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new R,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new R),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new si,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new R,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new R),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){let e=this._hand;if(e)for(let n of t.hand.values())this._getHandJoint(e,n)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,e,n){let i=null,s=null,a=null,o=this._targetRay,c=this._grip,l=this._hand;if(t&&e.session.visibilityState!=="visible-blurred"){if(l&&t.hand){a=!0;for(let p of t.hand.values()){let d=e.getJointPose(p,n),g=this._getHandJoint(l,p);d!==null&&(g.matrix.fromArray(d.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.jointRadius=d.radius),g.visible=d!==null}let h=l.joints["index-finger-tip"],f=l.joints["thumb-tip"],u=h.position.distanceTo(f.position),m=.02,x=.005;l.inputState.pinching&&u>m+x?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&u<=m-x&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else c!==null&&t.gripSpace&&(s=e.getPose(t.gripSpace,n),s!==null&&(c.matrix.fromArray(s.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),s.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(s.linearVelocity)):c.hasLinearVelocity=!1,s.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(s.angularVelocity)):c.hasAngularVelocity=!1));o!==null&&(i=e.getPose(t.targetRaySpace,n),i===null&&s!==null&&(i=s),i!==null&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(cp)))}return o!==null&&(o.visible=i!==null),c!==null&&(c.visible=s!==null),l!==null&&(l.visible=a!==null),this}_getHandJoint(t,e){if(t.joints[e.jointName]===void 0){let n=new si;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}},Zr=class extends ue{constructor(t,e,n,i,s,a,o,c,l,h){if(h=h!==void 0?h:Ln,h!==Ln&&h!==hi)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&h===Ln&&(n=Pn),n===void 0&&h===hi&&(n=oi),super(null,i,s,a,o,c,h,n,l),this.isDepthTexture=!0,this.image={width:t,height:e},this.magFilter=o!==void 0?o:ce,this.minFilter=c!==void 0?c:ce,this.flipY=!1,this.generateMipmaps=!1}},Jr=class extends mn{constructor(t,e){super();let n=this,i=null,s=1,a=null,o="local-floor",c=1,l=null,h=null,f=null,u=null,m=null,x=null,p=e.getContextAttributes(),d=null,g=null,M=[],_=[],v=new Set,b=new Map,A=new Se;A.layers.enable(1),A.viewport=new Xt;let C=new Se;C.layers.enable(2),C.viewport=new Xt;let y=[A,C],S=new Yr;S.layers.enable(1),S.layers.enable(2);let P=null,O=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(z){let K=M[z];return K===void 0&&(K=new zi,M[z]=K),K.getTargetRaySpace()},this.getControllerGrip=function(z){let K=M[z];return K===void 0&&(K=new zi,M[z]=K),K.getGripSpace()},this.getHand=function(z){let K=M[z];return K===void 0&&(K=new zi,M[z]=K),K.getHandSpace()};function B(z){let K=_.indexOf(z.inputSource);if(K===-1)return;let nt=M[K];nt!==void 0&&nt.dispatchEvent({type:z.type,data:z.inputSource})}function D(){i.removeEventListener("select",B),i.removeEventListener("selectstart",B),i.removeEventListener("selectend",B),i.removeEventListener("squeeze",B),i.removeEventListener("squeezestart",B),i.removeEventListener("squeezeend",B),i.removeEventListener("end",D),i.removeEventListener("inputsourceschange",I);for(let z=0;z=0&&(_[it]=null,M[it].disconnect(nt))}for(let K=0;K=_.length){_.push(nt),it=Mt;break}else if(_[Mt]===null){_[Mt]=nt,it=Mt;break}if(it===-1)break}let U=M[it];U&&U.connect(nt)}}let k=new R,Y=new R;function Z(z,K,nt){k.setFromMatrixPosition(K.matrixWorld),Y.setFromMatrixPosition(nt.matrixWorld);let it=k.distanceTo(Y),U=K.projectionMatrix.elements,Mt=nt.projectionMatrix.elements,ht=U[14]/(U[10]-1),ut=U[14]/(U[10]+1),at=(U[9]+1)/U[5],Ft=(U[9]-1)/U[5],bt=(U[8]-1)/U[0],_t=(Mt[8]+1)/Mt[0],se=ht*bt,Ae=ht*_t,te=it/(-bt+_t),Ee=te*-bt;K.matrixWorld.decompose(z.position,z.quaternion,z.scale),z.translateX(Ee),z.translateZ(te),z.matrixWorld.compose(z.position,z.quaternion,z.scale),z.matrixWorldInverse.copy(z.matrixWorld).invert();let Wt=ht+te,Nt=ut+te,Ze=se-Ee,De=Ae+(it-Ee),E=at*ut/Nt*Wt,w=Ft*ut/Nt*Wt;z.projectionMatrix.makePerspective(Ze,De,E,w,Wt,Nt)}function H(z,K){K===null?z.matrixWorld.copy(z.matrix):z.matrixWorld.multiplyMatrices(K.matrixWorld,z.matrix),z.matrixWorldInverse.copy(z.matrixWorld).invert()}this.updateCamera=function(z){if(i===null)return;S.near=C.near=A.near=z.near,S.far=C.far=A.far=z.far,(P!==S.near||O!==S.far)&&(i.updateRenderState({depthNear:S.near,depthFar:S.far}),P=S.near,O=S.far);let K=z.parent,nt=S.cameras;H(S,K);for(let U=0;UU&&(b.set(it,it.lastChangedTime),n.dispatchEvent({type:"planechanged",data:it}))}}x=null}let dt=new Qa;dt.setAnimationLoop(J),this.setAnimationLoop=function(z){$=z},this.dispose=function(){}}};function lp(r,t){function e(p,d){d.color.getRGB(p.fogColor.value,ja(r)),d.isFog?(p.fogNear.value=d.near,p.fogFar.value=d.far):d.isFogExp2&&(p.fogDensity.value=d.density)}function n(p,d,g,M,_){d.isMeshBasicMaterial||d.isMeshLambertMaterial?i(p,d):d.isMeshToonMaterial?(i(p,d),h(p,d)):d.isMeshPhongMaterial?(i(p,d),l(p,d)):d.isMeshStandardMaterial?(i(p,d),f(p,d),d.isMeshPhysicalMaterial&&u(p,d,_)):d.isMeshMatcapMaterial?(i(p,d),m(p,d)):d.isMeshDepthMaterial?i(p,d):d.isMeshDistanceMaterial?(i(p,d),x(p,d)):d.isMeshNormalMaterial?i(p,d):d.isLineBasicMaterial?(s(p,d),d.isLineDashedMaterial&&a(p,d)):d.isPointsMaterial?o(p,d,g,M):d.isSpriteMaterial?c(p,d):d.isShadowMaterial?(p.color.value.copy(d.color),p.opacity.value=d.opacity):d.isShaderMaterial&&(d.uniformsNeedUpdate=!1)}function i(p,d){p.opacity.value=d.opacity,d.color&&p.diffuse.value.copy(d.color),d.emissive&&p.emissive.value.copy(d.emissive).multiplyScalar(d.emissiveIntensity),d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===he&&(p.bumpScale.value*=-1)),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias),d.emissiveMap&&(p.emissiveMap.value=d.emissiveMap),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===he&&p.normalScale.value.negate()),d.specularMap&&(p.specularMap.value=d.specularMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let g=t.get(d).envMap;if(g&&(p.envMap.value=g,p.flipEnvMap.value=g.isCubeTexture&&g.isRenderTargetTexture===!1?-1:1,p.reflectivity.value=d.reflectivity,p.ior.value=d.ior,p.refractionRatio.value=d.refractionRatio),d.lightMap){p.lightMap.value=d.lightMap;let v=r.physicallyCorrectLights!==!0?Math.PI:1;p.lightMapIntensity.value=d.lightMapIntensity*v}d.aoMap&&(p.aoMap.value=d.aoMap,p.aoMapIntensity.value=d.aoMapIntensity);let M;d.map?M=d.map:d.specularMap?M=d.specularMap:d.displacementMap?M=d.displacementMap:d.normalMap?M=d.normalMap:d.bumpMap?M=d.bumpMap:d.roughnessMap?M=d.roughnessMap:d.metalnessMap?M=d.metalnessMap:d.alphaMap?M=d.alphaMap:d.emissiveMap?M=d.emissiveMap:d.clearcoatMap?M=d.clearcoatMap:d.clearcoatNormalMap?M=d.clearcoatNormalMap:d.clearcoatRoughnessMap?M=d.clearcoatRoughnessMap:d.iridescenceMap?M=d.iridescenceMap:d.iridescenceThicknessMap?M=d.iridescenceThicknessMap:d.specularIntensityMap?M=d.specularIntensityMap:d.specularColorMap?M=d.specularColorMap:d.transmissionMap?M=d.transmissionMap:d.thicknessMap?M=d.thicknessMap:d.sheenColorMap?M=d.sheenColorMap:d.sheenRoughnessMap&&(M=d.sheenRoughnessMap),M!==void 0&&(M.isWebGLRenderTarget&&(M=M.texture),M.matrixAutoUpdate===!0&&M.updateMatrix(),p.uvTransform.value.copy(M.matrix));let _;d.aoMap?_=d.aoMap:d.lightMap&&(_=d.lightMap),_!==void 0&&(_.isWebGLRenderTarget&&(_=_.texture),_.matrixAutoUpdate===!0&&_.updateMatrix(),p.uv2Transform.value.copy(_.matrix))}function s(p,d){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity}function a(p,d){p.dashSize.value=d.dashSize,p.totalSize.value=d.dashSize+d.gapSize,p.scale.value=d.scale}function o(p,d,g,M){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity,p.size.value=d.size*g,p.scale.value=M*.5,d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let _;d.map?_=d.map:d.alphaMap&&(_=d.alphaMap),_!==void 0&&(_.matrixAutoUpdate===!0&&_.updateMatrix(),p.uvTransform.value.copy(_.matrix))}function c(p,d){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity,p.rotation.value=d.rotation,d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let g;d.map?g=d.map:d.alphaMap&&(g=d.alphaMap),g!==void 0&&(g.matrixAutoUpdate===!0&&g.updateMatrix(),p.uvTransform.value.copy(g.matrix))}function l(p,d){p.specular.value.copy(d.specular),p.shininess.value=Math.max(d.shininess,1e-4)}function h(p,d){d.gradientMap&&(p.gradientMap.value=d.gradientMap)}function f(p,d){p.roughness.value=d.roughness,p.metalness.value=d.metalness,d.roughnessMap&&(p.roughnessMap.value=d.roughnessMap),d.metalnessMap&&(p.metalnessMap.value=d.metalnessMap),t.get(d).envMap&&(p.envMapIntensity.value=d.envMapIntensity)}function u(p,d,g){p.ior.value=d.ior,d.sheen>0&&(p.sheenColor.value.copy(d.sheenColor).multiplyScalar(d.sheen),p.sheenRoughness.value=d.sheenRoughness,d.sheenColorMap&&(p.sheenColorMap.value=d.sheenColorMap),d.sheenRoughnessMap&&(p.sheenRoughnessMap.value=d.sheenRoughnessMap)),d.clearcoat>0&&(p.clearcoat.value=d.clearcoat,p.clearcoatRoughness.value=d.clearcoatRoughness,d.clearcoatMap&&(p.clearcoatMap.value=d.clearcoatMap),d.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=d.clearcoatRoughnessMap),d.clearcoatNormalMap&&(p.clearcoatNormalScale.value.copy(d.clearcoatNormalScale),p.clearcoatNormalMap.value=d.clearcoatNormalMap,d.side===he&&p.clearcoatNormalScale.value.negate())),d.iridescence>0&&(p.iridescence.value=d.iridescence,p.iridescenceIOR.value=d.iridescenceIOR,p.iridescenceThicknessMinimum.value=d.iridescenceThicknessRange[0],p.iridescenceThicknessMaximum.value=d.iridescenceThicknessRange[1],d.iridescenceMap&&(p.iridescenceMap.value=d.iridescenceMap),d.iridescenceThicknessMap&&(p.iridescenceThicknessMap.value=d.iridescenceThicknessMap)),d.transmission>0&&(p.transmission.value=d.transmission,p.transmissionSamplerMap.value=g.texture,p.transmissionSamplerSize.value.set(g.width,g.height),d.transmissionMap&&(p.transmissionMap.value=d.transmissionMap),p.thickness.value=d.thickness,d.thicknessMap&&(p.thicknessMap.value=d.thicknessMap),p.attenuationDistance.value=d.attenuationDistance,p.attenuationColor.value.copy(d.attenuationColor)),p.specularIntensity.value=d.specularIntensity,p.specularColor.value.copy(d.specularColor),d.specularIntensityMap&&(p.specularIntensityMap.value=d.specularIntensityMap),d.specularColorMap&&(p.specularColorMap.value=d.specularColorMap)}function m(p,d){d.matcap&&(p.matcap.value=d.matcap)}function x(p,d){p.referencePosition.value.copy(d.referencePosition),p.nearDistance.value=d.nearDistance,p.farDistance.value=d.farDistance}return{refreshFogUniforms:e,refreshMaterialUniforms:n}}function hp(r,t,e,n){let i={},s={},a=[],o=e.isWebGL2?r.getParameter(35375):0;function c(M,_){let v=_.program;n.uniformBlockBinding(M,v)}function l(M,_){let v=i[M.id];v===void 0&&(x(M),v=h(M),i[M.id]=v,M.addEventListener("dispose",d));let b=_.program;n.updateUBOMapping(M,b);let A=t.render.frame;s[M.id]!==A&&(u(M),s[M.id]=A)}function h(M){let _=f();M.__bindingPointIndex=_;let v=r.createBuffer(),b=M.__size,A=M.usage;return r.bindBuffer(35345,v),r.bufferData(35345,b,A),r.bindBuffer(35345,null),r.bindBufferBase(35345,_,v),v}function f(){for(let M=0;M0){A=v%b;let B=b-A;A!==0&&B-P.boundary<0&&(v+=b-A,S.__offset=v)}v+=P.storage}return A=v%b,A>0&&(v+=b-A),M.__size=v,M.__cache={},this}function p(M){let _={boundary:0,storage:0};return typeof M=="number"?(_.boundary=4,_.storage=4):M.isVector2?(_.boundary=8,_.storage=8):M.isVector3||M.isColor?(_.boundary=16,_.storage=12):M.isVector4?(_.boundary=16,_.storage=16):M.isMatrix3?(_.boundary=48,_.storage=48):M.isMatrix4?(_.boundary=64,_.storage=64):M.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",M),_}function d(M){let _=M.target;_.removeEventListener("dispose",d);let v=a.indexOf(_.__bindingPointIndex);a.splice(v,1),r.deleteBuffer(i[_.id]),delete i[_.id],delete s[_.id]}function g(){for(let M in i)r.deleteBuffer(i[M]);a=[],i={},s={}}return{bind:c,update:l,dispose:g}}function up(){let r=ys("canvas");return r.style.display="block",r}function fp(r={}){this.isWebGLRenderer=!0;let t=r.canvas!==void 0?r.canvas:up(),e=r.context!==void 0?r.context:null,n=r.depth!==void 0?r.depth:!0,i=r.stencil!==void 0?r.stencil:!0,s=r.antialias!==void 0?r.antialias:!1,a=r.premultipliedAlpha!==void 0?r.premultipliedAlpha:!0,o=r.preserveDrawingBuffer!==void 0?r.preserveDrawingBuffer:!1,c=r.powerPreference!==void 0?r.powerPreference:"default",l=r.failIfMajorPerformanceCaveat!==void 0?r.failIfMajorPerformanceCaveat:!1,h;e!==null?h=e.getContextAttributes().alpha:h=r.alpha!==void 0?r.alpha:!1;let f=null,u=null,m=[],x=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Nn,this.physicallyCorrectLights=!1,this.toneMapping=nn,this.toneMappingExposure=1;let p=this,d=!1,g=0,M=0,_=null,v=-1,b=null,A=new Xt,C=new Xt,y=null,S=t.width,P=t.height,O=1,B=null,D=null,I=new Xt(0,0,S,P),k=new Xt(0,0,S,P),Y=!1,Z=new Ps,H=!1,$=!1,J=null,dt=new zt,z=new At,K=new R,nt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function it(){return _===null?O:1}let U=e;function Mt(T,F){for(let G=0;G0?u=x[x.length-1]:u=null,m.pop(),m.length>0?f=m[m.length-1]:f=null};function Kt(T,F,G,N){if(T.visible===!1)return;if(T.layers.test(F.layers)){if(T.isGroup)G=T.renderOrder;else if(T.isLOD)T.autoUpdate===!0&&T.update(F);else if(T.isLight)u.pushLight(T),T.castShadow&&u.pushShadow(T);else if(T.isSprite){if(!T.frustumCulled||Z.intersectsSprite(T)){N&&K.setFromMatrixPosition(T.matrixWorld).applyMatrix4(dt);let vt=Wt.update(T),St=T.material;St.visible&&f.push(T,vt,St,G,K.z,null)}}else if((T.isMesh||T.isLine||T.isPoints)&&(T.isSkinnedMesh&&T.skeleton.frame!==Ft.render.frame&&(T.skeleton.update(),T.skeleton.frame=Ft.render.frame),!T.frustumCulled||Z.intersectsObject(T))){N&&K.setFromMatrixPosition(T.matrixWorld).applyMatrix4(dt);let vt=Wt.update(T),St=T.material;if(Array.isArray(St)){let Tt=vt.groups;for(let Lt=0,Et=Tt.length;Lt0&&vn(q,F,G),N&&at.viewport(A.copy(N)),q.length>0&&kt(q,F,G),pt.length>0&&kt(pt,F,G),vt.length>0&&kt(vt,F,G),at.buffers.depth.setTest(!0),at.buffers.depth.setMask(!0),at.buffers.color.setMask(!0),at.setPolygonOffset(!1)}function vn(T,F,G){let N=ut.isWebGL2;J===null&&(J=new rn(1,1,{generateMipmaps:!0,type:ht.has("EXT_color_buffer_half_float")?Bi:Dn,minFilter:Oi,samples:N&&s===!0?4:0})),p.getDrawingBufferSize(z),N?J.setSize(z.x,z.y):J.setSize(Dr(z.x),Dr(z.y));let q=p.getRenderTarget();p.setRenderTarget(J),p.clear();let pt=p.toneMapping;p.toneMapping=nn,kt(T,F,G),p.toneMapping=pt,_t.updateMultisampleRenderTarget(J),_t.updateRenderTargetMipmap(J),p.setRenderTarget(q)}function kt(T,F,G){let N=F.isScene===!0?F.overrideMaterial:null;for(let q=0,pt=T.length;q0&&_t.useMultisampledRTT(T)===!1?q=bt.get(T).__webglMultisampledFramebuffer:q=Et,A.copy(T.viewport),C.copy(T.scissor),y=T.scissorTest}else A.copy(I).multiplyScalar(O).floor(),C.copy(k).multiplyScalar(O).floor(),y=Y;if(at.bindFramebuffer(36160,q)&&ut.drawBuffers&&N&&at.drawBuffers(T,q),at.viewport(A),at.scissor(C),at.setScissorTest(y),pt){let Tt=bt.get(T.texture);U.framebufferTexture2D(36160,36064,34069+F,Tt.__webglTexture,G)}else if(vt){let Tt=bt.get(T.texture),Lt=F||0;U.framebufferTextureLayer(36160,36064,Tt.__webglTexture,G||0,Lt)}v=-1},this.readRenderTargetPixels=function(T,F,G,N,q,pt,vt){if(!(T&&T.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let St=bt.get(T).__webglFramebuffer;if(T.isWebGLCubeRenderTarget&&vt!==void 0&&(St=St[vt]),St){at.bindFramebuffer(36160,St);try{let Tt=T.texture,Lt=Tt.format,Et=Tt.type;if(Lt!==Be&&rt.convert(Lt)!==U.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let Ct=Et===Bi&&(ht.has("EXT_color_buffer_half_float")||ut.isWebGL2&&ht.has("EXT_color_buffer_float"));if(Et!==Dn&&rt.convert(Et)!==U.getParameter(35738)&&!(Et===Rn&&(ut.isWebGL2||ht.has("OES_texture_float")||ht.has("WEBGL_color_buffer_float")))&&!Ct){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}F>=0&&F<=T.width-N&&G>=0&&G<=T.height-q&&U.readPixels(F,G,N,q,rt.convert(Lt),rt.convert(Et),pt)}finally{let Tt=_!==null?bt.get(_).__webglFramebuffer:null;at.bindFramebuffer(36160,Tt)}}},this.copyFramebufferToTexture=function(T,F,G=0){let N=Math.pow(2,-G),q=Math.floor(F.image.width*N),pt=Math.floor(F.image.height*N);_t.setTexture2D(F,0),U.copyTexSubImage2D(3553,G,0,0,T.x,T.y,q,pt),at.unbindTexture()},this.copyTextureToTexture=function(T,F,G,N=0){let q=F.image.width,pt=F.image.height,vt=rt.convert(G.format),St=rt.convert(G.type);_t.setTexture2D(G,0),U.pixelStorei(37440,G.flipY),U.pixelStorei(37441,G.premultiplyAlpha),U.pixelStorei(3317,G.unpackAlignment),F.isDataTexture?U.texSubImage2D(3553,N,T.x,T.y,q,pt,vt,St,F.image.data):F.isCompressedTexture?U.compressedTexSubImage2D(3553,N,T.x,T.y,F.mipmaps[0].width,F.mipmaps[0].height,vt,F.mipmaps[0].data):U.texSubImage2D(3553,N,T.x,T.y,vt,St,F.image),N===0&&G.generateMipmaps&&U.generateMipmap(3553),at.unbindTexture()},this.copyTextureToTexture3D=function(T,F,G,N,q=0){if(p.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let pt=T.max.x-T.min.x+1,vt=T.max.y-T.min.y+1,St=T.max.z-T.min.z+1,Tt=rt.convert(N.format),Lt=rt.convert(N.type),Et;if(N.isData3DTexture)_t.setTexture3D(N,0),Et=32879;else if(N.isDataArrayTexture)_t.setTexture2DArray(N,0),Et=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}U.pixelStorei(37440,N.flipY),U.pixelStorei(37441,N.premultiplyAlpha),U.pixelStorei(3317,N.unpackAlignment);let Ct=U.getParameter(3314),Vt=U.getParameter(32878),ye=U.getParameter(3316),$e=U.getParameter(3315),Mn=U.getParameter(32877),Gt=G.isCompressedTexture?G.mipmaps[0]:G.image;U.pixelStorei(3314,Gt.width),U.pixelStorei(32878,Gt.height),U.pixelStorei(3316,T.min.x),U.pixelStorei(3315,T.min.y),U.pixelStorei(32877,T.min.z),G.isDataTexture||G.isData3DTexture?U.texSubImage3D(Et,q,F.x,F.y,F.z,pt,vt,St,Tt,Lt,Gt.data):G.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),U.compressedTexSubImage3D(Et,q,F.x,F.y,F.z,pt,vt,St,Tt,Gt.data)):U.texSubImage3D(Et,q,F.x,F.y,F.z,pt,vt,St,Tt,Lt,Gt),U.pixelStorei(3314,Ct),U.pixelStorei(32878,Vt),U.pixelStorei(3316,ye),U.pixelStorei(3315,$e),U.pixelStorei(32877,Mn),q===0&&N.generateMipmaps&&U.generateMipmap(Et),at.unbindTexture()},this.initTexture=function(T){T.isCubeTexture?_t.setTextureCube(T,0):T.isData3DTexture?_t.setTexture3D(T,0):T.isDataArrayTexture||T.isCompressedArrayTexture?_t.setTexture2DArray(T,0):_t.setTexture2D(T,0),at.unbindTexture()},this.resetState=function(){g=0,M=0,_=null,at.reset(),X.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}var $r=class extends fp{};$r.prototype.isWebGL1Renderer=!0;function dn(r,t,e){return sc(r)?new r.constructor(r.subarray(t,e!==void 0?e:r.length)):r.slice(t,e)}function ps(r,t,e){return!r||!e&&r.constructor===t?r:typeof t.BYTES_PER_ELEMENT=="number"?new t(r):Array.prototype.slice.call(r)}function sc(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}var pi=class{constructor(t,e,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new e.constructor(n),this.sampleValues=e,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){let e=this.parameterPositions,n=this._cachedIndex,i=e[n],s=e[n-1];n:{t:{let a;e:{i:if(!(t=s)){let o=e[1];t=s)break t}a=n,n=0;break e}break n}for(;n>>1;te;)--a;if(++a,s!==0||a!==i){s>=a&&(a=Math.max(a,1),s=a-1);let o=this.getValueSize();this.times=dn(n,s,a),this.values=dn(this.values,s*o,a*o)}return this}validate(){let t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let n=this.times,i=this.values,s=n.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let a=null;for(let o=0;o!==s;o++){let c=n[o];if(typeof c=="number"&&isNaN(c)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,c),t=!1;break}if(a!==null&&a>c){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,c,a),t=!1;break}a=c}if(i!==void 0&&sc(i))for(let o=0,c=i.length;o!==c;++o){let l=i[o];if(isNaN(l)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,l),t=!1;break}}return t}optimize(){let t=dn(this.times),e=dn(this.values),n=this.getValueSize(),i=this.getInterpolation()===tr,s=t.length-1,a=1;for(let o=1;o0){t[a]=t[s];for(let o=s*n,c=a*n,l=0;l!==n;++l)e[c+l]=e[o+l];++a}return a!==t.length?(this.times=dn(t,0,a),this.values=dn(e,0,a*n)):(this.times=t,this.values=e),this}clone(){let t=dn(this.times,0),e=dn(this.values,0),n=this.constructor,i=new n(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}};Ve.prototype.TimeBufferType=Float32Array;Ve.prototype.ValueBufferType=Float32Array;Ve.prototype.DefaultInterpolation=_s;var On=class extends Ve{};On.prototype.ValueTypeName="bool";On.prototype.ValueBufferType=Array;On.prototype.DefaultInterpolation=xs;On.prototype.InterpolantFactoryMethodLinear=void 0;On.prototype.InterpolantFactoryMethodSmooth=void 0;var to=class extends Ve{};to.prototype.ValueTypeName="color";var eo=class extends Ve{};eo.prototype.ValueTypeName="number";var no=class extends pi{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){let s=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=(n-e)/(i-e),l=t*o;for(let h=l+o;l!==h;l+=4)gn.slerpFlat(s,0,a,l-o,a,l,c);return s}},Vi=class extends Ve{InterpolantFactoryMethodLinear(t){return new no(this.times,this.values,this.getValueSize(),t)}};Vi.prototype.ValueTypeName="quaternion";Vi.prototype.DefaultInterpolation=_s;Vi.prototype.InterpolantFactoryMethodSmooth=void 0;var Bn=class extends Ve{};Bn.prototype.ValueTypeName="string";Bn.prototype.ValueBufferType=Array;Bn.prototype.DefaultInterpolation=xs;Bn.prototype.InterpolantFactoryMethodLinear=void 0;Bn.prototype.InterpolantFactoryMethodSmooth=void 0;var io=class extends Ve{};io.prototype.ValueTypeName="vector";var ao="\\\\[\\\\]\\\\.:\\\\/",dp=new RegExp("["+ao+"]","g"),co="[^"+ao+"]",pp="[^"+ao.replace("\\\\.","")+"]",mp=/((?:WC+[\\/:])*)/.source.replace("WC",co),gp=/(WCOD+)?/.source.replace("WCOD",pp),xp=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",co),_p=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",co),yp=new RegExp("^"+mp+gp+xp+_p+"$"),vp=["material","materials","bones","map"],so=class{constructor(t,e,n){let i=n||Dt.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}getValue(t,e){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(t,e)}setValue(t,e){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=n.length;i!==s;++i)n[i].setValue(t,e)}bind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},Dt=class{constructor(t,e,n){this.path=e,this.parsedPath=n||Dt.parseTrackName(e),this.node=Dt.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new Dt.Composite(t,e,n):new Dt(t,e,n)}static sanitizeNodeName(t){return t.replace(/\\s/g,"_").replace(dp,"")}static parseTrackName(t){let e=yp.exec(t);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let s=n.nodeName.substring(i+1);vp.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){let n=t.skeleton.getBoneByName(e);if(n!==void 0)return n}if(t.children){let n=function(s){for(let a=0;ae&&(e=i,t=n)}return t}function ho(r,t){t.set(r)}function uo(r,t,e){let n,i;for(let s=0;s<3;s++){let a=s+3;n=r[s],i=t[s],e[s]=ni?n:i}}function Hi(r,t,e){for(let n=0;n<3;n++){let i=t[r+2*n],s=t[r+2*n+1],a=i-s,o=i+s;ae[n+3]&&(e[n+3]=o)}}function gi(r){let t=r[3]-r[0],e=r[4]-r[1],n=r[5]-r[2];return 2*(t*e+e*n+n*t)}function wp(r,t){if(!r.index){let e=r.attributes.position.count,n=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i;e>65535?i=new Uint32Array(new n(4*e)):i=new Uint16Array(new n(2*e)),r.setIndex(new Yt(i,1));for(let s=0;si-s);for(let i=0;ic&&(c=C),g&&vx&&(x=v);let y=r[M+2],S=r[M+3],P=y-S,O=y+S;Pl&&(l=O),g&&yp&&(p=y);let B=r[M+4],D=r[M+5],I=B-D,k=B+D;Ih&&(h=k),g&&Bd&&(d=B)}n[0]=s,n[1]=a,n[2]=o,n[3]=c,n[4]=l,n[5]=h,g&&(i[0]=f,i[1]=u,i[2]=m,i[3]=x,i[4]=p,i[5]=d)}function Tp(r,t,e,n){let i=1/0,s=1/0,a=1/0,o=-1/0,c=-1/0,l=-1/0;for(let h=t*6,f=(t+e)*6;ho&&(o=u);let m=r[h+2];mc&&(c=m);let x=r[h+4];xl&&(l=x)}n[0]=i,n[1]=s,n[2]=a,n[3]=o,n[4]=c,n[5]=l}function Ap(r,t,e,n,i){let s=e,a=e+n-1,o=i.pos,c=i.axis*2;for(;;){for(;s<=a&&t[s*6+c]=o;)a--;if(sr.candidate-t.candidate,xn=new Array(an).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),Ds=new Float32Array(6);function Cp(r,t,e,n,i,s){let a=-1,o=0;if(s===0)a=lo(t),a!==-1&&(o=(t[a]+t[a+3])/2);else if(s===1)a=lo(r),a!==-1&&(o=Pp(e,n,i,a));else if(s===2){let c=gi(r),l=1.25*i,h=n*6,f=(n+i)*6;for(let u=0;u<3;u++){let m=t[u],d=(t[u+3]-m)/an;if(i=C.candidate?Hi(v,e,C.rightCacheBounds):(Hi(v,e,C.leftCacheBounds),C.count++)}}for(let v=0;v<_;v++){let b=g[v],A=b.count,C=i-b.count,y=b.leftCacheBounds,S=b.rightCacheBounds,P=0;A!==0&&(P=gi(y)/c);let O=0;C!==0&&(O=gi(S)/c);let B=1+1.25*(P*A+O*C);B=an&&(A=an-1);let C=xn[A];C.count++,Hi(_,e,C.bounds)}let g=xn[an-1];ho(g.bounds,g.rightCacheBounds);for(let _=an-2;_>=0;_--){let v=xn[_],b=xn[_+1];uo(v.bounds,b.rightCacheBounds,v.rightCacheBounds)}let M=0;for(let _=0;_A&&(A=_),v>A&&(A=v);let C=(A-b)/2,y=g*2;s[m+y+0]=b+C,s[m+y+1]=C+(Math.abs(b)+C)*rc,bt[g+3]&&(t[g+3]=A)}}return s}function Lp(r,t){function e(g){u&&u(g/m)}function n(g,M,_,v=null,b=0){if(!x&&b>=c&&(x=!0,l&&(console.warn(\`MeshBVH: Max depth of \${c} reached when generating BVH. Consider increasing maxDepth.\`),console.warn(r))),_<=h||b>=c)return e(M+_),g.offset=M,g.count=_,g;let A=Cp(g.boundingData,v,a,M,_,f);if(A.axis===-1)return e(M+_),g.offset=M,g.count=_,g;let C=Ap(o,a,M,_,A);if(C===M||C===M+_)e(M+_),g.offset=M,g.count=_;else{g.splitAxis=A.axis;let y=new Un,S=M,P=C-M;g.left=y,y.boundingData=new Float32Array(6),po(a,S,P,y.boundingData,s),n(y,S,P,s,b+1);let O=new Un,B=C,D=_-P;g.right=O,O.boundingData=new Float32Array(6),po(a,B,D,O.boundingData,s),n(O,B,D,s,b+1)}return g}wp(r,t);let i=new Float32Array(6),s=new Float32Array(6),a=Rp(r,i),o=r.index.array,c=t.maxDepth,l=t.verbose,h=t.maxLeafTris,f=t.strategy,u=t.onProgress,m=r.index.count/3,x=!1,p=[],d=Sp(r);if(d.length===1){let g=d[0],M=new Un;M.boundingData=i,Tp(a,g.offset,g.count,s),n(M,g.offset,g.count,s),p.push(M)}else for(let g of d){let M=new Un;M.boundingData=new Float32Array(6),po(a,g.offset,g.count,M.boundingData,s),n(M,g.offset,g.count,s),p.push(M)}return p}function cc(r,t){let e=Lp(r,t),n,i,s,a=[],o=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let h=0;hMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return i[u+6]=_/4,_=l(_,g),i[u+7]=M,_}}}var ge=class{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(t,e){let n=1/0,i=-1/0;for(let s=0,a=t.length;si?c:i}this.min=n,this.max=i}setFromPoints(t,e){let n=1/0,i=-1/0;for(let s=0,a=e.length;si?c:i}this.min=n,this.max=i}isSeparated(t){return this.min>t.max||t.min>this.max}};ge.prototype.setFromBox=function(){let r=new R;return function(e,n){let i=n.min,s=n.max,a=1/0,o=-1/0;for(let c=0;c<=1;c++)for(let l=0;l<=1;l++)for(let h=0;h<=1;h++){r.x=i.x*c+s.x*(1-c),r.y=i.y*l+s.y*(1-l),r.z=i.z*h+s.z*(1-h);let f=e.dot(r);a=Math.min(f,a),o=Math.max(f,o)}this.min=a,this.max=o}}();var Qp=function(){let r=new ge;return function(e,n){let i=e.points,s=e.satAxes,a=e.satBounds,o=n.points,c=n.satAxes,l=n.satBounds;for(let h=0;h<3;h++){let f=a[h],u=s[h];if(r.setFromPoints(u,o),f.isSeparated(r))return!1}for(let h=0;h<3;h++){let f=l[h],u=c[h];if(r.setFromPoints(u,i),f.isSeparated(r))return!1}}}();var Ip=function(){let r=new R,t=new R,e=new R;return function(i,s,a){let o=i.start,c=r,l=s.start,h=t;e.subVectors(o,l),r.subVectors(i.end,i.start),t.subVectors(s.end,s.start);let f=e.dot(h),u=h.dot(c),m=h.dot(h),x=e.dot(c),d=c.dot(c)*m-u*u,g,M;d!==0?g=(f*u-x*m)/d:g=0,M=(f+g*u)/m,a.x=g,a.y=M}}(),Wi=function(){let r=new At,t=new R,e=new R;return function(i,s,a,o){Ip(i,s,r);let c=r.x,l=r.y;if(c>=0&&c<=1&&l>=0&&l<=1){i.at(c,a),s.at(l,o);return}else if(c>=0&&c<=1){l<0?s.at(0,o):s.at(1,o),i.closestPointToPoint(o,!0,a);return}else if(l>=0&&l<=1){c<0?i.at(0,a):i.at(1,a),s.closestPointToPoint(a,!0,o);return}else{let h;c<0?h=i.start:h=i.end;let f;l<0?f=s.start:f=s.end;let u=t,m=e;if(i.closestPointToPoint(f,!0,t),s.closestPointToPoint(h,!0,e),u.distanceToSquared(f)<=m.distanceToSquared(h)){a.copy(u),o.copy(f);return}else{a.copy(h),o.copy(m);return}}}}(),lc=function(){let r=new R,t=new R,e=new Te,n=new me;return function(s,a){let{radius:o,center:c}=s,{a:l,b:h,c:f}=a;if(n.start=l,n.end=h,n.closestPointToPoint(c,!0,r).distanceTo(c)<=o||(n.start=l,n.end=f,n.closestPointToPoint(c,!0,r).distanceTo(c)<=o)||(n.start=h,n.end=f,n.closestPointToPoint(c,!0,r).distanceTo(c)<=o))return!0;let p=a.getPlane(e);if(Math.abs(p.distanceToPoint(c))<=o){let g=p.projectPoint(c,t);if(a.containsPoint(g))return!0}return!1}}();var Dp=1e-15;function xi(r){return Math.abs(r)new R),this.satBounds=new Array(4).fill().map(()=>new ge),this.points=[this.a,this.b,this.c],this.sphere=new Fn,this.plane=new Te,this.needsUpdate=!0}intersectsSphere(t){return lc(t,this)}update(){let t=this.a,e=this.b,n=this.c,i=this.points,s=this.satAxes,a=this.satBounds,o=s[0],c=a[0];this.getNormal(o),c.setFromPoints(o,i);let l=s[1],h=a[1];l.subVectors(t,e),h.setFromPoints(l,i);let f=s[2],u=a[2];f.subVectors(e,n),u.setFromPoints(f,i);let m=s[3],x=a[3];m.subVectors(n,t),x.setFromPoints(m,i),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,t),this.needsUpdate=!1}};xe.prototype.closestPointToSegment=function(){let r=new R,t=new R,e=new me;return function(i,s=null,a=null){let{start:o,end:c}=i,l=this.points,h,f=1/0;for(let u=0;u<3;u++){let m=(u+1)%3;e.start.copy(l[u]),e.end.copy(l[m]),Wi(e,i,r,t),h=r.distanceToSquared(t),h1-1e-10){let M=this.satBounds,_=this.satAxes;e[0]=m.a,e[1]=m.b,e[2]=m.c;for(let A=0;A<4;A++){let C=M[A],y=_[A];if(n.setFromPoints(y,e),C.isSeparated(n))return!1}let v=m.satBounds,b=m.satAxes;t[0]=this.a,t[1]=this.b,t[2]=this.c;for(let A=0;A<4;A++){let C=v[A],y=b[A];if(n.setFromPoints(y,t),C.isSeparated(n))return!1}for(let A=0;A<4;A++){let C=_[A];for(let y=0;y<4;y++){let S=b[y];if(s.crossVectors(C,S),n.setFromPoints(s,t),i.setFromPoints(s,e),n.isSeparated(i))return!1}}return x&&(p||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),x.start.set(0,0,0),x.end.set(0,0,0)),!0}else{let M=this.points,_=!1,v=0;for(let I=0;I<3;I++){let k=M[I],Y=M[(I+1)%3];l.start.copy(k),l.end.copy(Y),l.delta(a);let Z=_?h.start:h.end,H=xi(g.distanceToPoint(k));if(xi(g.normal.dot(a))&&H){h.copy(l),v=2;break}if((g.intersectLine(l,Z)||H)&&!xi(Z.distanceTo(Y))){if(v++,_)break;_=!0}}if(v===1&&m.containsPoint(h.end))return x&&(x.start.copy(h.end),x.end.copy(h.end)),!0;if(v!==2)return!1;let b=m.points,A=!1,C=0;for(let I=0;I<3;I++){let k=b[I],Y=b[(I+1)%3];l.start.copy(k),l.end.copy(Y),l.delta(o);let Z=A?f.start:f.end,H=xi(d.distanceToPoint(k));if(xi(d.normal.dot(o))&&H){f.copy(l),C=2;break}if((d.intersectLine(l,Z)||H)&&!xi(Z.distanceTo(Y))){if(C++,A)break;A=!0}}if(C===1&&this.containsPoint(f.end))return x&&(x.start.copy(f.end),x.end.copy(f.end)),!0;if(C!==2)return!1;if(h.delta(a),f.delta(o),a.dot(o)<0){let I=f.start;f.start=f.end,f.end=I}let y=h.start.dot(a),S=h.end.dot(a),P=f.start.dot(a),O=f.end.dot(a),B=S0?x.start.copy(h.start):x.start.copy(f.start),c.subVectors(h.end,f.end),c.dot(a)<0?x.end.copy(h.end):x.end.copy(f.end)),!0)}}}();xe.prototype.distanceToPoint=function(){let r=new R;return function(e){return this.closestPointToPoint(e,r),e.distanceTo(r)}}();xe.prototype.distanceToTriangle=function(){let r=new R,t=new R,e=["a","b","c"],n=new me,i=new me;return function(a,o=null,c=null){let l=o||c?n:null;if(this.intersectsTriangle(a,l))return(o||c)&&(o&&l.getCenter(o),c&&l.getCenter(c)),0;let h=1/0;for(let f=0;f<3;f++){let u,m=e[f],x=a[m];this.closestPointToPoint(x,r),u=x.distanceToSquared(r),unew R),this.satAxes=new Array(3).fill().map(()=>new R),this.satBounds=new Array(3).fill().map(()=>new ge),this.alignedSatBounds=new Array(3).fill().map(()=>new ge),this.needsUpdate=!1,t&&this.min.copy(t),e&&this.max.copy(e),n&&this.matrix.copy(n)}set(t,e,n){this.min.copy(t),this.max.copy(e),this.matrix.copy(n),this.needsUpdate=!0}copy(t){this.min.copy(t.min),this.max.copy(t.max),this.matrix.copy(t.matrix),this.needsUpdate=!0}};_e.prototype.update=function(){return function(){let t=this.matrix,e=this.min,n=this.max,i=this.points;for(let l=0;l<=1;l++)for(let h=0;h<=1;h++)for(let f=0;f<=1;f++){let u=1*l|2*h|4*f,m=i[u];m.x=l?n.x:e.x,m.y=h?n.y:e.y,m.z=f?n.z:e.z,m.applyMatrix4(t)}let s=this.satBounds,a=this.satAxes,o=i[0];for(let l=0;l<3;l++){let h=a[l],f=s[l],u=1<new me),e=new Array(12).fill().map(()=>new me),n=new R,i=new R;return function(a,o=0,c=null,l=null){if(this.needsUpdate&&this.update(),this.intersectsBox(a))return(c||l)&&(a.getCenter(i),this.closestPointToPoint(i,n),a.closestPointToPoint(n,i),c&&c.copy(n),l&&l.copy(i)),0;let h=o*o,f=a.min,u=a.max,m=this.points,x=1/0;for(let d=0;d<8;d++){let g=m[d];i.copy(g).clamp(f,u);let M=g.distanceToSquared(i);if(M=0,m,x;u?(m=vi(r),x=Mi(r,o)):(m=Mi(r,o),x=vi(r));let d=Gs(m,s,n,Us)?Vs(m,t,e,n):null;if(d){let _=d.point[h];if(u?_<=s[x+l]:_>=s[x+l+3])return d}let M=Gs(x,s,n,Us)?Vs(x,t,e,n):null;return d&&M?d.distance<=M.distance?d:M:d||M||null}}var xc=function(){let r,t,e=[],n=new _i(()=>new fe);return function(...a){r=n.getPrimitive(),t=n.getPrimitive(),e.push(r,t);let o=i(...a);n.releasePrimitive(r),n.releasePrimitive(t),e.pop(),e.pop();let c=e.length;return c>0&&(t=e[c-1],r=e[c-2]),o};function i(s,a,o,c,l=null,h=0,f=0){function u(_){let v=_*2,b=_n,A=yn;for(;!cn(v,b);)_=vi(_),v=_*2;return kn(_,A)}function m(_){let v=_*2,b=_n,A=yn;for(;!cn(v,b);)_=Mi(_,A),v=_*2;return kn(_,A)+yi(v,b)}let x=s*2,p=wi,d=_n,g=yn;if(cn(x,d)){let _=kn(s,g),v=yi(x,d);return Le(s,p,r),c(_,v,!1,f,h+s,r)}else{let _=vi(s),v=Mi(s,g),b=_,A=v,C,y,S,P;if(l&&(S=r,P=t,Le(b,p,S),Le(A,p,P),C=l(S),y=l(P),yi.intersectsBox(y),intersectsTriangle:y=>{y.a.applyMatrix4(l),y.b.applyMatrix4(l),y.c.applyMatrix4(l),y.needsUpdate=!0;for(let S=b*3,P=(A+b)*3;Snew xe),Ye=class{static serialize(t,e={}){if(e.isBufferGeometry)return console.warn("MeshBVH.serialize: The arguments for the function have changed. See documentation for new signature."),Ye.serialize(arguments[0],{cloneBuffers:arguments[2]===void 0?!0:arguments[2]});e=Zi({cloneBuffers:!0},e);let n=t.geometry,i=t._roots,s=n.getIndex(),a;return e.cloneBuffers?a={roots:i.map(o=>o.slice()),index:s.array.slice()}:a={roots:i,index:s.array},a}static deserialize(t,e,n={}){if(typeof n=="boolean")return console.warn("MeshBVH.deserialize: The arguments for the function have changed. See documentation for new signature."),Ye.deserialize(arguments[0],arguments[1],{setIndex:arguments[2]===void 0?!0:arguments[2]});n=Zi({setIndex:!0},n);let{index:i,roots:s}=t,a=new Ye(e,Co(Zi({},n),{[yo]:!0}));if(a._roots=s,n.setIndex){let o=e.getIndex();if(o===null){let c=new Yt(t.index,1,!1);e.setIndex(c)}else o.array!==i&&(o.array.set(i),o.needsUpdate=!0)}return a}constructor(t,e={}){if(t.isBufferGeometry){if(t.index&&t.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(e=Object.assign({strategy:0,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,[yo]:!1},e),e.useSharedArrayBuffer&&typeof SharedArrayBuffer=="undefined")throw new Error("MeshBVH: SharedArrayBuffer is not available.");this._roots=null,e[yo]||(this._roots=cc(t,e),!t.boundingBox&&e.setBoundingBox&&(t.boundingBox=this.getBoundingBox(new fe))),this.geometry=t}refit(t=null){t&&Array.isArray(t)&&(t=new Set(t));let e=this.geometry,n=e.index.array,i=e.attributes.position,s,a,o,c,l=0,h=this._roots;for(let u=0,m=h.length;uA&&(A=B),DC&&(C=D),Iy&&(y=I)}return c[u+0]!==_||c[u+1]!==v||c[u+2]!==b||c[u+3]!==A||c[u+4]!==C||c[u+5]!==y?(c[u+0]=_,c[u+1]=v,c[u+2]=b,c[u+3]=A,c[u+4]=C,c[u+5]=y,!0):!1}else{let g=u+8,M=a[u+6],_=g+m,v=M+m,b=x,A=!1,C=!1;t?b||(A=t.has(_),C=t.has(v),b=!A&&!C):(A=!0,C=!0);let y=b||A,S=b||C,P=!1;y&&(P=f(g,m,b));let O=!1;S&&(O=f(M,m,b));let B=P||O;if(B)for(let D=0;D<3;D++){let I=g+D,k=M+D,Y=c[I],Z=c[I+3],H=c[k],$=c[k+3];c[u+D]=Y$?Z:$}return B}}}traverse(t,e=0){let n=this._roots[e],i=new Uint32Array(n),s=new Uint16Array(n);a(0);function a(o,c=0){let l=o*2,h=s[l+15]===65535;if(h){let f=i[o+6],u=s[l+14];t(c,h,new Float32Array(n,o*4,6),f,u)}else{let f=o+32/4,u=i[o+6],m=i[o+7];t(c,h,new Float32Array(n,o*4,6),m)||(a(f,c+1),a(u,c+1))}}}raycast(t,e=Ue){let n=this._roots,i=this.geometry,s=[],a=e.isMaterial,o=Array.isArray(e),c=i.groups,l=a?e.side:e;for(let h=0,f=n.length;h{let g=x*3;return u(m,g,g+1,g+2,p,d)}}t={boundsTraverseOrder:n,intersectsBounds:t,intersectsTriangle:e,intersectsRange:null},console.warn("MeshBVH: Shapecast function signature has changed and now takes an object of callbacks as a second argument. See docs for new signature.")}let s=Xe.getPrimitive(),{boundsTraverseOrder:a,intersectsBounds:o,intersectsRange:c,intersectsTriangle:l}=t;if(c&&l){let u=c;c=(m,x,p,d,g)=>u(m,x,p,d,g)?!0:xo(m,x,i,l,p,d,s)}else c||(l?c=(u,m,x,p)=>xo(u,m,i,l,x,p,s):c=(u,m,x)=>x);let h=!1,f=0;for(let u of this._roots){if(Si(u),h=xc(0,i,o,c,a,f),qi(),h)break;f+=u.byteLength}return Xe.releasePrimitive(s),h}bvhcast(t,e,n){let{intersectsRanges:i,intersectsTriangles:s}=n,a=this.geometry.index,o=this.geometry.attributes.position,c=t.geometry.index,l=t.geometry.attributes.position;Ti.copy(e).invert();let h=Xe.getPrimitive(),f=Xe.getPrimitive();if(s){let m=function(x,p,d,g,M,_,v,b){for(let A=d,C=d+g;AMo.intersectsBox(m),intersectsRange:(m,x,p,d,g,M)=>(vo.copy(M),vo.applyMatrix4(Ti),t.shapecast({intersectsBounds:_=>vo.intersectsBox(_),intersectsRange:(_,v,b,A,C)=>i(m,x,_,v,d,g,A,C)}))});return Xe.releasePrimitive(h),Xe.releasePrimitive(f),u}intersectsBox(t,e){return Vn.set(t.min,t.max,e),Vn.needsUpdate=!0,this.shapecast({intersectsBounds:n=>Vn.intersectsBox(n),intersectsTriangle:n=>Vn.intersectsTriangle(n)})}intersectsSphere(t){return this.shapecast({intersectsBounds:e=>t.intersectsBox(e),intersectsTriangle:e=>e.intersectsSphere(t)})}closestPointToGeometry(t,e,n={},i={},s=0,a=1/0){t.boundingBox||t.computeBoundingBox(),Vn.set(t.boundingBox.min,t.boundingBox.max,e),Vn.needsUpdate=!0;let o=this.geometry,c=o.attributes.position,l=o.index,h=t.attributes.position,f=t.index,u=Xe.getPrimitive(),m=Xe.getPrimitive(),x=Hs,p=Bp,d=null,g=null;i&&(d=Up,g=kp);let M=1/0,_=null,v=null;return Ti.copy(e).invert(),Xi.matrix.copy(Ti),this.shapecast({boundsTraverseOrder:b=>Vn.distanceToBox(b),intersectsBounds:(b,A,C)=>C{if(t.boundsTree)return t.boundsTree.shapecast({boundsTraverseOrder:C=>Xi.distanceToBox(C),intersectsBounds:(C,y,S)=>S{for(let S=C*3,P=(C+y)*3;S(Yi.copy(t).clamp(h.min,h.max),Yi.distanceToSquared(t)),intersectsBounds:(h,f,u)=>u{h.closestPointToPoint(t,Yi);let u=t.distanceToSquared(Yi);return u{Le(0,new Float32Array(n),yc),t.union(yc)}),t}};var bo=self;bo.addEventListener("message",async function({data:r}){let t=performance.now();function e(o){let c=performance.now();(c-t>=10||o===1)&&(postMessage({error:void 0,serialized:void 0,position:void 0,progress:o}),t=c)}let{id:n,index:i,position:s,options:a}=r;try{let o=new ke;if(o.setAttribute("position",new Yt(s,3,!1)),i&&o.setIndex(new Yt(i,1,!1)),a.includedProgressCallback&&(a.onProgress=e),a.groups){let h=a.groups;for(let f in h){let u=h[f];o.addGroup(u.start,u.count,u.materialIndex)}}let c=new Ye(o,a),l=Ye.serialize(c,{cloneBuffers:!1});bo.postMessage({id:n,error:void 0,serialized:l,position:s,progress:1},[l.index.buffer,s.buffer,...l.roots])}catch(o){bo.postMessage({id:n,error:o,serialized:void 0,position:void 0,progress:1})}}); -/*! Bundled license information: - -three/build/three.module.js: - (** - * @license - * Copyright 2010-2023 Three.js Authors - * SPDX-License-Identifier: MIT - *) -*/ -`)}var RC=class{constructor(){this.running=!1;this.worker=new EB,this.worker.onerror=r=>{throw r.message?new Error(`[GenerateMeshBVHWorker] Could not create Web Worker with error "${r.message}"`):new Error("[GenerateMeshBVHWorker] Could not create Web Worker.")}}isRunning(){return this.running}generate(r,e={}){if(this.running){ne.warn("[GenerateMeshBVHWorker] Already running job.");return}if(!this.worker){ne.warn("[GenerateMeshBVHWorker] Worker has been disposed.");return}let{worker:i}=this;this.running=!0;let n=new Map;r.forEach(a=>{n.set(a.id,a)});let s=0;return new Promise((a,o)=>{let l=()=>{++s===n.size&&(this.running=!1,i.onmessage=null,a())};i.onerror=c=>{ne.warn(`[GenerateMeshBVHWorker] ${c.message}`),o(new Error(`[GenerateMeshBVHWorker] ${c.message}`)),this.running=!1},i.onmessage=c=>{this.running=!1;let{data:u}=c;if(u.error)ne.warn(u.error),l();else if(u.serialized){let{serialized:h,position:p,id:d}=u,f=n.get(d),m=Nc.deserialize(h,f,{setIndex:!1}),g=Object.assign({setBoundingBox:!0},e);if(g.transferred&&(f.attributes.position.array=p),f.index)e.saveOriginalIndex&&!f.userData.originalIndex&&(f.userData.originalIndex=f.index.array),ne.debug("before update, index:",f.index.array),f.index.array=h.index;else{let y=new jt(h.index,1,!1);f.setIndex(y)}f.index&&(ne.debug("after update, index:",f.index.array),f.index.needsUpdate=!0),g.setBoundingBox&&!f.boundingBox&&(f.boundingBox=m.getBoundingBox(new Ot)),f.boundsTree=m,l()}else e.onProgress&&e.onProgress(u.progress)};for(let c of n){let u=c[0],h=c[1],p=h.index?h.index.array:void 0,d=h.attributes.position,f=d.array;if(d.isInterleavedBufferAttribute||p&&p.isInterleavedBufferAttribute){ne.warn("[GenerateMeshBVHWorker] InterleavedBufferAttribute are not supported for the geometry attributes."),l();continue}let m=[];e.transferred&&(m.push(f),p&&(m.push(p),e.saveOriginalIndex&&(h.userData.originalIndex=p.slice()))),i.postMessage({id:u,index:p,position:f,options:Mn(Ur({},e),{onProgress:null,includedProgressCallback:Boolean(e.onProgress),groups:[...h.groups]})},m.length>0?m.map(g=>g.buffer):[])}})}dispose(){this.worker.terminate(),this.worker=void 0}};function bB(){return Nx(`var vr="149";var co=0,Pr=1,ho=2;var Ga=1,uo=2,li=3,nn=0,ye=1,tn=2;var en=0,Gn=1,Rr=2,Lr=3,Ir=4,fo=5,Bn=100,po=101,mo=102,Dr=103,Nr=104,go=200,_o=201,xo=202,yo=203,Ha=204,Wa=205,vo=206,Mo=207,bo=208,wo=209,So=210,To=0,Ao=1,Eo=2,Gs=3,Co=4,Po=5,Ro=6,Lo=7,Xa=0,Io=1,Do=2,We=0,No=1,Fo=2,zo=3,Oo=4,Uo=5,qa=300,Xn=301,qn=302,Hs=303,Ws=304,ns=306,Xs=1e3,Pe=1001,qs=1002,ae=1003,Fr=1004;var us=1005;var Se=1006,Bo=1007;var pi=1008;var yn=1009,ko=1010,Vo=1011,Ya=1012,Go=1013,mn=1014,gn=1015,mi=1016,Ho=1017,Wo=1018,Hn=1020,Xo=1021,Re=1023,qo=1024,Yo=1025,_n=1026,Yn=1027,Zo=1028,Jo=1029,$o=1030,Ko=1031,jo=1033,ds=33776,fs=33777,ps=33778,ms=33779,zr=35840,Or=35841,Ur=35842,Br=35843,Qo=36196,kr=37492,Vr=37496,Gr=37808,Hr=37809,Wr=37810,Xr=37811,qr=37812,Yr=37813,Zr=37814,Jr=37815,$r=37816,Kr=37817,jr=37818,Qr=37819,ta=37820,ea=37821,gs=36492,tl=36283,na=36284,ia=36285,sa=36286;var ki=2300,Vi=2301,_s=2302,ra=2400,aa=2401,oa=2402;var vn=3e3,zt=3001,el=3200,nl=3201,il=0,sl=1;var Ie="srgb",gi="srgb-linear";var xs=7680;var rl=519,la=35044;var ca="300 es",Ys=1035,sn=class{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[t]===void 0&&(n[t]=[]),n[t].indexOf(e)===-1&&n[t].push(e)}hasEventListener(t,e){if(this._listeners===void 0)return!1;let n=this._listeners;return n[t]!==void 0&&n[t].indexOf(e)!==-1}removeEventListener(t,e){if(this._listeners===void 0)return;let i=this._listeners[t];if(i!==void 0){let s=i.indexOf(e);s!==-1&&i.splice(s,1)}}dispatchEvent(t){if(this._listeners===void 0)return;let n=this._listeners[t.type];if(n!==void 0){t.target=this;let i=n.slice(0);for(let s=0,o=i.length;s>8&255]+ee[r>>16&255]+ee[r>>24&255]+"-"+ee[t&255]+ee[t>>8&255]+"-"+ee[t>>16&15|64]+ee[t>>24&255]+"-"+ee[e&63|128]+ee[e>>8&255]+"-"+ee[e>>16&255]+ee[e>>24&255]+ee[n&255]+ee[n>>8&255]+ee[n>>16&255]+ee[n>>24&255]).toLowerCase()}function ue(r,t,e){return Math.max(t,Math.min(e,r))}function Mr(r,t){return(r%t+t)%t}function al(r,t,e,n,i){return n+(r-t)*(i-n)/(e-t)}function ol(r,t,e){return r!==t?(e-r)/(t-r):0}function di(r,t,e){return(1-e)*r+e*t}function ll(r,t,e,n){return di(r,t,1-Math.exp(-e*n))}function cl(r,t=1){return t-Math.abs(Mr(r,t*2)-t)}function hl(r,t,e){return r<=t?0:r>=e?1:(r=(r-t)/(e-t),r*r*(3-2*r))}function ul(r,t,e){return r<=t?0:r>=e?1:(r=(r-t)/(e-t),r*r*r*(r*(r*6-15)+10))}function dl(r,t){return r+Math.floor(Math.random()*(t-r+1))}function fl(r,t){return r+Math.random()*(t-r)}function pl(r){return r*(.5-Math.random())}function ml(r){r!==void 0&&(ha=r);let t=ha+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function gl(r){return r*ui}function _l(r){return r*Gi}function Zs(r){return(r&r-1)===0&&r!==0}function xl(r){return Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function Hi(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}function yl(r,t,e,n,i){let s=Math.cos,o=Math.sin,a=s(e/2),c=o(e/2),l=s((t+n)/2),h=o((t+n)/2),f=s((t-n)/2),u=o((t-n)/2),m=s((n-t)/2),_=o((n-t)/2);switch(i){case"XYX":r.set(a*h,c*f,c*u,a*l);break;case"YZY":r.set(c*u,a*h,c*f,a*l);break;case"ZXZ":r.set(c*f,c*u,a*h,a*l);break;case"XZX":r.set(a*h,c*_,c*m,a*l);break;case"YXY":r.set(c*m,a*h,c*_,a*l);break;case"ZYZ":r.set(c*_,c*m,a*h,a*l);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function ci(r,t){switch(t.constructor){case Float32Array:return r;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function he(r,t){switch(t.constructor){case Float32Array:return r;case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}var Za=Object.freeze({__proto__:null,DEG2RAD:ui,RAD2DEG:Gi,ceilPowerOfTwo:xl,clamp:ue,damp:ll,degToRad:gl,denormalize:ci,euclideanModulo:Mr,floorPowerOfTwo:Hi,generateUUID:jn,inverseLerp:ol,isPowerOfTwo:Zs,lerp:di,mapLinear:al,normalize:he,pingpong:cl,radToDeg:_l,randFloat:fl,randFloatSpread:pl,randInt:dl,seededRandom:ml,setQuaternionFromProperEuler:yl,smootherstep:ul,smoothstep:hl}),Nt=class{constructor(t=0,e=0){Nt.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){let n=Math.cos(e),i=Math.sin(e),s=this.x-t.x,o=this.y-t.y;return this.x=s*n-o*i+t.x,this.y=s*i+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},oe=class{constructor(){oe.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(t,e,n,i,s,o,a,c,l){let h=this.elements;return h[0]=t,h[1]=i,h[2]=a,h[3]=e,h[4]=s,h[5]=c,h[6]=n,h[7]=o,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,o=n[0],a=n[3],c=n[6],l=n[1],h=n[4],f=n[7],u=n[2],m=n[5],_=n[8],p=i[0],d=i[3],v=i[6],T=i[1],b=i[4],M=i[7],A=i[2],C=i[5],I=i[8];return s[0]=o*p+a*T+c*A,s[3]=o*d+a*b+c*C,s[6]=o*v+a*M+c*I,s[1]=l*p+h*T+f*A,s[4]=l*d+h*b+f*C,s[7]=l*v+h*M+f*I,s[2]=u*p+m*T+_*A,s[5]=u*d+m*b+_*C,s[8]=u*v+m*M+_*I,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],l=t[7],h=t[8];return e*o*h-e*a*l-n*s*h+n*a*c+i*s*l-i*o*c}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],l=t[7],h=t[8],f=h*o-a*l,u=a*c-h*s,m=l*s-o*c,_=e*f+n*u+i*m;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);let p=1/_;return t[0]=f*p,t[1]=(i*l-h*n)*p,t[2]=(a*n-i*o)*p,t[3]=u*p,t[4]=(h*e-i*c)*p,t[5]=(i*s-a*e)*p,t[6]=m*p,t[7]=(n*c-l*e)*p,t[8]=(o*e-n*s)*p,this}transpose(){let t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,s,o,a){let c=Math.cos(s),l=Math.sin(s);return this.set(n*c,n*l,-n*(c*o+l*a)+o+t,-i*l,i*c,-i*(-l*o+c*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(ys.makeScale(t,e)),this}rotate(t){return this.premultiply(ys.makeRotation(-t)),this}translate(t,e){return this.premultiply(ys.makeTranslation(t,e)),this}makeTranslation(t,e){return this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<9;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return new this.constructor().fromArray(this.elements)}},ys=new oe;function Ja(r){for(let t=r.length-1;t>=0;--t)if(r[t]>=65535)return!0;return!1}function Wi(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function xn(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function Bi(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}var vs={[Ie]:{[gi]:xn},[gi]:{[Ie]:Bi}},se={legacyMode:!0,get workingColorSpace(){return gi},set workingColorSpace(r){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(r,t,e){if(this.legacyMode||t===e||!t||!e)return r;if(vs[t]&&vs[t][e]!==void 0){let n=vs[t][e];return r.r=n(r.r),r.g=n(r.g),r.b=n(r.b),r}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(r,t){return this.convert(r,this.workingColorSpace,t)},toWorkingColorSpace:function(r,t){return this.convert(r,t,this.workingColorSpace)}},$a={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Wt={r:0,g:0,b:0},Ae={h:0,s:0,l:0},vi={h:0,s:0,l:0};function Ms(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*6*(2/3-e):r}function Mi(r,t){return t.r=r.r,t.g=r.g,t.b=r.b,t}var Ot=class{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,e===void 0&&n===void 0?this.set(t):this.setRGB(t,e,n)}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Ie){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,se.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=se.workingColorSpace){return this.r=t,this.g=e,this.b=n,se.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=se.workingColorSpace){if(t=Mr(t,1),e=ue(e,0,1),n=ue(n,0,1),e===0)this.r=this.g=this.b=n;else{let s=n<=.5?n*(1+e):n+e-n*e,o=2*n-s;this.r=Ms(o,s,t+1/3),this.g=Ms(o,s,t),this.b=Ms(o,s,t-1/3)}return se.toWorkingColorSpace(this,i),this}setStyle(t,e=Ie){function n(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^((?:rgb|hsl)a?)\\(([^\\)]*)\\)/.exec(t)){let s,o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(s=/^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(s[1],10))/255,this.g=Math.min(255,parseInt(s[2],10))/255,this.b=Math.min(255,parseInt(s[3],10))/255,se.toWorkingColorSpace(this,e),n(s[4]),this;if(s=/^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(s[1],10))/100,this.g=Math.min(100,parseInt(s[2],10))/100,this.b=Math.min(100,parseInt(s[3],10))/100,se.toWorkingColorSpace(this,e),n(s[4]),this;break;case"hsl":case"hsla":if(s=/^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(a)){let c=parseFloat(s[1])/360,l=parseFloat(s[2])/100,h=parseFloat(s[3])/100;return n(s[4]),this.setHSL(c,l,h,e)}break}}else if(i=/^\\#([A-Fa-f\\d]+)$/.exec(t)){let s=i[1],o=s.length;if(o===3)return this.r=parseInt(s.charAt(0)+s.charAt(0),16)/255,this.g=parseInt(s.charAt(1)+s.charAt(1),16)/255,this.b=parseInt(s.charAt(2)+s.charAt(2),16)/255,se.toWorkingColorSpace(this,e),this;if(o===6)return this.r=parseInt(s.charAt(0)+s.charAt(1),16)/255,this.g=parseInt(s.charAt(2)+s.charAt(3),16)/255,this.b=parseInt(s.charAt(4)+s.charAt(5),16)/255,se.toWorkingColorSpace(this,e),this}return t&&t.length>0?this.setColorName(t,e):this}setColorName(t,e=Ie){let n=$a[t.toLowerCase()];return n!==void 0?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=xn(t.r),this.g=xn(t.g),this.b=xn(t.b),this}copyLinearToSRGB(t){return this.r=Bi(t.r),this.g=Bi(t.g),this.b=Bi(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Ie){return se.fromWorkingColorSpace(Mi(this,Wt),t),ue(Wt.r*255,0,255)<<16^ue(Wt.g*255,0,255)<<8^ue(Wt.b*255,0,255)<<0}getHexString(t=Ie){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=se.workingColorSpace){se.fromWorkingColorSpace(Mi(this,Wt),e);let n=Wt.r,i=Wt.g,s=Wt.b,o=Math.max(n,i,s),a=Math.min(n,i,s),c,l,h=(a+o)/2;if(a===o)c=0,l=0;else{let f=o-a;switch(l=h<=.5?f/(o+a):f/(2-o-a),o){case n:c=(i-s)/f+(i2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement!="undefined"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&t instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&t instanceof ImageBitmap){let e=Wi("canvas");e.width=t.width,e.height=t.height;let n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);let i=n.getImageData(0,0,t.width,t.height),s=i.data;for(let o=0;o0&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==qa)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Xs:t.x=t.x-Math.floor(t.x);break;case Pe:t.x=t.x<0?0:1;break;case qs:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Xs:t.y=t.y-Math.floor(t.y);break;case Pe:t.y=t.y<0?0:1;break;case qs:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}};le.DEFAULT_IMAGE=null;le.DEFAULT_MAPPING=qa;le.DEFAULT_ANISOTROPY=1;var Xt=class{constructor(t=0,e=0,n=0,i=1){Xt.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*s,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*s,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*s,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*s,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,s,c=t.elements,l=c[0],h=c[4],f=c[8],u=c[1],m=c[5],_=c[9],p=c[2],d=c[6],v=c[10];if(Math.abs(h-u)<.01&&Math.abs(f-p)<.01&&Math.abs(_-d)<.01){if(Math.abs(h+u)<.1&&Math.abs(f+p)<.1&&Math.abs(_+d)<.1&&Math.abs(l+m+v-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let b=(l+1)/2,M=(m+1)/2,A=(v+1)/2,C=(h+u)/4,I=(f+p)/4,x=(_+d)/4;return b>M&&b>A?b<.01?(n=0,i=.707106781,s=.707106781):(n=Math.sqrt(b),i=C/n,s=I/n):M>A?M<.01?(n=.707106781,i=0,s=.707106781):(i=Math.sqrt(M),n=C/i,s=x/i):A<.01?(n=.707106781,i=.707106781,s=0):(s=Math.sqrt(A),n=I/s,i=x/s),this.set(n,i,s,e),this}let T=Math.sqrt((d-_)*(d-_)+(f-p)*(f-p)+(u-h)*(u-h));return Math.abs(T)<.001&&(T=1),this.x=(d-_)/T,this.y=(f-p)/T,this.z=(u-h)/T,this.w=Math.acos((l+m+v-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},qe=class extends sn{constructor(t=1,e=1,n={}){super(),this.isWebGLRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new Xt(0,0,t,e),this.scissorTest=!1,this.viewport=new Xt(0,0,t,e);let i={width:t,height:e,depth:1};this.texture=new le(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.internalFormat=n.internalFormat!==void 0?n.internalFormat:null,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Se,this.depthBuffer=n.depthBuffer!==void 0?n.depthBuffer:!0,this.stencilBuffer=n.stencilBuffer!==void 0?n.stencilBuffer:!1,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null,this.samples=n.samples!==void 0?n.samples:0}setSize(t,e,n=1){(this.width!==t||this.height!==e||this.depth!==n)&&(this.width=t,this.height=e,this.depth=n,this.texture.image.width=t,this.texture.image.height=e,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.isRenderTargetTexture=!0;let e=Object.assign({},t.texture.image);return this.texture.source=new qi(e),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},Yi=class extends le{constructor(t=null,e=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=ae,this.minFilter=ae,this.wrapR=Pe,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Js=class extends le{constructor(t=null,e=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=ae,this.minFilter=ae,this.wrapR=Pe,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var rn=class{constructor(t=0,e=0,n=0,i=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,s,o,a){let c=n[i+0],l=n[i+1],h=n[i+2],f=n[i+3],u=s[o+0],m=s[o+1],_=s[o+2],p=s[o+3];if(a===0){t[e+0]=c,t[e+1]=l,t[e+2]=h,t[e+3]=f;return}if(a===1){t[e+0]=u,t[e+1]=m,t[e+2]=_,t[e+3]=p;return}if(f!==p||c!==u||l!==m||h!==_){let d=1-a,v=c*u+l*m+h*_+f*p,T=v>=0?1:-1,b=1-v*v;if(b>Number.EPSILON){let A=Math.sqrt(b),C=Math.atan2(A,v*T);d=Math.sin(d*C)/A,a=Math.sin(a*C)/A}let M=a*T;if(c=c*d+u*M,l=l*d+m*M,h=h*d+_*M,f=f*d+p*M,d===1-a){let A=1/Math.sqrt(c*c+l*l+h*h+f*f);c*=A,l*=A,h*=A,f*=A}}t[e]=c,t[e+1]=l,t[e+2]=h,t[e+3]=f}static multiplyQuaternionsFlat(t,e,n,i,s,o){let a=n[i],c=n[i+1],l=n[i+2],h=n[i+3],f=s[o],u=s[o+1],m=s[o+2],_=s[o+3];return t[e]=a*_+h*f+c*m-l*u,t[e+1]=c*_+h*u+l*f-a*m,t[e+2]=l*_+h*m+a*u-c*f,t[e+3]=h*_-a*f-c*u-l*m,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){let n=t._x,i=t._y,s=t._z,o=t._order,a=Math.cos,c=Math.sin,l=a(n/2),h=a(i/2),f=a(s/2),u=c(n/2),m=c(i/2),_=c(s/2);switch(o){case"XYZ":this._x=u*h*f+l*m*_,this._y=l*m*f-u*h*_,this._z=l*h*_+u*m*f,this._w=l*h*f-u*m*_;break;case"YXZ":this._x=u*h*f+l*m*_,this._y=l*m*f-u*h*_,this._z=l*h*_-u*m*f,this._w=l*h*f+u*m*_;break;case"ZXY":this._x=u*h*f-l*m*_,this._y=l*m*f+u*h*_,this._z=l*h*_+u*m*f,this._w=l*h*f-u*m*_;break;case"ZYX":this._x=u*h*f-l*m*_,this._y=l*m*f+u*h*_,this._z=l*h*_-u*m*f,this._w=l*h*f+u*m*_;break;case"YZX":this._x=u*h*f+l*m*_,this._y=l*m*f+u*h*_,this._z=l*h*_-u*m*f,this._w=l*h*f-u*m*_;break;case"XZY":this._x=u*h*f-l*m*_,this._y=l*m*f-u*h*_,this._z=l*h*_+u*m*f,this._w=l*h*f+u*m*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return e!==!1&&this._onChangeCallback(),this}setFromAxisAngle(t,e){let n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){let e=t.elements,n=e[0],i=e[4],s=e[8],o=e[1],a=e[5],c=e[9],l=e[2],h=e[6],f=e[10],u=n+a+f;if(u>0){let m=.5/Math.sqrt(u+1);this._w=.25/m,this._x=(h-c)*m,this._y=(s-l)*m,this._z=(o-i)*m}else if(n>a&&n>f){let m=2*Math.sqrt(1+n-a-f);this._w=(h-c)/m,this._x=.25*m,this._y=(i+o)/m,this._z=(s+l)/m}else if(a>f){let m=2*Math.sqrt(1+a-n-f);this._w=(s-l)/m,this._x=(i+o)/m,this._y=.25*m,this._z=(c+h)/m}else{let m=2*Math.sqrt(1+f-n-a);this._w=(o-i)/m,this._x=(s+l)/m,this._y=(c+h)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return nMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(ue(this.dot(t),-1,1)))}rotateTowards(t,e){let n=this.angleTo(t);if(n===0)return this;let i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let n=t._x,i=t._y,s=t._z,o=t._w,a=e._x,c=e._y,l=e._z,h=e._w;return this._x=n*h+o*a+i*l-s*c,this._y=i*h+o*c+s*a-n*l,this._z=s*h+o*l+n*c-i*a,this._w=o*h-n*a-i*c-s*l,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);let n=this._x,i=this._y,s=this._z,o=this._w,a=o*t._w+n*t._x+i*t._y+s*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=i,this._z=s,this;let c=1-a*a;if(c<=Number.EPSILON){let m=1-e;return this._w=m*o+e*this._w,this._x=m*n+e*this._x,this._y=m*i+e*this._y,this._z=m*s+e*this._z,this.normalize(),this._onChangeCallback(),this}let l=Math.sqrt(c),h=Math.atan2(l,a),f=Math.sin((1-e)*h)/l,u=Math.sin(e*h)/l;return this._w=o*f+this._w*u,this._x=n*f+this._x*u,this._y=i*f+this._y*u,this._z=s*f+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){let t=Math.random(),e=Math.sqrt(1-t),n=Math.sqrt(t),i=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(e*Math.cos(i),n*Math.sin(s),n*Math.cos(s),e*Math.sin(i))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},N=class{constructor(t=0,e=0,n=0){N.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return n===void 0&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(ua.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(ua.setFromAxisAngle(t,e))}applyMatrix3(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[3]*n+s[6]*i,this.y=s[1]*e+s[4]*n+s[7]*i,this.z=s[2]*e+s[5]*n+s[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=t.elements,o=1/(s[3]*e+s[7]*n+s[11]*i+s[15]);return this.x=(s[0]*e+s[4]*n+s[8]*i+s[12])*o,this.y=(s[1]*e+s[5]*n+s[9]*i+s[13])*o,this.z=(s[2]*e+s[6]*n+s[10]*i+s[14])*o,this}applyQuaternion(t){let e=this.x,n=this.y,i=this.z,s=t.x,o=t.y,a=t.z,c=t.w,l=c*e+o*i-a*n,h=c*n+a*e-s*i,f=c*i+s*n-o*e,u=-s*e-o*n-a*i;return this.x=l*c+u*-s+h*-a-f*-o,this.y=h*c+u*-o+f*-s-l*-a,this.z=f*c+u*-a+l*-o-h*-s,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i,this.y=s[1]*e+s[5]*n+s[9]*i,this.z=s[2]*e+s[6]*n+s[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){let n=t.x,i=t.y,s=t.z,o=e.x,a=e.y,c=e.z;return this.x=i*c-s*a,this.y=s*o-n*c,this.z=n*a-i*o,this}projectOnVector(t){let e=t.lengthSq();if(e===0)return this.set(0,0,0);let n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return ws.copy(this).projectOnVector(t),this.sub(ws)}reflect(t){return this.sub(ws.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;let n=this.dot(t)/e;return Math.acos(ue(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){let i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){let e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=(Math.random()-.5)*2,e=Math.random()*Math.PI*2,n=Math.sqrt(1-t**2);return this.x=n*Math.cos(e),this.y=n*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},ws=new N,ua=new rn,Mn=class{constructor(t=new N(1/0,1/0,1/0),e=new N(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){let e=1/0,n=1/0,i=1/0,s=-1/0,o=-1/0,a=-1/0;for(let c=0,l=t.length;cs&&(s=h),f>o&&(o=f),u>a&&(a=u)}return this.min.set(e,n,i),this.max.set(s,o,a),this}setFromBufferAttribute(t){let e=1/0,n=1/0,i=1/0,s=-1/0,o=-1/0,a=-1/0;for(let c=0,l=t.count;cs&&(s=h),f>o&&(o=f),u>a&&(a=u)}return this.min.set(e,n,i),this.max.set(s,o,a),this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,hn),hn.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(ei),bi.subVectors(this.max,ei),An.subVectors(t.a,ei),En.subVectors(t.b,ei),Cn.subVectors(t.c,ei),Je.subVectors(En,An),$e.subVectors(Cn,En),un.subVectors(An,Cn);let e=[0,-Je.z,Je.y,0,-$e.z,$e.y,0,-un.z,un.y,Je.z,0,-Je.x,$e.z,0,-$e.x,un.z,0,-un.x,-Je.y,Je.x,0,-$e.y,$e.x,0,-un.y,un.x,0];return!Ts(e,An,En,Cn,bi)||(e=[1,0,0,0,1,0,0,0,1],!Ts(e,An,En,Cn,bi))?!1:(wi.crossVectors(Je,$e),e=[wi.x,wi.y,wi.z],Ts(e,An,En,Cn,bi))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return hn.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=this.getSize(hn).length()*.5,t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(Ue[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Ue[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Ue[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Ue[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Ue[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Ue[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Ue[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Ue[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Ue),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},Ue=[new N,new N,new N,new N,new N,new N,new N,new N],hn=new N,Ss=new Mn,An=new N,En=new N,Cn=new N,Je=new N,$e=new N,un=new N,ei=new N,bi=new N,wi=new N,dn=new N;function Ts(r,t,e,n,i){for(let s=0,o=r.length-3;s<=o;s+=3){dn.fromArray(r,s);let a=i.x*Math.abs(dn.x)+i.y*Math.abs(dn.y)+i.z*Math.abs(dn.z),c=t.dot(dn),l=e.dot(dn),h=n.dot(dn);if(Math.max(-Math.max(c,l,h),Math.min(c,l,h))>a)return!1}return!0}var Ml=new Mn,ni=new N,As=new N,_i=class{constructor(t=new N,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){let n=this.center;e!==void 0?n.copy(e):Ml.setFromPoints(t).getCenter(n);let i=0;for(let s=0,o=t.length;sthis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;ni.subVectors(t,this.center);let e=ni.lengthSq();if(e>this.radius*this.radius){let n=Math.sqrt(e),i=(n-this.radius)*.5;this.center.addScaledVector(ni,i/n),this.radius+=i}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(As.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(ni.copy(t.center).add(As)),this.expandByPoint(ni.copy(t.center).sub(As))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},Be=new N,Es=new N,Si=new N,Ke=new N,Cs=new N,Ti=new N,Ps=new N,$s=class{constructor(t=new N,e=new N(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Be)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);let n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=Be.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Be.copy(this.direction).multiplyScalar(e).add(this.origin),Be.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){Es.copy(t).add(e).multiplyScalar(.5),Si.copy(e).sub(t).normalize(),Ke.copy(this.origin).sub(Es);let s=t.distanceTo(e)*.5,o=-this.direction.dot(Si),a=Ke.dot(this.direction),c=-Ke.dot(Si),l=Ke.lengthSq(),h=Math.abs(1-o*o),f,u,m,_;if(h>0)if(f=o*c-a,u=o*a-c,_=s*h,f>=0)if(u>=-_)if(u<=_){let p=1/h;f*=p,u*=p,m=f*(f+o*u+2*a)+u*(o*f+u+2*c)+l}else u=s,f=Math.max(0,-(o*u+a)),m=-f*f+u*(u+2*c)+l;else u=-s,f=Math.max(0,-(o*u+a)),m=-f*f+u*(u+2*c)+l;else u<=-_?(f=Math.max(0,-(-o*s+a)),u=f>0?-s:Math.min(Math.max(-s,-c),s),m=-f*f+u*(u+2*c)+l):u<=_?(f=0,u=Math.min(Math.max(-s,-c),s),m=u*(u+2*c)+l):(f=Math.max(0,-(o*s+a)),u=f>0?s:Math.min(Math.max(-s,-c),s),m=-f*f+u*(u+2*c)+l);else u=o>0?-s:s,f=Math.max(0,-(o*u+a)),m=-f*f+u*(u+2*c)+l;return n&&n.copy(this.direction).multiplyScalar(f).add(this.origin),i&&i.copy(Si).multiplyScalar(u).add(Es),m}intersectSphere(t,e){Be.subVectors(t.center,this.origin);let n=Be.dot(this.direction),i=Be.dot(Be)-n*n,s=t.radius*t.radius;if(i>s)return null;let o=Math.sqrt(s-i),a=n-o,c=n+o;return a<0&&c<0?null:a<0?this.at(c,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){let n=this.distanceToPlane(t);return n===null?null:this.at(n,e)}intersectsPlane(t){let e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,s,o,a,c,l=1/this.direction.x,h=1/this.direction.y,f=1/this.direction.z,u=this.origin;return l>=0?(n=(t.min.x-u.x)*l,i=(t.max.x-u.x)*l):(n=(t.max.x-u.x)*l,i=(t.min.x-u.x)*l),h>=0?(s=(t.min.y-u.y)*h,o=(t.max.y-u.y)*h):(s=(t.max.y-u.y)*h,o=(t.min.y-u.y)*h),n>o||s>i||((s>n||isNaN(n))&&(n=s),(o=0?(a=(t.min.z-u.z)*f,c=(t.max.z-u.z)*f):(a=(t.max.z-u.z)*f,c=(t.min.z-u.z)*f),n>c||a>i)||((a>n||n!==n)&&(n=a),(c=0?n:i,e)}intersectsBox(t){return this.intersectBox(t,Be)!==null}intersectTriangle(t,e,n,i,s){Cs.subVectors(e,t),Ti.subVectors(n,t),Ps.crossVectors(Cs,Ti);let o=this.direction.dot(Ps),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Ke.subVectors(this.origin,t);let c=a*this.direction.dot(Ti.crossVectors(Ke,Ti));if(c<0)return null;let l=a*this.direction.dot(Cs.cross(Ke));if(l<0||c+l>o)return null;let h=-a*Ke.dot(Ps);return h<0?null:this.at(h/o,s)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},qt=class{constructor(){qt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(t,e,n,i,s,o,a,c,l,h,f,u,m,_,p,d){let v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=i,v[1]=s,v[5]=o,v[9]=a,v[13]=c,v[2]=l,v[6]=h,v[10]=f,v[14]=u,v[3]=m,v[7]=_,v[11]=p,v[15]=d,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new qt().fromArray(this.elements)}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){let e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){let e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){let e=this.elements,n=t.elements,i=1/Pn.setFromMatrixColumn(t,0).length(),s=1/Pn.setFromMatrixColumn(t,1).length(),o=1/Pn.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*s,e[5]=n[5]*s,e[6]=n[6]*s,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){let e=this.elements,n=t.x,i=t.y,s=t.z,o=Math.cos(n),a=Math.sin(n),c=Math.cos(i),l=Math.sin(i),h=Math.cos(s),f=Math.sin(s);if(t.order==="XYZ"){let u=o*h,m=o*f,_=a*h,p=a*f;e[0]=c*h,e[4]=-c*f,e[8]=l,e[1]=m+_*l,e[5]=u-p*l,e[9]=-a*c,e[2]=p-u*l,e[6]=_+m*l,e[10]=o*c}else if(t.order==="YXZ"){let u=c*h,m=c*f,_=l*h,p=l*f;e[0]=u+p*a,e[4]=_*a-m,e[8]=o*l,e[1]=o*f,e[5]=o*h,e[9]=-a,e[2]=m*a-_,e[6]=p+u*a,e[10]=o*c}else if(t.order==="ZXY"){let u=c*h,m=c*f,_=l*h,p=l*f;e[0]=u-p*a,e[4]=-o*f,e[8]=_+m*a,e[1]=m+_*a,e[5]=o*h,e[9]=p-u*a,e[2]=-o*l,e[6]=a,e[10]=o*c}else if(t.order==="ZYX"){let u=o*h,m=o*f,_=a*h,p=a*f;e[0]=c*h,e[4]=_*l-m,e[8]=u*l+p,e[1]=c*f,e[5]=p*l+u,e[9]=m*l-_,e[2]=-l,e[6]=a*c,e[10]=o*c}else if(t.order==="YZX"){let u=o*c,m=o*l,_=a*c,p=a*l;e[0]=c*h,e[4]=p-u*f,e[8]=_*f+m,e[1]=f,e[5]=o*h,e[9]=-a*h,e[2]=-l*h,e[6]=m*f+_,e[10]=u-p*f}else if(t.order==="XZY"){let u=o*c,m=o*l,_=a*c,p=a*l;e[0]=c*h,e[4]=-f,e[8]=l*h,e[1]=u*f+p,e[5]=o*h,e[9]=m*f-_,e[2]=_*f-m,e[6]=a*h,e[10]=p*f+u}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(bl,t,wl)}lookAt(t,e,n){let i=this.elements;return me.subVectors(t,e),me.lengthSq()===0&&(me.z=1),me.normalize(),je.crossVectors(n,me),je.lengthSq()===0&&(Math.abs(n.z)===1?me.x+=1e-4:me.z+=1e-4,me.normalize(),je.crossVectors(n,me)),je.normalize(),Ai.crossVectors(me,je),i[0]=je.x,i[4]=Ai.x,i[8]=me.x,i[1]=je.y,i[5]=Ai.y,i[9]=me.y,i[2]=je.z,i[6]=Ai.z,i[10]=me.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,o=n[0],a=n[4],c=n[8],l=n[12],h=n[1],f=n[5],u=n[9],m=n[13],_=n[2],p=n[6],d=n[10],v=n[14],T=n[3],b=n[7],M=n[11],A=n[15],C=i[0],I=i[4],x=i[8],S=i[12],L=i[1],X=i[5],q=i[9],z=i[13],R=i[2],G=i[6],Y=i[10],j=i[14],W=i[3],Q=i[7],Z=i[11],ft=i[15];return s[0]=o*C+a*L+c*R+l*W,s[4]=o*I+a*X+c*G+l*Q,s[8]=o*x+a*q+c*Y+l*Z,s[12]=o*S+a*z+c*j+l*ft,s[1]=h*C+f*L+u*R+m*W,s[5]=h*I+f*X+u*G+m*Q,s[9]=h*x+f*q+u*Y+m*Z,s[13]=h*S+f*z+u*j+m*ft,s[2]=_*C+p*L+d*R+v*W,s[6]=_*I+p*X+d*G+v*Q,s[10]=_*x+p*q+d*Y+v*Z,s[14]=_*S+p*z+d*j+v*ft,s[3]=T*C+b*L+M*R+A*W,s[7]=T*I+b*X+M*G+A*Q,s[11]=T*x+b*q+M*Y+A*Z,s[15]=T*S+b*z+M*j+A*ft,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[4],i=t[8],s=t[12],o=t[1],a=t[5],c=t[9],l=t[13],h=t[2],f=t[6],u=t[10],m=t[14],_=t[3],p=t[7],d=t[11],v=t[15];return _*(+s*c*f-i*l*f-s*a*u+n*l*u+i*a*m-n*c*m)+p*(+e*c*m-e*l*u+s*o*u-i*o*m+i*l*h-s*c*h)+d*(+e*l*f-e*a*m-s*o*f+n*o*m+s*a*h-n*l*h)+v*(-i*a*h-e*c*f+e*a*u+i*o*f-n*o*u+n*c*h)}transpose(){let t=this.elements,e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){let i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],l=t[7],h=t[8],f=t[9],u=t[10],m=t[11],_=t[12],p=t[13],d=t[14],v=t[15],T=f*d*l-p*u*l+p*c*m-a*d*m-f*c*v+a*u*v,b=_*u*l-h*d*l-_*c*m+o*d*m+h*c*v-o*u*v,M=h*p*l-_*f*l+_*a*m-o*p*m-h*a*v+o*f*v,A=_*f*c-h*p*c-_*a*u+o*p*u+h*a*d-o*f*d,C=e*T+n*b+i*M+s*A;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let I=1/C;return t[0]=T*I,t[1]=(p*u*s-f*d*s-p*i*m+n*d*m+f*i*v-n*u*v)*I,t[2]=(a*d*s-p*c*s+p*i*l-n*d*l-a*i*v+n*c*v)*I,t[3]=(f*c*s-a*u*s-f*i*l+n*u*l+a*i*m-n*c*m)*I,t[4]=b*I,t[5]=(h*d*s-_*u*s+_*i*m-e*d*m-h*i*v+e*u*v)*I,t[6]=(_*c*s-o*d*s-_*i*l+e*d*l+o*i*v-e*c*v)*I,t[7]=(o*u*s-h*c*s+h*i*l-e*u*l-o*i*m+e*c*m)*I,t[8]=M*I,t[9]=(_*f*s-h*p*s-_*n*m+e*p*m+h*n*v-e*f*v)*I,t[10]=(o*p*s-_*a*s+_*n*l-e*p*l-o*n*v+e*a*v)*I,t[11]=(h*a*s-o*f*s-h*n*l+e*f*l+o*n*m-e*a*m)*I,t[12]=A*I,t[13]=(h*p*i-_*f*i+_*n*u-e*p*u-h*n*d+e*f*d)*I,t[14]=(_*a*i-o*p*i-_*n*c+e*p*c+o*n*d-e*a*d)*I,t[15]=(o*f*i-h*a*i+h*n*c-e*f*c-o*n*u+e*a*u)*I,this}scale(t){let e=this.elements,n=t.x,i=t.y,s=t.z;return e[0]*=n,e[4]*=i,e[8]*=s,e[1]*=n,e[5]*=i,e[9]*=s,e[2]*=n,e[6]*=i,e[10]*=s,e[3]*=n,e[7]*=i,e[11]*=s,this}getMaxScaleOnAxis(){let t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){let e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){let n=Math.cos(e),i=Math.sin(e),s=1-n,o=t.x,a=t.y,c=t.z,l=s*o,h=s*a;return this.set(l*o+n,l*a-i*c,l*c+i*a,0,l*a+i*c,h*a+n,h*c-i*o,0,l*c-i*a,h*c+i*o,s*c*c+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,s,o){return this.set(1,n,s,0,t,1,o,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){let i=this.elements,s=e._x,o=e._y,a=e._z,c=e._w,l=s+s,h=o+o,f=a+a,u=s*l,m=s*h,_=s*f,p=o*h,d=o*f,v=a*f,T=c*l,b=c*h,M=c*f,A=n.x,C=n.y,I=n.z;return i[0]=(1-(p+v))*A,i[1]=(m+M)*A,i[2]=(_-b)*A,i[3]=0,i[4]=(m-M)*C,i[5]=(1-(u+v))*C,i[6]=(d+T)*C,i[7]=0,i[8]=(_+b)*I,i[9]=(d-T)*I,i[10]=(1-(u+p))*I,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){let i=this.elements,s=Pn.set(i[0],i[1],i[2]).length(),o=Pn.set(i[4],i[5],i[6]).length(),a=Pn.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),t.x=i[12],t.y=i[13],t.z=i[14],Ee.copy(this);let l=1/s,h=1/o,f=1/a;return Ee.elements[0]*=l,Ee.elements[1]*=l,Ee.elements[2]*=l,Ee.elements[4]*=h,Ee.elements[5]*=h,Ee.elements[6]*=h,Ee.elements[8]*=f,Ee.elements[9]*=f,Ee.elements[10]*=f,e.setFromRotationMatrix(Ee),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,i,s,o){let a=this.elements,c=2*s/(e-t),l=2*s/(n-i),h=(e+t)/(e-t),f=(n+i)/(n-i),u=-(o+s)/(o-s),m=-2*o*s/(o-s);return a[0]=c,a[4]=0,a[8]=h,a[12]=0,a[1]=0,a[5]=l,a[9]=f,a[13]=0,a[2]=0,a[6]=0,a[10]=u,a[14]=m,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,e,n,i,s,o){let a=this.elements,c=1/(e-t),l=1/(n-i),h=1/(o-s),f=(e+t)*c,u=(n+i)*l,m=(o+s)*h;return a[0]=2*c,a[4]=0,a[8]=0,a[12]=-f,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-u,a[2]=0,a[6]=0,a[10]=-2*h,a[14]=-m,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<16;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}},Pn=new N,Ee=new qt,bl=new N(0,0,0),wl=new N(1,1,1),je=new N,Ai=new N,me=new N,da=new qt,fa=new rn,Zn=class{constructor(t=0,e=0,n=0,i=Zn.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){let i=t.elements,s=i[0],o=i[4],a=i[8],c=i[1],l=i[5],h=i[9],f=i[2],u=i[6],m=i[10];switch(e){case"XYZ":this._y=Math.asin(ue(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-ue(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(ue(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-ue(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(u,m),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-o,l));break;case"YZX":this._z=Math.asin(ue(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-ue(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return da.makeRotationFromQuaternion(t),this.setFromRotationMatrix(da,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return fa.setFromEuler(this),this.setFromQuaternion(fa,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};Zn.DEFAULT_ORDER="XYZ";var Zi=class{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let e=0;e1){for(let n=0;n0&&(n=n.concat(o))}return n}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ii,t,Tl),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ii,Al,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);let e=this.children;for(let n=0,i=e.length;n0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON()));function s(a,c){return a[c.uuid]===void 0&&(a[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(t.geometries,this.geometry);let a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){let c=a.shapes;if(Array.isArray(c))for(let l=0,h=c.length;l0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(n.geometries=a),c.length>0&&(n.materials=c),l.length>0&&(n.textures=l),h.length>0&&(n.images=h),f.length>0&&(n.shapes=f),u.length>0&&(n.skeletons=u),m.length>0&&(n.animations=m),_.length>0&&(n.nodes=_)}return n.object=i,n;function o(a){let c=[];for(let l in a){let h=a[l];delete h.metadata,c.push(h)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let n=0;n0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(t,e,n,i,s){Ce.subVectors(i,e),Ve.subVectors(n,e),Rs.subVectors(t,e);let o=Ce.dot(Ce),a=Ce.dot(Ve),c=Ce.dot(Rs),l=Ve.dot(Ve),h=Ve.dot(Rs),f=o*l-a*a;if(f===0)return s.set(-2,-1,-1);let u=1/f,m=(l*c-a*h)*u,_=(o*h-a*c)*u;return s.set(1-m-_,_,m)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,Ge),Ge.x>=0&&Ge.y>=0&&Ge.x+Ge.y<=1}static getUV(t,e,n,i,s,o,a,c){return this.getBarycoord(t,e,n,i,Ge),c.set(0,0),c.addScaledVector(s,Ge.x),c.addScaledVector(o,Ge.y),c.addScaledVector(a,Ge.z),c}static isFrontFacing(t,e,n,i){return Ce.subVectors(n,e),Ve.subVectors(t,e),Ce.cross(Ve).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return Ce.subVectors(this.c,this.b),Ve.subVectors(this.a,this.b),Ce.cross(Ve).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return xe.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return xe.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,n,i,s){return xe.getUV(t,this.a,this.b,this.c,e,n,i,s)}containsPoint(t){return xe.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return xe.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){let n=this.a,i=this.b,s=this.c,o,a;Ln.subVectors(i,n),In.subVectors(s,n),Ls.subVectors(t,n);let c=Ln.dot(Ls),l=In.dot(Ls);if(c<=0&&l<=0)return e.copy(n);Is.subVectors(t,i);let h=Ln.dot(Is),f=In.dot(Is);if(h>=0&&f<=h)return e.copy(i);let u=c*f-h*l;if(u<=0&&c>=0&&h<=0)return o=c/(c-h),e.copy(n).addScaledVector(Ln,o);Ds.subVectors(t,s);let m=Ln.dot(Ds),_=In.dot(Ds);if(_>=0&&m<=_)return e.copy(s);let p=m*l-c*_;if(p<=0&&l>=0&&_<=0)return a=l/(l-_),e.copy(n).addScaledVector(In,a);let d=h*_-m*f;if(d<=0&&f-h>=0&&m-_>=0)return ya.subVectors(s,i),a=(f-h)/(f-h+(m-_)),e.copy(i).addScaledVector(ya,a);let v=1/(d+p+u);return o=p*v,a=u*v,e.copy(n).addScaledVector(Ln,o).addScaledVector(In,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},Cl=0,Jn=class extends sn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Cl++}),this.uuid=jn(),this.name="",this.type="Material",this.blending=Gn,this.side=nn,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=Ha,this.blendDst=Wa,this.blendEquation=Bn,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Gs,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=rl,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=xs,this.stencilZFail=xs,this.stencilZPass=xs,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(let e in t){let n=t[e];if(n===void 0){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}let i=this[e];if(i===void 0){console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.");continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n}}toJSON(t){let e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});let n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Gn&&(n.blending=this.blending),this.side!==nn&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(n.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(s){let o=[];for(let a in s){let c=s[a];delete c.metadata,o.push(c)}return o}if(e){let s=i(t.textures),o=i(t.images);s.length>0&&(n.textures=s),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;let e=t.clippingPlanes,n=null;if(e!==null){let i=e.length;n=new Array(i);for(let s=0;s!==i;++s)n[s]=e[s].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}},Ji=class extends Jn{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Ot(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Xa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}},Gt=new N,Ci=new Nt,ce=class{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=n,this.usage=la,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,s=this.itemSize;i0&&(t.userData=this.userData),this.parameters!==void 0){let c=this.parameters;for(let l in c)c[l]!==void 0&&(t[l]=c[l]);return t}t.data={attributes:{}};let e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});let n=this.attributes;for(let c in n){let l=n[c];t.data.attributes[c]=l.toJSON(t.data)}let i={},s=!1;for(let c in this.morphAttributes){let l=this.morphAttributes[c],h=[];for(let f=0,u=l.length;f0&&(i[c]=h,s=!0)}s&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);let o=this.groups;o.length>0&&(t.data.groups=JSON.parse(JSON.stringify(o)));let a=this.boundingSphere;return a!==null&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=t.name;let n=t.index;n!==null&&this.setIndex(n.clone(e));let i=t.attributes;for(let l in i){let h=i[l];this.setAttribute(l,h.clone(e))}let s=t.morphAttributes;for(let l in s){let h=[],f=s[l];for(let u=0,m=f.length;u0){let i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;se.far?null:{distance:l,point:Di.clone(),object:r}}function Ni(r,t,e,n,i,s,o,a,c){r.getVertexPosition(o,ri),r.getVertexPosition(a,ai),r.getVertexPosition(c,oi);let l=Rl(r,t,e,n,ri,ai,oi,Os);if(l){i&&(Ri.fromBufferAttribute(i,o),Li.fromBufferAttribute(i,a),Ii.fromBufferAttribute(i,c),l.uv=xe.getUV(Os,ri,ai,oi,Ri,Li,Ii,new Nt)),s&&(Ri.fromBufferAttribute(s,o),Li.fromBufferAttribute(s,a),Ii.fromBufferAttribute(s,c),l.uv2=xe.getUV(Os,ri,ai,oi,Ri,Li,Ii,new Nt));let h={a:o,b:a,c,normal:new N,materialIndex:0};xe.getNormal(ri,ai,oi,h.normal),l.face=h}return l}var bn=class extends Ye{constructor(t=1,e=1,n=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:s,depthSegments:o};let a=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);let c=[],l=[],h=[],f=[],u=0,m=0;_("z","y","x",-1,-1,n,e,t,o,s,0),_("z","y","x",1,-1,n,e,-t,o,s,1),_("x","z","y",1,1,t,n,e,i,o,2),_("x","z","y",1,-1,t,n,-e,i,o,3),_("x","y","z",1,-1,t,e,n,i,s,4),_("x","y","z",-1,-1,t,e,-n,i,s,5),this.setIndex(c),this.setAttribute("position",new Xe(l,3)),this.setAttribute("normal",new Xe(h,3)),this.setAttribute("uv",new Xe(f,2));function _(p,d,v,T,b,M,A,C,I,x,S){let L=M/I,X=A/x,q=M/2,z=A/2,R=C/2,G=I+1,Y=x+1,j=0,W=0,Q=new N;for(let Z=0;Z0?1:-1,h.push(Q.x,Q.y,Q.z),f.push(F/I),f.push(1-Z/x),j+=1}}for(let Z=0;Z0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;let n={};for(let i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}},ji=class extends de{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new qt,this.projectionMatrix=new qt,this.projectionMatrixInverse=new qt}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}},_e=class extends ji{constructor(t=50,e=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){let e=.5*this.getFilmHeight()/t;this.fov=Gi*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){let t=Math.tan(ui*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return Gi*2*Math.atan(Math.tan(ui*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,n,i,s,o){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=this.near,e=t*Math.tan(ui*.5*this.fov)/this.zoom,n=2*e,i=this.aspect*n,s=-.5*i,o=this.view;if(this.view!==null&&this.view.enabled){let c=o.fullWidth,l=o.fullHeight;s+=o.offsetX*i/c,e-=o.offsetY*n/l,i*=o.width/c,n*=o.height/l}let a=this.filmOffset;a!==0&&(s+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+i,e,e-n,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}},Fn=-90,zn=1,Ks=class extends de{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n;let i=new _e(Fn,zn,t,e);i.layers=this.layers,i.up.set(0,1,0),i.lookAt(1,0,0),this.add(i);let s=new _e(Fn,zn,t,e);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(-1,0,0),this.add(s);let o=new _e(Fn,zn,t,e);o.layers=this.layers,o.up.set(0,0,-1),o.lookAt(0,1,0),this.add(o);let a=new _e(Fn,zn,t,e);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);let c=new _e(Fn,zn,t,e);c.layers=this.layers,c.up.set(0,1,0),c.lookAt(0,0,1),this.add(c);let l=new _e(Fn,zn,t,e);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,-1),this.add(l)}update(t,e){this.parent===null&&this.updateMatrixWorld();let n=this.renderTarget,[i,s,o,a,c,l]=this.children,h=t.getRenderTarget(),f=t.toneMapping,u=t.xr.enabled;t.toneMapping=We,t.xr.enabled=!1;let m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0),t.render(e,i),t.setRenderTarget(n,1),t.render(e,s),t.setRenderTarget(n,2),t.render(e,o),t.setRenderTarget(n,3),t.render(e,a),t.setRenderTarget(n,4),t.render(e,c),n.texture.generateMipmaps=m,t.setRenderTarget(n,5),t.render(e,l),t.setRenderTarget(h),t.toneMapping=f,t.xr.enabled=u,n.texture.needsPMREMUpdate=!0}},Qi=class extends le{constructor(t,e,n,i,s,o,a,c,l,h){t=t!==void 0?t:[],e=e!==void 0?e:Xn,super(t,e,n,i,s,o,a,c,l,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}},js=class extends qe{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;let n={width:t,height:t,depth:1},i=[n,n,n,n,n,n];this.texture=new Qi(i,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=e.generateMipmaps!==void 0?e.generateMipmaps:!1,this.texture.minFilter=e.minFilter!==void 0?e.minFilter:Se}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.encoding=e.encoding,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:\` - - varying vec3 vWorldDirection; - - vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); - - } - - void main() { - - vWorldDirection = transformDirection( position, modelMatrix ); - - #include - #include - - } - \`,fragmentShader:\` - - uniform sampler2D tEquirect; - - varying vec3 vWorldDirection; - - #include - - void main() { - - vec3 direction = normalize( vWorldDirection ); - - vec2 sampleUV = equirectUv( direction ); - - gl_FragColor = texture2D( tEquirect, sampleUV ); - - } - \`},i=new bn(5,5,5),s=new Ze({name:"CubemapFromEquirect",uniforms:$n(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:ye,blending:en});s.uniforms.tEquirect.value=e;let o=new Ne(i,s),a=e.minFilter;return e.minFilter===pi&&(e.minFilter=Se),new Ks(1,10,this).update(t,o),e.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(t,e,n,i){let s=t.getRenderTarget();for(let o=0;o<6;o++)t.setRenderTarget(this,o),t.clear(e,n,i);t.setRenderTarget(s)}},Us=new N,Fl=new N,zl=new oe,He=class{constructor(t=new N(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){let i=Us.subVectors(n,e).cross(Fl.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){let t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,e){let n=t.delta(Us),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;let s=-(t.start.dot(this.normal)+this.constant)/i;return s<0||s>1?null:e.copy(n).multiplyScalar(s).add(t.start)}intersectsLine(t){let e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){let n=e||zl.getNormalMatrix(t),i=this.coplanarPoint(Us).applyMatrix4(t),s=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(s),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}},On=new _i,Fi=new N,ts=class{constructor(t=new He,e=new He,n=new He,i=new He,s=new He,o=new He){this.planes=[t,e,n,i,s,o]}set(t,e,n,i,s,o){let a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(i),a[4].copy(s),a[5].copy(o),this}copy(t){let e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t){let e=this.planes,n=t.elements,i=n[0],s=n[1],o=n[2],a=n[3],c=n[4],l=n[5],h=n[6],f=n[7],u=n[8],m=n[9],_=n[10],p=n[11],d=n[12],v=n[13],T=n[14],b=n[15];return e[0].setComponents(a-i,f-c,p-u,b-d).normalize(),e[1].setComponents(a+i,f+c,p+u,b+d).normalize(),e[2].setComponents(a+s,f+l,p+m,b+v).normalize(),e[3].setComponents(a-s,f-l,p-m,b-v).normalize(),e[4].setComponents(a-o,f-h,p-_,b-T).normalize(),e[5].setComponents(a+o,f+h,p+_,b+T).normalize(),this}intersectsObject(t){let e=t.geometry;return e.boundingSphere===null&&e.computeBoundingSphere(),On.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(On)}intersectsSprite(t){return On.center.set(0,0,0),On.radius=.7071067811865476,On.applyMatrix4(t.matrixWorld),this.intersectsSphere(On)}intersectsSphere(t){let e=this.planes,n=t.center,i=-t.radius;for(let s=0;s<6;s++)if(e[s].distanceToPoint(n)0?t.max.x:t.min.x,Fi.y=i.normal.y>0?t.max.y:t.min.y,Fi.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(Fi)<0)return!1}return!0}containsPoint(t){let e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function ja(){let r=null,t=!1,e=null,n=null;function i(s,o){e(s,o),n=r.requestAnimationFrame(i)}return{start:function(){t!==!0&&e!==null&&(n=r.requestAnimationFrame(i),t=!0)},stop:function(){r.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(s){e=s},setContext:function(s){r=s}}}function Ol(r,t){let e=t.isWebGL2,n=new WeakMap;function i(l,h){let f=l.array,u=l.usage,m=r.createBuffer();r.bindBuffer(h,m),r.bufferData(h,f,u),l.onUploadCallback();let _;if(f instanceof Float32Array)_=5126;else if(f instanceof Uint16Array)if(l.isFloat16BufferAttribute)if(e)_=5131;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else _=5123;else if(f instanceof Int16Array)_=5122;else if(f instanceof Uint32Array)_=5125;else if(f instanceof Int32Array)_=5124;else if(f instanceof Int8Array)_=5120;else if(f instanceof Uint8Array)_=5121;else if(f instanceof Uint8ClampedArray)_=5121;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:m,type:_,bytesPerElement:f.BYTES_PER_ELEMENT,version:l.version}}function s(l,h,f){let u=h.array,m=h.updateRange;r.bindBuffer(f,l),m.count===-1?r.bufferSubData(f,0,u):(e?r.bufferSubData(f,m.offset*u.BYTES_PER_ELEMENT,u,m.offset,m.count):r.bufferSubData(f,m.offset*u.BYTES_PER_ELEMENT,u.subarray(m.offset,m.offset+m.count)),m.count=-1),h.onUploadCallback()}function o(l){return l.isInterleavedBufferAttribute&&(l=l.data),n.get(l)}function a(l){l.isInterleavedBufferAttribute&&(l=l.data);let h=n.get(l);h&&(r.deleteBuffer(h.buffer),n.delete(l))}function c(l,h){if(l.isGLBufferAttribute){let u=n.get(l);(!u||u.version 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; - return cross( v1, v2 ) * theta_sintheta; -} -vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { - vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; - vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; - vec3 lightNormal = cross( v1, v2 ); - if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); - vec3 T1, T2; - T1 = normalize( V - N * dot( V, N ) ); - T2 = - cross( N, T1 ); - mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); - vec3 coords[ 4 ]; - coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); - coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); - coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); - coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); - coords[ 0 ] = normalize( coords[ 0 ] ); - coords[ 1 ] = normalize( coords[ 1 ] ); - coords[ 2 ] = normalize( coords[ 2 ] ); - coords[ 3 ] = normalize( coords[ 3 ] ); - vec3 vectorFormFactor = vec3( 0.0 ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); - float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); - return vec3( result ); -} -float G_BlinnPhong_Implicit( ) { - return 0.25; -} -float D_BlinnPhong( const in float shininess, const in float dotNH ) { - return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); -} -vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNH = saturate( dot( normal, halfDir ) ); - float dotVH = saturate( dot( viewDir, halfDir ) ); - vec3 F = F_Schlick( specularColor, 1.0, dotVH ); - float G = G_BlinnPhong_Implicit( ); - float D = D_BlinnPhong( shininess, dotNH ); - return F * ( G * D ); -} -#if defined( USE_SHEEN ) -float D_Charlie( float roughness, float dotNH ) { - float alpha = pow2( roughness ); - float invAlpha = 1.0 / alpha; - float cos2h = dotNH * dotNH; - float sin2h = max( 1.0 - cos2h, 0.0078125 ); - return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); -} -float V_Neubelt( float dotNV, float dotNL ) { - return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); -} -vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float D = D_Charlie( sheenRoughness, dotNH ); - float V = V_Neubelt( dotNV, dotNL ); - return sheenColor * ( D * V ); -} -#endif\`,Yl=\`#ifdef USE_IRIDESCENCE - const mat3 XYZ_TO_REC709 = mat3( - 3.2404542, -0.9692660, 0.0556434, - -1.5371385, 1.8760108, -0.2040259, - -0.4985314, 0.0415560, 1.0572252 - ); - vec3 Fresnel0ToIor( vec3 fresnel0 ) { - vec3 sqrtF0 = sqrt( fresnel0 ); - return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); - } - vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { - return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); - } - float IorToFresnel0( float transmittedIor, float incidentIor ) { - return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); - } - vec3 evalSensitivity( float OPD, vec3 shift ) { - float phase = 2.0 * PI * OPD * 1.0e-9; - vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); - vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); - vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); - vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); - xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) ); - xyz /= 1.0685e-7; - vec3 rgb = XYZ_TO_REC709 * xyz; - return rgb; - } - vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { - vec3 I; - float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); - float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); - float cosTheta2Sq = 1.0 - sinTheta2Sq; - if ( cosTheta2Sq < 0.0 ) { - return vec3( 1.0 ); - } - float cosTheta2 = sqrt( cosTheta2Sq ); - float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); - float R12 = F_Schlick( R0, 1.0, cosTheta1 ); - float R21 = R12; - float T121 = 1.0 - R12; - float phi12 = 0.0; - if ( iridescenceIOR < outsideIOR ) phi12 = PI; - float phi21 = PI - phi12; - vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); - vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); - vec3 phi23 = vec3( 0.0 ); - if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; - if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; - if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; - float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; - vec3 phi = vec3( phi21 ) + phi23; - vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); - vec3 r123 = sqrt( R123 ); - vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); - vec3 C0 = R12 + Rs; - I = C0; - vec3 Cm = Rs - T121; - for ( int m = 1; m <= 2; ++ m ) { - Cm *= r123; - vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); - I += Cm * Sm; - } - return max( I, vec3( 0.0 ) ); - } -#endif\`,Zl=\`#ifdef USE_BUMPMAP - uniform sampler2D bumpMap; - uniform float bumpScale; - vec2 dHdxy_fwd() { - vec2 dSTdx = dFdx( vUv ); - vec2 dSTdy = dFdy( vUv ); - float Hll = bumpScale * texture2D( bumpMap, vUv ).x; - float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll; - float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll; - return vec2( dBx, dBy ); - } - vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { - vec3 vSigmaX = dFdx( surf_pos.xyz ); - vec3 vSigmaY = dFdy( surf_pos.xyz ); - vec3 vN = surf_norm; - vec3 R1 = cross( vSigmaY, vN ); - vec3 R2 = cross( vN, vSigmaX ); - float fDet = dot( vSigmaX, R1 ) * faceDirection; - vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); - return normalize( abs( fDet ) * surf_norm - vGrad ); - } -#endif\`,Jl=\`#if NUM_CLIPPING_PLANES > 0 - vec4 plane; - #pragma unroll_loop_start - for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; - } - #pragma unroll_loop_end - #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES - bool clipped = true; - #pragma unroll_loop_start - for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; - } - #pragma unroll_loop_end - if ( clipped ) discard; - #endif -#endif\`,$l=\`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; - uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif\`,Kl=\`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; -#endif\`,jl=\`#if NUM_CLIPPING_PLANES > 0 - vClipPosition = - mvPosition.xyz; -#endif\`,Ql=\`#if defined( USE_COLOR_ALPHA ) - diffuseColor *= vColor; -#elif defined( USE_COLOR ) - diffuseColor.rgb *= vColor; -#endif\`,tc=\`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) - varying vec3 vColor; -#endif\`,ec=\`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - varying vec3 vColor; -#endif\`,nc=\`#if defined( USE_COLOR_ALPHA ) - vColor = vec4( 1.0 ); -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - vColor = vec3( 1.0 ); -#endif -#ifdef USE_COLOR - vColor *= color; -#endif -#ifdef USE_INSTANCING_COLOR - vColor.xyz *= instanceColor.xyz; -#endif\`,ic=\`#define PI 3.141592653589793 -#define PI2 6.283185307179586 -#define PI_HALF 1.5707963267948966 -#define RECIPROCAL_PI 0.3183098861837907 -#define RECIPROCAL_PI2 0.15915494309189535 -#define EPSILON 1e-6 -#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -#define whiteComplement( a ) ( 1.0 - saturate( a ) ) -float pow2( const in float x ) { return x*x; } -vec3 pow2( const in vec3 x ) { return x*x; } -float pow3( const in float x ) { return x*x*x; } -float pow4( const in float x ) { float x2 = x*x; return x2*x2; } -float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } -float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } -highp float rand( const in vec2 uv ) { - const highp float a = 12.9898, b = 78.233, c = 43758.5453; - highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); - return fract( sin( sn ) * c ); -} -#ifdef HIGH_PRECISION - float precisionSafeLength( vec3 v ) { return length( v ); } -#else - float precisionSafeLength( vec3 v ) { - float maxComponent = max3( abs( v ) ); - return length( v / maxComponent ) * maxComponent; - } -#endif -struct IncidentLight { - vec3 color; - vec3 direction; - bool visible; -}; -struct ReflectedLight { - vec3 directDiffuse; - vec3 directSpecular; - vec3 indirectDiffuse; - vec3 indirectSpecular; -}; -struct GeometricContext { - vec3 position; - vec3 normal; - vec3 viewDir; -#ifdef USE_CLEARCOAT - vec3 clearcoatNormal; -#endif -}; -vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); -} -vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); -} -mat3 transposeMat3( const in mat3 m ) { - mat3 tmp; - tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); - tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); - tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); - return tmp; -} -float luminance( const in vec3 rgb ) { - const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); - return dot( weights, rgb ); -} -bool isPerspectiveMatrix( mat4 m ) { - return m[ 2 ][ 3 ] == - 1.0; -} -vec2 equirectUv( in vec3 dir ) { - float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; - float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; - return vec2( u, v ); -}\`,sc=\`#ifdef ENVMAP_TYPE_CUBE_UV - #define cubeUV_minMipLevel 4.0 - #define cubeUV_minTileSize 16.0 - float getFace( vec3 direction ) { - vec3 absDirection = abs( direction ); - float face = - 1.0; - if ( absDirection.x > absDirection.z ) { - if ( absDirection.x > absDirection.y ) - face = direction.x > 0.0 ? 0.0 : 3.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } else { - if ( absDirection.z > absDirection.y ) - face = direction.z > 0.0 ? 2.0 : 5.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } - return face; - } - vec2 getUV( vec3 direction, float face ) { - vec2 uv; - if ( face == 0.0 ) { - uv = vec2( direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 1.0 ) { - uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); - } else if ( face == 2.0 ) { - uv = vec2( - direction.x, direction.y ) / abs( direction.z ); - } else if ( face == 3.0 ) { - uv = vec2( - direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 4.0 ) { - uv = vec2( - direction.x, direction.z ) / abs( direction.y ); - } else { - uv = vec2( direction.x, direction.y ) / abs( direction.z ); - } - return 0.5 * ( uv + 1.0 ); - } - vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { - float face = getFace( direction ); - float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); - mipInt = max( mipInt, cubeUV_minMipLevel ); - float faceSize = exp2( mipInt ); - highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; - if ( face > 2.0 ) { - uv.y += faceSize; - face -= 3.0; - } - uv.x += face * faceSize; - uv.x += filterInt * 3.0 * cubeUV_minTileSize; - uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); - uv.x *= CUBEUV_TEXEL_WIDTH; - uv.y *= CUBEUV_TEXEL_HEIGHT; - #ifdef texture2DGradEXT - return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; - #else - return texture2D( envMap, uv ).rgb; - #endif - } - #define cubeUV_r0 1.0 - #define cubeUV_v0 0.339 - #define cubeUV_m0 - 2.0 - #define cubeUV_r1 0.8 - #define cubeUV_v1 0.276 - #define cubeUV_m1 - 1.0 - #define cubeUV_r4 0.4 - #define cubeUV_v4 0.046 - #define cubeUV_m4 2.0 - #define cubeUV_r5 0.305 - #define cubeUV_v5 0.016 - #define cubeUV_m5 3.0 - #define cubeUV_r6 0.21 - #define cubeUV_v6 0.0038 - #define cubeUV_m6 4.0 - float roughnessToMip( float roughness ) { - float mip = 0.0; - if ( roughness >= cubeUV_r1 ) { - mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; - } else if ( roughness >= cubeUV_r4 ) { - mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; - } else if ( roughness >= cubeUV_r5 ) { - mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; - } else if ( roughness >= cubeUV_r6 ) { - mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; - } else { - mip = - 2.0 * log2( 1.16 * roughness ); } - return mip; - } - vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { - float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); - float mipF = fract( mip ); - float mipInt = floor( mip ); - vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); - if ( mipF == 0.0 ) { - return vec4( color0, 1.0 ); - } else { - vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); - return vec4( mix( color0, color1, mipF ), 1.0 ); - } - } -#endif\`,rc=\`vec3 transformedNormal = objectNormal; -#ifdef USE_INSTANCING - mat3 m = mat3( instanceMatrix ); - transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); - transformedNormal = m * transformedNormal; -#endif -transformedNormal = normalMatrix * transformedNormal; -#ifdef FLIP_SIDED - transformedNormal = - transformedNormal; -#endif -#ifdef USE_TANGENT - vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #ifdef FLIP_SIDED - transformedTangent = - transformedTangent; - #endif -#endif\`,ac=\`#ifdef USE_DISPLACEMENTMAP - uniform sampler2D displacementMap; - uniform float displacementScale; - uniform float displacementBias; -#endif\`,oc=\`#ifdef USE_DISPLACEMENTMAP - transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias ); -#endif\`,lc=\`#ifdef USE_EMISSIVEMAP - vec4 emissiveColor = texture2D( emissiveMap, vUv ); - totalEmissiveRadiance *= emissiveColor.rgb; -#endif\`,cc=\`#ifdef USE_EMISSIVEMAP - uniform sampler2D emissiveMap; -#endif\`,hc="gl_FragColor = linearToOutputTexel( gl_FragColor );",uc=\`vec4 LinearToLinear( in vec4 value ) { - return value; -} -vec4 LinearTosRGB( in vec4 value ) { - return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); -}\`,dc=\`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vec3 cameraToFrag; - if ( isOrthographic ) { - cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToFrag = normalize( vWorldPosition - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vec3 reflectVec = reflect( cameraToFrag, worldNormal ); - #else - vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); - #endif - #else - vec3 reflectVec = vReflect; - #endif - #ifdef ENVMAP_TYPE_CUBE - vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); - #else - vec4 envColor = vec4( 0.0 ); - #endif - #ifdef ENVMAP_BLENDING_MULTIPLY - outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_MIX ) - outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_ADD ) - outgoingLight += envColor.xyz * specularStrength * reflectivity; - #endif -#endif\`,fc=\`#ifdef USE_ENVMAP - uniform float envMapIntensity; - uniform float flipEnvMap; - #ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; - #else - uniform sampler2D envMap; - #endif - -#endif\`,pc=\`#ifdef USE_ENVMAP - uniform float reflectivity; - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - varying vec3 vWorldPosition; - uniform float refractionRatio; - #else - varying vec3 vReflect; - #endif -#endif\`,mc=\`#ifdef USE_ENVMAP - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - - varying vec3 vWorldPosition; - #else - varying vec3 vReflect; - uniform float refractionRatio; - #endif -#endif\`,gc=\`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vWorldPosition = worldPosition.xyz; - #else - vec3 cameraToVertex; - if ( isOrthographic ) { - cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vReflect = reflect( cameraToVertex, worldNormal ); - #else - vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); - #endif - #endif -#endif\`,_c=\`#ifdef USE_FOG - vFogDepth = - mvPosition.z; -#endif\`,xc=\`#ifdef USE_FOG - varying float vFogDepth; -#endif\`,yc=\`#ifdef USE_FOG - #ifdef FOG_EXP2 - float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); - #else - float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); - #endif - gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif\`,vc=\`#ifdef USE_FOG - uniform vec3 fogColor; - varying float vFogDepth; - #ifdef FOG_EXP2 - uniform float fogDensity; - #else - uniform float fogNear; - uniform float fogFar; - #endif -#endif\`,Mc=\`#ifdef USE_GRADIENTMAP - uniform sampler2D gradientMap; -#endif -vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { - float dotNL = dot( normal, lightDirection ); - vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); - #ifdef USE_GRADIENTMAP - return vec3( texture2D( gradientMap, coord ).r ); - #else - vec2 fw = fwidth( coord ) * 0.5; - return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); - #endif -}\`,bc=\`#ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vUv2 ); - vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; - reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif\`,wc=\`#ifdef USE_LIGHTMAP - uniform sampler2D lightMap; - uniform float lightMapIntensity; -#endif\`,Sc=\`LambertMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;\`,Tc=\`varying vec3 vViewPosition; -struct LambertMaterial { - vec3 diffuseColor; - float specularStrength; -}; -void RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert\`,Ac=\`uniform bool receiveShadow; -uniform vec3 ambientLightColor; -uniform vec3 lightProbe[ 9 ]; -vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { - float x = normal.x, y = normal.y, z = normal.z; - vec3 result = shCoefficients[ 0 ] * 0.886227; - result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; - result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; - result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; - result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; - result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; - result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); - result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; - result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); - return result; -} -vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); - return irradiance; -} -vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { - vec3 irradiance = ambientLightColor; - return irradiance; -} -float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { - #if defined ( PHYSICALLY_CORRECT_LIGHTS ) - float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); - if ( cutoffDistance > 0.0 ) { - distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); - } - return distanceFalloff; - #else - if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { - return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); - } - return 1.0; - #endif -} -float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { - return smoothstep( coneCosine, penumbraCosine, angleCosine ); -} -#if NUM_DIR_LIGHTS > 0 - struct DirectionalLight { - vec3 direction; - vec3 color; - }; - uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; - void getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) { - light.color = directionalLight.color; - light.direction = directionalLight.direction; - light.visible = true; - } -#endif -#if NUM_POINT_LIGHTS > 0 - struct PointLight { - vec3 position; - vec3 color; - float distance; - float decay; - }; - uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; - void getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) { - vec3 lVector = pointLight.position - geometry.position; - light.direction = normalize( lVector ); - float lightDistance = length( lVector ); - light.color = pointLight.color; - light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } -#endif -#if NUM_SPOT_LIGHTS > 0 - struct SpotLight { - vec3 position; - vec3 direction; - vec3 color; - float distance; - float decay; - float coneCos; - float penumbraCos; - }; - uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; - void getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) { - vec3 lVector = spotLight.position - geometry.position; - light.direction = normalize( lVector ); - float angleCos = dot( light.direction, spotLight.direction ); - float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); - if ( spotAttenuation > 0.0 ) { - float lightDistance = length( lVector ); - light.color = spotLight.color * spotAttenuation; - light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } else { - light.color = vec3( 0.0 ); - light.visible = false; - } - } -#endif -#if NUM_RECT_AREA_LIGHTS > 0 - struct RectAreaLight { - vec3 color; - vec3 position; - vec3 halfWidth; - vec3 halfHeight; - }; - uniform sampler2D ltc_1; uniform sampler2D ltc_2; - uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; -#endif -#if NUM_HEMI_LIGHTS > 0 - struct HemisphereLight { - vec3 direction; - vec3 skyColor; - vec3 groundColor; - }; - uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; - vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { - float dotNL = dot( normal, hemiLight.direction ); - float hemiDiffuseWeight = 0.5 * dotNL + 0.5; - vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); - return irradiance; - } -#endif\`,Ec=\`#if defined( USE_ENVMAP ) - vec3 getIBLIrradiance( const in vec3 normal ) { - #if defined( ENVMAP_TYPE_CUBE_UV ) - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); - return PI * envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } - vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { - #if defined( ENVMAP_TYPE_CUBE_UV ) - vec3 reflectVec = reflect( - viewDir, normal ); - reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); - reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); - return envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } -#endif\`,Cc=\`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;\`,Pc=\`varying vec3 vViewPosition; -struct ToonMaterial { - vec3 diffuseColor; -}; -void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon\`,Rc=\`BlinnPhongMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularColor = specular; -material.specularShininess = shininess; -material.specularStrength = specularStrength;\`,Lc=\`varying vec3 vViewPosition; -struct BlinnPhongMaterial { - vec3 diffuseColor; - vec3 specularColor; - float specularShininess; - float specularStrength; -}; -void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); - reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength; -} -void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong\`,Ic=\`PhysicalMaterial material; -material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); -vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); -float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); -material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; -material.roughness = min( material.roughness, 1.0 ); -#ifdef IOR - material.ior = ior; - #ifdef SPECULAR - float specularIntensityFactor = specularIntensity; - vec3 specularColorFactor = specularColor; - #ifdef USE_SPECULARINTENSITYMAP - specularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a; - #endif - #ifdef USE_SPECULARCOLORMAP - specularColorFactor *= texture2D( specularColorMap, vUv ).rgb; - #endif - material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); - #else - float specularIntensityFactor = 1.0; - vec3 specularColorFactor = vec3( 1.0 ); - material.specularF90 = 1.0; - #endif - material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); -#else - material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); - material.specularF90 = 1.0; -#endif -#ifdef USE_CLEARCOAT - material.clearcoat = clearcoat; - material.clearcoatRoughness = clearcoatRoughness; - material.clearcoatF0 = vec3( 0.04 ); - material.clearcoatF90 = 1.0; - #ifdef USE_CLEARCOATMAP - material.clearcoat *= texture2D( clearcoatMap, vUv ).x; - #endif - #ifdef USE_CLEARCOAT_ROUGHNESSMAP - material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y; - #endif - material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); - material.clearcoatRoughness += geometryRoughness; - material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); -#endif -#ifdef USE_IRIDESCENCE - material.iridescence = iridescence; - material.iridescenceIOR = iridescenceIOR; - #ifdef USE_IRIDESCENCEMAP - material.iridescence *= texture2D( iridescenceMap, vUv ).r; - #endif - #ifdef USE_IRIDESCENCE_THICKNESSMAP - material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vUv ).g + iridescenceThicknessMinimum; - #else - material.iridescenceThickness = iridescenceThicknessMaximum; - #endif -#endif -#ifdef USE_SHEEN - material.sheenColor = sheenColor; - #ifdef USE_SHEENCOLORMAP - material.sheenColor *= texture2D( sheenColorMap, vUv ).rgb; - #endif - material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); - #ifdef USE_SHEENROUGHNESSMAP - material.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a; - #endif -#endif\`,Dc=\`struct PhysicalMaterial { - vec3 diffuseColor; - float roughness; - vec3 specularColor; - float specularF90; - #ifdef USE_CLEARCOAT - float clearcoat; - float clearcoatRoughness; - vec3 clearcoatF0; - float clearcoatF90; - #endif - #ifdef USE_IRIDESCENCE - float iridescence; - float iridescenceIOR; - float iridescenceThickness; - vec3 iridescenceFresnel; - vec3 iridescenceF0; - #endif - #ifdef USE_SHEEN - vec3 sheenColor; - float sheenRoughness; - #endif - #ifdef IOR - float ior; - #endif - #ifdef USE_TRANSMISSION - float transmission; - float transmissionAlpha; - float thickness; - float attenuationDistance; - vec3 attenuationColor; - #endif -}; -vec3 clearcoatSpecular = vec3( 0.0 ); -vec3 sheenSpecular = vec3( 0.0 ); -float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - float r2 = roughness * roughness; - float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; - float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; - float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); - return saturate( DG * RECIPROCAL_PI ); -} -vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); - const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); - vec4 r = roughness * c0 + c1; - float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; - vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; - return fab; -} -vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { - vec2 fab = DFGApprox( normal, viewDir, roughness ); - return specularColor * fab.x + specularF90 * fab.y; -} -#ifdef USE_IRIDESCENCE -void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { -#else -void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { -#endif - vec2 fab = DFGApprox( normal, viewDir, roughness ); - #ifdef USE_IRIDESCENCE - vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); - #else - vec3 Fr = specularColor; - #endif - vec3 FssEss = Fr * fab.x + specularF90 * fab.y; - float Ess = fab.x + fab.y; - float Ems = 1.0 - Ess; - vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); - singleScatter += FssEss; - multiScatter += Fms * Ems; -} -#if NUM_RECT_AREA_LIGHTS > 0 - void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - vec3 normal = geometry.normal; - vec3 viewDir = geometry.viewDir; - vec3 position = geometry.position; - vec3 lightPos = rectAreaLight.position; - vec3 halfWidth = rectAreaLight.halfWidth; - vec3 halfHeight = rectAreaLight.halfHeight; - vec3 lightColor = rectAreaLight.color; - float roughness = material.roughness; - vec3 rectCoords[ 4 ]; - rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; - rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; - rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; - vec2 uv = LTC_Uv( normal, viewDir, roughness ); - vec4 t1 = texture2D( ltc_1, uv ); - vec4 t2 = texture2D( ltc_2, uv ); - mat3 mInv = mat3( - vec3( t1.x, 0, t1.y ), - vec3( 0, 1, 0 ), - vec3( t1.z, 0, t1.w ) - ); - vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); - reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); - reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); - } -#endif -void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - #ifdef USE_CLEARCOAT - float dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) ); - vec3 ccIrradiance = dotNLcc * directLight.color; - clearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); - #endif - #ifdef USE_SHEEN - sheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness ); - #endif - #ifdef USE_IRIDESCENCE - reflectedLight.directSpecular += irradiance * BRDF_GGX_Iridescence( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness ); - #else - reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness ); - #endif - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { - #ifdef USE_CLEARCOAT - clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); - #endif - #ifdef USE_SHEEN - sheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness ); - #endif - vec3 singleScattering = vec3( 0.0 ); - vec3 multiScattering = vec3( 0.0 ); - vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; - #ifdef USE_IRIDESCENCE - computeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); - #else - computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); - #endif - vec3 totalScattering = singleScattering + multiScattering; - vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); - reflectedLight.indirectSpecular += radiance * singleScattering; - reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; - reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; -} -#define RE_Direct RE_Direct_Physical -#define RE_Direct_RectArea RE_Direct_RectArea_Physical -#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical -#define RE_IndirectSpecular RE_IndirectSpecular_Physical -float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { - return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}\`,Nc=\` -GeometricContext geometry; -geometry.position = - vViewPosition; -geometry.normal = normal; -geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); -#ifdef USE_CLEARCOAT - geometry.clearcoatNormal = clearcoatNormal; -#endif -#ifdef USE_IRIDESCENCE - float dotNVi = saturate( dot( normal, geometry.viewDir ) ); - if ( material.iridescenceThickness == 0.0 ) { - material.iridescence = 0.0; - } else { - material.iridescence = saturate( material.iridescence ); - } - if ( material.iridescence > 0.0 ) { - material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); - material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); - } -#endif -IncidentLight directLight; -#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) - PointLight pointLight; - #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { - pointLight = pointLights[ i ]; - getPointLightInfo( pointLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) - pointLightShadow = pointLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) - SpotLight spotLight; - vec4 spotColor; - vec3 spotLightCoord; - bool inSpotLightMap; - #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { - spotLight = spotLights[ i ]; - getSpotLightInfo( spotLight, geometry, directLight ); - #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX - #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS - #else - #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #endif - #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) - spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; - inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); - spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); - directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; - #endif - #undef SPOT_LIGHT_MAP_INDEX - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - spotLightShadow = spotLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) - DirectionalLight directionalLight; - #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { - directionalLight = directionalLights[ i ]; - getDirectionalLightInfo( directionalLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) - directionalLightShadow = directionalLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) - RectAreaLight rectAreaLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { - rectAreaLight = rectAreaLights[ i ]; - RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if defined( RE_IndirectDiffuse ) - vec3 iblIrradiance = vec3( 0.0 ); - vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); - irradiance += getLightProbeIrradiance( lightProbe, geometry.normal ); - #if ( NUM_HEMI_LIGHTS > 0 ) - #pragma unroll_loop_start - for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { - irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal ); - } - #pragma unroll_loop_end - #endif -#endif -#if defined( RE_IndirectSpecular ) - vec3 radiance = vec3( 0.0 ); - vec3 clearcoatRadiance = vec3( 0.0 ); -#endif\`,Fc=\`#if defined( RE_IndirectDiffuse ) - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vUv2 ); - vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; - irradiance += lightMapIrradiance; - #endif - #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) - iblIrradiance += getIBLIrradiance( geometry.normal ); - #endif -#endif -#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) - radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness ); - #ifdef USE_CLEARCOAT - clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness ); - #endif -#endif\`,zc=\`#if defined( RE_IndirectDiffuse ) - RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); -#endif -#if defined( RE_IndirectSpecular ) - RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); -#endif\`,Oc=\`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif\`,Uc=\`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - uniform float logDepthBufFC; - varying float vFragDepth; - varying float vIsPerspective; -#endif\`,Bc=\`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - varying float vFragDepth; - varying float vIsPerspective; - #else - uniform float logDepthBufFC; - #endif -#endif\`,kc=\`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - vFragDepth = 1.0 + gl_Position.w; - vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); - #else - if ( isPerspectiveMatrix( projectionMatrix ) ) { - gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; - gl_Position.z *= gl_Position.w; - } - #endif -#endif\`,Vc=\`#ifdef USE_MAP - vec4 sampledDiffuseColor = texture2D( map, vUv ); - #ifdef DECODE_VIDEO_TEXTURE - sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); - #endif - diffuseColor *= sampledDiffuseColor; -#endif\`,Gc=\`#ifdef USE_MAP - uniform sampler2D map; -#endif\`,Hc=\`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; -#endif -#ifdef USE_MAP - diffuseColor *= texture2D( map, uv ); -#endif -#ifdef USE_ALPHAMAP - diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif\`,Wc=\`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - uniform mat3 uvTransform; -#endif -#ifdef USE_MAP - uniform sampler2D map; -#endif -#ifdef USE_ALPHAMAP - uniform sampler2D alphaMap; -#endif\`,Xc=\`float metalnessFactor = metalness; -#ifdef USE_METALNESSMAP - vec4 texelMetalness = texture2D( metalnessMap, vUv ); - metalnessFactor *= texelMetalness.b; -#endif\`,qc=\`#ifdef USE_METALNESSMAP - uniform sampler2D metalnessMap; -#endif\`,Yc=\`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) - vColor *= morphTargetBaseInfluence; - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - #if defined( USE_COLOR_ALPHA ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; - #elif defined( USE_COLOR ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; - #endif - } -#endif\`,Zc=\`#ifdef USE_MORPHNORMALS - objectNormal *= morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; - } - #else - objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; - objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; - objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; - objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; - #endif -#endif\`,Jc=\`#ifdef USE_MORPHTARGETS - uniform float morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; - uniform sampler2DArray morphTargetsTexture; - uniform ivec2 morphTargetsTextureSize; - vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { - int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; - int y = texelIndex / morphTargetsTextureSize.x; - int x = texelIndex - y * morphTargetsTextureSize.x; - ivec3 morphUV = ivec3( x, y, morphTargetIndex ); - return texelFetch( morphTargetsTexture, morphUV, 0 ); - } - #else - #ifndef USE_MORPHNORMALS - uniform float morphTargetInfluences[ 8 ]; - #else - uniform float morphTargetInfluences[ 4 ]; - #endif - #endif -#endif\`,$c=\`#ifdef USE_MORPHTARGETS - transformed *= morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; - } - #else - transformed += morphTarget0 * morphTargetInfluences[ 0 ]; - transformed += morphTarget1 * morphTargetInfluences[ 1 ]; - transformed += morphTarget2 * morphTargetInfluences[ 2 ]; - transformed += morphTarget3 * morphTargetInfluences[ 3 ]; - #ifndef USE_MORPHNORMALS - transformed += morphTarget4 * morphTargetInfluences[ 4 ]; - transformed += morphTarget5 * morphTargetInfluences[ 5 ]; - transformed += morphTarget6 * morphTargetInfluences[ 6 ]; - transformed += morphTarget7 * morphTargetInfluences[ 7 ]; - #endif - #endif -#endif\`,Kc=\`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; -#ifdef FLAT_SHADED - vec3 fdx = dFdx( vViewPosition ); - vec3 fdy = dFdy( vViewPosition ); - vec3 normal = normalize( cross( fdx, fdy ) ); -#else - vec3 normal = normalize( vNormal ); - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - #ifdef USE_TANGENT - vec3 tangent = normalize( vTangent ); - vec3 bitangent = normalize( vBitangent ); - #ifdef DOUBLE_SIDED - tangent = tangent * faceDirection; - bitangent = bitangent * faceDirection; - #endif - #if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP ) - mat3 vTBN = mat3( tangent, bitangent, normal ); - #endif - #endif -#endif -vec3 geometryNormal = normal;\`,jc=\`#ifdef OBJECTSPACE_NORMALMAP - normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; - #ifdef FLIP_SIDED - normal = - normal; - #endif - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - normal = normalize( normalMatrix * normal ); -#elif defined( TANGENTSPACE_NORMALMAP ) - vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; - mapN.xy *= normalScale; - #ifdef USE_TANGENT - normal = normalize( vTBN * mapN ); - #else - normal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection ); - #endif -#elif defined( USE_BUMPMAP ) - normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif\`,Qc=\`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif\`,th=\`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif\`,eh=\`#ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); - #ifdef USE_TANGENT - vTangent = normalize( transformedTangent ); - vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); - #endif -#endif\`,nh=\`#ifdef USE_NORMALMAP - uniform sampler2D normalMap; - uniform vec2 normalScale; -#endif -#ifdef OBJECTSPACE_NORMALMAP - uniform mat3 normalMatrix; -#endif -#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) ) - vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) { - vec3 q0 = dFdx( eye_pos.xyz ); - vec3 q1 = dFdy( eye_pos.xyz ); - vec2 st0 = dFdx( vUv.st ); - vec2 st1 = dFdy( vUv.st ); - vec3 N = surf_norm; - vec3 q1perp = cross( q1, N ); - vec3 q0perp = cross( N, q0 ); - vec3 T = q1perp * st0.x + q0perp * st1.x; - vec3 B = q1perp * st0.y + q0perp * st1.y; - float det = max( dot( T, T ), dot( B, B ) ); - float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det ); - return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z ); - } -#endif\`,ih=\`#ifdef USE_CLEARCOAT - vec3 clearcoatNormal = geometryNormal; -#endif\`,sh=\`#ifdef USE_CLEARCOAT_NORMALMAP - vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0; - clearcoatMapN.xy *= clearcoatNormalScale; - #ifdef USE_TANGENT - clearcoatNormal = normalize( vTBN * clearcoatMapN ); - #else - clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection ); - #endif -#endif\`,rh=\`#ifdef USE_CLEARCOATMAP - uniform sampler2D clearcoatMap; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - uniform sampler2D clearcoatRoughnessMap; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - uniform sampler2D clearcoatNormalMap; - uniform vec2 clearcoatNormalScale; -#endif\`,ah=\`#ifdef USE_IRIDESCENCEMAP - uniform sampler2D iridescenceMap; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - uniform sampler2D iridescenceThicknessMap; -#endif\`,oh=\`#ifdef OPAQUE -diffuseColor.a = 1.0; -#endif -#ifdef USE_TRANSMISSION -diffuseColor.a *= material.transmissionAlpha + 0.1; -#endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );\`,lh=\`vec3 packNormalToRGB( const in vec3 normal ) { - return normalize( normal ) * 0.5 + 0.5; -} -vec3 unpackRGBToNormal( const in vec3 rgb ) { - return 2.0 * rgb.xyz - 1.0; -} -const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; -const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); -const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); -const float ShiftRight8 = 1. / 256.; -vec4 packDepthToRGBA( const in float v ) { - vec4 r = vec4( fract( v * PackFactors ), v ); - r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; -} -float unpackRGBAToDepth( const in vec4 v ) { - return dot( v, UnpackFactors ); -} -vec2 packDepthToRG( in highp float v ) { - return packDepthToRGBA( v ).yx; -} -float unpackRGToDepth( const in highp vec2 v ) { - return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); -} -vec4 pack2HalfToRGBA( vec2 v ) { - vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); - return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); -} -vec2 unpackRGBATo2Half( vec4 v ) { - return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); -} -float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { - return ( viewZ + near ) / ( near - far ); -} -float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) { - return linearClipZ * ( near - far ) - near; -} -float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { - return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); -} -float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) { - return ( near * far ) / ( ( far - near ) * invClipZ - far ); -}\`,ch=\`#ifdef PREMULTIPLIED_ALPHA - gl_FragColor.rgb *= gl_FragColor.a; -#endif\`,hh=\`vec4 mvPosition = vec4( transformed, 1.0 ); -#ifdef USE_INSTANCING - mvPosition = instanceMatrix * mvPosition; -#endif -mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;\`,uh=\`#ifdef DITHERING - gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif\`,dh=\`#ifdef DITHERING - vec3 dithering( vec3 color ) { - float grid_position = rand( gl_FragCoord.xy ); - vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); - dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); - return color + dither_shift_RGB; - } -#endif\`,fh=\`float roughnessFactor = roughness; -#ifdef USE_ROUGHNESSMAP - vec4 texelRoughness = texture2D( roughnessMap, vUv ); - roughnessFactor *= texelRoughness.g; -#endif\`,ph=\`#ifdef USE_ROUGHNESSMAP - uniform sampler2D roughnessMap; -#endif\`,mh=\`#if NUM_SPOT_LIGHT_COORDS > 0 - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#if NUM_SPOT_LIGHT_MAPS > 0 - uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif - float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { - return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); - } - vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { - return unpackRGBATo2Half( texture2D( shadow, uv ) ); - } - float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ - float occlusion = 1.0; - vec2 distribution = texture2DDistribution( shadow, uv ); - float hard_shadow = step( compare , distribution.x ); - if (hard_shadow != 1.0 ) { - float distance = compare - distribution.x ; - float variance = max( 0.00000, distribution.y * distribution.y ); - float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); - } - return occlusion; - } - float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { - float shadow = 1.0; - shadowCoord.xyz /= shadowCoord.w; - shadowCoord.z += shadowBias; - bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; - bool frustumTest = inFrustum && shadowCoord.z <= 1.0; - if ( frustumTest ) { - #if defined( SHADOWMAP_TYPE_PCF ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx0 = - texelSize.x * shadowRadius; - float dy0 = - texelSize.y * shadowRadius; - float dx1 = + texelSize.x * shadowRadius; - float dy1 = + texelSize.y * shadowRadius; - float dx2 = dx0 / 2.0; - float dy2 = dy0 / 2.0; - float dx3 = dx1 / 2.0; - float dy3 = dy1 / 2.0; - shadow = ( - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) - ) * ( 1.0 / 17.0 ); - #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx = texelSize.x; - float dy = texelSize.y; - vec2 uv = shadowCoord.xy; - vec2 f = fract( uv * shadowMapSize + 0.5 ); - uv -= f * texelSize; - shadow = ( - texture2DCompare( shadowMap, uv, shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), - f.x ), - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), - f.x ), - f.y ) - ) * ( 1.0 / 9.0 ); - #elif defined( SHADOWMAP_TYPE_VSM ) - shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); - #else - shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); - #endif - } - return shadow; - } - vec2 cubeToUV( vec3 v, float texelSizeY ) { - vec3 absV = abs( v ); - float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); - absV *= scaleToCube; - v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); - vec2 planar = v.xy; - float almostATexel = 1.5 * texelSizeY; - float almostOne = 1.0 - almostATexel; - if ( absV.z >= almostOne ) { - if ( v.z > 0.0 ) - planar.x = 4.0 - v.x; - } else if ( absV.x >= almostOne ) { - float signX = sign( v.x ); - planar.x = v.z * signX + 2.0 * signX; - } else if ( absV.y >= almostOne ) { - float signY = sign( v.y ); - planar.x = v.x + 2.0 * signY + 2.0; - planar.y = v.z * signY - 2.0; - } - return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); - } - float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { - vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); - vec3 lightToPosition = shadowCoord.xyz; - float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; - vec3 bd3D = normalize( lightToPosition ); - #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) - vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; - return ( - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) - ) * ( 1.0 / 9.0 ); - #else - return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); - #endif - } -#endif\`,gh=\`#if NUM_SPOT_LIGHT_COORDS > 0 - uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif -#endif\`,_h=\`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) - vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - vec4 shadowWorldPosition; -#endif -#if defined( USE_SHADOWMAP ) - #if NUM_DIR_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); - vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); - vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif -#endif -#if NUM_SPOT_LIGHT_COORDS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { - shadowWorldPosition = worldPosition; - #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; - #endif - vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end -#endif\`,xh=\`float getShadowMask() { - float shadow = 1.0; - #ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - directionalLight = directionalLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { - spotLight = spotLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - pointLight = pointLightShadows[ i ]; - shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; - } - #pragma unroll_loop_end - #endif - #endif - return shadow; -}\`,yh=\`#ifdef USE_SKINNING - mat4 boneMatX = getBoneMatrix( skinIndex.x ); - mat4 boneMatY = getBoneMatrix( skinIndex.y ); - mat4 boneMatZ = getBoneMatrix( skinIndex.z ); - mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif\`,vh=\`#ifdef USE_SKINNING - uniform mat4 bindMatrix; - uniform mat4 bindMatrixInverse; - uniform highp sampler2D boneTexture; - uniform int boneTextureSize; - mat4 getBoneMatrix( const in float i ) { - float j = i * 4.0; - float x = mod( j, float( boneTextureSize ) ); - float y = floor( j / float( boneTextureSize ) ); - float dx = 1.0 / float( boneTextureSize ); - float dy = 1.0 / float( boneTextureSize ); - y = dy * ( y + 0.5 ); - vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); - vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); - vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); - vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); - mat4 bone = mat4( v1, v2, v3, v4 ); - return bone; - } -#endif\`,Mh=\`#ifdef USE_SKINNING - vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); - vec4 skinned = vec4( 0.0 ); - skinned += boneMatX * skinVertex * skinWeight.x; - skinned += boneMatY * skinVertex * skinWeight.y; - skinned += boneMatZ * skinVertex * skinWeight.z; - skinned += boneMatW * skinVertex * skinWeight.w; - transformed = ( bindMatrixInverse * skinned ).xyz; -#endif\`,bh=\`#ifdef USE_SKINNING - mat4 skinMatrix = mat4( 0.0 ); - skinMatrix += skinWeight.x * boneMatX; - skinMatrix += skinWeight.y * boneMatY; - skinMatrix += skinWeight.z * boneMatZ; - skinMatrix += skinWeight.w * boneMatW; - skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; - objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; - #ifdef USE_TANGENT - objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #endif -#endif\`,wh=\`float specularStrength; -#ifdef USE_SPECULARMAP - vec4 texelSpecular = texture2D( specularMap, vUv ); - specularStrength = texelSpecular.r; -#else - specularStrength = 1.0; -#endif\`,Sh=\`#ifdef USE_SPECULARMAP - uniform sampler2D specularMap; -#endif\`,Th=\`#if defined( TONE_MAPPING ) - gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif\`,Ah=\`#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -uniform float toneMappingExposure; -vec3 LinearToneMapping( vec3 color ) { - return toneMappingExposure * color; -} -vec3 ReinhardToneMapping( vec3 color ) { - color *= toneMappingExposure; - return saturate( color / ( vec3( 1.0 ) + color ) ); -} -vec3 OptimizedCineonToneMapping( vec3 color ) { - color *= toneMappingExposure; - color = max( vec3( 0.0 ), color - 0.004 ); - return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); -} -vec3 RRTAndODTFit( vec3 v ) { - vec3 a = v * ( v + 0.0245786 ) - 0.000090537; - vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; - return a / b; -} -vec3 ACESFilmicToneMapping( vec3 color ) { - const mat3 ACESInputMat = mat3( - vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), - vec3( 0.04823, 0.01566, 0.83777 ) - ); - const mat3 ACESOutputMat = mat3( - vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), - vec3( -0.07367, -0.00605, 1.07602 ) - ); - color *= toneMappingExposure / 0.6; - color = ACESInputMat * color; - color = RRTAndODTFit( color ); - color = ACESOutputMat * color; - return saturate( color ); -} -vec3 CustomToneMapping( vec3 color ) { return color; }\`,Eh=\`#ifdef USE_TRANSMISSION - material.transmission = transmission; - material.transmissionAlpha = 1.0; - material.thickness = thickness; - material.attenuationDistance = attenuationDistance; - material.attenuationColor = attenuationColor; - #ifdef USE_TRANSMISSIONMAP - material.transmission *= texture2D( transmissionMap, vUv ).r; - #endif - #ifdef USE_THICKNESSMAP - material.thickness *= texture2D( thicknessMap, vUv ).g; - #endif - vec3 pos = vWorldPosition; - vec3 v = normalize( cameraPosition - pos ); - vec3 n = inverseTransformDirection( normal, viewMatrix ); - vec4 transmission = getIBLVolumeRefraction( - n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, - pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, - material.attenuationColor, material.attenuationDistance ); - material.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission ); - totalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission ); -#endif\`,Ch=\`#ifdef USE_TRANSMISSION - uniform float transmission; - uniform float thickness; - uniform float attenuationDistance; - uniform vec3 attenuationColor; - #ifdef USE_TRANSMISSIONMAP - uniform sampler2D transmissionMap; - #endif - #ifdef USE_THICKNESSMAP - uniform sampler2D thicknessMap; - #endif - uniform vec2 transmissionSamplerSize; - uniform sampler2D transmissionSamplerMap; - uniform mat4 modelMatrix; - uniform mat4 projectionMatrix; - varying vec3 vWorldPosition; - vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { - vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); - vec3 modelScale; - modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); - modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); - modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); - return normalize( refractionVector ) * thickness * modelScale; - } - float applyIorToRoughness( const in float roughness, const in float ior ) { - return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); - } - vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { - float framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); - #ifdef texture2DLodEXT - return texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod ); - #else - return texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod ); - #endif - } - vec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { - if ( isinf( attenuationDistance ) ) { - return radiance; - } else { - vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; - vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance * radiance; - } - } - vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, - const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, - const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, - const in vec3 attenuationColor, const in float attenuationDistance ) { - vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); - vec3 refractedRayExit = position + transmissionRay; - vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); - vec2 refractionCoords = ndcPos.xy / ndcPos.w; - refractionCoords += 1.0; - refractionCoords /= 2.0; - vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); - vec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance ); - vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); - return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a ); - } -#endif\`,Ph=\`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) - varying vec2 vUv; -#endif\`,Rh=\`#ifdef USE_UV - #ifdef UVS_VERTEX_ONLY - vec2 vUv; - #else - varying vec2 vUv; - #endif - uniform mat3 uvTransform; -#endif\`,Lh=\`#ifdef USE_UV - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; -#endif\`,Ih=\`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - varying vec2 vUv2; -#endif\`,Dh=\`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - attribute vec2 uv2; - varying vec2 vUv2; - uniform mat3 uv2Transform; -#endif\`,Nh=\`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy; -#endif\`,Fh=\`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 - vec4 worldPosition = vec4( transformed, 1.0 ); - #ifdef USE_INSTANCING - worldPosition = instanceMatrix * worldPosition; - #endif - worldPosition = modelMatrix * worldPosition; -#endif\`,zh=\`varying vec2 vUv; -uniform mat3 uvTransform; -void main() { - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - gl_Position = vec4( position.xy, 1.0, 1.0 ); -}\`,Oh=\`uniform sampler2D t2D; -uniform float backgroundIntensity; -varying vec2 vUv; -void main() { - vec4 texColor = texture2D( t2D, vUv ); - #ifdef DECODE_VIDEO_TEXTURE - texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}\`,Uh=\`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}\`,Bh=\`#ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; -#elif defined( ENVMAP_TYPE_CUBE_UV ) - uniform sampler2D envMap; -#endif -uniform float flipEnvMap; -uniform float backgroundBlurriness; -uniform float backgroundIntensity; -varying vec3 vWorldDirection; -#include -void main() { - #ifdef ENVMAP_TYPE_CUBE - vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); - #elif defined( ENVMAP_TYPE_CUBE_UV ) - vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness ); - #else - vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}\`,kh=\`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}\`,Vh=\`uniform samplerCube tCube; -uniform float tFlip; -uniform float opacity; -varying vec3 vWorldDirection; -void main() { - vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); - gl_FragColor = texColor; - gl_FragColor.a *= opacity; - #include - #include -}\`,Gh=\`#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vHighPrecisionZW = gl_Position.zw; -}\`,Hh=\`#if DEPTH_PACKING == 3200 - uniform float opacity; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - vec4 diffuseColor = vec4( 1.0 ); - #if DEPTH_PACKING == 3200 - diffuseColor.a = opacity; - #endif - #include - #include - #include - #include - float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; - #if DEPTH_PACKING == 3200 - gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); - #elif DEPTH_PACKING == 3201 - gl_FragColor = packDepthToRGBA( fragCoordZ ); - #endif -}\`,Wh=\`#define DISTANCE -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vWorldPosition = worldPosition.xyz; -}\`,Xh=\`#define DISTANCE -uniform vec3 referencePosition; -uniform float nearDistance; -uniform float farDistance; -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -#include -void main () { - #include - vec4 diffuseColor = vec4( 1.0 ); - #include - #include - #include - float dist = length( vWorldPosition - referencePosition ); - dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); - dist = saturate( dist ); - gl_FragColor = packDepthToRGBA( dist ); -}\`,qh=\`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include -}\`,Yh=\`uniform sampler2D tEquirect; -varying vec3 vWorldDirection; -#include -void main() { - vec3 direction = normalize( vWorldDirection ); - vec2 sampleUV = equirectUv( direction ); - gl_FragColor = texture2D( tEquirect, sampleUV ); - #include - #include -}\`,Zh=\`uniform float scale; -attribute float lineDistance; -varying float vLineDistance; -#include -#include -#include -#include -#include -#include -void main() { - vLineDistance = scale * lineDistance; - #include - #include - #include - #include - #include - #include - #include - #include -}\`,Jh=\`uniform vec3 diffuse; -uniform float opacity; -uniform float dashSize; -uniform float totalSize; -varying float vLineDistance; -#include -#include -#include -#include -#include -void main() { - #include - if ( mod( vLineDistance, totalSize ) > dashSize ) { - discard; - } - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}\`,$h=\`#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) - #include - #include - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include -}\`,Kh=\`uniform vec3 diffuse; -uniform float opacity; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vUv2 ); - reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; - #else - reflectedLight.indirectDiffuse += vec3( 1.0 ); - #endif - #include - reflectedLight.indirectDiffuse *= diffuseColor.rgb; - vec3 outgoingLight = reflectedLight.indirectDiffuse; - #include - #include - #include - #include - #include - #include - #include -}\`,jh=\`#define LAMBERT -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}\`,Qh=\`#define LAMBERT -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}\`,tu=\`#define MATCAP -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; -}\`,eu=\`#define MATCAP -uniform vec3 diffuse; -uniform float opacity; -uniform sampler2D matcap; -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - #include - vec3 viewDir = normalize( vViewPosition ); - vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); - vec3 y = cross( viewDir, x ); - vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; - #ifdef USE_MATCAP - vec4 matcapColor = texture2D( matcap, uv ); - #else - vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); - #endif - vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; - #include - #include - #include - #include - #include - #include -}\`,nu=\`#define NORMAL -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - vViewPosition = - mvPosition.xyz; -#endif -}\`,iu=\`#define NORMAL -uniform float opacity; -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); - #ifdef OPAQUE - gl_FragColor.a = 1.0; - #endif -}\`,su=\`#define PHONG -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}\`,ru=\`#define PHONG -uniform vec3 diffuse; -uniform vec3 emissive; -uniform vec3 specular; -uniform float shininess; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}\`,au=\`#define STANDARD -varying vec3 vViewPosition; -#ifdef USE_TRANSMISSION - varying vec3 vWorldPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -#ifdef USE_TRANSMISSION - vWorldPosition = worldPosition.xyz; -#endif -}\`,ou=\`#define STANDARD -#ifdef PHYSICAL - #define IOR - #define SPECULAR -#endif -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float roughness; -uniform float metalness; -uniform float opacity; -#ifdef IOR - uniform float ior; -#endif -#ifdef SPECULAR - uniform float specularIntensity; - uniform vec3 specularColor; - #ifdef USE_SPECULARINTENSITYMAP - uniform sampler2D specularIntensityMap; - #endif - #ifdef USE_SPECULARCOLORMAP - uniform sampler2D specularColorMap; - #endif -#endif -#ifdef USE_CLEARCOAT - uniform float clearcoat; - uniform float clearcoatRoughness; -#endif -#ifdef USE_IRIDESCENCE - uniform float iridescence; - uniform float iridescenceIOR; - uniform float iridescenceThicknessMinimum; - uniform float iridescenceThicknessMaximum; -#endif -#ifdef USE_SHEEN - uniform vec3 sheenColor; - uniform float sheenRoughness; - #ifdef USE_SHEENCOLORMAP - uniform sampler2D sheenColorMap; - #endif - #ifdef USE_SHEENROUGHNESSMAP - uniform sampler2D sheenRoughnessMap; - #endif -#endif -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; - vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; - #include - vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; - #ifdef USE_SHEEN - float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); - outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular; - #endif - #ifdef USE_CLEARCOAT - float dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) ); - vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); - outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat; - #endif - #include - #include - #include - #include - #include - #include -}\`,lu=\`#define TOON -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -}\`,cu=\`#define TOON -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include -}\`,hu=\`uniform float size; -uniform float scale; -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - gl_PointSize = size; - #ifdef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); - #endif - #include - #include - #include - #include -}\`,uu=\`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}\`,du=\`#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}\`,fu=\`uniform vec3 color; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -void main() { - gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); - #include - #include - #include -}\`,pu=\`uniform float rotation; -uniform vec2 center; -#include -#include -#include -#include -#include -void main() { - #include - vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); - vec2 scale; - scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); - scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); - #ifndef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) scale *= - mvPosition.z; - #endif - vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; - vec2 rotatedPosition; - rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; - rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; - mvPosition.xy += rotatedPosition; - gl_Position = projectionMatrix * mvPosition; - #include - #include - #include -}\`,mu=\`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include -}\`,wt={alphamap_fragment:Ul,alphamap_pars_fragment:Bl,alphatest_fragment:kl,alphatest_pars_fragment:Vl,aomap_fragment:Gl,aomap_pars_fragment:Hl,begin_vertex:Wl,beginnormal_vertex:Xl,bsdfs:ql,iridescence_fragment:Yl,bumpmap_pars_fragment:Zl,clipping_planes_fragment:Jl,clipping_planes_pars_fragment:$l,clipping_planes_pars_vertex:Kl,clipping_planes_vertex:jl,color_fragment:Ql,color_pars_fragment:tc,color_pars_vertex:ec,color_vertex:nc,common:ic,cube_uv_reflection_fragment:sc,defaultnormal_vertex:rc,displacementmap_pars_vertex:ac,displacementmap_vertex:oc,emissivemap_fragment:lc,emissivemap_pars_fragment:cc,encodings_fragment:hc,encodings_pars_fragment:uc,envmap_fragment:dc,envmap_common_pars_fragment:fc,envmap_pars_fragment:pc,envmap_pars_vertex:mc,envmap_physical_pars_fragment:Ec,envmap_vertex:gc,fog_vertex:_c,fog_pars_vertex:xc,fog_fragment:yc,fog_pars_fragment:vc,gradientmap_pars_fragment:Mc,lightmap_fragment:bc,lightmap_pars_fragment:wc,lights_lambert_fragment:Sc,lights_lambert_pars_fragment:Tc,lights_pars_begin:Ac,lights_toon_fragment:Cc,lights_toon_pars_fragment:Pc,lights_phong_fragment:Rc,lights_phong_pars_fragment:Lc,lights_physical_fragment:Ic,lights_physical_pars_fragment:Dc,lights_fragment_begin:Nc,lights_fragment_maps:Fc,lights_fragment_end:zc,logdepthbuf_fragment:Oc,logdepthbuf_pars_fragment:Uc,logdepthbuf_pars_vertex:Bc,logdepthbuf_vertex:kc,map_fragment:Vc,map_pars_fragment:Gc,map_particle_fragment:Hc,map_particle_pars_fragment:Wc,metalnessmap_fragment:Xc,metalnessmap_pars_fragment:qc,morphcolor_vertex:Yc,morphnormal_vertex:Zc,morphtarget_pars_vertex:Jc,morphtarget_vertex:$c,normal_fragment_begin:Kc,normal_fragment_maps:jc,normal_pars_fragment:Qc,normal_pars_vertex:th,normal_vertex:eh,normalmap_pars_fragment:nh,clearcoat_normal_fragment_begin:ih,clearcoat_normal_fragment_maps:sh,clearcoat_pars_fragment:rh,iridescence_pars_fragment:ah,output_fragment:oh,packing:lh,premultiplied_alpha_fragment:ch,project_vertex:hh,dithering_fragment:uh,dithering_pars_fragment:dh,roughnessmap_fragment:fh,roughnessmap_pars_fragment:ph,shadowmap_pars_fragment:mh,shadowmap_pars_vertex:gh,shadowmap_vertex:_h,shadowmask_pars_fragment:xh,skinbase_vertex:yh,skinning_pars_vertex:vh,skinning_vertex:Mh,skinnormal_vertex:bh,specularmap_fragment:wh,specularmap_pars_fragment:Sh,tonemapping_fragment:Th,tonemapping_pars_fragment:Ah,transmission_fragment:Eh,transmission_pars_fragment:Ch,uv_pars_fragment:Ph,uv_pars_vertex:Rh,uv_vertex:Lh,uv2_pars_fragment:Ih,uv2_pars_vertex:Dh,uv2_vertex:Nh,worldpos_vertex:Fh,background_vert:zh,background_frag:Oh,backgroundCube_vert:Uh,backgroundCube_frag:Bh,cube_vert:kh,cube_frag:Vh,depth_vert:Gh,depth_frag:Hh,distanceRGBA_vert:Wh,distanceRGBA_frag:Xh,equirect_vert:qh,equirect_frag:Yh,linedashed_vert:Zh,linedashed_frag:Jh,meshbasic_vert:$h,meshbasic_frag:Kh,meshlambert_vert:jh,meshlambert_frag:Qh,meshmatcap_vert:tu,meshmatcap_frag:eu,meshnormal_vert:nu,meshnormal_frag:iu,meshphong_vert:su,meshphong_frag:ru,meshphysical_vert:au,meshphysical_frag:ou,meshtoon_vert:lu,meshtoon_frag:cu,points_vert:hu,points_frag:uu,shadow_vert:du,shadow_frag:fu,sprite_vert:pu,sprite_frag:mu},et={common:{diffuse:{value:new Ot(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new oe},uv2Transform:{value:new oe},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Nt(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ot(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 Ot(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new oe}},sprite:{diffuse:{value:new Ot(16777215)},opacity:{value:1},center:{value:new Nt(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new oe}}},De={basic:{uniforms:re([et.common,et.specularmap,et.envmap,et.aomap,et.lightmap,et.fog]),vertexShader:wt.meshbasic_vert,fragmentShader:wt.meshbasic_frag},lambert:{uniforms:re([et.common,et.specularmap,et.envmap,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.fog,et.lights,{emissive:{value:new Ot(0)}}]),vertexShader:wt.meshlambert_vert,fragmentShader:wt.meshlambert_frag},phong:{uniforms:re([et.common,et.specularmap,et.envmap,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.fog,et.lights,{emissive:{value:new Ot(0)},specular:{value:new Ot(1118481)},shininess:{value:30}}]),vertexShader:wt.meshphong_vert,fragmentShader:wt.meshphong_frag},standard:{uniforms:re([et.common,et.envmap,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.roughnessmap,et.metalnessmap,et.fog,et.lights,{emissive:{value:new Ot(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:wt.meshphysical_vert,fragmentShader:wt.meshphysical_frag},toon:{uniforms:re([et.common,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.gradientmap,et.fog,et.lights,{emissive:{value:new Ot(0)}}]),vertexShader:wt.meshtoon_vert,fragmentShader:wt.meshtoon_frag},matcap:{uniforms:re([et.common,et.bumpmap,et.normalmap,et.displacementmap,et.fog,{matcap:{value:null}}]),vertexShader:wt.meshmatcap_vert,fragmentShader:wt.meshmatcap_frag},points:{uniforms:re([et.points,et.fog]),vertexShader:wt.points_vert,fragmentShader:wt.points_frag},dashed:{uniforms:re([et.common,et.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:wt.linedashed_vert,fragmentShader:wt.linedashed_frag},depth:{uniforms:re([et.common,et.displacementmap]),vertexShader:wt.depth_vert,fragmentShader:wt.depth_frag},normal:{uniforms:re([et.common,et.bumpmap,et.normalmap,et.displacementmap,{opacity:{value:1}}]),vertexShader:wt.meshnormal_vert,fragmentShader:wt.meshnormal_frag},sprite:{uniforms:re([et.sprite,et.fog]),vertexShader:wt.sprite_vert,fragmentShader:wt.sprite_frag},background:{uniforms:{uvTransform:{value:new oe},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:wt.background_vert,fragmentShader:wt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:wt.backgroundCube_vert,fragmentShader:wt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:wt.cube_vert,fragmentShader:wt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:wt.equirect_vert,fragmentShader:wt.equirect_frag},distanceRGBA:{uniforms:re([et.common,et.displacementmap,{referencePosition:{value:new N},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:wt.distanceRGBA_vert,fragmentShader:wt.distanceRGBA_frag},shadow:{uniforms:re([et.lights,et.fog,{color:{value:new Ot(0)},opacity:{value:1}}]),vertexShader:wt.shadow_vert,fragmentShader:wt.shadow_frag}};De.physical={uniforms:re([De.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Nt(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new Ot(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Nt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Ot(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Ot(1,1,1)},specularColorMap:{value:null}}]),vertexShader:wt.meshphysical_vert,fragmentShader:wt.meshphysical_frag};var zi={r:0,b:0,g:0};function gu(r,t,e,n,i,s,o){let a=new Ot(0),c=s===!0?0:1,l,h,f=null,u=0,m=null;function _(d,v){let T=!1,b=v.isScene===!0?v.background:null;b&&b.isTexture&&(b=(v.backgroundBlurriness>0?e:t).get(b));let M=r.xr,A=M.getSession&&M.getSession();A&&A.environmentBlendMode==="additive"&&(b=null),b===null?p(a,c):b&&b.isColor&&(p(b,1),T=!0),(r.autoClear||T)&&r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil),b&&(b.isCubeTexture||b.mapping===ns)?(h===void 0&&(h=new Ne(new bn(1,1,1),new Ze({name:"BackgroundCubeMaterial",uniforms:$n(De.backgroundCube.uniforms),vertexShader:De.backgroundCube.vertexShader,fragmentShader:De.backgroundCube.fragmentShader,side:ye,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(C,I,x){this.matrixWorld.copyPosition(x.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(h)),h.material.uniforms.envMap.value=b,h.material.uniforms.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,h.material.toneMapped=b.encoding!==zt,(f!==b||u!==b.version||m!==r.toneMapping)&&(h.material.needsUpdate=!0,f=b,u=b.version,m=r.toneMapping),h.layers.enableAll(),d.unshift(h,h.geometry,h.material,0,0,null)):b&&b.isTexture&&(l===void 0&&(l=new Ne(new xi(2,2),new Ze({name:"BackgroundMaterial",uniforms:$n(De.background.uniforms),vertexShader:De.background.vertexShader,fragmentShader:De.background.fragmentShader,side:nn,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=b,l.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,l.material.toneMapped=b.encoding!==zt,b.matrixAutoUpdate===!0&&b.updateMatrix(),l.material.uniforms.uvTransform.value.copy(b.matrix),(f!==b||u!==b.version||m!==r.toneMapping)&&(l.material.needsUpdate=!0,f=b,u=b.version,m=r.toneMapping),l.layers.enableAll(),d.unshift(l,l.geometry,l.material,0,0,null))}function p(d,v){d.getRGB(zi,Ka(r)),n.buffers.color.setClear(zi.r,zi.g,zi.b,v,o)}return{getClearColor:function(){return a},setClearColor:function(d,v=1){a.set(d),c=v,p(a,c)},getClearAlpha:function(){return c},setClearAlpha:function(d){c=d,p(a,c)},render:_}}function _u(r,t,e,n){let i=r.getParameter(34921),s=n.isWebGL2?null:t.get("OES_vertex_array_object"),o=n.isWebGL2||s!==null,a={},c=d(null),l=c,h=!1;function f(R,G,Y,j,W){let Q=!1;if(o){let Z=p(j,Y,G);l!==Z&&(l=Z,m(l.object)),Q=v(R,j,Y,W),Q&&T(R,j,Y,W)}else{let Z=G.wireframe===!0;(l.geometry!==j.id||l.program!==Y.id||l.wireframe!==Z)&&(l.geometry=j.id,l.program=Y.id,l.wireframe=Z,Q=!0)}W!==null&&e.update(W,34963),(Q||h)&&(h=!1,x(R,G,Y,j),W!==null&&r.bindBuffer(34963,e.get(W).buffer))}function u(){return n.isWebGL2?r.createVertexArray():s.createVertexArrayOES()}function m(R){return n.isWebGL2?r.bindVertexArray(R):s.bindVertexArrayOES(R)}function _(R){return n.isWebGL2?r.deleteVertexArray(R):s.deleteVertexArrayOES(R)}function p(R,G,Y){let j=Y.wireframe===!0,W=a[R.id];W===void 0&&(W={},a[R.id]=W);let Q=W[G.id];Q===void 0&&(Q={},W[G.id]=Q);let Z=Q[j];return Z===void 0&&(Z=d(u()),Q[j]=Z),Z}function d(R){let G=[],Y=[],j=[];for(let W=0;W=0){let nt=W[F],it=Q[F];if(it===void 0&&(F==="instanceMatrix"&&R.instanceMatrix&&(it=R.instanceMatrix),F==="instanceColor"&&R.instanceColor&&(it=R.instanceColor)),nt===void 0||nt.attribute!==it||it&&nt.data!==it.data)return!0;Z++}return l.attributesNum!==Z||l.index!==j}function T(R,G,Y,j){let W={},Q=G.attributes,Z=0,ft=Y.getAttributes();for(let F in ft)if(ft[F].location>=0){let nt=Q[F];nt===void 0&&(F==="instanceMatrix"&&R.instanceMatrix&&(nt=R.instanceMatrix),F==="instanceColor"&&R.instanceColor&&(nt=R.instanceColor));let it={};it.attribute=nt,nt&&nt.data&&(it.data=nt.data),W[F]=it,Z++}l.attributes=W,l.attributesNum=Z,l.index=j}function b(){let R=l.newAttributes;for(let G=0,Y=R.length;G=0){let J=W[ft];if(J===void 0&&(ft==="instanceMatrix"&&R.instanceMatrix&&(J=R.instanceMatrix),ft==="instanceColor"&&R.instanceColor&&(J=R.instanceColor)),J!==void 0){let nt=J.normalized,it=J.itemSize,O=e.get(J);if(O===void 0)continue;let Mt=O.buffer,ht=O.type,ut=O.bytesPerElement;if(J.isInterleavedBufferAttribute){let ot=J.data,Ft=ot.stride,bt=J.offset;if(ot.isInstancedInterleavedBuffer){for(let xt=0;xt0&&r.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";I="mediump"}return I==="mediump"&&r.getShaderPrecisionFormat(35633,36337).precision>0&&r.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let o=typeof WebGL2RenderingContext!="undefined"&&r instanceof WebGL2RenderingContext,a=e.precision!==void 0?e.precision:"highp",c=s(a);c!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",c,"instead."),a=c);let l=o||t.has("WEBGL_draw_buffers"),h=e.logarithmicDepthBuffer===!0,f=r.getParameter(34930),u=r.getParameter(35660),m=r.getParameter(3379),_=r.getParameter(34076),p=r.getParameter(34921),d=r.getParameter(36347),v=r.getParameter(36348),T=r.getParameter(36349),b=u>0,M=o||t.has("OES_texture_float"),A=b&&M,C=o?r.getParameter(36183):0;return{isWebGL2:o,drawBuffers:l,getMaxAnisotropy:i,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:h,maxTextures:f,maxVertexTextures:u,maxTextureSize:m,maxCubemapSize:_,maxAttributes:p,maxVertexUniforms:d,maxVaryings:v,maxFragmentUniforms:T,vertexTextures:b,floatFragmentTextures:M,floatVertexTextures:A,maxSamples:C}}function vu(r){let t=this,e=null,n=0,i=!1,s=!1,o=new He,a=new oe,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(f,u){let m=f.length!==0||u||n!==0||i;return i=u,n=f.length,m},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(f,u){e=h(f,u,0)},this.setState=function(f,u,m){let _=f.clippingPlanes,p=f.clipIntersection,d=f.clipShadows,v=r.get(f);if(!i||_===null||_.length===0||s&&!d)s?h(null):l();else{let T=s?0:n,b=T*4,M=v.clippingState||null;c.value=M,M=h(_,u,b,m);for(let A=0;A!==b;++A)M[A]=e[A];v.clippingState=M,this.numIntersection=p?this.numPlanes:0,this.numPlanes+=T}};function l(){c.value!==e&&(c.value=e,c.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function h(f,u,m,_){let p=f!==null?f.length:0,d=null;if(p!==0){if(d=c.value,_!==!0||d===null){let v=m+p*4,T=u.matrixWorldInverse;a.getNormalMatrix(T),(d===null||d.length0){let l=new js(c.height/2);return l.fromEquirectangularTexture(r,o),t.set(o,l),o.addEventListener("dispose",i),e(l.texture,o.mapping)}else return null}}return o}function i(o){let a=o.target;a.removeEventListener("dispose",i);let c=t.get(a);c!==void 0&&(t.delete(a),c.dispose())}function s(){t=new WeakMap}return{get:n,dispose:s}}var Qs=class extends ji{constructor(t=-1,e=1,n=1,i=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=i,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,n,i,s,o){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=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,s=n-t,o=n+t,a=i+e,c=i-e;if(this.view!==null&&this.view.enabled){let l=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=l*this.view.offsetX,o=s+l*this.view.width,a-=h*this.view.offsetY,c=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,c,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}},kn=4,Ma=[.125,.215,.35,.446,.526,.582],pn=20,Bs=new Qs,ba=new Ot,ks=null,fn=(1+Math.sqrt(5))/2,Un=1/fn,wa=[new N(1,1,1),new N(-1,1,1),new N(1,1,-1),new N(-1,1,-1),new N(0,fn,Un),new N(0,fn,-Un),new N(Un,0,fn),new N(-Un,0,fn),new N(fn,Un,0),new N(-fn,Un,0)],es=class{constructor(t){this._renderer=t,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(t,e=0,n=.1,i=100){ks=this._renderer.getRenderTarget(),this._setSize(256);let s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(t,n,i,s),e>0&&this._blur(s,0,0,e),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Aa(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Ta(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let t=0;t2?b:0,b,b),h.setRenderTarget(i),p&&h.render(_,a),h.render(t,a)}_.geometry.dispose(),_.material.dispose(),h.toneMapping=u,h.autoClear=f,t.background=d}_textureToCubeUV(t,e){let n=this._renderer,i=t.mapping===Xn||t.mapping===qn;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Aa()),this._cubemapMaterial.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Ta());let s=i?this._cubemapMaterial:this._equirectMaterial,o=new Ne(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=t;let c=this._cubeSize;Oi(e,0,0,3*c,2*c),n.setRenderTarget(e),n.render(o,Bs)}_applyPMREM(t){let e=this._renderer,n=e.autoClear;e.autoClear=!1;for(let i=1;ipn&&console.warn(\`sigmaRadians, \${s}, is too large and will clip, as it requested \${d} samples when the maximum is set to \${pn}\`);let v=[],T=0;for(let I=0;Ib-kn?i-b+kn:0),C=4*(this._cubeSize-M);Oi(e,A,C,3*M,2*M),c.setRenderTarget(e),c.render(f,Bs)}};function bu(r){let t=[],e=[],n=[],i=r,s=r-kn+1+Ma.length;for(let o=0;or-kn?c=Ma[o-r+kn-1]:o===0&&(c=0),n.push(c);let l=1/(a-2),h=-l,f=1+l,u=[h,h,f,h,f,f,h,h,f,f,h,f],m=6,_=6,p=3,d=2,v=1,T=new Float32Array(p*_*m),b=new Float32Array(d*_*m),M=new Float32Array(v*_*m);for(let C=0;C2?0:-1,S=[I,x,0,I+2/3,x,0,I+2/3,x+1,0,I,x,0,I+2/3,x+1,0,I,x+1,0];T.set(S,p*_*C),b.set(u,d*_*C);let L=[C,C,C,C,C,C];M.set(L,v*_*C)}let A=new Ye;A.setAttribute("position",new ce(T,p)),A.setAttribute("uv",new ce(b,d)),A.setAttribute("faceIndex",new ce(M,v)),t.push(A),i>kn&&i--}return{lodPlanes:t,sizeLods:e,sigmas:n}}function Sa(r,t,e){let n=new qe(r,t,e);return n.texture.mapping=ns,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function Oi(r,t,e,n,i){r.viewport.set(t,e,n,i),r.scissor.set(t,e,n,i)}function wu(r,t,e){let n=new Float32Array(pn),i=new N(0,1,0);return new Ze({name:"SphericalGaussianBlur",defines:{n:pn,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/e,CUBEUV_MAX_MIP:\`\${r}.0\`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:br(),fragmentShader:\` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform int samples; - uniform float weights[ n ]; - uniform bool latitudinal; - uniform float dTheta; - uniform float mipInt; - uniform vec3 poleAxis; - - #define ENVMAP_TYPE_CUBE_UV - #include - - vec3 getSample( float theta, vec3 axis ) { - - float cosTheta = cos( theta ); - // Rodrigues' axis-angle rotation - vec3 sampleDirection = vOutputDirection * cosTheta - + cross( axis, vOutputDirection ) * sin( theta ) - + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); - - return bilinearCubeUV( envMap, sampleDirection, mipInt ); - - } - - void main() { - - vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); - - if ( all( equal( axis, vec3( 0.0 ) ) ) ) { - - axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); - - } - - axis = normalize( axis ); - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); - - for ( int i = 1; i < n; i++ ) { - - if ( i >= samples ) { - - break; - - } - - float theta = dTheta * float( i ); - gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); - gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); - - } - - } - \`,blending:en,depthTest:!1,depthWrite:!1})}function Ta(){return new Ze({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:br(),fragmentShader:\` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - - #include - - void main() { - - vec3 outputDirection = normalize( vOutputDirection ); - vec2 uv = equirectUv( outputDirection ); - - gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); - - } - \`,blending:en,depthTest:!1,depthWrite:!1})}function Aa(){return new Ze({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:br(),fragmentShader:\` - - precision mediump float; - precision mediump int; - - uniform float flipEnvMap; - - varying vec3 vOutputDirection; - - uniform samplerCube envMap; - - void main() { - - gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); - - } - \`,blending:en,depthTest:!1,depthWrite:!1})}function br(){return\` - - precision mediump float; - precision mediump int; - - attribute float faceIndex; - - varying vec3 vOutputDirection; - - // RH coordinate system; PMREM face-indexing convention - vec3 getDirection( vec2 uv, float face ) { - - uv = 2.0 * uv - 1.0; - - vec3 direction = vec3( uv, 1.0 ); - - if ( face == 0.0 ) { - - direction = direction.zyx; // ( 1, v, u ) pos x - - } else if ( face == 1.0 ) { - - direction = direction.xzy; - direction.xz *= -1.0; // ( -u, 1, -v ) pos y - - } else if ( face == 2.0 ) { - - direction.x *= -1.0; // ( -u, v, 1 ) pos z - - } else if ( face == 3.0 ) { - - direction = direction.zyx; - direction.xz *= -1.0; // ( -1, v, -u ) neg x - - } else if ( face == 4.0 ) { - - direction = direction.xzy; - direction.xy *= -1.0; // ( -u, -1, v ) neg y - - } else if ( face == 5.0 ) { - - direction.z *= -1.0; // ( u, v, -1 ) neg z - - } - - return direction; - - } - - void main() { - - vOutputDirection = getDirection( uv, faceIndex ); - gl_Position = vec4( position, 1.0 ); - - } - \`}function Su(r){let t=new WeakMap,e=null;function n(a){if(a&&a.isTexture){let c=a.mapping,l=c===Hs||c===Ws,h=c===Xn||c===qn;if(l||h)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let f=t.get(a);return e===null&&(e=new es(r)),f=l?e.fromEquirectangular(a,f):e.fromCubemap(a,f),t.set(a,f),f.texture}else{if(t.has(a))return t.get(a).texture;{let f=a.image;if(l&&f&&f.height>0||h&&f&&i(f)){e===null&&(e=new es(r));let u=l?e.fromEquirectangular(a):e.fromCubemap(a);return t.set(a,u),a.addEventListener("dispose",s),u.texture}else return null}}}return a}function i(a){let c=0,l=6;for(let h=0;ht.maxTextureSize&&(X=Math.ceil(L/t.maxTextureSize),L=t.maxTextureSize);let q=new Float32Array(L*X*4*p),z=new Yi(q,L,X,p);z.type=gn,z.needsUpdate=!0;let R=S*4;for(let Y=0;Y0)return r;let i=t*e,s=Ea[i];if(s===void 0&&(s=new Float32Array(i),Ea[i]=s),t!==0){n.toArray(s,0);for(let o=1,a=0;o!==t;++o)a+=e,r[o].toArray(s,a)}return s}function Yt(r,t){if(r.length!==t.length)return!1;for(let e=0,n=r.length;e":" "} \${a}: \${e[o]}\`)}return n.join(\` -\`)}function bd(r){switch(r){case vn:return["Linear","( value )"];case zt:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",r),["Linear","( value )"]}}function Na(r,t,e){let n=r.getShaderParameter(t,35713),i=r.getShaderInfoLog(t).trim();if(n&&i==="")return"";let s=/ERROR: 0:(\\d+)/.exec(i);if(s){let o=parseInt(s[1]);return e.toUpperCase()+\` - -\`+i+\` - -\`+Md(r.getShaderSource(t),o)}else return i}function wd(r,t){let e=bd(t);return"vec4 "+r+"( vec4 value ) { return LinearTo"+e[0]+e[1]+"; }"}function Sd(r,t){let e;switch(t){case No:e="Linear";break;case Fo:e="Reinhard";break;case zo:e="OptimizedCineon";break;case Oo:e="ACESFilmic";break;case Uo:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+r+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}function Td(r){return[r.extensionDerivatives||r.envMapCubeUVHeight||r.bumpMap||r.tangentSpaceNormalMap||r.clearcoatNormalMap||r.flatShading||r.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(r.extensionFragDepth||r.logarithmicDepthBuffer)&&r.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",r.extensionDrawBuffers&&r.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(r.extensionShaderTextureLOD||r.envMap||r.transmission)&&r.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(hi).join(\` -\`)}function Ad(r){let t=[];for(let e in r){let n=r[e];n!==!1&&t.push("#define "+e+" "+n)}return t.join(\` -\`)}function Ed(r,t){let e={},n=r.getProgramParameter(t,35721);for(let i=0;i/gm;function ir(r){return r.replace(Cd,Pd)}function Pd(r,t){let e=wt[t];if(e===void 0)throw new Error("Can not resolve #include <"+t+">");return ir(e)}var Rd=/#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 Oa(r){return r.replace(Rd,Ld)}function Ld(r,t,e,n){let i="";for(let s=parseInt(t);s0&&(d+=\` -\`),v=[m,_].filter(hi).join(\` -\`),v.length>0&&(v+=\` -\`)):(d=[Ua(e),"#define SHADER_NAME "+e.shaderName,_,e.instancing?"#define USE_INSTANCING":"",e.instancingColor?"#define USE_INSTANCING_COLOR":"",e.supportsVertexTextures?"#define VERTEX_TEXTURES":"",e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+h:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.displacementMap&&e.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.flatShading?"#define FLAT_SHADED":"",e.skinning?"#define USE_SKINNING":"",e.morphTargets?"#define USE_MORPHTARGETS":"",e.morphNormals&&e.flatShading===!1?"#define USE_MORPHNORMALS":"",e.morphColors&&e.isWebGL2?"#define USE_MORPHCOLORS":"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+e.morphTextureStride:"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_COUNT "+e.morphTargetsCount:"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+c:"",e.sizeAttenuation?"#define USE_SIZEATTENUATION":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.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_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",\` -\`].filter(hi).join(\` -\`),v=[m,Ua(e),"#define SHADER_NAME "+e.shaderName,_,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.matcap?"#define USE_MATCAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+l:"",e.envMap?"#define "+h:"",e.envMap?"#define "+f:"",u?"#define CUBEUV_TEXEL_WIDTH "+u.texelWidth:"",u?"#define CUBEUV_TEXEL_HEIGHT "+u.texelHeight:"",u?"#define CUBEUV_MAX_MIP "+u.maxMip+".0":"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoat?"#define USE_CLEARCOAT":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescence?"#define USE_IRIDESCENCE":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaTest?"#define USE_ALPHATEST":"",e.sheen?"#define USE_SHEEN":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors||e.instancingColor?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.gradientMap?"#define USE_GRADIENTMAP":"",e.flatShading?"#define FLAT_SHADED":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+c:"",e.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",e.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==We?"#define TONE_MAPPING":"",e.toneMapping!==We?wt.tonemapping_pars_fragment:"",e.toneMapping!==We?Sd("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",wt.encodings_pars_fragment,wd("linearToOutputTexel",e.outputEncoding),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"",\` -\`].filter(hi).join(\` -\`)),o=ir(o),o=Fa(o,e),o=za(o,e),a=ir(a),a=Fa(a,e),a=za(a,e),o=Oa(o),a=Oa(a),e.isWebGL2&&e.isRawShaderMaterial!==!0&&(T=\`#version 300 es -\`,d=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(\` -\`)+\` -\`+d,v=["#define varying in",e.glslVersion===ca?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===ca?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(\` -\`)+\` -\`+v);let b=T+d+o,M=T+v+a,A=Da(i,35633,b),C=Da(i,35632,M);if(i.attachShader(p,A),i.attachShader(p,C),e.index0AttributeName!==void 0?i.bindAttribLocation(p,0,e.index0AttributeName):e.morphTargets===!0&&i.bindAttribLocation(p,0,"position"),i.linkProgram(p),r.debug.checkShaderErrors){let S=i.getProgramInfoLog(p).trim(),L=i.getShaderInfoLog(A).trim(),X=i.getShaderInfoLog(C).trim(),q=!0,z=!0;if(i.getProgramParameter(p,35714)===!1){q=!1;let R=Na(i,A,"vertex"),G=Na(i,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(p,35715)+\` - -Program Info Log: \`+S+\` -\`+R+\` -\`+G)}else S!==""?console.warn("THREE.WebGLProgram: Program Info Log:",S):(L===""||X==="")&&(z=!1);z&&(this.diagnostics={runnable:q,programLog:S,vertexShader:{log:L,prefix:d},fragmentShader:{log:X,prefix:v}})}i.deleteShader(A),i.deleteShader(C);let I;this.getUniforms=function(){return I===void 0&&(I=new Wn(i,p)),I};let x;return this.getAttributes=function(){return x===void 0&&(x=Ed(i,p)),x},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(p),this.program=void 0},this.name=e.shaderName,this.id=vd++,this.cacheKey=t,this.usedTimes=1,this.program=p,this.vertexShader=A,this.fragmentShader=C,this}var Ud=0,sr=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){let e=t.vertexShader,n=t.fragmentShader,i=this._getShaderStage(e),s=this._getShaderStage(n),o=this._getShaderCacheForMaterial(t);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(t){let e=this.materialCache.get(t);for(let n of e)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){let e=this.materialCache,n=e.get(t);return n===void 0&&(n=new Set,e.set(t,n)),n}_getShaderStage(t){let e=this.shaderCache,n=e.get(t);return n===void 0&&(n=new rr(t),e.set(t,n)),n}},rr=class{constructor(t){this.id=Ud++,this.code=t,this.usedTimes=0}};function Bd(r,t,e,n,i,s,o){let a=new Zi,c=new sr,l=[],h=i.isWebGL2,f=i.logarithmicDepthBuffer,u=i.vertexTextures,m=i.precision,_={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 p(x,S,L,X,q){let z=X.fog,R=q.geometry,G=x.isMeshStandardMaterial?X.environment:null,Y=(x.isMeshStandardMaterial?e:t).get(x.envMap||G),j=Y&&Y.mapping===ns?Y.image.height:null,W=_[x.type];x.precision!==null&&(m=i.getMaxPrecision(x.precision),m!==x.precision&&console.warn("THREE.WebGLProgram.getParameters:",x.precision,"not supported, using",m,"instead."));let Q=R.morphAttributes.position||R.morphAttributes.normal||R.morphAttributes.color,Z=Q!==void 0?Q.length:0,ft=0;R.morphAttributes.position!==void 0&&(ft=1),R.morphAttributes.normal!==void 0&&(ft=2),R.morphAttributes.color!==void 0&&(ft=3);let F,J,nt,it;if(W){let Ft=De[W];F=Ft.vertexShader,J=Ft.fragmentShader}else F=x.vertexShader,J=x.fragmentShader,c.update(x),nt=c.getVertexShaderID(x),it=c.getFragmentShaderID(x);let O=r.getRenderTarget(),Mt=x.alphaTest>0,ht=x.clearcoat>0,ut=x.iridescence>0;return{isWebGL2:h,shaderID:W,shaderName:x.type,vertexShader:F,fragmentShader:J,defines:x.defines,customVertexShaderID:nt,customFragmentShaderID:it,isRawShaderMaterial:x.isRawShaderMaterial===!0,glslVersion:x.glslVersion,precision:m,instancing:q.isInstancedMesh===!0,instancingColor:q.isInstancedMesh===!0&&q.instanceColor!==null,supportsVertexTextures:u,outputEncoding:O===null?r.outputEncoding:O.isXRRenderTarget===!0?O.texture.encoding:vn,map:!!x.map,matcap:!!x.matcap,envMap:!!Y,envMapMode:Y&&Y.mapping,envMapCubeUVHeight:j,lightMap:!!x.lightMap,aoMap:!!x.aoMap,emissiveMap:!!x.emissiveMap,bumpMap:!!x.bumpMap,normalMap:!!x.normalMap,objectSpaceNormalMap:x.normalMapType===sl,tangentSpaceNormalMap:x.normalMapType===il,decodeVideoTexture:!!x.map&&x.map.isVideoTexture===!0&&x.map.encoding===zt,clearcoat:ht,clearcoatMap:ht&&!!x.clearcoatMap,clearcoatRoughnessMap:ht&&!!x.clearcoatRoughnessMap,clearcoatNormalMap:ht&&!!x.clearcoatNormalMap,iridescence:ut,iridescenceMap:ut&&!!x.iridescenceMap,iridescenceThicknessMap:ut&&!!x.iridescenceThicknessMap,displacementMap:!!x.displacementMap,roughnessMap:!!x.roughnessMap,metalnessMap:!!x.metalnessMap,specularMap:!!x.specularMap,specularIntensityMap:!!x.specularIntensityMap,specularColorMap:!!x.specularColorMap,opaque:x.transparent===!1&&x.blending===Gn,alphaMap:!!x.alphaMap,alphaTest:Mt,gradientMap:!!x.gradientMap,sheen:x.sheen>0,sheenColorMap:!!x.sheenColorMap,sheenRoughnessMap:!!x.sheenRoughnessMap,transmission:x.transmission>0,transmissionMap:!!x.transmissionMap,thicknessMap:!!x.thicknessMap,combine:x.combine,vertexTangents:!!x.normalMap&&!!R.attributes.tangent,vertexColors:x.vertexColors,vertexAlphas:x.vertexColors===!0&&!!R.attributes.color&&R.attributes.color.itemSize===4,vertexUvs:!!x.map||!!x.bumpMap||!!x.normalMap||!!x.specularMap||!!x.alphaMap||!!x.emissiveMap||!!x.roughnessMap||!!x.metalnessMap||!!x.clearcoatMap||!!x.clearcoatRoughnessMap||!!x.clearcoatNormalMap||!!x.iridescenceMap||!!x.iridescenceThicknessMap||!!x.displacementMap||!!x.transmissionMap||!!x.thicknessMap||!!x.specularIntensityMap||!!x.specularColorMap||!!x.sheenColorMap||!!x.sheenRoughnessMap,uvsVertexOnly:!(x.map||x.bumpMap||x.normalMap||x.specularMap||x.alphaMap||x.emissiveMap||x.roughnessMap||x.metalnessMap||x.clearcoatNormalMap||x.iridescenceMap||x.iridescenceThicknessMap||x.transmission>0||x.transmissionMap||x.thicknessMap||x.specularIntensityMap||x.specularColorMap||x.sheen>0||x.sheenColorMap||x.sheenRoughnessMap)&&!!x.displacementMap,fog:!!z,useFog:x.fog===!0,fogExp2:z&&z.isFogExp2,flatShading:!!x.flatShading,sizeAttenuation:x.sizeAttenuation,logarithmicDepthBuffer:f,skinning:q.isSkinnedMesh===!0,morphTargets:R.morphAttributes.position!==void 0,morphNormals:R.morphAttributes.normal!==void 0,morphColors:R.morphAttributes.color!==void 0,morphTargetsCount:Z,morphTextureStride:ft,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:x.dithering,shadowMapEnabled:r.shadowMap.enabled&&L.length>0,shadowMapType:r.shadowMap.type,toneMapping:x.toneMapped?r.toneMapping:We,physicallyCorrectLights:r.physicallyCorrectLights,premultipliedAlpha:x.premultipliedAlpha,doubleSided:x.side===tn,flipSided:x.side===ye,useDepthPacking:!!x.depthPacking,depthPacking:x.depthPacking||0,index0AttributeName:x.index0AttributeName,extensionDerivatives:x.extensions&&x.extensions.derivatives,extensionFragDepth:x.extensions&&x.extensions.fragDepth,extensionDrawBuffers:x.extensions&&x.extensions.drawBuffers,extensionShaderTextureLOD:x.extensions&&x.extensions.shaderTextureLOD,rendererExtensionFragDepth:h||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||n.has("EXT_shader_texture_lod"),customProgramCacheKey:x.customProgramCacheKey()}}function d(x){let S=[];if(x.shaderID?S.push(x.shaderID):(S.push(x.customVertexShaderID),S.push(x.customFragmentShaderID)),x.defines!==void 0)for(let L in x.defines)S.push(L),S.push(x.defines[L]);return x.isRawShaderMaterial===!1&&(v(S,x),T(S,x),S.push(r.outputEncoding)),S.push(x.customProgramCacheKey),S.join()}function v(x,S){x.push(S.precision),x.push(S.outputEncoding),x.push(S.envMapMode),x.push(S.envMapCubeUVHeight),x.push(S.combine),x.push(S.vertexUvs),x.push(S.fogExp2),x.push(S.sizeAttenuation),x.push(S.morphTargetsCount),x.push(S.morphAttributeCount),x.push(S.numDirLights),x.push(S.numPointLights),x.push(S.numSpotLights),x.push(S.numSpotLightMaps),x.push(S.numHemiLights),x.push(S.numRectAreaLights),x.push(S.numDirLightShadows),x.push(S.numPointLightShadows),x.push(S.numSpotLightShadows),x.push(S.numSpotLightShadowsWithMaps),x.push(S.shadowMapType),x.push(S.toneMapping),x.push(S.numClippingPlanes),x.push(S.numClipIntersection),x.push(S.depthPacking)}function T(x,S){a.disableAll(),S.isWebGL2&&a.enable(0),S.supportsVertexTextures&&a.enable(1),S.instancing&&a.enable(2),S.instancingColor&&a.enable(3),S.map&&a.enable(4),S.matcap&&a.enable(5),S.envMap&&a.enable(6),S.lightMap&&a.enable(7),S.aoMap&&a.enable(8),S.emissiveMap&&a.enable(9),S.bumpMap&&a.enable(10),S.normalMap&&a.enable(11),S.objectSpaceNormalMap&&a.enable(12),S.tangentSpaceNormalMap&&a.enable(13),S.clearcoat&&a.enable(14),S.clearcoatMap&&a.enable(15),S.clearcoatRoughnessMap&&a.enable(16),S.clearcoatNormalMap&&a.enable(17),S.iridescence&&a.enable(18),S.iridescenceMap&&a.enable(19),S.iridescenceThicknessMap&&a.enable(20),S.displacementMap&&a.enable(21),S.specularMap&&a.enable(22),S.roughnessMap&&a.enable(23),S.metalnessMap&&a.enable(24),S.gradientMap&&a.enable(25),S.alphaMap&&a.enable(26),S.alphaTest&&a.enable(27),S.vertexColors&&a.enable(28),S.vertexAlphas&&a.enable(29),S.vertexUvs&&a.enable(30),S.vertexTangents&&a.enable(31),S.uvsVertexOnly&&a.enable(32),x.push(a.mask),a.disableAll(),S.fog&&a.enable(0),S.useFog&&a.enable(1),S.flatShading&&a.enable(2),S.logarithmicDepthBuffer&&a.enable(3),S.skinning&&a.enable(4),S.morphTargets&&a.enable(5),S.morphNormals&&a.enable(6),S.morphColors&&a.enable(7),S.premultipliedAlpha&&a.enable(8),S.shadowMapEnabled&&a.enable(9),S.physicallyCorrectLights&&a.enable(10),S.doubleSided&&a.enable(11),S.flipSided&&a.enable(12),S.useDepthPacking&&a.enable(13),S.dithering&&a.enable(14),S.specularIntensityMap&&a.enable(15),S.specularColorMap&&a.enable(16),S.transmission&&a.enable(17),S.transmissionMap&&a.enable(18),S.thicknessMap&&a.enable(19),S.sheen&&a.enable(20),S.sheenColorMap&&a.enable(21),S.sheenRoughnessMap&&a.enable(22),S.decodeVideoTexture&&a.enable(23),S.opaque&&a.enable(24),x.push(a.mask)}function b(x){let S=_[x.type],L;if(S){let X=De[S];L=Il.clone(X.uniforms)}else L=x.uniforms;return L}function M(x,S){let L;for(let X=0,q=l.length;X0?n.push(v):m.transparent===!0?i.push(v):e.push(v)}function c(f,u,m,_,p,d){let v=o(f,u,m,_,p,d);m.transmission>0?n.unshift(v):m.transparent===!0?i.unshift(v):e.unshift(v)}function l(f,u){e.length>1&&e.sort(f||Vd),n.length>1&&n.sort(u||Ba),i.length>1&&i.sort(u||Ba)}function h(){for(let f=t,u=r.length;f=s.length?(o=new ka,s.push(o)):o=s[i],o}function e(){r=new WeakMap}return{get:t,dispose:e}}function Hd(){let r={};return{get:function(t){if(r[t.id]!==void 0)return r[t.id];let e;switch(t.type){case"DirectionalLight":e={direction:new N,color:new Ot};break;case"SpotLight":e={position:new N,direction:new N,color:new Ot,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new N,color:new Ot,distance:0,decay:0};break;case"HemisphereLight":e={direction:new N,skyColor:new Ot,groundColor:new Ot};break;case"RectAreaLight":e={color:new Ot,position:new N,halfWidth:new N,halfHeight:new N};break}return r[t.id]=e,e}}}function Wd(){let r={};return{get:function(t){if(r[t.id]!==void 0)return r[t.id];let e;switch(t.type){case"DirectionalLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nt};break;case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nt};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nt,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[t.id]=e,e}}}var Xd=0;function qd(r,t){return(t.castShadow?2:0)-(r.castShadow?2:0)+(t.map?1:0)-(r.map?1:0)}function Yd(r,t){let e=new Hd,n=Wd(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-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};for(let h=0;h<9;h++)i.probe.push(new N);let s=new N,o=new qt,a=new qt;function c(h,f){let u=0,m=0,_=0;for(let X=0;X<9;X++)i.probe[X].set(0,0,0);let p=0,d=0,v=0,T=0,b=0,M=0,A=0,C=0,I=0,x=0;h.sort(qd);let S=f!==!0?Math.PI:1;for(let X=0,q=h.length;X0&&(t.isWebGL2||r.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=et.LTC_FLOAT_1,i.rectAreaLTC2=et.LTC_FLOAT_2):r.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=et.LTC_HALF_1,i.rectAreaLTC2=et.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=u,i.ambient[1]=m,i.ambient[2]=_;let L=i.hash;(L.directionalLength!==p||L.pointLength!==d||L.spotLength!==v||L.rectAreaLength!==T||L.hemiLength!==b||L.numDirectionalShadows!==M||L.numPointShadows!==A||L.numSpotShadows!==C||L.numSpotMaps!==I)&&(i.directional.length=p,i.spot.length=v,i.rectArea.length=T,i.point.length=d,i.hemi.length=b,i.directionalShadow.length=M,i.directionalShadowMap.length=M,i.pointShadow.length=A,i.pointShadowMap.length=A,i.spotShadow.length=C,i.spotShadowMap.length=C,i.directionalShadowMatrix.length=M,i.pointShadowMatrix.length=A,i.spotLightMatrix.length=C+I-x,i.spotLightMap.length=I,i.numSpotLightShadowsWithMaps=x,L.directionalLength=p,L.pointLength=d,L.spotLength=v,L.rectAreaLength=T,L.hemiLength=b,L.numDirectionalShadows=M,L.numPointShadows=A,L.numSpotShadows=C,L.numSpotMaps=I,i.version=Xd++)}function l(h,f){let u=0,m=0,_=0,p=0,d=0,v=f.matrixWorldInverse;for(let T=0,b=h.length;T=a.length?(c=new Va(r,t),a.push(c)):c=a[o],c}function i(){e=new WeakMap}return{get:n,dispose:i}}var ar=class extends Jn{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=el,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}},or=class extends Jn{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.referencePosition=new N,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}},Jd=\`void main() { - gl_Position = vec4( position, 1.0 ); -}\`,$d=\`uniform sampler2D shadow_pass; -uniform vec2 resolution; -uniform float radius; -#include -void main() { - const float samples = float( VSM_SAMPLES ); - float mean = 0.0; - float squared_mean = 0.0; - float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); - float uvStart = samples <= 1.0 ? 0.0 : - 1.0; - for ( float i = 0.0; i < samples; i ++ ) { - float uvOffset = uvStart + i * uvStride; - #ifdef HORIZONTAL_PASS - vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); - mean += distribution.x; - squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; - #else - float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); - mean += depth; - squared_mean += depth * depth; - #endif - } - mean = mean / samples; - squared_mean = squared_mean / samples; - float std_dev = sqrt( squared_mean - mean * mean ); - gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}\`;function Kd(r,t,e){let n=new ts,i=new Nt,s=new Nt,o=new Xt,a=new ar({depthPacking:nl}),c=new or,l={},h=e.maxTextureSize,f={[nn]:ye,[ye]:nn,[tn]:tn},u=new Ze({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Nt},radius:{value:4}},vertexShader:Jd,fragmentShader:$d}),m=u.clone();m.defines.HORIZONTAL_PASS=1;let _=new Ye;_.setAttribute("position",new ce(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let p=new Ne(_,u),d=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Ga,this.render=function(M,A,C){if(d.enabled===!1||d.autoUpdate===!1&&d.needsUpdate===!1||M.length===0)return;let I=r.getRenderTarget(),x=r.getActiveCubeFace(),S=r.getActiveMipmapLevel(),L=r.state;L.setBlending(en),L.buffers.color.setClear(1,1,1,1),L.buffers.depth.setTest(!0),L.setScissorTest(!1);for(let X=0,q=M.length;Xh||i.y>h)&&(i.x>h&&(s.x=Math.floor(h/G.x),i.x=s.x*G.x,R.mapSize.x=s.x),i.y>h&&(s.y=Math.floor(h/G.y),i.y=s.y*G.y,R.mapSize.y=s.y)),R.map===null){let j=this.type!==li?{minFilter:ae,magFilter:ae}:{};R.map=new qe(i.x,i.y,j),R.map.texture.name=z.name+".shadowMap",R.camera.updateProjectionMatrix()}r.setRenderTarget(R.map),r.clear();let Y=R.getViewportCount();for(let j=0;j0||A.map&&A.alphaTest>0){let q=L.uuid,z=A.uuid,R=l[q];R===void 0&&(R={},l[q]=R);let G=R[z];G===void 0&&(G=L.clone(),R[z]=G),L=G}return L.visible=A.visible,L.wireframe=A.wireframe,S===li?L.side=A.shadowSide!==null?A.shadowSide:A.side:L.side=A.shadowSide!==null?A.shadowSide:f[A.side],L.alphaMap=A.alphaMap,L.alphaTest=A.alphaTest,L.map=A.map,L.clipShadows=A.clipShadows,L.clippingPlanes=A.clippingPlanes,L.clipIntersection=A.clipIntersection,L.displacementMap=A.displacementMap,L.displacementScale=A.displacementScale,L.displacementBias=A.displacementBias,L.wireframeLinewidth=A.wireframeLinewidth,L.linewidth=A.linewidth,C.isPointLight===!0&&L.isMeshDistanceMaterial===!0&&(L.referencePosition.setFromMatrixPosition(C.matrixWorld),L.nearDistance=I,L.farDistance=x),L}function b(M,A,C,I,x){if(M.visible===!1)return;if(M.layers.test(A.layers)&&(M.isMesh||M.isLine||M.isPoints)&&(M.castShadow||M.receiveShadow&&x===li)&&(!M.frustumCulled||n.intersectsObject(M))){M.modelViewMatrix.multiplyMatrices(C.matrixWorldInverse,M.matrixWorld);let X=t.update(M),q=M.material;if(Array.isArray(q)){let z=X.groups;for(let R=0,G=z.length;R=1):W.indexOf("OpenGL ES")!==-1&&(j=parseFloat(/^OpenGL ES (\\d)/.exec(W)[1]),Y=j>=2);let Q=null,Z={},ft=r.getParameter(3088),F=r.getParameter(2978),J=new Xt().fromArray(ft),nt=new Xt().fromArray(F);function it(E,U,$){let at=new Uint8Array(4),ct=r.createTexture();r.bindTexture(E,ct),r.texParameteri(E,10241,9728),r.texParameteri(E,10240,9728);for(let Lt=0;Lt<$;Lt++)r.texImage2D(U+Lt,0,6408,1,1,0,6408,5121,at);return ct}let O={};O[3553]=it(3553,3553,1),O[34067]=it(34067,34069,6),a.setClear(0,0,0,1),c.setClear(1),l.setClear(0),Mt(2929),c.setFunc(Gs),Qt(!1),Me(Pr),Mt(2884),ne(en);function Mt(E){u[E]!==!0&&(r.enable(E),u[E]=!0)}function ht(E){u[E]!==!1&&(r.disable(E),u[E]=!1)}function ut(E,U){return m[E]!==U?(r.bindFramebuffer(E,U),m[E]=U,n&&(E===36009&&(m[36160]=U),E===36160&&(m[36009]=U)),!0):!1}function ot(E,U){let $=p,at=!1;if(E)if($=_.get(U),$===void 0&&($=[],_.set(U,$)),E.isWebGLMultipleRenderTargets){let ct=E.texture;if($.length!==ct.length||$[0]!==36064){for(let Lt=0,$t=ct.length;Lt<$t;Lt++)$[Lt]=36064+Lt;$.length=ct.length,at=!0}}else $[0]!==36064&&($[0]=36064,at=!0);else $[0]!==1029&&($[0]=1029,at=!0);at&&(e.isWebGL2?r.drawBuffers($):t.get("WEBGL_draw_buffers").drawBuffersWEBGL($))}function Ft(E){return d!==E?(r.useProgram(E),d=E,!0):!1}let bt={[Bn]:32774,[po]:32778,[mo]:32779};if(n)bt[Dr]=32775,bt[Nr]=32776;else{let E=t.get("EXT_blend_minmax");E!==null&&(bt[Dr]=E.MIN_EXT,bt[Nr]=E.MAX_EXT)}let xt={[go]:0,[_o]:1,[xo]:768,[Ha]:770,[So]:776,[bo]:774,[vo]:772,[yo]:769,[Wa]:771,[wo]:775,[Mo]:773};function ne(E,U,$,at,ct,Lt,$t,te){if(E===en){v===!0&&(ht(3042),v=!1);return}if(v===!1&&(Mt(3042),v=!0),E!==fo){if(E!==T||te!==S){if((b!==Bn||C!==Bn)&&(r.blendEquation(32774),b=Bn,C=Bn),te)switch(E){case Gn:r.blendFuncSeparate(1,771,1,771);break;case Rr:r.blendFunc(1,1);break;case Lr:r.blendFuncSeparate(0,769,0,1);break;case Ir:r.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",E);break}else switch(E){case Gn:r.blendFuncSeparate(770,771,1,771);break;case Rr:r.blendFunc(770,1);break;case Lr:r.blendFuncSeparate(0,769,0,1);break;case Ir:r.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",E);break}M=null,A=null,I=null,x=null,T=E,S=te}return}ct=ct||U,Lt=Lt||$,$t=$t||at,(U!==b||ct!==C)&&(r.blendEquationSeparate(bt[U],bt[ct]),b=U,C=ct),($!==M||at!==A||Lt!==I||$t!==x)&&(r.blendFuncSeparate(xt[$],xt[at],xt[Lt],xt[$t]),M=$,A=at,I=Lt,x=$t),T=E,S=!1}function ve(E,U){E.side===tn?ht(2884):Mt(2884);let $=E.side===ye;U&&($=!$),Qt($),E.blending===Gn&&E.transparent===!1?ne(en):ne(E.blending,E.blendEquation,E.blendSrc,E.blendDst,E.blendEquationAlpha,E.blendSrcAlpha,E.blendDstAlpha,E.premultipliedAlpha),c.setFunc(E.depthFunc),c.setTest(E.depthTest),c.setMask(E.depthWrite),a.setMask(E.colorWrite);let at=E.stencilWrite;l.setTest(at),at&&(l.setMask(E.stencilWriteMask),l.setFunc(E.stencilFunc,E.stencilRef,E.stencilFuncMask),l.setOp(E.stencilFail,E.stencilZFail,E.stencilZPass)),Dt(E.polygonOffset,E.polygonOffsetFactor,E.polygonOffsetUnits),E.alphaToCoverage===!0?Mt(32926):ht(32926)}function Qt(E){L!==E&&(E?r.frontFace(2304):r.frontFace(2305),L=E)}function Me(E){E!==co?(Mt(2884),E!==X&&(E===Pr?r.cullFace(1029):E===ho?r.cullFace(1028):r.cullFace(1032))):ht(2884),X=E}function Ht(E){E!==q&&(Y&&r.lineWidth(E),q=E)}function Dt(E,U,$){E?(Mt(32823),(z!==U||R!==$)&&(r.polygonOffset(U,$),z=U,R=$)):ht(32823)}function Fe(E){E?Mt(3089):ht(3089)}function Te(E){E===void 0&&(E=33984+G-1),Q!==E&&(r.activeTexture(E),Q=E)}function w(E,U,$){$===void 0&&(Q===null?$=33984+G-1:$=Q);let at=Z[$];at===void 0&&(at={type:void 0,texture:void 0},Z[$]=at),(at.type!==E||at.texture!==U)&&(Q!==$&&(r.activeTexture($),Q=$),r.bindTexture(E,U||O[E]),at.type=E,at.texture=U)}function g(){let E=Z[Q];E!==void 0&&E.type!==void 0&&(r.bindTexture(E.type,null),E.type=void 0,E.texture=void 0)}function k(){try{r.compressedTexImage2D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function K(){try{r.compressedTexImage3D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function tt(){try{r.texSubImage2D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function st(){try{r.texSubImage3D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function yt(){try{r.compressedTexSubImage2D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function rt(){try{r.compressedTexSubImage3D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function H(){try{r.texStorage2D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function mt(){try{r.texStorage3D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function _t(){try{r.texImage2D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function lt(){try{r.texImage3D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function gt(E){J.equals(E)===!1&&(r.scissor(E.x,E.y,E.z,E.w),J.copy(E))}function dt(E){nt.equals(E)===!1&&(r.viewport(E.x,E.y,E.z,E.w),nt.copy(E))}function Pt(E,U){let $=f.get(U);$===void 0&&($=new WeakMap,f.set(U,$));let at=$.get(E);at===void 0&&(at=r.getUniformBlockIndex(U,E.name),$.set(E,at))}function Ut(E,U){let at=f.get(U).get(E);h.get(U)!==at&&(r.uniformBlockBinding(U,at,E.__bindingPointIndex),h.set(U,at))}function Jt(){r.disable(3042),r.disable(2884),r.disable(2929),r.disable(32823),r.disable(3089),r.disable(2960),r.disable(32926),r.blendEquation(32774),r.blendFunc(1,0),r.blendFuncSeparate(1,0,1,0),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0),r.depthMask(!0),r.depthFunc(513),r.clearDepth(1),r.stencilMask(4294967295),r.stencilFunc(519,0,4294967295),r.stencilOp(7680,7680,7680),r.clearStencil(0),r.cullFace(1029),r.frontFace(2305),r.polygonOffset(0,0),r.activeTexture(33984),r.bindFramebuffer(36160,null),n===!0&&(r.bindFramebuffer(36009,null),r.bindFramebuffer(36008,null)),r.useProgram(null),r.lineWidth(1),r.scissor(0,0,r.canvas.width,r.canvas.height),r.viewport(0,0,r.canvas.width,r.canvas.height),u={},Q=null,Z={},m={},_=new WeakMap,p=[],d=null,v=!1,T=null,b=null,M=null,A=null,C=null,I=null,x=null,S=!1,L=null,X=null,q=null,z=null,R=null,J.set(0,0,r.canvas.width,r.canvas.height),nt.set(0,0,r.canvas.width,r.canvas.height),a.reset(),c.reset(),l.reset()}return{buffers:{color:a,depth:c,stencil:l},enable:Mt,disable:ht,bindFramebuffer:ut,drawBuffers:ot,useProgram:Ft,setBlending:ne,setMaterial:ve,setFlipSided:Qt,setCullFace:Me,setLineWidth:Ht,setPolygonOffset:Dt,setScissorTest:Fe,activeTexture:Te,bindTexture:w,unbindTexture:g,compressedTexImage2D:k,compressedTexImage3D:K,texImage2D:_t,texImage3D:lt,updateUBOMapping:Pt,uniformBlockBinding:Ut,texStorage2D:H,texStorage3D:mt,texSubImage2D:tt,texSubImage3D:st,compressedTexSubImage2D:yt,compressedTexSubImage3D:rt,scissor:gt,viewport:dt,reset:Jt}}function Qd(r,t,e,n,i,s,o){let a=i.isWebGL2,c=i.maxTextures,l=i.maxCubemapSize,h=i.maxTextureSize,f=i.maxSamples,u=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,m=typeof navigator=="undefined"?!1:/OculusBrowser/g.test(navigator.userAgent),_=new WeakMap,p,d=new WeakMap,v=!1;try{v=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch(w){}function T(w,g){return v?new OffscreenCanvas(w,g):Wi("canvas")}function b(w,g,k,K){let tt=1;if((w.width>K||w.height>K)&&(tt=K/Math.max(w.width,w.height)),tt<1||g===!0)if(typeof HTMLImageElement!="undefined"&&w instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&w instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&w instanceof ImageBitmap){let st=g?Hi:Math.floor,yt=st(tt*w.width),rt=st(tt*w.height);p===void 0&&(p=T(yt,rt));let H=k?T(yt,rt):p;return H.width=yt,H.height=rt,H.getContext("2d").drawImage(w,0,0,yt,rt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+w.width+"x"+w.height+") to ("+yt+"x"+rt+")."),H}else return"data"in w&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+w.width+"x"+w.height+")."),w;return w}function M(w){return Zs(w.width)&&Zs(w.height)}function A(w){return a?!1:w.wrapS!==Pe||w.wrapT!==Pe||w.minFilter!==ae&&w.minFilter!==Se}function C(w,g){return w.generateMipmaps&&g&&w.minFilter!==ae&&w.minFilter!==Se}function I(w){r.generateMipmap(w)}function x(w,g,k,K,tt=!1){if(a===!1)return g;if(w!==null){if(r[w]!==void 0)return r[w];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+w+"'")}let st=g;return g===6403&&(k===5126&&(st=33326),k===5131&&(st=33325),k===5121&&(st=33321)),g===33319&&(k===5126&&(st=33328),k===5131&&(st=33327),k===5121&&(st=33323)),g===6408&&(k===5126&&(st=34836),k===5131&&(st=34842),k===5121&&(st=K===zt&&tt===!1?35907:32856),k===32819&&(st=32854),k===32820&&(st=32855)),(st===33325||st===33326||st===33327||st===33328||st===34842||st===34836)&&t.get("EXT_color_buffer_float"),st}function S(w,g,k){return C(w,k)===!0||w.isFramebufferTexture&&w.minFilter!==ae&&w.minFilter!==Se?Math.log2(Math.max(g.width,g.height))+1:w.mipmaps!==void 0&&w.mipmaps.length>0?w.mipmaps.length:w.isCompressedTexture&&Array.isArray(w.image)?g.mipmaps.length:1}function L(w){return w===ae||w===Fr||w===us?9728:9729}function X(w){let g=w.target;g.removeEventListener("dispose",X),z(g),g.isVideoTexture&&_.delete(g)}function q(w){let g=w.target;g.removeEventListener("dispose",q),G(g)}function z(w){let g=n.get(w);if(g.__webglInit===void 0)return;let k=w.source,K=d.get(k);if(K){let tt=K[g.__cacheKey];tt.usedTimes--,tt.usedTimes===0&&R(w),Object.keys(K).length===0&&d.delete(k)}n.remove(w)}function R(w){let g=n.get(w);r.deleteTexture(g.__webglTexture);let k=w.source,K=d.get(k);delete K[g.__cacheKey],o.memory.textures--}function G(w){let g=w.texture,k=n.get(w),K=n.get(g);if(K.__webglTexture!==void 0&&(r.deleteTexture(K.__webglTexture),o.memory.textures--),w.depthTexture&&w.depthTexture.dispose(),w.isWebGLCubeRenderTarget)for(let tt=0;tt<6;tt++)r.deleteFramebuffer(k.__webglFramebuffer[tt]),k.__webglDepthbuffer&&r.deleteRenderbuffer(k.__webglDepthbuffer[tt]);else{if(r.deleteFramebuffer(k.__webglFramebuffer),k.__webglDepthbuffer&&r.deleteRenderbuffer(k.__webglDepthbuffer),k.__webglMultisampledFramebuffer&&r.deleteFramebuffer(k.__webglMultisampledFramebuffer),k.__webglColorRenderbuffer)for(let tt=0;tt=c&&console.warn("THREE.WebGLTextures: Trying to use "+w+" texture units while this GPU supports only "+c),Y+=1,w}function Q(w){let g=[];return g.push(w.wrapS),g.push(w.wrapT),g.push(w.wrapR||0),g.push(w.magFilter),g.push(w.minFilter),g.push(w.anisotropy),g.push(w.internalFormat),g.push(w.format),g.push(w.type),g.push(w.generateMipmaps),g.push(w.premultiplyAlpha),g.push(w.flipY),g.push(w.unpackAlignment),g.push(w.encoding),g.join()}function Z(w,g){let k=n.get(w);if(w.isVideoTexture&&Fe(w),w.isRenderTargetTexture===!1&&w.version>0&&k.__version!==w.version){let K=w.image;if(K===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(K.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ht(k,w,g);return}}e.bindTexture(3553,k.__webglTexture,33984+g)}function ft(w,g){let k=n.get(w);if(w.version>0&&k.__version!==w.version){ht(k,w,g);return}e.bindTexture(35866,k.__webglTexture,33984+g)}function F(w,g){let k=n.get(w);if(w.version>0&&k.__version!==w.version){ht(k,w,g);return}e.bindTexture(32879,k.__webglTexture,33984+g)}function J(w,g){let k=n.get(w);if(w.version>0&&k.__version!==w.version){ut(k,w,g);return}e.bindTexture(34067,k.__webglTexture,33984+g)}let nt={[Xs]:10497,[Pe]:33071,[qs]:33648},it={[ae]:9728,[Fr]:9984,[us]:9986,[Se]:9729,[Bo]:9985,[pi]:9987};function O(w,g,k){if(k?(r.texParameteri(w,10242,nt[g.wrapS]),r.texParameteri(w,10243,nt[g.wrapT]),(w===32879||w===35866)&&r.texParameteri(w,32882,nt[g.wrapR]),r.texParameteri(w,10240,it[g.magFilter]),r.texParameteri(w,10241,it[g.minFilter])):(r.texParameteri(w,10242,33071),r.texParameteri(w,10243,33071),(w===32879||w===35866)&&r.texParameteri(w,32882,33071),(g.wrapS!==Pe||g.wrapT!==Pe)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),r.texParameteri(w,10240,L(g.magFilter)),r.texParameteri(w,10241,L(g.minFilter)),g.minFilter!==ae&&g.minFilter!==Se&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),t.has("EXT_texture_filter_anisotropic")===!0){let K=t.get("EXT_texture_filter_anisotropic");if(g.magFilter===ae||g.minFilter!==us&&g.minFilter!==pi||g.type===gn&&t.has("OES_texture_float_linear")===!1||a===!1&&g.type===mi&&t.has("OES_texture_half_float_linear")===!1)return;(g.anisotropy>1||n.get(g).__currentAnisotropy)&&(r.texParameterf(w,K.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(g.anisotropy,i.getMaxAnisotropy())),n.get(g).__currentAnisotropy=g.anisotropy)}}function Mt(w,g){let k=!1;w.__webglInit===void 0&&(w.__webglInit=!0,g.addEventListener("dispose",X));let K=g.source,tt=d.get(K);tt===void 0&&(tt={},d.set(K,tt));let st=Q(g);if(st!==w.__cacheKey){tt[st]===void 0&&(tt[st]={texture:r.createTexture(),usedTimes:0},o.memory.textures++,k=!0),tt[st].usedTimes++;let yt=tt[w.__cacheKey];yt!==void 0&&(tt[w.__cacheKey].usedTimes--,yt.usedTimes===0&&R(g)),w.__cacheKey=st,w.__webglTexture=tt[st].texture}return k}function ht(w,g,k){let K=3553;(g.isDataArrayTexture||g.isCompressedArrayTexture)&&(K=35866),g.isData3DTexture&&(K=32879);let tt=Mt(w,g),st=g.source;e.bindTexture(K,w.__webglTexture,33984+k);let yt=n.get(st);if(st.version!==yt.__version||tt===!0){e.activeTexture(33984+k),r.pixelStorei(37440,g.flipY),r.pixelStorei(37441,g.premultiplyAlpha),r.pixelStorei(3317,g.unpackAlignment),r.pixelStorei(37443,0);let rt=A(g)&&M(g.image)===!1,H=b(g.image,rt,!1,h);H=Te(g,H);let mt=M(H)||a,_t=s.convert(g.format,g.encoding),lt=s.convert(g.type),gt=x(g.internalFormat,_t,lt,g.encoding,g.isVideoTexture);O(K,g,mt);let dt,Pt=g.mipmaps,Ut=a&&g.isVideoTexture!==!0,Jt=yt.__version===void 0||tt===!0,E=S(g,H,mt);if(g.isDepthTexture)gt=6402,a?g.type===gn?gt=36012:g.type===mn?gt=33190:g.type===Hn?gt=35056:gt=33189:g.type===gn&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),g.format===_n&>===6402&&g.type!==Ya&&g.type!==mn&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),g.type=mn,lt=s.convert(g.type)),g.format===Yn&>===6402&&(gt=34041,g.type!==Hn&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),g.type=Hn,lt=s.convert(g.type))),Jt&&(Ut?e.texStorage2D(3553,1,gt,H.width,H.height):e.texImage2D(3553,0,gt,H.width,H.height,0,_t,lt,null));else if(g.isDataTexture)if(Pt.length>0&&mt){Ut&&Jt&&e.texStorage2D(3553,E,gt,Pt[0].width,Pt[0].height);for(let U=0,$=Pt.length;U<$;U++)dt=Pt[U],Ut?e.texSubImage2D(3553,U,0,0,dt.width,dt.height,_t,lt,dt.data):e.texImage2D(3553,U,gt,dt.width,dt.height,0,_t,lt,dt.data);g.generateMipmaps=!1}else Ut?(Jt&&e.texStorage2D(3553,E,gt,H.width,H.height),e.texSubImage2D(3553,0,0,0,H.width,H.height,_t,lt,H.data)):e.texImage2D(3553,0,gt,H.width,H.height,0,_t,lt,H.data);else if(g.isCompressedTexture)if(g.isCompressedArrayTexture){Ut&&Jt&&e.texStorage3D(35866,E,gt,Pt[0].width,Pt[0].height,H.depth);for(let U=0,$=Pt.length;U<$;U++)dt=Pt[U],g.format!==Re?_t!==null?Ut?e.compressedTexSubImage3D(35866,U,0,0,0,dt.width,dt.height,H.depth,_t,dt.data,0,0):e.compressedTexImage3D(35866,U,gt,dt.width,dt.height,H.depth,0,dt.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Ut?e.texSubImage3D(35866,U,0,0,0,dt.width,dt.height,H.depth,_t,lt,dt.data):e.texImage3D(35866,U,gt,dt.width,dt.height,H.depth,0,_t,lt,dt.data)}else{Ut&&Jt&&e.texStorage2D(3553,E,gt,Pt[0].width,Pt[0].height);for(let U=0,$=Pt.length;U<$;U++)dt=Pt[U],g.format!==Re?_t!==null?Ut?e.compressedTexSubImage2D(3553,U,0,0,dt.width,dt.height,_t,dt.data):e.compressedTexImage2D(3553,U,gt,dt.width,dt.height,0,dt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Ut?e.texSubImage2D(3553,U,0,0,dt.width,dt.height,_t,lt,dt.data):e.texImage2D(3553,U,gt,dt.width,dt.height,0,_t,lt,dt.data)}else if(g.isDataArrayTexture)Ut?(Jt&&e.texStorage3D(35866,E,gt,H.width,H.height,H.depth),e.texSubImage3D(35866,0,0,0,0,H.width,H.height,H.depth,_t,lt,H.data)):e.texImage3D(35866,0,gt,H.width,H.height,H.depth,0,_t,lt,H.data);else if(g.isData3DTexture)Ut?(Jt&&e.texStorage3D(32879,E,gt,H.width,H.height,H.depth),e.texSubImage3D(32879,0,0,0,0,H.width,H.height,H.depth,_t,lt,H.data)):e.texImage3D(32879,0,gt,H.width,H.height,H.depth,0,_t,lt,H.data);else if(g.isFramebufferTexture){if(Jt)if(Ut)e.texStorage2D(3553,E,gt,H.width,H.height);else{let U=H.width,$=H.height;for(let at=0;at>=1,$>>=1}}else if(Pt.length>0&&mt){Ut&&Jt&&e.texStorage2D(3553,E,gt,Pt[0].width,Pt[0].height);for(let U=0,$=Pt.length;U<$;U++)dt=Pt[U],Ut?e.texSubImage2D(3553,U,0,0,_t,lt,dt):e.texImage2D(3553,U,gt,_t,lt,dt);g.generateMipmaps=!1}else Ut?(Jt&&e.texStorage2D(3553,E,gt,H.width,H.height),e.texSubImage2D(3553,0,0,0,_t,lt,H)):e.texImage2D(3553,0,gt,_t,lt,H);C(g,mt)&&I(K),yt.__version=st.version,g.onUpdate&&g.onUpdate(g)}w.__version=g.version}function ut(w,g,k){if(g.image.length!==6)return;let K=Mt(w,g),tt=g.source;e.bindTexture(34067,w.__webglTexture,33984+k);let st=n.get(tt);if(tt.version!==st.__version||K===!0){e.activeTexture(33984+k),r.pixelStorei(37440,g.flipY),r.pixelStorei(37441,g.premultiplyAlpha),r.pixelStorei(3317,g.unpackAlignment),r.pixelStorei(37443,0);let yt=g.isCompressedTexture||g.image[0].isCompressedTexture,rt=g.image[0]&&g.image[0].isDataTexture,H=[];for(let U=0;U<6;U++)!yt&&!rt?H[U]=b(g.image[U],!1,!0,l):H[U]=rt?g.image[U].image:g.image[U],H[U]=Te(g,H[U]);let mt=H[0],_t=M(mt)||a,lt=s.convert(g.format,g.encoding),gt=s.convert(g.type),dt=x(g.internalFormat,lt,gt,g.encoding),Pt=a&&g.isVideoTexture!==!0,Ut=st.__version===void 0||K===!0,Jt=S(g,mt,_t);O(34067,g,_t);let E;if(yt){Pt&&Ut&&e.texStorage2D(34067,Jt,dt,mt.width,mt.height);for(let U=0;U<6;U++){E=H[U].mipmaps;for(let $=0;$0&&Jt++,e.texStorage2D(34067,Jt,dt,H[0].width,H[0].height));for(let U=0;U<6;U++)if(rt){Pt?e.texSubImage2D(34069+U,0,0,0,H[U].width,H[U].height,lt,gt,H[U].data):e.texImage2D(34069+U,0,dt,H[U].width,H[U].height,0,lt,gt,H[U].data);for(let $=0;$=34069&&tt<=34074)&&r.framebufferTexture2D(36160,K,tt,n.get(k).__webglTexture,0),e.bindFramebuffer(36160,null)}function Ft(w,g,k){if(r.bindRenderbuffer(36161,w),g.depthBuffer&&!g.stencilBuffer){let K=33189;if(k||Dt(g)){let tt=g.depthTexture;tt&&tt.isDepthTexture&&(tt.type===gn?K=36012:tt.type===mn&&(K=33190));let st=Ht(g);Dt(g)?u.renderbufferStorageMultisampleEXT(36161,st,K,g.width,g.height):r.renderbufferStorageMultisample(36161,st,K,g.width,g.height)}else r.renderbufferStorage(36161,K,g.width,g.height);r.framebufferRenderbuffer(36160,36096,36161,w)}else if(g.depthBuffer&&g.stencilBuffer){let K=Ht(g);k&&Dt(g)===!1?r.renderbufferStorageMultisample(36161,K,35056,g.width,g.height):Dt(g)?u.renderbufferStorageMultisampleEXT(36161,K,35056,g.width,g.height):r.renderbufferStorage(36161,34041,g.width,g.height),r.framebufferRenderbuffer(36160,33306,36161,w)}else{let K=g.isWebGLMultipleRenderTargets===!0?g.texture:[g.texture];for(let tt=0;tt0&&Dt(w)===!1){let rt=st?g:[g];k.__webglMultisampledFramebuffer=r.createFramebuffer(),k.__webglColorRenderbuffer=[],e.bindFramebuffer(36160,k.__webglMultisampledFramebuffer);for(let H=0;H0&&Dt(w)===!1){let g=w.isWebGLMultipleRenderTargets?w.texture:[w.texture],k=w.width,K=w.height,tt=16384,st=[],yt=w.stencilBuffer?33306:36096,rt=n.get(w),H=w.isWebGLMultipleRenderTargets===!0;if(H)for(let mt=0;mt0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&g.__useRenderToTexture!==!1}function Fe(w){let g=o.render.frame;_.get(w)!==g&&(_.set(w,g),w.update())}function Te(w,g){let k=w.encoding,K=w.format,tt=w.type;return w.isCompressedTexture===!0||w.isVideoTexture===!0||w.format===Ys||k!==vn&&(k===zt?a===!1?t.has("EXT_sRGB")===!0&&K===Re?(w.format=Ys,w.minFilter=Se,w.generateMipmaps=!1):g=Xi.sRGBToLinear(g):(K!==Re||tt!==yn)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",k)),g}this.allocateTextureUnit=W,this.resetTextureUnits=j,this.setTexture2D=Z,this.setTexture2DArray=ft,this.setTexture3D=F,this.setTextureCube=J,this.rebindTextures=ne,this.setupRenderTarget=ve,this.updateRenderTargetMipmap=Qt,this.updateMultisampleRenderTarget=Me,this.setupDepthRenderbuffer=xt,this.setupFrameBufferTexture=ot,this.useMultisampledRTT=Dt}function tf(r,t,e){let n=e.isWebGL2;function i(s,o=null){let a;if(s===yn)return 5121;if(s===Ho)return 32819;if(s===Wo)return 32820;if(s===ko)return 5120;if(s===Vo)return 5122;if(s===Ya)return 5123;if(s===Go)return 5124;if(s===mn)return 5125;if(s===gn)return 5126;if(s===mi)return n?5131:(a=t.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===Xo)return 6406;if(s===Re)return 6408;if(s===qo)return 6409;if(s===Yo)return 6410;if(s===_n)return 6402;if(s===Yn)return 34041;if(s===Ys)return a=t.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===Zo)return 6403;if(s===Jo)return 36244;if(s===$o)return 33319;if(s===Ko)return 33320;if(s===jo)return 36249;if(s===ds||s===fs||s===ps||s===ms)if(o===zt)if(a=t.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===ds)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===fs)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===ps)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===ms)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=t.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===ds)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===fs)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===ps)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===ms)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===zr||s===Or||s===Ur||s===Br)if(a=t.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===zr)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===Or)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===Ur)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===Br)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===Qo)return a=t.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===kr||s===Vr)if(a=t.get("WEBGL_compressed_texture_etc"),a!==null){if(s===kr)return o===zt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===Vr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===Gr||s===Hr||s===Wr||s===Xr||s===qr||s===Yr||s===Zr||s===Jr||s===$r||s===Kr||s===jr||s===Qr||s===ta||s===ea)if(a=t.get("WEBGL_compressed_texture_astc"),a!==null){if(s===Gr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===Hr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===Wr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===Xr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===qr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===Yr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===Zr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===Jr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===$r)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===Kr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===jr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===Qr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===ta)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===ea)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===gs)if(a=t.get("EXT_texture_compression_bptc"),a!==null){if(s===gs)return o===zt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(s===tl||s===na||s===ia||s===sa)if(a=t.get("EXT_texture_compression_rgtc"),a!==null){if(s===gs)return a.COMPRESSED_RED_RGTC1_EXT;if(s===na)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===ia)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===sa)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===Hn?n?34042:(a=t.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):r[s]!==void 0?r[s]:null}return{convert:i}}var lr=class extends _e{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}},Vn=class extends de{constructor(){super(),this.isGroup=!0,this.type="Group"}},ef={type:"move"},fi=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Vn,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 Vn,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new N,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new N),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Vn,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new N,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new N),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){let e=this._hand;if(e)for(let n of t.hand.values())this._getHandJoint(e,n)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,e,n){let i=null,s=null,o=null,a=this._targetRay,c=this._grip,l=this._hand;if(t&&e.session.visibilityState!=="visible-blurred"){if(l&&t.hand){o=!0;for(let p of t.hand.values()){let d=e.getJointPose(p,n),v=this._getHandJoint(l,p);d!==null&&(v.matrix.fromArray(d.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.jointRadius=d.radius),v.visible=d!==null}let h=l.joints["index-finger-tip"],f=l.joints["thumb-tip"],u=h.position.distanceTo(f.position),m=.02,_=.005;l.inputState.pinching&&u>m+_?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&u<=m-_&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else c!==null&&t.gripSpace&&(s=e.getPose(t.gripSpace,n),s!==null&&(c.matrix.fromArray(s.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),s.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(s.linearVelocity)):c.hasLinearVelocity=!1,s.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(s.angularVelocity)):c.hasAngularVelocity=!1));a!==null&&(i=e.getPose(t.targetRaySpace,n),i===null&&s!==null&&(i=s),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(ef)))}return a!==null&&(a.visible=i!==null),c!==null&&(c.visible=s!==null),l!==null&&(l.visible=o!==null),this}_getHandJoint(t,e){if(t.joints[e.jointName]===void 0){let n=new Vn;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}},cr=class extends le{constructor(t,e,n,i,s,o,a,c,l,h){if(h=h!==void 0?h:_n,h!==_n&&h!==Yn)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&h===_n&&(n=mn),n===void 0&&h===Yn&&(n=Hn),super(null,i,s,o,a,c,h,n,l),this.isDepthTexture=!0,this.image={width:t,height:e},this.magFilter=a!==void 0?a:ae,this.minFilter=c!==void 0?c:ae,this.flipY=!1,this.generateMipmaps=!1}},hr=class extends sn{constructor(t,e){super();let n=this,i=null,s=1,o=null,a="local-floor",c=1,l=null,h=null,f=null,u=null,m=null,_=null,p=e.getContextAttributes(),d=null,v=null,T=[],b=[],M=new Set,A=new Map,C=new _e;C.layers.enable(1),C.viewport=new Xt;let I=new _e;I.layers.enable(2),I.viewport=new Xt;let x=[C,I],S=new lr;S.layers.enable(1),S.layers.enable(2);let L=null,X=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(F){let J=T[F];return J===void 0&&(J=new fi,T[F]=J),J.getTargetRaySpace()},this.getControllerGrip=function(F){let J=T[F];return J===void 0&&(J=new fi,T[F]=J),J.getGripSpace()},this.getHand=function(F){let J=T[F];return J===void 0&&(J=new fi,T[F]=J),J.getHandSpace()};function q(F){let J=b.indexOf(F.inputSource);if(J===-1)return;let nt=T[J];nt!==void 0&&nt.dispatchEvent({type:F.type,data:F.inputSource})}function z(){i.removeEventListener("select",q),i.removeEventListener("selectstart",q),i.removeEventListener("selectend",q),i.removeEventListener("squeeze",q),i.removeEventListener("squeezestart",q),i.removeEventListener("squeezeend",q),i.removeEventListener("end",z),i.removeEventListener("inputsourceschange",R);for(let F=0;F=0&&(b[it]=null,T[it].disconnect(nt))}for(let J=0;J=b.length){b.push(nt),it=Mt;break}else if(b[Mt]===null){b[Mt]=nt,it=Mt;break}if(it===-1)break}let O=T[it];O&&O.connect(nt)}}let G=new N,Y=new N;function j(F,J,nt){G.setFromMatrixPosition(J.matrixWorld),Y.setFromMatrixPosition(nt.matrixWorld);let it=G.distanceTo(Y),O=J.projectionMatrix.elements,Mt=nt.projectionMatrix.elements,ht=O[14]/(O[10]-1),ut=O[14]/(O[10]+1),ot=(O[9]+1)/O[5],Ft=(O[9]-1)/O[5],bt=(O[8]-1)/O[0],xt=(Mt[8]+1)/Mt[0],ne=ht*bt,ve=ht*xt,Qt=it/(-bt+xt),Me=Qt*-bt;J.matrixWorld.decompose(F.position,F.quaternion,F.scale),F.translateX(Me),F.translateZ(Qt),F.matrixWorld.compose(F.position,F.quaternion,F.scale),F.matrixWorldInverse.copy(F.matrixWorld).invert();let Ht=ht+Qt,Dt=ut+Qt,Fe=ne-Me,Te=ve+(it-Me),w=ot*ut/Dt*Ht,g=Ft*ut/Dt*Ht;F.projectionMatrix.makePerspective(Fe,Te,w,g,Ht,Dt)}function W(F,J){J===null?F.matrixWorld.copy(F.matrix):F.matrixWorld.multiplyMatrices(J.matrixWorld,F.matrix),F.matrixWorldInverse.copy(F.matrixWorld).invert()}this.updateCamera=function(F){if(i===null)return;S.near=I.near=C.near=F.near,S.far=I.far=C.far=F.far,(L!==S.near||X!==S.far)&&(i.updateRenderState({depthNear:S.near,depthFar:S.far}),L=S.near,X=S.far);let J=F.parent,nt=S.cameras;W(S,J);for(let O=0;OO&&(A.set(it,it.lastChangedTime),n.dispatchEvent({type:"planechanged",data:it}))}}_=null}let ft=new ja;ft.setAnimationLoop(Z),this.setAnimationLoop=function(F){Q=F},this.dispose=function(){}}};function nf(r,t){function e(p,d){d.color.getRGB(p.fogColor.value,Ka(r)),d.isFog?(p.fogNear.value=d.near,p.fogFar.value=d.far):d.isFogExp2&&(p.fogDensity.value=d.density)}function n(p,d,v,T,b){d.isMeshBasicMaterial||d.isMeshLambertMaterial?i(p,d):d.isMeshToonMaterial?(i(p,d),h(p,d)):d.isMeshPhongMaterial?(i(p,d),l(p,d)):d.isMeshStandardMaterial?(i(p,d),f(p,d),d.isMeshPhysicalMaterial&&u(p,d,b)):d.isMeshMatcapMaterial?(i(p,d),m(p,d)):d.isMeshDepthMaterial?i(p,d):d.isMeshDistanceMaterial?(i(p,d),_(p,d)):d.isMeshNormalMaterial?i(p,d):d.isLineBasicMaterial?(s(p,d),d.isLineDashedMaterial&&o(p,d)):d.isPointsMaterial?a(p,d,v,T):d.isSpriteMaterial?c(p,d):d.isShadowMaterial?(p.color.value.copy(d.color),p.opacity.value=d.opacity):d.isShaderMaterial&&(d.uniformsNeedUpdate=!1)}function i(p,d){p.opacity.value=d.opacity,d.color&&p.diffuse.value.copy(d.color),d.emissive&&p.emissive.value.copy(d.emissive).multiplyScalar(d.emissiveIntensity),d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===ye&&(p.bumpScale.value*=-1)),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias),d.emissiveMap&&(p.emissiveMap.value=d.emissiveMap),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===ye&&p.normalScale.value.negate()),d.specularMap&&(p.specularMap.value=d.specularMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let v=t.get(d).envMap;if(v&&(p.envMap.value=v,p.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,p.reflectivity.value=d.reflectivity,p.ior.value=d.ior,p.refractionRatio.value=d.refractionRatio),d.lightMap){p.lightMap.value=d.lightMap;let M=r.physicallyCorrectLights!==!0?Math.PI:1;p.lightMapIntensity.value=d.lightMapIntensity*M}d.aoMap&&(p.aoMap.value=d.aoMap,p.aoMapIntensity.value=d.aoMapIntensity);let T;d.map?T=d.map:d.specularMap?T=d.specularMap:d.displacementMap?T=d.displacementMap:d.normalMap?T=d.normalMap:d.bumpMap?T=d.bumpMap:d.roughnessMap?T=d.roughnessMap:d.metalnessMap?T=d.metalnessMap:d.alphaMap?T=d.alphaMap:d.emissiveMap?T=d.emissiveMap:d.clearcoatMap?T=d.clearcoatMap:d.clearcoatNormalMap?T=d.clearcoatNormalMap:d.clearcoatRoughnessMap?T=d.clearcoatRoughnessMap:d.iridescenceMap?T=d.iridescenceMap:d.iridescenceThicknessMap?T=d.iridescenceThicknessMap:d.specularIntensityMap?T=d.specularIntensityMap:d.specularColorMap?T=d.specularColorMap:d.transmissionMap?T=d.transmissionMap:d.thicknessMap?T=d.thicknessMap:d.sheenColorMap?T=d.sheenColorMap:d.sheenRoughnessMap&&(T=d.sheenRoughnessMap),T!==void 0&&(T.isWebGLRenderTarget&&(T=T.texture),T.matrixAutoUpdate===!0&&T.updateMatrix(),p.uvTransform.value.copy(T.matrix));let b;d.aoMap?b=d.aoMap:d.lightMap&&(b=d.lightMap),b!==void 0&&(b.isWebGLRenderTarget&&(b=b.texture),b.matrixAutoUpdate===!0&&b.updateMatrix(),p.uv2Transform.value.copy(b.matrix))}function s(p,d){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity}function o(p,d){p.dashSize.value=d.dashSize,p.totalSize.value=d.dashSize+d.gapSize,p.scale.value=d.scale}function a(p,d,v,T){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity,p.size.value=d.size*v,p.scale.value=T*.5,d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let b;d.map?b=d.map:d.alphaMap&&(b=d.alphaMap),b!==void 0&&(b.matrixAutoUpdate===!0&&b.updateMatrix(),p.uvTransform.value.copy(b.matrix))}function c(p,d){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity,p.rotation.value=d.rotation,d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let v;d.map?v=d.map:d.alphaMap&&(v=d.alphaMap),v!==void 0&&(v.matrixAutoUpdate===!0&&v.updateMatrix(),p.uvTransform.value.copy(v.matrix))}function l(p,d){p.specular.value.copy(d.specular),p.shininess.value=Math.max(d.shininess,1e-4)}function h(p,d){d.gradientMap&&(p.gradientMap.value=d.gradientMap)}function f(p,d){p.roughness.value=d.roughness,p.metalness.value=d.metalness,d.roughnessMap&&(p.roughnessMap.value=d.roughnessMap),d.metalnessMap&&(p.metalnessMap.value=d.metalnessMap),t.get(d).envMap&&(p.envMapIntensity.value=d.envMapIntensity)}function u(p,d,v){p.ior.value=d.ior,d.sheen>0&&(p.sheenColor.value.copy(d.sheenColor).multiplyScalar(d.sheen),p.sheenRoughness.value=d.sheenRoughness,d.sheenColorMap&&(p.sheenColorMap.value=d.sheenColorMap),d.sheenRoughnessMap&&(p.sheenRoughnessMap.value=d.sheenRoughnessMap)),d.clearcoat>0&&(p.clearcoat.value=d.clearcoat,p.clearcoatRoughness.value=d.clearcoatRoughness,d.clearcoatMap&&(p.clearcoatMap.value=d.clearcoatMap),d.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=d.clearcoatRoughnessMap),d.clearcoatNormalMap&&(p.clearcoatNormalScale.value.copy(d.clearcoatNormalScale),p.clearcoatNormalMap.value=d.clearcoatNormalMap,d.side===ye&&p.clearcoatNormalScale.value.negate())),d.iridescence>0&&(p.iridescence.value=d.iridescence,p.iridescenceIOR.value=d.iridescenceIOR,p.iridescenceThicknessMinimum.value=d.iridescenceThicknessRange[0],p.iridescenceThicknessMaximum.value=d.iridescenceThicknessRange[1],d.iridescenceMap&&(p.iridescenceMap.value=d.iridescenceMap),d.iridescenceThicknessMap&&(p.iridescenceThicknessMap.value=d.iridescenceThicknessMap)),d.transmission>0&&(p.transmission.value=d.transmission,p.transmissionSamplerMap.value=v.texture,p.transmissionSamplerSize.value.set(v.width,v.height),d.transmissionMap&&(p.transmissionMap.value=d.transmissionMap),p.thickness.value=d.thickness,d.thicknessMap&&(p.thicknessMap.value=d.thicknessMap),p.attenuationDistance.value=d.attenuationDistance,p.attenuationColor.value.copy(d.attenuationColor)),p.specularIntensity.value=d.specularIntensity,p.specularColor.value.copy(d.specularColor),d.specularIntensityMap&&(p.specularIntensityMap.value=d.specularIntensityMap),d.specularColorMap&&(p.specularColorMap.value=d.specularColorMap)}function m(p,d){d.matcap&&(p.matcap.value=d.matcap)}function _(p,d){p.referencePosition.value.copy(d.referencePosition),p.nearDistance.value=d.nearDistance,p.farDistance.value=d.farDistance}return{refreshFogUniforms:e,refreshMaterialUniforms:n}}function sf(r,t,e,n){let i={},s={},o=[],a=e.isWebGL2?r.getParameter(35375):0;function c(T,b){let M=b.program;n.uniformBlockBinding(T,M)}function l(T,b){let M=i[T.id];M===void 0&&(_(T),M=h(T),i[T.id]=M,T.addEventListener("dispose",d));let A=b.program;n.updateUBOMapping(T,A);let C=t.render.frame;s[T.id]!==C&&(u(T),s[T.id]=C)}function h(T){let b=f();T.__bindingPointIndex=b;let M=r.createBuffer(),A=T.__size,C=T.usage;return r.bindBuffer(35345,M),r.bufferData(35345,A,C),r.bindBuffer(35345,null),r.bindBufferBase(35345,b,M),M}function f(){for(let T=0;T0){C=M%A;let q=A-C;C!==0&&q-L.boundary<0&&(M+=A-C,S.__offset=M)}M+=L.storage}return C=M%A,C>0&&(M+=A-C),T.__size=M,T.__cache={},this}function p(T){let b={boundary:0,storage:0};return typeof T=="number"?(b.boundary=4,b.storage=4):T.isVector2?(b.boundary=8,b.storage=8):T.isVector3||T.isColor?(b.boundary=16,b.storage=12):T.isVector4?(b.boundary=16,b.storage=16):T.isMatrix3?(b.boundary=48,b.storage=48):T.isMatrix4?(b.boundary=64,b.storage=64):T.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",T),b}function d(T){let b=T.target;b.removeEventListener("dispose",d);let M=o.indexOf(b.__bindingPointIndex);o.splice(M,1),r.deleteBuffer(i[b.id]),delete i[b.id],delete s[b.id]}function v(){for(let T in i)r.deleteBuffer(i[T]);o=[],i={},s={}}return{bind:c,update:l,dispose:v}}function rf(){let r=Wi("canvas");return r.style.display="block",r}function af(r={}){this.isWebGLRenderer=!0;let t=r.canvas!==void 0?r.canvas:rf(),e=r.context!==void 0?r.context:null,n=r.depth!==void 0?r.depth:!0,i=r.stencil!==void 0?r.stencil:!0,s=r.antialias!==void 0?r.antialias:!1,o=r.premultipliedAlpha!==void 0?r.premultipliedAlpha:!0,a=r.preserveDrawingBuffer!==void 0?r.preserveDrawingBuffer:!1,c=r.powerPreference!==void 0?r.powerPreference:"default",l=r.failIfMajorPerformanceCaveat!==void 0?r.failIfMajorPerformanceCaveat:!1,h;e!==null?h=e.getContextAttributes().alpha:h=r.alpha!==void 0?r.alpha:!1;let f=null,u=null,m=[],_=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=vn,this.physicallyCorrectLights=!1,this.toneMapping=We,this.toneMappingExposure=1;let p=this,d=!1,v=0,T=0,b=null,M=-1,A=null,C=new Xt,I=new Xt,x=null,S=t.width,L=t.height,X=1,q=null,z=null,R=new Xt(0,0,S,L),G=new Xt(0,0,S,L),Y=!1,j=new ts,W=!1,Q=!1,Z=null,ft=new qt,F=new Nt,J=new N,nt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function it(){return b===null?X:1}let O=e;function Mt(y,D){for(let B=0;B0?u=_[_.length-1]:u=null,m.pop(),m.length>0?f=m[m.length-1]:f=null};function $t(y,D,B,P){if(y.visible===!1)return;if(y.layers.test(D.layers)){if(y.isGroup)B=y.renderOrder;else if(y.isLOD)y.autoUpdate===!0&&y.update(D);else if(y.isLight)u.pushLight(y),y.castShadow&&u.pushShadow(y);else if(y.isSprite){if(!y.frustumCulled||j.intersectsSprite(y)){P&&J.setFromMatrixPosition(y.matrixWorld).applyMatrix4(ft);let vt=Ht.update(y),St=y.material;St.visible&&f.push(y,vt,St,B,J.z,null)}}else if((y.isMesh||y.isLine||y.isPoints)&&(y.isSkinnedMesh&&y.skeleton.frame!==Ft.render.frame&&(y.skeleton.update(),y.skeleton.frame=Ft.render.frame),!y.frustumCulled||j.intersectsObject(y))){P&&J.setFromMatrixPosition(y.matrixWorld).applyMatrix4(ft);let vt=Ht.update(y),St=y.material;if(Array.isArray(St)){let Tt=vt.groups;for(let Rt=0,At=Tt.length;Rt0&&an(V,D,B),P&&ot.viewport(C.copy(P)),V.length>0&&Bt(V,D,B),pt.length>0&&Bt(pt,D,B),vt.length>0&&Bt(vt,D,B),ot.buffers.depth.setTest(!0),ot.buffers.depth.setMask(!0),ot.buffers.color.setMask(!0),ot.setPolygonOffset(!1)}function an(y,D,B){let P=ut.isWebGL2;Z===null&&(Z=new qe(1,1,{generateMipmaps:!0,type:ht.has("EXT_color_buffer_half_float")?mi:yn,minFilter:pi,samples:P&&s===!0?4:0})),p.getDrawingBufferSize(F),P?Z.setSize(F.x,F.y):Z.setSize(Hi(F.x),Hi(F.y));let V=p.getRenderTarget();p.setRenderTarget(Z),p.clear();let pt=p.toneMapping;p.toneMapping=We,Bt(y,D,B),p.toneMapping=pt,xt.updateMultisampleRenderTarget(Z),xt.updateRenderTargetMipmap(Z),p.setRenderTarget(V)}function Bt(y,D,B){let P=D.isScene===!0?D.overrideMaterial:null;for(let V=0,pt=y.length;V0&&xt.useMultisampledRTT(y)===!1?V=bt.get(y).__webglMultisampledFramebuffer:V=At,C.copy(y.viewport),I.copy(y.scissor),x=y.scissorTest}else C.copy(R).multiplyScalar(X).floor(),I.copy(G).multiplyScalar(X).floor(),x=Y;if(ot.bindFramebuffer(36160,V)&&ut.drawBuffers&&P&&ot.drawBuffers(y,V),ot.viewport(C),ot.scissor(I),ot.setScissorTest(x),pt){let Tt=bt.get(y.texture);O.framebufferTexture2D(36160,36064,34069+D,Tt.__webglTexture,B)}else if(vt){let Tt=bt.get(y.texture),Rt=D||0;O.framebufferTextureLayer(36160,36064,Tt.__webglTexture,B||0,Rt)}M=-1},this.readRenderTargetPixels=function(y,D,B,P,V,pt,vt){if(!(y&&y.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let St=bt.get(y).__webglFramebuffer;if(y.isWebGLCubeRenderTarget&&vt!==void 0&&(St=St[vt]),St){ot.bindFramebuffer(36160,St);try{let Tt=y.texture,Rt=Tt.format,At=Tt.type;if(Rt!==Re&&rt.convert(Rt)!==O.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let Et=At===mi&&(ht.has("EXT_color_buffer_half_float")||ut.isWebGL2&&ht.has("EXT_color_buffer_float"));if(At!==yn&&rt.convert(At)!==O.getParameter(35738)&&!(At===gn&&(ut.isWebGL2||ht.has("OES_texture_float")||ht.has("WEBGL_color_buffer_float")))&&!Et){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}D>=0&&D<=y.width-P&&B>=0&&B<=y.height-V&&O.readPixels(D,B,P,V,rt.convert(Rt),rt.convert(At),pt)}finally{let Tt=b!==null?bt.get(b).__webglFramebuffer:null;ot.bindFramebuffer(36160,Tt)}}},this.copyFramebufferToTexture=function(y,D,B=0){let P=Math.pow(2,-B),V=Math.floor(D.image.width*P),pt=Math.floor(D.image.height*P);xt.setTexture2D(D,0),O.copyTexSubImage2D(3553,B,0,0,y.x,y.y,V,pt),ot.unbindTexture()},this.copyTextureToTexture=function(y,D,B,P=0){let V=D.image.width,pt=D.image.height,vt=rt.convert(B.format),St=rt.convert(B.type);xt.setTexture2D(B,0),O.pixelStorei(37440,B.flipY),O.pixelStorei(37441,B.premultiplyAlpha),O.pixelStorei(3317,B.unpackAlignment),D.isDataTexture?O.texSubImage2D(3553,P,y.x,y.y,V,pt,vt,St,D.image.data):D.isCompressedTexture?O.compressedTexSubImage2D(3553,P,y.x,y.y,D.mipmaps[0].width,D.mipmaps[0].height,vt,D.mipmaps[0].data):O.texSubImage2D(3553,P,y.x,y.y,vt,St,D.image),P===0&&B.generateMipmaps&&O.generateMipmap(3553),ot.unbindTexture()},this.copyTextureToTexture3D=function(y,D,B,P,V=0){if(p.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let pt=y.max.x-y.min.x+1,vt=y.max.y-y.min.y+1,St=y.max.z-y.min.z+1,Tt=rt.convert(P.format),Rt=rt.convert(P.type),At;if(P.isData3DTexture)xt.setTexture3D(P,0),At=32879;else if(P.isDataArrayTexture)xt.setTexture2DArray(P,0),At=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}O.pixelStorei(37440,P.flipY),O.pixelStorei(37441,P.premultiplyAlpha),O.pixelStorei(3317,P.unpackAlignment);let Et=O.getParameter(3314),kt=O.getParameter(32878),fe=O.getParameter(3316),Oe=O.getParameter(3315),on=O.getParameter(32877),Vt=B.isCompressedTexture?B.mipmaps[0]:B.image;O.pixelStorei(3314,Vt.width),O.pixelStorei(32878,Vt.height),O.pixelStorei(3316,y.min.x),O.pixelStorei(3315,y.min.y),O.pixelStorei(32877,y.min.z),B.isDataTexture||B.isData3DTexture?O.texSubImage3D(At,V,D.x,D.y,D.z,pt,vt,St,Tt,Rt,Vt.data):B.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),O.compressedTexSubImage3D(At,V,D.x,D.y,D.z,pt,vt,St,Tt,Vt.data)):O.texSubImage3D(At,V,D.x,D.y,D.z,pt,vt,St,Tt,Rt,Vt),O.pixelStorei(3314,Et),O.pixelStorei(32878,kt),O.pixelStorei(3316,fe),O.pixelStorei(3315,Oe),O.pixelStorei(32877,on),V===0&&P.generateMipmaps&&O.generateMipmap(At),ot.unbindTexture()},this.initTexture=function(y){y.isCubeTexture?xt.setTextureCube(y,0):y.isData3DTexture?xt.setTexture3D(y,0):y.isDataArrayTexture||y.isCompressedArrayTexture?xt.setTexture2DArray(y,0):xt.setTexture2D(y,0),ot.unbindTexture()},this.resetState=function(){v=0,T=0,b=null,ot.reset(),H.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}var ur=class extends af{};ur.prototype.isWebGL1Renderer=!0;function Qe(r,t,e){return io(r)?new r.constructor(r.subarray(t,e!==void 0?e:r.length)):r.slice(t,e)}function Ui(r,t,e){return!r||!e&&r.constructor===t?r:typeof t.BYTES_PER_ELEMENT=="number"?new t(r):Array.prototype.slice.call(r)}function io(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}var Kn=class{constructor(t,e,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new e.constructor(n),this.sampleValues=e,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){let e=this.parameterPositions,n=this._cachedIndex,i=e[n],s=e[n-1];n:{t:{let o;e:{i:if(!(t=s)){let a=e[1];t=s)break t}o=n,n=0;break e}break n}for(;n>>1;te;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);let a=this.getValueSize();this.times=Qe(n,s,o),this.values=Qe(this.values,s*a,o*a)}return this}validate(){let t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let n=this.times,i=this.values,s=n.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let o=null;for(let a=0;a!==s;a++){let c=n[a];if(typeof c=="number"&&isNaN(c)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,c),t=!1;break}if(o!==null&&o>c){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,c,o),t=!1;break}o=c}if(i!==void 0&&io(i))for(let a=0,c=i.length;a!==c;++a){let l=i[a];if(isNaN(l)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,l),t=!1;break}}return t}optimize(){let t=Qe(this.times),e=Qe(this.values),n=this.getValueSize(),i=this.getInterpolation()===_s,s=t.length-1,o=1;for(let a=1;a0){t[o]=t[s];for(let a=s*n,c=o*n,l=0;l!==n;++l)e[c+l]=e[a+l];++o}return o!==t.length?(this.times=Qe(t,0,o),this.values=Qe(e,0,o*n)):(this.times=t,this.values=e),this}clone(){let t=Qe(this.times,0),e=Qe(this.values,0),n=this.constructor,i=new n(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}};Le.prototype.TimeBufferType=Float32Array;Le.prototype.ValueBufferType=Float32Array;Le.prototype.DefaultInterpolation=Vi;var wn=class extends Le{};wn.prototype.ValueTypeName="bool";wn.prototype.ValueBufferType=Array;wn.prototype.DefaultInterpolation=ki;wn.prototype.InterpolantFactoryMethodLinear=void 0;wn.prototype.InterpolantFactoryMethodSmooth=void 0;var mr=class extends Le{};mr.prototype.ValueTypeName="color";var gr=class extends Le{};gr.prototype.ValueTypeName="number";var _r=class extends Kn{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,c=(n-e)/(i-e),l=t*a;for(let h=l+a;l!==h;l+=4)rn.slerpFlat(s,0,o,l-a,o,l,c);return s}},yi=class extends Le{InterpolantFactoryMethodLinear(t){return new _r(this.times,this.values,this.getValueSize(),t)}};yi.prototype.ValueTypeName="quaternion";yi.prototype.DefaultInterpolation=Vi;yi.prototype.InterpolantFactoryMethodSmooth=void 0;var Sn=class extends Le{};Sn.prototype.ValueTypeName="string";Sn.prototype.ValueBufferType=Array;Sn.prototype.DefaultInterpolation=ki;Sn.prototype.InterpolantFactoryMethodLinear=void 0;Sn.prototype.InterpolantFactoryMethodSmooth=void 0;var xr=class extends Le{};xr.prototype.ValueTypeName="vector";var wr="\\\\[\\\\]\\\\.:\\\\/",of=new RegExp("["+wr+"]","g"),Sr="[^"+wr+"]",lf="[^"+wr.replace("\\\\.","")+"]",cf=/((?:WC+[\\/:])*)/.source.replace("WC",Sr),hf=/(WCOD+)?/.source.replace("WCOD",lf),uf=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",Sr),df=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",Sr),ff=new RegExp("^"+cf+hf+uf+df+"$"),pf=["material","materials","bones","map"],yr=class{constructor(t,e,n){let i=n||It.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}getValue(t,e){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(t,e)}setValue(t,e){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=n.length;i!==s;++i)n[i].setValue(t,e)}bind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},It=class{constructor(t,e,n){this.path=e,this.parsedPath=n||It.parseTrackName(e),this.node=It.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new It.Composite(t,e,n):new It(t,e,n)}static sanitizeNodeName(t){return t.replace(/\\s/g,"_").replace(of,"")}static parseTrackName(t){let e=ff.exec(t);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let s=n.nodeName.substring(i+1);pf.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){let n=t.skeleton.getBoneByName(e);if(n!==void 0)return n}if(t.children){let n=function(s){for(let o=0;oMath.round(S*a);if(d[0]=\`\${x(A.x)}, \${x(A.y)}, \${x(A.z)}\`,d[1]=\`\${x(C.x)}, \${x(C.y)}, \${x(C.z)}\`,d[2]=\`\${x(I.x)}, \${x(I.y)}, \${x(I.z)}\`,!(d[0]===d[1]||d[1]===d[2]||d[2]===d[0]))for(let S=0;S<3;S++){let L=(S+1)%3,X=d[S],q=d[L],z=as[p[S]],R=as[p[L]],G=\`\${X}_\${q}\`,Y=\`\${q}_\${X}\`;Y in v&&v[Y]?(Tr.dot(v[Y].normal)<=c&&(T.push(z.x,z.y,z.z),T.push(R.x,R.y,R.z)),v[Y]=null):G in v||(v[G]={index0:_[S],index1:_[L],normal:Tr.clone()})}}for(let M in v)if(v[M]){let{index0:A,index1:C}=v[M];ss.fromBufferAttribute(u,A),rs.fromBufferAttribute(u,C),T.push(ss.x,ss.y,ss.z),T.push(rs.x,rs.y,rs.z)}let b=new self[h](T);so.postMessage({id:e,vertices:b},[b.buffer])}}); -/*! Bundled license information: - -three/build/three.module.js: - (** - * @license - * Copyright 2010-2023 Three.js Authors - * SPDX-License-Identifier: MIT - *) -*/ -`)}var MC=class{constructor(){this.worker=new bB;this.geometries=new Map;this.loadedGeometries=new Map;this.jobCount=0;this.init()}add(r,e){this.geometries.set(r,e),this.jobCount++}get(r){return this.geometries.get(r)}init(){this.worker.addEventListener("message",r=>{let e=this.geometries.get(r.data.id.toString());(e==null?void 0:e.length)>0&&(e.forEach(i=>{i!=null&&i.geometry&&(i!=null&&i.matrix)&&(i!=null&&i.geom)&&(i!=null&&i.line)&&(i.geom.parameters={geometry:i.geometry,thresholdAngle:5},i.geom.setAttribute("position",new ct(r.data.vertices,3)),i.geom.applyMatrix4(i.matrix),i.line.geometry=i.geom,i.line.visible=!0)}),this.geometries.delete(r.data.id.toString()),this.jobCount--),this.loadedGeometries.set(r.data.id.toString(),r.data.vertices)})}postMessage(r){this.worker.postMessage(JSON.stringify(r))}};var Fp=new MC,Vvt=new A(0,1,0),jg=class{static resetObjectStyle(r){this.revertWireframeMode(r),this.revertObjectOpacity(r,[]),this.revertAppliedMaterialToObject(r),this.revertVisibleForFloors(r)}static resetObjectStyleById(r,e){let i=this.getObjectById(r,e);this.resetObjectStyle(i)}static setObjectOpacity(r,e=.3,i,n){let s=[],a=l=>{s.find(c=>c.id===l.id)||(s.push({id:l.id,opacity:l.opacity,transparent:l.transparent,side:l.side}),l.opacity*=e,l.transparent=!0,l.side=wi)},o=l=>{let c=s.find(u=>u.id===l.id);if(!c){let u=l.clone();return s.push({id:l.id,opacity:l.opacity,transparent:l.transparent,side:l.side,material:l,clonedMaterial:u}),u.opacity*=e,u.transparent=!0,u}return c.clonedMaterial};return r.traverse(l=>{if(!(n&&n.indexOf(l.id)!==-1)&&!(i&&i.indexOf(l.id)===-1)&&l instanceof Je){let c=l;if(i||n){if(Array.isArray(c.material)){let u=[];c.material.forEach(h=>{let p=o(h);p&&u.push(p)}),c.material=u}else if(c.material){let u=o(c.material);u&&(c.material=u)}}else if(Array.isArray(c.material))c.material.forEach(u=>{a(u)});else if(c.material){let u=c.material;a(u)}}}),s}static revertObjectOpacity(r,e,i,n){let s=o=>{let l=e.find(c=>c.id===o.id);l&&(o.opacity=l.opacity,o.transparent=l.transparent,o.side=l.side)},a=o=>{let l=e.find(c=>c.clonedMaterial&&c.clonedMaterial.id===o.id);if(l)return l.material};r.traverse(o=>{if(!(n&&n.indexOf(o.id)!==-1)&&!(i&&i.indexOf(o.id)===-1)&&o instanceof Je){if(Array.isArray(o.material)){let l=[];o.material.forEach(c=>{let u=a(c);u?l.push(u):s(c)}),o.material=l}else if(o.material){let l=a(o.material);l?o.material=l:s(o.material)}}})}static setObjectOpacityById(r,e,i=.3,n,s){let a=r.getObjectById(e);if(!a)throw new Error(`Failed to find object by id: ${e}`);return jg.setObjectOpacity(a,i,n,s)}static revertObjectOpacityById(r,e,i,n,s){let a=r.getObjectById(e);if(!a)throw new Error(`Failed to find object by id: ${e}`);jg.revertObjectOpacity(a,i,n,s)}static applyMaterialToObject(r,e,i,n){r.traverse(s=>{n&&n.indexOf(s.id)!==-1||i&&i.indexOf(s.id)===-1||s instanceof Je&&(s.userData.originalMaterial||(s.userData.originalMaterial=s.material),s.material=e)})}static revertAppliedMaterialToObject(r,e,i){r.traverse(n=>{i&&i.indexOf(n.id)!==-1||e&&e.indexOf(n.id)===-1||n.userData.originalMaterial&&(n.material=n.userData.originalMaterial,n.userData.originalMaterial=void 0)})}static applyMaterialToObjectById(r,e,i,n,s){let a=r.getObjectById(e);if(!a)throw new Error(`Failed to find object by id: ${e}`);this.applyMaterialToObject(a,i,n,s)}static revertAppliedMaterialToObjectById(r,e,i,n){let s=r.getObjectById(e);if(!s)throw new Error(`Failed to find object by id: ${e}`);this.revertAppliedMaterialToObject(s,i,n)}static applyOpacityMaterialToObject(r,e,i){let n={color:0,transparent:!0,opacity:.05},s=new or(n);this.applyMaterialToObject(r,s,e,i)}static setWireframeMode(r){let e=new or({color:16732160,wireframe:!0,transparent:!0,opacity:.8});r.traverseVisible(i=>{if(i instanceof Je){let n=i;n.userData.materialForWireframe=n.material,n.material=e}})}static setWireframeModeById(r,e){let i=r.getObjectById(e);if(!i)throw new Error(`Failed to find object by id: ${e}`);jg.setWireframeMode(i)}static revertWireframeMode(r){r.traverseVisible(e=>{e instanceof Je&&e.userData.materialForWireframe&&(e.material=e.userData.materialForWireframe,e.userData.materialForWireframe=void 0)})}static revertWireframeModeById(r,e){let i=r.getObjectById(e);if(!i)throw new Error(`Failed to find object by id: ${e}`);jg.revertWireframeMode(i)}static findInner(r,e,i=[],n=!1){let s=e.toLowerCase(),a=[],o=u=>u.toLowerCase().indexOf(s)!==-1,l=u=>u.toString().indexOf(s)!==-1,c=u=>{if(u.name&&u.name.toLowerCase().indexOf(s)!==-1)return!0;if(u.gltfExtensions){let h=u.gltfExtensions,p=h.objectId&&h.objectId.Value||h.elementId&&h.elementId.Value;if(p&&p.toLowerCase().indexOf(s)!==-1)return!0}return!1};if(i.length>0)for(let u=0;u{(o(d.name)||l(d.id)||c(d.userData))&&a.push(d)}),n&&a.length>0)return[a[0]]}else if(r.traverse(u=>{(o(u.name)||l(u.id)||c(u.userData))&&a.push(u)}),n&&a.length>0)return[a[0]];return a}static find(r,e,i=[],n=!1){return this.findInner(r,e,i,n)}static findFirst(r,e,i=[],n=!1){let s=this.findInner(r,e,i,n);if(s.length>0)return s[0]}static getFloorsFromString(r){let e=[],n=new RegExp(/(?:-?(?:\d+(?:\.5)?)F)(?=\W|$)/,"g").exec(r);return n&&n.length>0&&n.forEach(s=>{if(s){let a=s.replace("F",""),o=Number(a);o?e.push(o):console.log(`[OU] invalid floor: ${s}`)}}),e}static matchFloor(r,e){return this.getFloorsFromString(r).findIndex(s=>s===e)!==-1}static matchFloors(r,e){return this.getFloorsFromString(r).findIndex(s=>e.findIndex(o=>o===s)!==-1)!==-1}static distinctFloors(r,e){let i=[],n=s=>{this.getFloorsFromString(s).forEach(o=>{i[o]=!0})};return e.forEach(s=>{let a=r.getObjectById(s);a&&a.traverse(o=>{if(n(o.name),o.userData.gltfExtensions){let l=o.userData.gltfExtensions;l.level&&l.level.Value&&n(l.level.Value)}})}),Object.keys(i).sort()}static traverseObjectByFloors(r,e,i,n,s){let a=r.getObjectById(e);if(!a)return[];a.traverse(o=>{let l=this.matchFloors(o.name,i);if(!l&&o.userData&&o.userData.gltfExtensions){let c=o.userData.gltfExtensions;c.level&&c.level.Value&&(l=this.matchFloors(c.level.Value,i))}l&&n&&n(o),!l&&s&&s(o)})}static setVisibleForFloors(r,e,i,n=!0){this.traverseObjectByFloors(r,e,i,s=>{let a=s;for(;a;)a.visible=!0,a=a.parent||void 0},s=>{n&&(s.visible=!1)})}static revertVisibleForFloors(r){r.traverse(e=>{e.visible=!0})}static revertVisibleForFloorsById(r,e){let i=this.getObjectById(r,e);this.revertVisibleForFloors(i)}static getObjectById(r,e){let i=r.getObjectById(e);if(!i)throw new Error(`Failed to find object by id: ${e}`);return i}static createOutlines(r,e={visibleOnly:!0,meshOnly:!0,replaceOriginalObject:!1}){if(!r)return[];if(r.children.length===0&&(e.visibleOnly&&!r.visible||e.meshOnly&&!(r instanceof Je)))return[];let i=r,n=i.children.length;for(let a=n-1;a>=0;--a){let o=i.children[a];this.createOutlines(o,e).forEach(c=>c.applyMatrix4(i.matrixWorld))}if(!i.geometry)return[];let s=[];if(i instanceof tn)for(let a=0;a=0;--e){let i=r.children[e];i.children.length>0&&this.removeOutlines(i),i.userData.isOutline&&r.remove(i)}}static hasOutline(r){let e=!1;for(let i=0;i0&&(e=this.hasOutline(n),e))break}return e}static setOutlinesVisibility(r,e){r.traverse(i=>{i.userData.isOutline&&(i.visible=e)})}static createOutline(r,e,i=this.OUTLINE_MATERIAL){let n=new Ip,s=new oi(n,i);if(s.layers.set(11),s.userData.isOutline=!0,s.matrixAutoUpdate=!1,s.visible=!1,s.updateMatrix(),Fp.loadedGeometries.has(r.id.toString())){let a=Fp.loadedGeometries.get(r.id.toString());return n.parameters={geometry:r,thresholdAngle:5},n.setAttribute("position",new ct(a,3)),n.applyMatrix4(e),s.geometry=n,s.visible=!0,s}if(Fp.get(r.id.toString())||Fp.add(r.id.toString(),[]),!Fp.loadedGeometries.has(r.id.toString())){Fp.add(r.id.toString(),Fp.get(r.id.toString()).concat([{geometry:r,matrix:e,geom:n,line:s}]));let a=r.getAttribute("position");Fp.postMessage({id:r.id,position:a.toJSON(),index:r.getIndex(),thresholdAngle:5})}return s}static createOutlineSync(r,e,i=this.OUTLINE_MATERIAL){let n=new Ip(r,5),s=new oi(n,i);return s.layers.set(11),s.userData.isOutline=!0,s.matrixAutoUpdate=!1,s.applyMatrix4(e),s}static cloneObject(r,e=!0){let i=r.clone();return e&&i.traverse(n=>{(n instanceof Je||n instanceof _r)&&(n.material=Cs.cloneMaterial(n.material))}),i}static createBox(r,e,i,n=jg.BOX_FACE_MATERIAL,s=!0){let a=[],o=(u,h,p)=>{a.push(new A(u,h,p))};o(0,0,0),o(r,0,0),o(r,e,0),o(0,e,0),o(0,0,i),o(r,0,i),o(r,e,i),o(0,e,i);let l=new it;l.setFromPoints(a);let c=[0,3,2,0,2,1,4,6,7,4,5,6,0,7,3,0,4,7,3,6,2,3,7,6,1,6,5,1,2,6];return s&&c.push(0,5,4,0,1,5),l.setIndex(c),l.computeVertexNormals(),new Je(l,n)}static rebaseObjectOnRTC(r){let e=r;if(!(e.isMesh||e.isLine||e.isPoints)||!e.geometry||!(e.geometry instanceof it))return r;let i=e.geometry;if(!i.hasAttribute("position"))return r;let n=i.getAttribute("position");if(n.count===0)return r;let s=n.itemSize,a=n.array,o=[];for(let u=0;u2?o[2]:0);let c=r.matrixAutoUpdate;return r.matrixAutoUpdate=!1,r.applyMatrix4(l),r.matrixAutoUpdate=c,r}static isEmptyObject(r){if(r.children.length===0){let i=r.geometry;if(!i||!i.hasAttribute("position")||i.getAttribute("position").count===0)return!0}return!1}static removeEmptyObjects(r){for(let e=0;e{i.removeFromParent()}),this.removeEmptyObjects(e))}static setSharedVariablesOfObject(r){r.uuid="",r.up=Vvt}static isLeafObject(r){return!(r instanceof Je)&&!(r instanceof _r)&&!(r instanceof rn)?!1:!(r.children.length>0||!r.geometry)}},Qr=jg;Qr.OUTLINE_MATERIAL=new Tr({name:"outline",color:0,transparent:!0,opacity:.2}),Qr.BOX_FACE_MATERIAL=new Ts({color:11648971,transparent:!0,opacity:.3,side:en});var DC=new Ue,zvt=new Ue,CC=class{static resetMergeInfo(){this.mergeInfo.removedObjects=0,this.mergeInfo.mergedMeshes=0,this.mergeInfo.mergedLines=0,this.mergeInfo.mergedPoints=0,this.mergeInfo.mergedUnknownTypeObjects=0,this.mergeInfo.elapsedTime=0}static merge(r,e=!0){let i=Date.now();this.mergeInner(r,e),this.mergeInfo.elapsedTime+=Date.now()-i}static mergeInner(r,e=!0){if(!r.children||r.children.length<1)return;let i=r.children.length,n={},s=[];for(let u=0;u0){this.mergeInner(h,e);continue}if(h.userData.relativeToCenter||h.isInstancedMesh||!h.geometry||!(h.geometry instanceof it))continue;let d=!1,f=Object.values(n);for(let m=f.length-1;m>=0;--m){let g=f[m].indexes[0];if(d=this.tryHandleMergeableObjects(r,u,g,n,s),d)break}for(let m=s.length-1;!d&&m>=0;--m){let g=s[m];if(d=this.tryHandleMergeableObjects(r,u,g,n,s),d)break}d||s.push(u)}if(Object.keys(n).length<=0)return;let a=[],o=[],l=[],c=[];Object.values(n).forEach(u=>{let h=u.indexes,p=r.children[h[0]],d=[],f=0,m=0,g=0,y=[];if(h.forEach(b=>{var D,P,_;let x=r.children[b],S=x.geometry.clone();if(S.applyMatrix4(x.matrix),Wt.tryConvertInterleavedBufferAttributes(S),S.userData.isLineSegments=x.isLineSegments===!0,d.push(S),e){let w=(P=(D=S.attributes)==null?void 0:D.position)==null?void 0:P.count,F=((_=S.index)==null?void 0:_.count)||0;y.push({batchId:f,positionStart:m,positionCount:w,indexStart:g,indexCount:F}),m+=w,g+=F,f++}}),d.length===0)return;let E;if(p.isMesh){let b=qo(d);if(!b)return;b.userData={},E=new Je(b,p.material),a.push(E)}else if(p.isLine){let b=this.mergeLineGeometries(d,e,p.material instanceof Rp||p.material instanceof Yt,y);if(!b)return;E=new oi(b,p.material),o.push(E)}else if(p.isPoints){let b=qo(d);if(!b)return;b.userData={},E=new rn(b,p.material),l.push(E)}E&&(e?E.userData.batches=y:E.userData=p.userData,E.userData.layerName=p.userData.layerName,E.name=`[Merged] ${p.name}`,E.matrixAutoUpdate=!1,E.renderOrder=p.renderOrder,E.layers=p.layers,E.visible=p.visible,c.push(...h)),d.forEach(b=>{Wt.releaseGeometryManually(b)}),d=[]}),c.sort((u,h)=>h-u),c.forEach(u=>{let h=r.children[u];r.remove(h)}),[...a,...o,...l].forEach(u=>{r.add(u)}),r.updateMatrix(),this.mergeInfo.removedObjects+=c.length,this.mergeInfo.mergedMeshes+=a.length,this.mergeInfo.mergedLines+=o.length,this.mergeInfo.mergedPoints+=l.length}static tryHandleMergeableObjects(r,e,i,n,s){let a=!1,o=Array.isArray(r),l=o?r.length:r.children.length;if(e===i||e>=l||i>=l)return a;let c=o?r[e]:r.children[e],u=o?r[i]:r.children[i];return this.areObjectsMergeable(c,u)&&this.areGeometriesMergeable(c.geometry,u.geometry)&&Cs.materialsEquals(c.material,u.material)&&(n[i]||(n[i]={indexes:[i]},this.removeFromArray(s,i)),n[i].indexes.push(e),a=!0),a}static isFilteredByOtherFactors(r,e){let i=r;if(i.isMesh&&i.material.isShaderMaterial)return!0;let n=!1,s=r;for(;s&&s!==e;){let a=s.userData;if(a.relativeToCenter||a.spatialFilterHandle){n=!0;break}s=s.parent}return n}static deepMerge(r,e=void 0,i=!0,n=!0,s=!0){let a={added:[],removed:[]};if(r.length<=1)return a;let o=Date.now(),l={},c=[];for(let g=0;g=0;--x){let S=b[x].indexes[0];if(E=this.tryHandleMergeableObjects(r,g,S,l,c),E)break}for(let x=c.length-1;!E&&x>=0;--x){let S=c[x];if(E=this.tryHandleMergeableObjects(r,g,S,l,c),E)break}E||c.push(g)}if(Object.keys(l).length<=0)return a;ne.debug(`[Merge] Built merged indexes for ${r.length} objects in ${(Date.now()-o)/1e3}s`),o=Date.now();let u=[],h=[],p=[],d=[];Object.values(l).forEach(g=>{let y=g.indexes;if(y.length<2)return;let E=r[y[0]],b=[],x=0,S=0,D=0,P=[];if(y.forEach(w=>{var H,he,C;let F=r[w],X=F.geometry.clone();if(E.material instanceof Tr&&X.deleteAttribute("lineDistance"),this.applyMatrix(X,F,e),X.userData.isLineSegments=F.isLineSegments===!0,b.push(X),s){let N=(he=(H=X.attributes)==null?void 0:H.position)==null?void 0:he.count,k=((C=X.index)==null?void 0:C.count)||0,G;E.isLine&&(X.boundingSphere||X.computeBoundingSphere(),G=X.boundingSphere.clone()),P.push({batchId:x,positionStart:S,positionCount:N,indexStart:D,indexCount:k,boundingSphere:G}),S+=N,D+=k,x++}}),b.length===0)return;let _;if(E.isMesh){let w=qo(b);if(!w)return;w.userData={},_=new Je(w,E.material),u.push(_)}else if(E.isLine){let w=this.mergeLineGeometries(b,s,E.material instanceof Rp||E.material instanceof Yt,P);if(!w)return;_=new oi(w,E.material),h.push(_)}else if(E.isPoints){let w=qo(b);if(!w)return;w.userData={},_=new rn(w,E.material),p.push(_)}_&&(s?_.userData.batches=P:_.userData=E.userData,_.userData.layerName=E.userData.layerName,_.name=`[Merged] ${E.name}`,_.matrixAutoUpdate=!1,_.renderOrder=E.renderOrder,_.layers=E.layers,_.visible=E.visible,y.forEach(w=>d.push(w))),b.forEach(w=>{Wt.releaseGeometryManually(w)}),b=[]}),ne.debug(`[Merge] Ran deepMerge() in ${(Date.now()-o)/1e3}s`);let f=a.removed;d.forEach(g=>{let y=r[g];f.push(y),i&&y.removeFromParent()});let m=a.added;return[...u,...h,...p].forEach(g=>{m.push(g),i&&e&&(e.add(g),g.updateWorldMatrix(!1,!1))}),this.mergeInfo.removedObjects+=d.length,this.mergeInfo.mergedMeshes+=u.length,this.mergeInfo.mergedLines+=h.length,this.mergeInfo.mergedPoints+=p.length,n&&e&&Qr.removeEmptyObjects(e),a}static applyMatrix(r,e,i){let n=e;for(DC.identity();n&&n!==i&&(DC.premultiply(n.matrix),!!n.parent);)n=n.parent;return DC.equals(zvt)?r:r.applyMatrix4(DC)}static mergeLineGeometries(r,e,i,n){let s;if(i)s=CC.mergeBufferGeometriesWithLinesToLineSegements(r,e,n);else{if(s=qo(r),!s)return;s.userData={};let a=[],o=0;r.forEach((l,c)=>{let u=l.attributes.position;if(!u)return;let h=l.index,p=l.userData.isLineSegments===!0,d=a.length;if(h)for(let f=0;f0&&a.push(o+h.array[f-1],o+m)}else for(let f=0;f0&&(p?f%2===1&&a.push(o+f-1,o+f):a.push(o+f-1,o+f));o+=u.count,e&&n&&(n[c].indexStart=d,n[c].indexCount=a.length-d)}),s.setIndex(a)}return s}static mergeBufferGeometriesWithLinesToLineSegements(r,e,i){let n=new Set(Object.keys(r[0].attributes)),s={},a=new it,o=[],l=0;for(let c=0;c=0;--i)if(r[i]===e){r.splice(i,1);return}}static removeObjectFromArray(r,e){for(let i=r.length-1;i>=0;--i)if(r[i]===e){r.splice(i,1);return}}static areGeometriesMergeable(r,e){if(!r||!e||r.type==="InstancedBufferGeometry"||e.type==="InstancedBufferGeometry"||!!r.index!=!!e.index)return!1;let i=Object.keys(r.attributes);if(i.length!==Object.keys(e.attributes).length)return!1;for(let n of i)if(!e.attributes[n])return!1;return!0}static areObjectsMergeable(r,e){if(r.layers.mask!==e.layers.mask||r.renderOrder!==e.renderOrder||r.visible!==e.visible||r.userData.layerName!==e.userData.layerName)return!1;if(r.type===e.type)return!0;let i=r,n=e;return i.isMesh&&n.isMesh||i.isLine&&n.isLine||i.isPoints&&n.isPoints}static isMergedMesh(r){return!!(r&&r.userData.batches)}static isFaceIndexInBatch(r,e,i){if(r.boundsTree){let s=r.index.getX(i*3);if(s>=e.positionStart&&s=n&&i<=s)return!0}else{let n=i*3;if(n>=e.positionStart&&n80*e){o=c=t[0],l=u=t[1];for(let f=e;fc&&(c=h),p>u&&(u=p);d=Math.max(c-o,u-l),d=d!==0?32767/d:0}return Bx(s,a,e,o,l,d,0),a}};function Vpe(t,r,e,i,n){let s,a;if(n===Lyt(t,r,e,i)>0)for(s=r;s=r;s-=i)a=kpe(s,t[s],t[s+1],a);return a&&BC(a,a.next)&&(Gx(a),a=a.next),a}function qg(t,r){if(!t)return t;r||(r=t);let e=t,i;do if(i=!1,!e.steiner&&(BC(e,e.next)||Pn(e.prev,e,e.next)===0)){if(Gx(e),e=r=e.prev,e===e.next)break;i=!0}else e=e.next;while(i||e!==r);return r}function Bx(t,r,e,i,n,s,a){if(!t)return;!a&&s&&Dyt(t,i,n,s);let o=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,s?byt(t,i,n,s):Eyt(t)){r.push(l.i/e|0),r.push(t.i/e|0),r.push(c.i/e|0),Gx(t),t=c.next,o=c.next;continue}if(t=c,t===o){a?a===1?(t=xyt(qg(t),r,e),Bx(t,r,e,i,n,s,2)):a===2&&Iyt(t,r,e,i,n,s):Bx(qg(t),r,e,i,n,s,1);break}}}function Eyt(t){let r=t.prev,e=t,i=t.next;if(Pn(r,e,i)>=0)return!1;let n=r.x,s=e.x,a=i.x,o=r.y,l=e.y,c=i.y,u=ns?n>a?n:a:s>a?s:a,d=o>l?o>c?o:c:l>c?l:c,f=i.next;for(;f!==r;){if(f.x>=u&&f.x<=p&&f.y>=h&&f.y<=d&&lT(n,o,s,l,a,c,f.x,f.y)&&Pn(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function byt(t,r,e,i){let n=t.prev,s=t,a=t.next;if(Pn(n,s,a)>=0)return!1;let o=n.x,l=s.x,c=a.x,u=n.y,h=s.y,p=a.y,d=ol?o>c?o:c:l>c?l:c,g=u>h?u>p?u:p:h>p?h:p,y=MB(d,f,r,e,i),E=MB(m,g,r,e,i),b=t.prevZ,x=t.nextZ;for(;b&&b.z>=y&&x&&x.z<=E;){if(b.x>=d&&b.x<=m&&b.y>=f&&b.y<=g&&b!==n&&b!==a&&lT(o,u,l,h,c,p,b.x,b.y)&&Pn(b.prev,b,b.next)>=0||(b=b.prevZ,x.x>=d&&x.x<=m&&x.y>=f&&x.y<=g&&x!==n&&x!==a&&lT(o,u,l,h,c,p,x.x,x.y)&&Pn(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;b&&b.z>=y;){if(b.x>=d&&b.x<=m&&b.y>=f&&b.y<=g&&b!==n&&b!==a&&lT(o,u,l,h,c,p,b.x,b.y)&&Pn(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;x&&x.z<=E;){if(x.x>=d&&x.x<=m&&x.y>=f&&x.y<=g&&x!==n&&x!==a&&lT(o,u,l,h,c,p,x.x,x.y)&&Pn(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function xyt(t,r,e){let i=t;do{let n=i.prev,s=i.next.next;!BC(n,s)&&zpe(n,i,i.next,s)&&kx(n,s)&&kx(s,n)&&(r.push(n.i/e|0),r.push(i.i/e|0),r.push(s.i/e|0),Gx(i),Gx(i.next),i=t=s),i=i.next}while(i!==t);return qg(i)}function Iyt(t,r,e,i,n,s){let a=t;do{let o=a.next.next;for(;o!==a.prev;){if(a.i!==o.i&&Oyt(a,o)){let l=jpe(a,o);a=qg(a,a.next),l=qg(l,l.next),Bx(a,r,e,i,n,s,0),Bx(l,r,e,i,n,s,0);return}o=o.next}a=a.next}while(a!==t)}function Syt(t,r,e,i){let n=[],s,a,o,l,c;for(s=0,a=r.length;s=e.next.y&&e.next.y!==e.y){let p=e.x+(a-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(p<=s&&p>i&&(i=p,n=e.x=e.x&&e.x>=l&&s!==e.x&&lT(an.x||e.x===n.x&&Myt(n,e)))&&(n=e,u=h)),e=e.next;while(e!==o);return n}function Myt(t,r){return Pn(t.prev,t,r.prev)<0&&Pn(r.next,t,t.next)<0}function Dyt(t,r,e,i){let n=t;do n.z===0&&(n.z=MB(n.x,n.y,r,e,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,Cyt(n)}function Cyt(t){let r,e,i,n,s,a,o,l,c=1;do{for(e=t,t=null,s=null,a=0;e;){for(a++,i=e,o=0,r=0;r0||l>0&&i;)o!==0&&(l===0||!i||e.z<=i.z)?(n=e,e=e.nextZ,o--):(n=i,i=i.nextZ,l--),s?s.nextZ=n:t=n,n.prevZ=s,s=n;e=i}s.nextZ=null,c*=2}while(a>1);return t}function MB(t,r,e,i,n){return t=(t-e)*n|0,r=(r-i)*n|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,t|r<<1}function Ayt(t){let r=t,e=t;do(r.x=(t-a)*(s-o)&&(t-a)*(i-o)>=(e-a)*(r-o)&&(e-a)*(s-o)>=(n-a)*(i-o)}function Oyt(t,r){return t.next.i!==r.i&&t.prev.i!==r.i&&!Pyt(t,r)&&(kx(t,r)&&kx(r,t)&&Nyt(t,r)&&(Pn(t.prev,t,r.prev)||Pn(t,r.prev,r))||BC(t,r)&&Pn(t.prev,t,t.next)>0&&Pn(r.prev,r,r.next)>0)}function Pn(t,r,e){return(r.y-t.y)*(e.x-r.x)-(r.x-t.x)*(e.y-r.y)}function BC(t,r){return t.x===r.x&&t.y===r.y}function zpe(t,r,e,i){let n=UC(Pn(t,r,e)),s=UC(Pn(t,r,i)),a=UC(Pn(e,i,t)),o=UC(Pn(e,i,r));return!!(n!==s&&a!==o||n===0&&HC(t,e,r)||s===0&&HC(t,i,r)||a===0&&HC(e,t,i)||o===0&&HC(e,r,i))}function HC(t,r,e){return r.x<=Math.max(t.x,e.x)&&r.x>=Math.min(t.x,e.x)&&r.y<=Math.max(t.y,e.y)&&r.y>=Math.min(t.y,e.y)}function UC(t){return t>0?1:t<0?-1:0}function Pyt(t,r){let e=t;do{if(e.i!==t.i&&e.next.i!==t.i&&e.i!==r.i&&e.next.i!==r.i&&zpe(e,e.next,t,r))return!0;e=e.next}while(e!==t);return!1}function kx(t,r){return Pn(t.prev,t,t.next)<0?Pn(t,r,t.next)>=0&&Pn(t,t.prev,r)>=0:Pn(t,r,t.prev)<0||Pn(t,t.next,r)<0}function Nyt(t,r){let e=t,i=!1,n=(t.x+r.x)/2,s=(t.y+r.y)/2;do e.y>s!=e.next.y>s&&e.next.y!==e.y&&n<(e.next.x-e.x)*(s-e.y)/(e.next.y-e.y)+e.x&&(i=!i),e=e.next;while(e!==t);return i}function jpe(t,r){let e=new DB(t.i,t.x,t.y),i=new DB(r.i,r.x,r.y),n=t.next,s=r.prev;return t.next=r,r.prev=t,e.next=n,n.prev=e,i.next=e,e.prev=i,s.next=i,i.prev=s,i}function kpe(t,r,e,i){let n=new DB(t,r,e);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function Gx(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function DB(t,r,e){this.i=t,this.x=r,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Lyt(t,r,e,i){let n=0;for(let s=r,a=e-i;ss.toArray()).reduce((s,a)=>(s.push(...a),s),[]),i=[];return Gpe.triangulate(e,[],3).forEach(s=>i.push(s)),i}static arePointsCoplanar(r){if(r.length<4)return!0;let e=r[1].clone().sub(r[0]),n=r[2].clone().sub(r[0]).cross(e).normalize();for(let s=3;sFyt)return!1;return!0}static isSelfIntersecting(r){let e=r.map(n=>n.toArray().slice(0,-1));return(0,Wpe.default)(e).length>0}};var CB=class{constructor(r,e,i=void 0,n=CB.DEFAULT_SCALE){this.isExplodeUp=!1;this.scene=r,this.objectId=e,e||console.log(`[EXP] Invalid objectId: ${e}`),this.scale=n,n<=0&&console.log(`[EXP] Invalid scale: ${n}`),i?this.position=i:(this.position=new A,this.getObjectCenter(this.position))}explode(){if(!this.objectId||!this.position||!this.scale){console.log(`[EXP] Invalid objectId: ${this.objectId}, or position: ${this.position}, or this.power: ${this.scale}`);return}let r=this.scene.getObjectById(this.objectId);if(!r||!r.children){console.log("[EXP] No children to explode!");return}console.log(`[EXP] Exploding ${r.name} at: ${this.position.x}, ${this.position.y}, ${this.position.z}`),this.explodeObject(r)}explodeObject(r){r.geometry?this.explodeLeafObject(r):r.children.length>0?r.children.forEach(e=>this.explodeObject(e)):this.explodeLeafObject(r)}explodeLeafObject(r){if(r.geometry){if(r.userData.originalPosition=r.position.clone(),r instanceof tn){let e=new Ue,i=new A,n=new Or,s=new A;for(let a=0;a0?r.children.forEach(e=>this.unexplodeObject(e)):this.unexplodeLeafObject(r)}unexplodeLeafObject(r){let e=r.userData.originalPosition;e&&(r.position.set(e.x,e.y,e.z),r.updateMatrix(),delete r.userData.originalPosition)}setOnlyExplodeUp(r){this.isExplodeUp=r}getObjectCenter(r){let e=new Ot;if(!this.objectId){console.log(`[EXP] Invalid objectId: ${this.objectId}`);return}let i=this.scene.getObjectById(this.objectId);if(!i||!i.children){console.log("[EXP] No children to explode!");return}i.traverse(n=>{e.expandByObject(n)}),e.getCenter(r)}},Vx=CB;Vx.DEFAULT_SCALE=1;var vn=class{static getVisibleObjectBoundingBox(r){let e=new Ot;return r.traverseVisible(i=>{i instanceof Je&&i.userData.selectable!==!1&&e.expandByObject(i)}),e}static getObjectsBoundingBox(r,e,i){let n=new Ot;return e.forEach(s=>{let a=r.getObjectById(s);if(a){let o=vn.getBoundingBox(a,i);o.isEmpty()||n.union(o)}}),n}static getBoundingBox(r,e=!0){let i=new Ot;if(r instanceof tn)return vn.getInstancedMeshBoundingBox(r);if(r.children.length===0)return i.expandByObject(r),i;let n=r.children.length,s=1;n>20&&(s=3),n>100&&(s=5),n>200&&(s=10),n>1e3&&(s=100),r.updateMatrixWorld(!1);for(let a=0;a{i.find(a=>a===s.id)&&(s.children&&s.children.length===1?vn.explodeObject(s.children[0],r,e,n):vn.explodeObject(s,r,e,n))}),e}static unexplodeObjects(r,e){r.traverse(i=>{let n=e[i.id];n&&(n.unexplode(),delete e[i.id])})}static getObjectCenter(r,e){let i=vn.getBoundingBox(r);i.getCenter(e),e.y=i.min.y}};var qu=class{static setMaterialSection(r,e,i=!1,n=!1){let s=i&&r.clippingPlanes?r.clippingPlanes:[];s.push(...e),r.clippingPlanes=s,r.clipIntersection=n}static removeSection(r){r&&r.traverse(e=>{let i=e.material;Array.isArray(i)?i.forEach(n=>{n.clippingPlanes=void 0}):i&&(i.clippingPlanes=void 0)})}static addSection(r,e,i=!1,n=!1){r&&r.traverse(s=>{let a=s.material;Array.isArray(a)?a.forEach(o=>{qu.setMaterialSection(o,e,i,n)}):a&&qu.setMaterialSection(a,e,i,n)})}static generateSectionPlanesByBox(r){let e=r.min,i=r.max;return[new Ei(new A(0,-1,0),i.y),new Ei(new A(0,1,0),-e.y),new Ei(new A(1,0,0),-e.x),new Ei(new A(-1,0,0),i.x)]}static generateSectionPlanesByPoints(r,e=!0){let i=r.length;if(i<2)return;let n=[];for(let s=0;s-1&&t.splice(e,1)}function Uyt(t,r){let e=r.position.distanceTo(t.position),i=0,n=[];for(let o=0,l=t.faces.length;o=0;s--)e.faces[s]&&e.faces[s].hasVertex(i)&&Byt(e.faces[s],r);for(let s=e.faces.length-1;s>=0;s--)e.faces[s].replaceVertex(e,i);Xpe(e,t);for(let s=0;s0?new GC().modify(r,i):r}static simplifyPoints(r,e=1){let i=(0,Zpe.default)(r,e);return this.simplifiedInfo.total+=r.length,this.simplifiedInfo.removed+=r.length-i.length,i}static getNumberOfVerticesToRemove(r,e){let i=0;r instanceof it&&r.index&&(i=r.attributes.position.count);let n=Math.floor(i*e);return i<20?0:n}};zx.simplifiedInfo={total:0,removed:0};var Xg=class{static createSkyOfGradientRamp(r=4e3,e=32,i=15,n=new A,s=new A(0,.7,.5)){let a=this.COLOR_TEMPLATES.default,o={topColor:{value:new Ve(a[0])},skylineColor:{value:new Ve(a[1])},bottomColor:{value:new Ve(a[2])},offset:{value:400},exponent:{value:.9},skyCenter:{value:n||new A},sunDirection:{value:s.normalize()}},l=new ro(r,e,i),c=new Yt({uniforms:o,vertexShader:this.vertexShader,fragmentShader:this.fragmentShader,side:Gn}),u=new Je(l,c);return u.matrixAutoUpdate=!1,u.name=this.NAME,u.userData.selectable=!1,u.layers.set(11),u}static createSkyOfGradientRampByBoundingBox(r){let i=(r.max.x-r.min.x+(r.max.y-r.min.y)+(r.max.z-r.min.z))*2;iXg.MAX_SKY_RADIUS&&(i=Xg.MAX_SKY_RADIUS);let n=new A;r.getCenter(n);let s=Xg.createSkyOfGradientRamp(i,void 0,void 0,n);return s.position.set(n.x,0,n.z),s}static createSkyFromTextures(r){return ot(this,null,function*(){let e=new fx;return new Promise(i=>{e.load(r,n=>i(n))})})}},Xo=Xg;Xo.NAME="SKYBOX",Xo.MIN_SKY_RADIUS=4e3,Xo.MAX_SKY_RADIUS=2e4,Xo.vertexShader=` - varying vec3 vWorldPosition; - void main() { - vec4 worldPosition = modelMatrix * vec4( position, 1.0 ); - vWorldPosition = worldPosition.xyz; - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - }`,Xo.fragmentShader=` - uniform vec3 topColor; - uniform vec3 skylineColor; - uniform vec3 bottomColor; - uniform float offset; - uniform float exponent; - uniform vec3 skyCenter; - uniform vec3 sunDirection; - varying vec3 vWorldPosition; - // Used to find the position to draw the sun. Sun size is bigger when this value is smaller - const float sunDirectionDotThreshold = 0.98; - - void main() { - vec3 position = vec3(vWorldPosition.x - skyCenter.x, vWorldPosition.y - skyCenter.y, vWorldPosition.z - skyCenter.z); - vec3 normalizedPosition = normalize( position + offset ); - float h = normalizedPosition.y; - vec3 color; - if (h > 0.0) { - color = mix( skylineColor, topColor, pow( h, exponent ) ); - - // draw the sun - float dotResult = dot(sunDirection, normalizedPosition); - if (dotResult > sunDirectionDotThreshold) { - const float sunSize = 1.0 - sunDirectionDotThreshold; // maximum sun size - const vec3 sunColor = vec3(1.0, 1.0, 1.0); - color = mix(color, sunColor, pow((dotResult + sunSize - 1.0) / sunSize, 3.0)); - } - } else { - color = mix( skylineColor, bottomColor, pow( -h, exponent ) ); - } - gl_FragColor = vec4(color , 1.0); - }`,Xo.COLOR_TEMPLATES={default:[8828661,16777215,10066329],blueSky:[11189247,16777215,6974058],boardwalk:[14413823,16777215,15459804]};var zC=class extends Ng{constructor(r){super(r),this.type=Go}parse(r){let o=function(b,x){switch(b){case 1:console.error("THREE.RGBELoader Read Error: "+(x||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(x||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(x||""));break;default:case 4:console.error("THREE.RGBELoader: Error: "+(x||""))}return-1},h=` -`,p=function(b,x,S){x=x||1024;let P=b.pos,_=-1,w=0,F="",X=String.fromCharCode.apply(null,new Uint16Array(b.subarray(P,P+128)));for(;0>(_=X.indexOf(h))&&w=b.byteLength||!(F=p(b)))return o(1,"no header found");if(!(X=F.match(x)))return o(3,"bad initial token");for(w.valid|=1,w.programtype=X[1],w.string+=F+` -`;F=p(b),F!==!1;){if(w.string+=F+` -`,F.charAt(0)==="#"){w.comments+=F+` -`;continue}if((X=F.match(S))&&(w.gamma=parseFloat(X[1])),(X=F.match(D))&&(w.exposure=parseFloat(X[1])),(X=F.match(P))&&(w.valid|=2,w.format=X[1]),(X=F.match(_))&&(w.valid|=4,w.height=parseInt(X[1],10),w.width=parseInt(X[2],10)),w.valid&2&&w.valid&4)break}return w.valid&2?w.valid&4?w:o(3,"missing image size specifier"):o(3,"missing format specifier")},f=function(b,x,S){let D=x;if(D<8||D>32767||b[0]!==2||b[1]!==2||b[2]&128)return new Uint8Array(b);if(D!==(b[2]<<8|b[3]))return o(3,"wrong scanline width");let P=new Uint8Array(4*x*S);if(!P.length)return o(4,"unable to allocate buffer space");let _=0,w=0,F=4*D,X=new Uint8Array(4),H=new Uint8Array(F),he=S;for(;he>0&&wb.byteLength)return o(1);if(X[0]=b[w++],X[1]=b[w++],X[2]=b[w++],X[3]=b[w++],X[0]!=2||X[1]!=2||(X[2]<<8|X[3])!=D)return o(3,"bad rgbe scanline format");let C=0,N;for(;C128;if(G&&(N-=128),N===0||C+N>F)return o(3,"bad scanline data");if(G){let U=b[w++];for(let j=0;j{i.load(e,s=>{if(r){let a=r.fromEquirectangular(s).texture;r.dispose(),n(a)}})})})}static createEnvTextureFromDataArray(s){return ot(this,arguments,function*(r,e=this.HDR_CITY_STREET_64x32,i=64,n=32){if(r){let a=new _l(e,i,n);a.flipY=!0,a.magFilter=ai,a.minFilter=ai,a.type=Go,a.version=1;let o=r.fromEquirectangular(a).texture;return r.dispose(),Promise.resolve(o)}return Promise.reject("Invalid pmremGenerator!")})}};Lc.HDR_CITY_STREET_64x32=Uint16Array.from([11910,12340,12797,15360,11926,12348,12806,15360,11958,12364,12814,15360,11974,12380,12830,15360,11958,12364,12822,15360,11926,12348,12797,15360,11878,12324,12773,15360,11830,12308,12749,15360,11798,12292,12733,15360,11782,12279,12725,15360,11765,12263,12709,15360,11749,12247,12701,15360,11733,12231,12701,15360,11701,12215,12693,15360,11685,12199,12685,15360,11685,12199,12685,15360,11701,12215,12693,15360,11717,12231,12701,15360,11733,12247,12709,15360,11749,12263,12717,15360,11749,12279,12717,15360,11765,12279,12725,15360,11765,12279,12725,15360,11765,12292,12725,15360,11798,12300,12733,15360,11830,12316,12749,15360,11846,12324,12757,15360,11894,12340,12781,15360,11926,12356,12797,15360,11942,12356,12797,15360,11926,12348,12789,15360,11926,12348,12789,15360,11942,12356,12797,15360,11942,12356,12797,15360,11942,12348,12806,15360,11942,12356,12806,15360,11942,12356,12814,15360,11958,12372,12830,15360,11974,12372,12830,15360,11974,12372,12838,15360,11990,12388,12854,15360,12055,12420,12886,15360,12119,12452,12918,15360,12167,12476,12950,15360,12231,12500,12982,15360,12263,12516,12998,15360,12231,12500,12974,15360,12199,12484,12958,15360,12199,12484,12958,15360,12199,12492,12966,15360,12247,12508,12982,15360,12247,12508,12990,15360,12231,12500,12982,15360,12199,12484,12966,15360,12167,12468,12942,15360,12119,12444,12918,15360,12087,12436,12902,15360,12055,12420,12886,15360,12055,12412,12878,15360,12039,12412,12878,15360,12022,12396,12862,15360,12006,12388,12846,15360,11958,12364,12830,15360,11910,12340,12806,15360,12119,12508,13103,15360,12087,12484,13071,15360,12055,12468,13046,15360,12006,12436,13006,15360,11926,12396,12958,15360,11878,12364,12926,15360,11846,12348,12894,15360,11782,12308,12854,15360,11749,12292,12830,15360,11717,12263,12814,15360,11685,12247,12806,15360,11669,12215,12789,15360,11685,12231,12789,15360,11701,12247,12797,15360,11701,12247,12806,15360,11717,12263,12814,15360,11749,12292,12822,15360,11782,12308,12838,15360,11798,12316,12846,15360,11814,12332,12862,15360,11846,12340,12870,15360,11862,12348,12878,15360,11846,12340,12870,15360,11846,12340,12862,15360,11878,12356,12886,15360,11910,12372,12910,15360,11942,12396,12934,15360,11958,12412,12958,15360,12039,12452,12998,15360,12071,12468,13022,15360,12039,12452,12998,15360,12039,12452,12998,15360,12006,12444,13006,15360,11974,12436,12998,15360,11942,12412,12982,15360,11926,12396,12974,15360,11926,12404,12974,15360,11958,12420,12998,15360,12006,12452,13038,15360,12055,12476,13071,15360,12039,12476,13079,15360,12087,12508,13127,15360,12247,12597,13231,15360,12388,12693,13332,15360,12420,12741,13364,15360,12436,12757,13372,15360,12468,12773,13380,15360,12500,12806,13388,15360,12516,12822,13404,15360,12629,12934,13452,15360,12741,13046,13508,15360,12806,13095,13532,15360,12757,13046,13516,15360,12645,12950,13460,15360,12565,12870,13428,15360,12532,12838,13412,15360,12549,12854,13412,15360,12516,12838,13396,15360,12452,12757,13356,15360,12420,12725,13340,15360,12404,12709,13332,15360,12372,12677,13316,15360,12279,12589,13207,15360,12135,12516,13119,15360,12388,12709,13348,15360,12247,12581,13223,15360,12055,12476,13087,15360,11910,12388,12982,15360,11733,12308,12886,15360,11669,12247,12846,15360,11621,12199,12814,15360,11541,12103,12765,15360,11492,12055,12733,15360,11508,12055,12733,15360,11476,12022,12717,15360,11525,12055,12725,15360,11589,12135,12757,15360,11669,12199,12765,15360,11765,12292,12814,15360,11862,12348,12886,15360,11910,12372,12910,15360,12006,12420,12966,15360,12071,12452,12998,15360,12119,12476,13022,15360,12167,12492,13046,15360,12183,12500,13063,15360,12199,12524,13079,15360,12308,12589,13151,15360,12300,12581,13151,15360,12167,12516,13087,15360,12087,12468,13030,15360,12022,12444,13014,15360,11990,12420,12990,15360,11974,12420,12990,15360,11974,12420,12990,15360,11990,12436,13014,15360,11990,12444,13030,15360,12103,12500,13103,15360,12087,12508,13111,15360,12039,12484,13103,15360,12039,12476,13103,15360,11942,12436,13054,15360,11974,12452,13087,15360,12039,12492,13135,15360,12103,12532,13199,15360,12183,12581,13263,15360,12308,12661,13340,15360,12484,12822,13436,15360,12613,12918,13484,15360,12725,13046,13540,15360,13046,13332,13677,15360,13143,13380,13717,15360,13223,13420,13741,15360,13396,13540,13862,15360,13436,13589,13902,15360,13484,13629,13942,15360,13468,13621,13934,15360,13412,13564,13878,15360,13372,13524,13846,15360,13287,13452,13781,15360,13223,13428,13749,15360,13340,13492,13805,15360,13239,13428,13749,15360,13095,13364,13685,15360,12918,13223,13597,15360,12822,13111,13556,15360,12613,12934,13468,15360,12532,12854,13428,15360,12565,12870,13444,15360,12468,12789,13396,15360,12372,12693,13340,15360,12087,12492,13111,15360,11846,12364,12958,15360,11717,12300,12878,15360,11557,12135,12781,15360,11476,12055,12741,15360,11460,12022,12725,15360,11476,12022,12725,15360,11476,12022,12709,15360,11476,11958,12605,15360,11364,11733,12332,15360,11111,11412,11661,15360,11223,11476,11773,15360,11388,11669,12095,15360,11765,12119,12492,15360,12388,12613,13079,15360,12661,12902,13356,15360,12998,13255,13564,15360,13372,13508,13797,15360,13412,13548,13846,15360,13287,13436,13725,15360,13271,13428,13709,15360,13287,13428,13717,15360,13014,13287,13597,15360,12709,12998,13460,15360,12452,12741,13332,15360,12364,12653,13271,15360,12404,12693,13316,15360,12420,12709,13316,15360,12420,12709,13332,15360,12263,12589,13231,15360,12332,12661,13312,15360,12300,12629,13295,15360,12263,12605,13287,15360,12231,12597,13279,15360,12247,12613,13303,15360,12231,12597,13295,15360,12231,12605,13312,15360,12199,12597,13324,15360,12231,12613,13340,15360,12516,12870,13468,15360,12725,13063,13564,15360,12741,13079,13573,15360,12854,13175,13613,15360,12902,13223,13629,15360,13046,13348,13693,15360,13356,13516,13846,15360,13605,13765,14078,15360,13717,13870,14191,15360,13765,13918,14255,15360,13765,13910,14247,15360,13701,13854,14191,15360,13573,13733,14070,15360,13508,13677,14006,15360,13380,13548,13886,15360,13111,13380,13741,15360,13063,13348,13709,15360,12886,13207,13629,15360,12725,13046,13548,15360,12645,12966,13508,15360,12677,12982,13508,15360,12629,12950,13492,15360,12452,12789,13412,15360,12324,12661,13332,15360,12356,12677,13340,15360,12388,12693,13348,15360,12279,12597,13247,15360,11894,12396,12998,15360,11637,12231,12846,15360,11573,12135,12789,15360,11589,12151,12797,15360,11621,12167,12797,15360,11637,12119,12677,15360,11079,11404,11693,15360,10517,10701,10653,15360,10252,10348,10007,15360,9902,9999,9428,15360,9846,9886,9047,15360,10135,10260,9685,15360,10412,10533,10412,15360,11268,11436,11549,15360,12364,12605,13087,15360,12444,12709,13255,15360,12549,12822,13348,15360,12613,12886,13396,15360,12597,12886,13412,15360,12581,12870,13404,15360,12661,12950,13460,15360,12725,13014,13492,15360,13079,13332,13645,15360,12757,13046,13500,15360,12677,12982,13476,15360,12854,13143,13556,15360,12693,12982,13492,15360,12581,12886,13452,15360,12709,13030,13508,15360,12372,12709,13364,15360,12324,12661,13348,15360,12292,12645,13340,15360,12292,12645,13348,15360,12468,12806,13436,15360,12532,12854,13460,15360,12500,12854,13468,15360,12500,12854,13484,15360,12725,13063,13589,15360,12982,13324,13701,15360,13111,13388,13741,15360,13014,13340,13709,15360,13014,13332,13717,15360,13287,13476,13862,15360,13436,13621,13974,15360,13532,13717,14095,15360,13725,13902,14295,15360,13942,14103,14420,15360,13974,14135,14436,15360,13862,14022,14388,15360,13725,13894,14295,15360,13789,13958,14336,15360,13830,13990,14348,15360,13372,13548,13942,15360,13014,13332,13733,15360,12886,13239,13661,15360,12854,13207,13637,15360,12757,13095,13589,15360,12757,13079,13573,15360,12645,12982,13516,15360,12629,12966,13532,15360,12549,12870,13468,15360,12356,12693,13372,15360,12151,12549,13231,15360,12215,12573,13247,15360,12199,12565,13231,15360,12071,12492,13135,15360,12055,12468,13087,15360,11878,12372,12958,15360,11685,12199,12781,15360,10774,11159,11412,15360,9533,9621,8870,15360,9308,9340,8071,15360,9276,9300,7878,15360,9324,9332,8420,15360,9191,9216,7991,15360,8950,8983,7766,15360,9493,9525,8677,15360,10252,10332,10007,15360,10661,10846,10894,15360,10701,10926,10998,15360,10950,11276,11428,15360,11364,11637,12063,15360,11958,12388,12926,15360,12183,12540,13175,15360,12340,12645,13295,15360,12420,12693,13316,15360,12757,13030,13460,15360,13046,13324,13645,15360,13095,13348,13677,15360,13303,13460,13781,15360,13207,13404,13741,15360,13127,13372,13717,15360,13372,13524,13862,15360,12693,13030,13540,15360,12725,13046,13548,15360,12468,12822,13436,15360,12263,12629,13348,15360,12436,12773,13428,15360,12693,12998,13524,15360,12725,13046,13564,15360,12645,12982,13556,15360,12613,12966,13556,15360,12886,13255,13685,15360,13436,13629,14022,15360,13637,13813,14231,15360,13621,13789,14215,15360,13878,14038,14412,15360,14022,14183,14468,15360,13926,14119,14452,15360,14054,14231,14508,15360,14135,14311,14540,15360,14348,14436,14669,15360,14460,14540,14749,15360,14404,14484,14709,15360,14420,14500,14709,15360,14653,14717,14894,15360,14119,14279,14508,15360,13484,13669,14078,15360,13063,13380,13773,15360,12677,13079,13613,15360,12484,12886,13516,15360,12436,12822,13476,15360,12468,12838,13476,15360,12039,12532,13316,15360,12231,12613,13340,15360,12468,12789,13436,15360,12388,12725,13396,15360,12135,12557,13287,15360,12151,12557,13271,15360,12039,12484,13175,15360,11878,12396,13038,15360,11814,12348,12950,15360,11492,11894,12460,15360,9950,10103,9621,15360,8830,8838,7220,15360,8565,8533,7015,15360,8541,8501,6919,15360,8332,8300,6822,15360,8412,8372,7220,15360,8710,8701,7686,15360,9372,9404,8549,15360,9533,9621,9079,15360,9268,9292,8196,15360,9452,9460,8167,15360,9533,9581,8533,15360,9742,9870,9316,15360,11460,11814,12348,15360,11942,12388,12902,15360,11749,12167,12573,15360,11300,11492,11621,15360,11974,12332,12669,15360,12436,12741,13364,15360,12597,12886,13460,15360,12966,13271,13653,15360,12998,13303,13669,15360,13476,13629,13974,15360,13733,13886,14239,15360,13364,13524,13894,15360,13063,13356,13725,15360,12982,13287,13669,15360,12484,12806,13444,15360,12565,12902,13500,15360,12950,13287,13693,15360,12934,13271,13677,15360,12693,13046,13589,15360,12661,13030,13605,15360,12870,13271,13717,15360,13348,13548,13966,15360,13621,13813,14271,15360,13797,13974,14412,15360,13942,14119,14484,15360,14263,14388,14629,15360,14420,14508,14733,15360,14460,14548,14773,15360,14982,15046,15231,15360,15564,15580,15669,15360,15974,15982,16078,15360,15805,15821,15926,15360,15460,15476,15572,15360,15436,15460,15556,15360,14781,14862,15127,15360,13621,13813,14348,15360,12789,13207,13757,15360,12452,12886,13581,15360,12263,12709,13476,15360,12039,12597,13396,15360,11942,12516,13340,15360,11846,12468,13271,15360,11733,12380,13127,15360,11926,12460,13191,15360,12055,12524,13263,15360,11878,12428,13159,15360,11605,12231,12886,15360,11412,11990,12709,15360,11508,12103,12789,15360,11637,12231,12854,15360,10661,11079,11380,15360,9541,9685,9252,15360,8573,8605,7493,15360,8404,8388,7348,15360,8830,8822,8212,15360,9308,9324,9095,15360,9324,9364,9220,15360,9047,9119,8653,15360,9023,9055,8404,15360,9055,9063,8167,15360,8870,8846,7541,15360,8862,8806,7380,15360,8950,8910,7252,15360,9268,9284,7557,15360,10316,10468,10380,15360,11239,11476,11677,15360,10653,10942,11047,15360,9661,9814,9324,15360,10693,10958,11047,15360,11396,11653,11990,15360,11878,12292,12597,15360,12468,12789,13396,15360,12773,13095,13589,15360,13364,13516,13894,15360,13894,14054,14380,15360,13717,13870,14247,15360,13420,13589,13958,15360,13255,13452,13830,15360,12806,13143,13637,15360,13159,13412,13830,15360,13629,13813,14215,15360,13303,13500,13910,15360,13079,13396,13805,15360,13191,13452,13878,15360,13412,13621,14062,15360,14103,14279,14540,15360,14773,14854,15086,15360,14717,14805,15046,15360,14295,14420,14685,15360,14380,14476,14733,15360,14572,14661,14902,15360,15596,15612,15701,15360,16351,16335,16384,15360,16484,16476,16492,15360,16516,16500,16516,15360,16388,16375,16404,15360,16054,16054,16118,15360,15918,15926,16006,15360,15556,15572,15669,15360,14653,14725,14982,15360,13637,13838,14319,15360,13412,13613,14054,15360,12870,13287,13789,15360,12404,12838,13524,15360,12199,12677,13428,15360,12324,12741,13452,15360,11942,12516,13324,15360,11765,12380,13111,15360,11428,11942,12589,15360,10886,11388,11902,15360,10372,10717,11006,15360,9846,10240,10191,15360,10252,10549,10766,15360,10613,11079,11484,15360,10581,10998,11388,15360,9613,9846,9629,15360,8525,8557,7541,15360,8605,8613,7814,15360,9292,9324,9079,15360,9388,9396,9220,15360,10709,10846,11031,15360,9894,9966,9854,15360,9252,9236,8774,15360,8822,8790,8183,15360,8292,8260,6533,15360,8111,8007,6324,15360,8228,8183,6405,15360,8501,8501,6565,15360,8814,8878,7172,15360,9260,9364,8244,15360,8902,9095,8252,15360,9444,9581,9047,15360,9509,9637,8790,15360,9477,9613,8806,15360,10725,11063,11079,15360,11508,11910,12356,15360,12484,12789,13380,15360,12838,13159,13629,15360,13428,13589,13974,15360,14135,14279,14484,15360,13942,14087,14396,15360,13677,13846,14247,15360,13436,13613,14006,15360,13597,13781,14183,15360,14183,14340,14540,15360,14022,14215,14484,15360,13637,13838,14271,15360,14038,14231,14508,15360,14380,14476,14701,15360,14757,14854,15078,15360,15030,15111,15343,15360,15420,15452,15556,15360,15476,15500,15588,15360,15351,15388,15492,15360,15572,15596,15677,15360,15653,15669,15717,15360,15821,15821,15853,15360,15845,15845,15869,15360,15998,15990,16022,15360,15926,15926,15974,15360,15653,15669,15733,15360,15661,15677,15749,15360,15612,15629,15717,15360,15271,15335,15452,15360,14484,14572,14821,15360,14215,14372,14588,15360,13468,13677,14167,15360,12773,13175,13653,15360,12725,13143,13637,15360,12452,12886,13532,15360,12263,12709,13444,15360,11894,12436,13103,15360,10252,10533,10661,15360,8613,8693,7445,15360,8742,8782,7047,15360,8420,8412,6565,15360,7926,7910,6405,15360,8806,8854,7300,15360,9127,9228,8007,15360,8685,8750,7300,15360,8348,8356,6758,15360,8380,8340,7300,15360,8991,8918,8388,15360,9838,9790,9549,15360,10055,10127,10047,15360,9501,9493,9268,15360,9332,9292,8902,15360,9079,9007,8509,15360,8300,8260,7252,15360,8693,8701,8196,15360,8228,8212,7111,15360,8469,8501,7380,15360,8420,8501,6919,15360,8549,8645,6983,15360,8581,8661,6951,15360,9268,9332,7718,15360,9063,9207,7445,15360,9284,9380,7718,15360,9412,9557,8693,15360,10276,10517,10103,15360,11830,12279,12589,15360,12725,13079,13589,15360,13127,13396,13773,15360,14087,14231,14460,15360,13974,14119,14412,15360,13677,13854,14247,15360,14119,14279,14500,15360,13990,14167,14460,15360,14364,14452,14653,15360,14564,14653,14837,15360,14404,14492,14701,15360,14870,14942,15135,15360,15388,15420,15500,15360,15207,15287,15420,15360,14797,14894,15127,15360,15271,15335,15452,15360,15926,15942,15990,15360,16207,16207,16231,15360,16118,16110,16126,15360,15741,15733,15741,15360,16239,16207,16175,15360,16444,16460,16484,15360,16046,16022,16006,15360,15942,15950,15966,15360,15773,15789,15829,15360,15789,15797,15845,15360,15693,15709,15757,15360,15540,15564,15653,15360,15303,15364,15468,15360,14733,14813,15014,15360,13862,14054,14420,15360,12838,13255,13725,15360,12789,13207,13693,15360,12468,12918,13564,15360,12404,12838,13500,15360,11428,11862,12412,15360,9143,9276,8388,15360,8541,8533,6726,15360,8444,8428,6629,15360,8212,8183,6597,15360,8388,8380,7015,15360,8726,8710,6758,15360,8332,8316,6437,15360,8453,8428,6565,15360,8597,8605,7814,15360,8701,8661,8151,15360,9452,9396,9015,15360,10581,10557,10380,15360,10950,10974,10846,15360,10380,10356,10252,15360,10749,10741,10685,15360,9870,9854,9693,15360,9023,9039,8669,15360,8790,8854,8509,15360,8196,8167,7332,15360,7975,8015,7079,15360,8589,8750,7445,15360,9095,9260,7111,15360,8983,9135,7188,15360,8902,8991,7252,15360,8862,9007,7015,15360,8967,9111,7300,15360,8742,8878,7493,15360,9557,9999,9549,15360,11292,11613,11862,15360,12135,12468,12982,15360,12215,12460,12878,15360,13356,13468,13685,15360,13821,13934,14199,15360,13548,13701,14022,15360,14103,14263,14468,15360,14279,14388,14572,15360,14364,14452,14645,15360,14709,14789,14950,15360,15143,15199,15327,15360,15388,15412,15468,15360,15476,15500,15548,15360,15420,15444,15492,15360,15436,15460,15516,15360,15612,15637,15685,15360,16086,16086,16110,15360,16396,16388,16396,15360,16094,16094,16110,15360,15869,15861,15861,15360,16135,16110,16070,15360,16428,16420,16404,15360,15588,15556,15524,15360,15484,15500,15508,15360,15335,15364,15396,15360,15677,15685,15717,15360,15604,15621,15661,15360,15420,15444,15500,15360,15303,15372,15452,15360,14717,14805,14998,15360,14412,14508,14701,15360,13548,13765,14199,15360,13271,13508,13942,15360,12661,13159,13709,15360,12468,12854,13436,15360,10260,10484,10509,15360,8613,8669,6951,15360,8151,8143,6469,15360,8653,8629,7814,15360,8469,8444,7541,15360,8718,8693,7814,15360,8372,8332,6597,15360,8356,8308,7111,15360,9047,8983,8396,15360,8822,8798,8308,15360,9372,9348,8967,15360,10364,10364,10183,15360,10268,10260,9894,15360,10541,10533,10468,15360,10380,10364,10276,15360,10621,10613,10549,15360,9910,9942,9758,15360,8364,8380,7621,15360,8581,8637,8135,15360,8252,8300,7573,15360,8119,8175,7300,15360,8372,8453,7493,15360,8420,8501,6983,15360,8742,8822,7573,15360,8782,8854,8151,15360,8581,8661,7079,15360,9220,9268,8340,15360,9549,9645,8854,15360,11717,11950,12127,15360,12468,12741,13207,15360,12709,12966,13388,15360,12300,12508,12886,15360,12492,12709,13063,15360,13239,13372,13548,15360,12476,12597,12814,15360,13581,13685,13878,15360,14476,14548,14685,15360,14556,14629,14773,15360,14765,14829,14966,15360,15159,15207,15303,15360,15372,15396,15444,15360,15516,15532,15572,15360,15653,15661,15693,15360,15829,15837,15853,15360,16022,16014,16022,15360,16311,16295,16279,15360,16343,16319,16303,15360,16412,16388,16359,15360,15813,15797,15773,15360,13063,13151,13183,15360,11484,11701,11798,15360,12300,12412,12468,15360,14613,14637,14653,15360,11974,12215,12316,15360,14135,14215,14303,15360,15604,15629,15677,15360,15524,15548,15596,15360,15351,15380,15428,15360,14797,14894,15054,15360,13990,14231,14500,15360,13492,13709,14070,15360,12886,13316,13701,15360,12613,13207,13749,15360,11525,11974,12428,15360,9284,9412,8629,15360,8597,8653,6951,15360,7806,7790,6292,15360,7589,7541,6437,15360,7485,7437,6597,15360,7453,7404,6180,15360,7774,7686,6565,15360,8300,8260,7332,15360,9918,9942,9862,15360,10348,10372,10231,15360,9725,9709,9228,15360,10613,10621,10509,15360,10199,10175,9838,15360,10380,10388,10340,15360,11207,11255,11284,15360,10661,10717,10725,15360,10103,10135,9950,15360,8444,8436,7669,15360,8469,8501,7445,15360,8950,9111,8854,15360,9485,9798,10071,15360,8364,8501,8039,15360,7959,7951,6806,15360,8597,8605,8039,15360,8501,8533,7557,15360,8758,8830,7509,15360,10758,10830,10693,15360,11508,11605,11621,15360,13524,13669,13886,15360,13830,14022,14327,15360,13926,14103,14364,15360,13460,13621,13886,15360,12854,13191,13420,15360,13597,13733,13926,15360,13846,13990,14223,15360,13773,13942,14199,15360,13910,14087,14356,15360,13813,14022,14319,15360,14247,14396,14540,15360,14693,14765,14878,15360,15223,15279,15343,15360,15508,15524,15540,15360,15540,15548,15564,15360,15327,15335,15319,15360,15303,15311,15303,15360,15918,15910,15886,15360,16247,16207,16151,15360,16175,16143,16086,15360,14436,14452,14436,15360,12263,12380,12404,15360,11476,11701,11773,15360,12380,12492,12532,15360,14797,14797,14757,15360,11372,11589,11677,15360,12597,12934,13356,15360,13990,14364,14725,15360,14183,14444,14773,15360,14231,14444,14717,15360,14412,14532,14709,15360,14054,14199,14380,15360,12372,12500,12605,15360,12199,12565,13006,15360,12581,13175,13653,15360,10055,10380,10324,15360,8557,8573,6726,15360,8167,8196,6533,15360,7517,7485,6119,15360,7244,7172,5798,15360,7071,6959,5718,15360,7669,7581,6260,15360,8661,8605,7975,15360,10942,11079,11151,15360,12573,12741,13014,15360,11902,12030,12191,15360,10308,10332,10135,15360,11255,11300,11284,15360,11276,11348,11396,15360,10055,10215,10292,15360,12183,12332,12468,15360,9918,9966,9798,15360,8734,8742,8196,15360,8967,8950,8469,15360,10260,10276,10039,15360,9734,9758,9605,15360,9388,9404,9308,15360,7943,7878,7095,15360,7726,7637,6645,15360,8047,7983,7204,15360,9284,9236,8693,15360,9621,9565,9143,15360,11255,11268,11047,15360,13175,13332,13420,15360,13773,13934,14175,15360,13854,14022,14271,15360,13870,14038,14279,15360,13388,13516,13677,15360,12279,12629,12966,15360,13348,13452,13564,15360,13821,13918,14054,15360,13701,13846,14022,15360,13460,13605,13781,15360,13492,13637,13821,15360,13709,13821,13950,15360,14372,14428,14476,15360,14516,14572,14613,15360,14741,14789,14813,15360,14725,14749,14749,15360,13452,13484,13468,15360,13476,13500,13492,15360,14990,15022,15022,15360,14556,14572,14564,15360,15094,15111,15094,15360,13231,13287,13215,15360,11255,11380,11175,15360,10677,10886,10492,15360,11846,12006,11934,15360,14327,14340,14279,15360,10766,11039,10862,15360,12918,13255,13452,15360,14231,14548,14886,15360,13878,14380,14765,15360,13444,13862,14412,15360,12151,12404,12621,15360,12637,12902,13215,15360,11549,11749,11870,15360,12279,12653,13119,15360,13223,13404,13516,15360,9228,9260,8276,15360,8087,7991,6308,15360,7918,7814,6919,15360,7469,7364,6148,15360,7485,7380,6212,15360,8228,7991,7204,15360,9276,8967,8212,15360,9806,9573,8742,15360,10135,10087,9621,15360,11452,11452,11452,15360,10629,10637,10509,15360,10693,10733,10637,15360,11095,11111,10982,15360,11292,11348,11372,15360,10199,10244,10167,15360,10814,10926,10846,15360,8669,8774,7493,15360,7870,7910,6244,15360,8204,8183,6919,15360,9806,9758,9159,15360,9460,9436,8629,15360,9159,9087,8260,15360,7637,7509,6790,15360,7758,7629,6838,15360,7967,7918,6774,15360,10854,10749,10501,15360,11508,11412,11316,15360,12372,12300,12151,15360,12030,12119,12063,15360,12781,12910,12982,15360,13476,13581,13661,15360,13484,13589,13677,15360,12404,12428,12380,15360,11605,11765,11798,15360,11492,11533,11452,15360,11838,11886,11798,15360,12263,12372,12380,15360,12151,12231,12175,15360,11492,11508,11412,15360,11119,11111,10838,15360,12508,12581,12573,15360,12621,12693,12677,15360,12573,12629,12589,15360,12292,12324,12231,15360,12476,12565,12573,15360,11998,12159,12215,15360,12950,13071,13159,15360,12263,12372,12428,15360,12380,12428,12444,15360,11300,11308,11143,15360,10199,10244,9734,15360,9709,9701,9252,15360,10492,10581,10404,15360,11476,11516,11388,15360,9477,9517,8790,15360,11717,11854,11838,15360,14247,14420,14524,15360,14054,14311,14436,15360,13597,13805,13982,15360,11364,11533,11597,15360,12263,12428,12549,15360,11436,11605,11653,15360,13079,13324,13444,15360,12516,12613,12605,15360,10039,10015,9605,15360,8693,8621,7878,15360,7951,7862,6902,15360,8196,8204,7015,15360,8677,8589,7637,15360,9284,9031,8340,15360,9814,9605,8902,15360,10685,10428,9910,15360,10492,10260,9685,15360,9404,9252,7943,15360,8830,8766,7220,15360,9220,9047,7943,15360,9693,9669,9015,15360,11412,11468,11372,15360,11135,11159,11023,15360,10087,10055,9428,15360,9910,10007,9621,15360,9236,9300,8934,15360,9597,9557,8902,15360,10669,10549,9782,15360,9926,9870,9127,15360,9894,9918,9047,15360,8685,8742,7910,15360,9958,10167,10284,15360,10215,10332,10396,15360,11396,11428,11452,15360,11223,11255,11300,15360,11814,11862,11958,15360,10685,10846,10870,15360,10340,10380,10007,15360,11175,11207,10894,15360,12103,12207,12215,15360,11143,11103,10902,15360,9910,9966,9613,15360,10015,10079,9493,15360,10806,10846,10517,15360,10862,10934,10637,15360,10838,10942,10661,15360,10958,11087,10878,15360,10709,10838,10701,15360,10669,10741,10589,15360,10581,10669,10525,15360,10252,10348,9974,15360,11396,11500,11525,15360,11207,11255,11264,15360,10878,10910,10934,15360,11031,11063,11159,15360,11292,11324,11396,15360,11223,11255,11300,15360,10693,10685,10645,15360,10428,10420,10324,15360,10300,10252,9991,15360,10838,10846,10798,15360,10428,10428,10364,15360,9669,9605,9380,15360,10167,10244,10087,15360,11709,11854,11910,15360,11223,11284,11268,15360,10231,10244,9878,15360,10199,10244,9862,15360,10183,10260,9942,15360,10525,10653,10541,15360,12500,12597,12621,15360,11814,11741,11597,15360,11533,11460,11175,15360,11103,11006,10557,15360,10444,10396,9846,15360,10007,10023,9228,15360,9653,9790,8469,15360,9316,9372,8039,15360,9557,9830,8071,15360,9621,9918,8071,15360,9677,10015,8167,15360,9991,10284,8420,15360,10215,10436,8581,15360,10260,10484,8645,15360,10292,10476,8902,15360,10324,10468,9252,15360,9910,9894,8886,15360,10525,10573,9701,15360,9782,10039,8581,15360,9565,9814,8167,15360,9950,10039,8934,15360,10749,10758,10199,15360,10669,10685,10244,15360,10838,10838,10460,15360,11215,10910,10087,15360,11492,11364,10806,15360,11095,11159,11055,15360,11364,11388,11356,15360,11023,11039,10990,15360,11653,11653,11613,15360,11798,11725,11557,15360,11974,11862,11637,15360,12039,11942,11765,15360,12119,12047,11934,15360,12151,12071,11950,15360,12087,12006,11886,15360,12047,11966,11838,15360,11990,11926,11790,15360,11974,11910,11798,15360,11998,11934,11814,15360,12111,12039,11886,15360,12231,12143,11998,15360,12292,12199,12039,15360,12039,11974,11846,15360,11822,11782,11653,15360,11862,11838,11765,15360,11798,11765,11701,15360,11782,11733,11669,15360,11798,11749,11685,15360,11838,11790,11725,15360,11870,11822,11749,15360,11741,11701,11621,15360,11565,11541,11452,15360,11533,11500,11412,15360,11621,11581,11484,15360,11605,11557,11460,15360,11516,11468,11372,15360,11565,11533,11444,15360,11677,11637,11541,15360,11725,11661,11557,15360,11725,11661,11557,15360,11733,11669,11573,15360,11838,11773,11677,15360,11998,11926,11814,15360,12014,11926,11798,15360,11460,11404,11332,15360,11637,11557,11428,15360,12014,11894,11693,15360,12167,12022,11765,15360,12119,11982,11709,15360,11926,11806,11516,15360,11685,11589,11300,15360,11476,11404,10886,15360,11239,11151,10468,15360,10766,10733,9894,15360,10565,10565,9589,15360,10436,10444,9332,15360,10308,10308,9031,15360,10308,10316,8999,15360,10199,10244,8774,15360,9725,9645,8549,15360,10244,10276,8967,15360,10878,10838,10183,15360,11055,10966,10348,15360,11119,11006,10404,15360,11264,11135,10565,15360,11404,11316,10822,15360,11492,11388,10982,15360,11798,11613,11223,15360,12047,11830,11412,15360,12039,11894,11597,15360,12127,11990,11693,15360,12127,11990,11725,15360,12191,12055,11806,15360,12191,12055,11830,15360,11870,11773,11613,15360,11573,11516,11428,15360,11533,11484,11412,15360,11541,11492,11420,15360,11565,11516,11452,15360,11589,11541,11476,15360,11605,11557,11500,15360,11637,11589,11533,15360,11669,11621,11557,15360,11701,11645,11573,15360,11733,11669,11589,15360,11798,11717,11605,15360,11838,11749,11621,15360,11878,11782,11661,15360,11894,11798,11661,15360,11926,11806,11653,15360,11958,11822,11661,15360,11982,11846,11677,15360,12006,11870,11685,15360,12095,11950,11765,15360,12047,11910,11741,15360,11886,11765,11605,15360,11838,11733,11589,15360,11814,11717,11589,15360,11814,11709,11573,15360,11790,11693,11565,15360,11741,11677,11589,15360,11733,11677,11613,15360,11733,11685,11629,15360,11717,11669,11621,15360,11685,11645,11589,15360,11629,11589,11533,15360,11573,11525,11468,15360,11492,11444,11380,15360,11316,11255,11111,15360,11348,11292,11143,15360,11516,11436,11316,15360,11854,11749,11589,15360,12127,11990,11765,15360,12199,12055,11782,15360,12340,12231,11910,15360,12372,12292,11958,15360,12380,12300,11974,15360,12348,12247,11910,15360,12324,12215,11878,15360,12247,12103,11773,15360,12095,11958,11637,15360,12055,11926,11613,15360,11974,11854,11541,15360,11870,11765,11468,15360,11966,11854,11541,15360,12300,12151,11846,15360,12396,12316,12006,15360,12388,12308,11990,15360,12388,12308,12006,15360,12396,12316,12022,15360,12396,12308,12022,15360,12396,12308,12022,15360,12364,12279,11974,15360,12340,12247,11942,15360,12340,12231,11926,15360,12215,12071,11806,15360,12095,11966,11749,15360,11741,11645,11500,15360,11420,11356,11255,15360,11364,11308,11207,15360,11356,11300,11175,15360,11348,11292,11191,15360,11372,11324,11255,15360,11412,11364,11308,15360,11420,11372,11316,15360,11428,11380,11324,15360,11444,11388,11332,15360,11484,11428,11364,15360,11508,11460,11396,15360,11557,11500,11436,15360,11589,11533,11460,15360,11613,11557,11484,15360,11621,11557,11492,15360,11613,11557,11500,15360,11621,11557,11500,15360,11629,11573,11508,15360,11629,11573,11508,15360,11605,11557,11484,15360,11589,11533,11468,15360,11557,11508,11436,15360,11549,11500,11428,15360,11557,11500,11436,15360,11549,11492,11436,15360,11533,11484,11428,15360,11525,11476,11428,15360,11516,11476,11428,15360,11525,11484,11444,15360,11516,11476,11428,15360,11468,11428,11380,15360,11428,11388,11332,15360,11356,11308,11239,15360,11308,11255,11127,15360,11167,11071,10926,15360,11223,11119,10966,15360,11276,11175,10998,15360,11404,11332,11191,15360,11773,11693,11557,15360,11926,11798,11613,15360,12207,12039,11773,15360,12348,12231,11894,15360,12308,12151,11846,15360,12332,12215,11894,15360,12364,12279,11958,15360,12380,12292,11974,15360,12396,12316,12022,15360,12404,12316,12039,15360,12412,12332,12087,15360,12412,12332,12103,15360,12436,12356,12135,15360,12372,12292,12039,15360,12420,12332,12087,15360,12396,12316,12055,15360,12356,12263,11990,15360,12340,12231,11942,15360,12271,12127,11854,15360,12215,12071,11814,15360,12292,12135,11878,15360,12288,12135,11870,15360,12111,11982,11765,15360,11990,11886,11717,15360,11637,11557,11428,15360,11364,11300,11143,15360,11316,11239,11079,15360,11300,11207,11047,15360,11268,11159,11015,15360,11268,11159,11015,15360,11268,11159,11031,15360,11300,11223,11095,15360,11340,11292,11191,15360,11348,11300,11223,15360,11372,11324,11255,15360,11380,11332,11255,15360,11372,11316,11239,15360,11396,11340,11268,15360,11468,11404,11300,15360,11460,11404,11324,15360,11484,11428,11356,15360,11492,11436,11372,15360,11500,11444,11388,15360,11508,11460,11404,15360,11500,11452,11396,15360,11492,11436,11380,15360,11468,11412,11356,15360,11444,11388,11324,15360,11444,11388,11324,15360,11428,11380,11316,15360,11412,11356,11300,15360,11404,11348,11300,15360,11404,11356,11308,15360,11396,11356,11308,15360,11388,11348,11308,15360,11372,11340,11292,15360,11348,11308,11255,15360,11284,11223,11111,15360,11231,11143,11023,15360,11199,11111,10974,15360,11047,10958,10814,15360,11127,11023,10870,15360,11119,11006,10846,15360,11175,11055,10886,15360,11292,11191,10998,15360,11525,11404,11284,15360,11822,11637,11476,15360,11878,11733,11549,15360,11918,11790,11573,15360,12063,11918,11653,15360,12223,12063,11765,15360,12300,12151,11846,15360,12255,12103,11814,15360,12271,12127,11846,15360,12271,12127,11862,15360,12271,12127,11886,15360,12308,12183,11942,15360,12175,12039,11814,15360,12063,11934,11709,15360,12159,12014,11765,15360,12215,12063,11798,15360,12143,11998,11757,15360,12071,11934,11693,15360,11998,11870,11661,15360,11974,11870,11685,15360,11998,11910,11757,15360,11846,11765,11629,15360,11468,11396,11284,15360,11308,11223,11031,15360,11215,11103,10934,15360,11207,11095,10942,15360,11215,11103,10950,15360,11191,11087,10942,15360,11175,11079,10942,15360,11167,11063,10934,15360,11143,11031,10902,15360,11247,11143,11015,15360,11284,11191,11079,15360,11300,11223,11095,15360,11316,11268,11127,15360,11340,11284,11143,15360,11340,11284,11159,15360,11356,11300,11191,15360,11372,11316,11239,15360,11380,11324,11255,15360,11372,11316,11255,15360,11380,11324,11276,15360,11380,11324,11268,15360,11372,11316,11255,15360,11364,11316,11255,15360,11364,11308,11239,15360,11348,11292,11207,15360,11340,11284,11191,15360,11348,11292,11191,15360,11348,11292,11207,15360,11340,11292,11207,15360,11340,11292,11207,15360,11324,11276,11207,15360,11308,11255,11175,15360,11264,11175,11079,15360,11119,11039,10934,15360,11103,11015,10902,15360,11095,11006,10878,15360,11031,10942,10806,15360,10990,10902,10766,15360,11047,10942,10814,15360,11031,10926,10790,15360,11055,10942,10806,15360,11119,10998,10846,15360,11151,11015,10830,15360,11268,11095,10886,15360,11484,11396,11268,15360,11790,11701,11549,15360,11886,11790,11637,15360,11838,11741,11581,15360,11838,11725,11541,15360,11902,11782,11581,15360,11966,11838,11629,15360,11974,11846,11629,15360,11958,11838,11629,15360,11950,11838,11637,15360,11814,11701,11525,15360,11581,11492,11332,15360,11645,11541,11380,15360,11806,11701,11533,15360,11902,11806,11637,15360,11950,11862,11717,15360,12014,11934,11790,15360,11942,11862,11725,15360,11565,11492,11388,15360,11292,11191,11015,15360,11231,11111,10950,15360,11159,11047,10894,15360,11119,11006,10854,15360,11127,11023,10878,15360,11159,11055,10902,15360,11135,11031,10894,15360,11111,11006,10878,15360,11095,10990,10870,15360,11095,10998,10886,15360,11071,10966,10846,15360,11111,11006,10902,15360,11191,11095,10974,15360,11268,11159,11031,15360,11284,11191,11063,15360,11292,11207,11063,15360,11300,11223,11079,15360,11332,11268,11143,15360,11316,11255,11127,15360,11316,11255,11143,15360,11308,11239,11127,15360,11316,11255,11159,15360,11300,11223,11127,15360,11292,11207,11095,15360,11300,11223,11111,15360,11300,11223,11095,15360,11300,11223,11095,15360,11308,11239,11111,15360,11300,11223,11111,15360,11292,11207,11111,15360,11264,11167,11071,15360,11215,11127,11047,15360,11135,11055,10966,15360,11015,10934,10846,15360,10918,10838,10733,15360,10982,10894,10782,15360,10974,10886,10766,15360,10982,10894,10766,15360,10958,10862,10749,15360,10982,10886,10774,15360,10958,10862,10758,15360,10958,10862,10749,15360,11015,10910,10790,15360,11023,10910,10774,15360,11079,10958,10806,15360,11103,10974,10798,15360,11191,11047,10846,15360,11468,11388,11276,15360,11846,11765,11637,15360,12006,11918,11782,15360,11998,11910,11782,15360,11902,11822,11693,15360,11838,11749,11637,15360,11782,11709,11605,15360,11806,11741,11645,15360,11782,11717,11629,15360,11773,11717,11621,15360,11870,11806,11701,15360,11942,11862,11757,15360,12183,12103,11974,15360,11974,11894,11765,15360,11476,11404,11308,15360,11268,11143,10966,15360,11183,11063,10902,15360,11111,10998,10854,15360,11055,10942,10806,15360,11023,10910,10766,15360,11047,10934,10782,15360,11039,10926,10782,15360,11079,10966,10830,15360,11031,10918,10782,15360,11031,10926,10806,15360,10990,10894,10782,15360,10974,10886,10790,15360,10966,10870,10774,15360,11006,10902,10806,15360,11039,10942,10838,15360,11127,11023,10910,15360,11175,11079,10958,15360,11191,11087,10958,15360,11207,11095,10958,15360,11268,11143,11015,15360,11276,11175,11047,15360,11284,11191,11079,15360,11292,11191,11079,15360,11276,11175,11079,15360,11239,11135,11031,15360,11268,11159,11047,15360,11215,11111,11006,15360,11239,11127,11015,15360,11255,11143,11031,15360,11223,11119,11015,15360,11199,11103,10998,15360,11175,11087,10982,15360,11143,11047,10958,15360,11031,10942,10854,15360,10958,10878,10790,15360,10910,10830,10741,15360,10942,10862,10758,15360,10926,10838,10733,15360,10854,10758,10637,15360,10918,10830,10709,15360,10910,10822,10717,15360,10942,10846,10749,15360,10942,10854,10741,15360,10942,10854,10749,15360,10966,10870,10758,15360,10966,10870,10758,15360,10958,10854,10733,15360,10998,10886,10741,15360,10942,10830,10677,15360,11039,10918,10749,15360,11095,10974,10806,15360,11308,11223,11031,15360,11468,11396,11292,15360,11605,11533,11428,15360,11701,11621,11525,15360,11693,11629,11541,15360,11685,11621,11549,15360,11685,11629,11549,15360,11629,11565,11484,15360,11589,11533,11444,15360,11364,11308,11191,15360,11191,11087,10958,15360,11135,11031,10902,15360,11135,11031,10894,15360,11055,10950,10830,15360,11015,10910,10782,15360,10958,10854,10733,15360,10942,10838,10717,15360,10974,10870,10733,15360,10982,10878,10749,15360,10990,10886,10758,15360,11015,10910,10798,15360,10966,10862,10758,15360,10950,10854,10758,15360,10910,10822,10733,15360,10894,10798,10709,15360,10902,10814,10725,15360,10934,10846,10758,15360,10910,10822,10733,15360,10950,10854,10749,15360,10974,10878,10766,15360,11047,10942,10830,15360,11095,10990,10878,15360,11167,11055,10942,15360,11199,11103,10990,15360,11191,11087,10982,15360,11151,11047,10950,15360,11135,11031,10934,15360,11095,10998,10902,15360,11143,11047,10950,15360,11079,10990,10894,15360,11079,10990,10902,15360,11103,11006,10910,15360,11079,10982,10886,15360,11023,10926,10822,15360,10982,10894,10798,15360,10958,10870,10782,15360,10910,10814,10725,15360,10926,10838,10741,15360,10934,10838,10733,15360,10950,10854,10749,15360,10886,10798,10709,15360,10910,10814,10709,15360,10926,10830,10725,15360,10910,10814,10701,15360,10862,10774,10677,15360,10950,10854,10733,15360,10926,10830,10717,15360,10926,10838,10725,15360,10926,10830,10725,15360,10894,10798,10685,15360,10926,10830,10701,15360,10958,10854,10717,15360,10934,10830,10685,15360,10950,10846,10709,15360,10974,10862,10717,15360,10942,10830,10685,15360,10958,10846,10701,15360,11006,10894,10749,15360,10950,10846,10725,15360,10958,10862,10741,15360,10894,10806,10701,15360,10854,10774,10669,15360,10886,10806,10701,15360,10862,10790,10693,15360,10878,10806,10717,15360,10982,10902,10798,15360,10990,10902,10798,15360,10950,10862,10758,15360,10942,10846,10733,15360,10870,10774,10669,15360,10894,10798,10693,15360,10918,10830,10725,15360,10894,10806,10701,15360,10926,10830,10733,15360,10902,10830,10725,15360,10870,10790,10693,15360,10886,10814,10725,15360,10814,10741,10661,15360,10838,10766,10677,15360,10822,10741,10661,15360,10822,10741,10669,15360,10862,10790,10709,15360,10846,10758,10669,15360,10894,10798,10693,15360,10974,10878,10766,15360,10966,10870,10766,15360,11023,10926,10814,15360,11079,10974,10862,15360,11006,10910,10814,15360,10950,10862,10766,15360,10982,10894,10798,15360,10958,10862,10774,15360,10958,10870,10782,15360,10910,10830,10741,15360,10950,10862,10766,15360,10982,10886,10790,15360,10918,10822,10725,15360,10886,10798,10701,15360,10854,10766,10669,15360,10894,10806,10709,15360,10926,10830,10725,15360,10926,10830,10725,15360,10958,10862,10749,15360,10958,10862,10749,15360,10894,10806,10717,15360,10902,10814,10717,15360,10878,10790,10677,15360,10942,10838,10717,15360,10918,10814,10701,15360,10886,10790,10661,15360,10942,10838,10717,15360,10950,10854,10725,15360,10950,10854,10725,15360,10910,10814,10693,15360,10910,10814,10685,15360,10942,10838,10709,15360,10894,10790,10661,15360,10910,10806,10669,15360,10822,10725,10597,15360,10749,10661,10541,15360,10830,10733,10613,15360,10838,10741,10629,15360,10806,10709,10597,15360,10854,10766,10653,15360,10862,10774,10669,15360,10798,10725,10629,15360,10822,10749,10653,15360,10854,10782,10693,15360,10806,10741,10661,15360,10862,10790,10701,15360,10870,10790,10685,15360,10870,10790,10693,15360,10878,10790,10677,15360,10862,10782,10677,15360,10870,10790,10693,15360,10870,10782,10685,15360,10894,10814,10709,15360,10886,10814,10709,15360,10846,10782,10685,15360,10741,10669,10573,15360,10766,10693,10589,15360,10709,10637,10541,15360,10741,10669,10589,15360,10741,10677,10589,15360,10709,10637,10557,15360,10774,10701,10613,15360,10862,10774,10677,15360,11006,10918,10806,15360,11006,10902,10782,15360,10974,10870,10749,15360,10958,10854,10733,15360,10934,10838,10725,15360,10934,10838,10733,15360,10934,10838,10725,15360,10886,10790,10685,15360,10854,10766,10661,15360,10886,10798,10701,15360,10838,10749,10645,15360,10878,10782,10661,15360,10822,10725,10613,15360,10822,10717,10605,15360,10846,10749,10629,15360,10854,10749,10637,15360,10950,10854,10733,15360,10958,10854,10741,15360,10910,10806,10693,15360,10926,10822,10693,15360,10934,10838,10725,15360,10910,10822,10709,15360,10910,10822,10709,15360,10886,10782,10661,15360,10910,10814,10677,15360,10910,10806,10677,15360,10926,10822,10685,15360,10958,10854,10717,15360,10974,10870,10725,15360,10926,10830,10693,15360,10926,10830,10693,15360,10918,10822,10693,15360,10934,10838,10701,15360,10918,10814,10685,15360,10878,10782,10653,15360,10870,10774,10645,15360,10838,10749,10629,15360,10806,10717,10605,15360,10822,10733,10621,15360,10822,10733,10621,15360,10846,10758,10653,15360,10846,10766,10653,15360,10822,10741,10629,15360,10806,10733,10629,15360,10806,10725,10621,15360,10790,10709,10605,15360,10766,10693,10589,15360,10814,10741,10629,15360,10846,10766,10653,15360,10838,10758,10653,15360,10878,10790,10677,15360,10894,10798,10685,15360,10830,10741,10629,15360,10830,10758,10653,15360,10798,10725,10629,15360,10806,10733,10629,15360,10717,10637,10525,15360,10661,10581,10476,15360,10701,10621,10517,15360,10733,10661,10565,15360,10782,10685,10557,15360,10862,10758,10613,15360,10974,10862,10725,15360,10958,10846,10709,15360,11006,10902,10766,15360,11006,10902,10774,15360,11039,10934,10814,15360,11006,10902,10790,15360,11006,10910,10790,15360,10950,10854,10741,15360,10934,10830,10709,15360,10918,10814,10701,15360,10854,10758,10653,15360,10918,10814,10701,15360,10870,10766,10645,15360,10830,10733,10621,15360,10934,10830,10709,15360,10990,10886,10758,15360,10950,10838,10717,15360,10910,10814,10701,15360,10926,10822,10693,15360,10934,10830,10709,15360,10878,10774,10653,15360,10934,10830,10701,15360,10926,10822,10693,15360,10878,10782,10661,15360,10878,10782,10661,15360,10862,10766,10621,15360,10886,10782,10645,15360,10886,10782,10653,15360,10926,10822,10701,15360,10902,10806,10685,15360,10926,10822,10701,15360,10918,10814,10685,15360,10878,10782,10645,15360,10910,10806,10669,15360,10854,10758,10621,15360,10886,10790,10645,15360,10854,10758,10629,15360,10830,10741,10613,15360,10918,10814,10685,15360,10862,10766,10645,15360,10830,10741,10613,15360,10806,10717,10597,15360,10741,10661,10557,15360,10774,10693,10581,15360,10749,10669,10557,15360,10774,10693,10581,15360,10766,10685,10573,15360,10790,10709,10597,15360,10782,10701,10589,15360,10790,10709,10597,15360,10838,10749,10621,15360,10870,10774,10645,15360,10894,10790,10661,15360,10878,10782,10653,15360,10846,10741,10613,15360,10790,10693,10557,15360,10814,10717,10597,15360,10790,10701,10581,15360,10741,10645,10525,15360,10717,10629,10509,15360,10774,10685,10573,15360,10725,10637,10525,15360,10854,10749,10621,15360,10950,10846,10701,15360,10966,10854,10709,15360,10934,10814,10677,15360,10926,10822,10701,15360,10982,10878,10766,15360,10998,10894,10782,15360,10990,10878,10766,15360,10998,10894,10782,15360,10998,10886,10774,15360,10998,10886,10758,15360,11006,10894,10774,15360,10942,10838,10733,15360,10958,10854,10741,15360,10958,10854,10749,15360,11006,10902,10790,15360,11015,10902,10798,15360,10982,10870,10758,15360,10998,10894,10782,15360,10974,10870,10758,15360,11006,10902,10790,15360,10998,10894,10774,15360,10974,10870,10758,15360,10950,10854,10741,15360,10878,10790,10693,15360,10902,10814,10701,15360,10918,10822,10709,15360,10838,10733,10613,15360,10878,10782,10661,15360,10934,10838,10717,15360,10902,10806,10693,15360,10918,10822,10709,15360,10926,10830,10709,15360,10838,10733,10605,15360,10910,10806,10661,15360,10942,10838,10693,15360,10886,10782,10645,15360,10886,10782,10637,15360,10854,10749,10621,15360,10926,10830,10709,15360,10966,10862,10741,15360,10846,10749,10629,15360,10830,10733,10605,15360,10854,10758,10637,15360,10822,10725,10605,15360,10886,10790,10661,15360,10902,10806,10669,15360,10918,10814,10677,15360,10830,10733,10605,15360,10806,10717,10589,15360,10870,10774,10645,15360,10934,10838,10709,15360,10958,10862,10733,15360,10886,10790,10661,15360,10894,10798,10661,15360,10958,10854,10709,15360,10934,10830,10709,15360,10814,10717,10581,15360,10862,10758,10613,15360,10854,10741,10589,15360,10814,10717,10573,15360,10886,10782,10645,15360,10814,10725,10597,15360,10862,10766,10637,15360,10910,10806,10669,15360,10942,10838,10709,15360,10966,10862,10733,15360,10974,10870,10741,15360,10974,10870,10749,15360,10958,10862,10749,15360,11031,10934,10822,15360,10998,10894,10782,15360,10974,10870,10766,15360,11023,10918,10814,15360,11039,10926,10822,15360,10958,10846,10741,15360,10918,10814,10693,15360,10966,10870,10741,15360,10982,10886,10766,15360,10982,10878,10766,15360,10942,10846,10733,15360,10958,10862,10758,15360,10950,10854,10758,15360,10934,10830,10717,15360,10966,10862,10733,15360,10942,10846,10725,15360,10934,10846,10733,15360,10934,10846,10733,15360,10878,10798,10693,15360,10886,10798,10693,15360,10910,10814,10709,15360,10942,10846,10733,15360,10838,10733,10597,15360,10878,10774,10645,15360,10918,10822,10701,15360,10878,10782,10653,15360,10894,10790,10661,15360,10934,10838,10725,15360,10958,10854,10725,15360,10966,10862,10733,15360,10910,10806,10685,15360,10982,10878,10758,15360,10942,10854,10749,15360,10934,10838,10733,15360,10918,10814,10701,15360,10894,10798,10669,15360,10894,10798,10669,15360,10814,10725,10605,15360,10902,10798,10669,15360,10814,10725,10605,15360,10894,10798,10685,15360,10958,10862,10749,15360,10910,10814,10701,15360,10910,10806,10685,15360,10918,10814,10693,15360,10926,10822,10709,15360,10894,10790,10661,15360,10902,10806,10677,15360,10902,10806,10685,15360,10934,10838,10717,15360,10934,10838,10701,15360,10934,10838,10717,15360,10950,10854,10725,15360,10894,10798,10661,15360,10862,10749,10597,15360,10894,10798,10677,15360,10878,10782,10661,15360,10926,10838,10717,15360,10926,10838,10717,15360,10918,10822,10709,15360,10934,10838,10733,15360,10926,10838,10733,15360,10958,10870,10766,15360,10942,10854,10749,15360,10958,10870,10774,15360,10974,10878,10774,15360,10958,10854,10741,15360,10950,10846,10741,15360,10950,10854,10758,15360,10934,10838,10733,15360,10942,10846,10725,15360,10966,10862,10741,15360,10926,10838,10733,15360,10958,10862,10749,15360,10910,10822,10709,15360,10942,10854,10758,15360,10926,10838,10733,15360,10910,10822,10717,15360,10934,10838,10733,15360,10934,10846,10733,15360,10902,10814,10709,15360,10926,10830,10717,15360,10918,10822,10709,15360,10838,10749,10637,15360,10878,10790,10677,15360,10942,10846,10733,15360,10926,10822,10701,15360,10958,10862,10749,15360,10886,10790,10685,15360,10918,10814,10693,15360,10910,10814,10693,15360,10902,10806,10701,15360,10878,10774,10637,15360,10798,10693,10565,15360,10822,10725,10597,15360,10934,10838,10709,15360,10958,10854,10725,15360,10886,10790,10669,15360,10910,10806,10677,15360,10886,10782,10645,15360,10830,10725,10597,15360,10822,10717,10581,15360,10862,10758,10637,15360,10878,10782,10669,15360,10926,10822,10709,15360,10974,10878,10774,15360,10966,10870,10758,15360,10918,10822,10709,15360,10846,10749,10645,15360,10894,10798,10693,15360,10918,10822,10709,15360,10974,10878,10774,15360,10918,10822,10717,15360,10982,10886,10774,15360,10974,10878,10758,15360,10950,10854,10741,15360,10958,10854,10725,15360,10982,10886,10766,15360,10918,10822,10701,15360,10878,10782,10669,15360,10886,10790,10669,15360,10934,10838,10717,15360,10950,10854,10741,15360,10934,10838,10733,15360,10982,10886,10782,15360,10886,10798,10701,15360,10870,10782,10685,15360,10894,10814,10717,15360,10910,10822,10725,15360,10934,10838,10733,15360,10950,10846,10741,15360,10934,10838,10725,15360,10934,10846,10749,15360,10902,10814,10717,15360,10878,10790,10677,15360,10878,10782,10669,15360,10854,10766,10645,15360,10838,10749,10629,15360,10902,10814,10701,15360,10910,10814,10693,15360,10902,10798,10669,15360,10910,10806,10677,15360,10886,10782,10653,15360,10854,10749,10629,15360,10870,10774,10653,15360,10974,10870,10758,15360,10990,10878,10758,15360,10918,10822,10709,15360,10926,10838,10725,15360,10958,10854,10733,15360,10894,10790,10653,15360,10822,10725,10605,15360,10878,10782,10661,15360,10974,10870,10749,15360,10902,10806,10677,15360,10934,10838,10725,15360,10870,10774,10653,15360,10798,10701,10581,15360,10854,10749,10621,15360,10894,10798,10669,15360,10934,10822,10685,15360,10942,10830,10701,15360,10910,10806,10669,15360,10870,10758,10629,15360,10886,10774,10645,15360,10950,10838,10701,15360,10966,10870,10749,15360,10886,10790,10685,15360,10870,10782,10677,15360,10934,10838,10733,15360,10934,10838,10725,15360,10822,10725,10621,15360,10878,10790,10677,15360,10894,10798,10693,15360,10822,10733,10629,15360,10894,10798,10685,15360,10998,10902,10790,15360,11015,10918,10806,15360,10950,10854,10741,15360,10950,10846,10741,15360,10934,10838,10733,15360,10942,10846,10749,15360,10910,10822,10725,15360,10846,10758,10653,15360,10878,10790,10685,15360,10894,10798,10701,15360,10862,10774,10669,15360,10814,10725,10621,15360,10846,10758,10645,15360,10870,10774,10661,15360,10870,10774,10677,15360,10878,10790,10693,15360,10878,10782,10677,15360,10830,10741,10637,15360,10870,10782,10677,15360,10966,10870,10766,15360,11015,10918,10814,15360,10910,10814,10701,15360,10942,10846,10725,15360,10950,10846,10725,15360,10942,10838,10725,15360,10934,10830,10701,15360,10910,10798,10677,15360,10886,10782,10653,15360,10838,10733,10597,15360,10902,10806,10669,15360,10830,10733,10613,15360,10838,10741,10621,15360,10838,10741,10621,15360,10894,10798,10669,15360,10934,10830,10685,15360,10886,10790,10669,15360,10902,10806,10685,15360,10854,10749,10637,15360]);function Vyt(){let t=document.createElement("div");return t.setAttribute("style","height: 1in; visibility: hidden; position: absolute; margin: 0; padding: 0;"),document.body.appendChild(t),.0254/t.clientHeight}var pYt={file:1,m:1,mm:.001,cm:.01,ft:.3048,in:.0254,pt:Vyt()},zyt={file:"m",m:"m",mm:"mm",cm:"cm",ft:"ft",in:"in",pt:"pt"},jyt=t=>t===2?"\xB2":t===3?"\xB3":"",PB=(t,r=1)=>zyt[t]+jyt(r);var jC=class{static getCameraPositionByBboxAndView(r,e,i,n,s){let a=jC.getCameraDirectionByView(e);return this.getCameraPositionByBboxAndDirection(r,i,n,s,a)}static getCameraPositionByBboxAndDirection(r,e,i,n,s){if(r.isEmpty()||!n)return;let a=new A,o=new A,l=new A(0,1,0);r.getSize(o),r.getCenter(a);let c=(o.x+o.y+o.z)/3*1.5,u,h;if(!s||s!=null&&s.equals(new A))u=new A(a.x+c,a.y+c/1.5,a.z+c),h=u.clone().sub(a);else{let y=new A(c,c/1.5,c).length();h=new A(-s.x,-s.y,-s.z).normalize().multiplyScalar(y),u=h.clone().add(a)}c=h.length(),h=h.normalize();let p=new Ue;p.lookAt(u,a,l);let d=new Ue;d.makeTranslation(-u.x,-u.y,-u.z);let f=r.clone().applyMatrix4(d).applyMatrix4(p.invert()).applyMatrix4(n),m=Math.max(Math.abs(f.max.x),Math.abs(f.min.x)),g=Math.max(Math.abs(f.max.y),Math.abs(f.min.y));c*=Math.sqrt(Math.pow(m,2)+Math.pow(g,2))*1.1,u=h.multiplyScalar(c).add(a),i.set(a.x,a.y,a.z),e.set(u.x,u.y,u.z)}static getCameraDirectionByView(r){let e=new A(1,0,0);return r==="Top"?e.set(0,-1,0):r==="Bottom"?e.set(0,1,0):r==="Front"?e.set(0,0,-1):r==="Back"?e.set(0,0,1):r==="Left"?e.set(1,0,0):r==="Right"&&e.set(-1,0,0),e}static sleep(r){return ot(this,null,function*(){let e;return new Promise(i=>{e=setTimeout(()=>{i("")},r)}).then(()=>{clearTimeout(e)})})}static twinkle(r,e=500){return ot(this,null,function*(){let i=jC.twinklingObjectIds;i[r.id]||(i[r.id]=!0,r.visible=!r.visible,yield this.sleep(e),r.visible=!r.visible,yield this.sleep(e),r.visible=!r.visible,yield this.sleep(e),r.visible=!r.visible,yield this.sleep(e),r.visible=!r.visible,yield this.sleep(e),r.visible=!r.visible,delete i[r.id])})}},bs=jC;bs.twinklingObjectIds={};var Wyt=!1,po=class extends jo{constructor(e){super();this.DEFAULT_LINE_WIDTH=1;this.DEFAULT_STROKE_STYLE="#000000";this.DEFAULT_FILL_STYLE="#000000";this.lineWidth=this.DEFAULT_LINE_WIDTH;this.lineColor=this.DEFAULT_STROKE_STYLE;this.fillColor=this.DEFAULT_FILL_STYLE;this.x=0;this.y=0;this.points=[];this.userData={};this.width=0;this.height=0;this.tolerance=1;this.visible=!0;this.selected=!1;this.needsFrustumCulled=!0;this.editPointSize=3;this.editPointColor="#ffffff";this.matrix=new Ue;this.id=e||St.guid()}setTolerance(e){this.tolerance=e}render(e,i){this.ctx=e,this.draw(e,i),this.selected&&this.drawSelect(e,i),Wyt&&(this.drawBounds(e,i),this.drawCenter(e,i))}getData(){return{id:this.id,points:this.points.map(e=>[e.x,e.y]),lineWidth:this.lineWidth,lineColor:this.lineColor,fillColor:this.fillColor,type:this.getClassType()}}setData(e){this.id=e.id,this.setLineWidth(e.lineWidth),this.setLineColor(e.lineColor),this.setFillColor(e.fillColor)}getVertexs(){let e=new A(this.x,this.y,0),i=new A(this.x+this.width,this.y,0),n=new A(this.x+this.width,this.y+this.height,0),s=new A(this.x,this.y+this.height,0);return[e,i,n,s]}setLineWidth(e){this.lineWidth=e||this.DEFAULT_LINE_WIDTH}setLineColor(e){this.lineColor=e||this.DEFAULT_STROKE_STYLE}setFillColor(e){this.fillColor=e||this.DEFAULT_FILL_STYLE}isSelected(){return this.selected}getCenter(){return this.getBounds().getCenter(new A)}transToScreenCoord(e,i){return this.ctx?Mr.worldPosition2ScreenPoint(e,i,this.ctx.canvas):new le}drawBounds(e,i){let{min:n,max:s}=this.getBounds(),a=[],o=(l,c,u)=>a.push(new A(l,c,u));o(s.x,s.y,s.z),o(n.x,s.y,s.z),o(n.x,n.y,s.z),o(s.x,n.y,s.z),o(s.x,s.y,n.z),o(n.x,s.y,n.z),o(n.x,n.y,n.z),o(s.x,n.y,n.z),o(n.x,s.y,s.z),o(n.x,n.y,s.z),o(s.x,s.y,s.z),o(s.x,n.y,s.z),o(s.x,s.y,n.z),o(s.x,n.y,n.z),o(n.x,s.y,n.z),o(n.x,n.y,n.z),o(n.x,s.y,s.z),o(n.x,s.y,n.z),o(s.x,s.y,s.z),o(s.x,s.y,n.z),o(n.x,n.y,s.z),o(n.x,n.y,n.z),o(s.x,n.y,s.z),o(s.x,n.y,n.z),e.save(),e.strokeStyle="yellow",e.beginPath(),a.forEach((l,c)=>{let u=this.transToScreenCoord(l,i);c%2===0?e.moveTo(u.x,u.y):e.lineTo(u.x,u.y)}),e.closePath(),e.stroke(),e.restore()}drawCenter(e,i){let n=this.transToScreenCoord(this.getCenter(),i);e.save(),e.fillStyle="yellow",e.beginPath(),e.arc(n.x,n.y,5,0,Math.PI*2),e.closePath(),e.fill(),e.restore()}getBounds(){let e=this.getVertexs();return new Ot().setFromPoints(e)}};var $g=(i=>(i.LayoutChanged="LayoutChanged",i.RenderAfter="RenderAfter",i.CameraChanged="CameraChanged",i))($g||{});var Kpe={},Dr=class extends jo{constructor(e){super();this.drawableLists=[];this.frustum=new eo;this.projScreenMatrix=new Ue;this.viewer=e,this.init()}static _registerDrawableClass(e){Kpe[e.prototype.getClassType()]=e}static createDrawable(e){let i=Kpe[e.type];if(!i)throw new Error(`Invalid drawable type: ${i}`);let n=e.points.map(a=>new A(a[0],a[1],a[2]||0)),s=new i(e.id,n);return s.setData(e),s}get container(){return this.viewer.viewerContainer}get camera(){return this.viewer.camera}get raycaster(){return this.viewer.getRaycaster()}getPixelSize(e,i){let{clientWidth:n,clientHeight:s}=this.container,a=0;if(i.type==="OrthographicCamera"){let o=i;a=e*Math.max(o.right-o.left,o.top-o.bottom)/o.zoom/Math.max(n,s)}else if(i.type==="PerspectiveCamera"){let o=i,l=this.viewer.cameraCfg,c=l&&St.arrayToVector3(l.eye),u=l&&St.arrayToVector3(l.look),h=c.distanceTo(u)*Math.tan(o.fov/2*Math.PI/180);a=2*e*h/s}return a}init(){this.initCanvas(),this.viewer.addEventListener("RenderAfter",()=>{this.projScreenMatrix.multiplyMatrices(this.camera.projectionMatrix,this.camera.matrixWorldInverse),this.frustum.setFromProjectionMatrix(this.projScreenMatrix),this.render()})}initCanvas(){let e=this.canvas=document.createElement("canvas"),i=this.viewer.viewerContainer;e.classList.add("overlay-renderer"),e.style.pointerEvents="none",e.style.position="absolute",e.style.left="0px",e.style.top="0px",e.style.userSelect="none",this.context=e.getContext("2d",{willReadFrequently:!0});let{clientWidth:n,clientHeight:s}=i;this.setSize(n,s),i.appendChild(e)}toHighDpr(e,i,n){let s=Math.max(window.devicePixelRatio||1,1),a=this.canvas;return a.width=i*s,a.height=n*s,e.scale(s,s),a.style.width=`${i}px`,a.style.height=`${n}px`,e}clearCanvas(){var e,i,n;(n=this.context)==null||n.clearRect(0,0,(e=this.canvas)==null?void 0:e.width,(i=this.canvas)==null?void 0:i.height)}addDrawableList(e){this.drawableLists.push(e)}render(){this.clearCanvas();let e=this.getSortedDrawables(),i=new zi;for(let n=0;n{e.push(...Array.from(i.getDrawables().values()))}),e.sort((i,n)=>n.getCenter().distanceTo(this.camera.position)-i.getCenter().distanceTo(this.camera.position)),e}getDrawablesByPosition(e,i){let n=this.getSortedDrawables().reverse(),s=[];for(let a=0;ai.clear()),this.drawableLists=[],this.canvas&&((e=this.viewer.viewerContainer)==null||e.removeChild(this.canvas),this.canvas=void 0)}};var Hp=class{constructor(r){this.drawableMap=new Map;this.category=r}addDrawable(r){this.drawableMap.set(r.id,r)}updateDrawable(r,e){r.setData(e)}removeDrawable(r){this.drawableMap.delete(r.id)}getDrawableById(r){return this.drawableMap.get(r)}clear(){this.drawableMap.clear()}getDrawables(){return this.drawableMap}getDrawableDatas(){return Array.from(this.drawableMap).map(([r,e])=>e.getData())}setDrawableDatas(r){for(let e=0;e{let a=this.transToScreenCoord(s,i);e.moveTo(a.x,a.y),e.arc(a.x,a.y,this.editPointSize,0,Math.PI*2)}),e.closePath(),e.fill(),e.restore()}setEditPointSize(e){this.editPointSize=e}setEditPointColor(e){this.editPointColor=e}getCenter(){return this.getBounds().getCenter(new A)}isPointInPath(e){let i=this.getVertexs().map(n=>new le(n.x,n.y));return Wt.isPointInPolygon(new le(e.x,e.y),i,!0)}setData(e){super.setData(e),this.update(e.points.map(i=>new A(i[0],i[1],0)))}translate(e,i){let n=new A(e,i,0);return this.points.forEach(s=>s.add(n)),this.update(this.points),this}rotate(){return this}scale(){return this}};var fo=(u=>(u.Arrow="ArrowMarkup",u.Circle="CircleMarkup",u.CloudLine="CloudLineMarkup",u.CloudLineRectangle="CloudRectMarkup",u.Dot="DotMarkup",u.Ellipse="EllipseMarkup",u.PolyLine="PolylineMarkup",u.Rectangle="RectMarkup",u.Text="TextMarkup",u.X="XMarkup",u))(fo||{});var NB=class extends jn{constructor(e,i){super(e);this.type="ArrowMarkup";this.update(i)}draw(e,i){let n=this.points.map(s=>this.transToScreenCoord(s,i));this.drawArrowLine(e,n),this.drawArrowHead(e,n[0],n[1],this.lineWidth+10,this.lineWidth+20)}drawArrowLine(e,i){e.save(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor;let[n,s]=i,a=new le().subVectors(s,n).normalize();e.beginPath(),e.moveTo(n.x,n.y);let o=s.clone().sub(a.multiplyScalar(this.lineWidth+5));e.lineTo(o.x,o.y),e.closePath(),e.stroke(),e.restore()}drawArrowHead(e,i,n,s,a){let o=Math.atan2(i.y-n.y,i.x-n.x)*180/Math.PI,l=(o+s)*Math.PI/180,c=(o-s)*Math.PI/180,u=a*Math.cos(l),h=a*Math.sin(l),p=a*Math.cos(c),d=a*Math.sin(c),f=new le(n.x+u,n.y+h),m=new le(n.x+p,n.y+d);e.save(),e.fillStyle=this.lineColor,e.beginPath(),e.moveTo(n.x,n.y),e.lineTo(f.x,f.y),e.lineTo(m.x,m.y),e.closePath(),e.fill(),e.restore()}getVertexs(){return this.points}update(e){let[i,n]=e;return this.points=e,this.x=Math.min(i.x,n.x),this.y=Math.min(i.y,n.y),this.width=Math.abs(n.x-i.x),this.height=Math.abs(n.y-i.y),this}isPointInPath(e){return Wt.isPointOnLineSegments(e,this.points,this.tolerance)}getClassType(){return"ArrowMarkup"}};Dr._registerDrawableClass(NB);var LB=class extends jn{constructor(e,i){super(e);this.radius=1;this.type="CircleMarkup";this.update(i)}draw(e,i){let[n,s]=this.points.map(a=>this.transToScreenCoord(a,i));this.radius=new le().subVectors(s,n).length(),e.save(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.fillStyle=this.fillColor,e.beginPath(),e.arc(n.x,n.y,this.radius,0,Math.PI*2),e.closePath(),e.stroke(),e.restore()}update(e){let[i,n]=e,s=new A().subVectors(n,i).length();return this.width=s*2,this.height=s*2,this.x=i.x-this.width/2,this.y=i.y-this.height/2,this.points=e,this}isPointInPath(e){let[i,n]=this.points,s=new A().subVectors(i,n).length();return Math.abs(e.distanceTo(i)-s)<=this.tolerance*2}getClassType(){return"CircleMarkup"}};Dr._registerDrawableClass(LB);var qyt=new Ot,Up=class extends jn{constructor(e,i){super(e);this.type="CloudLineMarkup";this.update(i)}draw(e,i){let n=this.points,s=[];e.save(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.fillStyle=this.fillColor,e.beginPath();for(let a=0;athis.transToScreenCoord(o,i)),a=new le().lerpVectors(n,s,.5);this.radiusX=Math.abs(s.x-n.x)/2,this.radiusY=Math.abs(s.y-n.y)/2,e.save(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.fillStyle=this.fillColor,e.beginPath(),e.ellipse(a.x,a.y,this.radiusX,this.radiusY,0,0,Math.PI*2),e.closePath(),e.stroke(),e.restore()}update(e){let[i,n]=e;return this.x=Math.min(i.x,n.x),this.y=Math.min(i.y,n.y),this.width=Math.abs(n.x-i.x),this.height=Math.abs(n.y-i.y),this.points=e,this}isPointInPath(e){let[i,n]=this.points,s=new A().lerpVectors(i,n,.5),a=Math.abs(n.x-i.x)/2,o=Math.abs(n.y-i.y)/2,l=Math.pow(e.x-s.x,2)/(a*a),c=Math.pow(e.y-s.y,2)/(o*o);return Math.abs(l+c-1)<=.1}getClassType(){return"EllipseMarkup"}};Dr._registerDrawableClass(UB);var BB=class extends jn{constructor(e,i){super(e);this.type="PolylineMarkup";this.update(i)}draw(e,i){e.save(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.fillStyle=this.fillColor;let n=this.points;e.beginPath(),n.forEach((s,a)=>{let o=this.transToScreenCoord(s,i);a===0?e.moveTo(o.x,o.y):e.lineTo(o.x,o.y)}),e.stroke(),e.restore()}isPointInPath(e){let i=this.points,n=[];for(let s=0;s{let o=this.transToScreenCoord(s,i);a===0?e.moveTo(o.x,o.y):e.lineTo(o.x,o.y)}),e.closePath(),e.stroke(),e.restore()}update(e){let[i,n]=e;return this.x=Math.min(i.x,n.x),this.y=Math.min(i.y,n.y),this.width=Math.abs(n.x-i.x),this.height=Math.abs(n.y-i.y),this.points=e,this}isPointInPath(e){let i=this.getVertexs(),n=[];for(let s=0;sthis.textWidth&&(this.textWidth=l),s.push({lineWidth:l,lineText:o})}return this.textRow!==s.length&&(this.y-=(s.length-1)*this.fontSize),s.reverse()}setFontSize(e){this.fontSize=e}update(e){let i=e[0];return this.x=i.x,this.y=i.y,this.points=[i],this.textRow=1,this}setData(e){super.setData(e),this.text=e.text,this.setFontSize(e.fontSize)}updateText(e){this.text=e}getData(){return{id:this.id,points:this.points.map(e=>[e.x,e.y]),text:this.text,lineWidth:this.lineWidth,lineColor:this.lineColor,fillColor:this.fillColor,fontSize:this.fontSize,type:this.getClassType()}}getClassType(){return"TextMarkup"}};Dr._registerDrawableClass(GB);var VB=class extends jn{constructor(e,i){super(e);this.type="XMarkup";this.update(i)}draw(e,i){e.save(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.beginPath();let[n,s,a,o]=this.getVertexs().map(l=>this.transToScreenCoord(l,i));e.moveTo(n.x,n.y),e.lineTo(a.x,a.y),e.moveTo(s.x,s.y),e.lineTo(o.x,o.y),e.closePath(),e.stroke(),e.restore()}isPointInPath(e){let[i,n,s,a]=this.getVertexs();return Wt.isPointOnLineSegments(e,[i,s,n,a],.1)}update(e){let[i,n]=e;return this.points=e,this.x=Math.min(i.x,n.x),this.y=Math.min(i.y,n.y),this.width=Math.abs(n.x-i.x),this.height=Math.abs(n.y-i.y),this}getClassType(){return"XMarkup"}};Dr._registerDrawableClass(VB);var Jpe={type:"change"},zB={type:"start"},Qpe={type:"end"},cT=class extends Ra{constructor(r,e){super(),this.object=r,this.domElement=e,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new A,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=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.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:bi.ROTATE,MIDDLE:bi.DOLLY,RIGHT:bi.PAN},this.touches={ONE:ao.ROTATE,TWO:ao.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 o.phi},this.getAzimuthalAngle=function(){return o.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(ye){ye.addEventListener("keydown",me),this._domElementKeyEvents=ye},this.saveState=function(){i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.zoom},this.reset=function(){i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(Jpe),i.update(),s=n.NONE},this.update=function(){let ye=new A,Re=new Or().setFromUnitVectors(r.up,new A(0,1,0)),ut=Re.clone().invert(),vt=new A,Et=new Or,Ct=2*Math.PI;return function(){let cr=i.object.position;ye.copy(cr).sub(i.target),ye.applyQuaternion(Re),o.setFromVector3(ye),i.autoRotate&&s===n.NONE&&w(P()),i.enableDamping?(o.theta+=l.theta*i.dampingFactor,o.phi+=l.phi*i.dampingFactor):(o.theta+=l.theta,o.phi+=l.phi);let Xt=i.minAzimuthAngle,gr=i.maxAzimuthAngle;return isFinite(Xt)&&isFinite(gr)&&(Xt<-Math.PI?Xt+=Ct:Xt>Math.PI&&(Xt-=Ct),gr<-Math.PI?gr+=Ct:gr>Math.PI&&(gr-=Ct),Xt<=gr?o.theta=Math.max(Xt,Math.min(gr,o.theta)):o.theta=o.theta>(Xt+gr)/2?Math.max(Xt,o.theta):Math.min(gr,o.theta)),o.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,o.phi)),o.makeSafe(),o.radius*=c,o.radius=Math.max(i.minDistance,Math.min(i.maxDistance,o.radius)),i.enableDamping===!0?i.target.addScaledVector(u,i.dampingFactor):i.target.add(u),ye.setFromSpherical(o),ye.applyQuaternion(ut),cr.copy(i.target).add(ye),i.object.lookAt(i.target),i.enableDamping===!0?(l.theta*=1-i.dampingFactor,l.phi*=1-i.dampingFactor,u.multiplyScalar(1-i.dampingFactor)):(l.set(0,0,0),u.set(0,0,0)),c=1,h||vt.distanceToSquared(i.object.position)>a||8*(1-Et.dot(i.object.quaternion))>a?(i.dispatchEvent(Jpe),vt.copy(i.object.position),Et.copy(i.object.quaternion),h=!1,!0):!1}}(),this.dispose=function(){i.domElement.removeEventListener("contextmenu",xe),i.domElement.removeEventListener("pointerdown",nt),i.domElement.removeEventListener("pointercancel",_e),i.domElement.removeEventListener("wheel",re),i.domElement.removeEventListener("pointermove",bt),i.domElement.removeEventListener("pointerup",mt),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",me)};let i=this,n={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},s=n.NONE,a=1e-6,o=new Pc,l=new Pc,c=1,u=new A,h=!1,p=new le,d=new le,f=new le,m=new le,g=new le,y=new le,E=new le,b=new le,x=new le,S=[],D={};function P(){return 2*Math.PI/60/60*i.autoRotateSpeed}function _(){return Math.pow(.95,i.zoomSpeed)}function w(ye){l.theta-=ye}function F(ye){l.phi-=ye}let X=function(){let ye=new A;return function(ut,vt){ye.setFromMatrixColumn(vt,0),ye.multiplyScalar(-ut),u.add(ye)}}(),H=function(){let ye=new A;return function(ut,vt){i.screenSpacePanning===!0?ye.setFromMatrixColumn(vt,1):(ye.setFromMatrixColumn(vt,0),ye.crossVectors(i.object.up,ye)),ye.multiplyScalar(ut),u.add(ye)}}(),he=function(){let ye=new A;return function(ut,vt){let Et=i.domElement;if(i.object.isPerspectiveCamera){let Ct=i.object.position;ye.copy(Ct).sub(i.target);let Dt=ye.length();Dt*=Math.tan(i.object.fov/2*Math.PI/180),X(2*ut*Dt/Et.clientHeight,i.object.matrix),H(2*vt*Dt/Et.clientHeight,i.object.matrix)}else i.object.isOrthographicCamera?(X(ut*(i.object.right-i.object.left)/i.object.zoom/Et.clientWidth,i.object.matrix),H(vt*(i.object.top-i.object.bottom)/i.object.zoom/Et.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}}();function C(ye){i.object.isPerspectiveCamera?c/=ye:i.object.isOrthographicCamera?(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom*ye)),i.object.updateProjectionMatrix(),h=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function N(ye){i.object.isPerspectiveCamera?c*=ye:i.object.isOrthographicCamera?(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/ye)),i.object.updateProjectionMatrix(),h=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function k(ye){p.set(ye.clientX,ye.clientY)}function G(ye){E.set(ye.clientX,ye.clientY)}function U(ye){m.set(ye.clientX,ye.clientY)}function j(ye){d.set(ye.clientX,ye.clientY),f.subVectors(d,p).multiplyScalar(i.rotateSpeed);let Re=i.domElement;w(2*Math.PI*f.x/Re.clientHeight),F(2*Math.PI*f.y/Re.clientHeight),p.copy(d),i.update()}function ee(ye){b.set(ye.clientX,ye.clientY),x.subVectors(b,E),x.y>0?C(_()):x.y<0&&N(_()),E.copy(b),i.update()}function ae(ye){g.set(ye.clientX,ye.clientY),y.subVectors(g,m).multiplyScalar(i.panSpeed),he(y.x,y.y),m.copy(g),i.update()}function se(ye){ye.deltaY<0?N(_()):ye.deltaY>0&&C(_()),i.update()}function ue(ye){let Re=!1;switch(ye.code){case i.keys.UP:ye.ctrlKey||ye.metaKey||ye.shiftKey?F(2*Math.PI*i.rotateSpeed/i.domElement.clientHeight):he(0,i.keyPanSpeed),Re=!0;break;case i.keys.BOTTOM:ye.ctrlKey||ye.metaKey||ye.shiftKey?F(-2*Math.PI*i.rotateSpeed/i.domElement.clientHeight):he(0,-i.keyPanSpeed),Re=!0;break;case i.keys.LEFT:ye.ctrlKey||ye.metaKey||ye.shiftKey?w(2*Math.PI*i.rotateSpeed/i.domElement.clientHeight):he(i.keyPanSpeed,0),Re=!0;break;case i.keys.RIGHT:ye.ctrlKey||ye.metaKey||ye.shiftKey?w(-2*Math.PI*i.rotateSpeed/i.domElement.clientHeight):he(-i.keyPanSpeed,0),Re=!0;break}Re&&(ye.preventDefault(),i.update())}function ve(){if(S.length===1)p.set(S[0].pageX,S[0].pageY);else{let ye=.5*(S[0].pageX+S[1].pageX),Re=.5*(S[0].pageY+S[1].pageY);p.set(ye,Re)}}function be(){if(S.length===1)m.set(S[0].pageX,S[0].pageY);else{let ye=.5*(S[0].pageX+S[1].pageX),Re=.5*(S[0].pageY+S[1].pageY);m.set(ye,Re)}}function de(){let ye=S[0].pageX-S[1].pageX,Re=S[0].pageY-S[1].pageY,ut=Math.sqrt(ye*ye+Re*Re);E.set(0,ut)}function we(){i.enableZoom&&de(),i.enablePan&&be()}function Fe(){i.enableZoom&&de(),i.enableRotate&&ve()}function je(ye){if(S.length==1)d.set(ye.pageX,ye.pageY);else{let ut=gt(ye),vt=.5*(ye.pageX+ut.x),Et=.5*(ye.pageY+ut.y);d.set(vt,Et)}f.subVectors(d,p).multiplyScalar(i.rotateSpeed);let Re=i.domElement;w(2*Math.PI*f.x/Re.clientHeight),F(2*Math.PI*f.y/Re.clientHeight),p.copy(d)}function Oe(ye){if(S.length===1)g.set(ye.pageX,ye.pageY);else{let Re=gt(ye),ut=.5*(ye.pageX+Re.x),vt=.5*(ye.pageY+Re.y);g.set(ut,vt)}y.subVectors(g,m).multiplyScalar(i.panSpeed),he(y.x,y.y),m.copy(g)}function dt(ye){let Re=gt(ye),ut=ye.pageX-Re.x,vt=ye.pageY-Re.y,Et=Math.sqrt(ut*ut+vt*vt);b.set(0,Et),x.set(0,Math.pow(b.y/E.y,i.zoomSpeed)),C(x.y),E.copy(b)}function Be(ye){i.enableZoom&&dt(ye),i.enablePan&&Oe(ye)}function ke(ye){i.enableZoom&&dt(ye),i.enableRotate&&je(ye)}function nt(ye){i.enabled!==!1&&(S.length===0&&(i.domElement.setPointerCapture(ye.pointerId),i.domElement.addEventListener("pointermove",bt),i.domElement.addEventListener("pointerup",mt)),Ce(ye),ye.pointerType==="touch"?z(ye):J(ye))}function bt(ye){i.enabled!==!1&&(ye.pointerType==="touch"?Y(ye):$(ye))}function mt(ye){Ge(ye),S.length===0&&(i.domElement.releasePointerCapture(ye.pointerId),i.domElement.removeEventListener("pointermove",bt),i.domElement.removeEventListener("pointerup",mt)),i.dispatchEvent(Qpe),s=n.NONE}function _e(ye){Ge(ye)}function J(ye){let Re;switch(ye.button){case 0:Re=i.mouseButtons.LEFT;break;case 1:Re=i.mouseButtons.MIDDLE;break;case 2:Re=i.mouseButtons.RIGHT;break;default:Re=-1}switch(Re){case bi.DOLLY:if(i.enableZoom===!1)return;G(ye),s=n.DOLLY;break;case bi.ROTATE:if(ye.ctrlKey||ye.metaKey||ye.shiftKey){if(i.enablePan===!1)return;U(ye),s=n.PAN}else{if(i.enableRotate===!1)return;k(ye),s=n.ROTATE}break;case bi.PAN:if(ye.ctrlKey||ye.metaKey||ye.shiftKey){if(i.enableRotate===!1)return;k(ye),s=n.ROTATE}else{if(i.enablePan===!1)return;U(ye),s=n.PAN}break;default:s=n.NONE}s!==n.NONE&&i.dispatchEvent(zB)}function $(ye){switch(s){case n.ROTATE:if(i.enableRotate===!1)return;j(ye);break;case n.DOLLY:if(i.enableZoom===!1)return;ee(ye);break;case n.PAN:if(i.enablePan===!1)return;ae(ye);break}}function re(ye){i.enabled===!1||i.enableZoom===!1||s!==n.NONE||(ye.preventDefault(),i.dispatchEvent(zB),se(ye),i.dispatchEvent(Qpe))}function me(ye){i.enabled===!1||i.enablePan===!1||ue(ye)}function z(ye){switch(Ze(ye),S.length){case 1:switch(i.touches.ONE){case ao.ROTATE:if(i.enableRotate===!1)return;ve(),s=n.TOUCH_ROTATE;break;case ao.PAN:if(i.enablePan===!1)return;be(),s=n.TOUCH_PAN;break;default:s=n.NONE}break;case 2:switch(i.touches.TWO){case ao.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;we(),s=n.TOUCH_DOLLY_PAN;break;case ao.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Fe(),s=n.TOUCH_DOLLY_ROTATE;break;default:s=n.NONE}break;default:s=n.NONE}s!==n.NONE&&i.dispatchEvent(zB)}function Y(ye){switch(Ze(ye),s){case n.TOUCH_ROTATE:if(i.enableRotate===!1)return;je(ye),i.update();break;case n.TOUCH_PAN:if(i.enablePan===!1)return;Oe(ye),i.update();break;case n.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;Be(ye),i.update();break;case n.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;ke(ye),i.update();break;default:s=n.NONE}}function xe(ye){i.enabled!==!1&&ye.preventDefault()}function Ce(ye){S.push(ye)}function Ge(ye){delete D[ye.pointerId];for(let Re=0;Ren.far&&(r=r.clone().sub(e).normalize().multiplyScalar(n.far*.9),console.warn("[BimViewer] camera could be too far to see the object!"))}let a=(h,p)=>{n.lookAt(p),n.position.set(h.x,h.y,h.z),s.target.set(p.x,p.y,p.z),s.update()},o=n.position.clone(),l=s.target.clone(),c=this.flyDuration,u=Date.now();this.cameraUpdateInterval&&clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=setInterval(()=>{let h=Date.now()-u;h>c&&(h=c);let p=(m,g,y)=>{let E=m.x+(g.x-m.x)*y,b=m.y+(g.y-m.y)*y,x=m.z+(g.z-m.z)*y;return new A(E,b,x)},d=p(o,r,h/c),f=p(l,e,h/c);a(d,f),h>=c&&(clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=void 0,i&&i())},10)}lookTo(r){let e=this.camera,i=this.controls;if(!e||!i)return;let n=e.position,s=i.target.distanceTo(n),a=r.normalize().multiplyScalar(s),o=new A(n.x+a.x,n.y+a.y,n.z+a.z);this.flyTo(n,o)}startAutoRotate(){let r=this.camera,e=this.controls;if(!r||!e)return;e.autoRotate=!0;let i=new A;r.getWorldPosition(i);let n=e.target;if(n.y===i.y)return;let s=n.y-i.y,a=50,l=1500/a,c=s/a;for(let u=0;u{let h=e.target.y-c;e.target.setY(h),e.update()},u*l)}delayAutoRotate(){this.autoRotateRemainingTime=5e3,this.controls&&(this.controls.autoRotate=!1)}startToRotate(r){let i=Date.now()-this.rotateIntervalStartTime;this.rotateIntervalStartTime=Date.now(),!(this.rotateInterval&&i<100)&&(this.rotateInterval&&clearInterval(this.rotateInterval),this.rotateInterval=setInterval(()=>{if(Date.now()-this.rotateIntervalStartTime>=100){clearInterval(this.rotateInterval),this.rotateInterval=void 0;return}let s=.3;r.code==="ArrowLeft"||r.code==="ArrowRight"?this.rotateLeftOrRight(s,r.code==="ArrowLeft"):(r.code==="ArrowUp"||r.code==="ArrowDown")&&this.rotateUpOrDown(s,r.code==="ArrowUp")},1))}rotateLeftOrRight(r,e=!0){let i=this.controls;if(!this.camera||!i)return;let n=this.camera.position,s=i.target,a=s.clone(),o=Math.PI*r/180;e&&(o=-o),a.x=(s.x-n.x)*Math.cos(o)-(s.z-n.z)*Math.sin(o)+n.x,a.z=(s.z-n.z)*Math.cos(o)+(s.x-n.x)*Math.sin(o)+n.z,this.camera.lookAt(a),i.target=a,i.update()}rotateUpOrDown(r,e=!0){let i=this.controls;if(!this.camera||!i)return;let n=this.camera.position,s=i.target,a=s.clone(),o=Math.PI*r/180,c=new A(s.x-n.x,s.y-n.y,s.z-n.z).length(),u=s.y-n.y;e||(o=-o);let h=Math.asin(u/c)+o;if(h<-Math.PI/2||h>Math.PI/2)return;let p=Math.sin(h)*c;a.y=s.y+(p-u),i.target=a,i.update()}};var qC=class{constructor(r){this.object=r}instantiate(){let r=Date.now();this.instantiateInner(this.object),console.log(`[Inst] instantiate() costed ${(Date.now()-r)/1e3}s`)}instantiateInner(r){if(!r.children||r.children.length===0)return;let e=r.children.length,i={},n=[];for(let o=0;o0||!l.geometry)continue;let c=!1,u=Object.values(i);for(let h=u.length-1;h>=0;--h){let p=u[h].indexes[0],d=r.children[p];if(this.geometryEquals(l.geometry,d.geometry)&&Cs.materialsEquals(l.material,d.material)){i[p]||(i[p]={indexes:[p]},this.removeFromArray(n,p)),i[p].indexes.push(o),c=!0;break}}for(let h=n.length-1;!c&&h>=0;--h){let p=n[h],d=r.children[p];if(this.geometryEquals(l.geometry,d.geometry)&&Cs.materialsEquals(l.material,d.material)){i[p]||(i[p]={indexes:[p]},this.removeFromArray(n,p)),i[p].indexes.push(o),c=!0;break}}c||n.push(o)}if(Object.keys(i).length<=0)return;let s=[],a=[];Object.values(i).forEach(o=>{let l=o.indexes;a.push(...l);let c=r.children[l[0]],u=c.material;if(u instanceof Gr)u=u.clone();else if(Array.isArray(u)){let p=[];u.forEach(d=>p.push(d.clone())),u=p}let h=new tn(c.geometry,u,l.length);h.name=`[Instanced] ${c.name}`;for(let p=0;pl-o),a.forEach(o=>r.remove(r.children[o])),s.forEach(o=>{o.parent=r,r.children.push(o)}),r.updateMatrix(),console.log(`[Inst] ${a.length}(out of ${e}) objects instanced to ${s.length} InstancedMesh`)}removeFromArray(r,e){for(let i=r.length-1;i>=0;--i)if(r[i]===e){r.splice(i,1);return}}geometryEquals(r,e){return Wt.geometryEquals(r,e)}};var uT=class{constructor(){this.TIMEOUT="timeout";this.INTERVAL="interval";this.timeoutMap={};this.intervalMap={}}run(r=this.INTERVAL,e,i=16.7){let n=Date.now,s=n(),a=s,o=Symbol(""),l=()=>{this.setIdMap(o,r,l),a=n(),a-s>=i&&(r===this.intervalMap&&(s=n(),a=s),e(),r===this.TIMEOUT&&this.clearTimeout(o))};return this.setIdMap(o,r,l),o}setIdMap(r,e,i){let n=requestAnimationFrame(i);e===this.INTERVAL?this.intervalMap[r]=n:e===this.TIMEOUT&&(this.timeoutMap[r]=n)}setTimeout(r,e){return this.run(this.TIMEOUT,r,e)}clearTimeout(r){cancelAnimationFrame(this.timeoutMap[r])}setInterval(r,e){return this.run(this.INTERVAL,r,e)}clearInterval(r){cancelAnimationFrame(this.intervalMap[r])}};var qB=Un(ede(),1),Df=class{constructor(r,e){this.endian=e&&e==="big"?"big":"little",this.position=0,this.data=new DataView(r)}readAsciiString(r){if(this.data.byteLength256||k.colormap_size!==24||k.colormap_type!==1)&&console.error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case d:case f:case g:case y:k.colormap_type&&console.error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case h:console.error("THREE.TGALoader: No data.");default:console.error('THREE.TGALoader: Invalid type "%s".',k.image_type)}(k.width<=0||k.height<=0)&&console.error("THREE.TGALoader: Invalid image size."),k.pixel_size!==8&&k.pixel_size!==16&&k.pixel_size!==24&&k.pixel_size!==32&&console.error('THREE.TGALoader: Invalid pixel size "%s".',k.pixel_size)}function i(k,G,U,j,ee){let ae,se,ue=U.pixel_size>>3,ve=U.width*U.height*ue;if(G&&(se=ee.subarray(j,j+=U.colormap_length*(U.colormap_size>>3))),k){ae=new Uint8Array(ve);let be,de,we,Fe=0,je=new Uint8Array(ue);for(;Fe>7,k[(de+Fe*we)*4+1]=(ve&992)>>2,k[(de+Fe*we)*4+2]=(ve&31)<<3,k[(de+Fe*we)*4+3]=ve&32768?0:255;return k}function a(k,G,U,j,ee,ae,se,ue){let ve=0,be,de,we=F.width;for(de=G;de!==j;de+=U)for(be=ee;be!==se;be+=ae,ve+=3)k[(be+we*de)*4+3]=255,k[(be+we*de)*4+2]=ue[ve+0],k[(be+we*de)*4+1]=ue[ve+1],k[(be+we*de)*4+0]=ue[ve+2];return k}function o(k,G,U,j,ee,ae,se,ue){let ve=0,be,de,we=F.width;for(de=G;de!==j;de+=U)for(be=ee;be!==se;be+=ae,ve+=4)k[(be+we*de)*4+2]=ue[ve+0],k[(be+we*de)*4+1]=ue[ve+1],k[(be+we*de)*4+0]=ue[ve+2],k[(be+we*de)*4+3]=ue[ve+3];return k}function l(k,G,U,j,ee,ae,se,ue){let ve,be=0,de,we,Fe=F.width;for(we=G;we!==j;we+=U)for(de=ee;de!==se;de+=ae,be++)ve=ue[be],k[(de+Fe*we)*4+0]=ve,k[(de+Fe*we)*4+1]=ve,k[(de+Fe*we)*4+2]=ve,k[(de+Fe*we)*4+3]=255;return k}function c(k,G,U,j,ee,ae,se,ue){let ve=0,be,de,we=F.width;for(de=G;de!==j;de+=U)for(be=ee;be!==se;be+=ae,ve+=2)k[(be+we*de)*4+0]=ue[ve+0],k[(be+we*de)*4+1]=ue[ve+0],k[(be+we*de)*4+2]=ue[ve+0],k[(be+we*de)*4+3]=ue[ve+1];return k}function u(k,G,U,j,ee){let ae,se,ue,ve,be,de;switch((F.flags&E)>>b){default:case D:ae=0,ue=1,be=G,se=0,ve=1,de=U;break;case x:ae=0,ue=1,be=G,se=U-1,ve=-1,de=-1;break;case P:ae=G-1,ue=-1,be=-1,se=0,ve=1,de=U;break;case S:ae=G-1,ue=-1,be=-1,se=U-1,ve=-1,de=-1;break}if(he)switch(F.pixel_size){case 8:l(k,se,ve,de,ae,ue,be,j);break;case 16:c(k,se,ve,de,ae,ue,be,j);break;default:console.error("THREE.TGALoader: Format not supported.");break}else switch(F.pixel_size){case 8:n(k,se,ve,de,ae,ue,be,j,ee);break;case 16:s(k,se,ve,de,ae,ue,be,j);break;case 24:a(k,se,ve,de,ae,ue,be,j);break;case 32:o(k,se,ve,de,ae,ue,be,j);break;default:console.error("THREE.TGALoader: Format not supported.");break}return k}let h=0,p=1,d=2,f=3,m=9,g=10,y=11,E=48,b=4,x=0,S=1,D=2,P=3;r.length<19&&console.error("THREE.TGALoader: Not enough data to contain header.");let _=0,w=new Uint8Array(r),F={id_length:w[_++],colormap_type:w[_++],image_type:w[_++],colormap_index:w[_++]|w[_++]<<8,colormap_length:w[_++]|w[_++]<<8,colormap_size:w[_++],origin:[w[_++]|w[_++]<<8,w[_++]|w[_++]<<8],width:w[_++]|w[_++]<<8,height:w[_++]|w[_++]<<8,pixel_size:w[_++],flags:w[_++]};e(F),F.id_length+_>r.length&&console.error("THREE.TGALoader: No data."),_+=F.id_length;let X=!1,H=!1,he=!1;switch(F.image_type){case m:X=!0,H=!0;break;case p:H=!0;break;case g:X=!0;break;case d:break;case y:X=!0,he=!0;break;case f:he=!0;break}let C=new Uint8Array(F.width*F.height*4),N=i(X,H,F,_,w);return u(C,F.width,F.height,N.pixel_data,N.palettes),{data:C,width:F.width,height:F.height,flipY:!0,generateMipmaps:!0,minFilter:wa}}};var YC=class extends li{constructor(r){super(r)}load(r,e,i,n){let s=this,a=s.path===""?ks.extractUrlBase(r):s.path,o=new ci(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(r,function(l){try{e(s.parse(l,a))}catch(c){n?n(c):console.error(c),s.manager.itemError(r)}},i,n)}parse(r,e){function i(K,Z){let ce=[],oe=K.childNodes;for(let pe=0,qe=oe.length;pe0&&Z.push(new no(oe+".position",pe,qe)),et.length>0&&Z.push(new Da(oe+".quaternion",pe,et)),Ht.length>0&&Z.push(new no(oe+".scale",pe,Ht)),Z}function X(K,Z,ce){let oe,pe=!0,qe,et;for(qe=0,et=K.length;qe=0;){let oe=K[Z];if(oe.value[ce]!==null)return oe;Z--}return null}function C(K,Z,ce){for(;Z>>0)+2);switch(ce=ce.toLowerCase(),ce){case"tga":Z=Ih;break;default:Z=xh}return Z}function Ze(K){let Z=xe(K.url),ce=Z.profile.technique,oe;switch(ce.type){case"phong":case"blinn":oe=new Ts;break;case"lambert":oe=new io;break;default:oe=new or;break}oe.name=K.name||"";function pe(Mt,Ft=null){let $t=Z.profile.samplers[Mt.id],pt=null;if($t!==void 0){let qt=Z.profile.surfaces[$t.source];pt=Fe(qt.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),pt=Fe(Mt.id);if(pt!==null){let qt=Ge(pt);if(qt!==void 0){let zt=qt.load(pt),ur=Mt.extra;if(ur!==void 0&&ur.technique!==void 0&&c(ur.technique)===!1){let sr=ur.technique;zt.wrapS=sr.wrapU?gn:mn,zt.wrapT=sr.wrapV?gn:mn,zt.offset.set(sr.offsetU||0,sr.offsetV||0),zt.repeat.set(sr.repeatU||1,sr.repeatV||1)}else zt.wrapS=gn,zt.wrapT=gn;return Ft!==null&&(zt.encoding=Ft),zt}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",pt),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",Mt.id),null}let qe=ce.parameters;for(let Mt in qe){let Ft=qe[Mt];switch(Mt){case"diffuse":Ft.color&&oe.color.fromArray(Ft.color),Ft.texture&&(oe.map=pe(Ft.texture,yr));break;case"specular":Ft.color&&oe.specular&&oe.specular.fromArray(Ft.color),Ft.texture&&(oe.specularMap=pe(Ft.texture));break;case"bump":Ft.texture&&(oe.normalMap=pe(Ft.texture));break;case"ambient":Ft.texture&&(oe.lightMap=pe(Ft.texture,yr));break;case"shininess":Ft.float&&oe.shininess&&(oe.shininess=Ft.float);break;case"emission":Ft.color&&oe.emissive&&oe.emissive.fromArray(Ft.color),Ft.texture&&(oe.emissiveMap=pe(Ft.texture,yr));break}}oe.color.convertSRGBToLinear(),oe.specular&&oe.specular.convertSRGBToLinear(),oe.emissive&&oe.emissive.convertSRGBToLinear();let et=qe.transparent,Ht=qe.transparency;if(Ht===void 0&&et&&(Ht={float:1}),et===void 0&&Ht&&(et={opaque:"A_ONE",data:{color:[1,1,1,1]}}),et&&Ht)if(et.data.texture)oe.transparent=!0;else{let Mt=et.data.color;switch(et.opaque){case"A_ONE":oe.opacity=Mt[3]*Ht.float;break;case"RGB_ZERO":oe.opacity=1-Mt[0]*Ht.float;break;case"A_ZERO":oe.opacity=1-Mt[3]*Ht.float;break;case"RGB_ONE":oe.opacity=Mt[0]*Ht.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',et.opaque)}oe.opacity<1&&(oe.transparent=!0)}if(ce.extra!==void 0&&ce.extra.technique!==void 0){let Mt=ce.extra.technique;for(let Ft in Mt){let $t=Mt[Ft];switch(Ft){case"double_sided":oe.side=$t===1?wi:en;break;case"bump":oe.normalMap=pe($t.texture),oe.normalScale=new le(1,1);break}}}return oe}function gt(K){return m(Qt.materials[K],Ze)}function ye(K){let Z={name:K.getAttribute("name")};for(let ce=0,oe=K.childNodes.length;ce0?et+Mt:et;Z.inputs[Ft]={id:qe,offset:Ht},Z.stride=Math.max(Z.stride,Ht+1),et==="TEXCOORD"&&(Z.hasUV=!0);break;case"vcount":Z.vcount=a(pe.textContent);break;case"p":Z.p=a(pe.textContent);break}}return Z}function Rr(K){let Z={};for(let ce=0;ce0&&Z0&&pt.setAttribute("position",new ct(pe.array,pe.stride)),qe.array.length>0&&pt.setAttribute("normal",new ct(qe.array,qe.stride)),Mt.array.length>0&&pt.setAttribute("color",new ct(Mt.array,Mt.stride)),et.array.length>0&&pt.setAttribute("uv",new ct(et.array,et.stride)),Ht.array.length>0&&pt.setAttribute("uv2",new ct(Ht.array,Ht.stride)),Ft.array.length>0&&pt.setAttribute("skinIndex",new ct(Ft.array,Ft.stride)),$t.array.length>0&&pt.setAttribute("skinWeight",new ct($t.array,$t.stride)),oe.data=pt,oe.type=K[0].type,oe.materialKeys=qt,oe}function Kt(K,Z,ce,oe,pe=!1){let qe=K.p,et=K.stride,Ht=K.vcount;function Mt(pt){let qt=qe[pt+ce]*$t,zt=qt+$t;for(;qt4)for(let sr=1,xi=ur-2;sr<=xi;sr++){let ar=pt+et*0,Zt=pt+et*sr,ti=pt+et*(sr+1);Mt(ar),Mt(Zt),Mt(ti)}pt+=et*ur}}else for(let pt=0,qt=qe.length;pt=Z.limits.max&&(Z.static=!0),Z.middlePosition=(Z.limits.min+Z.limits.max)/2,Z}function ze(K){let Z={sid:K.getAttribute("sid"),name:K.getAttribute("name")||"",attachments:[],transforms:[]};for(let ce=0;cezt.limits.max||pt{this.decodeDracoFile(a,e).catch(n)},i,n)}decodeDracoFile(r,e,i,n){let s={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:n||this.defaultAttributeTypes,useUniqueIDs:!!i};return this.decodeGeometry(r,s).then(e)}decodeGeometry(r,e){let i=JSON.stringify(e);if(YB.has(r)){let l=YB.get(r);if(l.key===i)return l.promise;if(r.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let n,s=this.workerNextTaskID++,a=r.byteLength,o=this._getWorker(s,a).then(l=>(n=l,new Promise((c,u)=>{n._callbacks[s]={resolve:c,reject:u},n.postMessage({type:"decode",id:s,taskConfig:e,buffer:r},[r])}))).then(l=>this._createGeometry(l.geometry));return o.catch(()=>!0).then(()=>{n&&s&&this._releaseTask(n,s)}),YB.set(r,{key:i,promise:o}),o}_createGeometry(r){let e=new it;r.index&&e.setIndex(new jt(r.index.array,1));for(let i=0;i{i.load(r,n,void 0,s)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;let r=typeof WebAssembly!="object"||this.decoderConfig.type==="js",e=[];return r?e.push(this._loadLibrary("draco_decoder.js","text")):(e.push(this._loadLibrary("draco_wasm_wrapper.js","text")),e.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(e).then(i=>{let n=i[0];r||(this.decoderConfig.wasmBinary=i[1]);let s=Yyt.toString(),a=["/* draco decoder */",n,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(` -`);this.workerSourceURL=URL.createObjectURL(new Blob([a]))}),this.decoderPending}_getWorker(r,e){return this._initDecoder().then(()=>{if(this.workerPool.lengths._taskLoad?-1:1});let i=this.workerPool[this.workerPool.length-1];return i._taskCosts[r]=e,i._taskLoad+=e,i})}_releaseTask(r,e){r._taskLoad-=r._taskCosts[e],delete r._callbacks[e],delete r._taskCosts[e]}debug(){console.log("Task load: ",this.workerPool.map(r=>r._taskLoad))}dispose(){for(let r=0;r{let h=u.draco,p=new h.Decoder,d=new h.DecoderBuffer;d.Init(new Int8Array(l),l.byteLength);try{let f=e(h,p,d,c),m=f.attributes.map(g=>g.array.buffer);f.index&&m.push(f.index.array.buffer),self.postMessage({type:"decode",id:o.id,geometry:f},m)}catch(f){console.error(f),self.postMessage({type:"error",id:o.id,error:f.message})}finally{h.destroy(d),h.destroy(p)}});break}};function e(a,o,l,c){let u=c.attributeIDs,h=c.attributeTypes,p,d,f=o.GetEncodedGeometryType(l);if(f===a.TRIANGULAR_MESH)p=new a.Mesh,d=o.DecodeBufferToMesh(l,p);else if(f===a.POINT_CLOUD)p=new a.PointCloud,d=o.DecodeBufferToPointCloud(l,p);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!d.ok()||p.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+d.error_msg());let m={index:null,attributes:[]};for(let g in u){let y=self[h[g]],E,b;if(c.useUniqueIDs)b=u[g],E=o.GetAttributeByUniqueId(p,b);else{if(b=o.GetAttributeId(p,a[u[g]]),b===-1)continue;E=o.GetAttribute(p,b)}m.attributes.push(n(a,o,p,g,y,E))}return f===a.TRIANGULAR_MESH&&(m.index=i(a,o,p)),a.destroy(p),m}function i(a,o,l){let u=l.num_faces()*3,h=u*4,p=a._malloc(h);o.GetTrianglesUInt32Array(l,h,p);let d=new Uint32Array(a.HEAPF32.buffer,p,u).slice();return a._free(p),{array:d,itemSize:1}}function n(a,o,l,c,u,h){let p=h.num_components(),f=l.num_points()*p,m=f*u.BYTES_PER_ELEMENT,g=s(a,u),y=a._malloc(m);o.GetAttributeDataArrayForAllPoints(l,h,g,m,y);let E=new u(a.HEAPF32.buffer,y,f).slice();return a._free(y),{name:c,array:E,itemSize:p}}function s(a,o){switch(o){case Float32Array:return a.DT_FLOAT32;case Int8Array:return a.DT_INT8;case Int16Array:return a.DT_INT16;case Int32Array:return a.DT_INT32;case Uint8Array:return a.DT_UINT8;case Uint16Array:return a.DT_UINT16;case Uint32Array:return a.DT_UINT32}}}var tde=function(t){return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))},Xyt=function(t){return new Worker(t)};try{URL.revokeObjectURL(tde(""))}catch(t){tde=function(r){return"data:application/javascript;charset=UTF-8,"+encodeURI(r)},Xyt=function(r){return new Worker(r,{type:"module"})}}var Ul=Uint8Array,Cf=Uint16Array,ZB=Uint32Array,rde=new Ul([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ide=new Ul([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),$yt=new Ul([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),nde=function(t,r){for(var e=new Cf(31),i=0;i<31;++i)e[i]=r+=1<>>1|(Ui&21845)<<1,Bp=(Bp&52428)>>>2|(Bp&13107)<<2,Bp=(Bp&61680)>>>4|(Bp&3855)<<4,KB[Ui]=((Bp&65280)>>>8|(Bp&255)<<8)>>>1;var Bp,Ui,Wx=function(t,r,e){for(var i=t.length,n=0,s=new Cf(r);n>>l]=c}else for(o=new Cf(i),n=0;n>>15-t[n]);return o},qx=new Ul(288);for(Ui=0;Ui<144;++Ui)qx[Ui]=8;var Ui;for(Ui=144;Ui<256;++Ui)qx[Ui]=9;var Ui;for(Ui=256;Ui<280;++Ui)qx[Ui]=7;var Ui;for(Ui=280;Ui<288;++Ui)qx[Ui]=8;var Ui,lde=new Ul(32);for(Ui=0;Ui<32;++Ui)lde[Ui]=5;var Ui;var Jyt=Wx(qx,9,1);var Qyt=Wx(lde,5,1),XB=function(t){for(var r=t[0],e=1;er&&(r=t[e]);return r},Fc=function(t,r,e){var i=r/8|0;return(t[i]|t[i+1]<<8)>>(r&7)&e},$B=function(t,r){var e=r/8|0;return(t[e]|t[e+1]<<8|t[e+2]<<16)>>(r&7)},eTt=function(t){return(t/8|0)+(t&7&&1)},tTt=function(t,r,e){(r==null||r<0)&&(r=0),(e==null||e>t.length)&&(e=t.length);var i=new(t instanceof Cf?Cf:t instanceof ZB?ZB:Ul)(e-r);return i.set(t.subarray(r,e)),i},rTt=function(t,r,e){var i=t.length;if(!i||e&&!e.l&&i<5)return r||new Ul(0);var n=!r||e,s=!e||e.i;e||(e={}),r||(r=new Ul(i*3));var a=function(de){var we=r.length;if(de>we){var Fe=new Ul(Math.max(we*2,de));Fe.set(r),r=Fe}},o=e.f||0,l=e.p||0,c=e.b||0,u=e.l,h=e.d,p=e.m,d=e.n,f=i*8;do{if(!u){e.f=o=Fc(t,l,1);var m=Fc(t,l+1,3);if(l+=3,m)if(m==1)u=Jyt,h=Qyt,p=9,d=5;else if(m==2){var b=Fc(t,l,31)+257,x=Fc(t,l+10,15)+4,S=b+Fc(t,l+5,31)+1;l+=14;for(var D=new Ul(S),P=new Ul(19),_=0;_>>4;if(g<16)D[_++]=g;else{var he=0,C=0;for(g==16?(C=3+Fc(t,l,3),l+=2,he=D[_-1]):g==17?(C=3+Fc(t,l,7),l+=3):g==18&&(C=11+Fc(t,l,127),l+=7);C--;)D[_++]=he}}var N=D.subarray(0,b),k=D.subarray(b);p=XB(N),d=XB(k),u=Wx(N,p,1),h=Wx(k,d,1)}else throw"invalid block type";else{var g=eTt(l)+4,y=t[g-4]|t[g-3]<<8,E=g+y;if(E>i){if(s)throw"unexpected EOF";break}n&&a(c+y),r.set(t.subarray(g,E),c),e.b=c+=y,e.p=l=E*8;continue}if(l>f){if(s)throw"unexpected EOF";break}}n&&a(c+131072);for(var G=(1<>>4;if(l+=he&15,l>f){if(s)throw"unexpected EOF";break}if(!he)throw"invalid length/literal";if(ee<256)r[c++]=ee;else if(ee==256){j=l,u=null;break}else{var ae=ee-254;if(ee>264){var _=ee-257,se=rde[_];ae=Fc(t,l,(1<>>4;if(!ue)throw"invalid distance";l+=ue&15;var k=Kyt[ve];if(ve>3){var se=ide[ve];k+=$B(t,l)&(1<f){if(s)throw"unexpected EOF";break}n&&a(c+131072);for(var be=c+ae;c>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(t[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function cde(t,r){return rTt((nTt(t),t.subarray(2,-4)),r)}var sTt=typeof TextDecoder!="undefined"&&new TextDecoder,aTt=0;try{sTt.decode(iTt,{stream:!0}),aTt=1}catch(t){}function ude(t,r,e){let i=e.length-t-1;if(r>=e[i])return i-1;if(r<=e[t])return t;let n=t,s=i,a=Math.floor((n+s)/2);for(;r=e[a+1];)r=m&&(f[d][0]=f[p][0]/o[E+1][y],g=f[d][0]*o[y][E]);let b=y>=-1?1:-y,x=h-1<=E?m-1:e-h;for(let D=b;D<=x;++D)f[d][D]=(f[p][D]-f[p][D-1])/o[E+1][y+D],g+=f[d][D]*o[y+D][E];h<=E&&(f[d][m]=-f[p][m-1]/o[E+1][h],g+=f[d][m]*o[h][E]),a[m][h]=g;let S=p;p=d,d=S}}let u=e;for(let h=1;h<=i;++h){for(let p=0;p<=e;++p)a[h][p]*=u;u*=e-h}return a}function uTt(t,r,e,i,n){let s=n0,l=typeof s.Content=="string"&&s.Content!=="";if(o||l){let c=this.parseImage(i[n]);e[s.RelativeFilename||s.Filename]=c}}}}for(let i in r){let n=r[i];e[n]!==void 0?r[i]=e[n]:r[i]=r[i].split("\\").pop()}return r}parseImage(r){let e=r.Content,i=r.RelativeFilename||r.Filename,n=i.slice(i.lastIndexOf(".")+1).toLowerCase(),s;switch(n){case"bmp":s="image/bmp";break;case"jpg":case"jpeg":s="image/jpeg";break;case"png":s="image/png";break;case"tif":s="image/tiff";break;case"tga":this.manager.getHandler(".tga")===null&&console.warn("FBXLoader: TGA loader not found, skipping ",i),s="image/tga";break;default:console.warn('FBXLoader: Image type "'+n+'" is not supported.');return}if(typeof e=="string")return"data:"+s+";base64,"+e;{let a=new Uint8Array(e);return window.URL.createObjectURL(new Blob([a],{type:s}))}}parseTextures(r){let e=new Map;if("Texture"in ui.Objects){let i=ui.Objects.Texture;for(let n in i){let s=this.parseTexture(i[n],r);e.set(parseInt(n),s)}}return e}parseTexture(r,e){let i=this.loadTexture(r,e);i.ID=r.id,i.name=r.attrName;let n=r.WrapModeU,s=r.WrapModeV,a=n!==void 0?n.value:0,o=s!==void 0?s.value:0;if(i.wrapS=a===0?gn:mn,i.wrapT=o===0?gn:mn,"Scaling"in r){let l=r.Scaling.value;i.repeat.x=l[0],i.repeat.y=l[1]}if("Translation"in r){let l=r.Translation.value;i.offset.x=l[0],i.offset.y=l[1]}return i}loadTexture(r,e){let i,n=this.textureLoader.path,s=rs.get(r.id).children;s!==void 0&&s.length>0&&e[s[0].ID]!==void 0&&(i=e[s[0].ID],(i.indexOf("blob:")===0||i.indexOf("data:")===0)&&this.textureLoader.setPath(void 0));let a,o=r.FileName.slice(-3).toLowerCase();if(o==="tga"){let l=this.manager.getHandler(".tga");l===null?(console.warn("FBXLoader: TGA loader not found, creating placeholder texture for",r.RelativeFilename),a=new Hi):(l.setPath(this.textureLoader.path),a=l.load(i))}else o==="psd"?(console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for",r.RelativeFilename),a=new Hi):a=this.textureLoader.load(i);return this.textureLoader.setPath(n),a}parseMaterials(r){let e=new Map;if("Material"in ui.Objects){let i=ui.Objects.Material;for(let n in i){let s=this.parseMaterial(i[n],r);s!==null&&e.set(parseInt(n),s)}}return e}parseMaterial(r,e){let i=r.id,n=r.attrName,s=r.ShadingModel;if(typeof s=="object"&&(s=s.value),!rs.has(i))return null;let a=this.parseParameters(r,e,i),o;switch(s.toLowerCase()){case"phong":o=new Ts;break;case"lambert":o=new io;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',s),o=new Ts;break}return o.setValues(a),o.name=n,o}parseParameters(r,e,i){let n={};r.BumpFactor&&(n.bumpScale=r.BumpFactor.value),r.Diffuse?n.color=new Ve().fromArray(r.Diffuse.value):r.DiffuseColor&&(r.DiffuseColor.type==="Color"||r.DiffuseColor.type==="ColorRGB")&&(n.color=new Ve().fromArray(r.DiffuseColor.value)),r.DisplacementFactor&&(n.displacementScale=r.DisplacementFactor.value),r.Emissive?n.emissive=new Ve().fromArray(r.Emissive.value):r.EmissiveColor&&(r.EmissiveColor.type==="Color"||r.EmissiveColor.type==="ColorRGB")&&(n.emissive=new Ve().fromArray(r.EmissiveColor.value)),r.EmissiveFactor&&(n.emissiveIntensity=parseFloat(r.EmissiveFactor.value)),r.Opacity&&(n.opacity=parseFloat(r.Opacity.value)),n.opacity<1&&(n.transparent=!0),r.ReflectionFactor&&(n.reflectivity=r.ReflectionFactor.value),r.Shininess&&(n.shininess=r.Shininess.value),r.Specular?n.specular=new Ve().fromArray(r.Specular.value):r.SpecularColor&&r.SpecularColor.type==="Color"&&(n.specular=new Ve().fromArray(r.SpecularColor.value));let s=this;return rs.get(i).children.forEach(function(a){let o=a.relationship;switch(o){case"Bump":n.bumpMap=s.getTexture(e,a.ID);break;case"Maya|TEX_ao_map":n.aoMap=s.getTexture(e,a.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":n.map=s.getTexture(e,a.ID),n.map!==void 0&&(n.map.encoding=yr);break;case"DisplacementColor":n.displacementMap=s.getTexture(e,a.ID);break;case"EmissiveColor":n.emissiveMap=s.getTexture(e,a.ID),n.emissiveMap!==void 0&&(n.emissiveMap.encoding=yr);break;case"NormalMap":case"Maya|TEX_normal_map":n.normalMap=s.getTexture(e,a.ID);break;case"ReflectionColor":n.envMap=s.getTexture(e,a.ID),n.envMap!==void 0&&(n.envMap.mapping=mg,n.envMap.encoding=yr);break;case"SpecularColor":n.specularMap=s.getTexture(e,a.ID),n.specularMap!==void 0&&(n.specularMap.encoding=yr);break;case"TransparentColor":case"TransparencyFactor":n.alphaMap=s.getTexture(e,a.ID),n.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",o);break}}),n}getTexture(r,e){return"LayeredTexture"in ui.Objects&&e in ui.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),e=rs.get(e).children[0].ID),r.get(e)}parseDeformers(){let r={},e={};if("Deformer"in ui.Objects){let i=ui.Objects.Deformer;for(let n in i){let s=i[n],a=rs.get(parseInt(n));if(s.attrType==="Skin"){let o=this.parseSkeleton(a,i);o.ID=n,a.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),o.geometryID=a.parents[0].ID,r[n]=o}else if(s.attrType==="BlendShape"){let o={id:n};o.rawTargets=this.parseMorphTargets(a,i),o.id=n,a.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),e[n]=o}}}return{skeletons:r,morphTargets:e}}parseSkeleton(r,e){let i=[];return r.children.forEach(function(n){let s=e[n.ID];if(s.attrType!=="Cluster")return;let a={ID:n.ID,indices:[],weights:[],transformLink:new Ue().fromArray(s.TransformLink.a)};"Indexes"in s&&(a.indices=s.Indexes.a,a.weights=s.Weights.a),i.push(a)}),{rawBones:i,bones:[]}}parseMorphTargets(r,e){let i=[];for(let n=0;n1?a=o:o.length>0?a=o[0]:(a=new Ts({color:13421772}),o.push(a)),"color"in s.attributes&&o.forEach(function(l){l.vertexColors=!0}),s.FBX_Deformer?(n=new Bu(s,a),n.normalizeSkinWeights()):n=new Je(s,a),n}createCurve(r,e){let i=r.children.reduce(function(s,a){return e.has(a.ID)&&(s=e.get(a.ID)),s},null),n=new Tr({color:3342591,linewidth:1});return new _r(i,n)}getTransformData(r,e){let i={};"InheritType"in e&&(i.inheritType=parseInt(e.InheritType.value)),"RotationOrder"in e?i.eulerOrder=gde(e.RotationOrder.value):i.eulerOrder="ZYX","Lcl_Translation"in e&&(i.translation=e.Lcl_Translation.value),"PreRotation"in e&&(i.preRotation=e.PreRotation.value),"Lcl_Rotation"in e&&(i.rotation=e.Lcl_Rotation.value),"PostRotation"in e&&(i.postRotation=e.PostRotation.value),"Lcl_Scaling"in e&&(i.scale=e.Lcl_Scaling.value),"ScalingOffset"in e&&(i.scalingOffset=e.ScalingOffset.value),"ScalingPivot"in e&&(i.scalingPivot=e.ScalingPivot.value),"RotationOffset"in e&&(i.rotationOffset=e.RotationOffset.value),"RotationPivot"in e&&(i.rotationPivot=e.RotationPivot.value),r.userData.transformData=i}setLookAtProperties(r,e){"LookAtProperty"in e&&rs.get(r.ID).children.forEach(function(n){if(n.relationship==="LookAtProperty"){let s=ui.Objects.Model[n.ID];if("Lcl_Translation"in s){let a=s.Lcl_Translation.value;r.target!==void 0?(r.target.position.fromArray(a),mo.add(r.target)):r.lookAt(new A().fromArray(a))}}})}bindSkeleton(r,e,i){let n=this.parsePoseNodes();for(let s in r){let a=r[s];rs.get(parseInt(a.ID)).parents.forEach(function(l){if(e.has(l.ID)){let c=l.ID;rs.get(c).parents.forEach(function(h){i.has(h.ID)&&i.get(h.ID).bind(new Ml(a.bones),n[h.ID])})}})}}parsePoseNodes(){let r={};if("Pose"in ui.Objects){let e=ui.Objects.Pose;for(let i in e)if(e[i].attrType==="BindPose"&&e[i].NbPoseNodes>0){let n=e[i].PoseNode;Array.isArray(n)?n.forEach(function(s){r[s.Node]=new Ue().fromArray(s.Matrix.a)}):r[n.Node]=new Ue().fromArray(n.Matrix.a)}}return r}createAmbientLight(){if("GlobalSettings"in ui&&"AmbientColor"in ui.GlobalSettings){let r=ui.GlobalSettings.AmbientColor.value,e=r[0],i=r[1],n=r[2];if(e!==0||i!==0||n!==0){let s=new Ve(e,i,n);mo.add(new Ol(s,1))}}}},tk=class{constructor(){this.negativeMaterialIndices=!1}parse(r){let e=new Map;if("Geometry"in ui.Objects){let i=ui.Objects.Geometry;for(let n in i){let s=rs.get(parseInt(n)),a=this.parseGeometry(s,i[n],r);e.set(parseInt(n),a)}}return this.negativeMaterialIndices===!0&&console.warn("THREE.FBXLoader: The FBX file contains invalid (negative) material indices. The asset might not render as expected."),e}parseGeometry(r,e,i){switch(e.attrType){case"Mesh":return this.parseMeshGeometry(r,e,i);case"NurbsCurve":return this.parseNurbsGeometry(e)}}parseMeshGeometry(r,e,i){let n=i.skeletons,s=[],a=r.parents.map(function(h){return ui.Objects.Model[h.ID]});if(a.length===0)return;let o=r.children.reduce(function(h,p){return n[p.ID]!==void 0&&(h=n[p.ID]),h},null);r.children.forEach(function(h){i.morphTargets[h.ID]!==void 0&&s.push(i.morphTargets[h.ID])});let l=a[0],c={};"RotationOrder"in l&&(c.eulerOrder=gde(l.RotationOrder.value)),"InheritType"in l&&(c.inheritType=parseInt(l.InheritType.value)),"GeometricTranslation"in l&&(c.translation=l.GeometricTranslation.value),"GeometricRotation"in l&&(c.rotation=l.GeometricRotation.value),"GeometricScaling"in l&&(c.scale=l.GeometricScaling.value);let u=mde(c);return this.genGeometry(e,o,s,u)}genGeometry(r,e,i,n){let s=new it;r.attrName&&(s.name=r.attrName);let a=this.parseGeoNode(r,e),o=this.genBuffers(a),l=new ct(o.vertex,3);if(l.applyMatrix4(n),s.setAttribute("position",l),o.colors.length>0&&s.setAttribute("color",new ct(o.colors,3)),e&&(s.setAttribute("skinIndex",new gg(o.weightsIndices,4)),s.setAttribute("skinWeight",new ct(o.vertexWeights,4)),s.FBX_Deformer=e),o.normal.length>0){let c=new Qi().getNormalMatrix(n),u=new ct(o.normal,3);u.applyNormalMatrix(c),s.setAttribute("normal",u)}if(o.uvs.forEach(function(c,u){let h="uv"+(u+1).toString();u===0&&(h="uv"),s.setAttribute(h,new ct(o.uvs[u],2))}),a.material&&a.material.mappingType!=="AllSame"){let c=o.materialIndex[0],u=0;if(o.materialIndex.forEach(function(h,p){h!==c&&(s.addGroup(u,p-u,c),c=h,u=p)}),s.groups.length>0){let h=s.groups[s.groups.length-1],p=h.start+h.count;p!==o.materialIndex.length&&s.addGroup(p,o.materialIndex.length-p,c)}s.groups.length===0&&s.addGroup(0,o.materialIndex.length,o.materialIndex[0])}return this.addMorphTargets(s,r,i,n),s}parseGeoNode(r,e){let i={};if(i.vertexPositions=r.Vertices!==void 0?r.Vertices.a:[],i.vertexIndices=r.PolygonVertexIndex!==void 0?r.PolygonVertexIndex.a:[],r.LayerElementColor&&(i.color=this.parseVertexColors(r.LayerElementColor[0])),r.LayerElementMaterial&&(i.material=this.parseMaterialIndices(r.LayerElementMaterial[0])),r.LayerElementNormal&&(i.normal=this.parseNormals(r.LayerElementNormal[0])),r.LayerElementUV){i.uv=[];let n=0;for(;r.LayerElementUV[n];)r.LayerElementUV[n].UV&&i.uv.push(this.parseUVs(r.LayerElementUV[n])),n++}return i.weightTable={},e!==null&&(i.skeleton=e,e.rawBones.forEach(function(n,s){n.indices.forEach(function(a,o){i.weightTable[a]===void 0&&(i.weightTable[a]=[]),i.weightTable[a].push({id:s,weight:n.weights[o]})})})),i}genBuffers(r){let e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},i=0,n=0,s=!1,a=[],o=[],l=[],c=[],u=[],h=[],p=this;return r.vertexIndices.forEach(function(d,f){let m,g=!1;d<0&&(d=d^-1,g=!0);let y=[],E=[];if(a.push(d*3,d*3+1,d*3+2),r.color){let b=ZC(f,i,d,r.color);l.push(b[0],b[1],b[2])}if(r.skeleton){if(r.weightTable[d]!==void 0&&r.weightTable[d].forEach(function(b){E.push(b.weight),y.push(b.id)}),E.length>4){s||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),s=!0);let b=[0,0,0,0],x=[0,0,0,0];E.forEach(function(S,D){let P=S,_=y[D];x.forEach(function(w,F,X){if(P>w){X[F]=P,P=w;let H=b[F];b[F]=_,_=H}})}),y=b,E=x}for(;E.length<4;)E.push(0),y.push(0);for(let b=0;b<4;++b)u.push(E[b]),h.push(y[b])}if(r.normal){let b=ZC(f,i,d,r.normal);o.push(b[0],b[1],b[2])}r.material&&r.material.mappingType!=="AllSame"&&(m=ZC(f,i,d,r.material)[0],m<0&&(p.negativeMaterialIndices=!0,m=0)),r.uv&&r.uv.forEach(function(b,x){let S=ZC(f,i,d,b);c[x]===void 0&&(c[x]=[]),c[x].push(S[0]),c[x].push(S[1])}),n++,g&&(n>4&&console.warn("THREE.FBXLoader: Polygons with more than four sides are not supported. Make sure to triangulate the geometry during export."),p.genFace(e,r,a,m,o,l,c,u,h,n),i++,n=0,a=[],o=[],l=[],c=[],u=[],h=[])}),e}genFace(r,e,i,n,s,a,o,l,c,u){for(let h=2;h1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");let a=r.get(s[0].ID);i[n]={name:e[n].attrName,layer:a}}return i}addClip(r){let e=[],i=this;return r.layer.forEach(function(n){e=e.concat(i.generateTracks(n))}),new so(r.name,-1,e)}generateTracks(r){let e=[],i=new A,n=new Or,s=new A;if(r.transform&&r.transform.decompose(i,n,s),i=i.toArray(),n=new Sr().setFromQuaternion(n,r.eulerOrder).toArray(),s=s.toArray(),r.T!==void 0&&Object.keys(r.T.curves).length>0){let a=this.generateVectorTrack(r.modelName,r.T.curves,i,"position");a!==void 0&&e.push(a)}if(r.R!==void 0&&Object.keys(r.R.curves).length>0){let a=this.generateRotationTrack(r.modelName,r.R.curves,n,r.preRotation,r.postRotation,r.eulerOrder);a!==void 0&&e.push(a)}if(r.S!==void 0&&Object.keys(r.S.curves).length>0){let a=this.generateVectorTrack(r.modelName,r.S.curves,s,"scale");a!==void 0&&e.push(a)}if(r.DeformPercent!==void 0){let a=this.generateMorphTrack(r);a!==void 0&&e.push(a)}return e}generateVectorTrack(r,e,i,n){let s=this.getTimesForAllAxes(e),a=this.getKeyframeTrackValues(s,e,i);return new no(r+"."+n,s,a)}generateRotationTrack(r,e,i,n,s,a){e.x!==void 0&&(this.interpolateRotations(e.x),e.x.values=e.x.values.map(wr.degToRad)),e.y!==void 0&&(this.interpolateRotations(e.y),e.y.values=e.y.values.map(wr.degToRad)),e.z!==void 0&&(this.interpolateRotations(e.z),e.z.values=e.z.values.map(wr.degToRad));let o=this.getTimesForAllAxes(e),l=this.getKeyframeTrackValues(o,e,i);n!==void 0&&(n=n.map(wr.degToRad),n.push(a),n=new Sr().fromArray(n),n=new Or().setFromEuler(n)),s!==void 0&&(s=s.map(wr.degToRad),s.push(a),s=new Sr().fromArray(s),s=new Or().setFromEuler(s).invert());let c=new Or,u=new Sr,h=[];for(let p=0;p1){let i=1,n=e[0];for(let s=1;s=180){let a=s/180,o=n/a,l=i+o,c=r.times[e-1],h=(r.times[e]-c)/a,p=c+h,d=[],f=[];for(;p1&&(i=r[1].replace(/^(\w+)::/,""),n=r[2]),{id:e,name:i,type:n}}parseNodeProperty(r,e,i){let n=e[1].replace(/^"/,"").replace(/"$/,"").trim(),s=e[2].replace(/^"/,"").replace(/"$/,"").trim();n==="Content"&&s===","&&(s=i.replace(/"/g,"").replace(/,$/,"").trim());let a=this.getCurrentNode();if(a.name==="Properties70"){this.parseNodeSpecialProperty(r,n,s);return}if(n==="C"){let l=s.split(",").slice(1),c=parseInt(l[0]),u=parseInt(l[1]),h=s.split(",").slice(3);h=h.map(function(p){return p.trim().replace(/^"/,"")}),n="connections",s=[c,u],yTt(s,h),a[n]===void 0&&(a[n]=[])}n==="Node"&&(a.id=s),n in a&&Array.isArray(a[n])?a[n].push(s):n!=="a"?a[n]=s:a.a=s,this.setCurrentProp(a,n),n==="a"&&s.slice(-1)!==","&&(a.a=QB(s))}parseNodePropertyContinued(r){let e=this.getCurrentNode();e.a+=r,r.slice(-1)!==","&&(e.a=QB(e.a))}parseNodeSpecialProperty(r,e,i){let n=i.split('",').map(function(u){return u.trim().replace(/^\"/,"").replace(/\s/,"_")}),s=n[0],a=n[1],o=n[2],l=n[3],c=n[4];switch(a){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=QB(c);break}this.getPrevNode()[s]={type:a,type2:o,flag:l,value:c},this.setCurrentProp(this.getPrevNode(),s)}},nk=class{parse(r){let e=new JC(r);e.skip(23);let i=e.getUint32();if(i<6400)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+i);let n=new QC;for(;!this.endOfContent(e);){let s=this.parseNode(e,i);s!==null&&n.add(s.name,s)}return n}endOfContent(r){return r.size()%16===0?(r.getOffset()+160+16&-16)>=r.size():r.getOffset()+160+16>=r.size()}parseNode(r,e){let i={},n=e>=7500?r.getUint64():r.getUint32(),s=e>=7500?r.getUint64():r.getUint32();e>=7500?r.getUint64():r.getUint32();let a=r.getUint8(),o=r.getString(a);if(n===0)return null;let l=[];for(let p=0;p0?l[0]:"",u=l.length>1?l[1]:"",h=l.length>2?l[2]:"";for(i.singleProperty=s===1&&r.getOffset()===n;n>r.getOffset();){let p=this.parseNode(r,e);p!==null&&this.parseSubNode(o,i,p)}return i.propertyList=l,typeof c=="number"&&(i.id=c),u!==""&&(i.attrName=u),h!==""&&(i.attrType=h),o!==""&&(i.name=o),i}parseSubNode(r,e,i){if(i.singleProperty===!0){let n=i.propertyList[0];Array.isArray(n)?(e[i.name]=i,i.a=n):e[i.name]=n}else if(r==="Connections"&&i.name==="C"){let n=[];i.propertyList.forEach(function(s,a){a!==0&&n.push(s)}),e.connections===void 0&&(e.connections=[]),e.connections.push(n)}else if(i.name==="Properties70")Object.keys(i).forEach(function(s){e[s]=i[s]});else if(r==="Properties70"&&i.name==="P"){let n=i.propertyList[0],s=i.propertyList[1],a=i.propertyList[2],o=i.propertyList[3],l;n.indexOf("Lcl ")===0&&(n=n.replace("Lcl ","Lcl_")),s.indexOf("Lcl ")===0&&(s=s.replace("Lcl ","Lcl_")),s==="Color"||s==="ColorRGB"||s==="Vector"||s==="Vector3D"||s.indexOf("Lcl_")===0?l=[i.propertyList[4],i.propertyList[5],i.propertyList[6]]:l=i.propertyList[4],e[n]={type:s,type2:a,flag:o,value:l}}else e[i.name]===void 0?typeof i.id=="number"?(e[i.name]={},e[i.name][i.id]=i):e[i.name]=i:i.name==="PoseNode"?(Array.isArray(e[i.name])||(e[i.name]=[e[i.name]]),e[i.name].push(i)):e[i.name][i.id]===void 0&&(e[i.name][i.id]=i)}parseProperty(r){let e=r.getString(1),i;switch(e){case"C":return r.getBoolean();case"D":return r.getFloat64();case"F":return r.getFloat32();case"I":return r.getInt32();case"L":return r.getInt64();case"R":return i=r.getUint32(),r.getArrayBuffer(i);case"S":return i=r.getUint32(),r.getString(i);case"Y":return r.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":let n=r.getUint32(),s=r.getUint32(),a=r.getUint32();if(s===0)switch(e){case"b":case"c":return r.getBooleanArray(n);case"d":return r.getFloat64Array(n);case"f":return r.getFloat32Array(n);case"i":return r.getInt32Array(n);case"l":return r.getInt64Array(n)}let o=cde(new Uint8Array(r.getArrayBuffer(a))),l=new JC(o.buffer);switch(e){case"b":case"c":return l.getBooleanArray(n);case"d":return l.getFloat64Array(n);case"f":return l.getFloat32Array(n);case"i":return l.getInt32Array(n);case"l":return l.getInt64Array(n)}break;default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}},JC=class{constructor(r,e){this.dv=new DataView(r),this.offset=0,this.littleEndian=e!==void 0?e:!0,this._textDecoder=new TextDecoder}getOffset(){return this.offset}size(){return this.dv.buffer.byteLength}skip(r){this.offset+=r}getBoolean(){return(this.getUint8()&1)===1}getBooleanArray(r){let e=[];for(let i=0;i=0&&(i=new Uint8Array(this.dv.buffer,e,n)),this._textDecoder.decode(i)}},QC=class{add(r,e){this[r]=e}};function fTt(t){let r="Kaydara FBX Binary \0";return t.byteLength>=r.length&&r===vde(t,0,r.length)}function mTt(t){let r=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"],e=0;function i(n){let s=t[n-1];return t=t.slice(e+n),e++,s}for(let n=0;n=2.0 are supported."));return}let c=new Mk(s,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&o[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}c.setExtensions(a),c.setPlugins(o),c.parse(i,n)}parseAsync(r,e){let i=this;return new Promise(function(n,s){i.parse(r,e,n,s)})}};function xTt(){let t={};return{get:function(r){return t[r]},add:function(r,e){t[r]=e},remove:function(r){delete t[r]},removeAll:function(){t={}}}}var Ci={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_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_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"},ok=class{constructor(r){this.parser=r,this.name=Ci.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){let r=this.parser,e=this.parser.json.nodes||[];for(let i=0,n=e.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(r,s.source,a)}},yk=class{constructor(r){this.parser=r,this.name=Ci.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(r){let e=this.name,i=this.parser,n=i.json,s=n.textures[r];if(!s.extensions||!s.extensions[e])return null;let a=s.extensions[e],o=n.images[a.source],l=i.textureLoader;if(o.uri){let c=i.options.manager.getHandler(o.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(r,a.source,l);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(r)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(r){let e=new Image;e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.onload=e.onerror=function(){r(e.height===1)}})),this.isSupported}},Tk=class{constructor(r){this.name=Ci.EXT_MESHOPT_COMPRESSION,this.parser=r}loadBufferView(r){let e=this.parser.json,i=e.bufferViews[r];if(i.extensions&&i.extensions[this.name]){let n=i.extensions[this.name],s=this.parser.getDependency("buffer",n.buffer),a=this.parser.options.meshoptDecoder;if(!a||!a.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(o){let l=n.byteOffset||0,c=n.byteLength||0,u=n.count,h=n.byteStride,p=new Uint8Array(o,l,c);return a.decodeGltfBufferAsync?a.decodeGltfBufferAsync(u,h,p,n.mode,n.filter).then(function(d){return d.buffer}):a.ready.then(function(){let d=new ArrayBuffer(u*h);return a.decodeGltfBuffer(new Uint8Array(d),u,h,p,n.mode,n.filter),d})})}else return null}},Ek=class{constructor(r){this.name=Ci.EXT_MESH_GPU_INSTANCING,this.parser=r}createNodeMesh(r){let e=this.parser.json,i=e.nodes[r];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;let n=e.meshes[i.mesh];for(let c of n.primitives)if(c.mode!==Bl.TRIANGLES&&c.mode!==Bl.TRIANGLE_STRIP&&c.mode!==Bl.TRIANGLE_FAN&&c.mode!==void 0)return null;let a=i.extensions[this.name].attributes,o=[],l={};for(let c in a)o.push(this.parser.getDependency("accessor",a[c]).then(u=>(l[c]=u,l[c])));return o.length<1?null:(o.push(this.parser.createNodeMesh(r)),Promise.all(o).then(c=>{let u=c.pop(),h=u.isGroup?u.children:[u],p=c[0].count,d=[];for(let f of h){let m=new Ue,g=new A,y=new Or,E=new A(1,1,1),b=new tn(f.geometry,f.material,p);for(let x=0;x0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}var CTt=new Ue,Mk=class{constructor(r={},e={}){this.json=r,this.extensions={},this.plugins={},this.options=e,this.cache=new xTt,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,n=!1,s=-1;typeof navigator!="undefined"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,n=navigator.userAgent.indexOf("Firefox")>-1,s=n?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap=="undefined"||i||n&&s<98?this.textureLoader=new Es(this.options.manager):this.textureLoader=new gx(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new ci(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(r){this.extensions=r}setPlugins(r){this.plugins=r}parse(r,e){let i=this,n=this.json,s=this.extensions;this.cache.removeAll(),this._invokeAll(function(a){return a._markDefs&&a._markDefs()}),Promise.all(this._invokeAll(function(a){return a.beforeRoot&&a.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(a){let o={scene:a[0][n.scene||0],scenes:a[0],animations:a[1],cameras:a[2],asset:n.asset,parser:i,userData:{}};Xx(s,o,n),Of(o,n),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(o)})).then(function(){r(o)})}).catch(e)}_markDefs(){let r=this.json.nodes||[],e=this.json.skins||[],i=this.json.meshes||[];for(let n=0,s=e.length;n{let l=this.associations.get(a);l!=null&&this.associations.set(o,l);for(let[c,u]of a.children.entries())s(u,o.children[c])};return s(i,n),n.name+="_instance_"+r.uses[e]++,n}_invokeOne(r){let e=Object.values(this.plugins);e.push(this);for(let i=0;i=2&&g.setY(w,D[P*l+1]),l>=3&&g.setZ(w,D[P*l+2]),l>=4&&g.setW(w,D[P*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return g})}loadTexture(r){let e=this.json,i=this.options,s=e.textures[r].source,a=e.images[s],o=this.textureLoader;if(a.uri){let l=i.manager.getHandler(a.uri);l!==null&&(o=l)}return this.loadTextureImage(r,s,o)}loadTextureImage(r,e,i){let n=this,s=this.json,a=s.textures[r],o=s.images[e],l=(o.uri||o.bufferView)+":"+a.sampler;if(this.textureCache[l])return this.textureCache[l];let c=this.loadImageSource(e,i).then(function(u){u.flipY=!1,u.name=a.name||o.name||"";let p=(s.samplers||{})[a.sampler]||{};return u.magFilter=Tde[p.magFilter]||ai,u.minFilter=Tde[p.minFilter]||wa,u.wrapS=Ede[p.wrapS]||gn,u.wrapT=Ede[p.wrapT]||gn,n.associations.set(u,{textures:r}),u}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(r,e){let i=this,n=this.json,s=this.options;if(this.sourceCache[r]!==void 0)return this.sourceCache[r].then(h=>h.clone());let a=n.images[r],o=self.URL||self.webkitURL,l=a.uri||"",c=!1;if(a.bufferView!==void 0)l=i.getDependency("bufferView",a.bufferView).then(function(h){c=!0;let p=new Blob([h],{type:a.mimeType});return l=o.createObjectURL(p),l});else if(a.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+r+" is missing URI and bufferView");let u=Promise.resolve(l).then(function(h){return new Promise(function(p,d){let f=p;e.isImageBitmapLoader===!0&&(f=function(m){let g=new Hi(m);g.needsUpdate=!0,p(g)}),e.load(ks.resolveURL(h,s.path),f,void 0,d)})}).then(function(h){return c===!0&&o.revokeObjectURL(l),h.userData.mimeType=a.mimeType||DTt(a.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),h});return this.sourceCache[r]=u,u}assignTexture(r,e,i,n){let s=this;return this.getDependency("texture",i.index).then(function(a){if(!a)return null;if(i.texCoord!==void 0&&i.texCoord!=0&&!(e==="aoMap"&&i.texCoord==1)&&console.warn("THREE.GLTFLoader: Custom UV set "+i.texCoord+" for texture "+e+" not yet supported."),s.extensions[Ci.KHR_TEXTURE_TRANSFORM]){let o=i.extensions!==void 0?i.extensions[Ci.KHR_TEXTURE_TRANSFORM]:void 0;if(o){let l=s.associations.get(a);a=s.extensions[Ci.KHR_TEXTURE_TRANSFORM].extendTexture(a,o),s.associations.set(a,l)}}return n!==void 0&&(a.encoding=n),r[e]=a,a})}assignFinalMaterial(r){let e=r.geometry,i=r.material,n=e.attributes.tangent===void 0,s=e.attributes.color!==void 0,a=e.attributes.normal===void 0;if(r.isPoints){let o="PointsMaterial:"+i.uuid,l=this.cache.get(o);l||(l=new Vn,Gr.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(o,l)),i=l}else if(r.isLine){let o="LineBasicMaterial:"+i.uuid,l=this.cache.get(o);l||(l=new Tr,Gr.prototype.copy.call(l,i),l.color.copy(i.color),this.cache.add(o,l)),i=l}if(n||s||a){let o="ClonedMaterial:"+i.uuid+":";n&&(o+="derivative-tangents:"),s&&(o+="vertex-colors:"),a&&(o+="flat-shading:");let l=this.cache.get(o);l||(l=i.clone(),s&&(l.vertexColors=!0),a&&(l.flatShading=!0),n&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(o,l),this.associations.set(l,this.associations.get(i))),i=l}i.aoMap&&e.attributes.uv2===void 0&&e.attributes.uv!==void 0&&e.setAttribute("uv2",e.attributes.uv),r.material=i}getMaterialType(){return Gu}loadMaterial(r){let e=this,i=this.json,n=this.extensions,s=i.materials[r],a,o={},l=s.extensions||{},c=[];if(l[Ci.KHR_MATERIALS_UNLIT]){let h=n[Ci.KHR_MATERIALS_UNLIT];a=h.getMaterialType(),c.push(h.extendParams(o,s,e))}else{let h=s.pbrMetallicRoughness||{};if(o.color=new Ve(1,1,1),o.opacity=1,Array.isArray(h.baseColorFactor)){let p=h.baseColorFactor;o.color.fromArray(p),o.opacity=p[3]}h.baseColorTexture!==void 0&&c.push(e.assignTexture(o,"map",h.baseColorTexture,yr)),o.metalness=h.metallicFactor!==void 0?h.metallicFactor:1,o.roughness=h.roughnessFactor!==void 0?h.roughnessFactor:1,h.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(o,"metalnessMap",h.metallicRoughnessTexture)),c.push(e.assignTexture(o,"roughnessMap",h.metallicRoughnessTexture))),a=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(r)}),c.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(r,o)})))}s.doubleSided===!0&&(o.side=wi);let u=s.alphaMode||ak.OPAQUE;if(u===ak.BLEND?(o.transparent=!0,o.depthWrite=!1):(o.transparent=!1,u===ak.MASK&&(o.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&a!==or&&(c.push(e.assignTexture(o,"normalMap",s.normalTexture)),o.normalScale=new le(1,1),s.normalTexture.scale!==void 0)){let h=s.normalTexture.scale;o.normalScale.set(h,h)}return s.occlusionTexture!==void 0&&a!==or&&(c.push(e.assignTexture(o,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(o.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&a!==or&&(o.emissive=new Ve().fromArray(s.emissiveFactor)),s.emissiveTexture!==void 0&&a!==or&&c.push(e.assignTexture(o,"emissiveMap",s.emissiveTexture,yr)),Promise.all(c).then(function(){let h=new a(o);return s.name&&(h.name=s.name),Of(h,s),e.associations.set(h,{materials:r}),s.extensions&&Xx(n,h,s),h})}createUniqueName(r){let e=Cr.sanitizeNodeName(r||""),i=e;for(let n=1;this.nodeNamesUsed[i];++n)i=e+"_"+n;return this.nodeNamesUsed[i]=!0,i}loadGeometries(r){let e=this,i=this.extensions,n=this.primitiveCache;function s(o){return i[Ci.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(o,e).then(function(l){return xde(l,o,e)})}let a=[];for(let o=0,l=r.length;o0&&RTt(y,s),y.name=e.createUniqueName(s.name||"mesh_"+r),Of(y,s),g.extensions&&Xx(n,y,g),e.assignFinalMaterial(y),h.push(y)}for(let d=0,f=h.length;d1?h=new hr:l.length===1?h=l[0]:h=new pr,h!==l[0])for(let p=0,d=l.length;p{let h=new Map;for(let[p,d]of n.associations)(p instanceof Gr||p instanceof Hi)&&h.set(p,d);return u.traverse(p=>{let d=n.associations.get(p);d!=null&&h.set(p,d)}),h};return n.associations=c(s),s})}};function ATt(t,r,e){let i=r.attributes,n=new Ot;if(i.POSITION!==void 0){let o=e.json.accessors[i.POSITION],l=o.min,c=o.max;if(l!==void 0&&c!==void 0){if(n.set(new A(l[0],l[1],l[2]),new A(c[0],c[1],c[2])),o.normalized){let u=Rk(dT[o.componentType]);n.min.multiplyScalar(u),n.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;let s=r.targets;if(s!==void 0){let o=new A,l=new A;for(let c=0,u=s.length;cr in t?OTt(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,wde=(t,r)=>{for(var e in r||(r={}))PTt.call(r,e)&&_de(t,e,r[e]);if(Sde)for(var e of Sde(r))NTt.call(r,e)&&_de(t,e,r[e]);return t},Dk=t=>{if(typeof zP!="undefined")return zP(t);throw new Error('Dynamic require of "'+t+'" is not supported')},Mde=(t,r)=>function(){return r||(0,t[Object.keys(t)[0]])((r={exports:{}}).exports,r),r.exports},LTt=(t,r,e)=>new Promise((i,n)=>{var s=l=>{try{o(e.next(l))}catch(c){n(c)}},a=l=>{try{o(e.throw(l))}catch(c){n(c)}},o=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,a);o((e=e.apply(t,r)).next())}),FTt=Mde({"(disabled):crypto"(){}}),HTt=Mde({"dist/web-ifc.js"(t,r){var e=function(){var i=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename!="undefined"&&(i=i||__filename),function(n){n=n||{};var s=typeof n!="undefined"?n:{},a,o;s.ready=new Promise(function(I,M){a=I,o=M});var l={},c;for(c in s)s.hasOwnProperty(c)&&(l[c]=s[c]);var u=[],h="./this.program",p=function(I,M){throw M},d=!1,f=!1,m=!1,g=!1;d=typeof window=="object",f=typeof importScripts=="function",m=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",g=!d&&!m&&!f;var y="";function E(I){return s.locateFile?s.locateFile(I,y):y+I}var b,x,S,D,P,_;m?(f?y=Dk("path").dirname(y)+"/":y=__dirname+"/",b=function(M,L){return P||(P=Dk("fs")),_||(_=Dk("path")),M=_.normalize(M),P.readFileSync(M,L?null:"utf8")},S=function(M){var L=b(M,!0);return L.buffer||(L=new Uint8Array(L)),ee(L.buffer),L},process.argv.length>1&&(h=process.argv[1].replace(/\\/g,"/")),u=process.argv.slice(2),process.on("uncaughtException",function(I){if(!(I instanceof bd))throw I}),process.on("unhandledRejection",Kt),p=function(I){process.exit(I)},s.inspect=function(){return"[Emscripten Module object]"}):g?(typeof read!="undefined"&&(b=function(M){return read(M)}),S=function(M){var L;return typeof readbuffer=="function"?new Uint8Array(readbuffer(M)):(L=read(M,"binary"),ee(typeof L=="object"),L)},typeof scriptArgs!="undefined"?u=scriptArgs:typeof arguments!="undefined"&&(u=arguments),typeof quit=="function"&&(p=function(I){quit(I)}),typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)):(d||f)&&(f?y=self.location.href:typeof document!="undefined"&&document.currentScript&&(y=document.currentScript.src),i&&(y=i),y.indexOf("blob:")!==0?y=y.slice(0,y.lastIndexOf("/")+1):y="",b=function(M){var L=new XMLHttpRequest;return L.open("GET",M,!1),L.send(null),L.responseText},f&&(S=function(M){var L=new XMLHttpRequest;return L.open("GET",M,!1),L.responseType="arraybuffer",L.send(null),new Uint8Array(L.response)}),x=function(M,L,W){var te=new XMLHttpRequest;te.open("GET",M,!0),te.responseType="arraybuffer",te.onload=function(){if(te.status==200||te.status==0&&te.response){L(te.response);return}W()},te.onerror=W,te.send(null)},D=function(I){document.title=I});var w=s.print||console.log.bind(console),F=s.printErr||console.warn.bind(console);for(c in l)l.hasOwnProperty(c)&&(s[c]=l[c]);l=null,s.arguments&&(u=s.arguments),s.thisProgram&&(h=s.thisProgram),s.quit&&(p=s.quit);var X=16;function H(I,M){return M||(M=X),Math.ceil(I/M)*M}var he=0,C=function(I){he=I},N;s.wasmBinary&&(N=s.wasmBinary);var k;s.noExitRuntime&&(k=s.noExitRuntime),typeof WebAssembly!="object"&&Kt("no native wasm support detected");var G,U=!1,j=0;function ee(I,M){I||Kt("Assertion failed: "+M)}var ae=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function se(I,M,L){M>>>=0;for(var W=M+L,te=M;I[te>>>0]&&!(te>=W);)++te;if(te-M>16&&I.subarray&&ae)return ae.decode(I.subarray(M>>>0,te>>>0));for(var ge="";M>>0];if(!(Ee&128)){ge+=String.fromCharCode(Ee);continue}var Ie=I[M++>>>0]&63;if((Ee&224)==192){ge+=String.fromCharCode((Ee&31)<<6|Ie);continue}var De=I[M++>>>0]&63;if((Ee&240)==224?Ee=(Ee&15)<<12|Ie<<6|De:Ee=(Ee&7)<<18|Ie<<12|De<<6|I[M++>>>0]&63,Ee<65536)ge+=String.fromCharCode(Ee);else{var $e=Ee-65536;ge+=String.fromCharCode(55296|$e>>10,56320|$e&1023)}}return ge}function ue(I,M){return I>>>=0,I?se($,I,M):""}function ve(I,M,L,W){if(L>>>=0,!(W>0))return 0;for(var te=L,ge=L+W-1,Ee=0;Ee=55296&&Ie<=57343){var De=I.charCodeAt(++Ee);Ie=65536+((Ie&1023)<<10)|De&1023}if(Ie<=127){if(L>=ge)break;M[L++>>>0]=Ie}else if(Ie<=2047){if(L+1>=ge)break;M[L++>>>0]=192|Ie>>6,M[L++>>>0]=128|Ie&63}else if(Ie<=65535){if(L+2>=ge)break;M[L++>>>0]=224|Ie>>12,M[L++>>>0]=128|Ie>>6&63,M[L++>>>0]=128|Ie&63}else{if(L+3>=ge)break;M[L++>>>0]=240|Ie>>18,M[L++>>>0]=128|Ie>>12&63,M[L++>>>0]=128|Ie>>6&63,M[L++>>>0]=128|Ie&63}}return M[L>>>0]=0,L-te}function be(I,M,L){return ve(I,$,M,L)}function de(I){for(var M=0,L=0;L=55296&&W<=57343&&(W=65536+((W&1023)<<10)|I.charCodeAt(++L)&1023),W<=127?++M:W<=2047?M+=2:W<=65535?M+=3:M+=4}return M}var we=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0;function Fe(I,M){for(var L=I,W=L>>1,te=W+M/2;!(W>=te)&&me[W>>>0];)++W;if(L=W<<1,L-I>32&&we)return we.decode($.subarray(I>>>0,L>>>0));for(var ge="",Ee=0;!(Ee>=M/2);++Ee){var Ie=re[I+Ee*2>>>1];if(Ie==0)break;ge+=String.fromCharCode(Ie)}return ge}function je(I,M,L){if(L===void 0&&(L=2147483647),L<2)return 0;L-=2;for(var W=M,te=L>>1]=Ee,M+=2}return re[M>>>1]=0,M-W}function Oe(I){return I.length*2}function dt(I,M){for(var L=0,W="";!(L>=M/4);){var te=z[I+L*4>>>2];if(te==0)break;if(++L,te>=65536){var ge=te-65536;W+=String.fromCharCode(55296|ge>>10,56320|ge&1023)}else W+=String.fromCharCode(te)}return W}function Be(I,M,L){if(M>>>=0,L===void 0&&(L=2147483647),L<4)return 0;for(var W=M,te=W+L-4,ge=0;ge=55296&&Ee<=57343){var Ie=I.charCodeAt(++ge);Ee=65536+((Ee&1023)<<10)|Ie&1023}if(z[M>>>2]=Ee,M+=4,M+4>te)break}return z[M>>>2]=0,M-W}function ke(I){for(var M=0,L=0;L=55296&&W<=57343&&++L,M+=4}return M}function nt(I,M){J.set(I,M>>>0)}function bt(I,M,L){for(var W=0;W>>0]=I.charCodeAt(W);L||(J[M>>>0]=0)}function mt(I,M){return I%M>0&&(I+=M-I%M),I}var _e,J,$,re,me,z,Y,xe,Ce;function Ge(I){_e=I,s.HEAP8=J=new Int8Array(I),s.HEAP16=re=new Int16Array(I),s.HEAP32=z=new Int32Array(I),s.HEAPU8=$=new Uint8Array(I),s.HEAPU16=me=new Uint16Array(I),s.HEAPU32=Y=new Uint32Array(I),s.HEAPF32=xe=new Float32Array(I),s.HEAPF64=Ce=new Float64Array(I)}var Ze=s.INITIAL_MEMORY||16777216;s.wasmMemory?G=s.wasmMemory:G=new WebAssembly.Memory({initial:Ze/65536,maximum:65536}),G&&(_e=G.buffer),Ze=_e.byteLength,Ge(_e);var gt,ye=[],Re=[],ut=[],vt=[],Et=!1,Ct=!1;function Dt(){if(s.preRun)for(typeof s.preRun=="function"&&(s.preRun=[s.preRun]);s.preRun.length;)Xe(s.preRun.shift());Jt(ye)}function cr(){Et=!0,!s.noFSInit&&!q.init.initialized&&q.init(),dn.init(),Jt(Re)}function Xt(){q.ignorePermissions=!1,Jt(ut)}function gr(){Ct=!0}function Ae(){if(s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;)lt(s.postRun.shift());Jt(vt)}function Xe(I){ye.unshift(I)}function lt(I){vt.unshift(I)}var _t=0,Vt=null,Rr=null;function Ki(I){return I}function Pi(I){_t++,s.monitorRunDependencies&&s.monitorRunDependencies(_t)}function Fn(I){if(_t--,s.monitorRunDependencies&&s.monitorRunDependencies(_t),_t==0&&(Vt!==null&&(clearInterval(Vt),Vt=null),Rr)){var M=Rr;Rr=null,M()}}s.preloadedImages={},s.preloadedAudios={};function Kt(I){s.onAbort&&s.onAbort(I),I+="",F(I),U=!0,j=1,I="abort("+I+"). Build with -s ASSERTIONS=1 for more info.";var M=new WebAssembly.RuntimeError(I);throw o(M),M}function ds(I,M){return String.prototype.startsWith?I.startsWith(M):I.indexOf(M)===0}var Is="data:application/octet-stream;base64,";function ic(I){return ds(I,Is)}var um="file://";function fd(I){return ds(I,um)}var js=$we+"web-ifc.wasm";ic(js)||(js=E(js));function Te(){try{if(N)return new Uint8Array(N);if(S)return S(js);throw"both async and sync fetching of the wasm failed"}catch(I){Kt(I)}}function ze(){return!N&&(d||f)&&typeof fetch=="function"&&!fd(js)?fetch(js,{credentials:"same-origin"}).then(function(I){if(!I.ok)throw"failed to load wasm binary file at '"+js+"'";return I.arrayBuffer()}).catch(function(){return Te()}):Promise.resolve().then(Te)}function Qe(){var I={a:vu};function M(Ee,Ie){var De=Ee.exports;s.asm=De,gt=s.asm.X,Fn("wasm-instantiate")}Pi("wasm-instantiate");function L(Ee){M(Ee.instance)}function W(Ee){return ze().then(function(Ie){return WebAssembly.instantiate(Ie,I)}).then(Ee,function(Ie){F("failed to asynchronously prepare wasm: "+Ie),Kt(Ie)})}function te(){return!N&&typeof WebAssembly.instantiateStreaming=="function"&&!ic(js)&&!fd(js)&&typeof fetch=="function"?fetch(js,{credentials:"same-origin"}).then(function(Ee){var Ie=WebAssembly.instantiateStreaming(Ee,I);return Ie.then(L,function(De){return F("wasm streaming compile failed: "+De),F("falling back to ArrayBuffer instantiation"),W(L)})}):W(L)}if(s.instantiateWasm)try{var ge=s.instantiateWasm(I,M);return ge}catch(Ee){return F("Module.instantiateWasm callback failed with error: "+Ee),!1}return te().catch(o),{}}var Le,Ke;function Jt(I){for(;I.length>0;){var M=I.shift();if(typeof M=="function"){M(s);continue}var L=M.func;typeof L=="number"?M.arg===void 0?gt.get(L)():gt.get(L)(M.arg):L(M.arg===void 0?null:M.arg)}}function Ir(I,M,L){return L&&L.length?s["dynCall_"+I].apply(null,[M].concat(L)):s["dynCall_"+I].call(null,M)}function Nr(I,M,L){return I.indexOf("j")!=-1?Ir(I,M,L):gt.get(M).apply(null,L)}function Fr(I,M,L,W){Kt("Assertion failed: "+ue(I)+", at: "+[M?ue(M):"unknown filename",L,W?ue(W):"unknown function"])}function Yr(I){return z[zE()>>>2]=I,I}var kt={splitPath:function(I){var M=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return M.exec(I).slice(1)},normalizeArray:function(I,M){for(var L=0,W=I.length-1;W>=0;W--){var te=I[W];te==="."?I.splice(W,1):te===".."?(I.splice(W,1),L++):L&&(I.splice(W,1),L--)}if(M)for(;L;L--)I.unshift("..");return I},normalize:function(I){var M=I.charAt(0)==="/",L=I.slice(-1)==="/";return I=kt.normalizeArray(I.split("/").filter(function(W){return!!W}),!M).join("/"),!I&&!M&&(I="."),I&&L&&(I+="/"),(M?"/":"")+I},dirname:function(I){var M=kt.splitPath(I),L=M[0],W=M[1];return!L&&!W?".":(W&&(W=W.slice(0,W.length-1)),L+W)},basename:function(I){if(I==="/")return"/";I=kt.normalize(I),I=I.replace(/\/$/,"");var M=I.lastIndexOf("/");return M===-1?I:I.slice(M+1)},extname:function(I){return kt.splitPath(I)[3]},join:function(){var I=Array.prototype.slice.call(arguments,0);return kt.normalize(I.join("/"))},join2:function(I,M){return kt.normalize(I+"/"+M)}};function Vr(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var I=new Uint8Array(1);return function(){return crypto.getRandomValues(I),I[0]}}else if(m)try{var M=FTt();return function(){return M.randomBytes(1)[0]}}catch(L){}return function(){Kt("randomDevice")}}var ei={resolve:function(){for(var I="",M=!1,L=arguments.length-1;L>=-1&&!M;L--){var W=L>=0?arguments[L]:q.cwd();if(typeof W!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!W)return"";I=W+"/"+I,M=W.charAt(0)==="/"}return I=kt.normalizeArray(I.split("/").filter(function(te){return!!te}),!M).join("/"),(M?"/":"")+I||"."},relative:function(I,M){I=ei.resolve(I).slice(1),M=ei.resolve(M).slice(1);function L($e){for(var rt=0;rt<$e.length&&$e[rt]==="";rt++);for(var It=$e.length-1;It>=0&&$e[It]==="";It--);return rt>It?[]:$e.slice(rt,It-rt+1)}for(var W=L(I.split("/")),te=L(M.split("/")),ge=Math.min(W.length,te.length),Ee=ge,Ie=0;Ie0?M=W.slice(0,te).toString("utf-8"):M=null}else typeof window!="undefined"&&typeof window.prompt=="function"?(M=window.prompt("Input: "),M!==null&&(M+=` -`)):typeof readline=="function"&&(M=readline(),M!==null&&(M+=` -`));if(!M)return null;I.input=Dh(M,!0)}return I.input.shift()},put_char:function(I,M){M===null||M===10?(w(se(I.output,0)),I.output=[]):M!=0&&I.output.push(M)},flush:function(I){I.output&&I.output.length>0&&(w(se(I.output,0)),I.output=[])}},default_tty1_ops:{put_char:function(I,M){M===null||M===10?(F(se(I.output,0)),I.output=[]):M!=0&&I.output.push(M)},flush:function(I){I.output&&I.output.length>0&&(F(se(I.output,0)),I.output=[])}}};function ki(I){for(var M=H(I,16384),L=fm(M);I>>0]=0;return L}var nr={ops_table:null,mount:function(I){return nr.createNode(null,"/",16895,0)},createNode:function(I,M,L,W){if(q.isBlkdev(L)||q.isFIFO(L))throw new q.ErrnoError(63);nr.ops_table||(nr.ops_table={dir:{node:{getattr:nr.node_ops.getattr,setattr:nr.node_ops.setattr,lookup:nr.node_ops.lookup,mknod:nr.node_ops.mknod,rename:nr.node_ops.rename,unlink:nr.node_ops.unlink,rmdir:nr.node_ops.rmdir,readdir:nr.node_ops.readdir,symlink:nr.node_ops.symlink},stream:{llseek:nr.stream_ops.llseek}},file:{node:{getattr:nr.node_ops.getattr,setattr:nr.node_ops.setattr},stream:{llseek:nr.stream_ops.llseek,read:nr.stream_ops.read,write:nr.stream_ops.write,allocate:nr.stream_ops.allocate,mmap:nr.stream_ops.mmap,msync:nr.stream_ops.msync}},link:{node:{getattr:nr.node_ops.getattr,setattr:nr.node_ops.setattr,readlink:nr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:nr.node_ops.getattr,setattr:nr.node_ops.setattr},stream:q.chrdev_stream_ops}});var te=q.createNode(I,M,L,W);return q.isDir(te.mode)?(te.node_ops=nr.ops_table.dir.node,te.stream_ops=nr.ops_table.dir.stream,te.contents={}):q.isFile(te.mode)?(te.node_ops=nr.ops_table.file.node,te.stream_ops=nr.ops_table.file.stream,te.usedBytes=0,te.contents=null):q.isLink(te.mode)?(te.node_ops=nr.ops_table.link.node,te.stream_ops=nr.ops_table.link.stream):q.isChrdev(te.mode)&&(te.node_ops=nr.ops_table.chrdev.node,te.stream_ops=nr.ops_table.chrdev.stream),te.timestamp=Date.now(),I&&(I.contents[M]=te),te},getFileDataAsRegularArray:function(I){if(I.contents&&I.contents.subarray){for(var M=[],L=0;L>>=0;var L=I.contents?I.contents.length:0;if(!(L>=M)){var W=1024*1024;M=Math.max(M,L*(L>>0),L!=0&&(M=Math.max(M,256));var te=I.contents;I.contents=new Uint8Array(M),I.usedBytes>0&&I.contents.set(te.subarray(0,I.usedBytes),0)}},resizeFileStorage:function(I,M){if(M>>>=0,I.usedBytes!=M){if(M==0){I.contents=null,I.usedBytes=0;return}if(!I.contents||I.contents.subarray){var L=I.contents;I.contents=new Uint8Array(M),L&&I.contents.set(L.subarray(0,Math.min(M,I.usedBytes))),I.usedBytes=M;return}if(I.contents||(I.contents=[]),I.contents.length>M)I.contents.length=M;else for(;I.contents.length=I.node.usedBytes)return 0;var Ee=Math.min(I.node.usedBytes-te,W);if(Ee>8&&ge.subarray)M.set(ge.subarray(te,te+Ee),L);else for(var Ie=0;Ie0||W+L>>=0,J.set(De,Ee>>>0)}return{ptr:Ee,allocated:Ie}},msync:function(I,M,L,W,te){if(!q.isFile(I.node.mode))throw new q.ErrnoError(43);if(te&2)return 0;var ge=nr.stream_ops.write(I,M,0,W,L,!1);return 0}}},q={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(I,M){if(I=ei.resolve(q.cwd(),I),M=M||{},!I)return{path:"",node:null};var L={follow_mount:!0,recurse_count:0};for(var W in L)M[W]===void 0&&(M[W]=L[W]);if(M.recurse_count>8)throw new q.ErrnoError(32);for(var te=kt.normalizeArray(I.split("/").filter(function(xt){return!!xt}),!1),ge=q.root,Ee="/",Ie=0;Ie40)throw new q.ErrnoError(32)}}return{path:Ee,node:ge}},getPath:function(I){for(var M;;){if(q.isRoot(I)){var L=I.mount.mountpoint;return M?L[L.length-1]!=="/"?L+"/"+M:L+M:L}M=M?I.name+"/"+M:I.name,I=I.parent}},hashName:function(I,M){for(var L=0,W=0;W>>0)%q.nameTable.length},hashAddNode:function(I){var M=q.hashName(I.parent.id,I.name);I.name_next=q.nameTable[M],q.nameTable[M]=I},hashRemoveNode:function(I){var M=q.hashName(I.parent.id,I.name);if(q.nameTable[M]===I)q.nameTable[M]=I.name_next;else for(var L=q.nameTable[M];L;){if(L.name_next===I){L.name_next=I.name_next;break}L=L.name_next}},lookupNode:function(I,M){var L=q.mayLookup(I);if(L)throw new q.ErrnoError(L,I);for(var W=q.hashName(I.id,M),te=q.nameTable[W];te;te=te.name_next){var ge=te.name;if(te.parent.id===I.id&&ge===M)return te}return q.lookup(I,M)},createNode:function(I,M,L,W){var te=new q.FSNode(I,M,L,W);return q.hashAddNode(te),te},destroyNode:function(I){q.hashRemoveNode(I)},isRoot:function(I){return I===I.parent},isMountpoint:function(I){return!!I.mounted},isFile:function(I){return(I&61440)===32768},isDir:function(I){return(I&61440)===16384},isLink:function(I){return(I&61440)===40960},isChrdev:function(I){return(I&61440)===8192},isBlkdev:function(I){return(I&61440)===24576},isFIFO:function(I){return(I&61440)===4096},isSocket:function(I){return(I&49152)===49152},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(I){var M=q.flagModes[I];if(typeof M=="undefined")throw new Error("Unknown file open mode: "+I);return M},flagsToPermissionString:function(I){var M=["r","w","rw"][I&3];return I&512&&(M+="w"),M},nodePermissions:function(I,M){return q.ignorePermissions?0:M.indexOf("r")!==-1&&!(I.mode&292)||M.indexOf("w")!==-1&&!(I.mode&146)||M.indexOf("x")!==-1&&!(I.mode&73)?2:0},mayLookup:function(I){var M=q.nodePermissions(I,"x");return M||(I.node_ops.lookup?0:2)},mayCreate:function(I,M){try{var L=q.lookupNode(I,M);return 20}catch(W){}return q.nodePermissions(I,"wx")},mayDelete:function(I,M,L){var W;try{W=q.lookupNode(I,M)}catch(ge){return ge.errno}var te=q.nodePermissions(I,"wx");if(te)return te;if(L){if(!q.isDir(W.mode))return 54;if(q.isRoot(W)||q.getPath(W)===q.cwd())return 10}else if(q.isDir(W.mode))return 31;return 0},mayOpen:function(I,M){return I?q.isLink(I.mode)?32:q.isDir(I.mode)&&(q.flagsToPermissionString(M)!=="r"||M&512)?31:q.nodePermissions(I,q.flagsToPermissionString(M)):44},MAX_OPEN_FDS:4096,nextfd:function(I,M){I=I||0,M=M||q.MAX_OPEN_FDS;for(var L=I;L<=M;L++)if(!q.streams[L])return L;throw new q.ErrnoError(33)},getStream:function(I){return q.streams[I]},createStream:function(I,M,L){q.FSStream||(q.FSStream=function(){},q.FSStream.prototype={object:{get:function(){return this.node},set:function(Ee){this.node=Ee}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}});var W=new q.FSStream;for(var te in I)W[te]=I[te];I=W;var ge=q.nextfd(M,L);return I.fd=ge,q.streams[ge]=I,I},closeStream:function(I){q.streams[I]=null},chrdev_stream_ops:{open:function(I){var M=q.getDevice(I.node.rdev);I.stream_ops=M.stream_ops,I.stream_ops.open&&I.stream_ops.open(I)},llseek:function(){throw new q.ErrnoError(70)}},major:function(I){return I>>8},minor:function(I){return I&255},makedev:function(I,M){return I<<8|M},registerDevice:function(I,M){q.devices[I]={stream_ops:M}},getDevice:function(I){return q.devices[I]},getMounts:function(I){for(var M=[],L=[I];L.length;){var W=L.pop();M.push(W),L.push.apply(L,W.mounts)}return M},syncfs:function(I,M){typeof I=="function"&&(M=I,I=!1),q.syncFSRequests++,q.syncFSRequests>1&&F("warning: "+q.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var L=q.getMounts(q.root.mount),W=0;function te(Ee){return q.syncFSRequests--,M(Ee)}function ge(Ee){if(Ee)return ge.errored?void 0:(ge.errored=!0,te(Ee));++W>=L.length&&te(null)}L.forEach(function(Ee){if(!Ee.type.syncfs)return ge(null);Ee.type.syncfs(Ee,I,ge)})},mount:function(I,M,L){var W=L==="/",te=!L,ge;if(W&&q.root)throw new q.ErrnoError(10);if(!W&&!te){var Ee=q.lookupPath(L,{follow_mount:!1});if(L=Ee.path,ge=Ee.node,q.isMountpoint(ge))throw new q.ErrnoError(10);if(!q.isDir(ge.mode))throw new q.ErrnoError(54)}var Ie={type:I,opts:M,mountpoint:L,mounts:[]},De=I.mount(Ie);return De.mount=Ie,Ie.root=De,W?q.root=De:ge&&(ge.mounted=Ie,ge.mount&&ge.mount.mounts.push(Ie)),De},unmount:function(I){var M=q.lookupPath(I,{follow_mount:!1});if(!q.isMountpoint(M.node))throw new q.ErrnoError(28);var L=M.node,W=L.mounted,te=q.getMounts(W);Object.keys(q.nameTable).forEach(function(Ee){for(var Ie=q.nameTable[Ee];Ie;){var De=Ie.name_next;te.indexOf(Ie.mount)!==-1&&q.destroyNode(Ie),Ie=De}}),L.mounted=null;var ge=L.mount.mounts.indexOf(W);L.mount.mounts.splice(ge,1)},lookup:function(I,M){return I.node_ops.lookup(I,M)},mknod:function(I,M,L){var W=q.lookupPath(I,{parent:!0}),te=W.node,ge=kt.basename(I);if(!ge||ge==="."||ge==="..")throw new q.ErrnoError(28);var Ee=q.mayCreate(te,ge);if(Ee)throw new q.ErrnoError(Ee);if(!te.node_ops.mknod)throw new q.ErrnoError(63);return te.node_ops.mknod(te,ge,M,L)},create:function(I,M){return M=M!==void 0?M:438,M&=4095,M|=32768,q.mknod(I,M,0)},mkdir:function(I,M){return M=M!==void 0?M:511,M&=1023,M|=16384,q.mknod(I,M,0)},mkdirTree:function(I,M){for(var L=I.split("/"),W="",te=0;te>>=0,W<0||te<0)throw new q.ErrnoError(28);if(q.isClosed(I))throw new q.ErrnoError(8);if((I.flags&2097155)===1)throw new q.ErrnoError(8);if(q.isDir(I.node.mode))throw new q.ErrnoError(31);if(!I.stream_ops.read)throw new q.ErrnoError(28);var ge=typeof te!="undefined";if(!ge)te=I.position;else if(!I.seekable)throw new q.ErrnoError(70);var Ee=I.stream_ops.read(I,M,L,W,te);return ge||(I.position+=Ee),Ee},write:function(I,M,L,W,te,ge){if(L>>>=0,W<0||te<0)throw new q.ErrnoError(28);if(q.isClosed(I))throw new q.ErrnoError(8);if(!(I.flags&2097155))throw new q.ErrnoError(8);if(q.isDir(I.node.mode))throw new q.ErrnoError(31);if(!I.stream_ops.write)throw new q.ErrnoError(28);I.seekable&&I.flags&1024&&q.llseek(I,0,2);var Ee=typeof te!="undefined";if(!Ee)te=I.position;else if(!I.seekable)throw new q.ErrnoError(70);var Ie=I.stream_ops.write(I,M,L,W,te,ge);Ee||(I.position+=Ie);try{I.path&&q.trackingDelegate.onWriteToFile&&q.trackingDelegate.onWriteToFile(I.path)}catch(De){F("FS.trackingDelegate['onWriteToFile']('"+I.path+"') threw an exception: "+De.message)}return Ie},allocate:function(I,M,L){if(q.isClosed(I))throw new q.ErrnoError(8);if(M<0||L<=0)throw new q.ErrnoError(28);if(!(I.flags&2097155))throw new q.ErrnoError(8);if(!q.isFile(I.node.mode)&&!q.isDir(I.node.mode))throw new q.ErrnoError(43);if(!I.stream_ops.allocate)throw new q.ErrnoError(138);I.stream_ops.allocate(I,M,L)},mmap:function(I,M,L,W,te,ge){if(M>>>=0,te&2&&!(ge&2)&&(I.flags&2097155)!==2)throw new q.ErrnoError(2);if((I.flags&2097155)===1)throw new q.ErrnoError(2);if(!I.stream_ops.mmap)throw new q.ErrnoError(43);return I.stream_ops.mmap(I,M,L,W,te,ge)},msync:function(I,M,L,W,te){return L>>>=0,!I||!I.stream_ops.msync?0:I.stream_ops.msync(I,M,L,W,te)},munmap:function(I){return 0},ioctl:function(I,M,L){if(!I.stream_ops.ioctl)throw new q.ErrnoError(59);return I.stream_ops.ioctl(I,M,L)},readFile:function(I,M){if(M=M||{},M.flags=M.flags||0,M.encoding=M.encoding||"binary",M.encoding!=="utf8"&&M.encoding!=="binary")throw new Error('Invalid encoding type "'+M.encoding+'"');var L,W=q.open(I,M.flags),te=q.stat(I),ge=te.size,Ee=new Uint8Array(ge);return q.read(W,Ee,0,ge,0),M.encoding==="utf8"?L=se(Ee,0):M.encoding==="binary"&&(L=Ee),q.close(W),L},writeFile:function(I,M,L){L=L||{},L.flags=L.flags||577;var W=q.open(I,L.flags,L.mode);if(typeof M=="string"){var te=new Uint8Array(de(M)+1),ge=ve(M,te,0,te.length);q.write(W,te,0,ge,void 0,L.canOwn)}else if(ArrayBuffer.isView(M))q.write(W,M,0,M.byteLength,void 0,L.canOwn);else throw new Error("Unsupported data type");q.close(W)},cwd:function(){return q.currentPath},chdir:function(I){var M=q.lookupPath(I,{follow:!0});if(M.node===null)throw new q.ErrnoError(44);if(!q.isDir(M.node.mode))throw new q.ErrnoError(54);var L=q.nodePermissions(M.node,"x");if(L)throw new q.ErrnoError(L);q.currentPath=M.path},createDefaultDirectories:function(){q.mkdir("/tmp"),q.mkdir("/home"),q.mkdir("/home/web_user")},createDefaultDevices:function(){q.mkdir("/dev"),q.registerDevice(q.makedev(1,3),{read:function(){return 0},write:function(M,L,W,te,ge){return te}}),q.mkdev("/dev/null",q.makedev(1,3)),dn.register(q.makedev(5,0),dn.default_tty_ops),dn.register(q.makedev(6,0),dn.default_tty1_ops),q.mkdev("/dev/tty",q.makedev(5,0)),q.mkdev("/dev/tty1",q.makedev(6,0));var I=Vr();q.createDevice("/dev","random",I),q.createDevice("/dev","urandom",I),q.mkdir("/dev/shm"),q.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){q.mkdir("/proc"),q.mkdir("/proc/self"),q.mkdir("/proc/self/fd"),q.mount({mount:function(){var I=q.createNode("/proc/self","fd",16895,73);return I.node_ops={lookup:function(M,L){var W=+L,te=q.getStream(W);if(!te)throw new q.ErrnoError(8);var ge={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return te.path}}};return ge.parent=ge,ge}},I}},{},"/proc/self/fd")},createStandardStreams:function(){s.stdin?q.createDevice("/dev","stdin",s.stdin):q.symlink("/dev/tty","/dev/stdin"),s.stdout?q.createDevice("/dev","stdout",null,s.stdout):q.symlink("/dev/tty","/dev/stdout"),s.stderr?q.createDevice("/dev","stderr",null,s.stderr):q.symlink("/dev/tty1","/dev/stderr");var I=q.open("/dev/stdin",0),M=q.open("/dev/stdout",1),L=q.open("/dev/stderr",1)},ensureErrnoError:function(){q.ErrnoError||(q.ErrnoError=function(M,L){this.node=L,this.setErrno=function(W){this.errno=W},this.setErrno(M),this.message="FS error"},q.ErrnoError.prototype=new Error,q.ErrnoError.prototype.constructor=q.ErrnoError,[44].forEach(function(I){q.genericErrors[I]=new q.ErrnoError(I),q.genericErrors[I].stack=""}))},staticInit:function(){q.ensureErrnoError(),q.nameTable=new Array(4096),q.mount(nr,{},"/"),q.createDefaultDirectories(),q.createDefaultDevices(),q.createSpecialDirectories(),q.filesystems={MEMFS:nr}},init:function(I,M,L){q.init.initialized=!0,q.ensureErrnoError(),s.stdin=I||s.stdin,s.stdout=M||s.stdout,s.stderr=L||s.stderr,q.createStandardStreams()},quit:function(){q.init.initialized=!1;var I=s._fflush;I&&I(0);for(var M=0;Mthis.length-1||xt<0)){var wt=xt%this.chunkSize,tr=xt/this.chunkSize|0;return this.getter(tr)[wt]}},ge.prototype.setDataGetter=function(xt){this.getter=xt},ge.prototype.cacheLength=function(){var xt=new XMLHttpRequest;if(xt.open("HEAD",L,!1),xt.send(null),!(xt.status>=200&&xt.status<300||xt.status===304))throw new Error("Couldn't load "+L+". Status: "+xt.status);var wt=Number(xt.getResponseHeader("Content-length")),tr,vi=(tr=xt.getResponseHeader("Accept-Ranges"))&&tr==="bytes",Mi=(tr=xt.getResponseHeader("Content-Encoding"))&&tr==="gzip",Ai=1024*1024;vi||(Ai=wt);var yt=function(Kr,Xr){if(Kr>Xr)throw new Error("invalid range ("+Kr+", "+Xr+") or no bytes requested!");if(Xr>wt-1)throw new Error("only "+wt+" bytes available! programmer error!");var ie=new XMLHttpRequest;if(ie.open("GET",L,!1),wt!==Ai&&ie.setRequestHeader("Range","bytes="+Kr+"-"+Xr),typeof Uint8Array!="undefined"&&(ie.responseType="arraybuffer"),ie.overrideMimeType&&ie.overrideMimeType("text/plain; charset=x-user-defined"),ie.send(null),!(ie.status>=200&&ie.status<300||ie.status===304))throw new Error("Couldn't load "+L+". Status: "+ie.status);return ie.response!==void 0?new Uint8Array(ie.response||[]):Dh(ie.responseText||"",!0)},Lt=this;Lt.setDataGetter(function(Kr){var Xr=Kr*Ai,ie=(Kr+1)*Ai-1;if(ie=Math.min(ie,wt-1),typeof Lt.chunks[Kr]=="undefined"&&(Lt.chunks[Kr]=yt(Xr,ie)),typeof Lt.chunks[Kr]=="undefined")throw new Error("doXHR failed!");return Lt.chunks[Kr]}),(Mi||!wt)&&(Ai=wt=1,wt=this.getter(0).length,Ai=wt,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=wt,this._chunkSize=Ai,this.lengthKnown=!0},typeof XMLHttpRequest!="undefined"){if(!f)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var Ee=new ge;Object.defineProperties(Ee,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var Ie={isDevice:!1,contents:Ee}}else var Ie={isDevice:!1,url:L};var De=q.createFile(I,M,Ie,W,te);Ie.contents?De.contents=Ie.contents:Ie.url&&(De.contents=null,De.url=Ie.url),Object.defineProperties(De,{usedBytes:{get:function(){return this.contents.length}}});var $e={},rt=Object.keys(De.stream_ops);return rt.forEach(function(It){var xt=De.stream_ops[It];$e[It]=function(){return q.forceLoadFile(De),xt.apply(null,arguments)}}),$e.read=function(xt,wt,tr,vi,Mi){q.forceLoadFile(De);var Ai=xt.node.contents;if(Mi>=Ai.length)return 0;var yt=Math.min(Ai.length-Mi,vi);if(Ai.slice)for(var Lt=0;Lt>>2]=W.dev,z[L+4>>>2]=0,z[L+8>>>2]=W.ino,z[L+12>>>2]=W.mode,z[L+16>>>2]=W.nlink,z[L+20>>>2]=W.uid,z[L+24>>>2]=W.gid,z[L+28>>>2]=W.rdev,z[L+32>>>2]=0,Ke=[W.size>>>0,(Le=W.size,+Math.abs(Le)>=1?Le>0?(Math.min(+Math.floor(Le/4294967296),4294967295)|0)>>>0:~~+Math.ceil((Le-+(~~Le>>>0))/4294967296)>>>0:0)],z[L+40>>>2]=Ke[0],z[L+44>>>2]=Ke[1],z[L+48>>>2]=4096,z[L+52>>>2]=W.blocks,z[L+56>>>2]=W.atime.getTime()/1e3|0,z[L+60>>>2]=0,z[L+64>>>2]=W.mtime.getTime()/1e3|0,z[L+68>>>2]=0,z[L+72>>>2]=W.ctime.getTime()/1e3|0,z[L+76>>>2]=0,Ke=[W.ino>>>0,(Le=W.ino,+Math.abs(Le)>=1?Le>0?(Math.min(+Math.floor(Le/4294967296),4294967295)|0)>>>0:~~+Math.ceil((Le-+(~~Le>>>0))/4294967296)>>>0:0)],z[L+80>>>2]=Ke[0],z[L+84>>>2]=Ke[1],0},doMsync:function(I,M,L,W,te){var ge=$.slice(I,I+L);q.msync(M,ge,te,L,W)},doMkdir:function(I,M){return I=kt.normalize(I),I[I.length-1]==="/"&&(I=I.slice(0,I.length-1)),q.mkdir(I,M,0),0},doMknod:function(I,M,L){switch(M&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return q.mknod(I,M,L),0},doReadlink:function(I,M,L){if(L<=0)return-28;var W=q.readlink(I),te=Math.min(L,de(W)),ge=J[M+te>>>0];return be(W,M,L+1),J[M+te>>>0]=ge,te},doAccess:function(I,M){if(M&-8)return-28;var L,W=q.lookupPath(I,{follow:!0});if(L=W.node,!L)return-44;var te="";return M&4&&(te+="r"),M&2&&(te+="w"),M&1&&(te+="x"),te&&q.nodePermissions(L,te)?-2:0},doDup:function(I,M,L){var W=q.getStream(L);return W&&q.close(W),q.open(I,M,0,L,L).fd},doReadv:function(I,M,L,W){for(var te=0,ge=0;ge>>2],Ie=z[M+(ge*8+4)>>>2],De=q.read(I,J,Ee,Ie,W);if(De<0)return-1;if(te+=De,De>>2],Ie=z[M+(ge*8+4)>>>2],De=q.write(I,J,Ee,Ie,W);if(De<0)return-1;te+=De}return te},varargs:void 0,get:function(){er.varargs+=4;var I=z[er.varargs-4>>>2];return I},getStr:function(I){var M=ue(I);return M},getStreamFromFD:function(I){var M=q.getStream(I);if(!M)throw new q.ErrnoError(8);return M},get64:function(I,M){return I}};function cu(I,M,L){er.varargs=L;try{var W=er.getStreamFromFD(I);switch(M){case 0:{var te=er.get();if(te<0)return-28;var ge;return ge=q.open(W.path,W.flags,0,te),ge.fd}case 1:case 2:return 0;case 3:return W.flags;case 4:{var te=er.get();return W.flags|=te,0}case 12:{var te=er.get(),Ee=0;return re[te+Ee>>>1]=2,0}case 13:case 14:return 0;case 16:case 8:return-28;case 9:return Yr(28),-1;default:return-28}}catch(Ie){return(typeof q=="undefined"||!(Ie instanceof q.ErrnoError))&&Kt(Ie),-Ie.errno}}function fn(I,M,L){er.varargs=L;try{var W=er.getStreamFromFD(I);switch(M){case 21509:case 21505:return W.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return W.tty?0:-59;case 21519:{if(!W.tty)return-59;var te=er.get();return z[te>>>2]=0,0}case 21520:return W.tty?-28:-59;case 21531:{var te=er.get();return q.ioctl(W,M,te)}case 21523:return W.tty?0:-59;case 21524:return W.tty?0:-59;default:Kt("bad ioctl syscall "+M)}}catch(ge){return(typeof q=="undefined"||!(ge instanceof q.ErrnoError))&&Kt(ge),-ge.errno}}function Ha(I,M,L){er.varargs=L;try{var W=er.getStr(I),te=er.get(),ge=q.open(W,M,te);return ge.fd}catch(Ee){return(typeof q=="undefined"||!(Ee instanceof q.ErrnoError))&&Kt(Ee),-Ee.errno}}var nc={};function aa(I){for(;I.length;){var M=I.pop(),L=I.pop();L(M)}}function oa(I){return this.fromWireType(Y[I>>>2])}var on={},En={},Io={},Xn=48,sc=57;function uu(I){if(I===void 0)return"_unknown";I=I.replace(/[^a-zA-Z0-9_]/g,"$");var M=I.charCodeAt(0);return M>=Xn&&M<=sc?"_"+I:I}function ac(I,M){return I=uu(I),new Function("body","return function "+I+`() { - "use strict"; return body.apply(this, arguments); -}; -`)(M)}function hu(I,M){var L=ac(M,function(W){this.name=M,this.message=W;var te=new Error(W).stack;te!==void 0&&(this.stack=this.toString()+` -`+te.replace(/^Error(:[^\n]*)?\n/,""))});return L.prototype=Object.create(I.prototype),L.prototype.constructor=L,L.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},L}var hm=void 0;function bh(I){throw new hm(I)}function Ni(I,M,L){I.forEach(function(Ie){Io[Ie]=M});function W(Ie){var De=L(Ie);De.length!==I.length&&bh("Mismatched type converter count");for(var $e=0;$e>>0];)M+=oc[$[L++>>>0]];return M}var al=void 0;function Zr(I){throw new al(I)}function Qt(I,M,L){if(L=L||{},!("argPackAdvance"in M))throw new TypeError("registerType registeredInstance requires argPackAdvance");var W=M.name;if(I||Zr('type "'+W+'" must have a positive integer typeid pointer'),En.hasOwnProperty(I)){if(L.ignoreDuplicateRegistrations)return;Zr("Cannot register type '"+W+"' twice")}if(En[I]=M,delete Io[I],on.hasOwnProperty(I)){var te=on[I];delete on[I],te.forEach(function(ge){ge()})}}function Sh(I,M,L,W,te){var ge=xh(L);M=Xi(M),Qt(I,{name:M,fromWireType:function(Ee){return!!Ee},toWireType:function(Ee,Ie){return Ie?W:te},argPackAdvance:8,readValueFromPointer:function(Ee){var Ie;if(L===1)Ie=J;else if(L===2)Ie=re;else if(L===4)Ie=z;else throw new TypeError("Unknown boolean type size: "+M);return this.fromWireType(Ie[Ee>>>ge])},destructorFunction:null})}function K(I){if(!(this instanceof xi)||!(I instanceof xi))return!1;for(var M=this.$$.ptrType.registeredClass,L=this.$$.ptr,W=I.$$.ptrType.registeredClass,te=I.$$.ptr;M.baseClass;)L=M.upcast(L),M=M.baseClass;for(;W.baseClass;)te=W.upcast(te),W=W.baseClass;return M===W&&L===te}function Z(I){return{count:I.count,deleteScheduled:I.deleteScheduled,preservePointerOnDelete:I.preservePointerOnDelete,ptr:I.ptr,ptrType:I.ptrType,smartPtr:I.smartPtr,smartPtrType:I.smartPtrType}}function ce(I){function M(L){return L.$$.ptrType.registeredClass.name}Zr(M(I)+" instance already deleted")}var oe=!1;function pe(I){}function qe(I){I.smartPtr?I.smartPtrType.rawDestructor(I.smartPtr):I.ptrType.registeredClass.rawDestructor(I.ptr)}function et(I){I.count.value-=1;var M=I.count.value===0;M&&qe(I)}function Ht(I){return typeof FinalizationGroup=="undefined"?(Ht=function(M){return M},I):(oe=new FinalizationGroup(function(M){for(var L=M.next();!L.done;L=M.next()){var W=L.value;W.ptr?et(W):console.warn("object already deleted: "+W.ptr)}}),Ht=function(M){return oe.register(M,M.$$,M.$$),M},pe=function(M){oe.unregister(M.$$)},Ht(I))}function Mt(){if(this.$$.ptr||ce(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var I=Ht(Object.create(Object.getPrototypeOf(this),{$$:{value:Z(this.$$)}}));return I.$$.count.value+=1,I.$$.deleteScheduled=!1,I}function Ft(){this.$$.ptr||ce(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Zr("Object already scheduled for deletion"),pe(this),et(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function $t(){return!this.$$.ptr}var pt=void 0,qt=[];function zt(){for(;qt.length;){var I=qt.pop();I.$$.deleteScheduled=!1,I.delete()}}function ur(){return this.$$.ptr||ce(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Zr("Object already scheduled for deletion"),qt.push(this),qt.length===1&&pt&&pt(zt),this.$$.deleteScheduled=!0,this}function sr(){xi.prototype.isAliasOf=K,xi.prototype.clone=Mt,xi.prototype.delete=Ft,xi.prototype.isDeleted=$t,xi.prototype.deleteLater=ur}function xi(){}var ar={};function Zt(I,M,L){if(I[M].overloadTable===void 0){var W=I[M];I[M]=function(){return I[M].overloadTable.hasOwnProperty(arguments.length)||Zr("Function '"+L+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+I[M].overloadTable+")!"),I[M].overloadTable[arguments.length].apply(this,arguments)},I[M].overloadTable=[],I[M].overloadTable[W.argCount]=W}}function ti(I,M,L){s.hasOwnProperty(I)?((L===void 0||s[I].overloadTable!==void 0&&s[I].overloadTable[L]!==void 0)&&Zr("Cannot register public name '"+I+"' twice"),Zt(s,I,I),s.hasOwnProperty(L)&&Zr("Cannot register multiple overloads of a function with the same number of arguments ("+L+")!"),s[I].overloadTable[L]=M):(s[I]=M,L!==void 0&&(s[I].numArguments=L))}function So(I,M,L,W,te,ge,Ee,Ie){this.name=I,this.constructor=M,this.instancePrototype=L,this.rawDestructor=W,this.baseClass=te,this.getActualType=ge,this.upcast=Ee,this.downcast=Ie,this.pureVirtualFunctions=[]}function as(I,M,L){for(;M!==L;)M.upcast||Zr("Expected null or instance of "+L.name+", got an instance of "+M.name),I=M.upcast(I),M=M.baseClass;return I}function du(I,M){if(M===null)return this.isReference&&Zr("null is not a valid "+this.name),0;M.$$||Zr('Cannot pass "'+Rh(M)+'" as a '+this.name),M.$$.ptr||Zr("Cannot pass deleted object as a pointer of type "+this.name);var L=M.$$.ptrType.registeredClass,W=as(M.$$.ptr,L,this.registeredClass);return W}function SE(I,M){var L;if(M===null)return this.isReference&&Zr("null is not a valid "+this.name),this.isSmartPointer?(L=this.rawConstructor(),I!==null&&I.push(this.rawDestructor,L),L):0;M.$$||Zr('Cannot pass "'+Rh(M)+'" as a '+this.name),M.$$.ptr||Zr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&M.$$.ptrType.isConst&&Zr("Cannot convert argument of type "+(M.$$.smartPtrType?M.$$.smartPtrType.name:M.$$.ptrType.name)+" to parameter type "+this.name);var W=M.$$.ptrType.registeredClass;if(L=as(M.$$.ptr,W,this.registeredClass),this.isSmartPointer)switch(M.$$.smartPtr===void 0&&Zr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:M.$$.smartPtrType===this?L=M.$$.smartPtr:Zr("Cannot convert argument of type "+(M.$$.smartPtrType?M.$$.smartPtrType.name:M.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:L=M.$$.smartPtr;break;case 2:if(M.$$.smartPtrType===this)L=M.$$.smartPtr;else{var te=M.clone();L=this.rawShare(L,_o(function(){te.delete()})),I!==null&&I.push(this.rawDestructor,L)}break;default:Zr("Unsupporting sharing policy")}return L}function F0(I,M){if(M===null)return this.isReference&&Zr("null is not a valid "+this.name),0;M.$$||Zr('Cannot pass "'+Rh(M)+'" as a '+this.name),M.$$.ptr||Zr("Cannot pass deleted object as a pointer of type "+this.name),M.$$.ptrType.isConst&&Zr("Cannot convert argument of type "+M.$$.ptrType.name+" to parameter type "+this.name);var L=M.$$.ptrType.registeredClass,W=as(M.$$.ptr,L,this.registeredClass);return W}function e_(I){return this.rawGetPointee&&(I=this.rawGetPointee(I)),I}function P3(I){this.rawDestructor&&this.rawDestructor(I)}function os(I){I!==null&&I.delete()}function H0(I,M,L){if(M===L)return I;if(L.baseClass===void 0)return null;var W=H0(I,M,L.baseClass);return W===null?null:L.downcast(W)}function _h(){return Object.keys(gd).length}function t_(){var I=[];for(var M in gd)gd.hasOwnProperty(M)&&I.push(gd[M]);return I}function _E(I){pt=I,qt.length&&pt&&pt(zt)}function Ua(){s.getInheritedInstanceCount=_h,s.getLiveInheritedInstances=t_,s.flushPendingDeletes=zt,s.setDelayFunction=_E}var gd={};function r_(I,M){for(M===void 0&&Zr("ptr should not be undefined");I.baseClass;)M=I.upcast(M),I=I.baseClass;return M}function i_(I,M){return M=r_(I,M),gd[M]}function pm(I,M){(!M.ptrType||!M.ptr)&&bh("makeClassHandle requires ptr and ptrType");var L=!!M.smartPtrType,W=!!M.smartPtr;return L!==W&&bh("Both smartPtrType and smartPtr must be specified"),M.count={value:1},Ht(Object.create(I,{$$:{value:M}}))}function n_(I){var M=this.getPointee(I);if(!M)return this.destructor(I),null;var L=i_(this.registeredClass,M);if(L!==void 0){if(L.$$.count.value===0)return L.$$.ptr=M,L.$$.smartPtr=I,L.clone();var W=L.clone();return this.destructor(I),W}function te(){return this.isSmartPointer?pm(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:M,smartPtrType:this,smartPtr:I}):pm(this.registeredClass.instancePrototype,{ptrType:this,ptr:I})}var ge=this.registeredClass.getActualType(M),Ee=ar[ge];if(!Ee)return te.call(this);var Ie;this.isConst?Ie=Ee.constPointerType:Ie=Ee.pointerType;var De=H0(M,this.registeredClass,Ie.registeredClass);return De===null?te.call(this):this.isSmartPointer?pm(Ie.registeredClass.instancePrototype,{ptrType:Ie,ptr:De,smartPtrType:this,smartPtr:I}):pm(Ie.registeredClass.instancePrototype,{ptrType:Ie,ptr:De})}function s_(){wn.prototype.getPointee=e_,wn.prototype.destructor=P3,wn.prototype.argPackAdvance=8,wn.prototype.readValueFromPointer=oa,wn.prototype.deleteObject=os,wn.prototype.fromWireType=n_}function wn(I,M,L,W,te,ge,Ee,Ie,De,$e,rt){this.name=I,this.registeredClass=M,this.isReference=L,this.isConst=W,this.isSmartPointer=te,this.pointeeType=ge,this.sharingPolicy=Ee,this.rawGetPointee=Ie,this.rawConstructor=De,this.rawShare=$e,this.rawDestructor=rt,!te&&M.baseClass===void 0?W?(this.toWireType=du,this.destructorFunction=null):(this.toWireType=F0,this.destructorFunction=null):this.toWireType=SE}function a_(I,M,L){s.hasOwnProperty(I)||bh("Replacing nonexistant public symbol"),s[I].overloadTable!==void 0&&L!==void 0?s[I].overloadTable[L]=M:(s[I]=M,s[I].argCount=L)}function Ba(I,M){ee(I.indexOf("j")>=0,"getDynCaller should only be called with i64 sigs");var L=[];return function(){L.length=arguments.length;for(var W=0;W>2)+W>>>0]);return L}function fu(I,M,L,W,te,ge){ee(M>0);var Ee=Ji(M,L);te=Fs(W,te);var Ie=[ge],De=[];Ni([],[I],function($e){$e=$e[0];var rt="constructor "+$e.name;if($e.registeredClass.constructor_body===void 0&&($e.registeredClass.constructor_body=[]),$e.registeredClass.constructor_body[M-1]!==void 0)throw new al("Cannot register multiple constructors with identical number of parameters ("+(M-1)+") for class '"+$e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return $e.registeredClass.constructor_body[M-1]=function(){wh("Cannot construct "+$e.name+" due to unbound types",Ee)},Ni([],Ee,function(It){return $e.registeredClass.constructor_body[M-1]=function(){arguments.length!==M-1&&Zr(rt+" called with "+arguments.length+" arguments, expected "+(M-1)),De.length=0,Ie.length=M;for(var wt=1;wt0?", ":"")+It),xt+=($e?"var rv = ":"")+"invoker(fn"+(It.length>0?", ":"")+It+`); -`,Ie)xt+=`runDestructors(destructors); -`;else for(var De=Ee?1:2;De4&&--la[I].refcount===0&&(la[I]=void 0,CE.push(I))}function l_(){for(var I=0,M=5;M>>2])};case 3:return function(L){return this.fromWireType(Ce[L>>>3])};default:throw new TypeError("Unknown float type: "+I)}}function PE(I,M,L){var W=xh(L);M=Xi(M),Qt(I,{name:M,fromWireType:function(te){return te},toWireType:function(te,ge){if(typeof ge!="number"&&typeof ge!="boolean")throw new TypeError('Cannot convert "'+Rh(ge)+'" to '+this.name);return ge},argPackAdvance:8,readValueFromPointer:OE(M,W),destructorFunction:null})}function u_(I,M,L,W,te,ge){var Ee=Ji(M,L);I=Xi(I),te=Fs(W,te),ti(I,function(){wh("Cannot call "+I+" due to unbound types",Ee)},M-1),Ni([],Ee,function(Ie){var De=[Ie[0],null].concat(Ie.slice(1));return a_(I,o_(I,De,null,te,ge),M-1),[]})}function N3(I,M,L){switch(M){case 0:return L?function(te){return J[te>>>0]}:function(te){return $[te>>>0]};case 1:return L?function(te){return re[te>>>1]}:function(te){return me[te>>>1]};case 2:return L?function(te){return z[te>>>2]}:function(te){return Y[te>>>2]};default:throw new TypeError("Unknown integer type: "+I)}}function NE(I,M,L,W,te){M=Xi(M),te===-1&&(te=4294967295);var ge=xh(L),Ee=function($e){return $e};if(W===0){var Ie=32-8*L;Ee=function($e){return $e<>>Ie}}var De=M.indexOf("unsigned")!=-1;Qt(I,{name:M,fromWireType:Ee,toWireType:function($e,rt){if(typeof rt!="number"&&typeof rt!="boolean")throw new TypeError('Cannot convert "'+Rh(rt)+'" to '+this.name);if(rtte)throw new TypeError('Passing a number "'+Rh(rt)+'" from JS side to C/C++ side to an argument of type "'+M+'", which is outside the valid range ['+W+", "+te+"]!");return De?rt>>>0:rt|0},argPackAdvance:8,readValueFromPointer:N3(M,ge,W!==0),destructorFunction:null})}function LE(I,M,L){var W=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],te=W[M];function ge(Ee){Ee=Ee>>2;var Ie=Y,De=Ie[Ee>>>0],$e=Ie[Ee+1>>>0];return new te(_e,$e,De)}L=Xi(L),Qt(I,{name:L,fromWireType:ge,argPackAdvance:8,readValueFromPointer:ge},{ignoreDuplicateRegistrations:!0})}function L3(I,M){M=Xi(M);var L=M==="std::string";Qt(I,{name:M,fromWireType:function(W){var te=Y[W>>>2],ge;if(L)for(var Ee=W+4,Ie=0;Ie<=te;++Ie){var De=W+4+Ie;if(Ie==te||$[De>>>0]==0){var $e=De-Ee,rt=ue(Ee,$e);ge===void 0?ge=rt:(ge+=String.fromCharCode(0),ge+=rt),Ee=De+1}}else{for(var It=new Array(te),Ie=0;Ie>>0]);ge=It.join("")}return ua(W),ge},toWireType:function(W,te){te instanceof ArrayBuffer&&(te=new Uint8Array(te));var ge,Ee=typeof te=="string";Ee||te instanceof Uint8Array||te instanceof Uint8ClampedArray||te instanceof Int8Array||Zr("Cannot pass non-string to std::string"),L&&Ee?ge=function(){return de(te)}:ge=function(){return te.length};var Ie=ge(),De=fm(4+Ie+1);if(De>>>=0,Y[De>>>2]=Ie,L&&Ee)be(te,De+4,Ie+1);else if(Ee)for(var $e=0;$e255&&(ua(De),Zr("String has UTF-16 code units that do not fit in 8 bits")),$[De+4+$e>>>0]=rt}else for(var $e=0;$e>>0]=te[$e];return W!==null&&W.push(ua,De),De},argPackAdvance:8,readValueFromPointer:oa,destructorFunction:function(W){ua(W)}})}function h_(I,M,L){L=Xi(L);var W,te,ge,Ee,Ie;M===2?(W=Fe,te=je,Ee=Oe,ge=function(){return me},Ie=1):M===4&&(W=dt,te=Be,Ee=ke,ge=function(){return Y},Ie=2),Qt(I,{name:L,fromWireType:function(De){for(var $e=Y[De>>>2],rt=ge(),It,xt=De+4,wt=0;wt<=$e;++wt){var tr=De+4+wt*M;if(wt==$e||rt[tr>>>Ie]==0){var vi=tr-xt,Mi=W(xt,vi);It===void 0?It=Mi:(It+=String.fromCharCode(0),It+=Mi),xt=tr+M}}return ua(De),It},toWireType:function(De,$e){typeof $e!="string"&&Zr("Cannot pass non-string to C++ string type "+L);var rt=Ee($e),It=fm(4+rt+M);return It>>>=0,Y[It>>>2]=rt>>Ie,te($e,It+4,rt+M),De!==null&&De.push(ua,It),It},argPackAdvance:8,readValueFromPointer:oa,destructorFunction:function(De){ua(De)}})}function ca(I,M,L,W,te,ge){nc[I]={name:Xi(M),rawConstructor:Fs(L,W),rawDestructor:Fs(te,ge),elements:[]}}function FE(I,M,L,W,te,ge,Ee,Ie,De){nc[I].elements.push({getterReturnType:M,getter:Fs(L,W),getterContext:te,setterArgumentType:ge,setter:Fs(Ee,Ie),setterContext:De})}function dm(I,M,L,W,te,ge){pu[I]={name:Xi(M),rawConstructor:Fs(L,W),rawDestructor:Fs(te,ge),fields:[]}}function p_(I,M,L,W,te,ge,Ee,Ie,De,$e){pu[I].fields.push({fieldName:Xi(M),getterReturnType:L,getter:Fs(W,te),getterContext:ge,setterArgumentType:Ee,setter:Fs(Ie,De),setterContext:$e})}function d_(I,M){M=Xi(M),Qt(I,{isVoid:!0,name:M,argPackAdvance:0,fromWireType:function(){},toWireType:function(L,W){}})}function ol(I){return I||Zr("Cannot use deleted val. handle = "+I),la[I].value}function HE(I,M){var L=En[I];return L===void 0&&Zr(M+" has unknown type "+lc(I)),L}function F3(I,M,L){I=ol(I),M=HE(M,"emval::as");var W=[],te=_o(W);return z[L>>>2]=te,M.toWireType(W,I)}function H3(I,M){for(var L=new Array(I),W=0;W>2)+W>>>0],"parameter "+W);return L}function U3(I,M,L,W){I=ol(I);for(var te=H3(M,L),ge=new Array(M),Ee=0;Ee4&&(la[I].refcount+=1)}function B0(I,M){return I=ol(I),M=ol(M),I instanceof M}function B3(I){return I=ol(I),typeof I=="number"}function k3(){return _o([])}function G3(I){return _o(f_(I))}function Td(){return _o({})}function wo(I){var M=la[I].value;aa(M),AE(I)}function v_(I,M,L){I=ol(I),M=ol(M),L=ol(L),I[M]=L}function V3(I,M){I=HE(I,"_emval_take_value");var L=I.readValueFromPointer(M);return _o(L)}function z3(){Kt()}var k0;m?k0=function(){var I=process.hrtime();return I[0]*1e3+I[1]/1e6}:typeof dateNow!="undefined"?k0=dateNow:k0=function(){return performance.now()};var j3=!0;function W3(I,M){var L;if(I===0)L=Date.now();else if((I===1||I===4)&&j3)L=k0();else return Yr(28),-1;return z[M>>>2]=L/1e3|0,z[M+4>>>2]=L%1e3*1e3*1e3|0,0}function gu(I,M,L){$.copyWithin(I>>>0,M>>>0,M+L>>>0)}function Pe(){return $.length}function tt(I){try{return G.grow(I-_e.byteLength+65535>>>16),Ge(G.buffer),1}catch(M){}}function Ye(I){I=I>>>0;var M=Pe(),L=4294967296;if(I>L)return!1;for(var W=16777216,te=1;te<=4;te*=2){var ge=M*(1+.2/te);ge=Math.min(ge,I+100663296);var Ee=Math.min(L,mt(Math.max(W,I,ge),65536)),Ie=tt(Ee);if(Ie)return!0}return!1}var Gt={};function Ar(){return h||"./this.program"}function ri(){if(!ri.strings){var I=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",M={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:I,_:Ar()};for(var L in Gt)M[L]=Gt[L];var W=[];for(var L in M)W.push(L+"="+M[L]);ri.strings=W}return ri.strings}function $n(I,M){try{var L=0;return ri().forEach(function(W,te){var ge=M+L;z[I+te*4>>>2]=ge,bt(W,ge),L+=W.length+1}),0}catch(W){return(typeof q=="undefined"||!(W instanceof q.ErrnoError))&&Kt(W),W.errno}}function $i(I,M){try{var L=ri();z[I>>>2]=L.length;var W=0;return L.forEach(function(te){W+=te.length+1}),z[M>>>2]=W,0}catch(te){return(typeof q=="undefined"||!(te instanceof q.ErrnoError))&&Kt(te),te.errno}}function BE(I){try{var M=er.getStreamFromFD(I);return q.close(M),0}catch(L){return(typeof q=="undefined"||!(L instanceof q.ErrnoError))&&Kt(L),L.errno}}function q3(I,M,L,W){try{var te=er.getStreamFromFD(I),ge=er.doReadv(te,M,L);return z[W>>>2]=ge,0}catch(Ee){return(typeof q=="undefined"||!(Ee instanceof q.ErrnoError))&&Kt(Ee),Ee.errno}}function ka(I,M,L,W,te){try{var ge=er.getStreamFromFD(I),Ee=4294967296,Ie=L*Ee+(M>>>0),De=9007199254740992;return Ie<=-De||Ie>=De?-61:(q.llseek(ge,Ie,W),Ke=[ge.position>>>0,(Le=ge.position,+Math.abs(Le)>=1?Le>0?(Math.min(+Math.floor(Le/4294967296),4294967295)|0)>>>0:~~+Math.ceil((Le-+(~~Le>>>0))/4294967296)>>>0:0)],z[te>>>2]=Ke[0],z[te+4>>>2]=Ke[1],ge.getdents&&Ie===0&&W===0&&(ge.getdents=null),0)}catch($e){return(typeof q=="undefined"||!($e instanceof q.ErrnoError))&&Kt($e),$e.errno}}function G0(I,M,L,W){try{var te=er.getStreamFromFD(I),ge=er.doWritev(te,M,L);return z[W>>>2]=ge,0}catch(Ee){return(typeof q=="undefined"||!(Ee instanceof q.ErrnoError))&&Kt(Ee),Ee.errno}}function Y3(I){C(I|0)}function cc(I){return I%4===0&&(I%100!==0||I%400===0)}function Ed(I,M){for(var L=0,W=0;W<=M;L+=I[W++]);return L}var Mh=[31,29,31,30,31,30,31,31,30,31,30,31],Ii=[31,28,31,30,31,30,31,31,30,31,30,31];function V0(I,M){for(var L=new Date(I.getTime());M>0;){var W=cc(L.getFullYear()),te=L.getMonth(),ge=(W?Mh:Ii)[te];if(M>ge-L.getDate())M-=ge-L.getDate()+1,L.setDate(1),te<11?L.setMonth(te+1):(L.setMonth(0),L.setFullYear(L.getFullYear()+1));else return L.setDate(L.getDate()+M),L}return L}function y_(I,M,L,W){var te=z[W+40>>>2],ge={tm_sec:z[W>>>2],tm_min:z[W+4>>>2],tm_hour:z[W+8>>>2],tm_mday:z[W+12>>>2],tm_mon:z[W+16>>>2],tm_year:z[W+20>>>2],tm_wday:z[W+24>>>2],tm_yday:z[W+28>>>2],tm_isdst:z[W+32>>>2],tm_gmtoff:z[W+36>>>2],tm_zone:te?ue(te):""},Ee=ue(L),Ie={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var De in Ie)Ee=Ee.replace(new RegExp(De,"g"),Ie[De]);var $e=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],rt=["January","February","March","April","May","June","July","August","September","October","November","December"];function It(yt,Lt,Kr){for(var Xr=typeof yt=="number"?yt.toString():yt||"";Xr.length0?1:0}var Xr;return(Xr=Kr(yt.getFullYear()-Lt.getFullYear()))===0&&(Xr=Kr(yt.getMonth()-Lt.getMonth()))===0&&(Xr=Kr(yt.getDate()-Lt.getDate())),Xr}function tr(yt){switch(yt.getDay()){case 0:return new Date(yt.getFullYear()-1,11,29);case 1:return yt;case 2:return new Date(yt.getFullYear(),0,3);case 3:return new Date(yt.getFullYear(),0,2);case 4:return new Date(yt.getFullYear(),0,1);case 5:return new Date(yt.getFullYear()-1,11,31);case 6:return new Date(yt.getFullYear()-1,11,30)}}function vi(yt){var Lt=V0(new Date(yt.tm_year+1900,0,1),yt.tm_yday),Kr=new Date(Lt.getFullYear(),0,4),Xr=new Date(Lt.getFullYear()+1,0,4),ie=tr(Kr),Ss=tr(Xr);return wt(ie,Lt)<=0?wt(Ss,Lt)<=0?Lt.getFullYear()+1:Lt.getFullYear():Lt.getFullYear()-1}var Mi={"%a":function(yt){return $e[yt.tm_wday].substring(0,3)},"%A":function(yt){return $e[yt.tm_wday]},"%b":function(yt){return rt[yt.tm_mon].substring(0,3)},"%B":function(yt){return rt[yt.tm_mon]},"%C":function(yt){var Lt=yt.tm_year+1900;return xt(Lt/100|0,2)},"%d":function(yt){return xt(yt.tm_mday,2)},"%e":function(yt){return It(yt.tm_mday,2," ")},"%g":function(yt){return vi(yt).toString().substring(2)},"%G":function(yt){return vi(yt)},"%H":function(yt){return xt(yt.tm_hour,2)},"%I":function(yt){var Lt=yt.tm_hour;return Lt==0?Lt=12:Lt>12&&(Lt-=12),xt(Lt,2)},"%j":function(yt){return xt(yt.tm_mday+Ed(cc(yt.tm_year+1900)?Mh:Ii,yt.tm_mon-1),3)},"%m":function(yt){return xt(yt.tm_mon+1,2)},"%M":function(yt){return xt(yt.tm_min,2)},"%n":function(){return` -`},"%p":function(yt){return yt.tm_hour>=0&&yt.tm_hour<12?"AM":"PM"},"%S":function(yt){return xt(yt.tm_sec,2)},"%t":function(){return" "},"%u":function(yt){return yt.tm_wday||7},"%U":function(yt){var Lt=new Date(yt.tm_year+1900,0,1),Kr=Lt.getDay()===0?Lt:V0(Lt,7-Lt.getDay()),Xr=new Date(yt.tm_year+1900,yt.tm_mon,yt.tm_mday);if(wt(Kr,Xr)<0){var ie=Ed(cc(Xr.getFullYear())?Mh:Ii,Xr.getMonth()-1)-31,Ss=31-Kr.getDate(),ll=Ss+ie+Xr.getDate();return xt(Math.ceil(ll/7),2)}return wt(Kr,Lt)===0?"01":"00"},"%V":function(yt){var Lt=new Date(yt.tm_year+1900,0,4),Kr=new Date(yt.tm_year+1901,0,4),Xr=tr(Lt),ie=tr(Kr),Ss=V0(new Date(yt.tm_year+1900,0,1),yt.tm_yday);if(wt(Ss,Xr)<0)return"53";if(wt(ie,Ss)<=0)return"01";var ll;return Xr.getFullYear()=0;return Lt=Math.abs(Lt)/60,Lt=Lt/60*100+Lt%60,(Kr?"+":"-")+String("0000"+Lt).slice(-4)},"%Z":function(yt){return yt.tm_zone},"%%":function(){return"%"}};for(var De in Mi)Ee.indexOf(De)>=0&&(Ee=Ee.replace(new RegExp(De,"g"),Mi[De](ge)));var Ai=Dh(Ee,!1);return Ai.length>M?0:(nt(Ai,I),Ai.length-1)}function z0(I,M,L,W){return y_(I,M,L,W)}var T_=function(I,M,L,W){I||(I=this),this.parent=I,this.mount=I.mount,this.mounted=null,this.id=q.nextInode++,this.name=M,this.mode=L,this.node_ops={},this.stream_ops={},this.rdev=W},j0=365,W0=146;Object.defineProperties(T_.prototype,{read:{get:function(){return(this.mode&j0)===j0},set:function(I){I?this.mode|=j0:this.mode&=~j0}},write:{get:function(){return(this.mode&W0)===W0},set:function(I){I?this.mode|=W0:this.mode&=~W0}},isFolder:{get:function(){return q.isDir(this.mode)}},isDevice:{get:function(){return q.isChrdev(this.mode)}}}),q.FSNode=T_,q.staticInit(),s.FS_createPath=q.createPath,s.FS_createDataFile=q.createDataFile,s.FS_createPreloadedFile=q.createPreloadedFile,s.FS_createLazyFile=q.createLazyFile,s.FS_createDevice=q.createDevice,s.FS_unlink=q.unlink,hm=s.InternalError=hu(Error,"InternalError"),Ih(),al=s.BindingError=hu(Error,"BindingError"),sr(),s_(),Ua(),wE=s.UnboundTypeError=hu(Error,"UnboundTypeError"),vd();function Dh(I,M,L){var W=L>0?L:de(I)+1,te=new Array(W),ge=ve(I,te,0,te.length);return M&&(te.length=ge),te}Re.push({func:function(){GE()}});var vu={x:Fr,A:cu,P:fn,Q:Ha,U:md,s:L0,S:Sh,v:RE,u:fu,d:DE,R:c_,C:PE,h:u_,m:NE,k:LE,D:L3,w:h_,V:ca,g:FE,t:dm,j:p_,T:d_,q:F3,W:U3,b:AE,F:UE,n:g_,l:mu,N:B0,E:B3,y:k3,f:G3,r:Td,p:wo,i:v_,e:V3,c:z3,M:W3,I:gu,o:Ye,K:$n,L:$i,B:BE,O:q3,G:ka,z:G0,a:G,H:Y3,J:z0},kE=Qe(),GE=s.___wasm_call_ctors=function(){return(GE=s.___wasm_call_ctors=s.asm.Y).apply(null,arguments)},q0=s._main=function(){return(q0=s._main=s.asm.Z).apply(null,arguments)},fm=s._malloc=function(){return(fm=s._malloc=s.asm._).apply(null,arguments)},VE=s.___getTypeName=function(){return(VE=s.___getTypeName=s.asm.$).apply(null,arguments)},Y0=s.___embind_register_native_and_builtin_types=function(){return(Y0=s.___embind_register_native_and_builtin_types=s.asm.aa).apply(null,arguments)},zE=s.___errno_location=function(){return(zE=s.___errno_location=s.asm.ba).apply(null,arguments)},ua=s._free=function(){return(ua=s._free=s.asm.ca).apply(null,arguments)},Ch=s.dynCall_jiji=function(){return(Ch=s.dynCall_jiji=s.asm.da).apply(null,arguments)},X0=s.dynCall_viijii=function(){return(X0=s.dynCall_viijii=s.asm.ea).apply(null,arguments)},X3=s.dynCall_iiiiiijj=function(){return(X3=s.dynCall_iiiiiijj=s.asm.fa).apply(null,arguments)},$3=s.dynCall_iiiiij=function(){return($3=s.dynCall_iiiiij=s.asm.ga).apply(null,arguments)},Z3=s.dynCall_iiiiijj=function(){return(Z3=s.dynCall_iiiiijj=s.asm.ha).apply(null,arguments)};s.addRunDependency=Pi,s.removeRunDependency=Fn,s.FS_createPath=q.createPath,s.FS_createDataFile=q.createDataFile,s.FS_createPreloadedFile=q.createPreloadedFile,s.FS_createLazyFile=q.createLazyFile,s.FS_createDevice=q.createDevice,s.FS_unlink=q.unlink,s.FS=q;var Ah;function bd(I){this.name="ExitStatus",this.message="Program terminated with exit("+I+")",this.status=I}var jE=!1;Rr=function I(){Ah||$0(),Ah||(Rr=I)};function K3(I){var M=s._main,L=0,W=0;try{var te=M(L,W);J3(te,!0)}catch(Ee){if(Ee instanceof bd)return;if(Ee=="unwind"){k=!0;return}else{var ge=Ee;Ee&&typeof Ee=="object"&&Ee.stack&&(ge=[Ee,Ee.stack]),F("exception thrown: "+ge),p(1,Ee)}}finally{jE=!0}}function $0(I){if(I=I||u,_t>0||(Dt(),_t>0))return;function M(){Ah||(Ah=!0,s.calledRun=!0,!U&&(cr(),Xt(),a(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),E_&&K3(I),Ae()))}s.setStatus?(s.setStatus("Running..."),setTimeout(function(){setTimeout(function(){s.setStatus("")},1),M()},1)):M()}s.run=$0;function J3(I,M){M&&k&&I===0||(k||(j=I,gr(),s.onExit&&s.onExit(I),U=!0),p(I,new bd(I)))}if(s.preInit)for(typeof s.preInit=="function"&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();var E_=!0;return s.noInitialRun&&(E_=!1),k=!0,$0(),n.ready}}();typeof t=="object"&&typeof r=="object"?r.exports=e:typeof define=="function"&&define.amd?define([],function(){return e}):typeof t=="object"&&(t.WebIFCWasm=e)}}),UTt=3821786052,BTt=2296667514,kTt=3630933823,GTt=4288193352,VTt=2874132201,zTt=618182010,jTt=1635779807,WTt=2603310189,qTt=3406155212,YTt=1634111441,XTt=177149247,$Tt=1411407467,ZTt=3352864051,KTt=2056796094,JTt=1871374353,QTt=3087945054,eEt=3001207471,tEt=325726236,rEt=749761778,iEt=3199563722,nEt=2483840362,sEt=3379348081,aEt=3239324667,oEt=4263986512,lEt=53199957,cEt=2029264950,uEt=3512275521,hEt=1674181508,pEt=669184980,dEt=639542469,fEt=411424972,mEt=130549933,gEt=3869604511,vEt=3798115385,yEt=1310608509,TEt=2705031697,EEt=3460190687,bEt=3207858831,xEt=277319702,IEt=1532957894,SEt=4261334040,_Et=3125803723,wEt=2740243338,REt=1967976161,MEt=2461110595,DEt=2887950389,CEt=167062518,AEt=753842376,OEt=2906023776,PEt=819618141,NEt=4196446775,LEt=3649138523,FEt=616511568,HEt=1334484129,UEt=32344328,BEt=231477066,kEt=3649129432,GEt=2736907675,VEt=4037036970,zEt=1136057603,jEt=1560379544,WEt=3367102660,qEt=1387855156,YEt=2069777674,XEt=1260505505,$Et=4182860854,ZEt=2581212453,KEt=2713105998,JEt=644574406,QEt=963979645,e1t=4031249490,t1t=3299480353,r1t=2979338954,i1t=39481116,n1t=1095909175,s1t=1909888760,a1t=1950629157,o1t=3124254112,l1t=1177604601,c1t=2938176219,u1t=2188180465,h1t=2898889636,p1t=635142910,d1t=395041908,f1t=3758799889,m1t=3293546465,g1t=1051757585,v1t=2674252688,y1t=4217484030,T1t=1285652485,E1t=3999819293,b1t=3203706013,x1t=1123145078,I1t=574549367,S1t=1675464909,_1t=2059837836,w1t=59481748,R1t=3749851601,M1t=3486308946,D1t=3331915920,C1t=1416205885,A1t=3150382593,O1t=3902619387,P1t=2951183804,N1t=3296154744,L1t=2197970202,F1t=2611217952,H1t=2937912522,U1t=1383045692,B1t=1062206242,k1t=1677625105,G1t=3893394355,V1t=747523909,z1t=647927063,j1t=2205249479,W1t=639361253,q1t=2301859152,Y1t=776857604,X1t=3285139300,$1t=3264961684,Z1t=843113511,K1t=905975707,J1t=300633059,Q1t=3221913625,ebt=400855858,tbt=2542286263,rbt=3875453745,ibt=3732776249,nbt=15328376,sbt=2485617015,abt=1485152156,obt=3571504051,lbt=3850581409,cbt=2272882330,ubt=2816379211,hbt=2510884976,pbt=370225590,dbt=1981873012,fbt=2859738748,mbt=45288368,gbt=2614616156,vbt=2732653382,ybt=775493141,Tbt=1959218052,Ebt=3898045240,bbt=2185764099,xbt=1060000209,Ibt=4105962743,Sbt=488727124,_bt=1525564444,wbt=2559216714,Rbt=2574617495,Mbt=3419103109,Dbt=3050246964,Cbt=3293443760,Abt=25142252,Obt=578613899,Pbt=2889183280,Nbt=2713554722,Lbt=4136498852,Fbt=335055490,Hbt=3640358203,Ubt=2954562838,Bbt=1785450214,kbt=1466758467,Gbt=3895139033,Vbt=1419761937,zbt=602808272,jbt=1973544240,Wbt=1916426348,qbt=3295246426,Ybt=1815067380,Xbt=2506170314,$bt=2147822146,Zbt=539742890,Kbt=3495092785,Jbt=1457835157,Qbt=2601014836,ext=2827736869,txt=2629017746,rxt=1186437898,ixt=3800577675,nxt=1105321065,sxt=2367409068,axt=3510044353,oxt=1213902940,lxt=4074379575,cxt=3961806047,uxt=3426335179,hxt=1306400036,pxt=3632507154,dxt=1765591967,fxt=1045800335,mxt=2949456006,gxt=32440307,vxt=1335981549,yxt=2635815018,Txt=1945343521,Ext=1052013943,bxt=1599208980,xxt=562808652,Ixt=1062813311,Sxt=2063403501,_xt=1945004755,wxt=3256556792,Rxt=3040386961,Mxt=3849074793,Dxt=3041715199,Cxt=3205830791,Axt=1154170062,Oxt=770865208,Pxt=3732053477,Nxt=395920057,Lxt=2963535650,Fxt=1714330368,Hxt=3242481149,Uxt=526551008,Bxt=2323601079,kxt=445594917,Gxt=4006246654,Vxt=342316401,zxt=869906466,jxt=3518393246,Wxt=3760055223,qxt=1360408905,Yxt=2030761528,Xxt=3900360178,$xt=476780140,Zxt=1472233963,Kxt=1904799276,Jxt=663422040,Qxt=862014818,eIt=2417008758,tIt=3310460725,rIt=3277789161,iIt=264262732,nIt=1534661035,sIt=402227799,aIt=1217240411,oIt=1003880860,lIt=712377611,cIt=1758889154,uIt=4123344466,hIt=2397081782,pIt=1623761950,dIt=2590856083,fIt=1883228015,mIt=339256511,gIt=2777663545,vIt=1704287377,yIt=2835456948,TIt=1658829314,EIt=2107101300,bIt=2814081492,xIt=132023988,IIt=3747195512,SIt=3174744832,_It=484807127,wIt=3390157468,RIt=4148101412,MIt=211053100,DIt=4024345920,CIt=297599258,AIt=4294318154,OIt=3200245327,PIt=1437805879,NIt=1209101575,LIt=2853485674,FIt=2242383968,HIt=1040185647,UIt=3548104201,BIt=477187591,kIt=2804161546,GIt=2556980723,VIt=2047409740,zIt=1809719519,jIt=803316827,WIt=3008276851,qIt=807026263,YIt=3737207727,XIt=24185140,$It=1310830890,ZIt=4219587988,KIt=3415622556,JIt=346874300,QIt=647756555,eSt=2489546625,tSt=2827207264,rSt=2143335405,iSt=1287392070,nSt=738692330,sSt=374418227,aSt=315944413,oSt=819412036,lSt=1810631287,cSt=1426591983,uSt=4222183408,hSt=2652556860,pSt=2058353004,dSt=3907093117,fSt=4278956645,mSt=3198132628,gSt=182646315,vSt=4037862832,ySt=2188021234,TSt=3815607619,ESt=3132237377,bSt=1482959167,xSt=987401354,ISt=1834744321,SSt=707683696,_St=1339347760,wSt=2223149337,RSt=2297155007,MSt=3508470533,DSt=3009222698,CSt=900683007,ASt=1893162501,OSt=263784265,PSt=4238390223,NSt=1509553395,LSt=1268542332,FSt=3493046030,HSt=4095422895,USt=987898635,BSt=3448662350,kSt=2453401579,GSt=4142052618,VSt=3590301190,zSt=3009204131,jSt=852622518,WSt=178086475,qSt=2706460486,YSt=812098782,XSt=3319311131,$St=1251058090,ZSt=2068733104,KSt=1806887404,JSt=1484403080,QSt=3905492369,e_t=3570813810,t_t=2571569899,r_t=178912537,i_t=2294589976,n_t=1437953363,s_t=2133299955,a_t=4175244083,o_t=3946677679,l_t=3113134337,c_t=2391368822,u_t=3741457305,h_t=3020489413,p_t=2176052936,d_t=4288270099,f_t=572779678,m_t=3827777499,g_t=428585644,v_t=1585845231,y_t=76236018,T_t=1051575348,E_t=2655187982,b_t=3452421091,x_t=4162380809,I_t=629592764,S_t=1161773419,__t=1566485204,w_t=1402838566,R_t=125510826,M_t=2604431987,D_t=4266656042,C_t=1520743889,A_t=3422422726,O_t=1281925730,P_t=3092502836,N_t=388784114,L_t=1154579445,F_t=2624227202,H_t=1008929658,U_t=1425443689,B_t=3057273783,k_t=2347385850,G_t=1838606355,V_t=1847130766,z_t=3708119e3,j_t=2852063980,W_t=760658860,q_t=2022407955,Y_t=248100487,X_t=3303938423,$_t=1303795690,Z_t=1847252529,K_t=2199411900,J_t=2235152071,Q_t=164193824,ewt=3079605661,twt=3404854881,rwt=552965576,iwt=3265635763,nwt=853536259,swt=1507914824,awt=2597039031,owt=377706215,lwt=2108223431,cwt=1437502449,uwt=1114901282,hwt=1073191201,pwt=1911478936,dwt=3181161470,fwt=3368373690,mwt=2998442950,gwt=2706619895,vwt=2474470126,ywt=977012517,Twt=1918398963,Ewt=3888040117,bwt=219451334,xwt=3701648758,Iwt=2251480897,Swt=4143007308,_wt=590820931,wwt=3388369263,Rwt=3505215534,Mwt=2485787929,Dwt=2665983363,Cwt=3588315303,Awt=3079942009,Owt=4251960020,Pwt=1411181986,Nwt=643959842,Lwt=1029017970,Fwt=144952367,Hwt=3694346114,Uwt=2837617999,Bwt=1207048766,kwt=2529465313,Gwt=2519244187,Vwt=1682466193,zwt=2382730787,jwt=3566463478,Wwt=3327091369,qwt=2077209135,Ywt=101040310,Xwt=3021840470,$wt=2483315170,Zwt=2226359599,Kwt=1687234759,Jwt=1158309216,Qwt=310824031,eRt=804291784,tRt=3612865200,rRt=4231323485,iRt=597895409,nRt=2004835150,sRt=603570806,aRt=1663979128,oRt=220341763,lRt=3171933400,cRt=1156407060,uRt=4017108033,hRt=2067069095,pRt=4022376103,dRt=1423911732,fRt=2924175390,mRt=2775532180,gRt=2839578677,vRt=3724593414,yRt=3740093272,TRt=1946335990,ERt=3355820592,bRt=759155922,xRt=2559016684,IRt=3727388367,SRt=3778827333,_Rt=3967405729,wRt=1775413392,RRt=677532197,MRt=2022622350,DRt=1304840413,CRt=3119450353,ARt=2417041796,ORt=2744685151,PRt=569719735,NRt=2945172077,LRt=4208778838,FRt=673634403,HRt=2095639259,URt=3958567839,BRt=2802850158,tA=103090709,kRt=653396225,GRt=2904328755,VRt=3843373140,zRt=3651124850,jRt=2598011224,WRt=986844984,qRt=871118103,YRt=1680319473,XRt=148025276,$Rt=4166981789,ZRt=3710013099,KRt=2752243245,JRt=941946838,QRt=1451395588,eMt=3357820518,tMt=492091185,rMt=3650150729,iMt=110355661,nMt=3521284610,sMt=1482703590,aMt=738039164,oMt=2295281155,lMt=655969474,cMt=1842657554,uMt=3219374653,hMt=90941305,pMt=2250791053,dMt=2044713172,fMt=2093928680,mMt=931644368,gMt=2090586900,vMt=3252649465,yMt=2405470396,TMt=825690147,EMt=2262370178,bMt=2893384427,xMt=3024970846,IMt=3283111854,SMt=2324767716,_Mt=1469900589,wMt=1232101972,RMt=683857671,MMt=2770003689,DMt=3615266464,CMt=2798486643,AMt=3454111270,OMt=3915482550,PMt=2433181523,NMt=4021432810,LMt=3413951693,FMt=1580146022,HMt=3765753017,UMt=979691226,BMt=2572171363,kMt=3027567501,GMt=964333572,VMt=2320036040,zMt=2310774935,Ck=160246688,jMt=3939117080,WMt=1683148259,qMt=2495723537,YMt=1307041759,XMt=1027710054,$Mt=4278684876,ZMt=2857406711,KMt=205026976,JMt=1865459582,QMt=4095574036,eDt=919958153,tDt=2728634034,rDt=982818633,iDt=3840914261,Ak=2655215786,nDt=826625072,sDt=1204542856,aDt=3945020480,oDt=4201705270,lDt=3190031847,cDt=2127690289,uDt=1638771189,hDt=504942748,pDt=3678494232,Ok=3242617779,dDt=886880790,fDt=2802773753,mDt=2565941209,gDt=2551354335,vDt=693640335,yDt=1462361463,Pk=4186316022,TDt=307848117,Nk=781010003,EDt=3940055652,bDt=279856033,xDt=427948657,IDt=3268803585,SDt=1441486842,_Dt=750771296,wDt=1245217292,RDt=4122056220,MDt=366585022,DDt=3451746338,CDt=3523091289,ADt=1521410863,ODt=1401173127,PDt=478536968,NDt=816062949,LDt=1076942058,FDt=3377609919,HDt=3008791417,UDt=1660063152,BDt=2914609552,kDt=2943643501,GDt=1608871552,VDt=2439245199,zDt=1042787934,jDt=1856042241,WDt=3243963512,qDt=4158566097,YDt=3626867408,XDt=2016517767,$Dt=2781568857,ZDt=2341007311,KDt=2778083089,JDt=448429030,QDt=3053780830,eCt=1768891740,tCt=1054537805,rCt=2157484638,iCt=2042790032,nCt=4165799628,sCt=1862484736,aCt=1290935644,oCt=1509187699,lCt=4086658281,cCt=1783015770,uCt=1329646415,hCt=4074543187,pCt=867548509,dCt=3982875396,fCt=4240577450,mCt=4124623270,gCt=3692461612,vCt=3663146110,yCt=4097777520,TCt=1529196076,ECt=3127900445,bCt=3027962421,xCt=2533589738,ICt=2609359061,SCt=3420628829,_Ct=1072016465,wCt=723233188,RCt=3856911033,MCt=1999602285,DCt=1305183839,CCt=3812236995,ACt=1412071761,OCt=710998568,PCt=2706606064,NCt=3893378262,LCt=463610769,FCt=2481509218,HCt=451544542,UCt=4015995234,BCt=1404847402,kCt=3112655638,GCt=331165859,VCt=4252922144,zCt=1039846685,jCt=338393293,WCt=682877961,qCt=3544373492,YCt=2515109513,XCt=1179482911,$Ct=2273995522,ZCt=1004757350,KCt=4243806635,JCt=214636428,QCt=2445595289,eAt=2757150158,tAt=3136571912,rAt=1807405624,iAt=2162789131,nAt=385403989,sAt=3478079324,aAt=1252848954,oAt=1595516126,lAt=609421318,cAt=2668620305,uAt=2473145415,hAt=1973038258,pAt=1597423693,dAt=1190533807,fAt=2525727697,mAt=3408363356,gAt=530289379,vAt=1621171031,yAt=2082059205,TAt=734778138,EAt=1235345126,bAt=3689010777,xAt=2986769608,IAt=3657597509,SAt=1975003073,_At=3979015343,wAt=2218152070,RAt=603775116,MAt=2830218821,DAt=3958052878,CAt=3049322572,AAt=148013059,OAt=4095615324,PAt=2233826070,NAt=2513912981,LAt=699246055,FAt=2028607225,HAt=3101698114,UAt=2809605785,BAt=4124788165,kAt=2934153892,GAt=1300840506,VAt=3303107099,zAt=1607154358,jAt=1878645084,WAt=846575682,qAt=1351298697,YAt=626085974,XAt=2247615214,$At=1260650574,ZAt=1096409881,KAt=230924584,JAt=1162798199,QAt=2315554128,eOt=2254336722,tOt=413509423,rOt=1580310250,iOt=3071757647,nOt=985171141,sOt=2043862942,aOt=531007025,oOt=812556717,lOt=5716631,cOt=3473067441,uOt=1549132990,hOt=2771591690,pOt=3206491090,dOt=912023232,fOt=3824725483,mOt=2347447852,gOt=3081323446,vOt=3663046924,yOt=2281632017,TOt=2415094496,EOt=2387106220,bOt=901063453,xOt=4282788508,IOt=3124975700,SOt=1447204868,_Ot=1983826977,wOt=2636378356,ROt=1640371178,MOt=280115917,DOt=1742049831,COt=2552916305,AOt=1210645708,OOt=3611470254,POt=1199560280,NOt=3101149627,LOt=581633288,FOt=1377556343,HOt=1735638870,UOt=1935646853,BOt=3825984169,kOt=1692211062,GOt=2595432518,VOt=1620046519,zOt=2097647324,jOt=2715220739,WOt=2916149573,qOt=1229763772,YOt=3593883385,XOt=3026737570,$Ot=1600972822,ZOt=1628702193,KOt=3736923433,JOt=2347495698,QOt=3698973494,e3t=427810014,t3t=180925521,r3t=630975310,i3t=3179687236,n3t=4292641817,s3t=1911125066,a3t=4207607924,o3t=728799441,l3t=1417489154,c3t=2799835756,u3t=2759199220,h3t=1907098498,p3t=1530820697,d3t=3956297820,f3t=2391383451,m3t=3313531582,g3t=2769231204,v3t=891718957,y3t=926996030,T3t=2391406946,E3t=4156078855,b3t=3512223829,x3t=1898987631,I3t=4237592921,S3t=1133259667,_3t=3304561284,w3t=336235671,R3t=512836454,M3t=486154966,D3t=1299126871,C3t=4009809668,A3t=4088093105,O3t=1028945134,P3t=4218914973,N3t=3342526732,L3t=1236880293,F3t=2543172580,H3t=1033361043;var O={};O[UTt]=t=>zde.FromTape(t.ID,t.type,t.arguments);O[BTt]=t=>jde.FromTape(t.ID,t.type,t.arguments);O[kTt]=t=>Wde.FromTape(t.ID,t.type,t.arguments);O[GTt]=t=>qde.FromTape(t.ID,t.type,t.arguments);O[VTt]=t=>Yde.FromTape(t.ID,t.type,t.arguments);O[zTt]=t=>Xde.FromTape(t.ID,t.type,t.arguments);O[jTt]=t=>$de.FromTape(t.ID,t.type,t.arguments);O[WTt]=t=>Zde.FromTape(t.ID,t.type,t.arguments);O[qTt]=t=>Kde.FromTape(t.ID,t.type,t.arguments);O[YTt]=t=>Jde.FromTape(t.ID,t.type,t.arguments);O[XTt]=t=>Qde.FromTape(t.ID,t.type,t.arguments);O[$Tt]=t=>efe.FromTape(t.ID,t.type,t.arguments);O[ZTt]=t=>tfe.FromTape(t.ID,t.type,t.arguments);O[KTt]=t=>rfe.FromTape(t.ID,t.type,t.arguments);O[JTt]=t=>ife.FromTape(t.ID,t.type,t.arguments);O[QTt]=t=>nfe.FromTape(t.ID,t.type,t.arguments);O[eEt]=t=>sfe.FromTape(t.ID,t.type,t.arguments);O[tEt]=t=>afe.FromTape(t.ID,t.type,t.arguments);O[rEt]=t=>ofe.FromTape(t.ID,t.type,t.arguments);O[iEt]=t=>lfe.FromTape(t.ID,t.type,t.arguments);O[nEt]=t=>cfe.FromTape(t.ID,t.type,t.arguments);O[sEt]=t=>ufe.FromTape(t.ID,t.type,t.arguments);O[aEt]=t=>hfe.FromTape(t.ID,t.type,t.arguments);O[oEt]=t=>pfe.FromTape(t.ID,t.type,t.arguments);O[lEt]=t=>dfe.FromTape(t.ID,t.type,t.arguments);O[cEt]=t=>ffe.FromTape(t.ID,t.type,t.arguments);O[uEt]=t=>mfe.FromTape(t.ID,t.type,t.arguments);O[hEt]=t=>gfe.FromTape(t.ID,t.type,t.arguments);O[pEt]=t=>vfe.FromTape(t.ID,t.type,t.arguments);O[dEt]=t=>yfe.FromTape(t.ID,t.type,t.arguments);O[fEt]=t=>Tfe.FromTape(t.ID,t.type,t.arguments);O[mEt]=t=>Efe.FromTape(t.ID,t.type,t.arguments);O[gEt]=t=>bfe.FromTape(t.ID,t.type,t.arguments);O[vEt]=t=>xfe.FromTape(t.ID,t.type,t.arguments);O[yEt]=t=>Ife.FromTape(t.ID,t.type,t.arguments);O[TEt]=t=>Sfe.FromTape(t.ID,t.type,t.arguments);O[EEt]=t=>_fe.FromTape(t.ID,t.type,t.arguments);O[bEt]=t=>wfe.FromTape(t.ID,t.type,t.arguments);O[xEt]=t=>Rfe.FromTape(t.ID,t.type,t.arguments);O[IEt]=t=>Mfe.FromTape(t.ID,t.type,t.arguments);O[SEt]=t=>Dfe.FromTape(t.ID,t.type,t.arguments);O[_Et]=t=>Cfe.FromTape(t.ID,t.type,t.arguments);O[wEt]=t=>Afe.FromTape(t.ID,t.type,t.arguments);O[REt]=t=>Ofe.FromTape(t.ID,t.type,t.arguments);O[MEt]=t=>Pfe.FromTape(t.ID,t.type,t.arguments);O[DEt]=t=>Nfe.FromTape(t.ID,t.type,t.arguments);O[CEt]=t=>Lfe.FromTape(t.ID,t.type,t.arguments);O[AEt]=t=>Ffe.FromTape(t.ID,t.type,t.arguments);O[OEt]=t=>Hfe.FromTape(t.ID,t.type,t.arguments);O[PEt]=t=>Ufe.FromTape(t.ID,t.type,t.arguments);O[NEt]=t=>Bfe.FromTape(t.ID,t.type,t.arguments);O[LEt]=t=>kfe.FromTape(t.ID,t.type,t.arguments);O[FEt]=t=>Gfe.FromTape(t.ID,t.type,t.arguments);O[HEt]=t=>Vfe.FromTape(t.ID,t.type,t.arguments);O[UEt]=t=>zfe.FromTape(t.ID,t.type,t.arguments);O[BEt]=t=>jfe.FromTape(t.ID,t.type,t.arguments);O[kEt]=t=>Wfe.FromTape(t.ID,t.type,t.arguments);O[GEt]=t=>qfe.FromTape(t.ID,t.type,t.arguments);O[VEt]=t=>Yfe.FromTape(t.ID,t.type,t.arguments);O[zEt]=t=>Xfe.FromTape(t.ID,t.type,t.arguments);O[jEt]=t=>$fe.FromTape(t.ID,t.type,t.arguments);O[WEt]=t=>Zfe.FromTape(t.ID,t.type,t.arguments);O[qEt]=t=>Kfe.FromTape(t.ID,t.type,t.arguments);O[YEt]=t=>Jfe.FromTape(t.ID,t.type,t.arguments);O[XEt]=t=>Qfe.FromTape(t.ID,t.type,t.arguments);O[$Et]=t=>eme.FromTape(t.ID,t.type,t.arguments);O[ZEt]=t=>tme.FromTape(t.ID,t.type,t.arguments);O[KEt]=t=>rme.FromTape(t.ID,t.type,t.arguments);O[JEt]=t=>ime.FromTape(t.ID,t.type,t.arguments);O[QEt]=t=>nme.FromTape(t.ID,t.type,t.arguments);O[e1t]=t=>sme.FromTape(t.ID,t.type,t.arguments);O[t1t]=t=>ame.FromTape(t.ID,t.type,t.arguments);O[r1t]=t=>ome.FromTape(t.ID,t.type,t.arguments);O[i1t]=t=>lme.FromTape(t.ID,t.type,t.arguments);O[n1t]=t=>cme.FromTape(t.ID,t.type,t.arguments);O[s1t]=t=>ume.FromTape(t.ID,t.type,t.arguments);O[a1t]=t=>hme.FromTape(t.ID,t.type,t.arguments);O[o1t]=t=>pme.FromTape(t.ID,t.type,t.arguments);O[l1t]=t=>dme.FromTape(t.ID,t.type,t.arguments);O[c1t]=t=>fme.FromTape(t.ID,t.type,t.arguments);O[u1t]=t=>mme.FromTape(t.ID,t.type,t.arguments);O[h1t]=t=>gme.FromTape(t.ID,t.type,t.arguments);O[p1t]=t=>vme.FromTape(t.ID,t.type,t.arguments);O[d1t]=t=>yme.FromTape(t.ID,t.type,t.arguments);O[f1t]=t=>Tme.FromTape(t.ID,t.type,t.arguments);O[m1t]=t=>Eme.FromTape(t.ID,t.type,t.arguments);O[g1t]=t=>bme.FromTape(t.ID,t.type,t.arguments);O[v1t]=t=>xme.FromTape(t.ID,t.type,t.arguments);O[y1t]=t=>Ime.FromTape(t.ID,t.type,t.arguments);O[T1t]=t=>Sme.FromTape(t.ID,t.type,t.arguments);O[E1t]=t=>_me.FromTape(t.ID,t.type,t.arguments);O[b1t]=t=>wme.FromTape(t.ID,t.type,t.arguments);O[x1t]=t=>Rme.FromTape(t.ID,t.type,t.arguments);O[I1t]=t=>Mme.FromTape(t.ID,t.type,t.arguments);O[S1t]=t=>Dme.FromTape(t.ID,t.type,t.arguments);O[_1t]=t=>Cme.FromTape(t.ID,t.type,t.arguments);O[w1t]=t=>Ame.FromTape(t.ID,t.type,t.arguments);O[R1t]=t=>Ome.FromTape(t.ID,t.type,t.arguments);O[M1t]=t=>Pme.FromTape(t.ID,t.type,t.arguments);O[D1t]=t=>Nme.FromTape(t.ID,t.type,t.arguments);O[C1t]=t=>Lme.FromTape(t.ID,t.type,t.arguments);O[A1t]=t=>Fme.FromTape(t.ID,t.type,t.arguments);O[O1t]=t=>Hme.FromTape(t.ID,t.type,t.arguments);O[P1t]=t=>Ume.FromTape(t.ID,t.type,t.arguments);O[N1t]=t=>Bme.FromTape(t.ID,t.type,t.arguments);O[L1t]=t=>kme.FromTape(t.ID,t.type,t.arguments);O[F1t]=t=>Gme.FromTape(t.ID,t.type,t.arguments);O[H1t]=t=>Vme.FromTape(t.ID,t.type,t.arguments);O[U1t]=t=>zme.FromTape(t.ID,t.type,t.arguments);O[B1t]=t=>jme.FromTape(t.ID,t.type,t.arguments);O[k1t]=t=>Wme.FromTape(t.ID,t.type,t.arguments);O[G1t]=t=>qme.FromTape(t.ID,t.type,t.arguments);O[V1t]=t=>Yme.FromTape(t.ID,t.type,t.arguments);O[z1t]=t=>Xme.FromTape(t.ID,t.type,t.arguments);O[j1t]=t=>$me.FromTape(t.ID,t.type,t.arguments);O[W1t]=t=>Zme.FromTape(t.ID,t.type,t.arguments);O[q1t]=t=>Kme.FromTape(t.ID,t.type,t.arguments);O[Y1t]=t=>Jme.FromTape(t.ID,t.type,t.arguments);O[X1t]=t=>Qme.FromTape(t.ID,t.type,t.arguments);O[$1t]=t=>ege.FromTape(t.ID,t.type,t.arguments);O[Z1t]=t=>tge.FromTape(t.ID,t.type,t.arguments);O[K1t]=t=>rge.FromTape(t.ID,t.type,t.arguments);O[J1t]=t=>ige.FromTape(t.ID,t.type,t.arguments);O[Q1t]=t=>nge.FromTape(t.ID,t.type,t.arguments);O[ebt]=t=>sge.FromTape(t.ID,t.type,t.arguments);O[tbt]=t=>age.FromTape(t.ID,t.type,t.arguments);O[rbt]=t=>oge.FromTape(t.ID,t.type,t.arguments);O[ibt]=t=>lge.FromTape(t.ID,t.type,t.arguments);O[nbt]=t=>cge.FromTape(t.ID,t.type,t.arguments);O[sbt]=t=>uge.FromTape(t.ID,t.type,t.arguments);O[abt]=t=>hge.FromTape(t.ID,t.type,t.arguments);O[obt]=t=>pge.FromTape(t.ID,t.type,t.arguments);O[lbt]=t=>dge.FromTape(t.ID,t.type,t.arguments);O[cbt]=t=>fge.FromTape(t.ID,t.type,t.arguments);O[ubt]=t=>mge.FromTape(t.ID,t.type,t.arguments);O[hbt]=t=>gge.FromTape(t.ID,t.type,t.arguments);O[pbt]=t=>vge.FromTape(t.ID,t.type,t.arguments);O[dbt]=t=>yge.FromTape(t.ID,t.type,t.arguments);O[fbt]=t=>Tge.FromTape(t.ID,t.type,t.arguments);O[mbt]=t=>Ege.FromTape(t.ID,t.type,t.arguments);O[gbt]=t=>bge.FromTape(t.ID,t.type,t.arguments);O[vbt]=t=>xge.FromTape(t.ID,t.type,t.arguments);O[ybt]=t=>Ige.FromTape(t.ID,t.type,t.arguments);O[Tbt]=t=>Sge.FromTape(t.ID,t.type,t.arguments);O[Ebt]=t=>_ge.FromTape(t.ID,t.type,t.arguments);O[bbt]=t=>wge.FromTape(t.ID,t.type,t.arguments);O[xbt]=t=>Rge.FromTape(t.ID,t.type,t.arguments);O[Ibt]=t=>Mge.FromTape(t.ID,t.type,t.arguments);O[Sbt]=t=>Dge.FromTape(t.ID,t.type,t.arguments);O[_bt]=t=>Cge.FromTape(t.ID,t.type,t.arguments);O[wbt]=t=>Age.FromTape(t.ID,t.type,t.arguments);O[Rbt]=t=>Oge.FromTape(t.ID,t.type,t.arguments);O[Mbt]=t=>Pge.FromTape(t.ID,t.type,t.arguments);O[Dbt]=t=>Nge.FromTape(t.ID,t.type,t.arguments);O[Cbt]=t=>Lge.FromTape(t.ID,t.type,t.arguments);O[Abt]=t=>Fge.FromTape(t.ID,t.type,t.arguments);O[Obt]=t=>Hge.FromTape(t.ID,t.type,t.arguments);O[Pbt]=t=>Uge.FromTape(t.ID,t.type,t.arguments);O[Nbt]=t=>Bge.FromTape(t.ID,t.type,t.arguments);O[Lbt]=t=>kge.FromTape(t.ID,t.type,t.arguments);O[Fbt]=t=>Gge.FromTape(t.ID,t.type,t.arguments);O[Hbt]=t=>Vge.FromTape(t.ID,t.type,t.arguments);O[Ubt]=t=>zge.FromTape(t.ID,t.type,t.arguments);O[Bbt]=t=>jge.FromTape(t.ID,t.type,t.arguments);O[kbt]=t=>Wge.FromTape(t.ID,t.type,t.arguments);O[Gbt]=t=>qge.FromTape(t.ID,t.type,t.arguments);O[Vbt]=t=>Yge.FromTape(t.ID,t.type,t.arguments);O[zbt]=t=>Xge.FromTape(t.ID,t.type,t.arguments);O[jbt]=t=>$ge.FromTape(t.ID,t.type,t.arguments);O[Wbt]=t=>Zge.FromTape(t.ID,t.type,t.arguments);O[qbt]=t=>Kge.FromTape(t.ID,t.type,t.arguments);O[Ybt]=t=>Jge.FromTape(t.ID,t.type,t.arguments);O[Xbt]=t=>Qge.FromTape(t.ID,t.type,t.arguments);O[$bt]=t=>e0e.FromTape(t.ID,t.type,t.arguments);O[Zbt]=t=>t0e.FromTape(t.ID,t.type,t.arguments);O[Kbt]=t=>r0e.FromTape(t.ID,t.type,t.arguments);O[Jbt]=t=>i0e.FromTape(t.ID,t.type,t.arguments);O[Qbt]=t=>n0e.FromTape(t.ID,t.type,t.arguments);O[ext]=t=>s0e.FromTape(t.ID,t.type,t.arguments);O[txt]=t=>a0e.FromTape(t.ID,t.type,t.arguments);O[rxt]=t=>o0e.FromTape(t.ID,t.type,t.arguments);O[ixt]=t=>l0e.FromTape(t.ID,t.type,t.arguments);O[nxt]=t=>c0e.FromTape(t.ID,t.type,t.arguments);O[sxt]=t=>u0e.FromTape(t.ID,t.type,t.arguments);O[axt]=t=>h0e.FromTape(t.ID,t.type,t.arguments);O[oxt]=t=>p0e.FromTape(t.ID,t.type,t.arguments);O[lxt]=t=>d0e.FromTape(t.ID,t.type,t.arguments);O[cxt]=t=>f0e.FromTape(t.ID,t.type,t.arguments);O[uxt]=t=>m0e.FromTape(t.ID,t.type,t.arguments);O[hxt]=t=>g0e.FromTape(t.ID,t.type,t.arguments);O[pxt]=t=>v0e.FromTape(t.ID,t.type,t.arguments);O[dxt]=t=>y0e.FromTape(t.ID,t.type,t.arguments);O[fxt]=t=>T0e.FromTape(t.ID,t.type,t.arguments);O[mxt]=t=>E0e.FromTape(t.ID,t.type,t.arguments);O[gxt]=t=>b0e.FromTape(t.ID,t.type,t.arguments);O[vxt]=t=>x0e.FromTape(t.ID,t.type,t.arguments);O[yxt]=t=>I0e.FromTape(t.ID,t.type,t.arguments);O[Txt]=t=>S0e.FromTape(t.ID,t.type,t.arguments);O[Ext]=t=>_0e.FromTape(t.ID,t.type,t.arguments);O[bxt]=t=>w0e.FromTape(t.ID,t.type,t.arguments);O[xxt]=t=>R0e.FromTape(t.ID,t.type,t.arguments);O[Ixt]=t=>M0e.FromTape(t.ID,t.type,t.arguments);O[Sxt]=t=>D0e.FromTape(t.ID,t.type,t.arguments);O[_xt]=t=>C0e.FromTape(t.ID,t.type,t.arguments);O[wxt]=t=>A0e.FromTape(t.ID,t.type,t.arguments);O[Rxt]=t=>O0e.FromTape(t.ID,t.type,t.arguments);O[Mxt]=t=>P0e.FromTape(t.ID,t.type,t.arguments);O[Dxt]=t=>N0e.FromTape(t.ID,t.type,t.arguments);O[Cxt]=t=>L0e.FromTape(t.ID,t.type,t.arguments);O[Axt]=t=>F0e.FromTape(t.ID,t.type,t.arguments);O[Oxt]=t=>H0e.FromTape(t.ID,t.type,t.arguments);O[Pxt]=t=>U0e.FromTape(t.ID,t.type,t.arguments);O[Nxt]=t=>B0e.FromTape(t.ID,t.type,t.arguments);O[Lxt]=t=>k0e.FromTape(t.ID,t.type,t.arguments);O[Fxt]=t=>G0e.FromTape(t.ID,t.type,t.arguments);O[Hxt]=t=>V0e.FromTape(t.ID,t.type,t.arguments);O[Uxt]=t=>z0e.FromTape(t.ID,t.type,t.arguments);O[Bxt]=t=>j0e.FromTape(t.ID,t.type,t.arguments);O[kxt]=t=>W0e.FromTape(t.ID,t.type,t.arguments);O[Gxt]=t=>q0e.FromTape(t.ID,t.type,t.arguments);O[Vxt]=t=>Y0e.FromTape(t.ID,t.type,t.arguments);O[zxt]=t=>X0e.FromTape(t.ID,t.type,t.arguments);O[jxt]=t=>$0e.FromTape(t.ID,t.type,t.arguments);O[Wxt]=t=>Z0e.FromTape(t.ID,t.type,t.arguments);O[qxt]=t=>K0e.FromTape(t.ID,t.type,t.arguments);O[Yxt]=t=>J0e.FromTape(t.ID,t.type,t.arguments);O[Xxt]=t=>Q0e.FromTape(t.ID,t.type,t.arguments);O[$xt]=t=>eve.FromTape(t.ID,t.type,t.arguments);O[Zxt]=t=>tve.FromTape(t.ID,t.type,t.arguments);O[Kxt]=t=>rve.FromTape(t.ID,t.type,t.arguments);O[Jxt]=t=>ive.FromTape(t.ID,t.type,t.arguments);O[Qxt]=t=>nve.FromTape(t.ID,t.type,t.arguments);O[eIt]=t=>sve.FromTape(t.ID,t.type,t.arguments);O[tIt]=t=>ave.FromTape(t.ID,t.type,t.arguments);O[rIt]=t=>ove.FromTape(t.ID,t.type,t.arguments);O[iIt]=t=>lve.FromTape(t.ID,t.type,t.arguments);O[nIt]=t=>cve.FromTape(t.ID,t.type,t.arguments);O[sIt]=t=>uve.FromTape(t.ID,t.type,t.arguments);O[aIt]=t=>hve.FromTape(t.ID,t.type,t.arguments);O[oIt]=t=>pve.FromTape(t.ID,t.type,t.arguments);O[lIt]=t=>dve.FromTape(t.ID,t.type,t.arguments);O[cIt]=t=>fve.FromTape(t.ID,t.type,t.arguments);O[uIt]=t=>mve.FromTape(t.ID,t.type,t.arguments);O[hIt]=t=>gve.FromTape(t.ID,t.type,t.arguments);O[pIt]=t=>vve.FromTape(t.ID,t.type,t.arguments);O[dIt]=t=>yve.FromTape(t.ID,t.type,t.arguments);O[fIt]=t=>Tve.FromTape(t.ID,t.type,t.arguments);O[mIt]=t=>Eve.FromTape(t.ID,t.type,t.arguments);O[gIt]=t=>bve.FromTape(t.ID,t.type,t.arguments);O[vIt]=t=>xve.FromTape(t.ID,t.type,t.arguments);O[yIt]=t=>Ive.FromTape(t.ID,t.type,t.arguments);O[TIt]=t=>Sve.FromTape(t.ID,t.type,t.arguments);O[EIt]=t=>_ve.FromTape(t.ID,t.type,t.arguments);O[bIt]=t=>wve.FromTape(t.ID,t.type,t.arguments);O[xIt]=t=>Rve.FromTape(t.ID,t.type,t.arguments);O[IIt]=t=>Mve.FromTape(t.ID,t.type,t.arguments);O[SIt]=t=>Dve.FromTape(t.ID,t.type,t.arguments);O[_It]=t=>Cve.FromTape(t.ID,t.type,t.arguments);O[wIt]=t=>Ave.FromTape(t.ID,t.type,t.arguments);O[RIt]=t=>Ove.FromTape(t.ID,t.type,t.arguments);O[MIt]=t=>Pve.FromTape(t.ID,t.type,t.arguments);O[DIt]=t=>Nve.FromTape(t.ID,t.type,t.arguments);O[CIt]=t=>Lve.FromTape(t.ID,t.type,t.arguments);O[AIt]=t=>Fve.FromTape(t.ID,t.type,t.arguments);O[OIt]=t=>Hve.FromTape(t.ID,t.type,t.arguments);O[PIt]=t=>Uve.FromTape(t.ID,t.type,t.arguments);O[NIt]=t=>Bve.FromTape(t.ID,t.type,t.arguments);O[LIt]=t=>kve.FromTape(t.ID,t.type,t.arguments);O[FIt]=t=>Gve.FromTape(t.ID,t.type,t.arguments);O[HIt]=t=>Vve.FromTape(t.ID,t.type,t.arguments);O[UIt]=t=>zve.FromTape(t.ID,t.type,t.arguments);O[BIt]=t=>jve.FromTape(t.ID,t.type,t.arguments);O[kIt]=t=>Wve.FromTape(t.ID,t.type,t.arguments);O[GIt]=t=>qve.FromTape(t.ID,t.type,t.arguments);O[VIt]=t=>Yve.FromTape(t.ID,t.type,t.arguments);O[zIt]=t=>Xve.FromTape(t.ID,t.type,t.arguments);O[jIt]=t=>$ve.FromTape(t.ID,t.type,t.arguments);O[WIt]=t=>Zve.FromTape(t.ID,t.type,t.arguments);O[qIt]=t=>Kve.FromTape(t.ID,t.type,t.arguments);O[YIt]=t=>Jve.FromTape(t.ID,t.type,t.arguments);O[XIt]=t=>Qve.FromTape(t.ID,t.type,t.arguments);O[$It]=t=>eye.FromTape(t.ID,t.type,t.arguments);O[ZIt]=t=>tye.FromTape(t.ID,t.type,t.arguments);O[KIt]=t=>rye.FromTape(t.ID,t.type,t.arguments);O[JIt]=t=>iye.FromTape(t.ID,t.type,t.arguments);O[QIt]=t=>nye.FromTape(t.ID,t.type,t.arguments);O[eSt]=t=>sye.FromTape(t.ID,t.type,t.arguments);O[tSt]=t=>aye.FromTape(t.ID,t.type,t.arguments);O[rSt]=t=>oye.FromTape(t.ID,t.type,t.arguments);O[iSt]=t=>lye.FromTape(t.ID,t.type,t.arguments);O[nSt]=t=>cye.FromTape(t.ID,t.type,t.arguments);O[sSt]=t=>uye.FromTape(t.ID,t.type,t.arguments);O[aSt]=t=>hye.FromTape(t.ID,t.type,t.arguments);O[oSt]=t=>pye.FromTape(t.ID,t.type,t.arguments);O[lSt]=t=>dye.FromTape(t.ID,t.type,t.arguments);O[cSt]=t=>fye.FromTape(t.ID,t.type,t.arguments);O[uSt]=t=>mye.FromTape(t.ID,t.type,t.arguments);O[hSt]=t=>gye.FromTape(t.ID,t.type,t.arguments);O[pSt]=t=>vye.FromTape(t.ID,t.type,t.arguments);O[dSt]=t=>yye.FromTape(t.ID,t.type,t.arguments);O[fSt]=t=>Tye.FromTape(t.ID,t.type,t.arguments);O[mSt]=t=>Eye.FromTape(t.ID,t.type,t.arguments);O[gSt]=t=>bye.FromTape(t.ID,t.type,t.arguments);O[vSt]=t=>xye.FromTape(t.ID,t.type,t.arguments);O[ySt]=t=>Iye.FromTape(t.ID,t.type,t.arguments);O[TSt]=t=>Sye.FromTape(t.ID,t.type,t.arguments);O[ESt]=t=>_ye.FromTape(t.ID,t.type,t.arguments);O[bSt]=t=>wye.FromTape(t.ID,t.type,t.arguments);O[xSt]=t=>Rye.FromTape(t.ID,t.type,t.arguments);O[ISt]=t=>Mye.FromTape(t.ID,t.type,t.arguments);O[SSt]=t=>Dye.FromTape(t.ID,t.type,t.arguments);O[_St]=t=>Cye.FromTape(t.ID,t.type,t.arguments);O[wSt]=t=>Aye.FromTape(t.ID,t.type,t.arguments);O[RSt]=t=>Oye.FromTape(t.ID,t.type,t.arguments);O[MSt]=t=>Pye.FromTape(t.ID,t.type,t.arguments);O[DSt]=t=>Nye.FromTape(t.ID,t.type,t.arguments);O[CSt]=t=>Lye.FromTape(t.ID,t.type,t.arguments);O[ASt]=t=>Fye.FromTape(t.ID,t.type,t.arguments);O[OSt]=t=>Hye.FromTape(t.ID,t.type,t.arguments);O[PSt]=t=>Uye.FromTape(t.ID,t.type,t.arguments);O[NSt]=t=>Bye.FromTape(t.ID,t.type,t.arguments);O[LSt]=t=>kye.FromTape(t.ID,t.type,t.arguments);O[FSt]=t=>Gye.FromTape(t.ID,t.type,t.arguments);O[HSt]=t=>Vye.FromTape(t.ID,t.type,t.arguments);O[USt]=t=>zye.FromTape(t.ID,t.type,t.arguments);O[BSt]=t=>jye.FromTape(t.ID,t.type,t.arguments);O[kSt]=t=>Wye.FromTape(t.ID,t.type,t.arguments);O[GSt]=t=>qye.FromTape(t.ID,t.type,t.arguments);O[VSt]=t=>Yye.FromTape(t.ID,t.type,t.arguments);O[zSt]=t=>Xye.FromTape(t.ID,t.type,t.arguments);O[jSt]=t=>$ye.FromTape(t.ID,t.type,t.arguments);O[WSt]=t=>Zye.FromTape(t.ID,t.type,t.arguments);O[qSt]=t=>Kye.FromTape(t.ID,t.type,t.arguments);O[YSt]=t=>Jye.FromTape(t.ID,t.type,t.arguments);O[XSt]=t=>Qye.FromTape(t.ID,t.type,t.arguments);O[$St]=t=>eTe.FromTape(t.ID,t.type,t.arguments);O[ZSt]=t=>tTe.FromTape(t.ID,t.type,t.arguments);O[KSt]=t=>rTe.FromTape(t.ID,t.type,t.arguments);O[JSt]=t=>iTe.FromTape(t.ID,t.type,t.arguments);O[QSt]=t=>nTe.FromTape(t.ID,t.type,t.arguments);O[e_t]=t=>sTe.FromTape(t.ID,t.type,t.arguments);O[t_t]=t=>aTe.FromTape(t.ID,t.type,t.arguments);O[r_t]=t=>oTe.FromTape(t.ID,t.type,t.arguments);O[i_t]=t=>lTe.FromTape(t.ID,t.type,t.arguments);O[n_t]=t=>cTe.FromTape(t.ID,t.type,t.arguments);O[s_t]=t=>uTe.FromTape(t.ID,t.type,t.arguments);O[a_t]=t=>hTe.FromTape(t.ID,t.type,t.arguments);O[o_t]=t=>pTe.FromTape(t.ID,t.type,t.arguments);O[l_t]=t=>dTe.FromTape(t.ID,t.type,t.arguments);O[c_t]=t=>fTe.FromTape(t.ID,t.type,t.arguments);O[u_t]=t=>mTe.FromTape(t.ID,t.type,t.arguments);O[h_t]=t=>gTe.FromTape(t.ID,t.type,t.arguments);O[p_t]=t=>vTe.FromTape(t.ID,t.type,t.arguments);O[d_t]=t=>yTe.FromTape(t.ID,t.type,t.arguments);O[f_t]=t=>TTe.FromTape(t.ID,t.type,t.arguments);O[m_t]=t=>ETe.FromTape(t.ID,t.type,t.arguments);O[g_t]=t=>bTe.FromTape(t.ID,t.type,t.arguments);O[v_t]=t=>xTe.FromTape(t.ID,t.type,t.arguments);O[y_t]=t=>ITe.FromTape(t.ID,t.type,t.arguments);O[T_t]=t=>STe.FromTape(t.ID,t.type,t.arguments);O[E_t]=t=>_Te.FromTape(t.ID,t.type,t.arguments);O[b_t]=t=>wTe.FromTape(t.ID,t.type,t.arguments);O[x_t]=t=>RTe.FromTape(t.ID,t.type,t.arguments);O[I_t]=t=>MTe.FromTape(t.ID,t.type,t.arguments);O[S_t]=t=>DTe.FromTape(t.ID,t.type,t.arguments);O[__t]=t=>CTe.FromTape(t.ID,t.type,t.arguments);O[w_t]=t=>ATe.FromTape(t.ID,t.type,t.arguments);O[R_t]=t=>OTe.FromTape(t.ID,t.type,t.arguments);O[M_t]=t=>PTe.FromTape(t.ID,t.type,t.arguments);O[D_t]=t=>NTe.FromTape(t.ID,t.type,t.arguments);O[C_t]=t=>LTe.FromTape(t.ID,t.type,t.arguments);O[A_t]=t=>FTe.FromTape(t.ID,t.type,t.arguments);O[O_t]=t=>HTe.FromTape(t.ID,t.type,t.arguments);O[P_t]=t=>UTe.FromTape(t.ID,t.type,t.arguments);O[N_t]=t=>BTe.FromTape(t.ID,t.type,t.arguments);O[L_t]=t=>kTe.FromTape(t.ID,t.type,t.arguments);O[F_t]=t=>GTe.FromTape(t.ID,t.type,t.arguments);O[H_t]=t=>VTe.FromTape(t.ID,t.type,t.arguments);O[U_t]=t=>zTe.FromTape(t.ID,t.type,t.arguments);O[B_t]=t=>jTe.FromTape(t.ID,t.type,t.arguments);O[k_t]=t=>WTe.FromTape(t.ID,t.type,t.arguments);O[G_t]=t=>qTe.FromTape(t.ID,t.type,t.arguments);O[V_t]=t=>YTe.FromTape(t.ID,t.type,t.arguments);O[z_t]=t=>XTe.FromTape(t.ID,t.type,t.arguments);O[j_t]=t=>$Te.FromTape(t.ID,t.type,t.arguments);O[W_t]=t=>ZTe.FromTape(t.ID,t.type,t.arguments);O[q_t]=t=>KTe.FromTape(t.ID,t.type,t.arguments);O[Y_t]=t=>JTe.FromTape(t.ID,t.type,t.arguments);O[X_t]=t=>QTe.FromTape(t.ID,t.type,t.arguments);O[$_t]=t=>eEe.FromTape(t.ID,t.type,t.arguments);O[Z_t]=t=>tEe.FromTape(t.ID,t.type,t.arguments);O[K_t]=t=>rEe.FromTape(t.ID,t.type,t.arguments);O[J_t]=t=>iEe.FromTape(t.ID,t.type,t.arguments);O[Q_t]=t=>nEe.FromTape(t.ID,t.type,t.arguments);O[ewt]=t=>sEe.FromTape(t.ID,t.type,t.arguments);O[twt]=t=>aEe.FromTape(t.ID,t.type,t.arguments);O[rwt]=t=>oEe.FromTape(t.ID,t.type,t.arguments);O[iwt]=t=>lEe.FromTape(t.ID,t.type,t.arguments);O[nwt]=t=>cEe.FromTape(t.ID,t.type,t.arguments);O[swt]=t=>uEe.FromTape(t.ID,t.type,t.arguments);O[awt]=t=>hEe.FromTape(t.ID,t.type,t.arguments);O[owt]=t=>pEe.FromTape(t.ID,t.type,t.arguments);O[lwt]=t=>dEe.FromTape(t.ID,t.type,t.arguments);O[cwt]=t=>fEe.FromTape(t.ID,t.type,t.arguments);O[uwt]=t=>mEe.FromTape(t.ID,t.type,t.arguments);O[hwt]=t=>gEe.FromTape(t.ID,t.type,t.arguments);O[pwt]=t=>vEe.FromTape(t.ID,t.type,t.arguments);O[dwt]=t=>yEe.FromTape(t.ID,t.type,t.arguments);O[fwt]=t=>TEe.FromTape(t.ID,t.type,t.arguments);O[mwt]=t=>EEe.FromTape(t.ID,t.type,t.arguments);O[gwt]=t=>bEe.FromTape(t.ID,t.type,t.arguments);O[vwt]=t=>xEe.FromTape(t.ID,t.type,t.arguments);O[ywt]=t=>IEe.FromTape(t.ID,t.type,t.arguments);O[Twt]=t=>SEe.FromTape(t.ID,t.type,t.arguments);O[Ewt]=t=>_Ee.FromTape(t.ID,t.type,t.arguments);O[bwt]=t=>wEe.FromTape(t.ID,t.type,t.arguments);O[xwt]=t=>REe.FromTape(t.ID,t.type,t.arguments);O[Iwt]=t=>MEe.FromTape(t.ID,t.type,t.arguments);O[Swt]=t=>DEe.FromTape(t.ID,t.type,t.arguments);O[_wt]=t=>CEe.FromTape(t.ID,t.type,t.arguments);O[wwt]=t=>AEe.FromTape(t.ID,t.type,t.arguments);O[Rwt]=t=>OEe.FromTape(t.ID,t.type,t.arguments);O[Mwt]=t=>PEe.FromTape(t.ID,t.type,t.arguments);O[Dwt]=t=>NEe.FromTape(t.ID,t.type,t.arguments);O[Cwt]=t=>LEe.FromTape(t.ID,t.type,t.arguments);O[Awt]=t=>FEe.FromTape(t.ID,t.type,t.arguments);O[Owt]=t=>HEe.FromTape(t.ID,t.type,t.arguments);O[Pwt]=t=>UEe.FromTape(t.ID,t.type,t.arguments);O[Nwt]=t=>BEe.FromTape(t.ID,t.type,t.arguments);O[Lwt]=t=>kEe.FromTape(t.ID,t.type,t.arguments);O[Fwt]=t=>GEe.FromTape(t.ID,t.type,t.arguments);O[Hwt]=t=>VEe.FromTape(t.ID,t.type,t.arguments);O[Uwt]=t=>zEe.FromTape(t.ID,t.type,t.arguments);O[Bwt]=t=>jEe.FromTape(t.ID,t.type,t.arguments);O[kwt]=t=>WEe.FromTape(t.ID,t.type,t.arguments);O[Gwt]=t=>qEe.FromTape(t.ID,t.type,t.arguments);O[Vwt]=t=>YEe.FromTape(t.ID,t.type,t.arguments);O[zwt]=t=>XEe.FromTape(t.ID,t.type,t.arguments);O[jwt]=t=>$Ee.FromTape(t.ID,t.type,t.arguments);O[Wwt]=t=>ZEe.FromTape(t.ID,t.type,t.arguments);O[qwt]=t=>KEe.FromTape(t.ID,t.type,t.arguments);O[Ywt]=t=>JEe.FromTape(t.ID,t.type,t.arguments);O[Xwt]=t=>QEe.FromTape(t.ID,t.type,t.arguments);O[$wt]=t=>e1e.FromTape(t.ID,t.type,t.arguments);O[Zwt]=t=>t1e.FromTape(t.ID,t.type,t.arguments);O[Kwt]=t=>r1e.FromTape(t.ID,t.type,t.arguments);O[Jwt]=t=>i1e.FromTape(t.ID,t.type,t.arguments);O[Qwt]=t=>n1e.FromTape(t.ID,t.type,t.arguments);O[eRt]=t=>s1e.FromTape(t.ID,t.type,t.arguments);O[tRt]=t=>a1e.FromTape(t.ID,t.type,t.arguments);O[rRt]=t=>o1e.FromTape(t.ID,t.type,t.arguments);O[iRt]=t=>l1e.FromTape(t.ID,t.type,t.arguments);O[nRt]=t=>c1e.FromTape(t.ID,t.type,t.arguments);O[sRt]=t=>u1e.FromTape(t.ID,t.type,t.arguments);O[aRt]=t=>h1e.FromTape(t.ID,t.type,t.arguments);O[oRt]=t=>p1e.FromTape(t.ID,t.type,t.arguments);O[lRt]=t=>d1e.FromTape(t.ID,t.type,t.arguments);O[cRt]=t=>f1e.FromTape(t.ID,t.type,t.arguments);O[uRt]=t=>m1e.FromTape(t.ID,t.type,t.arguments);O[hRt]=t=>g1e.FromTape(t.ID,t.type,t.arguments);O[pRt]=t=>v1e.FromTape(t.ID,t.type,t.arguments);O[dRt]=t=>y1e.FromTape(t.ID,t.type,t.arguments);O[fRt]=t=>T1e.FromTape(t.ID,t.type,t.arguments);O[mRt]=t=>E1e.FromTape(t.ID,t.type,t.arguments);O[gRt]=t=>b1e.FromTape(t.ID,t.type,t.arguments);O[vRt]=t=>x1e.FromTape(t.ID,t.type,t.arguments);O[yRt]=t=>I1e.FromTape(t.ID,t.type,t.arguments);O[TRt]=t=>S1e.FromTape(t.ID,t.type,t.arguments);O[ERt]=t=>_1e.FromTape(t.ID,t.type,t.arguments);O[bRt]=t=>w1e.FromTape(t.ID,t.type,t.arguments);O[xRt]=t=>R1e.FromTape(t.ID,t.type,t.arguments);O[IRt]=t=>M1e.FromTape(t.ID,t.type,t.arguments);O[SRt]=t=>D1e.FromTape(t.ID,t.type,t.arguments);O[_Rt]=t=>C1e.FromTape(t.ID,t.type,t.arguments);O[wRt]=t=>A1e.FromTape(t.ID,t.type,t.arguments);O[RRt]=t=>O1e.FromTape(t.ID,t.type,t.arguments);O[MRt]=t=>P1e.FromTape(t.ID,t.type,t.arguments);O[DRt]=t=>N1e.FromTape(t.ID,t.type,t.arguments);O[CRt]=t=>L1e.FromTape(t.ID,t.type,t.arguments);O[ARt]=t=>F1e.FromTape(t.ID,t.type,t.arguments);O[ORt]=t=>H1e.FromTape(t.ID,t.type,t.arguments);O[PRt]=t=>U1e.FromTape(t.ID,t.type,t.arguments);O[NRt]=t=>B1e.FromTape(t.ID,t.type,t.arguments);O[LRt]=t=>k1e.FromTape(t.ID,t.type,t.arguments);O[FRt]=t=>G1e.FromTape(t.ID,t.type,t.arguments);O[HRt]=t=>V1e.FromTape(t.ID,t.type,t.arguments);O[URt]=t=>z1e.FromTape(t.ID,t.type,t.arguments);O[BRt]=t=>j1e.FromTape(t.ID,t.type,t.arguments);O[tA]=t=>W1e.FromTape(t.ID,t.type,t.arguments);O[kRt]=t=>q1e.FromTape(t.ID,t.type,t.arguments);O[GRt]=t=>Y1e.FromTape(t.ID,t.type,t.arguments);O[VRt]=t=>X1e.FromTape(t.ID,t.type,t.arguments);O[zRt]=t=>$1e.FromTape(t.ID,t.type,t.arguments);O[jRt]=t=>Z1e.FromTape(t.ID,t.type,t.arguments);O[WRt]=t=>K1e.FromTape(t.ID,t.type,t.arguments);O[qRt]=t=>J1e.FromTape(t.ID,t.type,t.arguments);O[YRt]=t=>Q1e.FromTape(t.ID,t.type,t.arguments);O[XRt]=t=>ebe.FromTape(t.ID,t.type,t.arguments);O[$Rt]=t=>tbe.FromTape(t.ID,t.type,t.arguments);O[ZRt]=t=>rbe.FromTape(t.ID,t.type,t.arguments);O[KRt]=t=>ibe.FromTape(t.ID,t.type,t.arguments);O[JRt]=t=>nbe.FromTape(t.ID,t.type,t.arguments);O[QRt]=t=>sbe.FromTape(t.ID,t.type,t.arguments);O[eMt]=t=>abe.FromTape(t.ID,t.type,t.arguments);O[tMt]=t=>obe.FromTape(t.ID,t.type,t.arguments);O[rMt]=t=>lbe.FromTape(t.ID,t.type,t.arguments);O[iMt]=t=>cbe.FromTape(t.ID,t.type,t.arguments);O[nMt]=t=>ube.FromTape(t.ID,t.type,t.arguments);O[sMt]=t=>hbe.FromTape(t.ID,t.type,t.arguments);O[aMt]=t=>pbe.FromTape(t.ID,t.type,t.arguments);O[oMt]=t=>dbe.FromTape(t.ID,t.type,t.arguments);O[lMt]=t=>fbe.FromTape(t.ID,t.type,t.arguments);O[cMt]=t=>mbe.FromTape(t.ID,t.type,t.arguments);O[uMt]=t=>gbe.FromTape(t.ID,t.type,t.arguments);O[hMt]=t=>vbe.FromTape(t.ID,t.type,t.arguments);O[pMt]=t=>ybe.FromTape(t.ID,t.type,t.arguments);O[dMt]=t=>Tbe.FromTape(t.ID,t.type,t.arguments);O[fMt]=t=>Ebe.FromTape(t.ID,t.type,t.arguments);O[mMt]=t=>bbe.FromTape(t.ID,t.type,t.arguments);O[gMt]=t=>xbe.FromTape(t.ID,t.type,t.arguments);O[vMt]=t=>Ibe.FromTape(t.ID,t.type,t.arguments);O[yMt]=t=>Sbe.FromTape(t.ID,t.type,t.arguments);O[TMt]=t=>_be.FromTape(t.ID,t.type,t.arguments);O[EMt]=t=>wbe.FromTape(t.ID,t.type,t.arguments);O[bMt]=t=>Rbe.FromTape(t.ID,t.type,t.arguments);O[xMt]=t=>Mbe.FromTape(t.ID,t.type,t.arguments);O[IMt]=t=>Dbe.FromTape(t.ID,t.type,t.arguments);O[SMt]=t=>Cbe.FromTape(t.ID,t.type,t.arguments);O[_Mt]=t=>Abe.FromTape(t.ID,t.type,t.arguments);O[wMt]=t=>Obe.FromTape(t.ID,t.type,t.arguments);O[RMt]=t=>Pbe.FromTape(t.ID,t.type,t.arguments);O[MMt]=t=>Nbe.FromTape(t.ID,t.type,t.arguments);O[DMt]=t=>Lbe.FromTape(t.ID,t.type,t.arguments);O[CMt]=t=>Fbe.FromTape(t.ID,t.type,t.arguments);O[AMt]=t=>Hbe.FromTape(t.ID,t.type,t.arguments);O[OMt]=t=>Ube.FromTape(t.ID,t.type,t.arguments);O[PMt]=t=>Bbe.FromTape(t.ID,t.type,t.arguments);O[NMt]=t=>kbe.FromTape(t.ID,t.type,t.arguments);O[LMt]=t=>Gbe.FromTape(t.ID,t.type,t.arguments);O[FMt]=t=>Vbe.FromTape(t.ID,t.type,t.arguments);O[HMt]=t=>zbe.FromTape(t.ID,t.type,t.arguments);O[UMt]=t=>jbe.FromTape(t.ID,t.type,t.arguments);O[BMt]=t=>Wbe.FromTape(t.ID,t.type,t.arguments);O[kMt]=t=>qbe.FromTape(t.ID,t.type,t.arguments);O[GMt]=t=>Ybe.FromTape(t.ID,t.type,t.arguments);O[VMt]=t=>Xbe.FromTape(t.ID,t.type,t.arguments);O[zMt]=t=>$be.FromTape(t.ID,t.type,t.arguments);O[Ck]=t=>Zbe.FromTape(t.ID,t.type,t.arguments);O[jMt]=t=>Kbe.FromTape(t.ID,t.type,t.arguments);O[WMt]=t=>Jbe.FromTape(t.ID,t.type,t.arguments);O[qMt]=t=>Qbe.FromTape(t.ID,t.type,t.arguments);O[YMt]=t=>exe.FromTape(t.ID,t.type,t.arguments);O[XMt]=t=>txe.FromTape(t.ID,t.type,t.arguments);O[$Mt]=t=>rxe.FromTape(t.ID,t.type,t.arguments);O[ZMt]=t=>ixe.FromTape(t.ID,t.type,t.arguments);O[KMt]=t=>nxe.FromTape(t.ID,t.type,t.arguments);O[JMt]=t=>sxe.FromTape(t.ID,t.type,t.arguments);O[QMt]=t=>axe.FromTape(t.ID,t.type,t.arguments);O[eDt]=t=>oxe.FromTape(t.ID,t.type,t.arguments);O[tDt]=t=>lxe.FromTape(t.ID,t.type,t.arguments);O[rDt]=t=>cxe.FromTape(t.ID,t.type,t.arguments);O[iDt]=t=>uxe.FromTape(t.ID,t.type,t.arguments);O[Ak]=t=>hxe.FromTape(t.ID,t.type,t.arguments);O[nDt]=t=>pxe.FromTape(t.ID,t.type,t.arguments);O[sDt]=t=>dxe.FromTape(t.ID,t.type,t.arguments);O[aDt]=t=>fxe.FromTape(t.ID,t.type,t.arguments);O[oDt]=t=>mxe.FromTape(t.ID,t.type,t.arguments);O[lDt]=t=>gxe.FromTape(t.ID,t.type,t.arguments);O[cDt]=t=>vxe.FromTape(t.ID,t.type,t.arguments);O[uDt]=t=>yxe.FromTape(t.ID,t.type,t.arguments);O[hDt]=t=>Txe.FromTape(t.ID,t.type,t.arguments);O[pDt]=t=>Exe.FromTape(t.ID,t.type,t.arguments);O[Ok]=t=>bxe.FromTape(t.ID,t.type,t.arguments);O[dDt]=t=>xxe.FromTape(t.ID,t.type,t.arguments);O[fDt]=t=>Ixe.FromTape(t.ID,t.type,t.arguments);O[mDt]=t=>Sxe.FromTape(t.ID,t.type,t.arguments);O[gDt]=t=>_xe.FromTape(t.ID,t.type,t.arguments);O[vDt]=t=>wxe.FromTape(t.ID,t.type,t.arguments);O[yDt]=t=>Rxe.FromTape(t.ID,t.type,t.arguments);O[Pk]=t=>Mxe.FromTape(t.ID,t.type,t.arguments);O[TDt]=t=>Dxe.FromTape(t.ID,t.type,t.arguments);O[Nk]=t=>Cxe.FromTape(t.ID,t.type,t.arguments);O[EDt]=t=>Axe.FromTape(t.ID,t.type,t.arguments);O[bDt]=t=>Oxe.FromTape(t.ID,t.type,t.arguments);O[xDt]=t=>Pxe.FromTape(t.ID,t.type,t.arguments);O[IDt]=t=>Nxe.FromTape(t.ID,t.type,t.arguments);O[SDt]=t=>Lxe.FromTape(t.ID,t.type,t.arguments);O[_Dt]=t=>Fxe.FromTape(t.ID,t.type,t.arguments);O[wDt]=t=>Hxe.FromTape(t.ID,t.type,t.arguments);O[RDt]=t=>Uxe.FromTape(t.ID,t.type,t.arguments);O[MDt]=t=>Bxe.FromTape(t.ID,t.type,t.arguments);O[DDt]=t=>kxe.FromTape(t.ID,t.type,t.arguments);O[CDt]=t=>Gxe.FromTape(t.ID,t.type,t.arguments);O[ADt]=t=>Vxe.FromTape(t.ID,t.type,t.arguments);O[ODt]=t=>zxe.FromTape(t.ID,t.type,t.arguments);O[PDt]=t=>jxe.FromTape(t.ID,t.type,t.arguments);O[NDt]=t=>Wxe.FromTape(t.ID,t.type,t.arguments);O[LDt]=t=>qxe.FromTape(t.ID,t.type,t.arguments);O[FDt]=t=>Yxe.FromTape(t.ID,t.type,t.arguments);O[HDt]=t=>Xxe.FromTape(t.ID,t.type,t.arguments);O[UDt]=t=>$xe.FromTape(t.ID,t.type,t.arguments);O[BDt]=t=>Zxe.FromTape(t.ID,t.type,t.arguments);O[kDt]=t=>Kxe.FromTape(t.ID,t.type,t.arguments);O[GDt]=t=>Jxe.FromTape(t.ID,t.type,t.arguments);O[VDt]=t=>Qxe.FromTape(t.ID,t.type,t.arguments);O[zDt]=t=>eIe.FromTape(t.ID,t.type,t.arguments);O[jDt]=t=>tIe.FromTape(t.ID,t.type,t.arguments);O[WDt]=t=>rIe.FromTape(t.ID,t.type,t.arguments);O[qDt]=t=>iIe.FromTape(t.ID,t.type,t.arguments);O[YDt]=t=>nIe.FromTape(t.ID,t.type,t.arguments);O[XDt]=t=>sIe.FromTape(t.ID,t.type,t.arguments);O[$Dt]=t=>aIe.FromTape(t.ID,t.type,t.arguments);O[ZDt]=t=>oIe.FromTape(t.ID,t.type,t.arguments);O[KDt]=t=>lIe.FromTape(t.ID,t.type,t.arguments);O[JDt]=t=>cIe.FromTape(t.ID,t.type,t.arguments);O[QDt]=t=>uIe.FromTape(t.ID,t.type,t.arguments);O[eCt]=t=>hIe.FromTape(t.ID,t.type,t.arguments);O[tCt]=t=>pIe.FromTape(t.ID,t.type,t.arguments);O[rCt]=t=>dIe.FromTape(t.ID,t.type,t.arguments);O[iCt]=t=>fIe.FromTape(t.ID,t.type,t.arguments);O[nCt]=t=>mIe.FromTape(t.ID,t.type,t.arguments);O[sCt]=t=>gIe.FromTape(t.ID,t.type,t.arguments);O[aCt]=t=>vIe.FromTape(t.ID,t.type,t.arguments);O[oCt]=t=>yIe.FromTape(t.ID,t.type,t.arguments);O[lCt]=t=>TIe.FromTape(t.ID,t.type,t.arguments);O[cCt]=t=>EIe.FromTape(t.ID,t.type,t.arguments);O[uCt]=t=>bIe.FromTape(t.ID,t.type,t.arguments);O[hCt]=t=>xIe.FromTape(t.ID,t.type,t.arguments);O[pCt]=t=>IIe.FromTape(t.ID,t.type,t.arguments);O[dCt]=t=>SIe.FromTape(t.ID,t.type,t.arguments);O[fCt]=t=>_Ie.FromTape(t.ID,t.type,t.arguments);O[mCt]=t=>wIe.FromTape(t.ID,t.type,t.arguments);O[gCt]=t=>RIe.FromTape(t.ID,t.type,t.arguments);O[vCt]=t=>MIe.FromTape(t.ID,t.type,t.arguments);O[yCt]=t=>DIe.FromTape(t.ID,t.type,t.arguments);O[TCt]=t=>CIe.FromTape(t.ID,t.type,t.arguments);O[ECt]=t=>AIe.FromTape(t.ID,t.type,t.arguments);O[bCt]=t=>OIe.FromTape(t.ID,t.type,t.arguments);O[xCt]=t=>PIe.FromTape(t.ID,t.type,t.arguments);O[ICt]=t=>NIe.FromTape(t.ID,t.type,t.arguments);O[SCt]=t=>LIe.FromTape(t.ID,t.type,t.arguments);O[_Ct]=t=>FIe.FromTape(t.ID,t.type,t.arguments);O[wCt]=t=>HIe.FromTape(t.ID,t.type,t.arguments);O[RCt]=t=>UIe.FromTape(t.ID,t.type,t.arguments);O[MCt]=t=>BIe.FromTape(t.ID,t.type,t.arguments);O[DCt]=t=>kIe.FromTape(t.ID,t.type,t.arguments);O[CCt]=t=>GIe.FromTape(t.ID,t.type,t.arguments);O[ACt]=t=>VIe.FromTape(t.ID,t.type,t.arguments);O[OCt]=t=>zIe.FromTape(t.ID,t.type,t.arguments);O[PCt]=t=>jIe.FromTape(t.ID,t.type,t.arguments);O[NCt]=t=>WIe.FromTape(t.ID,t.type,t.arguments);O[LCt]=t=>qIe.FromTape(t.ID,t.type,t.arguments);O[FCt]=t=>YIe.FromTape(t.ID,t.type,t.arguments);O[HCt]=t=>XIe.FromTape(t.ID,t.type,t.arguments);O[UCt]=t=>$Ie.FromTape(t.ID,t.type,t.arguments);O[BCt]=t=>ZIe.FromTape(t.ID,t.type,t.arguments);O[kCt]=t=>KIe.FromTape(t.ID,t.type,t.arguments);O[GCt]=t=>JIe.FromTape(t.ID,t.type,t.arguments);O[VCt]=t=>QIe.FromTape(t.ID,t.type,t.arguments);O[zCt]=t=>eSe.FromTape(t.ID,t.type,t.arguments);O[jCt]=t=>tSe.FromTape(t.ID,t.type,t.arguments);O[WCt]=t=>rSe.FromTape(t.ID,t.type,t.arguments);O[qCt]=t=>iSe.FromTape(t.ID,t.type,t.arguments);O[YCt]=t=>nSe.FromTape(t.ID,t.type,t.arguments);O[XCt]=t=>sSe.FromTape(t.ID,t.type,t.arguments);O[$Ct]=t=>aSe.FromTape(t.ID,t.type,t.arguments);O[ZCt]=t=>oSe.FromTape(t.ID,t.type,t.arguments);O[KCt]=t=>lSe.FromTape(t.ID,t.type,t.arguments);O[JCt]=t=>cSe.FromTape(t.ID,t.type,t.arguments);O[QCt]=t=>uSe.FromTape(t.ID,t.type,t.arguments);O[eAt]=t=>hSe.FromTape(t.ID,t.type,t.arguments);O[tAt]=t=>pSe.FromTape(t.ID,t.type,t.arguments);O[rAt]=t=>dSe.FromTape(t.ID,t.type,t.arguments);O[iAt]=t=>fSe.FromTape(t.ID,t.type,t.arguments);O[nAt]=t=>mSe.FromTape(t.ID,t.type,t.arguments);O[sAt]=t=>gSe.FromTape(t.ID,t.type,t.arguments);O[aAt]=t=>vSe.FromTape(t.ID,t.type,t.arguments);O[oAt]=t=>ySe.FromTape(t.ID,t.type,t.arguments);O[lAt]=t=>TSe.FromTape(t.ID,t.type,t.arguments);O[cAt]=t=>ESe.FromTape(t.ID,t.type,t.arguments);O[uAt]=t=>bSe.FromTape(t.ID,t.type,t.arguments);O[hAt]=t=>xSe.FromTape(t.ID,t.type,t.arguments);O[pAt]=t=>ISe.FromTape(t.ID,t.type,t.arguments);O[dAt]=t=>SSe.FromTape(t.ID,t.type,t.arguments);O[fAt]=t=>_Se.FromTape(t.ID,t.type,t.arguments);O[mAt]=t=>wSe.FromTape(t.ID,t.type,t.arguments);O[gAt]=t=>RSe.FromTape(t.ID,t.type,t.arguments);O[vAt]=t=>MSe.FromTape(t.ID,t.type,t.arguments);O[yAt]=t=>DSe.FromTape(t.ID,t.type,t.arguments);O[TAt]=t=>CSe.FromTape(t.ID,t.type,t.arguments);O[EAt]=t=>ASe.FromTape(t.ID,t.type,t.arguments);O[bAt]=t=>OSe.FromTape(t.ID,t.type,t.arguments);O[xAt]=t=>PSe.FromTape(t.ID,t.type,t.arguments);O[IAt]=t=>NSe.FromTape(t.ID,t.type,t.arguments);O[SAt]=t=>LSe.FromTape(t.ID,t.type,t.arguments);O[_At]=t=>FSe.FromTape(t.ID,t.type,t.arguments);O[wAt]=t=>HSe.FromTape(t.ID,t.type,t.arguments);O[RAt]=t=>USe.FromTape(t.ID,t.type,t.arguments);O[MAt]=t=>BSe.FromTape(t.ID,t.type,t.arguments);O[DAt]=t=>kSe.FromTape(t.ID,t.type,t.arguments);O[CAt]=t=>GSe.FromTape(t.ID,t.type,t.arguments);O[AAt]=t=>VSe.FromTape(t.ID,t.type,t.arguments);O[OAt]=t=>zSe.FromTape(t.ID,t.type,t.arguments);O[PAt]=t=>jSe.FromTape(t.ID,t.type,t.arguments);O[NAt]=t=>WSe.FromTape(t.ID,t.type,t.arguments);O[LAt]=t=>qSe.FromTape(t.ID,t.type,t.arguments);O[FAt]=t=>YSe.FromTape(t.ID,t.type,t.arguments);O[HAt]=t=>XSe.FromTape(t.ID,t.type,t.arguments);O[UAt]=t=>$Se.FromTape(t.ID,t.type,t.arguments);O[BAt]=t=>ZSe.FromTape(t.ID,t.type,t.arguments);O[kAt]=t=>KSe.FromTape(t.ID,t.type,t.arguments);O[GAt]=t=>JSe.FromTape(t.ID,t.type,t.arguments);O[VAt]=t=>QSe.FromTape(t.ID,t.type,t.arguments);O[zAt]=t=>e_e.FromTape(t.ID,t.type,t.arguments);O[jAt]=t=>t_e.FromTape(t.ID,t.type,t.arguments);O[WAt]=t=>r_e.FromTape(t.ID,t.type,t.arguments);O[qAt]=t=>i_e.FromTape(t.ID,t.type,t.arguments);O[YAt]=t=>n_e.FromTape(t.ID,t.type,t.arguments);O[XAt]=t=>s_e.FromTape(t.ID,t.type,t.arguments);O[$At]=t=>a_e.FromTape(t.ID,t.type,t.arguments);O[ZAt]=t=>o_e.FromTape(t.ID,t.type,t.arguments);O[KAt]=t=>l_e.FromTape(t.ID,t.type,t.arguments);O[JAt]=t=>c_e.FromTape(t.ID,t.type,t.arguments);O[QAt]=t=>u_e.FromTape(t.ID,t.type,t.arguments);O[eOt]=t=>h_e.FromTape(t.ID,t.type,t.arguments);O[tOt]=t=>p_e.FromTape(t.ID,t.type,t.arguments);O[rOt]=t=>d_e.FromTape(t.ID,t.type,t.arguments);O[iOt]=t=>f_e.FromTape(t.ID,t.type,t.arguments);O[nOt]=t=>m_e.FromTape(t.ID,t.type,t.arguments);O[sOt]=t=>g_e.FromTape(t.ID,t.type,t.arguments);O[aOt]=t=>v_e.FromTape(t.ID,t.type,t.arguments);O[oOt]=t=>y_e.FromTape(t.ID,t.type,t.arguments);O[lOt]=t=>T_e.FromTape(t.ID,t.type,t.arguments);O[cOt]=t=>E_e.FromTape(t.ID,t.type,t.arguments);O[uOt]=t=>b_e.FromTape(t.ID,t.type,t.arguments);O[hOt]=t=>x_e.FromTape(t.ID,t.type,t.arguments);O[pOt]=t=>I_e.FromTape(t.ID,t.type,t.arguments);O[dOt]=t=>S_e.FromTape(t.ID,t.type,t.arguments);O[fOt]=t=>__e.FromTape(t.ID,t.type,t.arguments);O[mOt]=t=>w_e.FromTape(t.ID,t.type,t.arguments);O[gOt]=t=>R_e.FromTape(t.ID,t.type,t.arguments);O[vOt]=t=>M_e.FromTape(t.ID,t.type,t.arguments);O[yOt]=t=>D_e.FromTape(t.ID,t.type,t.arguments);O[TOt]=t=>C_e.FromTape(t.ID,t.type,t.arguments);O[EOt]=t=>A_e.FromTape(t.ID,t.type,t.arguments);O[bOt]=t=>O_e.FromTape(t.ID,t.type,t.arguments);O[xOt]=t=>P_e.FromTape(t.ID,t.type,t.arguments);O[IOt]=t=>N_e.FromTape(t.ID,t.type,t.arguments);O[SOt]=t=>L_e.FromTape(t.ID,t.type,t.arguments);O[_Ot]=t=>F_e.FromTape(t.ID,t.type,t.arguments);O[wOt]=t=>H_e.FromTape(t.ID,t.type,t.arguments);O[ROt]=t=>U_e.FromTape(t.ID,t.type,t.arguments);O[MOt]=t=>B_e.FromTape(t.ID,t.type,t.arguments);O[DOt]=t=>k_e.FromTape(t.ID,t.type,t.arguments);O[COt]=t=>G_e.FromTape(t.ID,t.type,t.arguments);O[AOt]=t=>V_e.FromTape(t.ID,t.type,t.arguments);O[OOt]=t=>z_e.FromTape(t.ID,t.type,t.arguments);O[POt]=t=>j_e.FromTape(t.ID,t.type,t.arguments);O[NOt]=t=>W_e.FromTape(t.ID,t.type,t.arguments);O[LOt]=t=>q_e.FromTape(t.ID,t.type,t.arguments);O[FOt]=t=>Y_e.FromTape(t.ID,t.type,t.arguments);O[HOt]=t=>X_e.FromTape(t.ID,t.type,t.arguments);O[UOt]=t=>$_e.FromTape(t.ID,t.type,t.arguments);O[BOt]=t=>Z_e.FromTape(t.ID,t.type,t.arguments);O[kOt]=t=>K_e.FromTape(t.ID,t.type,t.arguments);O[GOt]=t=>J_e.FromTape(t.ID,t.type,t.arguments);O[VOt]=t=>Q_e.FromTape(t.ID,t.type,t.arguments);O[zOt]=t=>ewe.FromTape(t.ID,t.type,t.arguments);O[jOt]=t=>twe.FromTape(t.ID,t.type,t.arguments);O[WOt]=t=>rwe.FromTape(t.ID,t.type,t.arguments);O[qOt]=t=>iwe.FromTape(t.ID,t.type,t.arguments);O[YOt]=t=>nwe.FromTape(t.ID,t.type,t.arguments);O[XOt]=t=>swe.FromTape(t.ID,t.type,t.arguments);O[$Ot]=t=>awe.FromTape(t.ID,t.type,t.arguments);O[ZOt]=t=>owe.FromTape(t.ID,t.type,t.arguments);O[KOt]=t=>lwe.FromTape(t.ID,t.type,t.arguments);O[JOt]=t=>cwe.FromTape(t.ID,t.type,t.arguments);O[QOt]=t=>uwe.FromTape(t.ID,t.type,t.arguments);O[e3t]=t=>hwe.FromTape(t.ID,t.type,t.arguments);O[t3t]=t=>pwe.FromTape(t.ID,t.type,t.arguments);O[r3t]=t=>dwe.FromTape(t.ID,t.type,t.arguments);O[i3t]=t=>fwe.FromTape(t.ID,t.type,t.arguments);O[n3t]=t=>mwe.FromTape(t.ID,t.type,t.arguments);O[s3t]=t=>gwe.FromTape(t.ID,t.type,t.arguments);O[a3t]=t=>vwe.FromTape(t.ID,t.type,t.arguments);O[o3t]=t=>ywe.FromTape(t.ID,t.type,t.arguments);O[l3t]=t=>Twe.FromTape(t.ID,t.type,t.arguments);O[c3t]=t=>Ewe.FromTape(t.ID,t.type,t.arguments);O[u3t]=t=>bwe.FromTape(t.ID,t.type,t.arguments);O[h3t]=t=>xwe.FromTape(t.ID,t.type,t.arguments);O[p3t]=t=>Iwe.FromTape(t.ID,t.type,t.arguments);O[d3t]=t=>Swe.FromTape(t.ID,t.type,t.arguments);O[f3t]=t=>_we.FromTape(t.ID,t.type,t.arguments);O[m3t]=t=>wwe.FromTape(t.ID,t.type,t.arguments);O[g3t]=t=>Rwe.FromTape(t.ID,t.type,t.arguments);O[v3t]=t=>Mwe.FromTape(t.ID,t.type,t.arguments);O[y3t]=t=>Dwe.FromTape(t.ID,t.type,t.arguments);O[T3t]=t=>Cwe.FromTape(t.ID,t.type,t.arguments);O[E3t]=t=>Awe.FromTape(t.ID,t.type,t.arguments);O[b3t]=t=>Owe.FromTape(t.ID,t.type,t.arguments);O[x3t]=t=>Pwe.FromTape(t.ID,t.type,t.arguments);O[I3t]=t=>Nwe.FromTape(t.ID,t.type,t.arguments);O[S3t]=t=>Lwe.FromTape(t.ID,t.type,t.arguments);O[_3t]=t=>Fwe.FromTape(t.ID,t.type,t.arguments);O[w3t]=t=>Hwe.FromTape(t.ID,t.type,t.arguments);O[R3t]=t=>Uwe.FromTape(t.ID,t.type,t.arguments);O[M3t]=t=>Bwe.FromTape(t.ID,t.type,t.arguments);O[D3t]=t=>kwe.FromTape(t.ID,t.type,t.arguments);O[C3t]=t=>Gwe.FromTape(t.ID,t.type,t.arguments);O[A3t]=t=>Vwe.FromTape(t.ID,t.type,t.arguments);O[O3t]=t=>zwe.FromTape(t.ID,t.type,t.arguments);O[P3t]=t=>jwe.FromTape(t.ID,t.type,t.arguments);O[N3t]=t=>Wwe.FromTape(t.ID,t.type,t.arguments);O[L3t]=t=>qwe.FromTape(t.ID,t.type,t.arguments);O[F3t]=t=>Ywe.FromTape(t.ID,t.type,t.arguments);O[H3t]=t=>Xwe.FromTape(t.ID,t.type,t.arguments);var Kg=class{constructor(t){this.value=t}};Kg.EMAIL="EMAIL";Kg.FAX="FAX";Kg.PHONE="PHONE";Kg.POST="POST";Kg.VERBAL="VERBAL";Kg.USERDEFINED="USERDEFINED";Kg.NOTDEFINED="NOTDEFINED";var pn=class{constructor(t){this.value=t}};pn.DEAD_LOAD_G="DEAD_LOAD_G";pn.COMPLETION_G1="COMPLETION_G1";pn.LIVE_LOAD_Q="LIVE_LOAD_Q";pn.SNOW_S="SNOW_S";pn.WIND_W="WIND_W";pn.PRESTRESSING_P="PRESTRESSING_P";pn.SETTLEMENT_U="SETTLEMENT_U";pn.TEMPERATURE_T="TEMPERATURE_T";pn.EARTHQUAKE_E="EARTHQUAKE_E";pn.FIRE="FIRE";pn.IMPULSE="IMPULSE";pn.IMPACT="IMPACT";pn.TRANSPORT="TRANSPORT";pn.ERECTION="ERECTION";pn.PROPPING="PROPPING";pn.SYSTEM_IMPERFECTION="SYSTEM_IMPERFECTION";pn.SHRINKAGE="SHRINKAGE";pn.CREEP="CREEP";pn.LACK_OF_FIT="LACK_OF_FIT";pn.BUOYANCY="BUOYANCY";pn.ICE="ICE";pn.CURRENT="CURRENT";pn.WAVE="WAVE";pn.RAIN="RAIN";pn.BRAKES="BRAKES";pn.USERDEFINED="USERDEFINED";pn.NOTDEFINED="NOTDEFINED";var $x=class{constructor(t){this.value=t}};$x.PERMANENT_G="PERMANENT_G";$x.VARIABLE_Q="VARIABLE_Q";$x.EXTRAORDINARY_A="EXTRAORDINARY_A";$x.USERDEFINED="USERDEFINED";$x.NOTDEFINED="NOTDEFINED";var Jg=class{constructor(t){this.value=t}};Jg.ELECTRICACTUATOR="ELECTRICACTUATOR";Jg.HANDOPERATEDACTUATOR="HANDOPERATEDACTUATOR";Jg.HYDRAULICACTUATOR="HYDRAULICACTUATOR";Jg.PNEUMATICACTUATOR="PNEUMATICACTUATOR";Jg.THERMOSTATICACTUATOR="THERMOSTATICACTUATOR";Jg.USERDEFINED="USERDEFINED";Jg.NOTDEFINED="NOTDEFINED";var Zx=class{constructor(t){this.value=t}};Zx.OFFICE="OFFICE";Zx.SITE="SITE";Zx.HOME="HOME";Zx.DISTRIBUTIONPOINT="DISTRIBUTIONPOINT";Zx.USERDEFINED="USERDEFINED";var Kx=class{constructor(t){this.value=t}};Kx.CONSTANTFLOW="CONSTANTFLOW";Kx.VARIABLEFLOWPRESSUREDEPENDANT="VARIABLEFLOWPRESSUREDEPENDANT";Kx.VARIABLEFLOWPRESSUREINDEPENDANT="VARIABLEFLOWPRESSUREINDEPENDANT";Kx.USERDEFINED="USERDEFINED";Kx.NOTDEFINED="NOTDEFINED";var fT=class{constructor(t){this.value=t}};fT.DIFFUSER="DIFFUSER";fT.GRILLE="GRILLE";fT.LOUVRE="LOUVRE";fT.REGISTER="REGISTER";fT.USERDEFINED="USERDEFINED";fT.NOTDEFINED="NOTDEFINED";var Hc=class{constructor(t){this.value=t}};Hc.FIXEDPLATECOUNTERFLOWEXCHANGER="FIXEDPLATECOUNTERFLOWEXCHANGER";Hc.FIXEDPLATECROSSFLOWEXCHANGER="FIXEDPLATECROSSFLOWEXCHANGER";Hc.FIXEDPLATEPARALLELFLOWEXCHANGER="FIXEDPLATEPARALLELFLOWEXCHANGER";Hc.ROTARYWHEEL="ROTARYWHEEL";Hc.RUNAROUNDCOILLOOP="RUNAROUNDCOILLOOP";Hc.HEATPIPE="HEATPIPE";Hc.TWINTOWERENTHALPYRECOVERYLOOPS="TWINTOWERENTHALPYRECOVERYLOOPS";Hc.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS="THERMOSIPHONSEALEDTUBEHEATEXCHANGERS";Hc.THERMOSIPHONCOILTYPEHEATEXCHANGERS="THERMOSIPHONCOILTYPEHEATEXCHANGERS";Hc.USERDEFINED="USERDEFINED";Hc.NOTDEFINED="NOTDEFINED";var Pf=class{constructor(t){this.value=t}};Pf.BELL="BELL";Pf.BREAKGLASSBUTTON="BREAKGLASSBUTTON";Pf.LIGHT="LIGHT";Pf.MANUALPULLBOX="MANUALPULLBOX";Pf.SIREN="SIREN";Pf.WHISTLE="WHISTLE";Pf.USERDEFINED="USERDEFINED";Pf.NOTDEFINED="NOTDEFINED";var Dde=class{constructor(t){this.value=t}};Dde.USERDEFINED="USERDEFINED";Dde.NOTDEFINED="NOTDEFINED";var Jx=class{constructor(t){this.value=t}};Jx.IN_PLANE_LOADING_2D="IN_PLANE_LOADING_2D";Jx.OUT_PLANE_LOADING_2D="OUT_PLANE_LOADING_2D";Jx.LOADING_3D="LOADING_3D";Jx.USERDEFINED="USERDEFINED";Jx.NOTDEFINED="NOTDEFINED";var mT=class{constructor(t){this.value=t}};mT.FIRST_ORDER_THEORY="FIRST_ORDER_THEORY";mT.SECOND_ORDER_THEORY="SECOND_ORDER_THEORY";mT.THIRD_ORDER_THEORY="THIRD_ORDER_THEORY";mT.FULL_NONLINEAR_THEORY="FULL_NONLINEAR_THEORY";mT.USERDEFINED="USERDEFINED";mT.NOTDEFINED="NOTDEFINED";var rA=class{constructor(t){this.value=t}};rA.ADD="ADD";rA.DIVIDE="DIVIDE";rA.MULTIPLY="MULTIPLY";rA.SUBTRACT="SUBTRACT";var Lk=class{constructor(t){this.value=t}};Lk.SITE="SITE";Lk.FACTORY="FACTORY";Lk.NOTDEFINED="NOTDEFINED";var $o=class{constructor(t){this.value=t}};$o.AMPLIFIER="AMPLIFIER";$o.CAMERA="CAMERA";$o.DISPLAY="DISPLAY";$o.MICROPHONE="MICROPHONE";$o.PLAYER="PLAYER";$o.PROJECTOR="PROJECTOR";$o.RECEIVER="RECEIVER";$o.SPEAKER="SPEAKER";$o.SWITCHER="SWITCHER";$o.TELEPHONE="TELEPHONE";$o.TUNER="TUNER";$o.USERDEFINED="USERDEFINED";$o.NOTDEFINED="NOTDEFINED";var gT=class{constructor(t){this.value=t}};gT.POLYLINE_FORM="POLYLINE_FORM";gT.CIRCULAR_ARC="CIRCULAR_ARC";gT.ELLIPTIC_ARC="ELLIPTIC_ARC";gT.PARABOLIC_ARC="PARABOLIC_ARC";gT.HYPERBOLIC_ARC="HYPERBOLIC_ARC";gT.UNSPECIFIED="UNSPECIFIED";var Uc=class{constructor(t){this.value=t}};Uc.PLANE_SURF="PLANE_SURF";Uc.CYLINDRICAL_SURF="CYLINDRICAL_SURF";Uc.CONICAL_SURF="CONICAL_SURF";Uc.SPHERICAL_SURF="SPHERICAL_SURF";Uc.TOROIDAL_SURF="TOROIDAL_SURF";Uc.SURF_OF_REVOLUTION="SURF_OF_REVOLUTION";Uc.RULED_SURF="RULED_SURF";Uc.GENERALISED_CONE="GENERALISED_CONE";Uc.QUADRIC_SURF="QUADRIC_SURF";Uc.SURF_OF_LINEAR_EXTRUSION="SURF_OF_LINEAR_EXTRUSION";Uc.UNSPECIFIED="UNSPECIFIED";var go=class{constructor(t){this.value=t}};go.BEAM="BEAM";go.JOIST="JOIST";go.HOLLOWCORE="HOLLOWCORE";go.LINTEL="LINTEL";go.SPANDREL="SPANDREL";go.T_BEAM="T_BEAM";go.GIRDER_SEGMENT="GIRDER_SEGMENT";go.DIAPHRAGM="DIAPHRAGM";go.PIERCAP="PIERCAP";go.HATSTONE="HATSTONE";go.CORNICE="CORNICE";go.EDGEBEAM="EDGEBEAM";go.USERDEFINED="USERDEFINED";go.NOTDEFINED="NOTDEFINED";var Qx=class{constructor(t){this.value=t}};Qx.FIXED_MOVEMENT="FIXED_MOVEMENT";Qx.GUIDED_LONGITUDINAL="GUIDED_LONGITUDINAL";Qx.GUIDED_TRANSVERSAL="GUIDED_TRANSVERSAL";Qx.FREE_MOVEMENT="FREE_MOVEMENT";Qx.NOTDEFINED="NOTDEFINED";var Xu=class{constructor(t){this.value=t}};Xu.CYLINDRICAL="CYLINDRICAL";Xu.SPHERICAL="SPHERICAL";Xu.ELASTOMERIC="ELASTOMERIC";Xu.POT="POT";Xu.GUIDE="GUIDE";Xu.ROCKER="ROCKER";Xu.ROLLER="ROLLER";Xu.DISK="DISK";Xu.USERDEFINED="USERDEFINED";Xu.NOTDEFINED="NOTDEFINED";var $u=class{constructor(t){this.value=t}};$u.GREATERTHAN="GREATERTHAN";$u.GREATERTHANOREQUALTO="GREATERTHANOREQUALTO";$u.LESSTHAN="LESSTHAN";$u.LESSTHANOREQUALTO="LESSTHANOREQUALTO";$u.EQUALTO="EQUALTO";$u.NOTEQUALTO="NOTEQUALTO";$u.INCLUDES="INCLUDES";$u.NOTINCLUDES="NOTINCLUDES";$u.INCLUDEDIN="INCLUDEDIN";$u.NOTINCLUDEDIN="NOTINCLUDEDIN";var iA=class{constructor(t){this.value=t}};iA.WATER="WATER";iA.STEAM="STEAM";iA.USERDEFINED="USERDEFINED";iA.NOTDEFINED="NOTDEFINED";var Fk=class{constructor(t){this.value=t}};Fk.UNION="UNION";Fk.INTERSECTION="INTERSECTION";Fk.DIFFERENCE="DIFFERENCE";var kl=class{constructor(t){this.value=t}};kl.ABUTMENT="ABUTMENT";kl.DECK="DECK";kl.DECK_SEGMENT="DECK_SEGMENT";kl.FOUNDATION="FOUNDATION";kl.PIER="PIER";kl.PIER_SEGMENT="PIER_SEGMENT";kl.PYLON="PYLON";kl.SUBSTRUCTURE="SUBSTRUCTURE";kl.SUPERSTRUCTURE="SUPERSTRUCTURE";kl.SURFACESTRUCTURE="SURFACESTRUCTURE";kl.USERDEFINED="USERDEFINED";kl.NOTDEFINED="NOTDEFINED";var Zu=class{constructor(t){this.value=t}};Zu.ARCHED="ARCHED";Zu.CABLE_STAYED="CABLE_STAYED";Zu.CANTILEVER="CANTILEVER";Zu.CULVERT="CULVERT";Zu.FRAMEWORK="FRAMEWORK";Zu.GIRDER="GIRDER";Zu.SUSPENSION="SUSPENSION";Zu.TRUSS="TRUSS";Zu.USERDEFINED="USERDEFINED";Zu.NOTDEFINED="NOTDEFINED";var eI=class{constructor(t){this.value=t}};eI.INSULATION="INSULATION";eI.PRECASTPANEL="PRECASTPANEL";eI.APRON="APRON";eI.USERDEFINED="USERDEFINED";eI.NOTDEFINED="NOTDEFINED";var Qg=class{constructor(t){this.value=t}};Qg.COMPLEX="COMPLEX";Qg.ELEMENT="ELEMENT";Qg.PARTIAL="PARTIAL";Qg.PROVISIONFORVOID="PROVISIONFORVOID";Qg.PROVISIONFORSPACE="PROVISIONFORSPACE";Qg.USERDEFINED="USERDEFINED";Qg.NOTDEFINED="NOTDEFINED";var Ku=class{constructor(t){this.value=t}};Ku.FENESTRATION="FENESTRATION";Ku.FOUNDATION="FOUNDATION";Ku.LOADBEARING="LOADBEARING";Ku.OUTERSHELL="OUTERSHELL";Ku.SHADING="SHADING";Ku.TRANSPORT="TRANSPORT";Ku.REINFORCING="REINFORCING";Ku.PRESTRESSING="PRESTRESSING";Ku.USERDEFINED="USERDEFINED";Ku.NOTDEFINED="NOTDEFINED";var Cde=class{constructor(t){this.value=t}};Cde.USERDEFINED="USERDEFINED";Cde.NOTDEFINED="NOTDEFINED";var vT=class{constructor(t){this.value=t}};vT.BEND="BEND";vT.CROSS="CROSS";vT.REDUCER="REDUCER";vT.TEE="TEE";vT.USERDEFINED="USERDEFINED";vT.NOTDEFINED="NOTDEFINED";var yT=class{constructor(t){this.value=t}};yT.CABLELADDERSEGMENT="CABLELADDERSEGMENT";yT.CABLETRAYSEGMENT="CABLETRAYSEGMENT";yT.CABLETRUNKINGSEGMENT="CABLETRUNKINGSEGMENT";yT.CONDUITSEGMENT="CONDUITSEGMENT";yT.USERDEFINED="USERDEFINED";yT.NOTDEFINED="NOTDEFINED";var e0=class{constructor(t){this.value=t}};e0.CONNECTOR="CONNECTOR";e0.ENTRY="ENTRY";e0.EXIT="EXIT";e0.JUNCTION="JUNCTION";e0.TRANSITION="TRANSITION";e0.USERDEFINED="USERDEFINED";e0.NOTDEFINED="NOTDEFINED";var TT=class{constructor(t){this.value=t}};TT.BUSBARSEGMENT="BUSBARSEGMENT";TT.CABLESEGMENT="CABLESEGMENT";TT.CONDUCTORSEGMENT="CONDUCTORSEGMENT";TT.CORESEGMENT="CORESEGMENT";TT.USERDEFINED="USERDEFINED";TT.NOTDEFINED="NOTDEFINED";var nA=class{constructor(t){this.value=t}};nA.WELL="WELL";nA.CAISSON="CAISSON";nA.USERDEFINED="USERDEFINED";nA.NOTDEFINED="NOTDEFINED";var tI=class{constructor(t){this.value=t}};tI.NOCHANGE="NOCHANGE";tI.MODIFIED="MODIFIED";tI.ADDED="ADDED";tI.DELETED="DELETED";tI.NOTDEFINED="NOTDEFINED";var rI=class{constructor(t){this.value=t}};rI.AIRCOOLED="AIRCOOLED";rI.WATERCOOLED="WATERCOOLED";rI.HEATRECOVERY="HEATRECOVERY";rI.USERDEFINED="USERDEFINED";rI.NOTDEFINED="NOTDEFINED";var Ade=class{constructor(t){this.value=t}};Ade.USERDEFINED="USERDEFINED";Ade.NOTDEFINED="NOTDEFINED";var kp=class{constructor(t){this.value=t}};kp.DXCOOLINGCOIL="DXCOOLINGCOIL";kp.ELECTRICHEATINGCOIL="ELECTRICHEATINGCOIL";kp.GASHEATINGCOIL="GASHEATINGCOIL";kp.HYDRONICCOIL="HYDRONICCOIL";kp.STEAMHEATINGCOIL="STEAMHEATINGCOIL";kp.WATERCOOLINGCOIL="WATERCOOLINGCOIL";kp.WATERHEATINGCOIL="WATERHEATINGCOIL";kp.USERDEFINED="USERDEFINED";kp.NOTDEFINED="NOTDEFINED";var t0=class{constructor(t){this.value=t}};t0.COLUMN="COLUMN";t0.PILASTER="PILASTER";t0.PIERSTEM="PIERSTEM";t0.PIERSTEM_SEGMENT="PIERSTEM_SEGMENT";t0.STANDCOLUMN="STANDCOLUMN";t0.USERDEFINED="USERDEFINED";t0.NOTDEFINED="NOTDEFINED";var vo=class{constructor(t){this.value=t}};vo.ANTENNA="ANTENNA";vo.COMPUTER="COMPUTER";vo.FAX="FAX";vo.GATEWAY="GATEWAY";vo.MODEM="MODEM";vo.NETWORKAPPLIANCE="NETWORKAPPLIANCE";vo.NETWORKBRIDGE="NETWORKBRIDGE";vo.NETWORKHUB="NETWORKHUB";vo.PRINTER="PRINTER";vo.REPEATER="REPEATER";vo.ROUTER="ROUTER";vo.SCANNER="SCANNER";vo.USERDEFINED="USERDEFINED";vo.NOTDEFINED="NOTDEFINED";var Ode=class{constructor(t){this.value=t}};Ode.P_COMPLEX="P_COMPLEX";Ode.Q_COMPLEX="Q_COMPLEX";var Gs=class{constructor(t){this.value=t}};Gs.DYNAMIC="DYNAMIC";Gs.RECIPROCATING="RECIPROCATING";Gs.ROTARY="ROTARY";Gs.SCROLL="SCROLL";Gs.TROCHOIDAL="TROCHOIDAL";Gs.SINGLESTAGE="SINGLESTAGE";Gs.BOOSTER="BOOSTER";Gs.OPENTYPE="OPENTYPE";Gs.HERMETIC="HERMETIC";Gs.SEMIHERMETIC="SEMIHERMETIC";Gs.WELDEDSHELLHERMETIC="WELDEDSHELLHERMETIC";Gs.ROLLINGPISTON="ROLLINGPISTON";Gs.ROTARYVANE="ROTARYVANE";Gs.SINGLESCREW="SINGLESCREW";Gs.TWINSCREW="TWINSCREW";Gs.USERDEFINED="USERDEFINED";Gs.NOTDEFINED="NOTDEFINED";var Gp=class{constructor(t){this.value=t}};Gp.AIRCOOLED="AIRCOOLED";Gp.EVAPORATIVECOOLED="EVAPORATIVECOOLED";Gp.WATERCOOLED="WATERCOOLED";Gp.WATERCOOLEDBRAZEDPLATE="WATERCOOLEDBRAZEDPLATE";Gp.WATERCOOLEDSHELLCOIL="WATERCOOLEDSHELLCOIL";Gp.WATERCOOLEDSHELLTUBE="WATERCOOLEDSHELLTUBE";Gp.WATERCOOLEDTUBEINTUBE="WATERCOOLEDTUBEINTUBE";Gp.USERDEFINED="USERDEFINED";Gp.NOTDEFINED="NOTDEFINED";var sA=class{constructor(t){this.value=t}};sA.ATPATH="ATPATH";sA.ATSTART="ATSTART";sA.ATEND="ATEND";sA.NOTDEFINED="NOTDEFINED";var iI=class{constructor(t){this.value=t}};iI.HARD="HARD";iI.SOFT="SOFT";iI.ADVISORY="ADVISORY";iI.USERDEFINED="USERDEFINED";iI.NOTDEFINED="NOTDEFINED";var Ju=class{constructor(t){this.value=t}};Ju.DEMOLISHING="DEMOLISHING";Ju.EARTHMOVING="EARTHMOVING";Ju.ERECTING="ERECTING";Ju.HEATING="HEATING";Ju.LIGHTING="LIGHTING";Ju.PAVING="PAVING";Ju.PUMPING="PUMPING";Ju.TRANSPORTING="TRANSPORTING";Ju.USERDEFINED="USERDEFINED";Ju.NOTDEFINED="NOTDEFINED";var Bc=class{constructor(t){this.value=t}};Bc.AGGREGATES="AGGREGATES";Bc.CONCRETE="CONCRETE";Bc.DRYWALL="DRYWALL";Bc.FUEL="FUEL";Bc.GYPSUM="GYPSUM";Bc.MASONRY="MASONRY";Bc.METAL="METAL";Bc.PLASTIC="PLASTIC";Bc.WOOD="WOOD";Bc.NOTDEFINED="NOTDEFINED";Bc.USERDEFINED="USERDEFINED";var aA=class{constructor(t){this.value=t}};aA.ASSEMBLY="ASSEMBLY";aA.FORMWORK="FORMWORK";aA.USERDEFINED="USERDEFINED";aA.NOTDEFINED="NOTDEFINED";var r0=class{constructor(t){this.value=t}};r0.FLOATING="FLOATING";r0.PROGRAMMABLE="PROGRAMMABLE";r0.PROPORTIONAL="PROPORTIONAL";r0.MULTIPOSITION="MULTIPOSITION";r0.TWOPOSITION="TWOPOSITION";r0.USERDEFINED="USERDEFINED";r0.NOTDEFINED="NOTDEFINED";var oA=class{constructor(t){this.value=t}};oA.ACTIVE="ACTIVE";oA.PASSIVE="PASSIVE";oA.USERDEFINED="USERDEFINED";oA.NOTDEFINED="NOTDEFINED";var nI=class{constructor(t){this.value=t}};nI.NATURALDRAFT="NATURALDRAFT";nI.MECHANICALINDUCEDDRAFT="MECHANICALINDUCEDDRAFT";nI.MECHANICALFORCEDDRAFT="MECHANICALFORCEDDRAFT";nI.USERDEFINED="USERDEFINED";nI.NOTDEFINED="NOTDEFINED";var Pde=class{constructor(t){this.value=t}};Pde.USERDEFINED="USERDEFINED";Pde.NOTDEFINED="NOTDEFINED";var Vp=class{constructor(t){this.value=t}};Vp.BUDGET="BUDGET";Vp.COSTPLAN="COSTPLAN";Vp.ESTIMATE="ESTIMATE";Vp.TENDER="TENDER";Vp.PRICEDBILLOFQUANTITIES="PRICEDBILLOFQUANTITIES";Vp.UNPRICEDBILLOFQUANTITIES="UNPRICEDBILLOFQUANTITIES";Vp.SCHEDULEOFRATES="SCHEDULEOFRATES";Vp.USERDEFINED="USERDEFINED";Vp.NOTDEFINED="NOTDEFINED";var Zo=class{constructor(t){this.value=t}};Zo.CEILING="CEILING";Zo.FLOORING="FLOORING";Zo.CLADDING="CLADDING";Zo.ROOFING="ROOFING";Zo.MOLDING="MOLDING";Zo.SKIRTINGBOARD="SKIRTINGBOARD";Zo.INSULATION="INSULATION";Zo.MEMBRANE="MEMBRANE";Zo.SLEEVING="SLEEVING";Zo.WRAPPING="WRAPPING";Zo.COPING="COPING";Zo.USERDEFINED="USERDEFINED";Zo.NOTDEFINED="NOTDEFINED";var lA=class{constructor(t){this.value=t}};lA.OFFICE="OFFICE";lA.SITE="SITE";lA.USERDEFINED="USERDEFINED";lA.NOTDEFINED="NOTDEFINED";var Nde=class{constructor(t){this.value=t}};Nde.USERDEFINED="USERDEFINED";Nde.NOTDEFINED="NOTDEFINED";var cA=class{constructor(t){this.value=t}};cA.LINEAR="LINEAR";cA.LOG_LINEAR="LOG_LINEAR";cA.LOG_LOG="LOG_LOG";cA.NOTDEFINED="NOTDEFINED";var Ko=class{constructor(t){this.value=t}};Ko.BACKDRAFTDAMPER="BACKDRAFTDAMPER";Ko.BALANCINGDAMPER="BALANCINGDAMPER";Ko.BLASTDAMPER="BLASTDAMPER";Ko.CONTROLDAMPER="CONTROLDAMPER";Ko.FIREDAMPER="FIREDAMPER";Ko.FIRESMOKEDAMPER="FIRESMOKEDAMPER";Ko.FUMEHOODEXHAUST="FUMEHOODEXHAUST";Ko.GRAVITYDAMPER="GRAVITYDAMPER";Ko.GRAVITYRELIEFDAMPER="GRAVITYRELIEFDAMPER";Ko.RELIEFDAMPER="RELIEFDAMPER";Ko.SMOKEDAMPER="SMOKEDAMPER";Ko.USERDEFINED="USERDEFINED";Ko.NOTDEFINED="NOTDEFINED";var sI=class{constructor(t){this.value=t}};sI.MEASURED="MEASURED";sI.PREDICTED="PREDICTED";sI.SIMULATED="SIMULATED";sI.USERDEFINED="USERDEFINED";sI.NOTDEFINED="NOTDEFINED";var dr=class{constructor(t){this.value=t}};dr.ANGULARVELOCITYUNIT="ANGULARVELOCITYUNIT";dr.AREADENSITYUNIT="AREADENSITYUNIT";dr.COMPOUNDPLANEANGLEUNIT="COMPOUNDPLANEANGLEUNIT";dr.DYNAMICVISCOSITYUNIT="DYNAMICVISCOSITYUNIT";dr.HEATFLUXDENSITYUNIT="HEATFLUXDENSITYUNIT";dr.INTEGERCOUNTRATEUNIT="INTEGERCOUNTRATEUNIT";dr.ISOTHERMALMOISTURECAPACITYUNIT="ISOTHERMALMOISTURECAPACITYUNIT";dr.KINEMATICVISCOSITYUNIT="KINEMATICVISCOSITYUNIT";dr.LINEARVELOCITYUNIT="LINEARVELOCITYUNIT";dr.MASSDENSITYUNIT="MASSDENSITYUNIT";dr.MASSFLOWRATEUNIT="MASSFLOWRATEUNIT";dr.MOISTUREDIFFUSIVITYUNIT="MOISTUREDIFFUSIVITYUNIT";dr.MOLECULARWEIGHTUNIT="MOLECULARWEIGHTUNIT";dr.SPECIFICHEATCAPACITYUNIT="SPECIFICHEATCAPACITYUNIT";dr.THERMALADMITTANCEUNIT="THERMALADMITTANCEUNIT";dr.THERMALCONDUCTANCEUNIT="THERMALCONDUCTANCEUNIT";dr.THERMALRESISTANCEUNIT="THERMALRESISTANCEUNIT";dr.THERMALTRANSMITTANCEUNIT="THERMALTRANSMITTANCEUNIT";dr.VAPORPERMEABILITYUNIT="VAPORPERMEABILITYUNIT";dr.VOLUMETRICFLOWRATEUNIT="VOLUMETRICFLOWRATEUNIT";dr.ROTATIONALFREQUENCYUNIT="ROTATIONALFREQUENCYUNIT";dr.TORQUEUNIT="TORQUEUNIT";dr.MOMENTOFINERTIAUNIT="MOMENTOFINERTIAUNIT";dr.LINEARMOMENTUNIT="LINEARMOMENTUNIT";dr.LINEARFORCEUNIT="LINEARFORCEUNIT";dr.PLANARFORCEUNIT="PLANARFORCEUNIT";dr.MODULUSOFELASTICITYUNIT="MODULUSOFELASTICITYUNIT";dr.SHEARMODULUSUNIT="SHEARMODULUSUNIT";dr.LINEARSTIFFNESSUNIT="LINEARSTIFFNESSUNIT";dr.ROTATIONALSTIFFNESSUNIT="ROTATIONALSTIFFNESSUNIT";dr.MODULUSOFSUBGRADEREACTIONUNIT="MODULUSOFSUBGRADEREACTIONUNIT";dr.ACCELERATIONUNIT="ACCELERATIONUNIT";dr.CURVATUREUNIT="CURVATUREUNIT";dr.HEATINGVALUEUNIT="HEATINGVALUEUNIT";dr.IONCONCENTRATIONUNIT="IONCONCENTRATIONUNIT";dr.LUMINOUSINTENSITYDISTRIBUTIONUNIT="LUMINOUSINTENSITYDISTRIBUTIONUNIT";dr.MASSPERLENGTHUNIT="MASSPERLENGTHUNIT";dr.MODULUSOFLINEARSUBGRADEREACTIONUNIT="MODULUSOFLINEARSUBGRADEREACTIONUNIT";dr.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT="MODULUSOFROTATIONALSUBGRADEREACTIONUNIT";dr.PHUNIT="PHUNIT";dr.ROTATIONALMASSUNIT="ROTATIONALMASSUNIT";dr.SECTIONAREAINTEGRALUNIT="SECTIONAREAINTEGRALUNIT";dr.SECTIONMODULUSUNIT="SECTIONMODULUSUNIT";dr.SOUNDPOWERLEVELUNIT="SOUNDPOWERLEVELUNIT";dr.SOUNDPOWERUNIT="SOUNDPOWERUNIT";dr.SOUNDPRESSURELEVELUNIT="SOUNDPRESSURELEVELUNIT";dr.SOUNDPRESSUREUNIT="SOUNDPRESSUREUNIT";dr.TEMPERATUREGRADIENTUNIT="TEMPERATUREGRADIENTUNIT";dr.TEMPERATURERATEOFCHANGEUNIT="TEMPERATURERATEOFCHANGEUNIT";dr.THERMALEXPANSIONCOEFFICIENTUNIT="THERMALEXPANSIONCOEFFICIENTUNIT";dr.WARPINGCONSTANTUNIT="WARPINGCONSTANTUNIT";dr.WARPINGMOMENTUNIT="WARPINGMOMENTUNIT";dr.USERDEFINED="USERDEFINED";var Lde=class{constructor(t){this.value=t}};Lde.POSITIVE="POSITIVE";Lde.NEGATIVE="NEGATIVE";var ET=class{constructor(t){this.value=t}};ET.ANCHORPLATE="ANCHORPLATE";ET.BRACKET="BRACKET";ET.SHOE="SHOE";ET.EXPANSION_JOINT_DEVICE="EXPANSION_JOINT_DEVICE";ET.USERDEFINED="USERDEFINED";ET.NOTDEFINED="NOTDEFINED";var Qu=class{constructor(t){this.value=t}};Qu.FORMEDDUCT="FORMEDDUCT";Qu.INSPECTIONCHAMBER="INSPECTIONCHAMBER";Qu.INSPECTIONPIT="INSPECTIONPIT";Qu.MANHOLE="MANHOLE";Qu.METERCHAMBER="METERCHAMBER";Qu.SUMP="SUMP";Qu.TRENCH="TRENCH";Qu.VALVECHAMBER="VALVECHAMBER";Qu.USERDEFINED="USERDEFINED";Qu.NOTDEFINED="NOTDEFINED";var bT=class{constructor(t){this.value=t}};bT.CABLE="CABLE";bT.CABLECARRIER="CABLECARRIER";bT.DUCT="DUCT";bT.PIPE="PIPE";bT.USERDEFINED="USERDEFINED";bT.NOTDEFINED="NOTDEFINED";var Lr=class{constructor(t){this.value=t}};Lr.AIRCONDITIONING="AIRCONDITIONING";Lr.AUDIOVISUAL="AUDIOVISUAL";Lr.CHEMICAL="CHEMICAL";Lr.CHILLEDWATER="CHILLEDWATER";Lr.COMMUNICATION="COMMUNICATION";Lr.COMPRESSEDAIR="COMPRESSEDAIR";Lr.CONDENSERWATER="CONDENSERWATER";Lr.CONTROL="CONTROL";Lr.CONVEYING="CONVEYING";Lr.DATA="DATA";Lr.DISPOSAL="DISPOSAL";Lr.DOMESTICCOLDWATER="DOMESTICCOLDWATER";Lr.DOMESTICHOTWATER="DOMESTICHOTWATER";Lr.DRAINAGE="DRAINAGE";Lr.EARTHING="EARTHING";Lr.ELECTRICAL="ELECTRICAL";Lr.ELECTROACOUSTIC="ELECTROACOUSTIC";Lr.EXHAUST="EXHAUST";Lr.FIREPROTECTION="FIREPROTECTION";Lr.FUEL="FUEL";Lr.GAS="GAS";Lr.HAZARDOUS="HAZARDOUS";Lr.HEATING="HEATING";Lr.LIGHTING="LIGHTING";Lr.LIGHTNINGPROTECTION="LIGHTNINGPROTECTION";Lr.MUNICIPALSOLIDWASTE="MUNICIPALSOLIDWASTE";Lr.OIL="OIL";Lr.OPERATIONAL="OPERATIONAL";Lr.POWERGENERATION="POWERGENERATION";Lr.RAINWATER="RAINWATER";Lr.REFRIGERATION="REFRIGERATION";Lr.SECURITY="SECURITY";Lr.SEWAGE="SEWAGE";Lr.SIGNAL="SIGNAL";Lr.STORMWATER="STORMWATER";Lr.TELEPHONE="TELEPHONE";Lr.TV="TV";Lr.VACUUM="VACUUM";Lr.VENT="VENT";Lr.VENTILATION="VENTILATION";Lr.WASTEWATER="WASTEWATER";Lr.WATERSUPPLY="WATERSUPPLY";Lr.USERDEFINED="USERDEFINED";Lr.NOTDEFINED="NOTDEFINED";var xT=class{constructor(t){this.value=t}};xT.PUBLIC="PUBLIC";xT.RESTRICTED="RESTRICTED";xT.CONFIDENTIAL="CONFIDENTIAL";xT.PERSONAL="PERSONAL";xT.USERDEFINED="USERDEFINED";xT.NOTDEFINED="NOTDEFINED";var aI=class{constructor(t){this.value=t}};aI.DRAFT="DRAFT";aI.FINALDRAFT="FINALDRAFT";aI.FINAL="FINAL";aI.REVISION="REVISION";aI.NOTDEFINED="NOTDEFINED";var zp=class{constructor(t){this.value=t}};zp.SWINGING="SWINGING";zp.DOUBLE_ACTING="DOUBLE_ACTING";zp.SLIDING="SLIDING";zp.FOLDING="FOLDING";zp.REVOLVING="REVOLVING";zp.ROLLINGUP="ROLLINGUP";zp.FIXEDPANEL="FIXEDPANEL";zp.USERDEFINED="USERDEFINED";zp.NOTDEFINED="NOTDEFINED";var uA=class{constructor(t){this.value=t}};uA.LEFT="LEFT";uA.MIDDLE="MIDDLE";uA.RIGHT="RIGHT";uA.NOTDEFINED="NOTDEFINED";var jp=class{constructor(t){this.value=t}};jp.ALUMINIUM="ALUMINIUM";jp.HIGH_GRADE_STEEL="HIGH_GRADE_STEEL";jp.STEEL="STEEL";jp.WOOD="WOOD";jp.ALUMINIUM_WOOD="ALUMINIUM_WOOD";jp.ALUMINIUM_PLASTIC="ALUMINIUM_PLASTIC";jp.PLASTIC="PLASTIC";jp.USERDEFINED="USERDEFINED";jp.NOTDEFINED="NOTDEFINED";var As=class{constructor(t){this.value=t}};As.SINGLE_SWING_LEFT="SINGLE_SWING_LEFT";As.SINGLE_SWING_RIGHT="SINGLE_SWING_RIGHT";As.DOUBLE_DOOR_SINGLE_SWING="DOUBLE_DOOR_SINGLE_SWING";As.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT="DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT";As.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT="DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT";As.DOUBLE_SWING_LEFT="DOUBLE_SWING_LEFT";As.DOUBLE_SWING_RIGHT="DOUBLE_SWING_RIGHT";As.DOUBLE_DOOR_DOUBLE_SWING="DOUBLE_DOOR_DOUBLE_SWING";As.SLIDING_TO_LEFT="SLIDING_TO_LEFT";As.SLIDING_TO_RIGHT="SLIDING_TO_RIGHT";As.DOUBLE_DOOR_SLIDING="DOUBLE_DOOR_SLIDING";As.FOLDING_TO_LEFT="FOLDING_TO_LEFT";As.FOLDING_TO_RIGHT="FOLDING_TO_RIGHT";As.DOUBLE_DOOR_FOLDING="DOUBLE_DOOR_FOLDING";As.REVOLVING="REVOLVING";As.ROLLINGUP="ROLLINGUP";As.USERDEFINED="USERDEFINED";As.NOTDEFINED="NOTDEFINED";var oI=class{constructor(t){this.value=t}};oI.DOOR="DOOR";oI.GATE="GATE";oI.TRAPDOOR="TRAPDOOR";oI.USERDEFINED="USERDEFINED";oI.NOTDEFINED="NOTDEFINED";var hs=class{constructor(t){this.value=t}};hs.SINGLE_SWING_LEFT="SINGLE_SWING_LEFT";hs.SINGLE_SWING_RIGHT="SINGLE_SWING_RIGHT";hs.DOUBLE_DOOR_SINGLE_SWING="DOUBLE_DOOR_SINGLE_SWING";hs.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT="DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT";hs.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT="DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT";hs.DOUBLE_SWING_LEFT="DOUBLE_SWING_LEFT";hs.DOUBLE_SWING_RIGHT="DOUBLE_SWING_RIGHT";hs.DOUBLE_DOOR_DOUBLE_SWING="DOUBLE_DOOR_DOUBLE_SWING";hs.SLIDING_TO_LEFT="SLIDING_TO_LEFT";hs.SLIDING_TO_RIGHT="SLIDING_TO_RIGHT";hs.DOUBLE_DOOR_SLIDING="DOUBLE_DOOR_SLIDING";hs.FOLDING_TO_LEFT="FOLDING_TO_LEFT";hs.FOLDING_TO_RIGHT="FOLDING_TO_RIGHT";hs.DOUBLE_DOOR_FOLDING="DOUBLE_DOOR_FOLDING";hs.REVOLVING="REVOLVING";hs.ROLLINGUP="ROLLINGUP";hs.SWING_FIXED_LEFT="SWING_FIXED_LEFT";hs.SWING_FIXED_RIGHT="SWING_FIXED_RIGHT";hs.USERDEFINED="USERDEFINED";hs.NOTDEFINED="NOTDEFINED";var Wp=class{constructor(t){this.value=t}};Wp.BEND="BEND";Wp.CONNECTOR="CONNECTOR";Wp.ENTRY="ENTRY";Wp.EXIT="EXIT";Wp.JUNCTION="JUNCTION";Wp.OBSTRUCTION="OBSTRUCTION";Wp.TRANSITION="TRANSITION";Wp.USERDEFINED="USERDEFINED";Wp.NOTDEFINED="NOTDEFINED";var hA=class{constructor(t){this.value=t}};hA.RIGIDSEGMENT="RIGIDSEGMENT";hA.FLEXIBLESEGMENT="FLEXIBLESEGMENT";hA.USERDEFINED="USERDEFINED";hA.NOTDEFINED="NOTDEFINED";var lI=class{constructor(t){this.value=t}};lI.FLATOVAL="FLATOVAL";lI.RECTANGULAR="RECTANGULAR";lI.ROUND="ROUND";lI.USERDEFINED="USERDEFINED";lI.NOTDEFINED="NOTDEFINED";var Os=class{constructor(t){this.value=t}};Os.DISHWASHER="DISHWASHER";Os.ELECTRICCOOKER="ELECTRICCOOKER";Os.FREESTANDINGELECTRICHEATER="FREESTANDINGELECTRICHEATER";Os.FREESTANDINGFAN="FREESTANDINGFAN";Os.FREESTANDINGWATERHEATER="FREESTANDINGWATERHEATER";Os.FREESTANDINGWATERCOOLER="FREESTANDINGWATERCOOLER";Os.FREEZER="FREEZER";Os.FRIDGE_FREEZER="FRIDGE_FREEZER";Os.HANDDRYER="HANDDRYER";Os.KITCHENMACHINE="KITCHENMACHINE";Os.MICROWAVE="MICROWAVE";Os.PHOTOCOPIER="PHOTOCOPIER";Os.REFRIGERATOR="REFRIGERATOR";Os.TUMBLEDRYER="TUMBLEDRYER";Os.VENDINGMACHINE="VENDINGMACHINE";Os.WASHINGMACHINE="WASHINGMACHINE";Os.USERDEFINED="USERDEFINED";Os.NOTDEFINED="NOTDEFINED";var IT=class{constructor(t){this.value=t}};IT.CONSUMERUNIT="CONSUMERUNIT";IT.DISTRIBUTIONBOARD="DISTRIBUTIONBOARD";IT.MOTORCONTROLCENTRE="MOTORCONTROLCENTRE";IT.SWITCHBOARD="SWITCHBOARD";IT.USERDEFINED="USERDEFINED";IT.NOTDEFINED="NOTDEFINED";var i0=class{constructor(t){this.value=t}};i0.BATTERY="BATTERY";i0.CAPACITORBANK="CAPACITORBANK";i0.HARMONICFILTER="HARMONICFILTER";i0.INDUCTORBANK="INDUCTORBANK";i0.UPS="UPS";i0.USERDEFINED="USERDEFINED";i0.NOTDEFINED="NOTDEFINED";var cI=class{constructor(t){this.value=t}};cI.CHP="CHP";cI.ENGINEGENERATOR="ENGINEGENERATOR";cI.STANDALONE="STANDALONE";cI.USERDEFINED="USERDEFINED";cI.NOTDEFINED="NOTDEFINED";var n0=class{constructor(t){this.value=t}};n0.DC="DC";n0.INDUCTION="INDUCTION";n0.POLYPHASE="POLYPHASE";n0.RELUCTANCESYNCHRONOUS="RELUCTANCESYNCHRONOUS";n0.SYNCHRONOUS="SYNCHRONOUS";n0.USERDEFINED="USERDEFINED";n0.NOTDEFINED="NOTDEFINED";var uI=class{constructor(t){this.value=t}};uI.TIMECLOCK="TIMECLOCK";uI.TIMEDELAY="TIMEDELAY";uI.RELAY="RELAY";uI.USERDEFINED="USERDEFINED";uI.NOTDEFINED="NOTDEFINED";var Js=class{constructor(t){this.value=t}};Js.ACCESSORY_ASSEMBLY="ACCESSORY_ASSEMBLY";Js.ARCH="ARCH";Js.BEAM_GRID="BEAM_GRID";Js.BRACED_FRAME="BRACED_FRAME";Js.GIRDER="GIRDER";Js.REINFORCEMENT_UNIT="REINFORCEMENT_UNIT";Js.RIGID_FRAME="RIGID_FRAME";Js.SLAB_FIELD="SLAB_FIELD";Js.TRUSS="TRUSS";Js.ABUTMENT="ABUTMENT";Js.PIER="PIER";Js.PYLON="PYLON";Js.CROSS_BRACING="CROSS_BRACING";Js.DECK="DECK";Js.USERDEFINED="USERDEFINED";Js.NOTDEFINED="NOTDEFINED";var Hk=class{constructor(t){this.value=t}};Hk.COMPLEX="COMPLEX";Hk.ELEMENT="ELEMENT";Hk.PARTIAL="PARTIAL";var pA=class{constructor(t){this.value=t}};pA.EXTERNALCOMBUSTION="EXTERNALCOMBUSTION";pA.INTERNALCOMBUSTION="INTERNALCOMBUSTION";pA.USERDEFINED="USERDEFINED";pA.NOTDEFINED="NOTDEFINED";var kc=class{constructor(t){this.value=t}};kc.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER="DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER";kc.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER="DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER";kc.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER="DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER";kc.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER="DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER";kc.DIRECTEVAPORATIVEAIRWASHER="DIRECTEVAPORATIVEAIRWASHER";kc.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER="INDIRECTEVAPORATIVEPACKAGEAIRCOOLER";kc.INDIRECTEVAPORATIVEWETCOIL="INDIRECTEVAPORATIVEWETCOIL";kc.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER="INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER";kc.INDIRECTDIRECTCOMBINATION="INDIRECTDIRECTCOMBINATION";kc.USERDEFINED="USERDEFINED";kc.NOTDEFINED="NOTDEFINED";var Nf=class{constructor(t){this.value=t}};Nf.DIRECTEXPANSION="DIRECTEXPANSION";Nf.DIRECTEXPANSIONSHELLANDTUBE="DIRECTEXPANSIONSHELLANDTUBE";Nf.DIRECTEXPANSIONTUBEINTUBE="DIRECTEXPANSIONTUBEINTUBE";Nf.DIRECTEXPANSIONBRAZEDPLATE="DIRECTEXPANSIONBRAZEDPLATE";Nf.FLOODEDSHELLANDTUBE="FLOODEDSHELLANDTUBE";Nf.SHELLANDCOIL="SHELLANDCOIL";Nf.USERDEFINED="USERDEFINED";Nf.NOTDEFINED="NOTDEFINED";var ST=class{constructor(t){this.value=t}};ST.EVENTRULE="EVENTRULE";ST.EVENTMESSAGE="EVENTMESSAGE";ST.EVENTTIME="EVENTTIME";ST.EVENTCOMPLEX="EVENTCOMPLEX";ST.USERDEFINED="USERDEFINED";ST.NOTDEFINED="NOTDEFINED";var hI=class{constructor(t){this.value=t}};hI.STARTEVENT="STARTEVENT";hI.ENDEVENT="ENDEVENT";hI.INTERMEDIATEEVENT="INTERMEDIATEEVENT";hI.USERDEFINED="USERDEFINED";hI.NOTDEFINED="NOTDEFINED";var _T=class{constructor(t){this.value=t}};_T.EXTERNAL="EXTERNAL";_T.EXTERNAL_EARTH="EXTERNAL_EARTH";_T.EXTERNAL_WATER="EXTERNAL_WATER";_T.EXTERNAL_FIRE="EXTERNAL_FIRE";_T.USERDEFINED="USERDEFINED";_T.NOTDEFINED="NOTDEFINED";var qp=class{constructor(t){this.value=t}};qp.CENTRIFUGALFORWARDCURVED="CENTRIFUGALFORWARDCURVED";qp.CENTRIFUGALRADIAL="CENTRIFUGALRADIAL";qp.CENTRIFUGALBACKWARDINCLINEDCURVED="CENTRIFUGALBACKWARDINCLINEDCURVED";qp.CENTRIFUGALAIRFOIL="CENTRIFUGALAIRFOIL";qp.TUBEAXIAL="TUBEAXIAL";qp.VANEAXIAL="VANEAXIAL";qp.PROPELLORAXIAL="PROPELLORAXIAL";qp.USERDEFINED="USERDEFINED";qp.NOTDEFINED="NOTDEFINED";var pI=class{constructor(t){this.value=t}};pI.GLUE="GLUE";pI.MORTAR="MORTAR";pI.WELD="WELD";pI.USERDEFINED="USERDEFINED";pI.NOTDEFINED="NOTDEFINED";var Lf=class{constructor(t){this.value=t}};Lf.AIRPARTICLEFILTER="AIRPARTICLEFILTER";Lf.COMPRESSEDAIRFILTER="COMPRESSEDAIRFILTER";Lf.ODORFILTER="ODORFILTER";Lf.OILFILTER="OILFILTER";Lf.STRAINER="STRAINER";Lf.WATERFILTER="WATERFILTER";Lf.USERDEFINED="USERDEFINED";Lf.NOTDEFINED="NOTDEFINED";var s0=class{constructor(t){this.value=t}};s0.BREECHINGINLET="BREECHINGINLET";s0.FIREHYDRANT="FIREHYDRANT";s0.HOSEREEL="HOSEREEL";s0.SPRINKLER="SPRINKLER";s0.SPRINKLERDEFLECTOR="SPRINKLERDEFLECTOR";s0.USERDEFINED="USERDEFINED";s0.NOTDEFINED="NOTDEFINED";var dA=class{constructor(t){this.value=t}};dA.SOURCE="SOURCE";dA.SINK="SINK";dA.SOURCEANDSINK="SOURCEANDSINK";dA.NOTDEFINED="NOTDEFINED";var eh=class{constructor(t){this.value=t}};eh.PRESSUREGAUGE="PRESSUREGAUGE";eh.THERMOMETER="THERMOMETER";eh.AMMETER="AMMETER";eh.FREQUENCYMETER="FREQUENCYMETER";eh.POWERFACTORMETER="POWERFACTORMETER";eh.PHASEANGLEMETER="PHASEANGLEMETER";eh.VOLTMETER_PEAK="VOLTMETER_PEAK";eh.VOLTMETER_RMS="VOLTMETER_RMS";eh.USERDEFINED="USERDEFINED";eh.NOTDEFINED="NOTDEFINED";var wT=class{constructor(t){this.value=t}};wT.ENERGYMETER="ENERGYMETER";wT.GASMETER="GASMETER";wT.OILMETER="OILMETER";wT.WATERMETER="WATERMETER";wT.USERDEFINED="USERDEFINED";wT.NOTDEFINED="NOTDEFINED";var a0=class{constructor(t){this.value=t}};a0.CAISSON_FOUNDATION="CAISSON_FOUNDATION";a0.FOOTING_BEAM="FOOTING_BEAM";a0.PAD_FOOTING="PAD_FOOTING";a0.PILE_CAP="PILE_CAP";a0.STRIP_FOOTING="STRIP_FOOTING";a0.USERDEFINED="USERDEFINED";a0.NOTDEFINED="NOTDEFINED";var Yp=class{constructor(t){this.value=t}};Yp.CHAIR="CHAIR";Yp.TABLE="TABLE";Yp.DESK="DESK";Yp.BED="BED";Yp.FILECABINET="FILECABINET";Yp.SHELF="SHELF";Yp.SOFA="SOFA";Yp.USERDEFINED="USERDEFINED";Yp.NOTDEFINED="NOTDEFINED";var fA=class{constructor(t){this.value=t}};fA.TERRAIN="TERRAIN";fA.SOIL_BORING_POINT="SOIL_BORING_POINT";fA.USERDEFINED="USERDEFINED";fA.NOTDEFINED="NOTDEFINED";var Xp=class{constructor(t){this.value=t}};Xp.GRAPH_VIEW="GRAPH_VIEW";Xp.SKETCH_VIEW="SKETCH_VIEW";Xp.MODEL_VIEW="MODEL_VIEW";Xp.PLAN_VIEW="PLAN_VIEW";Xp.REFLECTED_PLAN_VIEW="REFLECTED_PLAN_VIEW";Xp.SECTION_VIEW="SECTION_VIEW";Xp.ELEVATION_VIEW="ELEVATION_VIEW";Xp.USERDEFINED="USERDEFINED";Xp.NOTDEFINED="NOTDEFINED";var Fde=class{constructor(t){this.value=t}};Fde.GLOBAL_COORDS="GLOBAL_COORDS";Fde.LOCAL_COORDS="LOCAL_COORDS";var RT=class{constructor(t){this.value=t}};RT.RECTANGULAR="RECTANGULAR";RT.RADIAL="RADIAL";RT.TRIANGULAR="TRIANGULAR";RT.IRREGULAR="IRREGULAR";RT.USERDEFINED="USERDEFINED";RT.NOTDEFINED="NOTDEFINED";var mA=class{constructor(t){this.value=t}};mA.PLATE="PLATE";mA.SHELLANDTUBE="SHELLANDTUBE";mA.USERDEFINED="USERDEFINED";mA.NOTDEFINED="NOTDEFINED";var Aa=class{constructor(t){this.value=t}};Aa.STEAMINJECTION="STEAMINJECTION";Aa.ADIABATICAIRWASHER="ADIABATICAIRWASHER";Aa.ADIABATICPAN="ADIABATICPAN";Aa.ADIABATICWETTEDELEMENT="ADIABATICWETTEDELEMENT";Aa.ADIABATICATOMIZING="ADIABATICATOMIZING";Aa.ADIABATICULTRASONIC="ADIABATICULTRASONIC";Aa.ADIABATICRIGIDMEDIA="ADIABATICRIGIDMEDIA";Aa.ADIABATICCOMPRESSEDAIRNOZZLE="ADIABATICCOMPRESSEDAIRNOZZLE";Aa.ASSISTEDELECTRIC="ASSISTEDELECTRIC";Aa.ASSISTEDNATURALGAS="ASSISTEDNATURALGAS";Aa.ASSISTEDPROPANE="ASSISTEDPROPANE";Aa.ASSISTEDBUTANE="ASSISTEDBUTANE";Aa.ASSISTEDSTEAM="ASSISTEDSTEAM";Aa.USERDEFINED="USERDEFINED";Aa.NOTDEFINED="NOTDEFINED";var MT=class{constructor(t){this.value=t}};MT.CYCLONIC="CYCLONIC";MT.GREASE="GREASE";MT.OIL="OIL";MT.PETROL="PETROL";MT.USERDEFINED="USERDEFINED";MT.NOTDEFINED="NOTDEFINED";var DT=class{constructor(t){this.value=t}};DT.INTERNAL="INTERNAL";DT.EXTERNAL="EXTERNAL";DT.EXTERNAL_EARTH="EXTERNAL_EARTH";DT.EXTERNAL_WATER="EXTERNAL_WATER";DT.EXTERNAL_FIRE="EXTERNAL_FIRE";DT.NOTDEFINED="NOTDEFINED";var dI=class{constructor(t){this.value=t}};dI.ASSETINVENTORY="ASSETINVENTORY";dI.SPACEINVENTORY="SPACEINVENTORY";dI.FURNITUREINVENTORY="FURNITUREINVENTORY";dI.USERDEFINED="USERDEFINED";dI.NOTDEFINED="NOTDEFINED";var gA=class{constructor(t){this.value=t}};gA.DATA="DATA";gA.POWER="POWER";gA.USERDEFINED="USERDEFINED";gA.NOTDEFINED="NOTDEFINED";var vA=class{constructor(t){this.value=t}};vA.UNIFORM_KNOTS="UNIFORM_KNOTS";vA.QUASI_UNIFORM_KNOTS="QUASI_UNIFORM_KNOTS";vA.PIECEWISE_BEZIER_KNOTS="PIECEWISE_BEZIER_KNOTS";vA.UNSPECIFIED="UNSPECIFIED";var is=class{constructor(t){this.value=t}};is.ADMINISTRATION="ADMINISTRATION";is.CARPENTRY="CARPENTRY";is.CLEANING="CLEANING";is.CONCRETE="CONCRETE";is.DRYWALL="DRYWALL";is.ELECTRIC="ELECTRIC";is.FINISHING="FINISHING";is.FLOORING="FLOORING";is.GENERAL="GENERAL";is.HVAC="HVAC";is.LANDSCAPING="LANDSCAPING";is.MASONRY="MASONRY";is.PAINTING="PAINTING";is.PAVING="PAVING";is.PLUMBING="PLUMBING";is.ROOFING="ROOFING";is.SITEGRADING="SITEGRADING";is.STEELWORK="STEELWORK";is.SURVEYING="SURVEYING";is.USERDEFINED="USERDEFINED";is.NOTDEFINED="NOTDEFINED";var Gc=class{constructor(t){this.value=t}};Gc.COMPACTFLUORESCENT="COMPACTFLUORESCENT";Gc.FLUORESCENT="FLUORESCENT";Gc.HALOGEN="HALOGEN";Gc.HIGHPRESSUREMERCURY="HIGHPRESSUREMERCURY";Gc.HIGHPRESSURESODIUM="HIGHPRESSURESODIUM";Gc.LED="LED";Gc.METALHALIDE="METALHALIDE";Gc.OLED="OLED";Gc.TUNGSTENFILAMENT="TUNGSTENFILAMENT";Gc.USERDEFINED="USERDEFINED";Gc.NOTDEFINED="NOTDEFINED";var Uk=class{constructor(t){this.value=t}};Uk.AXIS1="AXIS1";Uk.AXIS2="AXIS2";Uk.AXIS3="AXIS3";var yA=class{constructor(t){this.value=t}};yA.TYPE_A="TYPE_A";yA.TYPE_B="TYPE_B";yA.TYPE_C="TYPE_C";yA.NOTDEFINED="NOTDEFINED";var Vc=class{constructor(t){this.value=t}};Vc.COMPACTFLUORESCENT="COMPACTFLUORESCENT";Vc.FLUORESCENT="FLUORESCENT";Vc.HIGHPRESSUREMERCURY="HIGHPRESSUREMERCURY";Vc.HIGHPRESSURESODIUM="HIGHPRESSURESODIUM";Vc.LIGHTEMITTINGDIODE="LIGHTEMITTINGDIODE";Vc.LOWPRESSURESODIUM="LOWPRESSURESODIUM";Vc.LOWVOLTAGEHALOGEN="LOWVOLTAGEHALOGEN";Vc.MAINVOLTAGEHALOGEN="MAINVOLTAGEHALOGEN";Vc.METALHALIDE="METALHALIDE";Vc.TUNGSTENFILAMENT="TUNGSTENFILAMENT";Vc.NOTDEFINED="NOTDEFINED";var fI=class{constructor(t){this.value=t}};fI.POINTSOURCE="POINTSOURCE";fI.DIRECTIONSOURCE="DIRECTIONSOURCE";fI.SECURITYLIGHTING="SECURITYLIGHTING";fI.USERDEFINED="USERDEFINED";fI.NOTDEFINED="NOTDEFINED";var mI=class{constructor(t){this.value=t}};mI.LOAD_GROUP="LOAD_GROUP";mI.LOAD_CASE="LOAD_CASE";mI.LOAD_COMBINATION="LOAD_COMBINATION";mI.USERDEFINED="USERDEFINED";mI.NOTDEFINED="NOTDEFINED";var gI=class{constructor(t){this.value=t}};gI.LOGICALAND="LOGICALAND";gI.LOGICALOR="LOGICALOR";gI.LOGICALXOR="LOGICALXOR";gI.LOGICALNOTAND="LOGICALNOTAND";gI.LOGICALNOTOR="LOGICALNOTOR";var Jo=class{constructor(t){this.value=t}};Jo.ANCHORBOLT="ANCHORBOLT";Jo.BOLT="BOLT";Jo.DOWEL="DOWEL";Jo.NAIL="NAIL";Jo.NAILPLATE="NAILPLATE";Jo.RIVET="RIVET";Jo.SCREW="SCREW";Jo.SHEARCONNECTOR="SHEARCONNECTOR";Jo.STAPLE="STAPLE";Jo.STUDSHEARCONNECTOR="STUDSHEARCONNECTOR";Jo.COUPLER="COUPLER";Jo.USERDEFINED="USERDEFINED";Jo.NOTDEFINED="NOTDEFINED";var o0=class{constructor(t){this.value=t}};o0.AIRSTATION="AIRSTATION";o0.FEEDAIRUNIT="FEEDAIRUNIT";o0.OXYGENGENERATOR="OXYGENGENERATOR";o0.OXYGENPLANT="OXYGENPLANT";o0.VACUUMSTATION="VACUUMSTATION";o0.USERDEFINED="USERDEFINED";o0.NOTDEFINED="NOTDEFINED";var xs=class{constructor(t){this.value=t}};xs.BRACE="BRACE";xs.CHORD="CHORD";xs.COLLAR="COLLAR";xs.MEMBER="MEMBER";xs.MULLION="MULLION";xs.PLATE="PLATE";xs.POST="POST";xs.PURLIN="PURLIN";xs.RAFTER="RAFTER";xs.STRINGER="STRINGER";xs.STRUT="STRUT";xs.STUD="STUD";xs.STIFFENING_RIB="STIFFENING_RIB";xs.ARCH_SEGMENT="ARCH_SEGMENT";xs.SUSPENSION_CABLE="SUSPENSION_CABLE";xs.SUSPENDER="SUSPENDER";xs.STAY_CABLE="STAY_CABLE";xs.USERDEFINED="USERDEFINED";xs.NOTDEFINED="NOTDEFINED";var vI=class{constructor(t){this.value=t}};vI.BELTDRIVE="BELTDRIVE";vI.COUPLING="COUPLING";vI.DIRECTDRIVE="DIRECTDRIVE";vI.USERDEFINED="USERDEFINED";vI.NOTDEFINED="NOTDEFINED";var U3t=class{constructor(t){this.value=t}};U3t.NULL="NULL";var Ff=class{constructor(t){this.value=t}};Ff.PRODUCT="PRODUCT";Ff.PROCESS="PROCESS";Ff.CONTROL="CONTROL";Ff.RESOURCE="RESOURCE";Ff.ACTOR="ACTOR";Ff.GROUP="GROUP";Ff.PROJECT="PROJECT";Ff.NOTDEFINED="NOTDEFINED";var Qo=class{constructor(t){this.value=t}};Qo.CODECOMPLIANCE="CODECOMPLIANCE";Qo.CODEWAIVER="CODEWAIVER";Qo.DESIGNINTENT="DESIGNINTENT";Qo.EXTERNAL="EXTERNAL";Qo.HEALTHANDSAFETY="HEALTHANDSAFETY";Qo.MERGECONFLICT="MERGECONFLICT";Qo.MODELVIEW="MODELVIEW";Qo.PARAMETER="PARAMETER";Qo.REQUIREMENT="REQUIREMENT";Qo.SPECIFICATION="SPECIFICATION";Qo.TRIGGERCONDITION="TRIGGERCONDITION";Qo.USERDEFINED="USERDEFINED";Qo.NOTDEFINED="NOTDEFINED";var $p=class{constructor(t){this.value=t}};$p.ASSIGNEE="ASSIGNEE";$p.ASSIGNOR="ASSIGNOR";$p.LESSEE="LESSEE";$p.LESSOR="LESSOR";$p.LETTINGAGENT="LETTINGAGENT";$p.OWNER="OWNER";$p.TENANT="TENANT";$p.USERDEFINED="USERDEFINED";$p.NOTDEFINED="NOTDEFINED";var TA=class{constructor(t){this.value=t}};TA.OPENING="OPENING";TA.RECESS="RECESS";TA.USERDEFINED="USERDEFINED";TA.NOTDEFINED="NOTDEFINED";var l0=class{constructor(t){this.value=t}};l0.AUDIOVISUALOUTLET="AUDIOVISUALOUTLET";l0.COMMUNICATIONSOUTLET="COMMUNICATIONSOUTLET";l0.POWEROUTLET="POWEROUTLET";l0.DATAOUTLET="DATAOUTLET";l0.TELEPHONEOUTLET="TELEPHONEOUTLET";l0.USERDEFINED="USERDEFINED";l0.NOTDEFINED="NOTDEFINED";var Hde=class{constructor(t){this.value=t}};Hde.USERDEFINED="USERDEFINED";Hde.NOTDEFINED="NOTDEFINED";var yI=class{constructor(t){this.value=t}};yI.GRILL="GRILL";yI.LOUVER="LOUVER";yI.SCREEN="SCREEN";yI.USERDEFINED="USERDEFINED";yI.NOTDEFINED="NOTDEFINED";var TI=class{constructor(t){this.value=t}};TI.ACCESS="ACCESS";TI.BUILDING="BUILDING";TI.WORK="WORK";TI.USERDEFINED="USERDEFINED";TI.NOTDEFINED="NOTDEFINED";var Bk=class{constructor(t){this.value=t}};Bk.PHYSICAL="PHYSICAL";Bk.VIRTUAL="VIRTUAL";Bk.NOTDEFINED="NOTDEFINED";var CT=class{constructor(t){this.value=t}};CT.CAST_IN_PLACE="CAST_IN_PLACE";CT.COMPOSITE="COMPOSITE";CT.PRECAST_CONCRETE="PRECAST_CONCRETE";CT.PREFAB_STEEL="PREFAB_STEEL";CT.USERDEFINED="USERDEFINED";CT.NOTDEFINED="NOTDEFINED";var Hf=class{constructor(t){this.value=t}};Hf.BORED="BORED";Hf.DRIVEN="DRIVEN";Hf.JETGROUTING="JETGROUTING";Hf.COHESION="COHESION";Hf.FRICTION="FRICTION";Hf.SUPPORT="SUPPORT";Hf.USERDEFINED="USERDEFINED";Hf.NOTDEFINED="NOTDEFINED";var Zp=class{constructor(t){this.value=t}};Zp.BEND="BEND";Zp.CONNECTOR="CONNECTOR";Zp.ENTRY="ENTRY";Zp.EXIT="EXIT";Zp.JUNCTION="JUNCTION";Zp.OBSTRUCTION="OBSTRUCTION";Zp.TRANSITION="TRANSITION";Zp.USERDEFINED="USERDEFINED";Zp.NOTDEFINED="NOTDEFINED";var c0=class{constructor(t){this.value=t}};c0.CULVERT="CULVERT";c0.FLEXIBLESEGMENT="FLEXIBLESEGMENT";c0.RIGIDSEGMENT="RIGIDSEGMENT";c0.GUTTER="GUTTER";c0.SPOOL="SPOOL";c0.USERDEFINED="USERDEFINED";c0.NOTDEFINED="NOTDEFINED";var zc=class{constructor(t){this.value=t}};zc.CURTAIN_PANEL="CURTAIN_PANEL";zc.SHEET="SHEET";zc.FLANGE_PLATE="FLANGE_PLATE";zc.WEB_PLATE="WEB_PLATE";zc.STIFFENER_PLATE="STIFFENER_PLATE";zc.GUSSET_PLATE="GUSSET_PLATE";zc.COVER_PLATE="COVER_PLATE";zc.SPLICE_PLATE="SPLICE_PLATE";zc.BASE_PLATE="BASE_PLATE";zc.USERDEFINED="USERDEFINED";zc.NOTDEFINED="NOTDEFINED";var kk=class{constructor(t){this.value=t}};kk.CURVE3D="CURVE3D";kk.PCURVE_S1="PCURVE_S1";kk.PCURVE_S2="PCURVE_S2";var Kp=class{constructor(t){this.value=t}};Kp.ADVICE_CAUTION="ADVICE_CAUTION";Kp.ADVICE_NOTE="ADVICE_NOTE";Kp.ADVICE_WARNING="ADVICE_WARNING";Kp.CALIBRATION="CALIBRATION";Kp.DIAGNOSTIC="DIAGNOSTIC";Kp.SHUTDOWN="SHUTDOWN";Kp.STARTUP="STARTUP";Kp.USERDEFINED="USERDEFINED";Kp.NOTDEFINED="NOTDEFINED";var Ude=class{constructor(t){this.value=t}};Ude.CURVE="CURVE";Ude.AREA="AREA";var u0=class{constructor(t){this.value=t}};u0.CHANGEORDER="CHANGEORDER";u0.MAINTENANCEWORKORDER="MAINTENANCEWORKORDER";u0.MOVEORDER="MOVEORDER";u0.PURCHASEORDER="PURCHASEORDER";u0.WORKORDER="WORKORDER";u0.USERDEFINED="USERDEFINED";u0.NOTDEFINED="NOTDEFINED";var Bde=class{constructor(t){this.value=t}};Bde.PROJECTED_LENGTH="PROJECTED_LENGTH";Bde.TRUE_LENGTH="TRUE_LENGTH";var EA=class{constructor(t){this.value=t}};EA.BLISTER="BLISTER";EA.DEVIATOR="DEVIATOR";EA.USERDEFINED="USERDEFINED";EA.NOTDEFINED="NOTDEFINED";var Uf=class{constructor(t){this.value=t}};Uf.PSET_TYPEDRIVENONLY="PSET_TYPEDRIVENONLY";Uf.PSET_TYPEDRIVENOVERRIDE="PSET_TYPEDRIVENOVERRIDE";Uf.PSET_OCCURRENCEDRIVEN="PSET_OCCURRENCEDRIVEN";Uf.PSET_PERFORMANCEDRIVEN="PSET_PERFORMANCEDRIVEN";Uf.QTO_TYPEDRIVENONLY="QTO_TYPEDRIVENONLY";Uf.QTO_TYPEDRIVENOVERRIDE="QTO_TYPEDRIVENOVERRIDE";Uf.QTO_OCCURRENCEDRIVEN="QTO_OCCURRENCEDRIVEN";Uf.NOTDEFINED="NOTDEFINED";var AT=class{constructor(t){this.value=t}};AT.ELECTRONIC="ELECTRONIC";AT.ELECTROMAGNETIC="ELECTROMAGNETIC";AT.RESIDUALCURRENT="RESIDUALCURRENT";AT.THERMAL="THERMAL";AT.USERDEFINED="USERDEFINED";AT.NOTDEFINED="NOTDEFINED";var Jp=class{constructor(t){this.value=t}};Jp.CIRCUITBREAKER="CIRCUITBREAKER";Jp.EARTHLEAKAGECIRCUITBREAKER="EARTHLEAKAGECIRCUITBREAKER";Jp.EARTHINGSWITCH="EARTHINGSWITCH";Jp.FUSEDISCONNECTOR="FUSEDISCONNECTOR";Jp.RESIDUALCURRENTCIRCUITBREAKER="RESIDUALCURRENTCIRCUITBREAKER";Jp.RESIDUALCURRENTSWITCH="RESIDUALCURRENTSWITCH";Jp.VARISTOR="VARISTOR";Jp.USERDEFINED="USERDEFINED";Jp.NOTDEFINED="NOTDEFINED";var Qp=class{constructor(t){this.value=t}};Qp.CIRCULATOR="CIRCULATOR";Qp.ENDSUCTION="ENDSUCTION";Qp.SPLITCASE="SPLITCASE";Qp.SUBMERSIBLEPUMP="SUBMERSIBLEPUMP";Qp.SUMPPUMP="SUMPPUMP";Qp.VERTICALINLINE="VERTICALINLINE";Qp.VERTICALTURBINE="VERTICALTURBINE";Qp.USERDEFINED="USERDEFINED";Qp.NOTDEFINED="NOTDEFINED";var EI=class{constructor(t){this.value=t}};EI.HANDRAIL="HANDRAIL";EI.GUARDRAIL="GUARDRAIL";EI.BALUSTRADE="BALUSTRADE";EI.USERDEFINED="USERDEFINED";EI.NOTDEFINED="NOTDEFINED";var bA=class{constructor(t){this.value=t}};bA.STRAIGHT="STRAIGHT";bA.SPIRAL="SPIRAL";bA.USERDEFINED="USERDEFINED";bA.NOTDEFINED="NOTDEFINED";var Bf=class{constructor(t){this.value=t}};Bf.STRAIGHT_RUN_RAMP="STRAIGHT_RUN_RAMP";Bf.TWO_STRAIGHT_RUN_RAMP="TWO_STRAIGHT_RUN_RAMP";Bf.QUARTER_TURN_RAMP="QUARTER_TURN_RAMP";Bf.TWO_QUARTER_TURN_RAMP="TWO_QUARTER_TURN_RAMP";Bf.HALF_TURN_RAMP="HALF_TURN_RAMP";Bf.SPIRAL_RAMP="SPIRAL_RAMP";Bf.USERDEFINED="USERDEFINED";Bf.NOTDEFINED="NOTDEFINED";var kf=class{constructor(t){this.value=t}};kf.DAILY="DAILY";kf.WEEKLY="WEEKLY";kf.MONTHLY_BY_DAY_OF_MONTH="MONTHLY_BY_DAY_OF_MONTH";kf.MONTHLY_BY_POSITION="MONTHLY_BY_POSITION";kf.BY_DAY_COUNT="BY_DAY_COUNT";kf.BY_WEEKDAY_COUNT="BY_WEEKDAY_COUNT";kf.YEARLY_BY_DAY_OF_MONTH="YEARLY_BY_DAY_OF_MONTH";kf.YEARLY_BY_POSITION="YEARLY_BY_POSITION";var bI=class{constructor(t){this.value=t}};bI.KILOPOINT="KILOPOINT";bI.MILEPOINT="MILEPOINT";bI.STATION="STATION";bI.USERDEFINED="USERDEFINED";bI.NOTDEFINED="NOTDEFINED";var th=class{constructor(t){this.value=t}};th.BLINN="BLINN";th.FLAT="FLAT";th.GLASS="GLASS";th.MATT="MATT";th.METAL="METAL";th.MIRROR="MIRROR";th.PHONG="PHONG";th.PLASTIC="PLASTIC";th.STRAUSS="STRAUSS";th.NOTDEFINED="NOTDEFINED";var rh=class{constructor(t){this.value=t}};rh.MAIN="MAIN";rh.SHEAR="SHEAR";rh.LIGATURE="LIGATURE";rh.STUD="STUD";rh.PUNCHING="PUNCHING";rh.EDGE="EDGE";rh.RING="RING";rh.ANCHORING="ANCHORING";rh.USERDEFINED="USERDEFINED";rh.NOTDEFINED="NOTDEFINED";var kde=class{constructor(t){this.value=t}};kde.PLAIN="PLAIN";kde.TEXTURED="TEXTURED";var jc=class{constructor(t){this.value=t}};jc.ANCHORING="ANCHORING";jc.EDGE="EDGE";jc.LIGATURE="LIGATURE";jc.MAIN="MAIN";jc.PUNCHING="PUNCHING";jc.RING="RING";jc.SHEAR="SHEAR";jc.STUD="STUD";jc.SPACEBAR="SPACEBAR";jc.USERDEFINED="USERDEFINED";jc.NOTDEFINED="NOTDEFINED";var Gde=class{constructor(t){this.value=t}};Gde.USERDEFINED="USERDEFINED";Gde.NOTDEFINED="NOTDEFINED";var Nn=class{constructor(t){this.value=t}};Nn.SUPPLIER="SUPPLIER";Nn.MANUFACTURER="MANUFACTURER";Nn.CONTRACTOR="CONTRACTOR";Nn.SUBCONTRACTOR="SUBCONTRACTOR";Nn.ARCHITECT="ARCHITECT";Nn.STRUCTURALENGINEER="STRUCTURALENGINEER";Nn.COSTENGINEER="COSTENGINEER";Nn.CLIENT="CLIENT";Nn.BUILDINGOWNER="BUILDINGOWNER";Nn.BUILDINGOPERATOR="BUILDINGOPERATOR";Nn.MECHANICALENGINEER="MECHANICALENGINEER";Nn.ELECTRICALENGINEER="ELECTRICALENGINEER";Nn.PROJECTMANAGER="PROJECTMANAGER";Nn.FACILITIESMANAGER="FACILITIESMANAGER";Nn.CIVILENGINEER="CIVILENGINEER";Nn.COMMISSIONINGENGINEER="COMMISSIONINGENGINEER";Nn.ENGINEER="ENGINEER";Nn.OWNER="OWNER";Nn.CONSULTANT="CONSULTANT";Nn.CONSTRUCTIONMANAGER="CONSTRUCTIONMANAGER";Nn.FIELDCONSTRUCTIONMANAGER="FIELDCONSTRUCTIONMANAGER";Nn.RESELLER="RESELLER";Nn.USERDEFINED="USERDEFINED";var Oa=class{constructor(t){this.value=t}};Oa.FLAT_ROOF="FLAT_ROOF";Oa.SHED_ROOF="SHED_ROOF";Oa.GABLE_ROOF="GABLE_ROOF";Oa.HIP_ROOF="HIP_ROOF";Oa.HIPPED_GABLE_ROOF="HIPPED_GABLE_ROOF";Oa.GAMBREL_ROOF="GAMBREL_ROOF";Oa.MANSARD_ROOF="MANSARD_ROOF";Oa.BARREL_ROOF="BARREL_ROOF";Oa.RAINBOW_ROOF="RAINBOW_ROOF";Oa.BUTTERFLY_ROOF="BUTTERFLY_ROOF";Oa.PAVILION_ROOF="PAVILION_ROOF";Oa.DOME_ROOF="DOME_ROOF";Oa.FREEFORM="FREEFORM";Oa.USERDEFINED="USERDEFINED";Oa.NOTDEFINED="NOTDEFINED";var Qs=class{constructor(t){this.value=t}};Qs.EXA="EXA";Qs.PETA="PETA";Qs.TERA="TERA";Qs.GIGA="GIGA";Qs.MEGA="MEGA";Qs.KILO="KILO";Qs.HECTO="HECTO";Qs.DECA="DECA";Qs.DECI="DECI";Qs.CENTI="CENTI";Qs.MILLI="MILLI";Qs.MICRO="MICRO";Qs.NANO="NANO";Qs.PICO="PICO";Qs.FEMTO="FEMTO";Qs.ATTO="ATTO";var Wi=class{constructor(t){this.value=t}};Wi.AMPERE="AMPERE";Wi.BECQUEREL="BECQUEREL";Wi.CANDELA="CANDELA";Wi.COULOMB="COULOMB";Wi.CUBIC_METRE="CUBIC_METRE";Wi.DEGREE_CELSIUS="DEGREE_CELSIUS";Wi.FARAD="FARAD";Wi.GRAM="GRAM";Wi.GRAY="GRAY";Wi.HENRY="HENRY";Wi.HERTZ="HERTZ";Wi.JOULE="JOULE";Wi.KELVIN="KELVIN";Wi.LUMEN="LUMEN";Wi.LUX="LUX";Wi.METRE="METRE";Wi.MOLE="MOLE";Wi.NEWTON="NEWTON";Wi.OHM="OHM";Wi.PASCAL="PASCAL";Wi.RADIAN="RADIAN";Wi.SECOND="SECOND";Wi.SIEMENS="SIEMENS";Wi.SIEVERT="SIEVERT";Wi.SQUARE_METRE="SQUARE_METRE";Wi.STERADIAN="STERADIAN";Wi.TESLA="TESLA";Wi.VOLT="VOLT";Wi.WATT="WATT";Wi.WEBER="WEBER";var Gl=class{constructor(t){this.value=t}};Gl.BATH="BATH";Gl.BIDET="BIDET";Gl.CISTERN="CISTERN";Gl.SHOWER="SHOWER";Gl.SINK="SINK";Gl.SANITARYFOUNTAIN="SANITARYFOUNTAIN";Gl.TOILETPAN="TOILETPAN";Gl.URINAL="URINAL";Gl.WASHHANDBASIN="WASHHANDBASIN";Gl.WCSEAT="WCSEAT";Gl.USERDEFINED="USERDEFINED";Gl.NOTDEFINED="NOTDEFINED";var Vde=class{constructor(t){this.value=t}};Vde.UNIFORM="UNIFORM";Vde.TAPERED="TAPERED";var yn=class{constructor(t){this.value=t}};yn.COSENSOR="COSENSOR";yn.CO2SENSOR="CO2SENSOR";yn.CONDUCTANCESENSOR="CONDUCTANCESENSOR";yn.CONTACTSENSOR="CONTACTSENSOR";yn.FIRESENSOR="FIRESENSOR";yn.FLOWSENSOR="FLOWSENSOR";yn.FROSTSENSOR="FROSTSENSOR";yn.GASSENSOR="GASSENSOR";yn.HEATSENSOR="HEATSENSOR";yn.HUMIDITYSENSOR="HUMIDITYSENSOR";yn.IDENTIFIERSENSOR="IDENTIFIERSENSOR";yn.IONCONCENTRATIONSENSOR="IONCONCENTRATIONSENSOR";yn.LEVELSENSOR="LEVELSENSOR";yn.LIGHTSENSOR="LIGHTSENSOR";yn.MOISTURESENSOR="MOISTURESENSOR";yn.MOVEMENTSENSOR="MOVEMENTSENSOR";yn.PHSENSOR="PHSENSOR";yn.PRESSURESENSOR="PRESSURESENSOR";yn.RADIATIONSENSOR="RADIATIONSENSOR";yn.RADIOACTIVITYSENSOR="RADIOACTIVITYSENSOR";yn.SMOKESENSOR="SMOKESENSOR";yn.SOUNDSENSOR="SOUNDSENSOR";yn.TEMPERATURESENSOR="TEMPERATURESENSOR";yn.WINDSENSOR="WINDSENSOR";yn.USERDEFINED="USERDEFINED";yn.NOTDEFINED="NOTDEFINED";var OT=class{constructor(t){this.value=t}};OT.START_START="START_START";OT.START_FINISH="START_FINISH";OT.FINISH_START="FINISH_START";OT.FINISH_FINISH="FINISH_FINISH";OT.USERDEFINED="USERDEFINED";OT.NOTDEFINED="NOTDEFINED";var xI=class{constructor(t){this.value=t}};xI.JALOUSIE="JALOUSIE";xI.SHUTTER="SHUTTER";xI.AWNING="AWNING";xI.USERDEFINED="USERDEFINED";xI.NOTDEFINED="NOTDEFINED";var Vl=class{constructor(t){this.value=t}};Vl.P_SINGLEVALUE="P_SINGLEVALUE";Vl.P_ENUMERATEDVALUE="P_ENUMERATEDVALUE";Vl.P_BOUNDEDVALUE="P_BOUNDEDVALUE";Vl.P_LISTVALUE="P_LISTVALUE";Vl.P_TABLEVALUE="P_TABLEVALUE";Vl.P_REFERENCEVALUE="P_REFERENCEVALUE";Vl.Q_LENGTH="Q_LENGTH";Vl.Q_AREA="Q_AREA";Vl.Q_VOLUME="Q_VOLUME";Vl.Q_COUNT="Q_COUNT";Vl.Q_WEIGHT="Q_WEIGHT";Vl.Q_TIME="Q_TIME";var ih=class{constructor(t){this.value=t}};ih.FLOOR="FLOOR";ih.ROOF="ROOF";ih.LANDING="LANDING";ih.BASESLAB="BASESLAB";ih.APPROACH_SLAB="APPROACH_SLAB";ih.PAVING="PAVING";ih.WEARING="WEARING";ih.SIDEWALK="SIDEWALK";ih.USERDEFINED="USERDEFINED";ih.NOTDEFINED="NOTDEFINED";var xA=class{constructor(t){this.value=t}};xA.SOLARCOLLECTOR="SOLARCOLLECTOR";xA.SOLARPANEL="SOLARPANEL";xA.USERDEFINED="USERDEFINED";xA.NOTDEFINED="NOTDEFINED";var IA=class{constructor(t){this.value=t}};IA.CONVECTOR="CONVECTOR";IA.RADIATOR="RADIATOR";IA.USERDEFINED="USERDEFINED";IA.NOTDEFINED="NOTDEFINED";var h0=class{constructor(t){this.value=t}};h0.SPACE="SPACE";h0.PARKING="PARKING";h0.GFA="GFA";h0.INTERNAL="INTERNAL";h0.EXTERNAL="EXTERNAL";h0.USERDEFINED="USERDEFINED";h0.NOTDEFINED="NOTDEFINED";var nh=class{constructor(t){this.value=t}};nh.CONSTRUCTION="CONSTRUCTION";nh.FIRESAFETY="FIRESAFETY";nh.LIGHTING="LIGHTING";nh.OCCUPANCY="OCCUPANCY";nh.SECURITY="SECURITY";nh.THERMAL="THERMAL";nh.TRANSPORT="TRANSPORT";nh.VENTILATION="VENTILATION";nh.USERDEFINED="USERDEFINED";nh.NOTDEFINED="NOTDEFINED";var II=class{constructor(t){this.value=t}};II.BIRDCAGE="BIRDCAGE";II.COWL="COWL";II.RAINWATERHOPPER="RAINWATERHOPPER";II.USERDEFINED="USERDEFINED";II.NOTDEFINED="NOTDEFINED";var p0=class{constructor(t){this.value=t}};p0.STRAIGHT="STRAIGHT";p0.WINDER="WINDER";p0.SPIRAL="SPIRAL";p0.CURVED="CURVED";p0.FREEFORM="FREEFORM";p0.USERDEFINED="USERDEFINED";p0.NOTDEFINED="NOTDEFINED";var ea=class{constructor(t){this.value=t}};ea.STRAIGHT_RUN_STAIR="STRAIGHT_RUN_STAIR";ea.TWO_STRAIGHT_RUN_STAIR="TWO_STRAIGHT_RUN_STAIR";ea.QUARTER_WINDING_STAIR="QUARTER_WINDING_STAIR";ea.QUARTER_TURN_STAIR="QUARTER_TURN_STAIR";ea.HALF_WINDING_STAIR="HALF_WINDING_STAIR";ea.HALF_TURN_STAIR="HALF_TURN_STAIR";ea.TWO_QUARTER_WINDING_STAIR="TWO_QUARTER_WINDING_STAIR";ea.TWO_QUARTER_TURN_STAIR="TWO_QUARTER_TURN_STAIR";ea.THREE_QUARTER_WINDING_STAIR="THREE_QUARTER_WINDING_STAIR";ea.THREE_QUARTER_TURN_STAIR="THREE_QUARTER_TURN_STAIR";ea.SPIRAL_STAIR="SPIRAL_STAIR";ea.DOUBLE_RETURN_STAIR="DOUBLE_RETURN_STAIR";ea.CURVED_RUN_STAIR="CURVED_RUN_STAIR";ea.TWO_CURVED_RUN_STAIR="TWO_CURVED_RUN_STAIR";ea.USERDEFINED="USERDEFINED";ea.NOTDEFINED="NOTDEFINED";var SI=class{constructor(t){this.value=t}};SI.READWRITE="READWRITE";SI.READONLY="READONLY";SI.LOCKED="LOCKED";SI.READWRITELOCKED="READWRITELOCKED";SI.READONLYLOCKED="READONLYLOCKED";var ed=class{constructor(t){this.value=t}};ed.CONST="CONST";ed.LINEAR="LINEAR";ed.POLYGONAL="POLYGONAL";ed.EQUIDISTANT="EQUIDISTANT";ed.SINUS="SINUS";ed.PARABOLA="PARABOLA";ed.DISCRETE="DISCRETE";ed.USERDEFINED="USERDEFINED";ed.NOTDEFINED="NOTDEFINED";var d0=class{constructor(t){this.value=t}};d0.RIGID_JOINED_MEMBER="RIGID_JOINED_MEMBER";d0.PIN_JOINED_MEMBER="PIN_JOINED_MEMBER";d0.CABLE="CABLE";d0.TENSION_MEMBER="TENSION_MEMBER";d0.COMPRESSION_MEMBER="COMPRESSION_MEMBER";d0.USERDEFINED="USERDEFINED";d0.NOTDEFINED="NOTDEFINED";var PT=class{constructor(t){this.value=t}};PT.CONST="CONST";PT.BILINEAR="BILINEAR";PT.DISCRETE="DISCRETE";PT.ISOCONTOUR="ISOCONTOUR";PT.USERDEFINED="USERDEFINED";PT.NOTDEFINED="NOTDEFINED";var _I=class{constructor(t){this.value=t}};_I.BENDING_ELEMENT="BENDING_ELEMENT";_I.MEMBRANE_ELEMENT="MEMBRANE_ELEMENT";_I.SHELL="SHELL";_I.USERDEFINED="USERDEFINED";_I.NOTDEFINED="NOTDEFINED";var SA=class{constructor(t){this.value=t}};SA.PURCHASE="PURCHASE";SA.WORK="WORK";SA.USERDEFINED="USERDEFINED";SA.NOTDEFINED="NOTDEFINED";var NT=class{constructor(t){this.value=t}};NT.MARK="MARK";NT.TAG="TAG";NT.TREATMENT="TREATMENT";NT.DEFECT="DEFECT";NT.USERDEFINED="USERDEFINED";NT.NOTDEFINED="NOTDEFINED";var Gk=class{constructor(t){this.value=t}};Gk.POSITIVE="POSITIVE";Gk.NEGATIVE="NEGATIVE";Gk.BOTH="BOTH";var Wc=class{constructor(t){this.value=t}};Wc.CONTACTOR="CONTACTOR";Wc.DIMMERSWITCH="DIMMERSWITCH";Wc.EMERGENCYSTOP="EMERGENCYSTOP";Wc.KEYPAD="KEYPAD";Wc.MOMENTARYSWITCH="MOMENTARYSWITCH";Wc.SELECTORSWITCH="SELECTORSWITCH";Wc.STARTER="STARTER";Wc.SWITCHDISCONNECTOR="SWITCHDISCONNECTOR";Wc.TOGGLESWITCH="TOGGLESWITCH";Wc.USERDEFINED="USERDEFINED";Wc.NOTDEFINED="NOTDEFINED";var _A=class{constructor(t){this.value=t}};_A.PANEL="PANEL";_A.WORKSURFACE="WORKSURFACE";_A.USERDEFINED="USERDEFINED";_A.NOTDEFINED="NOTDEFINED";var td=class{constructor(t){this.value=t}};td.BASIN="BASIN";td.BREAKPRESSURE="BREAKPRESSURE";td.EXPANSION="EXPANSION";td.FEEDANDEXPANSION="FEEDANDEXPANSION";td.PRESSUREVESSEL="PRESSUREVESSEL";td.STORAGE="STORAGE";td.VESSEL="VESSEL";td.USERDEFINED="USERDEFINED";td.NOTDEFINED="NOTDEFINED";var Vk=class{constructor(t){this.value=t}};Vk.ELAPSEDTIME="ELAPSEDTIME";Vk.WORKTIME="WORKTIME";Vk.NOTDEFINED="NOTDEFINED";var yo=class{constructor(t){this.value=t}};yo.ATTENDANCE="ATTENDANCE";yo.CONSTRUCTION="CONSTRUCTION";yo.DEMOLITION="DEMOLITION";yo.DISMANTLE="DISMANTLE";yo.DISPOSAL="DISPOSAL";yo.INSTALLATION="INSTALLATION";yo.LOGISTIC="LOGISTIC";yo.MAINTENANCE="MAINTENANCE";yo.MOVE="MOVE";yo.OPERATION="OPERATION";yo.REMOVAL="REMOVAL";yo.RENOVATION="RENOVATION";yo.USERDEFINED="USERDEFINED";yo.NOTDEFINED="NOTDEFINED";var wI=class{constructor(t){this.value=t}};wI.COUPLER="COUPLER";wI.FIXED_END="FIXED_END";wI.TENSIONING_END="TENSIONING_END";wI.USERDEFINED="USERDEFINED";wI.NOTDEFINED="NOTDEFINED";var f0=class{constructor(t){this.value=t}};f0.DUCT="DUCT";f0.COUPLER="COUPLER";f0.GROUTING_DUCT="GROUTING_DUCT";f0.TRUMPET="TRUMPET";f0.DIABOLO="DIABOLO";f0.USERDEFINED="USERDEFINED";f0.NOTDEFINED="NOTDEFINED";var LT=class{constructor(t){this.value=t}};LT.BAR="BAR";LT.COATED="COATED";LT.STRAND="STRAND";LT.WIRE="WIRE";LT.USERDEFINED="USERDEFINED";LT.NOTDEFINED="NOTDEFINED";var wA=class{constructor(t){this.value=t}};wA.LEFT="LEFT";wA.RIGHT="RIGHT";wA.UP="UP";wA.DOWN="DOWN";var m0=class{constructor(t){this.value=t}};m0.CONTINUOUS="CONTINUOUS";m0.DISCRETE="DISCRETE";m0.DISCRETEBINARY="DISCRETEBINARY";m0.PIECEWISEBINARY="PIECEWISEBINARY";m0.PIECEWISECONSTANT="PIECEWISECONSTANT";m0.PIECEWISECONTINUOUS="PIECEWISECONTINUOUS";m0.NOTDEFINED="NOTDEFINED";var g0=class{constructor(t){this.value=t}};g0.CURRENT="CURRENT";g0.FREQUENCY="FREQUENCY";g0.INVERTER="INVERTER";g0.RECTIFIER="RECTIFIER";g0.VOLTAGE="VOLTAGE";g0.USERDEFINED="USERDEFINED";g0.NOTDEFINED="NOTDEFINED";var RA=class{constructor(t){this.value=t}};RA.DISCONTINUOUS="DISCONTINUOUS";RA.CONTINUOUS="CONTINUOUS";RA.CONTSAMEGRADIENT="CONTSAMEGRADIENT";RA.CONTSAMEGRADIENTSAMECURVATURE="CONTSAMEGRADIENTSAMECURVATURE";var FT=class{constructor(t){this.value=t}};FT.BIQUADRATICPARABOLA="BIQUADRATICPARABOLA";FT.BLOSSCURVE="BLOSSCURVE";FT.CLOTHOIDCURVE="CLOTHOIDCURVE";FT.COSINECURVE="COSINECURVE";FT.CUBICPARABOLA="CUBICPARABOLA";FT.SINECURVE="SINECURVE";var v0=class{constructor(t){this.value=t}};v0.ELEVATOR="ELEVATOR";v0.ESCALATOR="ESCALATOR";v0.MOVINGWALKWAY="MOVINGWALKWAY";v0.CRANEWAY="CRANEWAY";v0.LIFTINGGEAR="LIFTINGGEAR";v0.USERDEFINED="USERDEFINED";v0.NOTDEFINED="NOTDEFINED";var zk=class{constructor(t){this.value=t}};zk.CARTESIAN="CARTESIAN";zk.PARAMETER="PARAMETER";zk.UNSPECIFIED="UNSPECIFIED";var jk=class{constructor(t){this.value=t}};jk.FINNED="FINNED";jk.USERDEFINED="USERDEFINED";jk.NOTDEFINED="NOTDEFINED";var qi=class{constructor(t){this.value=t}};qi.ABSORBEDDOSEUNIT="ABSORBEDDOSEUNIT";qi.AMOUNTOFSUBSTANCEUNIT="AMOUNTOFSUBSTANCEUNIT";qi.AREAUNIT="AREAUNIT";qi.DOSEEQUIVALENTUNIT="DOSEEQUIVALENTUNIT";qi.ELECTRICCAPACITANCEUNIT="ELECTRICCAPACITANCEUNIT";qi.ELECTRICCHARGEUNIT="ELECTRICCHARGEUNIT";qi.ELECTRICCONDUCTANCEUNIT="ELECTRICCONDUCTANCEUNIT";qi.ELECTRICCURRENTUNIT="ELECTRICCURRENTUNIT";qi.ELECTRICRESISTANCEUNIT="ELECTRICRESISTANCEUNIT";qi.ELECTRICVOLTAGEUNIT="ELECTRICVOLTAGEUNIT";qi.ENERGYUNIT="ENERGYUNIT";qi.FORCEUNIT="FORCEUNIT";qi.FREQUENCYUNIT="FREQUENCYUNIT";qi.ILLUMINANCEUNIT="ILLUMINANCEUNIT";qi.INDUCTANCEUNIT="INDUCTANCEUNIT";qi.LENGTHUNIT="LENGTHUNIT";qi.LUMINOUSFLUXUNIT="LUMINOUSFLUXUNIT";qi.LUMINOUSINTENSITYUNIT="LUMINOUSINTENSITYUNIT";qi.MAGNETICFLUXDENSITYUNIT="MAGNETICFLUXDENSITYUNIT";qi.MAGNETICFLUXUNIT="MAGNETICFLUXUNIT";qi.MASSUNIT="MASSUNIT";qi.PLANEANGLEUNIT="PLANEANGLEUNIT";qi.POWERUNIT="POWERUNIT";qi.PRESSUREUNIT="PRESSUREUNIT";qi.RADIOACTIVITYUNIT="RADIOACTIVITYUNIT";qi.SOLIDANGLEUNIT="SOLIDANGLEUNIT";qi.THERMODYNAMICTEMPERATUREUNIT="THERMODYNAMICTEMPERATUREUNIT";qi.TIMEUNIT="TIMEUNIT";qi.VOLUMEUNIT="VOLUMEUNIT";qi.USERDEFINED="USERDEFINED";var sh=class{constructor(t){this.value=t}};sh.ALARMPANEL="ALARMPANEL";sh.CONTROLPANEL="CONTROLPANEL";sh.GASDETECTIONPANEL="GASDETECTIONPANEL";sh.INDICATORPANEL="INDICATORPANEL";sh.MIMICPANEL="MIMICPANEL";sh.HUMIDISTAT="HUMIDISTAT";sh.THERMOSTAT="THERMOSTAT";sh.WEATHERSTATION="WEATHERSTATION";sh.USERDEFINED="USERDEFINED";sh.NOTDEFINED="NOTDEFINED";var y0=class{constructor(t){this.value=t}};y0.AIRHANDLER="AIRHANDLER";y0.AIRCONDITIONINGUNIT="AIRCONDITIONINGUNIT";y0.DEHUMIDIFIER="DEHUMIDIFIER";y0.SPLITSYSTEM="SPLITSYSTEM";y0.ROOFTOPUNIT="ROOFTOPUNIT";y0.USERDEFINED="USERDEFINED";y0.NOTDEFINED="NOTDEFINED";var Ln=class{constructor(t){this.value=t}};Ln.AIRRELEASE="AIRRELEASE";Ln.ANTIVACUUM="ANTIVACUUM";Ln.CHANGEOVER="CHANGEOVER";Ln.CHECK="CHECK";Ln.COMMISSIONING="COMMISSIONING";Ln.DIVERTING="DIVERTING";Ln.DRAWOFFCOCK="DRAWOFFCOCK";Ln.DOUBLECHECK="DOUBLECHECK";Ln.DOUBLEREGULATING="DOUBLEREGULATING";Ln.FAUCET="FAUCET";Ln.FLUSHING="FLUSHING";Ln.GASCOCK="GASCOCK";Ln.GASTAP="GASTAP";Ln.ISOLATING="ISOLATING";Ln.MIXING="MIXING";Ln.PRESSUREREDUCING="PRESSUREREDUCING";Ln.PRESSURERELIEF="PRESSURERELIEF";Ln.REGULATING="REGULATING";Ln.SAFETYCUTOFF="SAFETYCUTOFF";Ln.STEAMTRAP="STEAMTRAP";Ln.STOPCOCK="STOPCOCK";Ln.USERDEFINED="USERDEFINED";Ln.NOTDEFINED="NOTDEFINED";var Gf=class{constructor(t){this.value=t}};Gf.BENDING_YIELD="BENDING_YIELD";Gf.SHEAR_YIELD="SHEAR_YIELD";Gf.AXIAL_YIELD="AXIAL_YIELD";Gf.FRICTION="FRICTION";Gf.VISCOUS="VISCOUS";Gf.RUBBER="RUBBER";Gf.USERDEFINED="USERDEFINED";Gf.NOTDEFINED="NOTDEFINED";var RI=class{constructor(t){this.value=t}};RI.COMPRESSION="COMPRESSION";RI.SPRING="SPRING";RI.BASE="BASE";RI.USERDEFINED="USERDEFINED";RI.NOTDEFINED="NOTDEFINED";var Vf=class{constructor(t){this.value=t}};Vf.CUTOUT="CUTOUT";Vf.NOTCH="NOTCH";Vf.HOLE="HOLE";Vf.MITER="MITER";Vf.CHAMFER="CHAMFER";Vf.EDGE="EDGE";Vf.USERDEFINED="USERDEFINED";Vf.NOTDEFINED="NOTDEFINED";var zl=class{constructor(t){this.value=t}};zl.MOVABLE="MOVABLE";zl.PARAPET="PARAPET";zl.PARTITIONING="PARTITIONING";zl.PLUMBINGWALL="PLUMBINGWALL";zl.SHEAR="SHEAR";zl.SOLIDWALL="SOLIDWALL";zl.STANDARD="STANDARD";zl.POLYGONAL="POLYGONAL";zl.ELEMENTEDWALL="ELEMENTEDWALL";zl.RETAININGWALL="RETAININGWALL";zl.USERDEFINED="USERDEFINED";zl.NOTDEFINED="NOTDEFINED";var rd=class{constructor(t){this.value=t}};rd.FLOORTRAP="FLOORTRAP";rd.FLOORWASTE="FLOORWASTE";rd.GULLYSUMP="GULLYSUMP";rd.GULLYTRAP="GULLYTRAP";rd.ROOFDRAIN="ROOFDRAIN";rd.WASTEDISPOSALUNIT="WASTEDISPOSALUNIT";rd.WASTETRAP="WASTETRAP";rd.USERDEFINED="USERDEFINED";rd.NOTDEFINED="NOTDEFINED";var To=class{constructor(t){this.value=t}};To.SIDEHUNGRIGHTHAND="SIDEHUNGRIGHTHAND";To.SIDEHUNGLEFTHAND="SIDEHUNGLEFTHAND";To.TILTANDTURNRIGHTHAND="TILTANDTURNRIGHTHAND";To.TILTANDTURNLEFTHAND="TILTANDTURNLEFTHAND";To.TOPHUNG="TOPHUNG";To.BOTTOMHUNG="BOTTOMHUNG";To.PIVOTHORIZONTAL="PIVOTHORIZONTAL";To.PIVOTVERTICAL="PIVOTVERTICAL";To.SLIDINGHORIZONTAL="SLIDINGHORIZONTAL";To.SLIDINGVERTICAL="SLIDINGVERTICAL";To.REMOVABLECASEMENT="REMOVABLECASEMENT";To.FIXEDCASEMENT="FIXEDCASEMENT";To.OTHEROPERATION="OTHEROPERATION";To.NOTDEFINED="NOTDEFINED";var HT=class{constructor(t){this.value=t}};HT.LEFT="LEFT";HT.MIDDLE="MIDDLE";HT.RIGHT="RIGHT";HT.BOTTOM="BOTTOM";HT.TOP="TOP";HT.NOTDEFINED="NOTDEFINED";var zf=class{constructor(t){this.value=t}};zf.ALUMINIUM="ALUMINIUM";zf.HIGH_GRADE_STEEL="HIGH_GRADE_STEEL";zf.STEEL="STEEL";zf.WOOD="WOOD";zf.ALUMINIUM_WOOD="ALUMINIUM_WOOD";zf.PLASTIC="PLASTIC";zf.OTHER_CONSTRUCTION="OTHER_CONSTRUCTION";zf.NOTDEFINED="NOTDEFINED";var qc=class{constructor(t){this.value=t}};qc.SINGLE_PANEL="SINGLE_PANEL";qc.DOUBLE_PANEL_VERTICAL="DOUBLE_PANEL_VERTICAL";qc.DOUBLE_PANEL_HORIZONTAL="DOUBLE_PANEL_HORIZONTAL";qc.TRIPLE_PANEL_VERTICAL="TRIPLE_PANEL_VERTICAL";qc.TRIPLE_PANEL_BOTTOM="TRIPLE_PANEL_BOTTOM";qc.TRIPLE_PANEL_TOP="TRIPLE_PANEL_TOP";qc.TRIPLE_PANEL_LEFT="TRIPLE_PANEL_LEFT";qc.TRIPLE_PANEL_RIGHT="TRIPLE_PANEL_RIGHT";qc.TRIPLE_PANEL_HORIZONTAL="TRIPLE_PANEL_HORIZONTAL";qc.USERDEFINED="USERDEFINED";qc.NOTDEFINED="NOTDEFINED";var MI=class{constructor(t){this.value=t}};MI.WINDOW="WINDOW";MI.SKYLIGHT="SKYLIGHT";MI.LIGHTDOME="LIGHTDOME";MI.USERDEFINED="USERDEFINED";MI.NOTDEFINED="NOTDEFINED";var Yc=class{constructor(t){this.value=t}};Yc.SINGLE_PANEL="SINGLE_PANEL";Yc.DOUBLE_PANEL_VERTICAL="DOUBLE_PANEL_VERTICAL";Yc.DOUBLE_PANEL_HORIZONTAL="DOUBLE_PANEL_HORIZONTAL";Yc.TRIPLE_PANEL_VERTICAL="TRIPLE_PANEL_VERTICAL";Yc.TRIPLE_PANEL_BOTTOM="TRIPLE_PANEL_BOTTOM";Yc.TRIPLE_PANEL_TOP="TRIPLE_PANEL_TOP";Yc.TRIPLE_PANEL_LEFT="TRIPLE_PANEL_LEFT";Yc.TRIPLE_PANEL_RIGHT="TRIPLE_PANEL_RIGHT";Yc.TRIPLE_PANEL_HORIZONTAL="TRIPLE_PANEL_HORIZONTAL";Yc.USERDEFINED="USERDEFINED";Yc.NOTDEFINED="NOTDEFINED";var DI=class{constructor(t){this.value=t}};DI.FIRSTSHIFT="FIRSTSHIFT";DI.SECONDSHIFT="SECONDSHIFT";DI.THIRDSHIFT="THIRDSHIFT";DI.USERDEFINED="USERDEFINED";DI.NOTDEFINED="NOTDEFINED";var CI=class{constructor(t){this.value=t}};CI.ACTUAL="ACTUAL";CI.BASELINE="BASELINE";CI.PLANNED="PLANNED";CI.USERDEFINED="USERDEFINED";CI.NOTDEFINED="NOTDEFINED";var AI=class{constructor(t){this.value=t}};AI.ACTUAL="ACTUAL";AI.BASELINE="BASELINE";AI.PLANNED="PLANNED";AI.USERDEFINED="USERDEFINED";AI.NOTDEFINED="NOTDEFINED";var zde=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.PredefinedType=l,this.Status=c,this.LongDescription=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new zde(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.PredefinedType),t.push(this.Status),t.push(this.LongDescription),t}},jde=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.TheActor=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new jde(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.TheActor),t}},Wde=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Role=e,this.UserDefinedRole=i,this.Description=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new Wde(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Role),t.push(this.UserDefinedRole),t.push(this.Description),t}},qde=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new qde(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Yde=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Yde(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Xde=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Purpose=e,this.Description=i,this.UserDefinedPurpose=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new Xde(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Purpose),t.push(this.Description),t.push(this.UserDefinedPurpose),t}},$de=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Outer=e}static FromTape(t,r,e){let i=0,n=e[i++];return new $de(t,r,n)}ToTape(){let t=[];return t.push(this.Outer),t}},Zde=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Outer=e,this.Voids=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Zde(t,r,n,s)}ToTape(){let t=[];return t.push(this.Outer),t.push(this.Voids),t}},Kde=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Bounds=e,this.FaceSurface=i,this.SameSense=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new Kde(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Bounds),t.push(this.FaceSurface),t.push(this.SameSense),t}},Jde=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Jde(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Qde=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Qde(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},efe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new efe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},tfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new tfe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},rfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new rfe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},ife=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new ife(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},nfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new nfe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},sfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new sfe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},afe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Axis=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new afe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Axis),t.push(this.PredefinedType),t}},ofe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.StartDistAlong=e,this.Segments=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new ofe(t,r,n,s)}ToTape(){let t=[];return t.push(this.StartDistAlong),t.push(this.Segments),t}},lfe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.TangentialContinuity=e,this.StartTag=i,this.EndTag=n,this.CurveGeometry=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new lfe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.TangentialContinuity),t.push(this.StartTag),t.push(this.EndTag),t.push(this.CurveGeometry),t}},cfe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.TangentialContinuity=e,this.StartTag=i,this.EndTag=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new cfe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.TangentialContinuity),t.push(this.StartTag),t.push(this.EndTag),t}},ufe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.TangentialContinuity=e,this.StartTag=i,this.EndTag=n,this.StartDistAlong=s,this.HorizontalLength=a,this.StartHeight=o,this.StartGradient=l,this.Radius=c,this.IsConvex=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new ufe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.TangentialContinuity),t.push(this.StartTag),t.push(this.EndTag),t.push(this.StartDistAlong),t.push(this.HorizontalLength),t.push(this.StartHeight),t.push(this.StartGradient),t.push(this.Radius),t.push(this.IsConvex),t}},hfe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.TangentialContinuity=e,this.StartTag=i,this.EndTag=n,this.StartDistAlong=s,this.HorizontalLength=a,this.StartHeight=o,this.StartGradient=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new hfe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.TangentialContinuity),t.push(this.StartTag),t.push(this.EndTag),t.push(this.StartDistAlong),t.push(this.HorizontalLength),t.push(this.StartHeight),t.push(this.StartGradient),t}},pfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.TangentialContinuity=e,this.StartTag=i,this.EndTag=n,this.StartDistAlong=s,this.HorizontalLength=a,this.StartHeight=o,this.StartGradient=l,this.ParabolaConstant=c,this.IsConvex=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new pfe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.TangentialContinuity),t.push(this.StartTag),t.push(this.EndTag),t.push(this.StartDistAlong),t.push(this.HorizontalLength),t.push(this.StartHeight),t.push(this.StartGradient),t.push(this.ParabolaConstant),t.push(this.IsConvex),t}},dfe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Segments=e}static FromTape(t,r,e){let i=0,n=e[i++];return new dfe(t,r,n)}ToTape(){let t=[];return t.push(this.Segments),t}},ffe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.TangentialContinuity=e,this.StartTag=i,this.EndTag=n,this.StartDistAlong=s,this.HorizontalLength=a,this.StartHeight=o,this.StartGradient=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new ffe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.TangentialContinuity),t.push(this.StartTag),t.push(this.EndTag),t.push(this.StartDistAlong),t.push(this.HorizontalLength),t.push(this.StartHeight),t.push(this.StartGradient),t}},mfe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Horizontal=e,this.Vertical=i,this.Tag=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new mfe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Horizontal),t.push(this.Vertical),t.push(this.Tag),t}},gfe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new gfe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t}},vfe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.OuterBoundary=e,this.InnerBoundaries=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new vfe(t,r,n,s)}ToTape(){let t=[];return t.push(this.OuterBoundary),t.push(this.InnerBoundaries),t}},yfe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.ApplicationDeveloper=e,this.Version=i,this.ApplicationFullName=n,this.ApplicationIdentifier=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new yfe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.ApplicationDeveloper),t.push(this.Version),t.push(this.ApplicationFullName),t.push(this.ApplicationIdentifier),t}},Tfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.AppliedValue=n,this.UnitBasis=s,this.ApplicableDate=a,this.FixedUntilDate=o,this.Category=l,this.Condition=c,this.ArithmeticOperator=u,this.Components=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Tfe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.AppliedValue),t.push(this.UnitBasis),t.push(this.ApplicableDate),t.push(this.FixedUntilDate),t.push(this.Category),t.push(this.Condition),t.push(this.ArithmeticOperator),t.push(this.Components),t}},Efe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.Identifier=e,this.Name=i,this.Description=n,this.TimeOfApproval=s,this.Status=a,this.Level=o,this.Qualifier=l,this.RequestingApproval=c,this.GivingApproval=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Efe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.Identifier),t.push(this.Name),t.push(this.Description),t.push(this.TimeOfApproval),t.push(this.Status),t.push(this.Level),t.push(this.Qualifier),t.push(this.RequestingApproval),t.push(this.GivingApproval),t}},bfe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.RelatingApproval=n,this.RelatedApprovals=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new bfe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.RelatingApproval),t.push(this.RelatedApprovals),t}},xfe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.OuterCurve=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new xfe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.OuterCurve),t}},Ife=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Curve=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new Ife(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Curve),t}},Sfe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.OuterCurve=n,this.InnerCurves=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Sfe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.OuterCurve),t.push(this.InnerCurves),t}},_fe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.OriginalValue=l,this.CurrentValue=c,this.TotalReplacementCost=u,this.Owner=h,this.User=p,this.ResponsiblePerson=d,this.IncorporationDate=f,this.DepreciatedValue=m}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++];return new _fe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.OriginalValue),t.push(this.CurrentValue),t.push(this.TotalReplacementCost),t.push(this.Owner),t.push(this.User),t.push(this.ResponsiblePerson),t.push(this.IncorporationDate),t.push(this.DepreciatedValue),t}},wfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m,g){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.BottomFlangeWidth=s,this.OverallDepth=a,this.WebThickness=o,this.BottomFlangeThickness=l,this.BottomFlangeFilletRadius=c,this.TopFlangeWidth=u,this.TopFlangeThickness=h,this.TopFlangeFilletRadius=p,this.BottomFlangeEdgeRadius=d,this.BottomFlangeSlope=f,this.TopFlangeEdgeRadius=m,this.TopFlangeSlope=g}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++],E=e[i++];return new wfe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.BottomFlangeWidth),t.push(this.OverallDepth),t.push(this.WebThickness),t.push(this.BottomFlangeThickness),t.push(this.BottomFlangeFilletRadius),t.push(this.TopFlangeWidth),t.push(this.TopFlangeThickness),t.push(this.TopFlangeFilletRadius),t.push(this.BottomFlangeEdgeRadius),t.push(this.BottomFlangeSlope),t.push(this.TopFlangeEdgeRadius),t.push(this.TopFlangeSlope),t}},Rfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Rfe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Mfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Mfe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Dfe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Location=e,this.Axis=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Dfe(t,r,n,s)}ToTape(){let t=[];return t.push(this.Location),t.push(this.Axis),t}},Cfe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Location=e,this.RefDirection=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Cfe(t,r,n,s)}ToTape(){let t=[];return t.push(this.Location),t.push(this.RefDirection),t}},Afe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Location=e,this.Axis=i,this.RefDirection=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new Afe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Location),t.push(this.Axis),t.push(this.RefDirection),t}},Ofe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Degree=e,this.ControlPointsList=i,this.CurveForm=n,this.ClosedCurve=s,this.SelfIntersect=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Ofe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Degree),t.push(this.ControlPointsList),t.push(this.CurveForm),t.push(this.ClosedCurve),t.push(this.SelfIntersect),t}},Pfe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.Degree=e,this.ControlPointsList=i,this.CurveForm=n,this.ClosedCurve=s,this.SelfIntersect=a,this.KnotMultiplicities=o,this.Knots=l,this.KnotSpec=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Pfe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.Degree),t.push(this.ControlPointsList),t.push(this.CurveForm),t.push(this.ClosedCurve),t.push(this.SelfIntersect),t.push(this.KnotMultiplicities),t.push(this.Knots),t.push(this.KnotSpec),t}},Nfe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.UDegree=e,this.VDegree=i,this.ControlPointsList=n,this.SurfaceForm=s,this.UClosed=a,this.VClosed=o,this.SelfIntersect=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new Nfe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.UDegree),t.push(this.VDegree),t.push(this.ControlPointsList),t.push(this.SurfaceForm),t.push(this.UClosed),t.push(this.VClosed),t.push(this.SelfIntersect),t}},Lfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.UDegree=e,this.VDegree=i,this.ControlPointsList=n,this.SurfaceForm=s,this.UClosed=a,this.VClosed=o,this.SelfIntersect=l,this.UMultiplicities=c,this.VMultiplicities=u,this.UKnots=h,this.VKnots=p,this.KnotSpec=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new Lfe(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.UDegree),t.push(this.VDegree),t.push(this.ControlPointsList),t.push(this.SurfaceForm),t.push(this.UClosed),t.push(this.VClosed),t.push(this.SelfIntersect),t.push(this.UMultiplicities),t.push(this.VMultiplicities),t.push(this.UKnots),t.push(this.VKnots),t.push(this.KnotSpec),t}},Ffe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Ffe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Hfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Hfe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Ufe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Ufe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Bfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Bfe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},kfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new kfe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Gfe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.RepeatS=e,this.RepeatT=i,this.Mode=n,this.TextureTransform=s,this.Parameter=a,this.RasterFormat=o,this.RasterCode=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new Gfe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.RepeatS),t.push(this.RepeatT),t.push(this.Mode),t.push(this.TextureTransform),t.push(this.Parameter),t.push(this.RasterFormat),t.push(this.RasterCode),t}},Vfe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Position=e,this.XLength=i,this.YLength=n,this.ZLength=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Vfe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Position),t.push(this.XLength),t.push(this.YLength),t.push(this.ZLength),t}},zfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new zfe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},jfe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new jfe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Wfe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Operator=e,this.FirstOperand=i,this.SecondOperand=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new Wfe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Operator),t.push(this.FirstOperand),t.push(this.SecondOperand),t}},qfe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Operator=e,this.FirstOperand=i,this.SecondOperand=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new qfe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Operator),t.push(this.FirstOperand),t.push(this.SecondOperand),t}},Yfe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Name=e}static FromTape(t,r,e){let i=0,n=e[i++];return new Yfe(t,r,n)}ToTape(){let t=[];return t.push(this.Name),t}},Xfe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Segments=e,this.SelfIntersect=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Xfe(t,r,n,s)}ToTape(){let t=[];return t.push(this.Segments),t.push(this.SelfIntersect),t}},$fe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Name=e,this.TranslationalStiffnessByLengthX=i,this.TranslationalStiffnessByLengthY=n,this.TranslationalStiffnessByLengthZ=s,this.RotationalStiffnessByLengthX=a,this.RotationalStiffnessByLengthY=o,this.RotationalStiffnessByLengthZ=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new $fe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Name),t.push(this.TranslationalStiffnessByLengthX),t.push(this.TranslationalStiffnessByLengthY),t.push(this.TranslationalStiffnessByLengthZ),t.push(this.RotationalStiffnessByLengthX),t.push(this.RotationalStiffnessByLengthY),t.push(this.RotationalStiffnessByLengthZ),t}},Zfe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.TranslationalStiffnessByAreaX=i,this.TranslationalStiffnessByAreaY=n,this.TranslationalStiffnessByAreaZ=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Zfe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.TranslationalStiffnessByAreaX),t.push(this.TranslationalStiffnessByAreaY),t.push(this.TranslationalStiffnessByAreaZ),t}},Kfe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Name=e,this.TranslationalStiffnessX=i,this.TranslationalStiffnessY=n,this.TranslationalStiffnessZ=s,this.RotationalStiffnessX=a,this.RotationalStiffnessY=o,this.RotationalStiffnessZ=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new Kfe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Name),t.push(this.TranslationalStiffnessX),t.push(this.TranslationalStiffnessY),t.push(this.TranslationalStiffnessZ),t.push(this.RotationalStiffnessX),t.push(this.RotationalStiffnessY),t.push(this.RotationalStiffnessZ),t}},Jfe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.Name=e,this.TranslationalStiffnessX=i,this.TranslationalStiffnessY=n,this.TranslationalStiffnessZ=s,this.RotationalStiffnessX=a,this.RotationalStiffnessY=o,this.RotationalStiffnessZ=l,this.WarpingStiffness=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Jfe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.Name),t.push(this.TranslationalStiffnessX),t.push(this.TranslationalStiffnessY),t.push(this.TranslationalStiffnessZ),t.push(this.RotationalStiffnessX),t.push(this.RotationalStiffnessY),t.push(this.RotationalStiffnessZ),t.push(this.WarpingStiffness),t}},Qfe=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new Qfe(t,r)}ToTape(){return[]}},eme=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new eme(t,r)}ToTape(){return[]}},tme=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Corner=e,this.XDim=i,this.YDim=n,this.ZDim=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new tme(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Corner),t.push(this.XDim),t.push(this.YDim),t.push(this.ZDim),t}},rme=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.BaseSurface=e,this.AgreementFlag=i,this.Enclosure=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new rme(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.BaseSurface),t.push(this.AgreementFlag),t.push(this.Enclosure),t}},ime=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=c,this.CompositionType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new ime(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.LongName),t.push(this.CompositionType),t.push(this.PredefinedType),t}},nme=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=c,this.CompositionType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new nme(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.LongName),t.push(this.CompositionType),t.push(this.PredefinedType),t}},sme=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=c,this.CompositionType=u,this.ElevationOfRefHeight=h,this.ElevationOfTerrain=p,this.BuildingAddress=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new sme(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.LongName),t.push(this.CompositionType),t.push(this.ElevationOfRefHeight),t.push(this.ElevationOfTerrain),t.push(this.BuildingAddress),t}},ame=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new ame(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},ome=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new ome(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},lme=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new lme(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},cme=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new cme(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},ume=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new ume(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},hme=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new hme(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},pme=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=c,this.CompositionType=u,this.Elevation=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new pme(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.LongName),t.push(this.CompositionType),t.push(this.Elevation),t}},dme=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.PredefinedType=o,this.LongName=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new dme(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.PredefinedType),t.push(this.LongName),t}},fme=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new fme(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},mme=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new mme(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},gme=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.Depth=s,this.Width=a,this.WallThickness=o,this.Girth=l,this.InternalFilletRadius=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new gme(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.Depth),t.push(this.Width),t.push(this.WallThickness),t.push(this.Girth),t.push(this.InternalFilletRadius),t}},vme=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new vme(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},yme=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new yme(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Tme=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Tme(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Eme=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Eme(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},bme=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new bme(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},xme=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new xme(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Ime=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Ime(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Sme=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Sme(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},_me=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new _me(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},wme=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new wme(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Rme=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Coordinates=e}static FromTape(t,r,e){let i=0,n=e[i++];return new Rme(t,r,n)}ToTape(){let t=[];return t.push(this.Coordinates),t}},Mme=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new Mme(t,r)}ToTape(){return[]}},Dme=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.CoordList=e,this.TagList=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Dme(t,r,n,s)}ToTape(){let t=[];return t.push(this.CoordList),t.push(this.TagList),t}},Cme=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.CoordList=e,this.TagList=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Cme(t,r,n,s)}ToTape(){let t=[];return t.push(this.CoordList),t.push(this.TagList),t}},Ame=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Axis1=e,this.Axis2=i,this.LocalOrigin=n,this.Scale=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Ame(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Axis1),t.push(this.Axis2),t.push(this.LocalOrigin),t.push(this.Scale),t}},Ome=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Axis1=e,this.Axis2=i,this.LocalOrigin=n,this.Scale=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Ome(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Axis1),t.push(this.Axis2),t.push(this.LocalOrigin),t.push(this.Scale),t}},Pme=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Axis1=e,this.Axis2=i,this.LocalOrigin=n,this.Scale=s,this.Scale2=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Pme(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Axis1),t.push(this.Axis2),t.push(this.LocalOrigin),t.push(this.Scale),t.push(this.Scale2),t}},Nme=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Axis1=e,this.Axis2=i,this.LocalOrigin=n,this.Scale=s,this.Axis3=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Nme(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Axis1),t.push(this.Axis2),t.push(this.LocalOrigin),t.push(this.Scale),t.push(this.Axis3),t}},Lme=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Axis1=e,this.Axis2=i,this.LocalOrigin=n,this.Scale=s,this.Axis3=a,this.Scale2=o,this.Scale3=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new Lme(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Axis1),t.push(this.Axis2),t.push(this.LocalOrigin),t.push(this.Scale),t.push(this.Axis3),t.push(this.Scale2),t.push(this.Scale3),t}},Fme=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Curve=n,this.Thickness=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Fme(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Curve),t.push(this.Thickness),t}},Hme=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Hme(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Ume=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Ume(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Bme=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Bme(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},kme=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new kme(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Gme=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Position=e,this.Radius=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Gme(t,r,n,s)}ToTape(){let t=[];return t.push(this.Position),t.push(this.Radius),t}},Vme=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.Radius=s,this.WallThickness=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Vme(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.Radius),t.push(this.WallThickness),t}},zme=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.Radius=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new zme(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.Radius),t}},jme=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.StartPoint=e,this.StartDirection=i,this.SegmentLength=n,this.Radius=s,this.IsCCW=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new jme(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.StartPoint),t.push(this.StartDirection),t.push(this.SegmentLength),t.push(this.Radius),t.push(this.IsCCW),t}},Wme=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Wme(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},qme=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new qme(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},Yme=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Source=e,this.Edition=i,this.EditionDate=n,this.Name=s,this.Description=a,this.Location=o,this.ReferenceTokens=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new Yme(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Source),t.push(this.Edition),t.push(this.EditionDate),t.push(this.Name),t.push(this.Description),t.push(this.Location),t.push(this.ReferenceTokens),t}},Xme=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.Location=e,this.Identification=i,this.Name=n,this.ReferencedSource=s,this.Description=a,this.Sort=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Xme(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.Location),t.push(this.Identification),t.push(this.Name),t.push(this.ReferencedSource),t.push(this.Description),t.push(this.Sort),t}},$me=class{constructor(t,r,e){this.expressID=t,this.type=r,this.CfsFaces=e}static FromTape(t,r,e){let i=0,n=e[i++];return new $me(t,r,n)}ToTape(){let t=[];return t.push(this.CfsFaces),t}},Zme=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Zme(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Kme=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Kme(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Jme=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Red=i,this.Green=n,this.Blue=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Jme(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Red),t.push(this.Green),t.push(this.Blue),t}},Qme=class{constructor(t,r,e){this.expressID=t,this.type=r,this.ColourList=e}static FromTape(t,r,e){let i=0,n=e[i++];return new Qme(t,r,n)}ToTape(){let t=[];return t.push(this.ColourList),t}},ege=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Name=e}static FromTape(t,r,e){let i=0,n=e[i++];return new ege(t,r,n)}ToTape(){let t=[];return t.push(this.Name),t}},tge=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new tge(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},rge=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new rge(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},ige=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new ige(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},nge=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new nge(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},sge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new sge(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},age=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.UsageName=n,this.HasProperties=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new age(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.UsageName),t.push(this.HasProperties),t}},oge=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.UsageName=a,this.TemplateType=o,this.HasPropertyTemplates=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new oge(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.UsageName),t.push(this.TemplateType),t.push(this.HasPropertyTemplates),t}},lge=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Segments=e,this.SelfIntersect=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new lge(t,r,n,s)}ToTape(){let t=[];return t.push(this.Segments),t.push(this.SelfIntersect),t}},cge=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Segments=e,this.SelfIntersect=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new cge(t,r,n,s)}ToTape(){let t=[];return t.push(this.Segments),t.push(this.SelfIntersect),t}},uge=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Transition=e,this.SameSense=i,this.ParentCurve=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new uge(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Transition),t.push(this.SameSense),t.push(this.ParentCurve),t}},hge=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Profiles=n,this.Label=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new hge(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Profiles),t.push(this.Label),t}},pge=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new pge(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},dge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new dge(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},fge=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new fge(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},mge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new mge(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},gge=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Position=e}static FromTape(t,r,e){let i=0,n=e[i++];return new gge(t,r,n)}ToTape(){let t=[];return t.push(this.Position),t}},vge=class{constructor(t,r,e){this.expressID=t,this.type=r,this.CfsFaces=e}static FromTape(t,r,e){let i=0,n=e[i++];return new vge(t,r,n)}ToTape(){let t=[];return t.push(this.CfsFaces),t}},yge=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.CurveOnRelatingElement=e,this.CurveOnRelatedElement=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new yge(t,r,n,s)}ToTape(){let t=[];return t.push(this.CurveOnRelatingElement),t.push(this.CurveOnRelatedElement),t}},Tge=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new Tge(t,r)}ToTape(){return[]}},Ege=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.PointOnRelatingElement=e,this.PointOnRelatedElement=i,this.EccentricityInX=n,this.EccentricityInY=s,this.EccentricityInZ=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Ege(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.PointOnRelatingElement),t.push(this.PointOnRelatedElement),t.push(this.EccentricityInX),t.push(this.EccentricityInY),t.push(this.EccentricityInZ),t}},bge=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.PointOnRelatingElement=e,this.PointOnRelatedElement=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new bge(t,r,n,s)}ToTape(){let t=[];return t.push(this.PointOnRelatingElement),t.push(this.PointOnRelatedElement),t}},xge=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.SurfaceOnRelatingElement=e,this.SurfaceOnRelatedElement=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new xge(t,r,n,s)}ToTape(){let t=[];return t.push(this.SurfaceOnRelatingElement),t.push(this.SurfaceOnRelatedElement),t}},Ige=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.VolumeOnRelatingElement=e,this.VolumeOnRelatedElement=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Ige(t,r,n,s)}ToTape(){let t=[];return t.push(this.VolumeOnRelatingElement),t.push(this.VolumeOnRelatedElement),t}},Sge=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.ConstraintGrade=n,this.ConstraintSource=s,this.CreatingActor=a,this.CreationTime=o,this.UserDefinedGrade=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new Sge(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.ConstraintGrade),t.push(this.ConstraintSource),t.push(this.CreatingActor),t.push(this.CreationTime),t.push(this.UserDefinedGrade),t}},_ge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=c,this.BaseCosts=u,this.BaseQuantity=h,this.PredefinedType=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new _ge(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.LongDescription),t.push(this.Usage),t.push(this.BaseCosts),t.push(this.BaseQuantity),t.push(this.PredefinedType),t}},wge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=c,this.ResourceType=u,this.BaseCosts=h,this.BaseQuantity=p,this.PredefinedType=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new wge(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.Identification),t.push(this.LongDescription),t.push(this.ResourceType),t.push(this.BaseCosts),t.push(this.BaseQuantity),t.push(this.PredefinedType),t}},Rge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=c,this.BaseCosts=u,this.BaseQuantity=h,this.PredefinedType=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new Rge(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.LongDescription),t.push(this.Usage),t.push(this.BaseCosts),t.push(this.BaseQuantity),t.push(this.PredefinedType),t}},Mge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=c,this.ResourceType=u,this.BaseCosts=h,this.BaseQuantity=p,this.PredefinedType=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new Mge(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.Identification),t.push(this.LongDescription),t.push(this.ResourceType),t.push(this.BaseCosts),t.push(this.BaseQuantity),t.push(this.PredefinedType),t}},Dge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=c,this.BaseCosts=u,this.BaseQuantity=h,this.PredefinedType=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new Dge(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.LongDescription),t.push(this.Usage),t.push(this.BaseCosts),t.push(this.BaseQuantity),t.push(this.PredefinedType),t}},Cge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=c,this.ResourceType=u,this.BaseCosts=h,this.BaseQuantity=p,this.PredefinedType=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new Cge(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.Identification),t.push(this.LongDescription),t.push(this.ResourceType),t.push(this.BaseCosts),t.push(this.BaseQuantity),t.push(this.PredefinedType),t}},Age=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=c,this.BaseCosts=u,this.BaseQuantity=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Age(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.LongDescription),t.push(this.Usage),t.push(this.BaseCosts),t.push(this.BaseQuantity),t}},Oge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=c,this.ResourceType=u,this.BaseCosts=h,this.BaseQuantity=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new Oge(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.Identification),t.push(this.LongDescription),t.push(this.ResourceType),t.push(this.BaseCosts),t.push(this.BaseQuantity),t}},Pge=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.LongName=o,this.Phase=l,this.RepresentationContexts=c,this.UnitsInContext=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Pge(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.LongName),t.push(this.Phase),t.push(this.RepresentationContexts),t.push(this.UnitsInContext),t}},Nge=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Dimensions=e,this.UnitType=i,this.Name=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new Nge(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Dimensions),t.push(this.UnitType),t.push(this.Name),t}},Lge=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Lge(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t}},Fge=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Fge(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Hge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Hge(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Uge=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Dimensions=e,this.UnitType=i,this.Name=n,this.ConversionFactor=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Uge(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Dimensions),t.push(this.UnitType),t.push(this.Name),t.push(this.ConversionFactor),t}},Bge=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Dimensions=e,this.UnitType=i,this.Name=n,this.ConversionFactor=s,this.ConversionOffset=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Bge(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Dimensions),t.push(this.UnitType),t.push(this.Name),t.push(this.ConversionFactor),t.push(this.ConversionOffset),t}},kge=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new kge(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Gge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Gge(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Vge=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Vge(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},zge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new zge(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},jge=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.SourceCRS=e,this.TargetCRS=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new jge(t,r,n,s)}ToTape(){let t=[];return t.push(this.SourceCRS),t.push(this.TargetCRS),t}},Wge=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.GeodeticDatum=n,this.VerticalDatum=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Wge(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.GeodeticDatum),t.push(this.VerticalDatum),t}},qge=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.PredefinedType=l,this.CostValues=c,this.CostQuantities=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new qge(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.PredefinedType),t.push(this.CostValues),t.push(this.CostQuantities),t}},Yge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.PredefinedType=l,this.Status=c,this.SubmittedOn=u,this.UpdateDate=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Yge(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.PredefinedType),t.push(this.Status),t.push(this.SubmittedOn),t.push(this.UpdateDate),t}},Xge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.AppliedValue=n,this.UnitBasis=s,this.ApplicableDate=a,this.FixedUntilDate=o,this.Category=l,this.Condition=c,this.ArithmeticOperator=u,this.Components=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Xge(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.AppliedValue),t.push(this.UnitBasis),t.push(this.ApplicableDate),t.push(this.FixedUntilDate),t.push(this.Category),t.push(this.Condition),t.push(this.ArithmeticOperator),t.push(this.Components),t}},$ge=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new $ge(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Zge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Zge(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Kge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=c,this.BaseCosts=u,this.BaseQuantity=h,this.PredefinedType=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new Kge(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.LongDescription),t.push(this.Usage),t.push(this.BaseCosts),t.push(this.BaseQuantity),t.push(this.PredefinedType),t}},Jge=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=c,this.ResourceType=u,this.BaseCosts=h,this.BaseQuantity=p,this.PredefinedType=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new Jge(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.Identification),t.push(this.LongDescription),t.push(this.ResourceType),t.push(this.BaseCosts),t.push(this.BaseQuantity),t.push(this.PredefinedType),t}},Qge=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Position=e}static FromTape(t,r,e){let i=0,n=e[i++];return new Qge(t,r,n)}ToTape(){let t=[];return t.push(this.Position),t}},e0e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.TreeRootExpression=e}static FromTape(t,r,e){let i=0,n=e[i++];return new e0e(t,r,n)}ToTape(){let t=[];return t.push(this.TreeRootExpression),t}},t0e=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.RelatingMonetaryUnit=n,this.RelatedMonetaryUnit=s,this.ExchangeRate=a,this.RateDateTime=o,this.RateSource=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new t0e(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.RelatingMonetaryUnit),t.push(this.RelatedMonetaryUnit),t.push(this.ExchangeRate),t.push(this.RateDateTime),t.push(this.RateSource),t}},r0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new r0e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},i0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new i0e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},n0e=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new n0e(t,r)}ToTape(){return[]}},s0e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.BasisSurface=e,this.OuterBoundary=i,this.InnerBoundaries=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new s0e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.BasisSurface),t.push(this.OuterBoundary),t.push(this.InnerBoundaries),t}},a0e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.BasisSurface=e,this.Boundaries=i,this.ImplicitOuter=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new a0e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.BasisSurface),t.push(this.Boundaries),t.push(this.ImplicitOuter),t}},o0e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.StartPoint=e,this.StartDirection=i,this.SegmentLength=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new o0e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.StartPoint),t.push(this.StartDirection),t.push(this.SegmentLength),t}},l0e=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.CurveFont=i,this.CurveWidth=n,this.CurveColour=s,this.ModelOrDraughting=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new l0e(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.CurveFont),t.push(this.CurveWidth),t.push(this.CurveColour),t.push(this.ModelOrDraughting),t}},c0e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Name=e,this.PatternList=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new c0e(t,r,n,s)}ToTape(){let t=[];return t.push(this.Name),t.push(this.PatternList),t}},u0e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Name=e,this.CurveFont=i,this.CurveFontScaling=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new u0e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Name),t.push(this.CurveFont),t.push(this.CurveFontScaling),t}},h0e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.VisibleSegmentLength=e,this.InvisibleSegmentLength=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new h0e(t,r,n,s)}ToTape(){let t=[];return t.push(this.VisibleSegmentLength),t.push(this.InvisibleSegmentLength),t}},p0e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Position=e,this.Radius=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new p0e(t,r,n,s)}ToTape(){let t=[];return t.push(this.Position),t.push(this.Radius),t}},d0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new d0e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},f0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new f0e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},m0e=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new m0e(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},g0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new g0e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},v0e=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.ParentProfile=n,this.Operator=s,this.Label=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new v0e(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.ParentProfile),t.push(this.Operator),t.push(this.Label),t}},y0e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Elements=e,this.UnitType=i,this.UserDefinedType=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new y0e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Elements),t.push(this.UnitType),t.push(this.UserDefinedType),t}},T0e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Unit=e,this.Exponent=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new T0e(t,r,n,s)}ToTape(){let t=[];return t.push(this.Unit),t.push(this.Exponent),t}},E0e=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.LengthExponent=e,this.MassExponent=i,this.TimeExponent=n,this.ElectricCurrentExponent=s,this.ThermodynamicTemperatureExponent=a,this.AmountOfSubstanceExponent=o,this.LuminousIntensityExponent=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new E0e(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.LengthExponent),t.push(this.MassExponent),t.push(this.TimeExponent),t.push(this.ElectricCurrentExponent),t.push(this.ThermodynamicTemperatureExponent),t.push(this.AmountOfSubstanceExponent),t.push(this.LuminousIntensityExponent),t}},b0e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.DirectionRatios=e}static FromTape(t,r,e){let i=0,n=e[i++];return new b0e(t,r,n)}ToTape(){let t=[];return t.push(this.DirectionRatios),t}},x0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new x0e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},I0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new I0e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},S0e=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.DistanceAlong=e,this.OffsetLateral=i,this.OffsetVertical=n,this.OffsetLongitudinal=s,this.AlongHorizontal=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new S0e(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.DistanceAlong),t.push(this.OffsetLateral),t.push(this.OffsetVertical),t.push(this.OffsetLongitudinal),t.push(this.AlongHorizontal),t}},_0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new _0e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},w0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new w0e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},R0e=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.LongName=o,this.PredefinedType=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new R0e(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.LongName),t.push(this.PredefinedType),t}},M0e=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new M0e(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},D0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new D0e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},C0e=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new C0e(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},A0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new A0e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},O0e=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new O0e(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},P0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new P0e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},N0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.FlowDirection=c,this.PredefinedType=u,this.SystemType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new N0e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.FlowDirection),t.push(this.PredefinedType),t.push(this.SystemType),t}},L0e=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.LongName=o,this.PredefinedType=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new L0e(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.LongName),t.push(this.PredefinedType),t}},F0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E){this.expressID=t,this.type=r,this.Identification=e,this.Name=i,this.Description=n,this.Location=s,this.Purpose=a,this.IntendedUse=o,this.Scope=l,this.Revision=c,this.DocumentOwner=u,this.Editors=h,this.CreationTime=p,this.LastRevisionTime=d,this.ElectronicFormat=f,this.ValidFrom=m,this.ValidUntil=g,this.Confidentiality=y,this.Status=E}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++],E=e[i++],b=e[i++],x=e[i++];return new F0e(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b,x)}ToTape(){let t=[];return t.push(this.Identification),t.push(this.Name),t.push(this.Description),t.push(this.Location),t.push(this.Purpose),t.push(this.IntendedUse),t.push(this.Scope),t.push(this.Revision),t.push(this.DocumentOwner),t.push(this.Editors),t.push(this.CreationTime),t.push(this.LastRevisionTime),t.push(this.ElectronicFormat),t.push(this.ValidFrom),t.push(this.ValidUntil),t.push(this.Confidentiality),t.push(this.Status),t}},H0e=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.RelatingDocument=n,this.RelatedDocuments=s,this.RelationshipType=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new H0e(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.RelatingDocument),t.push(this.RelatedDocuments),t.push(this.RelationshipType),t}},U0e=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Location=e,this.Identification=i,this.Name=n,this.Description=s,this.ReferencedDocument=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new U0e(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Location),t.push(this.Identification),t.push(this.Name),t.push(this.Description),t.push(this.ReferencedDocument),t}},B0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.OverallHeight=u,this.OverallWidth=h,this.PredefinedType=p,this.OperationType=d,this.UserDefinedOperationType=f}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++];return new B0e(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.OverallHeight),t.push(this.OverallWidth),t.push(this.PredefinedType),t.push(this.OperationType),t.push(this.UserDefinedOperationType),t}},k0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.LiningDepth=a,this.LiningThickness=o,this.ThresholdDepth=l,this.ThresholdThickness=c,this.TransomThickness=u,this.TransomOffset=h,this.LiningOffset=p,this.ThresholdOffset=d,this.CasingThickness=f,this.CasingDepth=m,this.ShapeAspectStyle=g,this.LiningToPanelOffsetX=y,this.LiningToPanelOffsetY=E}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++],E=e[i++],b=e[i++],x=e[i++];return new k0e(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b,x)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.LiningDepth),t.push(this.LiningThickness),t.push(this.ThresholdDepth),t.push(this.ThresholdThickness),t.push(this.TransomThickness),t.push(this.TransomOffset),t.push(this.LiningOffset),t.push(this.ThresholdOffset),t.push(this.CasingThickness),t.push(this.CasingDepth),t.push(this.ShapeAspectStyle),t.push(this.LiningToPanelOffsetX),t.push(this.LiningToPanelOffsetY),t}},G0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.PanelDepth=a,this.PanelOperation=o,this.PanelWidth=l,this.PanelPosition=c,this.ShapeAspectStyle=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new G0e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.PanelDepth),t.push(this.PanelOperation),t.push(this.PanelWidth),t.push(this.PanelPosition),t.push(this.ShapeAspectStyle),t}},V0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.OverallHeight=u,this.OverallWidth=h,this.PredefinedType=p,this.OperationType=d,this.UserDefinedOperationType=f}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++];return new V0e(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.OverallHeight),t.push(this.OverallWidth),t.push(this.PredefinedType),t.push(this.OperationType),t.push(this.UserDefinedOperationType),t}},z0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.OperationType=u,this.ConstructionType=h,this.ParameterTakesPrecedence=p,this.Sizeable=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new z0e(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.OperationType),t.push(this.ConstructionType),t.push(this.ParameterTakesPrecedence),t.push(this.Sizeable),t}},j0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h,this.OperationType=p,this.ParameterTakesPrecedence=d,this.UserDefinedOperationType=f}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++];return new j0e(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t.push(this.OperationType),t.push(this.ParameterTakesPrecedence),t.push(this.UserDefinedOperationType),t}},W0e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Name=e}static FromTape(t,r,e){let i=0,n=e[i++];return new W0e(t,r,n)}ToTape(){let t=[];return t.push(this.Name),t}},q0e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Name=e}static FromTape(t,r,e){let i=0,n=e[i++];return new q0e(t,r,n)}ToTape(){let t=[];return t.push(this.Name),t}},Y0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Y0e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},X0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new X0e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},$0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new $0e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Z0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Z0e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},K0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new K0e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},J0e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new J0e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Q0e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.EdgeStart=e,this.EdgeEnd=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Q0e(t,r,n,s)}ToTape(){let t=[];return t.push(this.EdgeStart),t.push(this.EdgeEnd),t}},eve=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.EdgeStart=e,this.EdgeEnd=i,this.EdgeGeometry=n,this.SameSense=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new eve(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.EdgeStart),t.push(this.EdgeEnd),t.push(this.EdgeGeometry),t.push(this.SameSense),t}},tve=class{constructor(t,r,e){this.expressID=t,this.type=r,this.EdgeList=e}static FromTape(t,r,e){let i=0,n=e[i++];return new tve(t,r,n)}ToTape(){let t=[];return t.push(this.EdgeList),t}},rve=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new rve(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},ive=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new ive(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},nve=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new nve(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},sve=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new sve(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},ave=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new ave(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},ove=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new ove(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},lve=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new lve(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},cve=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new cve(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},uve=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new uve(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},hve=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new hve(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},pve=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new pve(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},dve=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new dve(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},fve=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new fve(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},mve=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.AssemblyPlace=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new mve(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.AssemblyPlace),t.push(this.PredefinedType),t}},gve=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new gve(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},vve=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new vve(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},yve=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new yve(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},Tve=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.MethodOfMeasurement=a,this.Quantities=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Tve(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.MethodOfMeasurement),t.push(this.Quantities),t}},Eve=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Eve(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},bve=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Position=e}static FromTape(t,r,e){let i=0,n=e[i++];return new bve(t,r,n)}ToTape(){let t=[];return t.push(this.Position),t}},xve=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Position=e,this.SemiAxis1=i,this.SemiAxis2=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new xve(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Position),t.push(this.SemiAxis1),t.push(this.SemiAxis2),t}},Ive=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.SemiAxis1=s,this.SemiAxis2=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Ive(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.SemiAxis1),t.push(this.SemiAxis2),t}},Sve=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Sve(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},_ve=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new _ve(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},wve=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new wve(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Rve=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Rve(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Mve=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Mve(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Dve=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Dve(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Cve=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Cve(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Ave=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Ave(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Ove=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.PredefinedType=c,this.EventTriggerType=u,this.UserDefinedEventTriggerType=h,this.EventOccurenceTime=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new Ove(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.LongDescription),t.push(this.PredefinedType),t.push(this.EventTriggerType),t.push(this.UserDefinedEventTriggerType),t.push(this.EventOccurenceTime),t}},Pve=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Name=e,this.DataOrigin=i,this.UserDefinedDataOrigin=n,this.ActualDate=s,this.EarlyDate=a,this.LateDate=o,this.ScheduleDate=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new Pve(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Name),t.push(this.DataOrigin),t.push(this.UserDefinedDataOrigin),t.push(this.ActualDate),t.push(this.EarlyDate),t.push(this.LateDate),t.push(this.ScheduleDate),t}},Nve=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=c,this.ProcessType=u,this.PredefinedType=h,this.EventTriggerType=p,this.UserDefinedEventTriggerType=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new Nve(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.Identification),t.push(this.LongDescription),t.push(this.ProcessType),t.push(this.PredefinedType),t.push(this.EventTriggerType),t.push(this.UserDefinedEventTriggerType),t}},Lve=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Properties=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new Lve(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Properties),t}},Fve=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new Fve(t,r)}ToTape(){return[]}},Hve=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Location=e,this.Identification=i,this.Name=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new Hve(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Location),t.push(this.Identification),t.push(this.Name),t}},Uve=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.RelatingReference=n,this.RelatedResourceObjects=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Uve(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.RelatingReference),t.push(this.RelatedResourceObjects),t}},Bve=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Bve(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.LongName),t.push(this.PredefinedType),t}},kve=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new kve(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.LongName),t}},Gve=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Location=e,this.Identification=i,this.Name=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new Gve(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Location),t.push(this.Identification),t.push(this.Name),t}},Vve=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Location=e,this.Identification=i,this.Name=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new Vve(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Location),t.push(this.Identification),t.push(this.Name),t}},zve=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Location=e,this.Identification=i,this.Name=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new zve(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Location),t.push(this.Identification),t.push(this.Name),t}},jve=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.SweptArea=e,this.Position=i,this.ExtrudedDirection=n,this.Depth=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new jve(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.SweptArea),t.push(this.Position),t.push(this.ExtrudedDirection),t.push(this.Depth),t}},Wve=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.SweptArea=e,this.Position=i,this.ExtrudedDirection=n,this.Depth=s,this.EndSweptArea=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Wve(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.SweptArea),t.push(this.Position),t.push(this.ExtrudedDirection),t.push(this.Depth),t.push(this.EndSweptArea),t}},qve=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Bounds=e}static FromTape(t,r,e){let i=0,n=e[i++];return new qve(t,r,n)}ToTape(){let t=[];return t.push(this.Bounds),t}},Yve=class{constructor(t,r,e){this.expressID=t,this.type=r,this.FbsmFaces=e}static FromTape(t,r,e){let i=0,n=e[i++];return new Yve(t,r,n)}ToTape(){let t=[];return t.push(this.FbsmFaces),t}},Xve=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Bound=e,this.Orientation=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Xve(t,r,n,s)}ToTape(){let t=[];return t.push(this.Bound),t.push(this.Orientation),t}},$ve=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Bound=e,this.Orientation=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new $ve(t,r,n,s)}ToTape(){let t=[];return t.push(this.Bound),t.push(this.Orientation),t}},Zve=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Bounds=e,this.FaceSurface=i,this.SameSense=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new Zve(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Bounds),t.push(this.FaceSurface),t.push(this.SameSense),t}},Kve=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Outer=e}static FromTape(t,r,e){let i=0,n=e[i++];return new Kve(t,r,n)}ToTape(){let t=[];return t.push(this.Outer),t}},Jve=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Outer=e,this.Voids=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Jve(t,r,n,s)}ToTape(){let t=[];return t.push(this.Outer),t.push(this.Voids),t}},Qve=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=c,this.CompositionType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Qve(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.LongName),t.push(this.CompositionType),t}},eye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=c,this.CompositionType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new eye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.LongName),t.push(this.CompositionType),t}},tye=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Name=e,this.TensionFailureX=i,this.TensionFailureY=n,this.TensionFailureZ=s,this.CompressionFailureX=a,this.CompressionFailureY=o,this.CompressionFailureZ=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new tye(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Name),t.push(this.TensionFailureX),t.push(this.TensionFailureY),t.push(this.TensionFailureZ),t.push(this.CompressionFailureX),t.push(this.CompressionFailureY),t.push(this.CompressionFailureZ),t}},rye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new rye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},iye=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new iye(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},nye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new nye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},sye=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new sye(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},aye=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new aye(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},oye=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new oye(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},lye=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new lye(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},cye=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Name=e,this.FillStyles=i,this.ModelorDraughting=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new cye(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Name),t.push(this.FillStyles),t.push(this.ModelorDraughting),t}},uye=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.HatchLineAppearance=e,this.StartOfNextHatchLine=i,this.PointOfReferenceHatchLine=n,this.PatternStart=s,this.HatchLineAngle=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new uye(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.HatchLineAppearance),t.push(this.StartOfNextHatchLine),t.push(this.PointOfReferenceHatchLine),t.push(this.PatternStart),t.push(this.HatchLineAngle),t}},hye=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.TilingPattern=e,this.Tiles=i,this.TilingScale=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new hye(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.TilingPattern),t.push(this.Tiles),t.push(this.TilingScale),t}},pye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new pye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},dye=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new dye(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},fye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new fye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},mye=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new mye(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},gye=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.SweptArea=e,this.Position=i,this.Directrix=n,this.StartParam=s,this.EndParam=a,this.FixedReference=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new gye(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.SweptArea),t.push(this.Position),t.push(this.Directrix),t.push(this.StartParam),t.push(this.EndParam),t.push(this.FixedReference),t}},vye=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new vye(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},yye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new yye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},Tye=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Tye(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},Eye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Eye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},bye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new bye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},xye=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new xye(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Iye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Iye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Sye=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Sye(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},_ye=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new _ye(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},wye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new wye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},Rye=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Rye(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},Mye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Mye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},Dye=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Dye(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},Cye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Cye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},Aye=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Aye(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},Oye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Oye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},Pye=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Pye(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},Nye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Nye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},Lye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Lye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Fye=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Fye(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Hye=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Hye(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},Uye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Uye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},Bye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Bye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},kye=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.AssemblyPlace=h,this.PredefinedType=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new kye(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.AssemblyPlace),t.push(this.PredefinedType),t}},Gye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Gye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Vye=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Vye(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},zye=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Elements=e}static FromTape(t,r,e){let i=0,n=e[i++];return new zye(t,r,n)}ToTape(){let t=[];return t.push(this.Elements),t}},jye=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.ContextIdentifier=e,this.ContextType=i,this.CoordinateSpaceDimension=n,this.Precision=s,this.WorldCoordinateSystem=a,this.TrueNorth=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new jye(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.ContextIdentifier),t.push(this.ContextType),t.push(this.CoordinateSpaceDimension),t.push(this.Precision),t.push(this.WorldCoordinateSystem),t.push(this.TrueNorth),t}},Wye=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new Wye(t,r)}ToTape(){return[]}},qye=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.ContextIdentifier=e,this.ContextType=i,this.CoordinateSpaceDimension=n,this.Precision=s,this.WorldCoordinateSystem=a,this.TrueNorth=o,this.ParentContext=l,this.TargetScale=c,this.TargetView=u,this.UserDefinedTargetView=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new qye(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.ContextIdentifier),t.push(this.ContextType),t.push(this.CoordinateSpaceDimension),t.push(this.Precision),t.push(this.WorldCoordinateSystem),t.push(this.TrueNorth),t.push(this.ParentContext),t.push(this.TargetScale),t.push(this.TargetView),t.push(this.UserDefinedTargetView),t}},Yye=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Elements=e}static FromTape(t,r,e){let i=0,n=e[i++];return new Yye(t,r,n)}ToTape(){let t=[];return t.push(this.Elements),t}},Xye=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.UAxes=c,this.VAxes=u,this.WAxes=h,this.PredefinedType=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new Xye(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.UAxes),t.push(this.VAxes),t.push(this.WAxes),t.push(this.PredefinedType),t}},$ye=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.AxisTag=e,this.AxisCurve=i,this.SameSense=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new $ye(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.AxisTag),t.push(this.AxisCurve),t.push(this.SameSense),t}},Zye=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.PlacementRelTo=e,this.PlacementLocation=i,this.PlacementRefDirection=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new Zye(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.PlacementRelTo),t.push(this.PlacementLocation),t.push(this.PlacementRefDirection),t}},Kye=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Kye(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t}},Jye=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.BaseSurface=e,this.AgreementFlag=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Jye(t,r,n,s)}ToTape(){let t=[];return t.push(this.BaseSurface),t.push(this.AgreementFlag),t}},Qye=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Qye(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},eTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new eTe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},tTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new tTe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},rTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new rTe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},iTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.OverallWidth=s,this.OverallDepth=a,this.WebThickness=o,this.FlangeThickness=l,this.FilletRadius=c,this.FlangeEdgeRadius=u,this.FlangeSlope=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new iTe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.OverallWidth),t.push(this.OverallDepth),t.push(this.WebThickness),t.push(this.FlangeThickness),t.push(this.FilletRadius),t.push(this.FlangeEdgeRadius),t.push(this.FlangeSlope),t}},nTe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.RepeatS=e,this.RepeatT=i,this.Mode=n,this.TextureTransform=s,this.Parameter=a,this.URLReference=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new nTe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.RepeatS),t.push(this.RepeatT),t.push(this.Mode),t.push(this.TextureTransform),t.push(this.Parameter),t.push(this.URLReference),t}},sTe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.MappedTo=e,this.Opacity=i,this.Colours=n,this.ColourIndex=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new sTe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.MappedTo),t.push(this.Opacity),t.push(this.Colours),t.push(this.ColourIndex),t}},aTe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Points=e,this.Segments=i,this.SelfIntersect=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new aTe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Points),t.push(this.Segments),t.push(this.SelfIntersect),t}},oTe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.CoordIndex=e}static FromTape(t,r,e){let i=0,n=e[i++];return new oTe(t,r,n)}ToTape(){let t=[];return t.push(this.CoordIndex),t}},lTe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.CoordIndex=e,this.InnerCoordIndices=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new lTe(t,r,n,s)}ToTape(){let t=[];return t.push(this.CoordIndex),t.push(this.InnerCoordIndices),t}},cTe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Maps=e,this.MappedTo=i,this.TexCoords=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new cTe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Maps),t.push(this.MappedTo),t.push(this.TexCoords),t}},uTe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Maps=e,this.MappedTo=i,this.TexCoords=n,this.TexCoordIndex=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new uTe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Maps),t.push(this.MappedTo),t.push(this.TexCoords),t.push(this.TexCoordIndex),t}},hTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new hTe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},pTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new pTe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},dTe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Curve3D=e,this.AssociatedGeometry=i,this.MasterRepresentation=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new dTe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Curve3D),t.push(this.AssociatedGeometry),t.push(this.MasterRepresentation),t}},fTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.PredefinedType=o,this.Jurisdiction=l,this.ResponsiblePersons=c,this.LastUpdateDate=u,this.CurrentValue=h,this.OriginalValue=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new fTe(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.PredefinedType),t.push(this.Jurisdiction),t.push(this.ResponsiblePersons),t.push(this.LastUpdateDate),t.push(this.CurrentValue),t.push(this.OriginalValue),t}},mTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.StartTime=n,this.EndTime=s,this.TimeSeriesDataType=a,this.DataOrigin=o,this.UserDefinedDataOrigin=l,this.Unit=c,this.Values=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new mTe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.StartTime),t.push(this.EndTime),t.push(this.TimeSeriesDataType),t.push(this.DataOrigin),t.push(this.UserDefinedDataOrigin),t.push(this.Unit),t.push(this.Values),t}},gTe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.TimeStamp=e,this.ListValues=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new gTe(t,r,n,s)}ToTape(){let t=[];return t.push(this.TimeStamp),t.push(this.ListValues),t}},vTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new vTe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},yTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new yTe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},TTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.Depth=s,this.Width=a,this.Thickness=o,this.FilletRadius=l,this.EdgeRadius=c,this.LegSlope=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new TTe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.Depth),t.push(this.Width),t.push(this.Thickness),t.push(this.FilletRadius),t.push(this.EdgeRadius),t.push(this.LegSlope),t}},ETe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=c,this.BaseCosts=u,this.BaseQuantity=h,this.PredefinedType=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new ETe(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.LongDescription),t.push(this.Usage),t.push(this.BaseCosts),t.push(this.BaseQuantity),t.push(this.PredefinedType),t}},bTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=c,this.ResourceType=u,this.BaseCosts=h,this.BaseQuantity=p,this.PredefinedType=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new bTe(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.Identification),t.push(this.LongDescription),t.push(this.ResourceType),t.push(this.BaseCosts),t.push(this.BaseQuantity),t.push(this.PredefinedType),t}},xTe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.DataOrigin=i,this.UserDefinedDataOrigin=n,this.LagValue=s,this.DurationType=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new xTe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.DataOrigin),t.push(this.UserDefinedDataOrigin),t.push(this.LagValue),t.push(this.DurationType),t}},ITe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new ITe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},STe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new STe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},_Te=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.Name=e,this.Version=i,this.Publisher=n,this.VersionDate=s,this.Location=a,this.Description=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new _Te(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Version),t.push(this.Publisher),t.push(this.VersionDate),t.push(this.Location),t.push(this.Description),t}},wTe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.Location=e,this.Identification=i,this.Name=n,this.Description=s,this.Language=a,this.ReferencedLibrary=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new wTe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.Location),t.push(this.Identification),t.push(this.Name),t.push(this.Description),t.push(this.Language),t.push(this.ReferencedLibrary),t}},RTe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.MainPlaneAngle=e,this.SecondaryPlaneAngle=i,this.LuminousIntensity=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new RTe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.MainPlaneAngle),t.push(this.SecondaryPlaneAngle),t.push(this.LuminousIntensity),t}},MTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new MTe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},DTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new DTe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},CTe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.LightDistributionCurve=e,this.DistributionData=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new CTe(t,r,n,s)}ToTape(){let t=[];return t.push(this.LightDistributionCurve),t.push(this.DistributionData),t}},ATe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.LightColour=i,this.AmbientIntensity=n,this.Intensity=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new ATe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.LightColour),t.push(this.AmbientIntensity),t.push(this.Intensity),t}},OTe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.LightColour=i,this.AmbientIntensity=n,this.Intensity=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new OTe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.LightColour),t.push(this.AmbientIntensity),t.push(this.Intensity),t}},PTe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.LightColour=i,this.AmbientIntensity=n,this.Intensity=s,this.Orientation=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new PTe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.LightColour),t.push(this.AmbientIntensity),t.push(this.Intensity),t.push(this.Orientation),t}},NTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.Name=e,this.LightColour=i,this.AmbientIntensity=n,this.Intensity=s,this.Position=a,this.ColourAppearance=o,this.ColourTemperature=l,this.LuminousFlux=c,this.LightEmissionSource=u,this.LightDistributionDataSource=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new NTe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.Name),t.push(this.LightColour),t.push(this.AmbientIntensity),t.push(this.Intensity),t.push(this.Position),t.push(this.ColourAppearance),t.push(this.ColourTemperature),t.push(this.LuminousFlux),t.push(this.LightEmissionSource),t.push(this.LightDistributionDataSource),t}},LTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.Name=e,this.LightColour=i,this.AmbientIntensity=n,this.Intensity=s,this.Position=a,this.Radius=o,this.ConstantAttenuation=l,this.DistanceAttenuation=c,this.QuadricAttenuation=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new LTe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.Name),t.push(this.LightColour),t.push(this.AmbientIntensity),t.push(this.Intensity),t.push(this.Position),t.push(this.Radius),t.push(this.ConstantAttenuation),t.push(this.DistanceAttenuation),t.push(this.QuadricAttenuation),t}},FTe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f){this.expressID=t,this.type=r,this.Name=e,this.LightColour=i,this.AmbientIntensity=n,this.Intensity=s,this.Position=a,this.Radius=o,this.ConstantAttenuation=l,this.DistanceAttenuation=c,this.QuadricAttenuation=u,this.Orientation=h,this.ConcentrationExponent=p,this.SpreadAngle=d,this.BeamWidthAngle=f}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++];return new FTe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g)}ToTape(){let t=[];return t.push(this.Name),t.push(this.LightColour),t.push(this.AmbientIntensity),t.push(this.Intensity),t.push(this.Position),t.push(this.Radius),t.push(this.ConstantAttenuation),t.push(this.DistanceAttenuation),t.push(this.QuadricAttenuation),t.push(this.Orientation),t.push(this.ConcentrationExponent),t.push(this.SpreadAngle),t.push(this.BeamWidthAngle),t}},HTe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Pnt=e,this.Dir=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new HTe(t,r,n,s)}ToTape(){let t=[];return t.push(this.Pnt),t.push(this.Dir),t}},UTe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.StartPoint=e,this.StartDirection=i,this.SegmentLength=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new UTe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.StartPoint),t.push(this.StartDirection),t.push(this.SegmentLength),t}},BTe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.PlacementRelTo=e,this.PlacementMeasuredAlong=i,this.Distance=n,this.Orientation=s,this.CartesianPosition=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new BTe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.PlacementRelTo),t.push(this.PlacementMeasuredAlong),t.push(this.Distance),t.push(this.Orientation),t.push(this.CartesianPosition),t}},kTe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Axis=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new kTe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Axis),t}},GTe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.PlacementRelTo=e,this.RelativePlacement=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new GTe(t,r,n,s)}ToTape(){let t=[];return t.push(this.PlacementRelTo),t.push(this.RelativePlacement),t}},VTe=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new VTe(t,r)}ToTape(){return[]}},zTe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Outer=e}static FromTape(t,r,e){let i=0,n=e[i++];return new zTe(t,r,n)}ToTape(){let t=[];return t.push(this.Outer),t}},jTe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.SourceCRS=e,this.TargetCRS=i,this.Eastings=n,this.Northings=s,this.OrthogonalHeight=a,this.XAxisAbscissa=o,this.XAxisOrdinate=l,this.Scale=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new jTe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.SourceCRS),t.push(this.TargetCRS),t.push(this.Eastings),t.push(this.Northings),t.push(this.OrthogonalHeight),t.push(this.XAxisAbscissa),t.push(this.XAxisOrdinate),t.push(this.Scale),t}},WTe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.MappingSource=e,this.MappingTarget=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new WTe(t,r,n,s)}ToTape(){let t=[];return t.push(this.MappingSource),t.push(this.MappingTarget),t}},qTe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Category=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new qTe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Category),t}},YTe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.MaterialClassifications=e,this.ClassifiedMaterial=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new YTe(t,r,n,s)}ToTape(){let t=[];return t.push(this.MaterialClassifications),t.push(this.ClassifiedMaterial),t}},XTe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Material=n,this.Fraction=s,this.Category=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new XTe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Material),t.push(this.Fraction),t.push(this.Category),t}},$Te=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.MaterialConstituents=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new $Te(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.MaterialConstituents),t}},ZTe=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new ZTe(t,r)}ToTape(){return[]}},KTe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Representations=n,this.RepresentedMaterial=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new KTe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Representations),t.push(this.RepresentedMaterial),t}},JTe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Material=e,this.LayerThickness=i,this.IsVentilated=n,this.Name=s,this.Description=a,this.Category=o,this.Priority=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new JTe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Material),t.push(this.LayerThickness),t.push(this.IsVentilated),t.push(this.Name),t.push(this.Description),t.push(this.Category),t.push(this.Priority),t}},QTe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.MaterialLayers=e,this.LayerSetName=i,this.Description=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new QTe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.MaterialLayers),t.push(this.LayerSetName),t.push(this.Description),t}},eEe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.ForLayerSet=e,this.LayerSetDirection=i,this.DirectionSense=n,this.OffsetFromReferenceLine=s,this.ReferenceExtent=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new eEe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.ForLayerSet),t.push(this.LayerSetDirection),t.push(this.DirectionSense),t.push(this.OffsetFromReferenceLine),t.push(this.ReferenceExtent),t}},tEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.Material=e,this.LayerThickness=i,this.IsVentilated=n,this.Name=s,this.Description=a,this.Category=o,this.Priority=l,this.OffsetDirection=c,this.OffsetValues=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new tEe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.Material),t.push(this.LayerThickness),t.push(this.IsVentilated),t.push(this.Name),t.push(this.Description),t.push(this.Category),t.push(this.Priority),t.push(this.OffsetDirection),t.push(this.OffsetValues),t}},rEe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Materials=e}static FromTape(t,r,e){let i=0,n=e[i++];return new rEe(t,r,n)}ToTape(){let t=[];return t.push(this.Materials),t}},iEe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Material=n,this.Profile=s,this.Priority=a,this.Category=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new iEe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Material),t.push(this.Profile),t.push(this.Priority),t.push(this.Category),t}},nEe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.MaterialProfiles=n,this.CompositeProfile=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new nEe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.MaterialProfiles),t.push(this.CompositeProfile),t}},sEe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.ForProfileSet=e,this.CardinalPoint=i,this.ReferenceExtent=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new sEe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.ForProfileSet),t.push(this.CardinalPoint),t.push(this.ReferenceExtent),t}},aEe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.ForProfileSet=e,this.CardinalPoint=i,this.ReferenceExtent=n,this.ForProfileEndSet=s,this.CardinalEndPoint=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new aEe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.ForProfileSet),t.push(this.CardinalPoint),t.push(this.ReferenceExtent),t.push(this.ForProfileEndSet),t.push(this.CardinalEndPoint),t}},oEe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Material=n,this.Profile=s,this.Priority=a,this.Category=o,this.OffsetValues=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new oEe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Material),t.push(this.Profile),t.push(this.Priority),t.push(this.Category),t.push(this.OffsetValues),t}},lEe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Properties=n,this.Material=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new lEe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Properties),t.push(this.Material),t}},cEe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.RelatingMaterial=n,this.RelatedMaterials=s,this.Expression=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new cEe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.RelatingMaterial),t.push(this.RelatedMaterials),t.push(this.Expression),t}},uEe=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new uEe(t,r)}ToTape(){return[]}},hEe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.ValueComponent=e,this.UnitComponent=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new hEe(t,r,n,s)}ToTape(){let t=[];return t.push(this.ValueComponent),t.push(this.UnitComponent),t}},pEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.NominalDiameter=u,this.NominalLength=h,this.PredefinedType=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new pEe(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.NominalDiameter),t.push(this.NominalLength),t.push(this.PredefinedType),t}},dEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h,this.NominalDiameter=p,this.NominalLength=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new dEe(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t.push(this.NominalDiameter),t.push(this.NominalLength),t}},fEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new fEe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},mEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new mEe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},gEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new gEe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},vEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new vEe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},yEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new yEe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},TEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.ConstraintGrade=n,this.ConstraintSource=s,this.CreatingActor=a,this.CreationTime=o,this.UserDefinedGrade=l,this.Benchmark=c,this.ValueSource=u,this.DataValue=h,this.ReferencePath=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new TEe(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.ConstraintGrade),t.push(this.ConstraintSource),t.push(this.CreatingActor),t.push(this.CreationTime),t.push(this.UserDefinedGrade),t.push(this.Benchmark),t.push(this.ValueSource),t.push(this.DataValue),t.push(this.ReferencePath),t}},EEe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.ParentProfile=n,this.Operator=s,this.Label=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new EEe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.ParentProfile),t.push(this.Operator),t.push(this.Label),t}},bEe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Currency=e}static FromTape(t,r,e){let i=0,n=e[i++];return new bEe(t,r,n)}ToTape(){let t=[];return t.push(this.Currency),t}},xEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new xEe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},IEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new IEe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},SEe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Dimensions=e,this.UnitType=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new SEe(t,r,n,s)}ToTape(){let t=[];return t.push(this.Dimensions),t.push(this.UnitType),t}},_Ee=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new _Ee(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t}},wEe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new wEe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t}},REe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.PlacementRelTo=e}static FromTape(t,r,e){let i=0,n=e[i++];return new REe(t,r,n)}ToTape(){let t=[];return t.push(this.PlacementRelTo),t}},MEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.ConstraintGrade=n,this.ConstraintSource=s,this.CreatingActor=a,this.CreationTime=o,this.UserDefinedGrade=l,this.BenchmarkValues=c,this.LogicalAggregator=u,this.ObjectiveQualifier=h,this.UserDefinedQualifier=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new MEe(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.ConstraintGrade),t.push(this.ConstraintSource),t.push(this.CreatingActor),t.push(this.CreationTime),t.push(this.UserDefinedGrade),t.push(this.BenchmarkValues),t.push(this.LogicalAggregator),t.push(this.ObjectiveQualifier),t.push(this.UserDefinedQualifier),t}},DEe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.TheActor=o,this.PredefinedType=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new DEe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.TheActor),t.push(this.PredefinedType),t}},CEe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.BasisCurve=e}static FromTape(t,r,e){let i=0,n=e[i++];return new CEe(t,r,n)}ToTape(){let t=[];return t.push(this.BasisCurve),t}},AEe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.BasisCurve=e,this.Distance=i,this.SelfIntersect=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new AEe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.BasisCurve),t.push(this.Distance),t.push(this.SelfIntersect),t}},OEe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.BasisCurve=e,this.Distance=i,this.SelfIntersect=n,this.RefDirection=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new OEe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.BasisCurve),t.push(this.Distance),t.push(this.SelfIntersect),t.push(this.RefDirection),t}},PEe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.BasisCurve=e,this.OffsetValues=i,this.Tag=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new PEe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.BasisCurve),t.push(this.OffsetValues),t.push(this.Tag),t}},NEe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.CfsFaces=e}static FromTape(t,r,e){let i=0,n=e[i++];return new NEe(t,r,n)}ToTape(){let t=[];return t.push(this.CfsFaces),t}},LEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new LEe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},FEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new FEe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},HEe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Identification=e,this.Name=i,this.Description=n,this.Roles=s,this.Addresses=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new HEe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Identification),t.push(this.Name),t.push(this.Description),t.push(this.Roles),t.push(this.Addresses),t}},UEe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.RelatingOrganization=n,this.RelatedOrganizations=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new UEe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.RelatingOrganization),t.push(this.RelatedOrganizations),t}},BEe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.LateralAxisDirection=e,this.VerticalAxisDirection=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new BEe(t,r,n,s)}ToTape(){let t=[];return t.push(this.LateralAxisDirection),t.push(this.VerticalAxisDirection),t}},kEe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.EdgeStart=e,this.EdgeEnd=i,this.EdgeElement=n,this.Orientation=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new kEe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.EdgeStart),t.push(this.EdgeEnd),t.push(this.EdgeElement),t.push(this.Orientation),t}},GEe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Segments=e,this.SelfIntersect=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new GEe(t,r,n,s)}ToTape(){let t=[];return t.push(this.Segments),t.push(this.SelfIntersect),t}},VEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new VEe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},zEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new zEe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},jEe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.OwningUser=e,this.OwningApplication=i,this.State=n,this.ChangeAction=s,this.LastModifiedDate=a,this.LastModifyingUser=o,this.LastModifyingApplication=l,this.CreationDate=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new jEe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.OwningUser),t.push(this.OwningApplication),t.push(this.State),t.push(this.ChangeAction),t.push(this.LastModifiedDate),t.push(this.LastModifyingUser),t.push(this.LastModifyingApplication),t.push(this.CreationDate),t}},WEe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new WEe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t}},qEe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.EdgeList=e}static FromTape(t,r,e){let i=0,n=e[i++];return new qEe(t,r,n)}ToTape(){let t=[];return t.push(this.EdgeList),t}},YEe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.BasisSurface=e,this.ReferenceCurve=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new YEe(t,r,n,s)}ToTape(){let t=[];return t.push(this.BasisSurface),t.push(this.ReferenceCurve),t}},XEe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LifeCyclePhase=l,this.PredefinedType=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new XEe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.LifeCyclePhase),t.push(this.PredefinedType),t}},$Ee=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.OperationType=a,this.PanelPosition=o,this.FrameDepth=l,this.FrameThickness=c,this.ShapeAspectStyle=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new $Ee(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.OperationType),t.push(this.PanelPosition),t.push(this.FrameDepth),t.push(this.FrameThickness),t.push(this.ShapeAspectStyle),t}},ZEe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.PredefinedType=l,this.Status=c,this.LongDescription=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new ZEe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.PredefinedType),t.push(this.Status),t.push(this.LongDescription),t}},KEe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.Identification=e,this.FamilyName=i,this.GivenName=n,this.MiddleNames=s,this.PrefixTitles=a,this.SuffixTitles=o,this.Roles=l,this.Addresses=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new KEe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.Identification),t.push(this.FamilyName),t.push(this.GivenName),t.push(this.MiddleNames),t.push(this.PrefixTitles),t.push(this.SuffixTitles),t.push(this.Roles),t.push(this.Addresses),t}},JEe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.ThePerson=e,this.TheOrganization=i,this.Roles=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new JEe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.ThePerson),t.push(this.TheOrganization),t.push(this.Roles),t}},QEe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.HasQuantities=n,this.Discrimination=s,this.Quality=a,this.Usage=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new QEe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.HasQuantities),t.push(this.Discrimination),t.push(this.Quality),t.push(this.Usage),t}},e1e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Name=e,this.Description=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new e1e(t,r,n,s)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t}},t1e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Unit=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new t1e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Unit),t}},r1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u,this.ConstructionType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new r1e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t.push(this.ConstructionType),t}},i1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new i1e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},n1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new n1e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},s1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new s1e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},a1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new a1e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},o1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new o1e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},l1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.RepeatS=e,this.RepeatT=i,this.Mode=n,this.TextureTransform=s,this.Parameter=a,this.Width=o,this.Height=l,this.ColourComponents=c,this.Pixel=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new l1e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.RepeatS),t.push(this.RepeatT),t.push(this.Mode),t.push(this.TextureTransform),t.push(this.Parameter),t.push(this.Width),t.push(this.Height),t.push(this.ColourComponents),t.push(this.Pixel),t}},c1e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Location=e}static FromTape(t,r,e){let i=0,n=e[i++];return new c1e(t,r,n)}ToTape(){let t=[];return t.push(this.Location),t}},u1e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.SizeInX=e,this.SizeInY=i,this.Placement=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new u1e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.SizeInX),t.push(this.SizeInY),t.push(this.Placement),t}},h1e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.SizeInX=e,this.SizeInY=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new h1e(t,r,n,s)}ToTape(){let t=[];return t.push(this.SizeInX),t.push(this.SizeInY),t}},p1e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Position=e}static FromTape(t,r,e){let i=0,n=e[i++];return new p1e(t,r,n)}ToTape(){let t=[];return t.push(this.Position),t}},d1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new d1e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},f1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new f1e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},m1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new m1e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},g1e=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new g1e(t,r)}ToTape(){return[]}},v1e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.BasisCurve=e,this.PointParameter=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new v1e(t,r,n,s)}ToTape(){let t=[];return t.push(this.BasisCurve),t.push(this.PointParameter),t}},y1e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.BasisSurface=e,this.PointParameterU=i,this.PointParameterV=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new y1e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.BasisSurface),t.push(this.PointParameterU),t.push(this.PointParameterV),t}},T1e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Polygon=e}static FromTape(t,r,e){let i=0,n=e[i++];return new T1e(t,r,n)}ToTape(){let t=[];return t.push(this.Polygon),t}},E1e=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.BaseSurface=e,this.AgreementFlag=i,this.Position=n,this.PolygonalBoundary=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new E1e(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.BaseSurface),t.push(this.AgreementFlag),t.push(this.Position),t.push(this.PolygonalBoundary),t}},b1e=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Coordinates=e,this.Closed=i,this.Faces=n,this.PnIndex=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new b1e(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Coordinates),t.push(this.Closed),t.push(this.Faces),t.push(this.PnIndex),t}},x1e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Points=e}static FromTape(t,r,e){let i=0,n=e[i++];return new x1e(t,r,n)}ToTape(){let t=[];return t.push(this.Points),t}},I1e=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new I1e(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t}},S1e=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new S1e(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t}},_1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.Purpose=e,this.Description=i,this.UserDefinedPurpose=n,this.InternalLocation=s,this.AddressLines=a,this.PostalBox=o,this.Town=l,this.Region=c,this.PostalCode=u,this.Country=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new _1e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.Purpose),t.push(this.Description),t.push(this.UserDefinedPurpose),t.push(this.InternalLocation),t.push(this.AddressLines),t.push(this.PostalBox),t.push(this.Town),t.push(this.Region),t.push(this.PostalCode),t.push(this.Country),t}},w1e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Name=e}static FromTape(t,r,e){let i=0,n=e[i++];return new w1e(t,r,n)}ToTape(){let t=[];return t.push(this.Name),t}},R1e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Name=e}static FromTape(t,r,e){let i=0,n=e[i++];return new R1e(t,r,n)}ToTape(){let t=[];return t.push(this.Name),t}},M1e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Name=e}static FromTape(t,r,e){let i=0,n=e[i++];return new M1e(t,r,n)}ToTape(){let t=[];return t.push(this.Name),t}},D1e=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new D1e(t,r)}ToTape(){return[]}},C1e=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new C1e(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t}},A1e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Name=e}static FromTape(t,r,e){let i=0,n=e[i++];return new A1e(t,r,n)}ToTape(){let t=[];return t.push(this.Name),t}},O1e=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new O1e(t,r)}ToTape(){return[]}},P1e=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.AssignedItems=n,this.Identifier=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new P1e(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.AssignedItems),t.push(this.Identifier),t}},N1e=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.AssignedItems=n,this.Identifier=s,this.LayerOn=a,this.LayerFrozen=o,this.LayerBlocked=l,this.LayerStyles=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new N1e(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.AssignedItems),t.push(this.Identifier),t.push(this.LayerOn),t.push(this.LayerFrozen),t.push(this.LayerBlocked),t.push(this.LayerStyles),t}},L1e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Name=e}static FromTape(t,r,e){let i=0,n=e[i++];return new L1e(t,r,n)}ToTape(){let t=[];return t.push(this.Name),t}},F1e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Styles=e}static FromTape(t,r,e){let i=0,n=e[i++];return new F1e(t,r,n)}ToTape(){let t=[];return t.push(this.Styles),t}},H1e=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.PredefinedType=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new H1e(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.LongDescription),t.push(this.PredefinedType),t}},U1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=c,this.ProcessType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new U1e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.Identification),t.push(this.LongDescription),t.push(this.ProcessType),t.push(this.PredefinedType),t}},B1e=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new B1e(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.LongDescription),t}},k1e=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new k1e(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t}},G1e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Representations=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new G1e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Representations),t}},V1e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Representations=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new V1e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Representations),t}},z1e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new z1e(t,r,n,s)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t}},j1e=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Properties=n,this.ProfileDefinition=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new j1e(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Properties),t.push(this.ProfileDefinition),t}},W1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.LongName=o,this.Phase=l,this.RepresentationContexts=c,this.UnitsInContext=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new W1e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.LongName),t.push(this.Phase),t.push(this.RepresentationContexts),t.push(this.UnitsInContext),t}},q1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.LongName=o,this.Phase=l,this.RepresentationContexts=c,this.UnitsInContext=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new q1e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.LongName),t.push(this.Phase),t.push(this.RepresentationContexts),t.push(this.UnitsInContext),t}},Y1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.PredefinedType=l,this.Status=c,this.LongDescription=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Y1e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.PredefinedType),t.push(this.Status),t.push(this.LongDescription),t}},X1e=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.GeodeticDatum=n,this.VerticalDatum=s,this.MapProjection=a,this.MapZone=o,this.MapUnit=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new X1e(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.GeodeticDatum),t.push(this.VerticalDatum),t.push(this.MapProjection),t.push(this.MapZone),t.push(this.MapUnit),t}},$1e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new $1e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Z1e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Name=e,this.Description=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Z1e(t,r,n,s)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t}},K1e=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new K1e(t,r)}ToTape(){return[]}},J1e=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.UpperBoundValue=n,this.LowerBoundValue=s,this.Unit=a,this.SetPointValue=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new J1e(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.UpperBoundValue),t.push(this.LowerBoundValue),t.push(this.Unit),t.push(this.SetPointValue),t}},Q1e=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Q1e(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t}},ebe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.DependingProperty=n,this.DependantProperty=s,this.Expression=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new ebe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.DependingProperty),t.push(this.DependantProperty),t.push(this.Expression),t}},tbe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.EnumerationValues=n,this.EnumerationReference=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new tbe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.EnumerationValues),t.push(this.EnumerationReference),t}},rbe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Name=e,this.EnumerationValues=i,this.Unit=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new rbe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Name),t.push(this.EnumerationValues),t.push(this.Unit),t}},ibe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.ListValues=n,this.Unit=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new ibe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.ListValues),t.push(this.Unit),t}},nbe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.UsageName=n,this.PropertyReference=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new nbe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.UsageName),t.push(this.PropertyReference),t}},sbe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.HasProperties=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new sbe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.HasProperties),t}},abe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new abe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t}},obe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.TemplateType=a,this.ApplicableEntity=o,this.HasPropertyTemplates=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new obe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.TemplateType),t.push(this.ApplicableEntity),t.push(this.HasPropertyTemplates),t}},lbe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.NominalValue=n,this.Unit=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new lbe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.NominalValue),t.push(this.Unit),t}},cbe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.DefiningValues=n,this.DefinedValues=s,this.Expression=a,this.DefiningUnit=o,this.DefinedUnit=l,this.CurveInterpolation=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new cbe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.DefiningValues),t.push(this.DefinedValues),t.push(this.Expression),t.push(this.DefiningUnit),t.push(this.DefinedUnit),t.push(this.CurveInterpolation),t}},ube=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new ube(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t}},hbe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new hbe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t}},pbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new pbe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},dbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new dbe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},fbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new fbe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},mbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new mbe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},gbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.ProxyType=c,this.Tag=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new gbe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.ProxyType),t.push(this.Tag),t}},vbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new vbe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},ybe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new ybe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Tbe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Unit=n,this.AreaValue=s,this.Formula=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Tbe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Unit),t.push(this.AreaValue),t.push(this.Formula),t}},Ebe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Unit=n,this.CountValue=s,this.Formula=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Ebe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Unit),t.push(this.CountValue),t.push(this.Formula),t}},bbe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Unit=n,this.LengthValue=s,this.Formula=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new bbe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Unit),t.push(this.LengthValue),t.push(this.Formula),t}},xbe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new xbe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t}},Ibe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Unit=n,this.TimeValue=s,this.Formula=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Ibe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Unit),t.push(this.TimeValue),t.push(this.Formula),t}},Sbe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Unit=n,this.VolumeValue=s,this.Formula=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Sbe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Unit),t.push(this.VolumeValue),t.push(this.Formula),t}},_be=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.Unit=n,this.WeightValue=s,this.Formula=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new _be(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.Unit),t.push(this.WeightValue),t.push(this.Formula),t}},wbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new wbe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Rbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Rbe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Mbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Mbe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Dbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Dbe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Cbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Cbe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Abe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Abe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Obe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.Degree=e,this.ControlPointsList=i,this.CurveForm=n,this.ClosedCurve=s,this.SelfIntersect=a,this.KnotMultiplicities=o,this.Knots=l,this.KnotSpec=c,this.WeightsData=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Obe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.Degree),t.push(this.ControlPointsList),t.push(this.CurveForm),t.push(this.ClosedCurve),t.push(this.SelfIntersect),t.push(this.KnotMultiplicities),t.push(this.Knots),t.push(this.KnotSpec),t.push(this.WeightsData),t}},Pbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f){this.expressID=t,this.type=r,this.UDegree=e,this.VDegree=i,this.ControlPointsList=n,this.SurfaceForm=s,this.UClosed=a,this.VClosed=o,this.SelfIntersect=l,this.UMultiplicities=c,this.VMultiplicities=u,this.UKnots=h,this.VKnots=p,this.KnotSpec=d,this.WeightsData=f}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++];return new Pbe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g)}ToTape(){let t=[];return t.push(this.UDegree),t.push(this.VDegree),t.push(this.ControlPointsList),t.push(this.SurfaceForm),t.push(this.UClosed),t.push(this.VClosed),t.push(this.SelfIntersect),t.push(this.UMultiplicities),t.push(this.VMultiplicities),t.push(this.UKnots),t.push(this.VKnots),t.push(this.KnotSpec),t.push(this.WeightsData),t}},Nbe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.XDim=s,this.YDim=a,this.WallThickness=o,this.InnerFilletRadius=l,this.OuterFilletRadius=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Nbe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.XDim),t.push(this.YDim),t.push(this.WallThickness),t.push(this.InnerFilletRadius),t.push(this.OuterFilletRadius),t}},Lbe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.XDim=s,this.YDim=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Lbe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.XDim),t.push(this.YDim),t}},Fbe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Position=e,this.XLength=i,this.YLength=n,this.Height=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Fbe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Position),t.push(this.XLength),t.push(this.YLength),t.push(this.Height),t}},Hbe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.BasisSurface=e,this.U1=i,this.V1=n,this.U2=s,this.V2=a,this.Usense=o,this.Vsense=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new Hbe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.BasisSurface),t.push(this.U1),t.push(this.V1),t.push(this.U2),t.push(this.V2),t.push(this.Usense),t.push(this.Vsense),t}},Ube=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.RecurrenceType=e,this.DayComponent=i,this.WeekdayComponent=n,this.MonthComponent=s,this.Position=a,this.Interval=o,this.Occurrences=l,this.TimePeriods=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Ube(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.RecurrenceType),t.push(this.DayComponent),t.push(this.WeekdayComponent),t.push(this.MonthComponent),t.push(this.Position),t.push(this.Interval),t.push(this.Occurrences),t.push(this.TimePeriods),t}},Bbe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.TypeIdentifier=e,this.AttributeIdentifier=i,this.InstanceName=n,this.ListPositions=s,this.InnerReference=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new Bbe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.TypeIdentifier),t.push(this.AttributeIdentifier),t.push(this.InstanceName),t.push(this.ListPositions),t.push(this.InnerReference),t}},kbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.PredefinedType=c,this.RestartDistance=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new kbe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.PredefinedType),t.push(this.RestartDistance),t}},Gbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.StartTime=n,this.EndTime=s,this.TimeSeriesDataType=a,this.DataOrigin=o,this.UserDefinedDataOrigin=l,this.Unit=c,this.TimeStep=u,this.Values=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Gbe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.StartTime),t.push(this.EndTime),t.push(this.TimeSeriesDataType),t.push(this.DataOrigin),t.push(this.UserDefinedDataOrigin),t.push(this.Unit),t.push(this.TimeStep),t.push(this.Values),t}},Vbe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.TotalCrossSectionArea=e,this.SteelGrade=i,this.BarSurface=n,this.EffectiveDepth=s,this.NominalBarDiameter=a,this.BarCount=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Vbe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.TotalCrossSectionArea),t.push(this.SteelGrade),t.push(this.BarSurface),t.push(this.EffectiveDepth),t.push(this.NominalBarDiameter),t.push(this.BarCount),t}},zbe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.DefinitionType=a,this.ReinforcementSectionDefinitions=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new zbe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.DefinitionType),t.push(this.ReinforcementSectionDefinitions),t}},jbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.SteelGrade=u,this.NominalDiameter=h,this.CrossSectionArea=p,this.BarLength=d,this.PredefinedType=f,this.BarSurface=m}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++];return new jbe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.SteelGrade),t.push(this.NominalDiameter),t.push(this.CrossSectionArea),t.push(this.BarLength),t.push(this.PredefinedType),t.push(this.BarSurface),t}},Wbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m,g,y){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h,this.NominalDiameter=p,this.CrossSectionArea=d,this.BarLength=f,this.BarSurface=m,this.BendingShapeCode=g,this.BendingParameters=y}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++],E=e[i++],b=e[i++];return new Wbe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t.push(this.NominalDiameter),t.push(this.CrossSectionArea),t.push(this.BarLength),t.push(this.BarSurface),t.push(this.BendingShapeCode),t.push(this.BendingParameters),t}},qbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.SteelGrade=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new qbe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.SteelGrade),t}},Ybe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Ybe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},Xbe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.SteelGrade=u,this.MeshLength=h,this.MeshWidth=p,this.LongitudinalBarNominalDiameter=d,this.TransverseBarNominalDiameter=f,this.LongitudinalBarCrossSectionArea=m,this.TransverseBarCrossSectionArea=g,this.LongitudinalBarSpacing=y,this.TransverseBarSpacing=E,this.PredefinedType=b}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++],E=e[i++],b=e[i++],x=e[i++],S=e[i++];return new Xbe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b,x,S)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.SteelGrade),t.push(this.MeshLength),t.push(this.MeshWidth),t.push(this.LongitudinalBarNominalDiameter),t.push(this.TransverseBarNominalDiameter),t.push(this.LongitudinalBarCrossSectionArea),t.push(this.TransverseBarCrossSectionArea),t.push(this.LongitudinalBarSpacing),t.push(this.TransverseBarSpacing),t.push(this.PredefinedType),t}},$be=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b,x,S){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h,this.MeshLength=p,this.MeshWidth=d,this.LongitudinalBarNominalDiameter=f,this.TransverseBarNominalDiameter=m,this.LongitudinalBarCrossSectionArea=g,this.TransverseBarCrossSectionArea=y,this.LongitudinalBarSpacing=E,this.TransverseBarSpacing=b,this.BendingShapeCode=x,this.BendingParameters=S}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++],E=e[i++],b=e[i++],x=e[i++],S=e[i++],D=e[i++],P=e[i++];return new $be(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b,x,S,D,P)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t.push(this.MeshLength),t.push(this.MeshWidth),t.push(this.LongitudinalBarNominalDiameter),t.push(this.TransverseBarNominalDiameter),t.push(this.LongitudinalBarCrossSectionArea),t.push(this.TransverseBarCrossSectionArea),t.push(this.LongitudinalBarSpacing),t.push(this.TransverseBarSpacing),t.push(this.BendingShapeCode),t.push(this.BendingParameters),t}},Zbe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingObject=a,this.RelatedObjects=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Zbe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingObject),t.push(this.RelatedObjects),t}},Kbe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Kbe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatedObjectsType),t}},Jbe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingActor=l,this.ActingRole=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Jbe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatedObjectsType),t.push(this.RelatingActor),t.push(this.ActingRole),t}},Qbe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingControl=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new Qbe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatedObjectsType),t.push(this.RelatingControl),t}},exe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingGroup=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new exe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatedObjectsType),t.push(this.RelatingGroup),t}},txe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingGroup=l,this.Factor=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new txe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatedObjectsType),t.push(this.RelatingGroup),t.push(this.Factor),t}},rxe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingProcess=l,this.QuantityInProcess=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new rxe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatedObjectsType),t.push(this.RelatingProcess),t.push(this.QuantityInProcess),t}},ixe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingProduct=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new ixe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatedObjectsType),t.push(this.RelatingProduct),t}},nxe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingResource=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new nxe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatedObjectsType),t.push(this.RelatingResource),t}},sxe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new sxe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t}},axe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingApproval=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new axe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatingApproval),t}},oxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingClassification=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new oxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatingClassification),t}},lxe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.Intent=o,this.RelatingConstraint=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new lxe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.Intent),t.push(this.RelatingConstraint),t}},cxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingDocument=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new cxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatingDocument),t}},uxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingLibrary=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new uxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatingLibrary),t}},hxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingMaterial=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new hxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatingMaterial),t}},pxe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new pxe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t}},dxe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ConnectionGeometry=a,this.RelatingElement=o,this.RelatedElement=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new dxe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ConnectionGeometry),t.push(this.RelatingElement),t.push(this.RelatedElement),t}},fxe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ConnectionGeometry=a,this.RelatingElement=o,this.RelatedElement=l,this.RelatingPriorities=c,this.RelatedPriorities=u,this.RelatedConnectionType=h,this.RelatingConnectionType=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new fxe(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ConnectionGeometry),t.push(this.RelatingElement),t.push(this.RelatedElement),t.push(this.RelatingPriorities),t.push(this.RelatedPriorities),t.push(this.RelatedConnectionType),t.push(this.RelatingConnectionType),t}},mxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingPort=a,this.RelatedElement=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new mxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingPort),t.push(this.RelatedElement),t}},gxe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingPort=a,this.RelatedPort=o,this.RealizingElement=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new gxe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingPort),t.push(this.RelatedPort),t.push(this.RealizingElement),t}},vxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingElement=a,this.RelatedStructuralActivity=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new vxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingElement),t.push(this.RelatedStructuralActivity),t}},yxe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingStructuralMember=a,this.RelatedStructuralConnection=o,this.AppliedCondition=l,this.AdditionalConditions=c,this.SupportedLength=u,this.ConditionCoordinateSystem=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new yxe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingStructuralMember),t.push(this.RelatedStructuralConnection),t.push(this.AppliedCondition),t.push(this.AdditionalConditions),t.push(this.SupportedLength),t.push(this.ConditionCoordinateSystem),t}},Txe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingStructuralMember=a,this.RelatedStructuralConnection=o,this.AppliedCondition=l,this.AdditionalConditions=c,this.SupportedLength=u,this.ConditionCoordinateSystem=h,this.ConnectionConstraint=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new Txe(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingStructuralMember),t.push(this.RelatedStructuralConnection),t.push(this.AppliedCondition),t.push(this.AdditionalConditions),t.push(this.SupportedLength),t.push(this.ConditionCoordinateSystem),t.push(this.ConnectionConstraint),t}},Exe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ConnectionGeometry=a,this.RelatingElement=o,this.RelatedElement=l,this.RealizingElements=c,this.ConnectionType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Exe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ConnectionGeometry),t.push(this.RelatingElement),t.push(this.RelatedElement),t.push(this.RealizingElements),t.push(this.ConnectionType),t}},bxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedElements=a,this.RelatingStructure=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new bxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedElements),t.push(this.RelatingStructure),t}},xxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingBuildingElement=a,this.RelatedCoverings=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new xxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingBuildingElement),t.push(this.RelatedCoverings),t}},Ixe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingSpace=a,this.RelatedCoverings=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Ixe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingSpace),t.push(this.RelatedCoverings),t}},Sxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingContext=a,this.RelatedDefinitions=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Sxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingContext),t.push(this.RelatedDefinitions),t}},_xe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new _xe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t}},wxe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new wxe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t}},Rxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingObject=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Rxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatingObject),t}},Mxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingPropertyDefinition=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Mxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatingPropertyDefinition),t}},Dxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedPropertySets=a,this.RelatingTemplate=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Dxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedPropertySets),t.push(this.RelatingTemplate),t}},Cxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingType=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Cxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedObjects),t.push(this.RelatingType),t}},Axe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingOpeningElement=a,this.RelatedBuildingElement=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Axe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingOpeningElement),t.push(this.RelatedBuildingElement),t}},Oxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedControlElements=a,this.RelatingFlowElement=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Oxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedControlElements),t.push(this.RelatingFlowElement),t}},Pxe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingElement=a,this.RelatedElement=o,this.InterferenceGeometry=l,this.InterferenceType=c,this.ImpliedOrder=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Pxe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingElement),t.push(this.RelatedElement),t.push(this.InterferenceGeometry),t.push(this.InterferenceType),t.push(this.ImpliedOrder),t}},Nxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingObject=a,this.RelatedObjects=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Nxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingObject),t.push(this.RelatedObjects),t}},Lxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingPositioningElement=a,this.RelatedProducts=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Lxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingPositioningElement),t.push(this.RelatedProducts),t}},Fxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingElement=a,this.RelatedFeatureElement=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Fxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingElement),t.push(this.RelatedFeatureElement),t}},Hxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatedElements=a,this.RelatingStructure=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Hxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatedElements),t.push(this.RelatingStructure),t}},Uxe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingProcess=a,this.RelatedProcess=o,this.TimeLag=l,this.SequenceType=c,this.UserDefinedSequenceType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Uxe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingProcess),t.push(this.RelatedProcess),t.push(this.TimeLag),t.push(this.SequenceType),t.push(this.UserDefinedSequenceType),t}},Bxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingSystem=a,this.RelatedBuildings=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Bxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingSystem),t.push(this.RelatedBuildings),t}},kxe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingSpace=a,this.RelatedBuildingElement=o,this.ConnectionGeometry=l,this.PhysicalOrVirtualBoundary=c,this.InternalOrExternalBoundary=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new kxe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingSpace),t.push(this.RelatedBuildingElement),t.push(this.ConnectionGeometry),t.push(this.PhysicalOrVirtualBoundary),t.push(this.InternalOrExternalBoundary),t}},Gxe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingSpace=a,this.RelatedBuildingElement=o,this.ConnectionGeometry=l,this.PhysicalOrVirtualBoundary=c,this.InternalOrExternalBoundary=u,this.ParentBoundary=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Gxe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingSpace),t.push(this.RelatedBuildingElement),t.push(this.ConnectionGeometry),t.push(this.PhysicalOrVirtualBoundary),t.push(this.InternalOrExternalBoundary),t.push(this.ParentBoundary),t}},Vxe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingSpace=a,this.RelatedBuildingElement=o,this.ConnectionGeometry=l,this.PhysicalOrVirtualBoundary=c,this.InternalOrExternalBoundary=u,this.ParentBoundary=h,this.CorrespondingBoundary=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new Vxe(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingSpace),t.push(this.RelatedBuildingElement),t.push(this.ConnectionGeometry),t.push(this.PhysicalOrVirtualBoundary),t.push(this.InternalOrExternalBoundary),t.push(this.ParentBoundary),t.push(this.CorrespondingBoundary),t}},zxe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.RelatingBuildingElement=a,this.RelatedOpeningElement=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new zxe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.RelatingBuildingElement),t.push(this.RelatedOpeningElement),t}},jxe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new jxe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t}},Wxe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Transition=e,this.SameSense=i,this.ParentCurve=n,this.ParamLength=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Wxe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Transition),t.push(this.SameSense),t.push(this.ParentCurve),t.push(this.ParamLength),t}},qxe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.ContextOfItems=e,this.RepresentationIdentifier=i,this.RepresentationType=n,this.Items=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new qxe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.ContextOfItems),t.push(this.RepresentationIdentifier),t.push(this.RepresentationType),t.push(this.Items),t}},Yxe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.ContextIdentifier=e,this.ContextType=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Yxe(t,r,n,s)}ToTape(){let t=[];return t.push(this.ContextIdentifier),t.push(this.ContextType),t}},Xxe=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new Xxe(t,r)}ToTape(){return[]}},$xe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.MappingOrigin=e,this.MappedRepresentation=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new $xe(t,r,n,s)}ToTape(){let t=[];return t.push(this.MappingOrigin),t.push(this.MappedRepresentation),t}},Zxe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new Zxe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.LongDescription),t}},Kxe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.RelatedResourceObjects=n,this.RelatingApproval=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Kxe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.RelatedResourceObjects),t.push(this.RelatingApproval),t}},Jxe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.RelatingConstraint=n,this.RelatedResourceObjects=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new Jxe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.RelatingConstraint),t.push(this.RelatedResourceObjects),t}},Qxe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Name=e,this.Description=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Qxe(t,r,n,s)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t}},eIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b){this.expressID=t,this.type=r,this.Name=e,this.DataOrigin=i,this.UserDefinedDataOrigin=n,this.ScheduleWork=s,this.ScheduleUsage=a,this.ScheduleStart=o,this.ScheduleFinish=l,this.ScheduleContour=c,this.LevelingDelay=u,this.IsOverAllocated=h,this.StatusTime=p,this.ActualWork=d,this.ActualUsage=f,this.ActualStart=m,this.ActualFinish=g,this.RemainingWork=y,this.RemainingUsage=E,this.Completion=b}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++],E=e[i++],b=e[i++],x=e[i++],S=e[i++];return new eIe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b,x,S)}ToTape(){let t=[];return t.push(this.Name),t.push(this.DataOrigin),t.push(this.UserDefinedDataOrigin),t.push(this.ScheduleWork),t.push(this.ScheduleUsage),t.push(this.ScheduleStart),t.push(this.ScheduleFinish),t.push(this.ScheduleContour),t.push(this.LevelingDelay),t.push(this.IsOverAllocated),t.push(this.StatusTime),t.push(this.ActualWork),t.push(this.ActualUsage),t.push(this.ActualStart),t.push(this.ActualFinish),t.push(this.RemainingWork),t.push(this.RemainingUsage),t.push(this.Completion),t}},tIe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.SweptArea=e,this.Position=i,this.Axis=n,this.Angle=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new tIe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.SweptArea),t.push(this.Position),t.push(this.Axis),t.push(this.Angle),t}},rIe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.SweptArea=e,this.Position=i,this.Axis=n,this.Angle=s,this.EndSweptArea=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new rIe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.SweptArea),t.push(this.Position),t.push(this.Axis),t.push(this.Angle),t.push(this.EndSweptArea),t}},iIe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Position=e,this.Height=i,this.BottomRadius=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new iIe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Position),t.push(this.Height),t.push(this.BottomRadius),t}},nIe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Position=e,this.Height=i,this.Radius=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new nIe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Position),t.push(this.Height),t.push(this.Radius),t}},sIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new sIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},aIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new aIe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},oIe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new oIe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t}},lIe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.XDim=s,this.YDim=a,this.RoundingRadius=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new lIe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.XDim),t.push(this.YDim),t.push(this.RoundingRadius),t}},cIe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Dimensions=e,this.UnitType=i,this.Prefix=n,this.Name=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new cIe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Dimensions),t.push(this.UnitType),t.push(this.Prefix),t.push(this.Name),t}},uIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new uIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},hIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new hIe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},pIe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Name=e,this.DataOrigin=i,this.UserDefinedDataOrigin=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new pIe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Name),t.push(this.DataOrigin),t.push(this.UserDefinedDataOrigin),t}},dIe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Curve3D=e,this.AssociatedGeometry=i,this.MasterRepresentation=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new dIe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Curve3D),t.push(this.AssociatedGeometry),t.push(this.MasterRepresentation),t}},fIe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.SectionType=e,this.StartProfile=i,this.EndProfile=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new fIe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.SectionType),t.push(this.StartProfile),t.push(this.EndProfile),t}},mIe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.LongitudinalStartPosition=e,this.LongitudinalEndPosition=i,this.TransversePosition=n,this.ReinforcementRole=s,this.SectionDefinition=a,this.CrossSectionReinforcementDefinitions=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new mIe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.LongitudinalStartPosition),t.push(this.LongitudinalEndPosition),t.push(this.TransversePosition),t.push(this.ReinforcementRole),t.push(this.SectionDefinition),t.push(this.CrossSectionReinforcementDefinitions),t}},gIe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Directrix=e,this.CrossSections=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new gIe(t,r,n,s)}ToTape(){let t=[];return t.push(this.Directrix),t.push(this.CrossSections),t}},vIe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Directrix=e,this.CrossSections=i,this.CrossSectionPositions=n,this.FixedAxisVertical=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new vIe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Directrix),t.push(this.CrossSections),t.push(this.CrossSectionPositions),t.push(this.FixedAxisVertical),t}},yIe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.SpineCurve=e,this.CrossSections=i,this.CrossSectionPositions=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new yIe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.SpineCurve),t.push(this.CrossSections),t.push(this.CrossSectionPositions),t}},TIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new TIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},EIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new EIe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},bIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new bIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},xIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new xIe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},IIe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.ShapeRepresentations=e,this.Name=i,this.Description=n,this.ProductDefinitional=s,this.PartOfProductDefinitionShape=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new IIe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.ShapeRepresentations),t.push(this.Name),t.push(this.Description),t.push(this.ProductDefinitional),t.push(this.PartOfProductDefinitionShape),t}},SIe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.ContextOfItems=e,this.RepresentationIdentifier=i,this.RepresentationType=n,this.Items=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new SIe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.ContextOfItems),t.push(this.RepresentationIdentifier),t.push(this.RepresentationType),t.push(this.Items),t}},_Ie=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.ContextOfItems=e,this.RepresentationIdentifier=i,this.RepresentationType=n,this.Items=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new _Ie(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.ContextOfItems),t.push(this.RepresentationIdentifier),t.push(this.RepresentationType),t.push(this.Items),t}},wIe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.SbsmBoundary=e}static FromTape(t,r,e){let i=0,n=e[i++];return new wIe(t,r,n)}ToTape(){let t=[];return t.push(this.SbsmBoundary),t}},RIe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Name=e,this.Description=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new RIe(t,r,n,s)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t}},MIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.TemplateType=a,this.PrimaryMeasureType=o,this.SecondaryMeasureType=l,this.Enumerators=c,this.PrimaryUnit=u,this.SecondaryUnit=h,this.Expression=p,this.AccessState=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new MIe(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.TemplateType),t.push(this.PrimaryMeasureType),t.push(this.SecondaryMeasureType),t.push(this.Enumerators),t.push(this.PrimaryUnit),t.push(this.SecondaryUnit),t.push(this.Expression),t.push(this.AccessState),t}},DIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=c,this.CompositionType=u,this.RefLatitude=h,this.RefLongitude=p,this.RefElevation=d,this.LandTitleNumber=f,this.SiteAddress=m}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++];return new DIe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.LongName),t.push(this.CompositionType),t.push(this.RefLatitude),t.push(this.RefLongitude),t.push(this.RefElevation),t.push(this.LandTitleNumber),t.push(this.SiteAddress),t}},CIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new CIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},AIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new AIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},OIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new OIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},PIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new PIe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},NIe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.SlippageX=i,this.SlippageY=n,this.SlippageZ=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new NIe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.SlippageX),t.push(this.SlippageY),t.push(this.SlippageZ),t}},LIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new LIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},FIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new FIe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},HIe=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new HIe(t,r)}ToTape(){return[]}},UIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=c,this.CompositionType=u,this.PredefinedType=h,this.ElevationWithFlooring=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new UIe(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.LongName),t.push(this.CompositionType),t.push(this.PredefinedType),t.push(this.ElevationWithFlooring),t}},BIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new BIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},kIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new kIe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},GIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h,this.LongName=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new GIe(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t.push(this.LongName),t}},VIe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new VIe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.LongName),t}},zIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new zIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},jIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=c,this.CompositionType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new jIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.LongName),t.push(this.CompositionType),t}},WIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new WIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t}},qIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new qIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.LongName),t.push(this.PredefinedType),t}},YIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h,this.LongName=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new YIe(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t.push(this.LongName),t}},XIe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Position=e,this.Radius=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new XIe(t,r,n,s)}ToTape(){let t=[];return t.push(this.Position),t.push(this.Radius),t}},$Ie=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Position=e,this.Radius=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new $Ie(t,r,n,s)}ToTape(){let t=[];return t.push(this.Position),t.push(this.Radius),t}},ZIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new ZIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},KIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new KIe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},JIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new JIe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},QIe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.NumberOfRisers=u,this.NumberOfTreads=h,this.RiserHeight=p,this.TreadLength=d,this.PredefinedType=f}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++];return new QIe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.NumberOfRisers),t.push(this.NumberOfTreads),t.push(this.RiserHeight),t.push(this.TreadLength),t.push(this.PredefinedType),t}},eSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new eSe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},tSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new tSe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},rSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=c,this.GlobalOrLocal=u,this.DestabilizingLoad=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new rSe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedLoad),t.push(this.GlobalOrLocal),t.push(this.DestabilizingLoad),t}},iSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=c,this.GlobalOrLocal=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new iSe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedLoad),t.push(this.GlobalOrLocal),t}},nSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.PredefinedType=o,this.OrientationOf2DPlane=l,this.LoadedBy=c,this.HasResults=u,this.SharedPlacement=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new nSe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.PredefinedType),t.push(this.OrientationOf2DPlane),t.push(this.LoadedBy),t.push(this.HasResults),t.push(this.SharedPlacement),t}},sSe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedCondition=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new sSe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedCondition),t}},aSe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Name=e}static FromTape(t,r,e){let i=0,n=e[i++];return new aSe(t,r,n)}ToTape(){let t=[];return t.push(this.Name),t}},oSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=c,this.GlobalOrLocal=u,this.DestabilizingLoad=h,this.ProjectedOrTrue=p,this.PredefinedType=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new oSe(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedLoad),t.push(this.GlobalOrLocal),t.push(this.DestabilizingLoad),t.push(this.ProjectedOrTrue),t.push(this.PredefinedType),t}},lSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedCondition=c,this.Axis=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new lSe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedCondition),t.push(this.Axis),t}},cSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.PredefinedType=c,this.Axis=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new cSe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.PredefinedType),t.push(this.Axis),t}},uSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.PredefinedType=c,this.Axis=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new uSe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.PredefinedType),t.push(this.Axis),t}},hSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=c,this.GlobalOrLocal=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new hSe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedLoad),t.push(this.GlobalOrLocal),t.push(this.PredefinedType),t}},pSe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new pSe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t}},dSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=c,this.GlobalOrLocal=u,this.DestabilizingLoad=h,this.ProjectedOrTrue=p,this.PredefinedType=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new dSe(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedLoad),t.push(this.GlobalOrLocal),t.push(this.DestabilizingLoad),t.push(this.ProjectedOrTrue),t.push(this.PredefinedType),t}},fSe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Name=e}static FromTape(t,r,e){let i=0,n=e[i++];return new fSe(t,r,n)}ToTape(){let t=[];return t.push(this.Name),t}},mSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.PredefinedType=o,this.ActionType=l,this.ActionSource=c,this.Coefficient=u,this.Purpose=h,this.SelfWeightCoefficients=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new mSe(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.PredefinedType),t.push(this.ActionType),t.push(this.ActionSource),t.push(this.Coefficient),t.push(this.Purpose),t.push(this.SelfWeightCoefficients),t}},gSe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Name=e,this.Values=i,this.Locations=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new gSe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Values),t.push(this.Locations),t}},vSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.PredefinedType=o,this.ActionType=l,this.ActionSource=c,this.Coefficient=u,this.Purpose=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new vSe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.PredefinedType),t.push(this.ActionType),t.push(this.ActionSource),t.push(this.Coefficient),t.push(this.Purpose),t}},ySe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Name=e,this.LinearForceX=i,this.LinearForceY=n,this.LinearForceZ=s,this.LinearMomentX=a,this.LinearMomentY=o,this.LinearMomentZ=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new ySe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Name),t.push(this.LinearForceX),t.push(this.LinearForceY),t.push(this.LinearForceZ),t.push(this.LinearMomentX),t.push(this.LinearMomentY),t.push(this.LinearMomentZ),t}},TSe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Name=e}static FromTape(t,r,e){let i=0,n=e[i++];return new TSe(t,r,n)}ToTape(){let t=[];return t.push(this.Name),t}},ESe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.PlanarForceX=i,this.PlanarForceY=n,this.PlanarForceZ=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new ESe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.PlanarForceX),t.push(this.PlanarForceY),t.push(this.PlanarForceZ),t}},bSe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Name=e,this.DisplacementX=i,this.DisplacementY=n,this.DisplacementZ=s,this.RotationalDisplacementRX=a,this.RotationalDisplacementRY=o,this.RotationalDisplacementRZ=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new bSe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Name),t.push(this.DisplacementX),t.push(this.DisplacementY),t.push(this.DisplacementZ),t.push(this.RotationalDisplacementRX),t.push(this.RotationalDisplacementRY),t.push(this.RotationalDisplacementRZ),t}},xSe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.Name=e,this.DisplacementX=i,this.DisplacementY=n,this.DisplacementZ=s,this.RotationalDisplacementRX=a,this.RotationalDisplacementRY=o,this.RotationalDisplacementRZ=l,this.Distortion=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new xSe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.Name),t.push(this.DisplacementX),t.push(this.DisplacementY),t.push(this.DisplacementZ),t.push(this.RotationalDisplacementRX),t.push(this.RotationalDisplacementRY),t.push(this.RotationalDisplacementRZ),t.push(this.Distortion),t}},ISe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.Name=e,this.ForceX=i,this.ForceY=n,this.ForceZ=s,this.MomentX=a,this.MomentY=o,this.MomentZ=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new ISe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.Name),t.push(this.ForceX),t.push(this.ForceY),t.push(this.ForceZ),t.push(this.MomentX),t.push(this.MomentY),t.push(this.MomentZ),t}},SSe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.Name=e,this.ForceX=i,this.ForceY=n,this.ForceZ=s,this.MomentX=a,this.MomentY=o,this.MomentZ=l,this.WarpingMoment=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new SSe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.Name),t.push(this.ForceX),t.push(this.ForceY),t.push(this.ForceZ),t.push(this.MomentX),t.push(this.MomentY),t.push(this.MomentZ),t.push(this.WarpingMoment),t}},_Se=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Name=e}static FromTape(t,r,e){let i=0,n=e[i++];return new _Se(t,r,n)}ToTape(){let t=[];return t.push(this.Name),t}},wSe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.DeltaTConstant=i,this.DeltaTY=n,this.DeltaTZ=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new wSe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.DeltaTConstant),t.push(this.DeltaTY),t.push(this.DeltaTZ),t}},RSe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new RSe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t}},MSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=c,this.GlobalOrLocal=u,this.DestabilizingLoad=h,this.ProjectedOrTrue=p,this.PredefinedType=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new MSe(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedLoad),t.push(this.GlobalOrLocal),t.push(this.DestabilizingLoad),t.push(this.ProjectedOrTrue),t.push(this.PredefinedType),t}},DSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=c,this.GlobalOrLocal=u,this.DestabilizingLoad=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new DSe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedLoad),t.push(this.GlobalOrLocal),t.push(this.DestabilizingLoad),t}},CSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedCondition=c,this.ConditionCoordinateSystem=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new CSe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedCondition),t.push(this.ConditionCoordinateSystem),t}},ASe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=c,this.GlobalOrLocal=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new ASe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedLoad),t.push(this.GlobalOrLocal),t}},OSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=c,this.GlobalOrLocal=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new OSe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedLoad),t.push(this.GlobalOrLocal),t}},PSe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.TheoryType=o,this.ResultForLoadGroup=l,this.IsLinear=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new PSe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.TheoryType),t.push(this.ResultForLoadGroup),t.push(this.IsLinear),t}},NSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=c,this.GlobalOrLocal=u,this.DestabilizingLoad=h,this.ProjectedOrTrue=p,this.PredefinedType=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new NSe(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedLoad),t.push(this.GlobalOrLocal),t.push(this.DestabilizingLoad),t.push(this.ProjectedOrTrue),t.push(this.PredefinedType),t}},LSe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedCondition=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new LSe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedCondition),t}},FSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.PredefinedType=c,this.Thickness=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new FSe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.PredefinedType),t.push(this.Thickness),t}},HSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.PredefinedType=c,this.Thickness=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new HSe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.PredefinedType),t.push(this.Thickness),t}},USe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=c,this.GlobalOrLocal=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new USe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.AppliedLoad),t.push(this.GlobalOrLocal),t.push(this.PredefinedType),t}},BSe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.ContextOfItems=e,this.RepresentationIdentifier=i,this.RepresentationType=n,this.Items=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new BSe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.ContextOfItems),t.push(this.RepresentationIdentifier),t.push(this.RepresentationType),t.push(this.Items),t}},kSe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Item=e,this.Styles=i,this.Name=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new kSe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Item),t.push(this.Styles),t.push(this.Name),t}},GSe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.ContextOfItems=e,this.RepresentationIdentifier=i,this.RepresentationType=n,this.Items=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new GSe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.ContextOfItems),t.push(this.RepresentationIdentifier),t.push(this.RepresentationType),t.push(this.Items),t}},VSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=c,this.BaseCosts=u,this.BaseQuantity=h,this.PredefinedType=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new VSe(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.LongDescription),t.push(this.Usage),t.push(this.BaseCosts),t.push(this.BaseQuantity),t.push(this.PredefinedType),t}},zSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=c,this.ResourceType=u,this.BaseCosts=h,this.BaseQuantity=p,this.PredefinedType=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new zSe(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.Identification),t.push(this.LongDescription),t.push(this.ResourceType),t.push(this.BaseCosts),t.push(this.BaseQuantity),t.push(this.PredefinedType),t}},jSe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.EdgeStart=e,this.EdgeEnd=i,this.ParentEdge=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new jSe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.EdgeStart),t.push(this.EdgeEnd),t.push(this.ParentEdge),t}},WSe=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new WSe(t,r)}ToTape(){return[]}},qSe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Curve3D=e,this.AssociatedGeometry=i,this.MasterRepresentation=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new qSe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Curve3D),t.push(this.AssociatedGeometry),t.push(this.MasterRepresentation),t}},YSe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.SweptArea=e,this.Position=i,this.Directrix=n,this.StartParam=s,this.EndParam=a,this.ReferenceSurface=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new YSe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.SweptArea),t.push(this.Position),t.push(this.Directrix),t.push(this.StartParam),t.push(this.EndParam),t.push(this.ReferenceSurface),t}},XSe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new XSe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},$Se=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.SweptCurve=e,this.Position=i,this.ExtrudedDirection=n,this.Depth=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new $Se(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.SweptCurve),t.push(this.Position),t.push(this.ExtrudedDirection),t.push(this.Depth),t}},ZSe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.SweptCurve=e,this.Position=i,this.AxisPosition=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new ZSe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.SweptCurve),t.push(this.Position),t.push(this.AxisPosition),t}},KSe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.Name=e,this.SurfaceReinforcement1=i,this.SurfaceReinforcement2=n,this.ShearReinforcement=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new KSe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.Name),t.push(this.SurfaceReinforcement1),t.push(this.SurfaceReinforcement2),t.push(this.ShearReinforcement),t}},JSe=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Name=e,this.Side=i,this.Styles=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new JSe(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Side),t.push(this.Styles),t}},QSe=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.DiffuseTransmissionColour=e,this.DiffuseReflectionColour=i,this.TransmissionColour=n,this.ReflectanceColour=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new QSe(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.DiffuseTransmissionColour),t.push(this.DiffuseReflectionColour),t.push(this.TransmissionColour),t.push(this.ReflectanceColour),t}},e_e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.RefractionIndex=e,this.DispersionFactor=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new e_e(t,r,n,s)}ToTape(){let t=[];return t.push(this.RefractionIndex),t.push(this.DispersionFactor),t}},t_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.SurfaceColour=e,this.Transparency=i,this.DiffuseColour=n,this.TransmissionColour=s,this.DiffuseTransmissionColour=a,this.ReflectionColour=o,this.SpecularColour=l,this.SpecularHighlight=c,this.ReflectanceMethod=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new t_e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.SurfaceColour),t.push(this.Transparency),t.push(this.DiffuseColour),t.push(this.TransmissionColour),t.push(this.DiffuseTransmissionColour),t.push(this.ReflectionColour),t.push(this.SpecularColour),t.push(this.SpecularHighlight),t.push(this.ReflectanceMethod),t}},r_e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.SurfaceColour=e,this.Transparency=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new r_e(t,r,n,s)}ToTape(){let t=[];return t.push(this.SurfaceColour),t.push(this.Transparency),t}},i_e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Textures=e}static FromTape(t,r,e){let i=0,n=e[i++];return new i_e(t,r,n)}ToTape(){let t=[];return t.push(this.Textures),t}},n_e=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.RepeatS=e,this.RepeatT=i,this.Mode=n,this.TextureTransform=s,this.Parameter=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new n_e(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.RepeatS),t.push(this.RepeatT),t.push(this.Mode),t.push(this.TextureTransform),t.push(this.Parameter),t}},s_e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.SweptArea=e,this.Position=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new s_e(t,r,n,s)}ToTape(){let t=[];return t.push(this.SweptArea),t.push(this.Position),t}},a_e=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Directrix=e,this.Radius=i,this.InnerRadius=n,this.StartParam=s,this.EndParam=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new a_e(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Directrix),t.push(this.Radius),t.push(this.InnerRadius),t.push(this.StartParam),t.push(this.EndParam),t}},o_e=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.Directrix=e,this.Radius=i,this.InnerRadius=n,this.StartParam=s,this.EndParam=a,this.FilletRadius=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new o_e(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.Directrix),t.push(this.Radius),t.push(this.InnerRadius),t.push(this.StartParam),t.push(this.EndParam),t.push(this.FilletRadius),t}},l_e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.SweptCurve=e,this.Position=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new l_e(t,r,n,s)}ToTape(){let t=[];return t.push(this.SweptCurve),t.push(this.Position),t}},c_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new c_e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},u_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new u_e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},h_e=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new h_e(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t}},p_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new p_e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},d_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new d_e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},f_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.Depth=s,this.FlangeWidth=a,this.WebThickness=o,this.FlangeThickness=l,this.FilletRadius=c,this.FlangeEdgeRadius=u,this.WebEdgeRadius=h,this.WebSlope=p,this.FlangeSlope=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new f_e(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.Depth),t.push(this.FlangeWidth),t.push(this.WebThickness),t.push(this.FlangeThickness),t.push(this.FilletRadius),t.push(this.FlangeEdgeRadius),t.push(this.WebEdgeRadius),t.push(this.WebSlope),t.push(this.FlangeSlope),t}},m_e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Name=e,this.Rows=i,this.Columns=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new m_e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Rows),t.push(this.Columns),t}},g_e=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Identifier=e,this.Name=i,this.Description=n,this.Unit=s,this.ReferencePath=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new g_e(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Identifier),t.push(this.Name),t.push(this.Description),t.push(this.Unit),t.push(this.ReferencePath),t}},v_e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.RowCells=e,this.IsHeading=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new v_e(t,r,n,s)}ToTape(){let t=[];return t.push(this.RowCells),t.push(this.IsHeading),t}},y_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new y_e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},T_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new T_e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},E_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Status=c,this.WorkMethod=u,this.IsMilestone=h,this.Priority=p,this.TaskTime=d,this.PredefinedType=f}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++];return new E_e(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.LongDescription),t.push(this.Status),t.push(this.WorkMethod),t.push(this.IsMilestone),t.push(this.Priority),t.push(this.TaskTime),t.push(this.PredefinedType),t}},b_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b,x,S){this.expressID=t,this.type=r,this.Name=e,this.DataOrigin=i,this.UserDefinedDataOrigin=n,this.DurationType=s,this.ScheduleDuration=a,this.ScheduleStart=o,this.ScheduleFinish=l,this.EarlyStart=c,this.EarlyFinish=u,this.LateStart=h,this.LateFinish=p,this.FreeFloat=d,this.TotalFloat=f,this.IsCritical=m,this.StatusTime=g,this.ActualDuration=y,this.ActualStart=E,this.ActualFinish=b,this.RemainingTime=x,this.Completion=S}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++],E=e[i++],b=e[i++],x=e[i++],S=e[i++],D=e[i++],P=e[i++];return new b_e(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b,x,S,D,P)}ToTape(){let t=[];return t.push(this.Name),t.push(this.DataOrigin),t.push(this.UserDefinedDataOrigin),t.push(this.DurationType),t.push(this.ScheduleDuration),t.push(this.ScheduleStart),t.push(this.ScheduleFinish),t.push(this.EarlyStart),t.push(this.EarlyFinish),t.push(this.LateStart),t.push(this.LateFinish),t.push(this.FreeFloat),t.push(this.TotalFloat),t.push(this.IsCritical),t.push(this.StatusTime),t.push(this.ActualDuration),t.push(this.ActualStart),t.push(this.ActualFinish),t.push(this.RemainingTime),t.push(this.Completion),t}},x_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b,x,S,D){this.expressID=t,this.type=r,this.Name=e,this.DataOrigin=i,this.UserDefinedDataOrigin=n,this.DurationType=s,this.ScheduleDuration=a,this.ScheduleStart=o,this.ScheduleFinish=l,this.EarlyStart=c,this.EarlyFinish=u,this.LateStart=h,this.LateFinish=p,this.FreeFloat=d,this.TotalFloat=f,this.IsCritical=m,this.StatusTime=g,this.ActualDuration=y,this.ActualStart=E,this.ActualFinish=b,this.RemainingTime=x,this.Completion=S,this.Recurrence=D}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++],E=e[i++],b=e[i++],x=e[i++],S=e[i++],D=e[i++],P=e[i++],_=e[i++];return new x_e(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b,x,S,D,P,_)}ToTape(){let t=[];return t.push(this.Name),t.push(this.DataOrigin),t.push(this.UserDefinedDataOrigin),t.push(this.DurationType),t.push(this.ScheduleDuration),t.push(this.ScheduleStart),t.push(this.ScheduleFinish),t.push(this.EarlyStart),t.push(this.EarlyFinish),t.push(this.LateStart),t.push(this.LateFinish),t.push(this.FreeFloat),t.push(this.TotalFloat),t.push(this.IsCritical),t.push(this.StatusTime),t.push(this.ActualDuration),t.push(this.ActualStart),t.push(this.ActualFinish),t.push(this.RemainingTime),t.push(this.Completion),t.push(this.Recurrence),t}},I_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=c,this.ProcessType=u,this.PredefinedType=h,this.WorkMethod=p}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++];return new I_e(t,r,n,s,a,o,l,c,u,h,p,d,f)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.Identification),t.push(this.LongDescription),t.push(this.ProcessType),t.push(this.PredefinedType),t.push(this.WorkMethod),t}},S_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.Purpose=e,this.Description=i,this.UserDefinedPurpose=n,this.TelephoneNumbers=s,this.FacsimileNumbers=a,this.PagerNumber=o,this.ElectronicMailAddresses=l,this.WWWHomePageURL=c,this.MessagingIDs=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new S_e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.Purpose),t.push(this.Description),t.push(this.UserDefinedPurpose),t.push(this.TelephoneNumbers),t.push(this.FacsimileNumbers),t.push(this.PagerNumber),t.push(this.ElectronicMailAddresses),t.push(this.WWWHomePageURL),t.push(this.MessagingIDs),t}},__e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.SteelGrade=u,this.PredefinedType=h,this.NominalDiameter=p,this.CrossSectionArea=d,this.TensionForce=f,this.PreStress=m,this.FrictionCoefficient=g,this.AnchorageSlip=y,this.MinCurvatureRadius=E}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++],E=e[i++],b=e[i++],x=e[i++];return new __e(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b,x)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.SteelGrade),t.push(this.PredefinedType),t.push(this.NominalDiameter),t.push(this.CrossSectionArea),t.push(this.TensionForce),t.push(this.PreStress),t.push(this.FrictionCoefficient),t.push(this.AnchorageSlip),t.push(this.MinCurvatureRadius),t}},w_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.SteelGrade=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new w_e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.SteelGrade),t.push(this.PredefinedType),t}},R_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new R_e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},M_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.SteelGrade=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new M_e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.SteelGrade),t.push(this.PredefinedType),t}},D_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new D_e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},C_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h,this.NominalDiameter=p,this.CrossSectionArea=d,this.SheathDiameter=f}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++];return new C_e(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t.push(this.NominalDiameter),t.push(this.CrossSectionArea),t.push(this.SheathDiameter),t}},A_e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Coordinates=e}static FromTape(t,r,e){let i=0,n=e[i++];return new A_e(t,r,n)}ToTape(){let t=[];return t.push(this.Coordinates),t}},O_e=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new O_e(t,r)}ToTape(){return[]}},P_e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Literal=e,this.Placement=i,this.Path=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new P_e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Literal),t.push(this.Placement),t.push(this.Path),t}},N_e=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Literal=e,this.Placement=i,this.Path=n,this.Extent=s,this.BoxAlignment=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new N_e(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Literal),t.push(this.Placement),t.push(this.Path),t.push(this.Extent),t.push(this.BoxAlignment),t}},L_e=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Name=e,this.TextCharacterAppearance=i,this.TextStyle=n,this.TextFontStyle=s,this.ModelOrDraughting=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new L_e(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Name),t.push(this.TextCharacterAppearance),t.push(this.TextStyle),t.push(this.TextFontStyle),t.push(this.ModelOrDraughting),t}},F_e=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.Name=e,this.FontFamily=i,this.FontStyle=n,this.FontVariant=s,this.FontWeight=a,this.FontSize=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new F_e(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.Name),t.push(this.FontFamily),t.push(this.FontStyle),t.push(this.FontVariant),t.push(this.FontWeight),t.push(this.FontSize),t}},H_e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Colour=e,this.BackgroundColour=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new H_e(t,r,n,s)}ToTape(){let t=[];return t.push(this.Colour),t.push(this.BackgroundColour),t}},U_e=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.TextIndent=e,this.TextAlign=i,this.TextDecoration=n,this.LetterSpacing=s,this.WordSpacing=a,this.TextTransform=o,this.LineHeight=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new U_e(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.TextIndent),t.push(this.TextAlign),t.push(this.TextDecoration),t.push(this.LetterSpacing),t.push(this.WordSpacing),t.push(this.TextTransform),t.push(this.LineHeight),t}},B_e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Maps=e}static FromTape(t,r,e){let i=0,n=e[i++];return new B_e(t,r,n)}ToTape(){let t=[];return t.push(this.Maps),t}},k_e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Maps=e,this.Mode=i,this.Parameter=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new k_e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Maps),t.push(this.Mode),t.push(this.Parameter),t}},G_e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Maps=e,this.Vertices=i,this.MappedTo=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new G_e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Maps),t.push(this.Vertices),t.push(this.MappedTo),t}},V_e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Coordinates=e}static FromTape(t,r,e){let i=0,n=e[i++];return new V_e(t,r,n)}ToTape(){let t=[];return t.push(this.Coordinates),t}},z_e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.TexCoordsList=e}static FromTape(t,r,e){let i=0,n=e[i++];return new z_e(t,r,n)}ToTape(){let t=[];return t.push(this.TexCoordsList),t}},j_e=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.StartTime=e,this.EndTime=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new j_e(t,r,n,s)}ToTape(){let t=[];return t.push(this.StartTime),t.push(this.EndTime),t}},W_e=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.Name=e,this.Description=i,this.StartTime=n,this.EndTime=s,this.TimeSeriesDataType=a,this.DataOrigin=o,this.UserDefinedDataOrigin=l,this.Unit=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new W_e(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.Name),t.push(this.Description),t.push(this.StartTime),t.push(this.EndTime),t.push(this.TimeSeriesDataType),t.push(this.DataOrigin),t.push(this.UserDefinedDataOrigin),t.push(this.Unit),t}},q_e=class{constructor(t,r,e){this.expressID=t,this.type=r,this.ListValues=e}static FromTape(t,r,e){let i=0,n=e[i++];return new q_e(t,r,n)}ToTape(){let t=[];return t.push(this.ListValues),t}},Y_e=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new Y_e(t,r)}ToTape(){return[]}},X_e=class{constructor(t,r,e,i,n,s){this.expressID=t,this.type=r,this.ContextOfItems=e,this.RepresentationIdentifier=i,this.RepresentationType=n,this.Items=s}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++];return new X_e(t,r,n,s,a,o)}ToTape(){let t=[];return t.push(this.ContextOfItems),t.push(this.RepresentationIdentifier),t.push(this.RepresentationType),t.push(this.Items),t}},$_e=class{constructor(t,r,e,i,n){this.expressID=t,this.type=r,this.Position=e,this.MajorRadius=i,this.MinorRadius=n}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++];return new $_e(t,r,n,s,a)}ToTape(){let t=[];return t.push(this.Position),t.push(this.MajorRadius),t.push(this.MinorRadius),t}},Z_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Z_e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},K_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new K_e(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},J_e=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.StartPoint=e,this.StartDirection=i,this.SegmentLength=n,this.StartRadius=s,this.EndRadius=a,this.IsStartRadiusCCW=o,this.IsEndRadiusCCW=l,this.TransitionCurveType=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new J_e(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.StartPoint),t.push(this.StartDirection),t.push(this.SegmentLength),t.push(this.StartRadius),t.push(this.EndRadius),t.push(this.IsStartRadiusCCW),t.push(this.IsEndRadiusCCW),t.push(this.TransitionCurveType),t}},Q_e=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Q_e(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},ewe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new ewe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},twe=class{constructor(t,r,e,i,n,s,a,o,l){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.BottomXDim=s,this.TopXDim=a,this.YDim=o,this.TopXOffset=l}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++];return new twe(t,r,n,s,a,o,l,c,u)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.BottomXDim),t.push(this.TopXDim),t.push(this.YDim),t.push(this.TopXOffset),t}},rwe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.Coordinates=e,this.Normals=i,this.Closed=n,this.CoordIndex=s,this.PnIndex=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new rwe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.Coordinates),t.push(this.Normals),t.push(this.Closed),t.push(this.CoordIndex),t.push(this.PnIndex),t}},iwe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.Coordinates=e,this.Normals=i,this.Closed=n,this.CoordIndex=s,this.PnIndex=a,this.Flags=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new iwe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.Coordinates),t.push(this.Normals),t.push(this.Closed),t.push(this.CoordIndex),t.push(this.PnIndex),t.push(this.Flags),t}},nwe=class{constructor(t,r,e,i,n,s,a){this.expressID=t,this.type=r,this.BasisCurve=e,this.Trim1=i,this.Trim2=n,this.SenseAgreement=s,this.MasterRepresentation=a}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++];return new nwe(t,r,n,s,a,o,l)}ToTape(){let t=[];return t.push(this.BasisCurve),t.push(this.Trim1),t.push(this.Trim2),t.push(this.SenseAgreement),t.push(this.MasterRepresentation),t}},swe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new swe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},awe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new awe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},owe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new owe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t}},lwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=c,this.ProcessType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new lwe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.Identification),t.push(this.LongDescription),t.push(this.ProcessType),t}},cwe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new cwe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t}},uwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=c,this.ResourceType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new uwe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.Identification),t.push(this.LongDescription),t.push(this.ResourceType),t}},hwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.Depth=s,this.FlangeWidth=a,this.WebThickness=o,this.FlangeThickness=l,this.FilletRadius=c,this.EdgeRadius=u,this.FlangeSlope=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new hwe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.Depth),t.push(this.FlangeWidth),t.push(this.WebThickness),t.push(this.FlangeThickness),t.push(this.FilletRadius),t.push(this.EdgeRadius),t.push(this.FlangeSlope),t}},pwe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.Units=e}static FromTape(t,r,e){let i=0,n=e[i++];return new pwe(t,r,n)}ToTape(){let t=[];return t.push(this.Units),t}},dwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new dwe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},fwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new fwe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},mwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new mwe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},gwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new gwe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},vwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new vwe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},ywe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new ywe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Twe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.Orientation=e,this.Magnitude=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Twe(t,r,n,s)}ToTape(){let t=[];return t.push(this.Orientation),t.push(this.Magnitude),t}},Ewe=class{constructor(t,r){this.expressID=t,this.type=r}static FromTape(t,r,e){let i=0;return new Ewe(t,r)}ToTape(){return[]}},bwe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.LoopVertex=e}static FromTape(t,r,e){let i=0,n=e[i++];return new bwe(t,r,n)}ToTape(){let t=[];return t.push(this.LoopVertex),t}},xwe=class{constructor(t,r,e){this.expressID=t,this.type=r,this.VertexGeometry=e}static FromTape(t,r,e){let i=0,n=e[i++];return new xwe(t,r,n)}ToTape(){let t=[];return t.push(this.VertexGeometry),t}},Iwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Iwe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Swe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Swe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},_we=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new _we(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},wwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new wwe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Rwe=class{constructor(t,r,e,i,n,s,a,o,l,c){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++];return new Rwe(t,r,n,s,a,o,l,c,u,h)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t}},Mwe=class{constructor(t,r,e,i){this.expressID=t,this.type=r,this.IntersectingAxes=e,this.OffsetDistances=i}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++];return new Mwe(t,r,n,s)}ToTape(){let t=[];return t.push(this.IntersectingAxes),t.push(this.OffsetDistances),t}},Dwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Dwe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Cwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Cwe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Awe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Awe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Owe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Owe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Pwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Pwe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Nwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Nwe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.PredefinedType),t}},Lwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++];return new Lwe(t,r,n,s,a,o,l,c,u,h,p,d)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t}},Fwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.OverallHeight=u,this.OverallWidth=h,this.PredefinedType=p,this.PartitioningType=d,this.UserDefinedPartitioningType=f}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++];return new Fwe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.OverallHeight),t.push(this.OverallWidth),t.push(this.PredefinedType),t.push(this.PartitioningType),t.push(this.UserDefinedPartitioningType),t}},Hwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m,g,y){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.LiningDepth=a,this.LiningThickness=o,this.TransomThickness=l,this.MullionThickness=c,this.FirstTransomOffset=u,this.SecondTransomOffset=h,this.FirstMullionOffset=p,this.SecondMullionOffset=d,this.ShapeAspectStyle=f,this.LiningOffset=m,this.LiningToPanelOffsetX=g,this.LiningToPanelOffsetY=y}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++],E=e[i++],b=e[i++];return new Hwe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y,E,b)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.LiningDepth),t.push(this.LiningThickness),t.push(this.TransomThickness),t.push(this.MullionThickness),t.push(this.FirstTransomOffset),t.push(this.SecondTransomOffset),t.push(this.FirstMullionOffset),t.push(this.SecondMullionOffset),t.push(this.ShapeAspectStyle),t.push(this.LiningOffset),t.push(this.LiningToPanelOffsetX),t.push(this.LiningToPanelOffsetY),t}},Uwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.OperationType=a,this.PanelPosition=o,this.FrameDepth=l,this.FrameThickness=c,this.ShapeAspectStyle=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Uwe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.OperationType),t.push(this.PanelPosition),t.push(this.FrameDepth),t.push(this.FrameThickness),t.push(this.ShapeAspectStyle),t}},Bwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=c,this.OverallHeight=u,this.OverallWidth=h,this.PredefinedType=p,this.PartitioningType=d,this.UserDefinedPartitioningType=f}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++];return new Bwe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.ObjectPlacement),t.push(this.Representation),t.push(this.Tag),t.push(this.OverallHeight),t.push(this.OverallWidth),t.push(this.PredefinedType),t.push(this.PartitioningType),t.push(this.UserDefinedPartitioningType),t}},kwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ConstructionType=u,this.OperationType=h,this.ParameterTakesPrecedence=p,this.Sizeable=d}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++];return new kwe(t,r,n,s,a,o,l,c,u,h,p,d,f,m)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ConstructionType),t.push(this.OperationType),t.push(this.ParameterTakesPrecedence),t.push(this.Sizeable),t}},Gwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=c,this.ElementType=u,this.PredefinedType=h,this.PartitioningType=p,this.ParameterTakesPrecedence=d,this.UserDefinedPartitioningType=f}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++];return new Gwe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ApplicableOccurrence),t.push(this.HasPropertySets),t.push(this.RepresentationMaps),t.push(this.Tag),t.push(this.ElementType),t.push(this.PredefinedType),t.push(this.PartitioningType),t.push(this.ParameterTakesPrecedence),t.push(this.UserDefinedPartitioningType),t}},Vwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.WorkingTimes=l,this.ExceptionTimes=c,this.PredefinedType=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Vwe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.WorkingTimes),t.push(this.ExceptionTimes),t.push(this.PredefinedType),t}},zwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.CreationDate=l,this.Creators=c,this.Purpose=u,this.Duration=h,this.TotalFloat=p,this.StartTime=d,this.FinishTime=f}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++];return new zwe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.CreationDate),t.push(this.Creators),t.push(this.Purpose),t.push(this.Duration),t.push(this.TotalFloat),t.push(this.StartTime),t.push(this.FinishTime),t}},jwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.CreationDate=l,this.Creators=c,this.Purpose=u,this.Duration=h,this.TotalFloat=p,this.StartTime=d,this.FinishTime=f,this.PredefinedType=m}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++];return new jwe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.CreationDate),t.push(this.Creators),t.push(this.Purpose),t.push(this.Duration),t.push(this.TotalFloat),t.push(this.StartTime),t.push(this.FinishTime),t.push(this.PredefinedType),t}},Wwe=class{constructor(t,r,e,i,n,s,a,o,l,c,u,h,p,d,f,m){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.CreationDate=l,this.Creators=c,this.Purpose=u,this.Duration=h,this.TotalFloat=p,this.StartTime=d,this.FinishTime=f,this.PredefinedType=m}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++],d=e[i++],f=e[i++],m=e[i++],g=e[i++],y=e[i++];return new Wwe(t,r,n,s,a,o,l,c,u,h,p,d,f,m,g,y)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.Identification),t.push(this.CreationDate),t.push(this.Creators),t.push(this.Purpose),t.push(this.Duration),t.push(this.TotalFloat),t.push(this.StartTime),t.push(this.FinishTime),t.push(this.PredefinedType),t}},qwe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.Name=e,this.DataOrigin=i,this.UserDefinedDataOrigin=n,this.RecurrencePattern=s,this.Start=a,this.Finish=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new qwe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.Name),t.push(this.DataOrigin),t.push(this.UserDefinedDataOrigin),t.push(this.RecurrencePattern),t.push(this.Start),t.push(this.Finish),t}},Ywe=class{constructor(t,r,e,i,n,s,a,o,l,c,u){this.expressID=t,this.type=r,this.ProfileType=e,this.ProfileName=i,this.Position=n,this.Depth=s,this.FlangeWidth=a,this.WebThickness=o,this.FlangeThickness=l,this.FilletRadius=c,this.EdgeRadius=u}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++],u=e[i++],h=e[i++],p=e[i++];return new Ywe(t,r,n,s,a,o,l,c,u,h,p)}ToTape(){let t=[];return t.push(this.ProfileType),t.push(this.ProfileName),t.push(this.Position),t.push(this.Depth),t.push(this.FlangeWidth),t.push(this.WebThickness),t.push(this.FlangeThickness),t.push(this.FilletRadius),t.push(this.EdgeRadius),t}},Xwe=class{constructor(t,r,e,i,n,s,a,o){this.expressID=t,this.type=r,this.GlobalId=e,this.OwnerHistory=i,this.Name=n,this.Description=s,this.ObjectType=a,this.LongName=o}static FromTape(t,r,e){let i=0,n=e[i++],s=e[i++],a=e[i++],o=e[i++],l=e[i++],c=e[i++];return new Xwe(t,r,n,s,a,o,l,c)}ToTape(){let t=[];return t.push(this.GlobalId),t.push(this.OwnerHistory),t.push(this.Name),t.push(this.Description),t.push(this.ObjectType),t.push(this.LongName),t}},Rde=HTt();var Wk=class{constructor(){this.wasmModule=void 0,this.fs=void 0}Init(){return LTt(this,null,function*(){Rde?(this.wasmModule=yield Rde({noInitialRun:!0}),this.fs=this.wasmModule.FS):console.error("Could not find wasm module at './web-ifc' from web-ifc-api.ts")})}OpenModel(t,r){this.wasmModule.FS_createDataFile("/","filename",t,!0,!0,!0);let e=wde({COORDINATE_TO_ORIGIN:!1,USE_FAST_BOOLS:!1,CIRCLE_SEGMENTS_LOW:5,CIRCLE_SEGMENTS_MEDIUM:8,CIRCLE_SEGMENTS_HIGH:12},r),i=this.wasmModule.OpenModel(e);return this.wasmModule.FS_unlink("/filename"),i}CreateModel(t){let r=wde({COORDINATE_TO_ORIGIN:!1,USE_FAST_BOOLS:!1,CIRCLE_SEGMENTS_LOW:5,CIRCLE_SEGMENTS_MEDIUM:8,CIRCLE_SEGMENTS_HIGH:12},t);return this.wasmModule.CreateModel(r)}ExportFileAsIFC(t){this.wasmModule.ExportFileAsIFC(t);let r=this.fs.readFile("/export.ifc");return this.wasmModule.FS_unlink("/export.ifc"),r}GetGeometry(t,r){return this.wasmModule.GetGeometry(t,r)}GetLine(t,r,e=!1){let i=this.GetRawLineData(t,r),n=O[i.type](i);return e&&this.FlattenLine(t,n),n}WriteLine(t,r){Object.keys(r).forEach(i=>{let n=r[i];if(n&&n.expressID!==void 0)this.WriteLine(t,n),r[i]={type:5,value:n.expressID};else if(Array.isArray(n)&&n.length>0)for(let s=0;s{let i=r[e];if(i&&i.type===5)r[e]=this.GetLine(t,i.value,!0);else if(Array.isArray(i)&&i.length>0&&i[0].type===5)for(let n=0;nqo(t,r),Zwe=(t,r)=>new jt(new Float32Array(t),r),B3t=(t,r)=>new jt(new Uint32Array(t),r),qk="default",jl={aggregates:{name:Ck,relating:"RelatingObject",related:"RelatedObjects",key:"children"},spatial:{name:Ok,relating:"RelatingStructure",related:"RelatedElements",key:"children"},psets:{name:Pk,relating:"RelatingPropertyDefinition",related:"RelatedObjects",key:"hasPsets"},materials:{name:Ak,relating:"RelatingMaterial",related:"RelatedObjects",key:"hasMaterial"},type:{name:Nk,relating:"RelatingType",related:"RelatedObjects",key:"hasType"}},Yk=class{constructor(r,e){this.state=r,this.BVH=e,this.loadedModels=0,this.currentWebIfcID=-1,this.currentModelID=-1}parse(r){return ot(this,null,function*(){return this.state.api.wasmModule===void 0&&(yield this.state.api.Init()),this.newIfcModel(r),this.loadedModels++,this.loadAllGeometry()})}newIfcModel(r){let e=new Uint8Array(r);this.currentWebIfcID=this.state.api.OpenModel(e,this.state.webIfcSettings),this.currentModelID=this.state.useJSON?this.loadedModels:this.currentWebIfcID,this.state.models[this.currentModelID]={modelID:this.currentModelID,mesh:{},items:{},types:{},jsonData:{}}}loadAllGeometry(){return this.saveAllPlacedGeometriesByMaterial(),this.generateAllGeometriesByMaterial()}generateAllGeometriesByMaterial(){let{geometry:r,materials:e}=this.getGeometryAndMaterials();this.BVH.applyThreeMeshBVH(r);let i=new Je(r,e);return i.modelID=this.currentModelID,this.state.models[this.currentModelID].mesh=i,i}getGeometryAndMaterials(){let r=this.state.models[this.currentModelID].items,e=[],i=[];for(let s in r){i.push(r[s].material);let a=Object.values(r[s].geometries);e.push(UT(a))}return{geometry:UT(e,!0),materials:i}}saveAllPlacedGeometriesByMaterial(){let r=this.state.api.LoadAllGeometry(this.currentWebIfcID);for(let e=0;e0?UT(r,e):new it}isConfigValid(r){return this.isValid(r.scene)&&this.isValid(r.modelID)&&this.isValid(r.ids)&&this.isValid(r.removePrevious)}isValid(r){return r!=null}getGeomAndMat(r){let e=[],i=[];for(let n in r){let s=Object.values(r[n].geometries);s.length&&(i.push(r[n].material),s.length>1?e.push(UT(s)):e.push(...s))}return{geomsByMaterial:e,materials:i}}updatePreviousSelection(r,e){let i=this.selected[this.matID(e)];if(!i)return this.newSelectionGroup(e);r.remove(i.mesh),e.removePrevious?i.ids=new Set(e.ids):e.ids.forEach(n=>i.ids.add(n))}newSelectionGroup(r){this.selected[this.matID(r)]={ids:new Set(r.ids),mesh:{}}}isPreviousSelection(r){if(!this.selected[this.matID(r)])return!1;if(this.containsIds(r))return!0;let e=this.selected[this.matID(r)].ids;return JSON.stringify(r.ids)===JSON.stringify(e)}containsIds(r){let e=r.ids,i=Array.from(this.selected[this.matID(r)].ids);return e.every((n=>s=>n=i.indexOf(s,n)+1)(0))}addToPreviousSelection(r){let e=this.selected[this.matID(r)],i=this.filter(r),n=Object.values(i).map(a=>Object.values(a.geometries)).flat(),s=e.mesh.geometry;e.mesh.geometry=UT([s,...n]),r.ids.forEach(a=>e.ids.add(a))}filter(r){let e=this.selected[this.matID(r)].ids,i=this.state.models[r.modelID].items,n={};for(let s in i)n[s]={material:i[s].material,geometries:this.filterGeometries(e,i[s].geometries)};return n}filterGeometries(r,e){let i=Array.from(r);return Object.keys(e).filter(n=>i.includes(parseInt(n,10))).reduce((n,s)=>Mn(Ur({},n),{[s]:e[s]}),{})}isEasySelection(r){let e=this.matID(r);if(!r.removePrevious&&!this.isDefaultMat(r)&&this.selected[e])return!0}isDefaultMat(r){return this.matIDNoConfig(r.modelID)===this.matID(r)}matID(r){let e;return r.material?e=r.material.uuid||qk:e=qk,e.concat(" - ").concat(r.modelID.toString())}matIDNoConfig(r,e){let i=qk;return e&&(i=e.uuid),i.concat(" - ").concat(r.toString())}},t8={103090709:"IFCPROJECT",4097777520:"IFCSITE",4031249490:"IFCBUILDING",3124254112:"IFCBUILDINGSTOREY",3856911033:"IFCSPACE",1674181508:"IFCANNOTATION",25142252:"IFCCONTROLLER",32344328:"IFCBOILER",76236018:"IFCLAMP",90941305:"IFCPUMP",177149247:"IFCAIRTERMINALBOX",182646315:"IFCFLOWINSTRUMENT",263784265:"IFCFURNISHINGELEMENT",264262732:"IFCELECTRICGENERATOR",277319702:"IFCAUDIOVISUALAPPLIANCE",310824031:"IFCPIPEFITTING",331165859:"IFCSTAIR",342316401:"IFCDUCTFITTING",377706215:"IFCMECHANICALFASTENER",395920057:"IFCDOOR",402227799:"IFCELECTRICMOTOR",413509423:"IFCSYSTEMFURNITUREELEMENT",484807127:"IFCEVAPORATOR",486154966:"IFCWINDOWSTANDARDCASE",629592764:"IFCLIGHTFIXTURE",630975310:"IFCUNITARYCONTROLELEMENT",635142910:"IFCCABLECARRIERFITTING",639361253:"IFCCOIL",647756555:"IFCFASTENER",707683696:"IFCFLOWSTORAGEDEVICE",738039164:"IFCPROTECTIVEDEVICE",753842376:"IFCBEAM",812556717:"IFCTANK",819412036:"IFCFILTER",843113511:"IFCCOLUMN",862014818:"IFCELECTRICDISTRIBUTIONBOARD",900683007:"IFCFOOTING",905975707:"IFCCOLUMNSTANDARDCASE",926996030:"IFCVOIDINGFEATURE",979691226:"IFCREINFORCINGBAR",987401354:"IFCFLOWSEGMENT",1003880860:"IFCELECTRICTIMECONTROL",1051757585:"IFCCABLEFITTING",1052013943:"IFCDISTRIBUTIONCHAMBERELEMENT",1062813311:"IFCDISTRIBUTIONCONTROLELEMENT",1073191201:"IFCMEMBER",1095909175:"IFCBUILDINGELEMENTPROXY",1156407060:"IFCPLATESTANDARDCASE",1162798199:"IFCSWITCHINGDEVICE",1329646415:"IFCSHADINGDEVICE",1335981549:"IFCDISCRETEACCESSORY",1360408905:"IFCDUCTSILENCER",1404847402:"IFCSTACKTERMINAL",1426591983:"IFCFIRESUPPRESSIONTERMINAL",1437502449:"IFCMEDICALDEVICE",1509553395:"IFCFURNITURE",1529196076:"IFCSLAB",1620046519:"IFCTRANSPORTELEMENT",1634111441:"IFCAIRTERMINAL",1658829314:"IFCENERGYCONVERSIONDEVICE",1677625105:"IFCCIVILELEMENT",1687234759:"IFCPILE",1904799276:"IFCELECTRICAPPLIANCE",1911478936:"IFCMEMBERSTANDARDCASE",1945004755:"IFCDISTRIBUTIONELEMENT",1973544240:"IFCCOVERING",1999602285:"IFCSPACEHEATER",2016517767:"IFCROOF",2056796094:"IFCAIRTOAIRHEATRECOVERY",2058353004:"IFCFLOWCONTROLLER",2068733104:"IFCHUMIDIFIER",2176052936:"IFCJUNCTIONBOX",2188021234:"IFCFLOWMETER",2223149337:"IFCFLOWTERMINAL",2262370178:"IFCRAILING",2272882330:"IFCCONDENSER",2295281155:"IFCPROTECTIVEDEVICETRIPPINGUNIT",2320036040:"IFCREINFORCINGMESH",2347447852:"IFCTENDONANCHOR",2391383451:"IFCVIBRATIONISOLATOR",2391406946:"IFCWALL",2474470126:"IFCMOTORCONNECTION",2769231204:"IFCVIRTUALELEMENT",2814081492:"IFCENGINE",2906023776:"IFCBEAMSTANDARDCASE",2938176219:"IFCBURNER",2979338954:"IFCBUILDINGELEMENTPART",3024970846:"IFCRAMP",3026737570:"IFCTUBEBUNDLE",3027962421:"IFCSLABSTANDARDCASE",3040386961:"IFCDISTRIBUTIONFLOWELEMENT",3053780830:"IFCSANITARYTERMINAL",3079942009:"IFCOPENINGSTANDARDCASE",3087945054:"IFCALARM",3101698114:"IFCSURFACEFEATURE",3127900445:"IFCSLABELEMENTEDCASE",3132237377:"IFCFLOWMOVINGDEVICE",3171933400:"IFCPLATE",3221913625:"IFCCOMMUNICATIONSAPPLIANCE",3242481149:"IFCDOORSTANDARDCASE",3283111854:"IFCRAMPFLIGHT",3296154744:"IFCCHIMNEY",3304561284:"IFCWINDOW",3310460725:"IFCELECTRICFLOWSTORAGEDEVICE",3319311131:"IFCHEATEXCHANGER",3415622556:"IFCFAN",3420628829:"IFCSOLARDEVICE",3493046030:"IFCGEOGRAPHICELEMENT",3495092785:"IFCCURTAINWALL",3508470533:"IFCFLOWTREATMENTDEVICE",3512223829:"IFCWALLSTANDARDCASE",3518393246:"IFCDUCTSEGMENT",3571504051:"IFCCOMPRESSOR",3588315303:"IFCOPENINGELEMENT",3612865200:"IFCPIPESEGMENT",3640358203:"IFCCOOLINGTOWER",3651124850:"IFCPROJECTIONELEMENT",3694346114:"IFCOUTLET",3747195512:"IFCEVAPORATIVECOOLER",3758799889:"IFCCABLECARRIERSEGMENT",3824725483:"IFCTENDON",3825984169:"IFCTRANSFORMER",3902619387:"IFCCHILLER",4074379575:"IFCDAMPER",4086658281:"IFCSENSOR",4123344466:"IFCELEMENTASSEMBLY",4136498852:"IFCCOOLEDBEAM",4156078855:"IFCWALLELEMENTEDCASE",4175244083:"IFCINTERCEPTOR",4207607924:"IFCVALVE",4217484030:"IFCCABLESEGMENT",4237592921:"IFCWASTETERMINAL",4252922144:"IFCSTAIRFLIGHT",4278956645:"IFCFLOWFITTING",4288193352:"IFCACTUATOR",4292641817:"IFCUNITARYEQUIPMENT",3009204131:"IFCGRID"},k3t={3821786052:"IFCACTIONREQUEST",2296667514:"IFCACTOR",3630933823:"IFCACTORROLE",4288193352:"IFCACTUATOR",2874132201:"IFCACTUATORTYPE",618182010:"IFCADDRESS",1635779807:"IFCADVANCEDBREP",2603310189:"IFCADVANCEDBREPWITHVOIDS",3406155212:"IFCADVANCEDFACE",1634111441:"IFCAIRTERMINAL",177149247:"IFCAIRTERMINALBOX",1411407467:"IFCAIRTERMINALBOXTYPE",3352864051:"IFCAIRTERMINALTYPE",2056796094:"IFCAIRTOAIRHEATRECOVERY",1871374353:"IFCAIRTOAIRHEATRECOVERYTYPE",3087945054:"IFCALARM",3001207471:"IFCALARMTYPE",325726236:"IFCALIGNMENT",749761778:"IFCALIGNMENT2DHORIZONTAL",3199563722:"IFCALIGNMENT2DHORIZONTALSEGMENT",2483840362:"IFCALIGNMENT2DSEGMENT",3379348081:"IFCALIGNMENT2DVERSEGCIRCULARARC",3239324667:"IFCALIGNMENT2DVERSEGLINE",4263986512:"IFCALIGNMENT2DVERSEGPARABOLICARC",53199957:"IFCALIGNMENT2DVERTICAL",2029264950:"IFCALIGNMENT2DVERTICALSEGMENT",3512275521:"IFCALIGNMENTCURVE",1674181508:"IFCANNOTATION",669184980:"IFCANNOTATIONFILLAREA",639542469:"IFCAPPLICATION",411424972:"IFCAPPLIEDVALUE",130549933:"IFCAPPROVAL",3869604511:"IFCAPPROVALRELATIONSHIP",3798115385:"IFCARBITRARYCLOSEDPROFILEDEF",1310608509:"IFCARBITRARYOPENPROFILEDEF",2705031697:"IFCARBITRARYPROFILEDEFWITHVOIDS",3460190687:"IFCASSET",3207858831:"IFCASYMMETRICISHAPEPROFILEDEF",277319702:"IFCAUDIOVISUALAPPLIANCE",1532957894:"IFCAUDIOVISUALAPPLIANCETYPE",4261334040:"IFCAXIS1PLACEMENT",3125803723:"IFCAXIS2PLACEMENT2D",2740243338:"IFCAXIS2PLACEMENT3D",1967976161:"IFCBSPLINECURVE",2461110595:"IFCBSPLINECURVEWITHKNOTS",2887950389:"IFCBSPLINESURFACE",167062518:"IFCBSPLINESURFACEWITHKNOTS",753842376:"IFCBEAM",2906023776:"IFCBEAMSTANDARDCASE",819618141:"IFCBEAMTYPE",4196446775:"IFCBEARING",3649138523:"IFCBEARINGTYPE",616511568:"IFCBLOBTEXTURE",1334484129:"IFCBLOCK",32344328:"IFCBOILER",231477066:"IFCBOILERTYPE",3649129432:"IFCBOOLEANCLIPPINGRESULT",2736907675:"IFCBOOLEANRESULT",4037036970:"IFCBOUNDARYCONDITION",1136057603:"IFCBOUNDARYCURVE",1560379544:"IFCBOUNDARYEDGECONDITION",3367102660:"IFCBOUNDARYFACECONDITION",1387855156:"IFCBOUNDARYNODECONDITION",2069777674:"IFCBOUNDARYNODECONDITIONWARPING",1260505505:"IFCBOUNDEDCURVE",4182860854:"IFCBOUNDEDSURFACE",2581212453:"IFCBOUNDINGBOX",2713105998:"IFCBOXEDHALFSPACE",644574406:"IFCBRIDGE",963979645:"IFCBRIDGEPART",4031249490:"IFCBUILDING",3299480353:"IFCBUILDINGELEMENT",2979338954:"IFCBUILDINGELEMENTPART",39481116:"IFCBUILDINGELEMENTPARTTYPE",1095909175:"IFCBUILDINGELEMENTPROXY",1909888760:"IFCBUILDINGELEMENTPROXYTYPE",1950629157:"IFCBUILDINGELEMENTTYPE",3124254112:"IFCBUILDINGSTOREY",1177604601:"IFCBUILDINGSYSTEM",2938176219:"IFCBURNER",2188180465:"IFCBURNERTYPE",2898889636:"IFCCSHAPEPROFILEDEF",635142910:"IFCCABLECARRIERFITTING",395041908:"IFCCABLECARRIERFITTINGTYPE",3758799889:"IFCCABLECARRIERSEGMENT",3293546465:"IFCCABLECARRIERSEGMENTTYPE",1051757585:"IFCCABLEFITTING",2674252688:"IFCCABLEFITTINGTYPE",4217484030:"IFCCABLESEGMENT",1285652485:"IFCCABLESEGMENTTYPE",3999819293:"IFCCAISSONFOUNDATION",3203706013:"IFCCAISSONFOUNDATIONTYPE",1123145078:"IFCCARTESIANPOINT",574549367:"IFCCARTESIANPOINTLIST",1675464909:"IFCCARTESIANPOINTLIST2D",2059837836:"IFCCARTESIANPOINTLIST3D",59481748:"IFCCARTESIANTRANSFORMATIONOPERATOR",3749851601:"IFCCARTESIANTRANSFORMATIONOPERATOR2D",3486308946:"IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM",3331915920:"IFCCARTESIANTRANSFORMATIONOPERATOR3D",1416205885:"IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM",3150382593:"IFCCENTERLINEPROFILEDEF",3902619387:"IFCCHILLER",2951183804:"IFCCHILLERTYPE",3296154744:"IFCCHIMNEY",2197970202:"IFCCHIMNEYTYPE",2611217952:"IFCCIRCLE",2937912522:"IFCCIRCLEHOLLOWPROFILEDEF",1383045692:"IFCCIRCLEPROFILEDEF",1062206242:"IFCCIRCULARARCSEGMENT2D",1677625105:"IFCCIVILELEMENT",3893394355:"IFCCIVILELEMENTTYPE",747523909:"IFCCLASSIFICATION",647927063:"IFCCLASSIFICATIONREFERENCE",2205249479:"IFCCLOSEDSHELL",639361253:"IFCCOIL",2301859152:"IFCCOILTYPE",776857604:"IFCCOLOURRGB",3285139300:"IFCCOLOURRGBLIST",3264961684:"IFCCOLOURSPECIFICATION",843113511:"IFCCOLUMN",905975707:"IFCCOLUMNSTANDARDCASE",300633059:"IFCCOLUMNTYPE",3221913625:"IFCCOMMUNICATIONSAPPLIANCE",400855858:"IFCCOMMUNICATIONSAPPLIANCETYPE",2542286263:"IFCCOMPLEXPROPERTY",3875453745:"IFCCOMPLEXPROPERTYTEMPLATE",3732776249:"IFCCOMPOSITECURVE",15328376:"IFCCOMPOSITECURVEONSURFACE",2485617015:"IFCCOMPOSITECURVESEGMENT",1485152156:"IFCCOMPOSITEPROFILEDEF",3571504051:"IFCCOMPRESSOR",3850581409:"IFCCOMPRESSORTYPE",2272882330:"IFCCONDENSER",2816379211:"IFCCONDENSERTYPE",2510884976:"IFCCONIC",370225590:"IFCCONNECTEDFACESET",1981873012:"IFCCONNECTIONCURVEGEOMETRY",2859738748:"IFCCONNECTIONGEOMETRY",45288368:"IFCCONNECTIONPOINTECCENTRICITY",2614616156:"IFCCONNECTIONPOINTGEOMETRY",2732653382:"IFCCONNECTIONSURFACEGEOMETRY",775493141:"IFCCONNECTIONVOLUMEGEOMETRY",1959218052:"IFCCONSTRAINT",3898045240:"IFCCONSTRUCTIONEQUIPMENTRESOURCE",2185764099:"IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE",1060000209:"IFCCONSTRUCTIONMATERIALRESOURCE",4105962743:"IFCCONSTRUCTIONMATERIALRESOURCETYPE",488727124:"IFCCONSTRUCTIONPRODUCTRESOURCE",1525564444:"IFCCONSTRUCTIONPRODUCTRESOURCETYPE",2559216714:"IFCCONSTRUCTIONRESOURCE",2574617495:"IFCCONSTRUCTIONRESOURCETYPE",3419103109:"IFCCONTEXT",3050246964:"IFCCONTEXTDEPENDENTUNIT",3293443760:"IFCCONTROL",25142252:"IFCCONTROLLER",578613899:"IFCCONTROLLERTYPE",2889183280:"IFCCONVERSIONBASEDUNIT",2713554722:"IFCCONVERSIONBASEDUNITWITHOFFSET",4136498852:"IFCCOOLEDBEAM",335055490:"IFCCOOLEDBEAMTYPE",3640358203:"IFCCOOLINGTOWER",2954562838:"IFCCOOLINGTOWERTYPE",1785450214:"IFCCOORDINATEOPERATION",1466758467:"IFCCOORDINATEREFERENCESYSTEM",3895139033:"IFCCOSTITEM",1419761937:"IFCCOSTSCHEDULE",602808272:"IFCCOSTVALUE",1973544240:"IFCCOVERING",1916426348:"IFCCOVERINGTYPE",3295246426:"IFCCREWRESOURCE",1815067380:"IFCCREWRESOURCETYPE",2506170314:"IFCCSGPRIMITIVE3D",2147822146:"IFCCSGSOLID",539742890:"IFCCURRENCYRELATIONSHIP",3495092785:"IFCCURTAINWALL",1457835157:"IFCCURTAINWALLTYPE",2601014836:"IFCCURVE",2827736869:"IFCCURVEBOUNDEDPLANE",2629017746:"IFCCURVEBOUNDEDSURFACE",1186437898:"IFCCURVESEGMENT2D",3800577675:"IFCCURVESTYLE",1105321065:"IFCCURVESTYLEFONT",2367409068:"IFCCURVESTYLEFONTANDSCALING",3510044353:"IFCCURVESTYLEFONTPATTERN",1213902940:"IFCCYLINDRICALSURFACE",4074379575:"IFCDAMPER",3961806047:"IFCDAMPERTYPE",3426335179:"IFCDEEPFOUNDATION",1306400036:"IFCDEEPFOUNDATIONTYPE",3632507154:"IFCDERIVEDPROFILEDEF",1765591967:"IFCDERIVEDUNIT",1045800335:"IFCDERIVEDUNITELEMENT",2949456006:"IFCDIMENSIONALEXPONENTS",32440307:"IFCDIRECTION",1335981549:"IFCDISCRETEACCESSORY",2635815018:"IFCDISCRETEACCESSORYTYPE",1945343521:"IFCDISTANCEEXPRESSION",1052013943:"IFCDISTRIBUTIONCHAMBERELEMENT",1599208980:"IFCDISTRIBUTIONCHAMBERELEMENTTYPE",562808652:"IFCDISTRIBUTIONCIRCUIT",1062813311:"IFCDISTRIBUTIONCONTROLELEMENT",2063403501:"IFCDISTRIBUTIONCONTROLELEMENTTYPE",1945004755:"IFCDISTRIBUTIONELEMENT",3256556792:"IFCDISTRIBUTIONELEMENTTYPE",3040386961:"IFCDISTRIBUTIONFLOWELEMENT",3849074793:"IFCDISTRIBUTIONFLOWELEMENTTYPE",3041715199:"IFCDISTRIBUTIONPORT",3205830791:"IFCDISTRIBUTIONSYSTEM",1154170062:"IFCDOCUMENTINFORMATION",770865208:"IFCDOCUMENTINFORMATIONRELATIONSHIP",3732053477:"IFCDOCUMENTREFERENCE",395920057:"IFCDOOR",2963535650:"IFCDOORLININGPROPERTIES",1714330368:"IFCDOORPANELPROPERTIES",3242481149:"IFCDOORSTANDARDCASE",526551008:"IFCDOORSTYLE",2323601079:"IFCDOORTYPE",445594917:"IFCDRAUGHTINGPREDEFINEDCOLOUR",4006246654:"IFCDRAUGHTINGPREDEFINEDCURVEFONT",342316401:"IFCDUCTFITTING",869906466:"IFCDUCTFITTINGTYPE",3518393246:"IFCDUCTSEGMENT",3760055223:"IFCDUCTSEGMENTTYPE",1360408905:"IFCDUCTSILENCER",2030761528:"IFCDUCTSILENCERTYPE",3900360178:"IFCEDGE",476780140:"IFCEDGECURVE",1472233963:"IFCEDGELOOP",1904799276:"IFCELECTRICAPPLIANCE",663422040:"IFCELECTRICAPPLIANCETYPE",862014818:"IFCELECTRICDISTRIBUTIONBOARD",2417008758:"IFCELECTRICDISTRIBUTIONBOARDTYPE",3310460725:"IFCELECTRICFLOWSTORAGEDEVICE",3277789161:"IFCELECTRICFLOWSTORAGEDEVICETYPE",264262732:"IFCELECTRICGENERATOR",1534661035:"IFCELECTRICGENERATORTYPE",402227799:"IFCELECTRICMOTOR",1217240411:"IFCELECTRICMOTORTYPE",1003880860:"IFCELECTRICTIMECONTROL",712377611:"IFCELECTRICTIMECONTROLTYPE",1758889154:"IFCELEMENT",4123344466:"IFCELEMENTASSEMBLY",2397081782:"IFCELEMENTASSEMBLYTYPE",1623761950:"IFCELEMENTCOMPONENT",2590856083:"IFCELEMENTCOMPONENTTYPE",1883228015:"IFCELEMENTQUANTITY",339256511:"IFCELEMENTTYPE",2777663545:"IFCELEMENTARYSURFACE",1704287377:"IFCELLIPSE",2835456948:"IFCELLIPSEPROFILEDEF",1658829314:"IFCENERGYCONVERSIONDEVICE",2107101300:"IFCENERGYCONVERSIONDEVICETYPE",2814081492:"IFCENGINE",132023988:"IFCENGINETYPE",3747195512:"IFCEVAPORATIVECOOLER",3174744832:"IFCEVAPORATIVECOOLERTYPE",484807127:"IFCEVAPORATOR",3390157468:"IFCEVAPORATORTYPE",4148101412:"IFCEVENT",211053100:"IFCEVENTTIME",4024345920:"IFCEVENTTYPE",297599258:"IFCEXTENDEDPROPERTIES",4294318154:"IFCEXTERNALINFORMATION",3200245327:"IFCEXTERNALREFERENCE",1437805879:"IFCEXTERNALREFERENCERELATIONSHIP",1209101575:"IFCEXTERNALSPATIALELEMENT",2853485674:"IFCEXTERNALSPATIALSTRUCTUREELEMENT",2242383968:"IFCEXTERNALLYDEFINEDHATCHSTYLE",1040185647:"IFCEXTERNALLYDEFINEDSURFACESTYLE",3548104201:"IFCEXTERNALLYDEFINEDTEXTFONT",477187591:"IFCEXTRUDEDAREASOLID",2804161546:"IFCEXTRUDEDAREASOLIDTAPERED",2556980723:"IFCFACE",2047409740:"IFCFACEBASEDSURFACEMODEL",1809719519:"IFCFACEBOUND",803316827:"IFCFACEOUTERBOUND",3008276851:"IFCFACESURFACE",807026263:"IFCFACETEDBREP",3737207727:"IFCFACETEDBREPWITHVOIDS",24185140:"IFCFACILITY",1310830890:"IFCFACILITYPART",4219587988:"IFCFAILURECONNECTIONCONDITION",3415622556:"IFCFAN",346874300:"IFCFANTYPE",647756555:"IFCFASTENER",2489546625:"IFCFASTENERTYPE",2827207264:"IFCFEATUREELEMENT",2143335405:"IFCFEATUREELEMENTADDITION",1287392070:"IFCFEATUREELEMENTSUBTRACTION",738692330:"IFCFILLAREASTYLE",374418227:"IFCFILLAREASTYLEHATCHING",315944413:"IFCFILLAREASTYLETILES",819412036:"IFCFILTER",1810631287:"IFCFILTERTYPE",1426591983:"IFCFIRESUPPRESSIONTERMINAL",4222183408:"IFCFIRESUPPRESSIONTERMINALTYPE",2652556860:"IFCFIXEDREFERENCESWEPTAREASOLID",2058353004:"IFCFLOWCONTROLLER",3907093117:"IFCFLOWCONTROLLERTYPE",4278956645:"IFCFLOWFITTING",3198132628:"IFCFLOWFITTINGTYPE",182646315:"IFCFLOWINSTRUMENT",4037862832:"IFCFLOWINSTRUMENTTYPE",2188021234:"IFCFLOWMETER",3815607619:"IFCFLOWMETERTYPE",3132237377:"IFCFLOWMOVINGDEVICE",1482959167:"IFCFLOWMOVINGDEVICETYPE",987401354:"IFCFLOWSEGMENT",1834744321:"IFCFLOWSEGMENTTYPE",707683696:"IFCFLOWSTORAGEDEVICE",1339347760:"IFCFLOWSTORAGEDEVICETYPE",2223149337:"IFCFLOWTERMINAL",2297155007:"IFCFLOWTERMINALTYPE",3508470533:"IFCFLOWTREATMENTDEVICE",3009222698:"IFCFLOWTREATMENTDEVICETYPE",900683007:"IFCFOOTING",1893162501:"IFCFOOTINGTYPE",263784265:"IFCFURNISHINGELEMENT",4238390223:"IFCFURNISHINGELEMENTTYPE",1509553395:"IFCFURNITURE",1268542332:"IFCFURNITURETYPE",3493046030:"IFCGEOGRAPHICELEMENT",4095422895:"IFCGEOGRAPHICELEMENTTYPE",987898635:"IFCGEOMETRICCURVESET",3448662350:"IFCGEOMETRICREPRESENTATIONCONTEXT",2453401579:"IFCGEOMETRICREPRESENTATIONITEM",4142052618:"IFCGEOMETRICREPRESENTATIONSUBCONTEXT",3590301190:"IFCGEOMETRICSET",3009204131:"IFCGRID",852622518:"IFCGRIDAXIS",178086475:"IFCGRIDPLACEMENT",2706460486:"IFCGROUP",812098782:"IFCHALFSPACESOLID",3319311131:"IFCHEATEXCHANGER",1251058090:"IFCHEATEXCHANGERTYPE",2068733104:"IFCHUMIDIFIER",1806887404:"IFCHUMIDIFIERTYPE",1484403080:"IFCISHAPEPROFILEDEF",3905492369:"IFCIMAGETEXTURE",3570813810:"IFCINDEXEDCOLOURMAP",2571569899:"IFCINDEXEDPOLYCURVE",178912537:"IFCINDEXEDPOLYGONALFACE",2294589976:"IFCINDEXEDPOLYGONALFACEWITHVOIDS",1437953363:"IFCINDEXEDTEXTUREMAP",2133299955:"IFCINDEXEDTRIANGLETEXTUREMAP",4175244083:"IFCINTERCEPTOR",3946677679:"IFCINTERCEPTORTYPE",3113134337:"IFCINTERSECTIONCURVE",2391368822:"IFCINVENTORY",3741457305:"IFCIRREGULARTIMESERIES",3020489413:"IFCIRREGULARTIMESERIESVALUE",2176052936:"IFCJUNCTIONBOX",4288270099:"IFCJUNCTIONBOXTYPE",572779678:"IFCLSHAPEPROFILEDEF",3827777499:"IFCLABORRESOURCE",428585644:"IFCLABORRESOURCETYPE",1585845231:"IFCLAGTIME",76236018:"IFCLAMP",1051575348:"IFCLAMPTYPE",2655187982:"IFCLIBRARYINFORMATION",3452421091:"IFCLIBRARYREFERENCE",4162380809:"IFCLIGHTDISTRIBUTIONDATA",629592764:"IFCLIGHTFIXTURE",1161773419:"IFCLIGHTFIXTURETYPE",1566485204:"IFCLIGHTINTENSITYDISTRIBUTION",1402838566:"IFCLIGHTSOURCE",125510826:"IFCLIGHTSOURCEAMBIENT",2604431987:"IFCLIGHTSOURCEDIRECTIONAL",4266656042:"IFCLIGHTSOURCEGONIOMETRIC",1520743889:"IFCLIGHTSOURCEPOSITIONAL",3422422726:"IFCLIGHTSOURCESPOT",1281925730:"IFCLINE",3092502836:"IFCLINESEGMENT2D",388784114:"IFCLINEARPLACEMENT",1154579445:"IFCLINEARPOSITIONINGELEMENT",2624227202:"IFCLOCALPLACEMENT",1008929658:"IFCLOOP",1425443689:"IFCMANIFOLDSOLIDBREP",3057273783:"IFCMAPCONVERSION",2347385850:"IFCMAPPEDITEM",1838606355:"IFCMATERIAL",1847130766:"IFCMATERIALCLASSIFICATIONRELATIONSHIP",3708119e3:"IFCMATERIALCONSTITUENT",2852063980:"IFCMATERIALCONSTITUENTSET",760658860:"IFCMATERIALDEFINITION",2022407955:"IFCMATERIALDEFINITIONREPRESENTATION",248100487:"IFCMATERIALLAYER",3303938423:"IFCMATERIALLAYERSET",1303795690:"IFCMATERIALLAYERSETUSAGE",1847252529:"IFCMATERIALLAYERWITHOFFSETS",2199411900:"IFCMATERIALLIST",2235152071:"IFCMATERIALPROFILE",164193824:"IFCMATERIALPROFILESET",3079605661:"IFCMATERIALPROFILESETUSAGE",3404854881:"IFCMATERIALPROFILESETUSAGETAPERING",552965576:"IFCMATERIALPROFILEWITHOFFSETS",3265635763:"IFCMATERIALPROPERTIES",853536259:"IFCMATERIALRELATIONSHIP",1507914824:"IFCMATERIALUSAGEDEFINITION",2597039031:"IFCMEASUREWITHUNIT",377706215:"IFCMECHANICALFASTENER",2108223431:"IFCMECHANICALFASTENERTYPE",1437502449:"IFCMEDICALDEVICE",1114901282:"IFCMEDICALDEVICETYPE",1073191201:"IFCMEMBER",1911478936:"IFCMEMBERSTANDARDCASE",3181161470:"IFCMEMBERTYPE",3368373690:"IFCMETRIC",2998442950:"IFCMIRROREDPROFILEDEF",2706619895:"IFCMONETARYUNIT",2474470126:"IFCMOTORCONNECTION",977012517:"IFCMOTORCONNECTIONTYPE",1918398963:"IFCNAMEDUNIT",3888040117:"IFCOBJECT",219451334:"IFCOBJECTDEFINITION",3701648758:"IFCOBJECTPLACEMENT",2251480897:"IFCOBJECTIVE",4143007308:"IFCOCCUPANT",590820931:"IFCOFFSETCURVE",3388369263:"IFCOFFSETCURVE2D",3505215534:"IFCOFFSETCURVE3D",2485787929:"IFCOFFSETCURVEBYDISTANCES",2665983363:"IFCOPENSHELL",3588315303:"IFCOPENINGELEMENT",3079942009:"IFCOPENINGSTANDARDCASE",4251960020:"IFCORGANIZATION",1411181986:"IFCORGANIZATIONRELATIONSHIP",643959842:"IFCORIENTATIONEXPRESSION",1029017970:"IFCORIENTEDEDGE",144952367:"IFCOUTERBOUNDARYCURVE",3694346114:"IFCOUTLET",2837617999:"IFCOUTLETTYPE",1207048766:"IFCOWNERHISTORY",2529465313:"IFCPARAMETERIZEDPROFILEDEF",2519244187:"IFCPATH",1682466193:"IFCPCURVE",2382730787:"IFCPERFORMANCEHISTORY",3566463478:"IFCPERMEABLECOVERINGPROPERTIES",3327091369:"IFCPERMIT",2077209135:"IFCPERSON",101040310:"IFCPERSONANDORGANIZATION",3021840470:"IFCPHYSICALCOMPLEXQUANTITY",2483315170:"IFCPHYSICALQUANTITY",2226359599:"IFCPHYSICALSIMPLEQUANTITY",1687234759:"IFCPILE",1158309216:"IFCPILETYPE",310824031:"IFCPIPEFITTING",804291784:"IFCPIPEFITTINGTYPE",3612865200:"IFCPIPESEGMENT",4231323485:"IFCPIPESEGMENTTYPE",597895409:"IFCPIXELTEXTURE",2004835150:"IFCPLACEMENT",603570806:"IFCPLANARBOX",1663979128:"IFCPLANAREXTENT",220341763:"IFCPLANE",3171933400:"IFCPLATE",1156407060:"IFCPLATESTANDARDCASE",4017108033:"IFCPLATETYPE",2067069095:"IFCPOINT",4022376103:"IFCPOINTONCURVE",1423911732:"IFCPOINTONSURFACE",2924175390:"IFCPOLYLOOP",2775532180:"IFCPOLYGONALBOUNDEDHALFSPACE",2839578677:"IFCPOLYGONALFACESET",3724593414:"IFCPOLYLINE",3740093272:"IFCPORT",1946335990:"IFCPOSITIONINGELEMENT",3355820592:"IFCPOSTALADDRESS",759155922:"IFCPREDEFINEDCOLOUR",2559016684:"IFCPREDEFINEDCURVEFONT",3727388367:"IFCPREDEFINEDITEM",3778827333:"IFCPREDEFINEDPROPERTIES",3967405729:"IFCPREDEFINEDPROPERTYSET",1775413392:"IFCPREDEFINEDTEXTFONT",677532197:"IFCPRESENTATIONITEM",2022622350:"IFCPRESENTATIONLAYERASSIGNMENT",1304840413:"IFCPRESENTATIONLAYERWITHSTYLE",3119450353:"IFCPRESENTATIONSTYLE",2417041796:"IFCPRESENTATIONSTYLEASSIGNMENT",2744685151:"IFCPROCEDURE",569719735:"IFCPROCEDURETYPE",2945172077:"IFCPROCESS",4208778838:"IFCPRODUCT",673634403:"IFCPRODUCTDEFINITIONSHAPE",2095639259:"IFCPRODUCTREPRESENTATION",3958567839:"IFCPROFILEDEF",2802850158:"IFCPROFILEPROPERTIES",103090709:"IFCPROJECT",653396225:"IFCPROJECTLIBRARY",2904328755:"IFCPROJECTORDER",3843373140:"IFCPROJECTEDCRS",3651124850:"IFCPROJECTIONELEMENT",2598011224:"IFCPROPERTY",986844984:"IFCPROPERTYABSTRACTION",871118103:"IFCPROPERTYBOUNDEDVALUE",1680319473:"IFCPROPERTYDEFINITION",148025276:"IFCPROPERTYDEPENDENCYRELATIONSHIP",4166981789:"IFCPROPERTYENUMERATEDVALUE",3710013099:"IFCPROPERTYENUMERATION",2752243245:"IFCPROPERTYLISTVALUE",941946838:"IFCPROPERTYREFERENCEVALUE",1451395588:"IFCPROPERTYSET",3357820518:"IFCPROPERTYSETDEFINITION",492091185:"IFCPROPERTYSETTEMPLATE",3650150729:"IFCPROPERTYSINGLEVALUE",110355661:"IFCPROPERTYTABLEVALUE",3521284610:"IFCPROPERTYTEMPLATE",1482703590:"IFCPROPERTYTEMPLATEDEFINITION",738039164:"IFCPROTECTIVEDEVICE",2295281155:"IFCPROTECTIVEDEVICETRIPPINGUNIT",655969474:"IFCPROTECTIVEDEVICETRIPPINGUNITTYPE",1842657554:"IFCPROTECTIVEDEVICETYPE",3219374653:"IFCPROXY",90941305:"IFCPUMP",2250791053:"IFCPUMPTYPE",2044713172:"IFCQUANTITYAREA",2093928680:"IFCQUANTITYCOUNT",931644368:"IFCQUANTITYLENGTH",2090586900:"IFCQUANTITYSET",3252649465:"IFCQUANTITYTIME",2405470396:"IFCQUANTITYVOLUME",825690147:"IFCQUANTITYWEIGHT",2262370178:"IFCRAILING",2893384427:"IFCRAILINGTYPE",3024970846:"IFCRAMP",3283111854:"IFCRAMPFLIGHT",2324767716:"IFCRAMPFLIGHTTYPE",1469900589:"IFCRAMPTYPE",1232101972:"IFCRATIONALBSPLINECURVEWITHKNOTS",683857671:"IFCRATIONALBSPLINESURFACEWITHKNOTS",2770003689:"IFCRECTANGLEHOLLOWPROFILEDEF",3615266464:"IFCRECTANGLEPROFILEDEF",2798486643:"IFCRECTANGULARPYRAMID",3454111270:"IFCRECTANGULARTRIMMEDSURFACE",3915482550:"IFCRECURRENCEPATTERN",2433181523:"IFCREFERENCE",4021432810:"IFCREFERENT",3413951693:"IFCREGULARTIMESERIES",1580146022:"IFCREINFORCEMENTBARPROPERTIES",3765753017:"IFCREINFORCEMENTDEFINITIONPROPERTIES",979691226:"IFCREINFORCINGBAR",2572171363:"IFCREINFORCINGBARTYPE",3027567501:"IFCREINFORCINGELEMENT",964333572:"IFCREINFORCINGELEMENTTYPE",2320036040:"IFCREINFORCINGMESH",2310774935:"IFCREINFORCINGMESHTYPE",160246688:"IFCRELAGGREGATES",3939117080:"IFCRELASSIGNS",1683148259:"IFCRELASSIGNSTOACTOR",2495723537:"IFCRELASSIGNSTOCONTROL",1307041759:"IFCRELASSIGNSTOGROUP",1027710054:"IFCRELASSIGNSTOGROUPBYFACTOR",4278684876:"IFCRELASSIGNSTOPROCESS",2857406711:"IFCRELASSIGNSTOPRODUCT",205026976:"IFCRELASSIGNSTORESOURCE",1865459582:"IFCRELASSOCIATES",4095574036:"IFCRELASSOCIATESAPPROVAL",919958153:"IFCRELASSOCIATESCLASSIFICATION",2728634034:"IFCRELASSOCIATESCONSTRAINT",982818633:"IFCRELASSOCIATESDOCUMENT",3840914261:"IFCRELASSOCIATESLIBRARY",2655215786:"IFCRELASSOCIATESMATERIAL",826625072:"IFCRELCONNECTS",1204542856:"IFCRELCONNECTSELEMENTS",3945020480:"IFCRELCONNECTSPATHELEMENTS",4201705270:"IFCRELCONNECTSPORTTOELEMENT",3190031847:"IFCRELCONNECTSPORTS",2127690289:"IFCRELCONNECTSSTRUCTURALACTIVITY",1638771189:"IFCRELCONNECTSSTRUCTURALMEMBER",504942748:"IFCRELCONNECTSWITHECCENTRICITY",3678494232:"IFCRELCONNECTSWITHREALIZINGELEMENTS",3242617779:"IFCRELCONTAINEDINSPATIALSTRUCTURE",886880790:"IFCRELCOVERSBLDGELEMENTS",2802773753:"IFCRELCOVERSSPACES",2565941209:"IFCRELDECLARES",2551354335:"IFCRELDECOMPOSES",693640335:"IFCRELDEFINES",1462361463:"IFCRELDEFINESBYOBJECT",4186316022:"IFCRELDEFINESBYPROPERTIES",307848117:"IFCRELDEFINESBYTEMPLATE",781010003:"IFCRELDEFINESBYTYPE",3940055652:"IFCRELFILLSELEMENT",279856033:"IFCRELFLOWCONTROLELEMENTS",427948657:"IFCRELINTERFERESELEMENTS",3268803585:"IFCRELNESTS",1441486842:"IFCRELPOSITIONS",750771296:"IFCRELPROJECTSELEMENT",1245217292:"IFCRELREFERENCEDINSPATIALSTRUCTURE",4122056220:"IFCRELSEQUENCE",366585022:"IFCRELSERVICESBUILDINGS",3451746338:"IFCRELSPACEBOUNDARY",3523091289:"IFCRELSPACEBOUNDARY1STLEVEL",1521410863:"IFCRELSPACEBOUNDARY2NDLEVEL",1401173127:"IFCRELVOIDSELEMENT",478536968:"IFCRELATIONSHIP",816062949:"IFCREPARAMETRISEDCOMPOSITECURVESEGMENT",1076942058:"IFCREPRESENTATION",3377609919:"IFCREPRESENTATIONCONTEXT",3008791417:"IFCREPRESENTATIONITEM",1660063152:"IFCREPRESENTATIONMAP",2914609552:"IFCRESOURCE",2943643501:"IFCRESOURCEAPPROVALRELATIONSHIP",1608871552:"IFCRESOURCECONSTRAINTRELATIONSHIP",2439245199:"IFCRESOURCELEVELRELATIONSHIP",1042787934:"IFCRESOURCETIME",1856042241:"IFCREVOLVEDAREASOLID",3243963512:"IFCREVOLVEDAREASOLIDTAPERED",4158566097:"IFCRIGHTCIRCULARCONE",3626867408:"IFCRIGHTCIRCULARCYLINDER",2016517767:"IFCROOF",2781568857:"IFCROOFTYPE",2341007311:"IFCROOT",2778083089:"IFCROUNDEDRECTANGLEPROFILEDEF",448429030:"IFCSIUNIT",3053780830:"IFCSANITARYTERMINAL",1768891740:"IFCSANITARYTERMINALTYPE",1054537805:"IFCSCHEDULINGTIME",2157484638:"IFCSEAMCURVE",2042790032:"IFCSECTIONPROPERTIES",4165799628:"IFCSECTIONREINFORCEMENTPROPERTIES",1862484736:"IFCSECTIONEDSOLID",1290935644:"IFCSECTIONEDSOLIDHORIZONTAL",1509187699:"IFCSECTIONEDSPINE",4086658281:"IFCSENSOR",1783015770:"IFCSENSORTYPE",1329646415:"IFCSHADINGDEVICE",4074543187:"IFCSHADINGDEVICETYPE",867548509:"IFCSHAPEASPECT",3982875396:"IFCSHAPEMODEL",4240577450:"IFCSHAPEREPRESENTATION",4124623270:"IFCSHELLBASEDSURFACEMODEL",3692461612:"IFCSIMPLEPROPERTY",3663146110:"IFCSIMPLEPROPERTYTEMPLATE",4097777520:"IFCSITE",1529196076:"IFCSLAB",3127900445:"IFCSLABELEMENTEDCASE",3027962421:"IFCSLABSTANDARDCASE",2533589738:"IFCSLABTYPE",2609359061:"IFCSLIPPAGECONNECTIONCONDITION",3420628829:"IFCSOLARDEVICE",1072016465:"IFCSOLARDEVICETYPE",723233188:"IFCSOLIDMODEL",3856911033:"IFCSPACE",1999602285:"IFCSPACEHEATER",1305183839:"IFCSPACEHEATERTYPE",3812236995:"IFCSPACETYPE",1412071761:"IFCSPATIALELEMENT",710998568:"IFCSPATIALELEMENTTYPE",2706606064:"IFCSPATIALSTRUCTUREELEMENT",3893378262:"IFCSPATIALSTRUCTUREELEMENTTYPE",463610769:"IFCSPATIALZONE",2481509218:"IFCSPATIALZONETYPE",451544542:"IFCSPHERE",4015995234:"IFCSPHERICALSURFACE",1404847402:"IFCSTACKTERMINAL",3112655638:"IFCSTACKTERMINALTYPE",331165859:"IFCSTAIR",4252922144:"IFCSTAIRFLIGHT",1039846685:"IFCSTAIRFLIGHTTYPE",338393293:"IFCSTAIRTYPE",682877961:"IFCSTRUCTURALACTION",3544373492:"IFCSTRUCTURALACTIVITY",2515109513:"IFCSTRUCTURALANALYSISMODEL",1179482911:"IFCSTRUCTURALCONNECTION",2273995522:"IFCSTRUCTURALCONNECTIONCONDITION",1004757350:"IFCSTRUCTURALCURVEACTION",4243806635:"IFCSTRUCTURALCURVECONNECTION",214636428:"IFCSTRUCTURALCURVEMEMBER",2445595289:"IFCSTRUCTURALCURVEMEMBERVARYING",2757150158:"IFCSTRUCTURALCURVEREACTION",3136571912:"IFCSTRUCTURALITEM",1807405624:"IFCSTRUCTURALLINEARACTION",2162789131:"IFCSTRUCTURALLOAD",385403989:"IFCSTRUCTURALLOADCASE",3478079324:"IFCSTRUCTURALLOADCONFIGURATION",1252848954:"IFCSTRUCTURALLOADGROUP",1595516126:"IFCSTRUCTURALLOADLINEARFORCE",609421318:"IFCSTRUCTURALLOADORRESULT",2668620305:"IFCSTRUCTURALLOADPLANARFORCE",2473145415:"IFCSTRUCTURALLOADSINGLEDISPLACEMENT",1973038258:"IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION",1597423693:"IFCSTRUCTURALLOADSINGLEFORCE",1190533807:"IFCSTRUCTURALLOADSINGLEFORCEWARPING",2525727697:"IFCSTRUCTURALLOADSTATIC",3408363356:"IFCSTRUCTURALLOADTEMPERATURE",530289379:"IFCSTRUCTURALMEMBER",1621171031:"IFCSTRUCTURALPLANARACTION",2082059205:"IFCSTRUCTURALPOINTACTION",734778138:"IFCSTRUCTURALPOINTCONNECTION",1235345126:"IFCSTRUCTURALPOINTREACTION",3689010777:"IFCSTRUCTURALREACTION",2986769608:"IFCSTRUCTURALRESULTGROUP",3657597509:"IFCSTRUCTURALSURFACEACTION",1975003073:"IFCSTRUCTURALSURFACECONNECTION",3979015343:"IFCSTRUCTURALSURFACEMEMBER",2218152070:"IFCSTRUCTURALSURFACEMEMBERVARYING",603775116:"IFCSTRUCTURALSURFACEREACTION",2830218821:"IFCSTYLEMODEL",3958052878:"IFCSTYLEDITEM",3049322572:"IFCSTYLEDREPRESENTATION",148013059:"IFCSUBCONTRACTRESOURCE",4095615324:"IFCSUBCONTRACTRESOURCETYPE",2233826070:"IFCSUBEDGE",2513912981:"IFCSURFACE",699246055:"IFCSURFACECURVE",2028607225:"IFCSURFACECURVESWEPTAREASOLID",3101698114:"IFCSURFACEFEATURE",2809605785:"IFCSURFACEOFLINEAREXTRUSION",4124788165:"IFCSURFACEOFREVOLUTION",2934153892:"IFCSURFACEREINFORCEMENTAREA",1300840506:"IFCSURFACESTYLE",3303107099:"IFCSURFACESTYLELIGHTING",1607154358:"IFCSURFACESTYLEREFRACTION",1878645084:"IFCSURFACESTYLERENDERING",846575682:"IFCSURFACESTYLESHADING",1351298697:"IFCSURFACESTYLEWITHTEXTURES",626085974:"IFCSURFACETEXTURE",2247615214:"IFCSWEPTAREASOLID",1260650574:"IFCSWEPTDISKSOLID",1096409881:"IFCSWEPTDISKSOLIDPOLYGONAL",230924584:"IFCSWEPTSURFACE",1162798199:"IFCSWITCHINGDEVICE",2315554128:"IFCSWITCHINGDEVICETYPE",2254336722:"IFCSYSTEM",413509423:"IFCSYSTEMFURNITUREELEMENT",1580310250:"IFCSYSTEMFURNITUREELEMENTTYPE",3071757647:"IFCTSHAPEPROFILEDEF",985171141:"IFCTABLE",2043862942:"IFCTABLECOLUMN",531007025:"IFCTABLEROW",812556717:"IFCTANK",5716631:"IFCTANKTYPE",3473067441:"IFCTASK",1549132990:"IFCTASKTIME",2771591690:"IFCTASKTIMERECURRING",3206491090:"IFCTASKTYPE",912023232:"IFCTELECOMADDRESS",3824725483:"IFCTENDON",2347447852:"IFCTENDONANCHOR",3081323446:"IFCTENDONANCHORTYPE",3663046924:"IFCTENDONCONDUIT",2281632017:"IFCTENDONCONDUITTYPE",2415094496:"IFCTENDONTYPE",2387106220:"IFCTESSELLATEDFACESET",901063453:"IFCTESSELLATEDITEM",4282788508:"IFCTEXTLITERAL",3124975700:"IFCTEXTLITERALWITHEXTENT",1447204868:"IFCTEXTSTYLE",1983826977:"IFCTEXTSTYLEFONTMODEL",2636378356:"IFCTEXTSTYLEFORDEFINEDFONT",1640371178:"IFCTEXTSTYLETEXTMODEL",280115917:"IFCTEXTURECOORDINATE",1742049831:"IFCTEXTURECOORDINATEGENERATOR",2552916305:"IFCTEXTUREMAP",1210645708:"IFCTEXTUREVERTEX",3611470254:"IFCTEXTUREVERTEXLIST",1199560280:"IFCTIMEPERIOD",3101149627:"IFCTIMESERIES",581633288:"IFCTIMESERIESVALUE",1377556343:"IFCTOPOLOGICALREPRESENTATIONITEM",1735638870:"IFCTOPOLOGYREPRESENTATION",1935646853:"IFCTOROIDALSURFACE",3825984169:"IFCTRANSFORMER",1692211062:"IFCTRANSFORMERTYPE",2595432518:"IFCTRANSITIONCURVESEGMENT2D",1620046519:"IFCTRANSPORTELEMENT",2097647324:"IFCTRANSPORTELEMENTTYPE",2715220739:"IFCTRAPEZIUMPROFILEDEF",2916149573:"IFCTRIANGULATEDFACESET",1229763772:"IFCTRIANGULATEDIRREGULARNETWORK",3593883385:"IFCTRIMMEDCURVE",3026737570:"IFCTUBEBUNDLE",1600972822:"IFCTUBEBUNDLETYPE",1628702193:"IFCTYPEOBJECT",3736923433:"IFCTYPEPROCESS",2347495698:"IFCTYPEPRODUCT",3698973494:"IFCTYPERESOURCE",427810014:"IFCUSHAPEPROFILEDEF",180925521:"IFCUNITASSIGNMENT",630975310:"IFCUNITARYCONTROLELEMENT",3179687236:"IFCUNITARYCONTROLELEMENTTYPE",4292641817:"IFCUNITARYEQUIPMENT",1911125066:"IFCUNITARYEQUIPMENTTYPE",4207607924:"IFCVALVE",728799441:"IFCVALVETYPE",1417489154:"IFCVECTOR",2799835756:"IFCVERTEX",2759199220:"IFCVERTEXLOOP",1907098498:"IFCVERTEXPOINT",1530820697:"IFCVIBRATIONDAMPER",3956297820:"IFCVIBRATIONDAMPERTYPE",2391383451:"IFCVIBRATIONISOLATOR",3313531582:"IFCVIBRATIONISOLATORTYPE",2769231204:"IFCVIRTUALELEMENT",891718957:"IFCVIRTUALGRIDINTERSECTION",926996030:"IFCVOIDINGFEATURE",2391406946:"IFCWALL",4156078855:"IFCWALLELEMENTEDCASE",3512223829:"IFCWALLSTANDARDCASE",1898987631:"IFCWALLTYPE",4237592921:"IFCWASTETERMINAL",1133259667:"IFCWASTETERMINALTYPE",3304561284:"IFCWINDOW",336235671:"IFCWINDOWLININGPROPERTIES",512836454:"IFCWINDOWPANELPROPERTIES",486154966:"IFCWINDOWSTANDARDCASE",1299126871:"IFCWINDOWSTYLE",4009809668:"IFCWINDOWTYPE",4088093105:"IFCWORKCALENDAR",1028945134:"IFCWORKCONTROL",4218914973:"IFCWORKPLAN",3342526732:"IFCWORKSCHEDULE",1236880293:"IFCWORKTIME",2543172580:"IFCZSHAPEPROFILEDEF",1033361043:"IFCZONE"},$k=class{constructor(r){this.state=r}getExpressId(r,e){if(!r.index)return;let i=r.index.array;return r.attributes[Kwe].getX(i[3*e])}getItemProperties(r,e,i=!1){return this.state.useJSON?Ur({},this.state.models[r].jsonData[e]):this.state.api.GetLine(r,e,i)}getAllItemsOfType(r,e,i){return this.state.useJSON?this.getAllItemsOfTypeJSON(r,e,i):this.getAllItemsOfTypeWebIfcAPI(r,e,i)}getPropertySets(r,e,i=!1){return this.state.useJSON?this.getPropertyJSON(r,e,i,jl.psets):this.getPropertyWebIfcAPI(r,e,i,jl.psets)}getTypeProperties(r,e,i=!1){return this.state.useJSON?this.getPropertyJSON(r,e,i,jl.type):this.getPropertyWebIfcAPI(r,e,i,jl.type)}getMaterialsProperties(r,e,i=!1){return this.state.useJSON?this.getPropertyJSON(r,e,i,jl.materials):this.getPropertyWebIfcAPI(r,e,i,jl.materials)}getSpatialStructure(r){return this.state.useJSON?this.getSpatialStructureJSON(r):this.getSpatialStructureWebIfcAPI(r)}getSpatialStructureJSON(r){let e=this.getSpatialTreeChunks(r),i=this.getAllItemsOfTypeJSON(r,tA,!1)[0],n=this.newIfcProject(i);return this.getSpatialNode(r,n,e),Ur({},n)}getSpatialStructureWebIfcAPI(r){let e=this.getSpatialTreeChunks(r),i=this.state.api.GetLineIDsWithType(r,tA).get(0),n=this.newIfcProject(i);return this.getSpatialNode(r,n,e),n}getAllItemsOfTypeJSON(r,e,i){let n=this.state.models[r].jsonData,s=k3t[e];if(!s)throw new Error(`Type not found: ${e}`);return this.filterJSONItemsByType(n,s,i)}filterJSONItemsByType(r,e,i){let n=[];return Object.keys(r).forEach(s=>{let a=parseInt(s);r[a].type.toUpperCase()===e&&n.push(i?Ur({},r[a]):a)}),n}getItemsByIDJSON(r,e){let i=this.state.models[r].jsonData,n=[];return e.forEach(s=>n.push(Ur({},i[s]))),n}getPropertyJSON(r,e,i=!1,n){let s=this.getAllRelatedItemsOfTypeJSON(r,e,n),a=this.getItemsByIDJSON(r,s);return i&&a.forEach(o=>this.getJSONReferencesRecursively(r,o)),a}getJSONReferencesRecursively(r,e){if(e==null)return;let i=Object.keys(e);for(let n=0;n(n.type===5&&(n=this.getItemsByIDJSON(r,[n.value])[0],this.getJSONReferencesRecursively(r,n)),n))}getPropertyWebIfcAPI(r,e,i=!1,n){return this.getAllRelatedItemsOfTypeWebIfcAPI(r,e,n).map(a=>this.state.api.GetLine(r,a,i))}getAllItemsOfTypeWebIfcAPI(r,e,i){let n=[],s=this.state.api.GetLineIDsWithType(r,e);for(let a=0;athis.state.api.GetLine(r,a)):n}newIfcProject(r){return{expressID:r,type:"IFCPROJECT",children:[]}}getSpatialTreeChunks(r){let e={};return this.state.useJSON?(this.getChunksJSON(r,e,jl.aggregates),this.getChunksJSON(r,e,jl.spatial)):(this.getChunksWebIfcAPI(r,e,jl.aggregates),this.getChunksWebIfcAPI(r,e,jl.spatial)),e}getChunksJSON(r,e,i){this.getAllItemsOfTypeJSON(r,i.name,!0).forEach(s=>{this.saveChunk(e,i,s)})}getChunksWebIfcAPI(r,e,i){let n=this.state.api.GetLineIDsWithType(r,i.name);for(let s=0;sa.value);r[n]==null?r[n]=s:r[n]=r[n].concat(s)}getSpatialNode(r,e,i){this.getChildren(r,e,i,jl.aggregates),this.getChildren(r,e,i,jl.spatial)}getChildren(r,e,i,n){let s=i[e.expressID];if(s==null)return;let a=n.key;e[a]=s.map(o=>{let l=this.newNode(r,o);return this.getSpatialNode(r,l,i),l})}newNode(r,e){let i=this.getNodeType(r,e);return{expressID:e,type:i,children:[]}}getNodeType(r,e){if(this.state.useJSON)return this.state.models[r].jsonData[e].type;let i=this.state.models[r].types[e];return t8[i]}getAllRelatedItemsOfTypeJSON(r,e,i){let n=this.getAllItemsOfTypeJSON(r,i.name,!0),s=[];return n.forEach(a=>{this.isRelated(e,a,i)&&this.getRelated(a,i,s)}),s}getAllRelatedItemsOfTypeWebIfcAPI(r,e,i){let n=this.state.api.GetLineIDsWithType(r,i.name),s=[];for(let a=0;ai.push(s.value)):i.push(n.value)}isRelated(r,e,i){let n=e[i.related];return Array.isArray(n)?n.map(a=>a.value).includes(r):n.value===r}},Zk=class{constructor(r){this.state=r}getAllTypes(){for(let r in this.state.models){let e=this.state.models[r].types;Object.keys(e).length==0&&this.getAllTypesOfModel(parseInt(r))}}getAllTypesOfModel(r){let e=Object.keys(t8).map(n=>parseInt(n)),i=this.state.models[r].types;e.forEach(n=>{let s=this.state.api.GetLineIDsWithType(r,n);for(let a=0;a{n[l]&&s.push(...n[l])});let a=this.getCoordinates(r),o=this.modelCoordinates[r];i?s.forEach(l=>a.set([0,0,0],l)):s.forEach(l=>a.set([o[l],o[l+1],o[l+2]],l)),this.getAttributes(r).position.needsUpdate=!0}showAllItems(r){this.modelCoordinates[r]&&(this.resetCoordinates(r),this.getAttributes(r).position.needsUpdate=!0)}hideAllItems(r){this.getCoordinates(r).fill(0),this.getAttributes(r).position.needsUpdate=!0}initializeCoordinates(r){let e=this.getCoordinates(r);this.modelCoordinates[r]||(this.modelCoordinates[r]=new Float32Array(e))}resetCoordinates(r){let e=this.modelCoordinates[r];this.getCoordinates(r).set(e)}getCoordinates(r){return this.getAttributes(r).position.array}getAttributes(r){return this.state.models[r].mesh.geometry.attributes}},e8=class{constructor(){this.state={models:[],api:new Wk,useJSON:!1},this.BVH=new Jk,this.parser=new Yk(this.state,this.BVH),this.subsets=new Xk(this.state,this.BVH),this.properties=new $k(this.state),this.types=new Zk(this.state),this.hider=new Qk(this.state)}parse(r){return ot(this,null,function*(){let e=yield this.parser.parse(r);this.state.useJSON?this.disposeMemory():this.types.getAllTypes(),this.hider.processCoordinates(e.modelID);let i=new Kk(e.geometry,e.material);return i.setIFCManager(this),i})}setWasmPath(r){this.state.api.SetWasmPath(r)}applyWebIfcConfig(r){this.state.webIfcSettings=r}useJSONData(r=!0){this.state.useJSON=r,this.disposeMemory()}addModelJSONData(r,e){let i=this.state.models[r];i&&(i.jsonData=e)}disposeMemory(){this.state.api=null,this.state.api=new Wk}setupThreeMeshBVH(r,e,i){this.BVH.initializeMeshBVH(r,e,i)}close(r,e){this.state.api.CloseModel(r),e&&e.remove(this.state.models[r].mesh),delete this.state.models[r]}getExpressId(r,e){return this.properties.getExpressId(r,e)}getAllItemsOfType(r,e,i){return this.properties.getAllItemsOfType(r,e,i)}getItemProperties(r,e,i=!1){return this.properties.getItemProperties(r,e,i)}getPropertySets(r,e,i=!1){return this.properties.getPropertySets(r,e,i)}getTypeProperties(r,e,i=!1){return this.properties.getTypeProperties(r,e,i)}getMaterialsProperties(r,e,i=!1){return this.properties.getMaterialsProperties(r,e,i)}getIfcType(r,e){let i=this.state.models[r].types[e];return t8[i]}getSpatialStructure(r){return this.properties.getSpatialStructure(r)}getSubset(r,e){return this.subsets.getSubset(r,e)}removeSubset(r,e,i){this.subsets.removeSubset(r,e,i)}createSubset(r){return this.subsets.createSubset(r)}hideItems(r,e){this.hider.hideItems(r,e)}hideAllItems(r){this.hider.hideAllItems(r)}showItems(r,e){this.hider.showItems(r,e)}showAllItems(r){this.hider.showAllItems(r)}},MA=class extends li{constructor(r){super(r),this.ifcManager=new e8}load(r,e,i,n){let s=this,a=new ci(s.manager);a.setPath(s.path),a.setResponseType("arraybuffer"),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(r,function(o){return ot(this,null,function*(){try{if(typeof o=="string")throw new Error("IFC files must be given as a buffer!");e(yield s.parse(o))}catch(l){n?n(l):console.error(l),s.manager.itemError(r)}})},i,n)}parse(r){return this.ifcManager.parse(r)}};var DA=class extends li{constructor(r){super(r)}load(r,e,i,n){let s=this,a=this.path===""?ks.extractUrlBase(r):this.path,o=new ci(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(r,function(l){try{e(s.parse(l,a))}catch(c){n?n(c):console.error(c),s.manager.itemError(r)}},i,n)}setMaterialOptions(r){return this.materialOptions=r,this}parse(r,e){let i=r.split(` -`),n={},s=/\s+/,a={};for(let l=0;l=0?c.substring(0,u):c;h=h.toLowerCase();let p=u>=0?c.substring(u+1):"";if(p=p.trim(),h==="newmtl")n={name:p},a[p]=n;else if(h==="ka"||h==="kd"||h==="ks"||h==="ke"){let d=p.split(s,3);n[h]=[parseFloat(d[0]),parseFloat(d[1]),parseFloat(d[2])]}else n[h]=p}let o=new r8(this.resourcePath||e,this.materialOptions);return o.setCrossOrigin(this.crossOrigin),o.setManager(this.manager),o.setMaterials(a),o}},r8=class{constructor(r="",e={}){this.baseUrl=r,this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=this.options.side!==void 0?this.options.side:en,this.wrap=this.options.wrap!==void 0?this.options.wrap:gn}setCrossOrigin(r){return this.crossOrigin=r,this}setManager(r){this.manager=r}setMaterials(r){this.materialsInfo=this.convert(r),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(r){if(!this.options)return r;let e={};for(let i in r){let n=r[i],s={};e[i]=s;for(let a in n){let o=!0,l=n[a],c=a.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(l=[l[0]/255,l[1]/255,l[2]/255]),this.options&&this.options.ignoreZeroRGBs&&l[0]===0&&l[1]===0&&l[2]===0&&(o=!1);break;default:break}o&&(s[c]=l)}}return e}preload(){for(let r in this.materialsInfo)this.create(r)}getIndex(r){return this.nameLookup[r]}getAsArray(){let r=0;for(let e in this.materialsInfo)this.materialsArray[r]=this.create(e),this.nameLookup[e]=r,r++;return this.materialsArray}create(r){return this.materials[r]===void 0&&this.createMaterial_(r),this.materials[r]}createMaterial_(r){let e=this,i=this.materialsInfo[r],n={name:r,side:this.side};function s(o,l){return typeof l!="string"||l===""?"":/^https?:\/\//i.test(l)?l:o+l}function a(o,l){if(n[o])return;let c=e.getTextureParams(l,n),u=e.loadTexture(s(e.baseUrl,c.url));u.repeat.copy(c.scale),u.offset.copy(c.offset),u.wrapS=e.wrap,u.wrapT=e.wrap,(o==="map"||o==="emissiveMap")&&(u.encoding=yr),n[o]=u}for(let o in i){let l=i[o],c;if(l!=="")switch(o.toLowerCase()){case"kd":n.color=new Ve().fromArray(l).convertSRGBToLinear();break;case"ks":n.specular=new Ve().fromArray(l).convertSRGBToLinear();break;case"ke":n.emissive=new Ve().fromArray(l).convertSRGBToLinear();break;case"map_kd":a("map",l);break;case"map_ks":a("specularMap",l);break;case"map_ke":a("emissiveMap",l);break;case"norm":a("normalMap",l);break;case"map_bump":case"bump":a("bumpMap",l);break;case"map_d":a("alphaMap",l),n.transparent=!0;break;case"ns":n.shininess=parseFloat(l);break;case"d":c=parseFloat(l),c<1&&(n.opacity=c,n.transparent=!0);break;case"tr":c=parseFloat(l),this.options&&this.options.invertTrProperty&&(c=1-c),c>0&&(n.opacity=1-c,n.transparent=!0);break;default:break}}return this.materials[r]=new Ts(n),this.materials[r]}getTextureParams(r,e){let i={scale:new le(1,1),offset:new le(0,0)},n=r.split(/\s+/),s;return s=n.indexOf("-bm"),s>=0&&(e.bumpScale=parseFloat(n[s+1]),n.splice(s,2)),s=n.indexOf("-s"),s>=0&&(i.scale.set(parseFloat(n[s+1]),parseFloat(n[s+2])),n.splice(s,4)),s=n.indexOf("-o"),s>=0&&(i.offset.set(parseFloat(n[s+1]),parseFloat(n[s+2])),n.splice(s,4)),i.url=n.join(" ").trim(),i}loadTexture(r,e,i,n,s){let a=this.manager!==void 0?this.manager:oo,o=a.getHandler(r);o===null&&(o=new Es(a)),o.setCrossOrigin&&o.setCrossOrigin(this.crossOrigin);let l=o.load(r,i,n,s);return e!==void 0&&(l.mapping=e),l}};var V3t=/^[og]\s*(.+)?/,z3t=/^mtllib /,j3t=/^usemtl /,W3t=/^usemap /,Jwe=/\s+/,Qwe=new A,i8=new A,eRe=new A,tRe=new A,Wl=new A,CA=new Ve;function q3t(){let t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(r,e){if(this.object&&this.object.fromDeclaration===!1){this.object.name=r,this.object.fromDeclaration=e!==!1;return}let i=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:r||"",fromDeclaration:e!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(n,s){let a=this._finalize(!1);a&&(a.inherited||a.groupCount<=0)&&this.materials.splice(a.index,1);let o={index:this.materials.length,name:n||"",mtllib:Array.isArray(s)&&s.length>0?s[s.length-1]:"",smooth:a!==void 0?a.smooth:this.smooth,groupStart:a!==void 0?a.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(l){let c={index:typeof l=="number"?l:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return c.clone=this.clone.bind(c),c}};return this.materials.push(o),o},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(n){let s=this.currentMaterial();if(s&&s.groupEnd===-1&&(s.groupEnd=this.geometry.vertices.length/3,s.groupCount=s.groupEnd-s.groupStart,s.inherited=!1),n&&this.materials.length>1)for(let a=this.materials.length-1;a>=0;a--)this.materials[a].groupCount<=0&&this.materials.splice(a,1);return n&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),s}},i&&i.name&&typeof i.clone=="function"){let n=i.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(r,e){let i=parseInt(r,10);return(i>=0?i-1:i+e/3)*3},parseNormalIndex:function(r,e){let i=parseInt(r,10);return(i>=0?i-1:i+e/3)*3},parseUVIndex:function(r,e){let i=parseInt(r,10);return(i>=0?i-1:i+e/2)*2},addVertex:function(r,e,i){let n=this.vertices,s=this.object.geometry.vertices;s.push(n[r+0],n[r+1],n[r+2]),s.push(n[e+0],n[e+1],n[e+2]),s.push(n[i+0],n[i+1],n[i+2])},addVertexPoint:function(r){let e=this.vertices;this.object.geometry.vertices.push(e[r+0],e[r+1],e[r+2])},addVertexLine:function(r){let e=this.vertices;this.object.geometry.vertices.push(e[r+0],e[r+1],e[r+2])},addNormal:function(r,e,i){let n=this.normals,s=this.object.geometry.normals;s.push(n[r+0],n[r+1],n[r+2]),s.push(n[e+0],n[e+1],n[e+2]),s.push(n[i+0],n[i+1],n[i+2])},addFaceNormal:function(r,e,i){let n=this.vertices,s=this.object.geometry.normals;Qwe.fromArray(n,r),i8.fromArray(n,e),eRe.fromArray(n,i),Wl.subVectors(eRe,i8),tRe.subVectors(Qwe,i8),Wl.cross(tRe),Wl.normalize(),s.push(Wl.x,Wl.y,Wl.z),s.push(Wl.x,Wl.y,Wl.z),s.push(Wl.x,Wl.y,Wl.z)},addColor:function(r,e,i){let n=this.colors,s=this.object.geometry.colors;n[r]!==void 0&&s.push(n[r+0],n[r+1],n[r+2]),n[e]!==void 0&&s.push(n[e+0],n[e+1],n[e+2]),n[i]!==void 0&&s.push(n[i+0],n[i+1],n[i+2])},addUV:function(r,e,i){let n=this.uvs,s=this.object.geometry.uvs;s.push(n[r+0],n[r+1]),s.push(n[e+0],n[e+1]),s.push(n[i+0],n[i+1])},addDefaultUV:function(){let r=this.object.geometry.uvs;r.push(0,0),r.push(0,0),r.push(0,0)},addUVLine:function(r){let e=this.uvs;this.object.geometry.uvs.push(e[r+0],e[r+1])},addFace:function(r,e,i,n,s,a,o,l,c){let u=this.vertices.length,h=this.parseVertexIndex(r,u),p=this.parseVertexIndex(e,u),d=this.parseVertexIndex(i,u);if(this.addVertex(h,p,d),this.addColor(h,p,d),o!==void 0&&o!==""){let f=this.normals.length;h=this.parseNormalIndex(o,f),p=this.parseNormalIndex(l,f),d=this.parseNormalIndex(c,f),this.addNormal(h,p,d)}else this.addFaceNormal(h,p,d);if(n!==void 0&&n!==""){let f=this.uvs.length;h=this.parseUVIndex(n,f),p=this.parseUVIndex(s,f),d=this.parseUVIndex(a,f),this.addUV(h,p,d),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(r){this.object.geometry.type="Points";let e=this.vertices.length;for(let i=0,n=r.length;i=7?(CA.setRGB(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])).convertSRGBToLinear(),e.colors.push(CA.r,CA.g,CA.b)):e.colors.push(void 0,void 0,void 0);break;case"vn":e.normals.push(parseFloat(h[1]),parseFloat(h[2]),parseFloat(h[3]));break;case"vt":e.uvs.push(parseFloat(h[1]),parseFloat(h[2]));break}}else if(u==="f"){let p=c.slice(1).trim().split(Jwe),d=[];for(let m=0,g=p.length;m0){let E=y.split("/");d.push(E)}}let f=d[0];for(let m=1,g=d.length-1;m1){let p=n[1].trim().toLowerCase();e.object.smooth=p!=="0"&&p!=="off"}else e.object.smooth=!0;let h=e.object.currentMaterial();h&&(h.smooth=e.object.smooth)}else{if(c==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+c+'"')}}e.finalize();let s=new hr;if(s.materialLibraries=[].concat(e.materialLibraries),!(e.objects.length===1&&e.objects[0].geometry.vertices.length===0)===!0)for(let o=0,l=e.objects.length;o0&&m.setAttribute("normal",new ct(u.normals,3)),u.colors.length>0&&(f=!0,m.setAttribute("color",new ct(u.colors,3))),u.hasUVIndices===!0&&m.setAttribute("uv",new ct(u.uvs,2));let g=[];for(let E=0,b=h.length;E1){for(let E=0,b=h.length;E0){let o=new Vn({size:1,sizeAttenuation:!1}),l=new it;l.setAttribute("position",new ct(e.vertices,3)),e.colors.length>0&&e.colors[0]!==void 0&&(l.setAttribute("color",new ct(e.colors,3)),o.vertexColors=!0);let c=new rn(l,o);s.add(c)}return s}};var OA=new Ve,PA=class extends li{constructor(r){super(r),this.propertyNameMapping={},this.customPropertyMapping={}}load(r,e,i,n){let s=this,a=new ci(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(r,function(o){try{e(s.parse(o))}catch(l){n?n(l):console.error(l),s.manager.itemError(r)}},i,n)}setPropertyNameMapping(r){this.propertyNameMapping=r}setCustomPropertyNameMapping(r){this.customPropertyMapping=r}parse(r){function e(g){let y=/^ply([\s\S]*)end_header(\r\n|\r|\n)/,E="",b=0,x=y.exec(g);x!==null&&(E=x[1],b=new Blob([x[0]]).size);let S={comments:[],elements:[],headerLength:b,objInfo:""},D=E.split(/\r\n|\r|\n/),P;function _(w,F){let X={type:w[0]};return X.type==="list"?(X.name=w[3],X.countType=w[1],X.itemType=w[2]):X.name=w[1],X.name in F&&(X.name=F[X.name]),X}for(let w=0;wb.name);function E(b){for(let x=0,S=b.length;x=w.count&&(P++,_=0,w=y.elements[P],F=a(w.properties));let he=n(w.properties,H);c(E,w.name,he,F),_++}return l(E)}function l(g){let y=new it;g.indices.length>0&&y.setIndex(g.indices),y.setAttribute("position",new ct(g.vertices,3)),g.normals.length>0&&y.setAttribute("normal",new ct(g.normals,3)),g.uvs.length>0&&y.setAttribute("uv",new ct(g.uvs,2)),g.colors.length>0&&y.setAttribute("color",new ct(g.colors,3)),g.faceVertexUvs.length>0&&(y=y.toNonIndexed(),y.setAttribute("uv",new ct(g.faceVertexUvs,2)));for(let E of Object.keys(m.customPropertyMapping))g[E].length>0&&y.setAttribute(E,new ct(g[E],m.customPropertyMapping[E].length));return y.computeBoundingSphere(),y}function c(g,y,E,b){if(y==="vertex"){g.vertices.push(E[b.attrX],E[b.attrY],E[b.attrZ]),b.attrNX!==null&&b.attrNY!==null&&b.attrNZ!==null&&g.normals.push(E[b.attrNX],E[b.attrNY],E[b.attrNZ]),b.attrS!==null&&b.attrT!==null&&g.uvs.push(E[b.attrS],E[b.attrT]),b.attrR!==null&&b.attrG!==null&&b.attrB!==null&&(OA.setRGB(E[b.attrR]/255,E[b.attrG]/255,E[b.attrB]/255).convertSRGBToLinear(),g.colors.push(OA.r,OA.g,OA.b));for(let x of Object.keys(m.customPropertyMapping))for(let S of m.customPropertyMapping[x])g[x].push(E[S])}else if(y==="face"){let x=E.vertex_indices||E.vertex_index,S=E.texcoord;x.length===3?(g.indices.push(x[0],x[1],x[2]),S&&S.length===6&&(g.faceVertexUvs.push(S[0],S[1]),g.faceVertexUvs.push(S[2],S[3]),g.faceVertexUvs.push(S[4],S[5]))):x.length===4&&(g.indices.push(x[0],x[1],x[3]),g.indices.push(x[1],x[2],x[3]))}}function u(g,y){let E={},b=0;for(let x=0;xx.getInt8(P),size:1};case"uint8":case"uchar":return{read:P=>x.getUint8(P),size:1};case"int16":case"short":return{read:P=>x.getInt16(P,D),size:2};case"uint16":case"ushort":return{read:P=>x.getUint16(P,D),size:2};case"int32":case"int":return{read:P=>x.getInt32(P,D),size:4};case"uint32":case"uint":return{read:P=>x.getUint32(P,D),size:4};case"float32":case"float":return{read:P=>x.getFloat32(P,D),size:4};case"float64":case"double":return{read:P=>x.getFloat64(P,D),size:8}}}for(let x=0,S=g.length;x>5&31)/31,f=(N>>10&31)/31)}for(let N=1;N<=3;N++){let k=X+N*12,G=F*3*3+(N-1)*3;_[G]=u.getFloat32(k,!0),_[G+1]=u.getFloat32(k+4,!0),_[G+2]=u.getFloat32(k+8,!0),w[G]=H,w[G+1]=he,w[G+2]=C,m&&(g[G]=p,g[G+1]=d,g[G+2]=f)}}return P.setAttribute("position",new jt(_,3)),P.setAttribute("normal",new jt(w,3)),m&&(P.setAttribute("color",new jt(g,3)),P.hasColors=!0,P.alpha=x),P}function s(c){let u=new it,h=/solid([\s\S]*?)endsolid/g,p=/facet([\s\S]*?)endfacet/g,d=0,f=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,m=new RegExp("vertex"+f+f+f,"g"),g=new RegExp("normal"+f+f+f,"g"),y=[],E=[],b=new A,x,S=0,D=0,P=0;for(;(x=h.exec(c))!==null;){D=P;let _=x[0];for(;(x=p.exec(_))!==null;){let X=0,H=0,he=x[0];for(;(x=g.exec(he))!==null;)b.x=parseFloat(x[1]),b.y=parseFloat(x[2]),b.z=parseFloat(x[3]),H++;for(;(x=m.exec(he))!==null;)y.push(parseFloat(x[1]),parseFloat(x[2]),parseFloat(x[3])),E.push(b.x,b.y,b.z),X++,P++;H!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+d),X!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+d),d++}let w=D,F=P-D;u.addGroup(w,F,S),S++}return u.setAttribute("position",new ct(y,3)),u.setAttribute("normal",new ct(E,3)),u}function a(c){return typeof c!="string"?new TextDecoder().decode(c):c}function o(c){if(typeof c=="string"){let u=new Uint8Array(c.length);for(let h=0;h{let r={};return t.forEach((e,i)=>r[e]=i),r})(OI),aPt=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Vs=String.fromCharCode.bind(String),bRe=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):(t,r=e=>e)=>new Uint8Array(Array.prototype.slice.call(t,0).map(r)),_Re=t=>t.replace(/=/g,"").replace(/[+\/]/g,r=>r=="+"?"-":"_"),wRe=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),RRe=t=>{let r,e,i,n,s="",a=t.length%3;for(let o=0;o255||(i=t.charCodeAt(o++))>255||(n=t.charCodeAt(o++))>255)throw new TypeError("invalid character found");r=e<<16|i<<8|n,s+=OI[r>>18&63]+OI[r>>12&63]+OI[r>>6&63]+OI[r&63]}return a?s.slice(0,a-3)+"===".substring(a):s},f8=nPt?t=>btoa(t):GT?t=>Buffer.from(t,"binary").toString("base64"):RRe,p8=GT?t=>Buffer.from(t).toString("base64"):t=>{let e=[];for(let i=0,n=t.length;ir?_Re(p8(t)):p8(t),oPt=t=>{if(t.length<2){var r=t.charCodeAt(0);return r<128?t:r<2048?Vs(192|r>>>6)+Vs(128|r&63):Vs(224|r>>>12&15)+Vs(128|r>>>6&63)+Vs(128|r&63)}else{var r=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return Vs(240|r>>>18&7)+Vs(128|r>>>12&63)+Vs(128|r>>>6&63)+Vs(128|r&63)}},lPt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,MRe=t=>t.replace(lPt,oPt),xRe=GT?t=>Buffer.from(t,"utf8").toString("base64"):ERe?t=>p8(ERe.encode(t)):t=>f8(MRe(t)),kT=(t,r=!1)=>r?_Re(xRe(t)):xRe(t),IRe=t=>kT(t,!0),cPt=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,uPt=t=>{switch(t.length){case 4:var r=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),e=r-65536;return Vs((e>>>10)+55296)+Vs((e&1023)+56320);case 3:return Vs((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return Vs((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},DRe=t=>t.replace(cPt,uPt),CRe=t=>{if(t=t.replace(/\s+/g,""),!aPt.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let r,e="",i,n;for(let s=0;s>16&255):n===64?Vs(r>>16&255,r>>8&255):Vs(r>>16&255,r>>8&255,r&255);return e},m8=iPt?t=>atob(wRe(t)):GT?t=>Buffer.from(t,"base64").toString("binary"):CRe,ARe=GT?t=>bRe(Buffer.from(t,"base64")):t=>bRe(m8(t),r=>r.charCodeAt(0)),ORe=t=>ARe(PRe(t)),hPt=GT?t=>Buffer.from(t,"base64").toString("utf8"):TRe?t=>TRe.decode(ARe(t)):t=>DRe(m8(t)),PRe=t=>wRe(t.replace(/[-_]/g,r=>r=="-"?"+":"/")),d8=t=>hPt(PRe(t)),pPt=t=>{if(typeof t!="string")return!1;let r=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(r)||!/[^\s0-9a-zA-Z\-_]/.test(r)},NRe=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),LRe=function(){let t=(r,e)=>Object.defineProperty(String.prototype,r,NRe(e));t("fromBase64",function(){return d8(this)}),t("toBase64",function(r){return kT(this,r)}),t("toBase64URI",function(){return kT(this,!0)}),t("toBase64URL",function(){return kT(this,!0)}),t("toUint8Array",function(){return ORe(this)})},FRe=function(){let t=(r,e)=>Object.defineProperty(Uint8Array.prototype,r,NRe(e));t("toBase64",function(r){return kA(this,r)}),t("toBase64URI",function(){return kA(this,!0)}),t("toBase64URL",function(){return kA(this,!0)})},dPt=()=>{LRe(),FRe()},HRe={version:SRe,VERSION:rPt,atob:m8,atobPolyfill:CRe,btoa:f8,btoaPolyfill:RRe,fromBase64:d8,toBase64:kT,encode:kT,encodeURI:IRe,encodeURL:IRe,utob:MRe,btou:DRe,decode:d8,isValid:pPt,fromUint8Array:kA,toUint8Array:ORe,extendString:LRe,extendUint8Array:FRe,extendBuiltins:dPt};var $l=Un(tMe(),1);var GA=class extends Sp{constructor(r,e={}){let i=e.font;if(i===void 0)super();else{let n=i.generateShapes(r,e.size);e.depth=e.height!==void 0?e.height:50,e.bevelThickness===void 0&&(e.bevelThickness=10),e.bevelSize===void 0&&(e.bevelSize=8),e.bevelEnabled===void 0&&(e.bevelEnabled=!1),super(n,e)}this.type="TextGeometry"}};var VA="BYLAYER",g8="BYBLOCK";var T0=["INSERT","DIMENSION"];var wTr=Un(aMe(),1);var zA=[0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10000384,10000460,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510016,8755276,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019648,7510092,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529280,6264908,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,38912,5019724,32512,4161343,19456,2509862,65343,8388511,52275,6737023,38950,5019743,32543,4161359,19475,2509871,65407,8388543,52326,6737049,38988,5019762,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39026,5019781,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39064,5019800,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29336,5014936,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19608,5010072,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9880,5005208,8063,4149119,4940,2502476,255,8355839,204,6710988,152,5000344,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490520,6245528,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980888,7490712,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471256,8735896,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,9961624,9981080,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,9961586,9981061,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,9961548,9981042,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,9961510,9981023,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215];var VT=class{constructor(){this.pointer=0;this.eof=!1}};var oMe=1e3,BI=class extends VT{constructor(e){super();this.int8Array=new Int8Array(oMe);this.caches=new Map;this.reader=new Df(e);let i=this.reader.readBytes(22),n="";for(let s=0;s<18;s++)n+=String.fromCharCode(i[s]);if(n!="AutoCAD Binary DXF")throw new Error("Invalid DXF file")}next(){if(!this.hasNext())throw this.eof?new Error("Cannot call 'next' after EOF group has been read"):new Error("Unexpected end of input: EOF group not read before end of file.");let e={code:this.reader.readInt16()};return e.value=this.parseGroupValue(e.code),e.code===0&&e.value==="EOF"&&(this.eof=!0),this.lastReadGroup=e,e}hasNext(){return this.eof?!1:!this.reader.IsEnd()}isEOF(){return this.eof}parseGroupValue(e){if(e>=0&&e<=9)return this.readNullTerminatedString();if(e>=10&&e<=59)return this.reader.readFloat64();if(e>=60&&e<=79)return this.reader.readInt16();if(e>=90&&e<=99)return this.reader.readInt32();if(e>=100&&e<=109)return this.readNullTerminatedString();if(e>=110&&e<=149)return this.reader.readFloat64();if(e>=160&&e<=169)return this.reader.readInt64();if(e>=170&&e<=179)return this.reader.readInt16();if(e>=210&&e<=239)return this.reader.readFloat64();if(e>=270&&e<=289)return this.reader.readInt16();if(e>=290&&e<=299)return this.reader.readInt8()>0;if(e>=300&&e<=309)return this.readNullTerminatedString();if(e>=310&&e<=319){let i=this.ReadBinaryData();return lMe(i)}if(e>=320&&e<=369)return this.readNullTerminatedString();if(e>=370&&e<=389)return this.reader.readInt16();if(e>=390&&e<=399)return this.readNullTerminatedString();if(e>=400&&e<=409)return this.reader.readInt16();if(e>=410&&e<=419)return this.readNullTerminatedString();if(e>=420&&e<=429)return this.reader.readInt32();if(e>=430&&e<=439)return this.readNullTerminatedString();if(e>=440&&e<=459)return this.reader.readInt32();if(e>=460&&e<=469)return this.reader.readFloat64();if(e>=470&&e<=481)return this.readNullTerminatedString();if(e===999)throw new Error("The comment group 999, is not used in binary DXF files at byte address!");if(e===1004){let i=this.ReadBinaryData();return lMe(i)}if(e>=1e3&&e<=1009)return this.readNullTerminatedString();if(e>=1010&&e<=1059)return this.reader.readFloat64();if(e>=1060&&e<=1070)return this.reader.readInt16();if(e===1071)return this.reader.readInt32();ne.warn(`[DxfBinReader] Invalid code '${e}' at byte address ${this.reader.getPosition()}`)}readNullTerminatedString(){var o;this.decoder||(this.decoder=new TextDecoder("utf-8"));let e=0,i=this.reader.readInt8();for(;i!==0;)this.int8Array[e++]=i,i=this.reader.readInt8();if(e===0)return"";if(e>oMe)return ne.warn(`[DxfBinReader] Failed to read string! The number of bytes is ${e} !`),"";let n=this.int8Array.subarray(0,e),s=n.toString();if(this.caches.get(s))return this.caches.get(s);let a=(o=this.decoder)==null?void 0:o.decode(n);return this.caches.set(s,a),a}ReadBinaryData(){let e=this.reader.readUint8();return this.reader.readBytes(e)}};function lMe(t){return Array.prototype.map.call(t,r=>("00"+r.toString(16)).slice(-2)).join("")}var zT=class extends VT{constructor(e){super();this.data=e}next(){if(!this.hasNext())throw this.eof?new Error("Cannot call 'next' after EOF group has been read"):new Error("Unexpected end of input: EOF group not read before end of file. Ended on code "+this.data[this.pointer]);let e={code:parseInt(this.data[this.pointer])};return this.pointer++,e.value=_Pt(e.code,this.data[this.pointer].trim()),this.pointer++,e.code===0&&e.value==="EOF"&&(this.eof=!0),this.lastReadGroup=e,e}hasNext(){return!(this.eof||this.pointer>this.data.length-2)}isEOF(){return this.eof}};function _Pt(t,r){return t>=0&&t<=9?r:t>=10&&t<=59?parseFloat(r):t>=60&&t<=99?parseInt(r):t>=100&&t<=109?r:t>=110&&t<=149?parseFloat(r):t>=160&&t<=179?parseInt(r):t>=210&&t<=239?parseFloat(r):t>=270&&t<=289?parseInt(r):t>=290&&t<=299?wPt(r):t>=300&&t<=369?r:t>=370&&t<=389?parseInt(r):t>=390&&t<=399?r:t>=400&&t<=409?parseInt(r):t>=410&&t<=419?r:t>=420&&t<=429?parseInt(r):t>=430&&t<=439?r:t>=440&&t<=459?parseInt(r):t>=460&&t<=469?parseFloat(r):t>=470&&t<=481||t===999||t>=1e3&&t<=1009?r:t>=1010&&t<=1059?parseFloat(r):t>=1060&&t<=1071?parseInt(r):(ne.info("WARNING: Group code does not have a defined type: %j",{code:t,value:r}),r)}function wPt(t){if(t==="0")return!1;if(t==="1")return!0;throw TypeError("String '"+t+"' cannot be cast to Boolean type")}var hMe=Un(Yl(),1);var RPt="OriginalHandle",MPt="OriginalType",DPt="Outlines",cMe=["PROXY","REGION","INSERT","HATCH"];function E0(t){return zA[t]}function ft(t){let r={},e=t.lastReadGroup,i=e.code;if(r.x=e.value,i+=10,e=t.next(),e.code!=i)throw new Error(`Expected code for point value to be ${i} but got ${e.code}`);return r.y=e.value,i+=10,e=t.next(),e.code!=i||(r.z=e.value,t.next()),r}function uMe(t,r){let e=t.lastReadGroup,i=[];for(let n=0;n<16;n++){if(e.code!==r)throw new Error(`Expected code for matrix value to be ${r} but got ${e.code}`);i.push(e.value),e=t.next()}return i}function fr(t,r){switch(r.code){case 0:t.type=r.value;break;case 5:t.handle=r.value;break;case 6:t.lineType=r.value.toUpperCase();break;case 8:t.layer=r.value;break;case 48:t.lineTypeScale=r.value,t.lineTypeScale<=0&&(t.lineTypeScale=1);break;case 60:t.visible=r.value===0;break;case 62:t.isTrueColor||(t.colorIndex=r.value,t.colorIndex<0&&ne.warn("[DxfParser] a negative value of colorIndex indicates that the layer is turned off"),t.color=E0(Math.abs(r.value)));break;case 67:t.inPaperSpace=r.value!==0;break;case 100:break;case 330:t.ownerHandle=r.value;break;case 347:t.materialObjectHandle=r.value;break;case 370:t.lineweight=r.value;break;case 410:t.layoutName=r.value;break;case 420:t.isTrueColor=!0,t.color=r.value;break;case 1e3:if(r.value&&r.value.includes(RPt)){let e=r.value.split(":").map(i=>i.trim());t.extendedData||(t.extendedData={}),t.extendedData.originalHandle=e[1]}if(t.extendedData&&t.extendedData.outlines)try{t.extendedData.outlines=JSON.parse(r.value||"[]")}catch(e){t.extendedData.outlines=void 0}if(r.value&&r.value.includes(DPt)&&(t.extendedData||(t.extendedData={}),t.extendedData.outlines=[]),r.value&&r.value.includes(MPt)){let e=r.value.split(":").map(i=>i.trim());t.extendedData||(t.extendedData={}),t.extendedData.originalType=e[1]}break;case 1001:break;default:return!1}return!0}function ah(t,r){switch(r.code){case 0:t.type=r.value;break;case 5:t.handle=r.value;break;case 330:t.ownerHandle=r.value;break;case 1e3:break;case 1001:break;default:return!1}return!0}var GI=class{constructor(){this.ForEntityName="3DFACE"}parseEntity(r,e){let i={type:e.value,vertices:[]};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 70:{if(e.value!==0){let n=Math.log2(e.value)-1;i.vertices.splice(n,1)}e=r.next()}break;case 10:i.vertices=CPt(r,e),e=r.lastReadGroup;break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};function CPt(t,r){let e=[],i=!1,n=!1,s=4;for(let a=0;a<=s;a++){let o={};for(;!t.isEOF()&&!(r.code===0||n);){switch(r.code){case 10:case 11:case 12:case 13:if(i){n=!0;continue}o.x=r.value,i=!0;break;case 20:case 21:case 22:case 23:o.y=r.value;break;case 30:case 31:case 32:case 33:o.z=r.value;break;default:return e}r=t.next()}(0,hMe.isEmpty)(o)||e.push(o),i=!1,n=!1}return e}var VI=class{constructor(){this.ForEntityName="ARC"}parseEntity(r,e){let i={type:e.value};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 10:i.center=ft(r),e=r.lastReadGroup;break;case 40:i.radius=e.value,e=r.next();break;case 50:i.startAngle=Math.PI/180*e.value,e=r.next();break;case 51:i.endAngle=Math.PI/180*e.value,i.angleLength=i.endAngle-i.startAngle,e=r.next();break;case 210:i.extrusionDirectionX=e.value,e=r.next();break;case 220:i.extrusionDirectionY=e.value,e=r.next();break;case 230:i.extrusionDirectionZ=e.value,e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};var zI=class{constructor(){this.ForEntityName="ATTDEF"}parseEntity(r,e){let i={type:e.value,xScale:1,textStyle:"STANDARD"};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 1:i.text=e.value,e=r.next();break;case 2:i.tag=e.value,e=r.next();break;case 3:i.prompt=e.value,e=r.next();break;case 7:i.textStyle=e.value,e=r.next();break;case 10:i.startPoint=ft(r),e=r.lastReadGroup;break;case 11:i.endPoint=ft(r),e=r.lastReadGroup;break;case 39:i.thickness=e.value,e=r.next();break;case 40:i.textHeight=e.value,e=r.next();break;case 41:i.xScale=e.value,e=r.next();break;case 50:i.rotation=e.value,e=r.next();break;case 51:i.obliqueAngle=e.value,e=r.next();break;case 70:i.invisible=!!(e.value&1),i.constant=!!(e.value&2),i.verificationRequired=!!(e.value&4),i.preset=!!(e.value&8),e=r.next();break;case 71:i.backwards=!!(e.value&2),i.mirrored=!!(e.value&4),e=r.next();break;case 72:i.horizontalJustification=e.value,e=r.next();break;case 73:i.fieldLength=e.value,e=r.next();break;case 74:i.verticalJustification=e.value,e=r.next();break;case 100:e=r.next();break;case 210:i.extrusionDirectionX=e.value,e=r.next();break;case 220:i.extrusionDirectionY=e.value,e=r.next();break;case 230:i.extrusionDirectionZ=e.value,e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};var jI=class{constructor(){this.ForEntityName="ATTRIB"}parseEntity(r,e){let i={type:e.value,xScale:1,textStyle:"STANDARD"};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 1:i.text=e.value,e=r.next();break;case 2:i.tag=e.value,e=r.next();break;case 3:i.prompt=e.value,e=r.next();break;case 7:i.textStyle=e.value,e=r.next();break;case 10:i.startPoint=ft(r),e=r.lastReadGroup;break;case 11:i.endPoint=ft(r),e=r.lastReadGroup;break;case 39:i.thickness=e.value,e=r.next();break;case 40:i.textHeight=e.value,e=r.next();break;case 41:i.xScale=e.value,e=r.next();break;case 50:i.rotation=e.value,e=r.next();break;case 51:i.obliqueAngle=e.value,e=r.next();break;case 70:i.invisible=!!(e.value&1),i.constant=!!(e.value&2),i.verificationRequired=!!(e.value&4),i.preset=!!(e.value&8),e=r.next();break;case 71:i.backwards=!!(e.value&2),i.mirrored=!!(e.value&4),e=r.next();break;case 72:i.horizontalJustification=e.value,e=r.next();break;case 73:i.fieldLength=e.value,e=r.next();break;case 74:i.verticalJustification=e.value,e=r.next();break;case 100:e=r.next();break;case 210:i.extrusionDirectionX=e.value,e=r.next();break;case 220:i.extrusionDirectionY=e.value,e=r.next();break;case 230:i.extrusionDirectionZ=e.value,e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};var WI=class{constructor(){this.ForEntityName="CIRCLE"}parseEntity(r,e){let i={type:e.value};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 10:i.center=ft(r),e=r.lastReadGroup;break;case 40:i.radius=e.value,e=r.next();break;case 50:i.startAngle=Math.PI/180*e.value,e=r.next();break;case 51:let n=Math.PI/180*e.value;n=0&&e.push({angle:s,origin:a,delta:o,dashPattern:c})}return e}function LPt(t,r){let e=[],i=r.next();for(;e.length0&&(i.colorIndex=e.value,i.color=E0(Math.abs(e.value)))))}e=r.next();break;default:fr(i,e),e=r.next();break}return i}};function FPt(t){switch(t){case 40:return"DIMSCALE";case 41:return"DIMASZ";case 42:return"DIMEXO";case 44:return"DIMEXE";case 75:return"DIMSE1";case 76:return"DIMSE2";case 77:return"DIMTAD";case 140:return"DIMTXT";case 144:return"DIMLFAC";case 147:return"DIMGAP";case 176:return"DIMCLRD";case 178:return"DIMCLRT";case 271:return"DIMDEC";case 341:return"DIMLDRBLK";default:return null}}var KI=class{constructor(){this.ForEntityName="LINE"}parseEntity(r,e){let i={type:e.value,vertices:[]};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 10:i.vertices.unshift(ft(r)),e=r.lastReadGroup;break;case 11:i.vertices.push(ft(r)),e=r.lastReadGroup;break;case 210:i.extrusionDirection=ft(r),e=r.lastReadGroup;break;case 100:e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};var JI=class{constructor(){this.ForEntityName="LWPOLYLINE"}parseEntity(r,e){let i={type:e.value,vertices:[]},n=0;for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 38:i.elevation=e.value,e=r.next();break;case 39:i.thickness=e.value,e=r.next();break;case 70:i.shape=(e.value&1)===1,i.hasContinuousLinetypePattern=(e.value&128)===128,e=r.next();break;case 90:n=e.value,e=r.next();break;case 10:i.vertices.push(...HPt(n,r)),e=r.lastReadGroup;break;case 43:e.value!==0&&(i.constantWidth=e.value),e=r.next();break;case 210:i.extrusionDirectionX=e.value,e=r.next();break;case 220:i.extrusionDirectionY=e.value,e=r.next();break;case 230:i.extrusionDirectionZ=e.value,e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};function HPt(t,r){if(!t||t<=0)throw Error("n must be greater than 0 verticies");let e=[],i=!1,n=!1,s=r.lastReadGroup,a={};for(;!r.isEOF()&&!(s.code===0||n);)switch(s.code){case 10:if(i){n=!0;continue}a.x=s.value,i=!0,s=r.next();break;case 20:a.y=s.value,s=r.next();break;case 30:a.z=s.value,s=r.next();break;case 40:a.startWidth=s.value,s=r.next();break;case 41:a.endWidth=s.value,s=r.next();break;case 42:s.value!=0&&(a.bulge=s.value),s=r.next();break;default:return i&&e.push(a),e}return e.push(a),i=!1,n=!1,e}var QI=class{constructor(){this.ForEntityName="MULTILEADER"}parseEntity(r,e){let i={type:e.value};i.contextData={leaders:[]},e=r.next();function n(){for(;!r.isEOF();)switch(e.code){case 0:return;case 340:i.leaderStyleId=e.value,e=r.next();break;case 170:i.leaderLineType=e.value,e=r.next();break;case 91:i.leaderLineColor=e.value,e=r.next();break;case 341:i.leaderLineTypeId=e.value,e=r.next();break;case 171:i.leaderLineWeight=e.value,e=r.next();break;case 41:i.doglegLength=e.value,e=r.next();break;case 290:i.enableLanding=e.value,e=r.next();break;case 291:i.enableDogLeg=e.value,e=r.next();break;case 342:i.arrowHeadId=e.value,e=r.next();break;case 42:i.arrowHeadSize=e.value,e=r.next();break;case 172:i.contentType=e.value,e=r.next();break;case 173:i.textLeftAttachmentType=e.value,e=r.next();break;case 95:i.textLeftAttachmentType=e.value,e=r.next();break;case 174:i.textAngleType=e.value,e=r.next();break;case 175:i.textAlignmentType=e.value,e=r.next();break;case 343:i.textStyleId=e.value,e=r.next();break;case 92:i.textColor=e.value,e=r.next();break;case 292:i.enableFrameText=e.value,e=r.next();break;case 344:i.blockContentId=e.value,e=r.next();break;case 93:i.blockContentColor=e.value,e=r.next();break;case 10:i.blockContentScale=ft(r),e=r.lastReadGroup;break;case 43:i.blockContentRotation=e.value,e=r.next();break;case 176:i.blockContentConnectionType=e.value,e=r.next();break;case 293:i.enableAnotationScale=e.value,e=r.next();break;case 94:i.arrowHeadIndex=e.value,e=r.next();break;case 177:i.blockAttributeIndex=e.value,e=r.next();break;case 44:i.blockAttributeWidth=e.value,e=r.next();break;case 302:i.blockAttributeTextString=e.value,e=r.next();break;case 294:i.textDirectionNegative=e.value,e=r.next();break;case 178:i.textAlignInIPE=e.value,e=r.next();break;case 179:i.textAttachmentPoint=e.value,e=r.next();break;case 271:i.textAttachmentDirectionMText=e.value,e=r.next();break;case 272:i.textAttachmentDirectionBottom=e.value,e=r.next();break;case 273:i.textAttachmentDirectionTop=e.value,e=r.next();break;case 300:s(),e=r.lastReadGroup;break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}}function s(){for(;!r.isEOF();)switch(e.code){case 40:i.contextData.contentScale=e.value,e=r.next();break;case 10:i.contextData.contentBasePosition=ft(r),e=r.lastReadGroup;break;case 145:i.contextData.landingGap=e.value,e=r.next();break;case 290:i.contextData.hasMText=e.value,e=r.next();break;case 304:i.contextData.defaultTextContents=e.value,e=r.next();break;case 11:i.contextData.textNormalDirection=ft(r),e=r.lastReadGroup;break;case 12:i.contextData.textLocation=ft(r),e=r.lastReadGroup;break;case 13:i.contextData.textDirection=ft(r),e=r.lastReadGroup;break;case 140:i.contextData.arrowHeadSize=e.value,e=r.next();break;case 41:i.contextData.textHeight=e.value,e=r.next();break;case 42:i.contextData.textRotation=e.value,e=r.next();break;case 43:i.contextData.textWidth=e.value,e=r.next();break;case 44:e=r.next();break;case 45:i.contextData.textLineSpacingFactor=e.value,e=r.next();break;case 90:i.contextData.textColor=e.value,e=r.next();break;case 170:i.contextData.textLineSpacingStyle=e.value,e=r.next();break;case 171:i.contextData.textAttachment=e.value,e=r.next();break;case 172:i.contextData.textFlowDirection=e.value,e=r.next();break;case 141:i.contextData.textBackgroundScaleFactor=e.value,e=r.next();break;case 92:i.contextData.textBackgroundTransparency=e.value,e=r.next();break;case 291:i.contextData.textBackgroundColorOn=e.value,e=r.next();break;case 292:i.contextData.textBackgroundFillOn=e.value,e=r.next();break;case 293:i.contextData.textUseAutoHeight=e.value,e=r.next();break;case 173:i.contextData.textColumnType=e.value,e=r.next();break;case 142:i.contextData.textColumnWidth=e.value,e=r.next();break;case 143:i.contextData.textColumnGutterWidth=e.value,e=r.next();break;case 144:i.contextData.textColumnHeight=e.value,e=r.next();break;case 295:i.contextData.textUseWordBreak=e.value,e=r.next();break;case 296:i.contextData.hasBlock=e.value,e=r.next();break;case 341:i.contextData.blockContentId=e.value,e=r.next();break;case 14:i.contextData.blockContentNormalDirection=ft(r),e=r.lastReadGroup;break;case 15:i.contextData.blockContentPosition=ft(r),e=r.lastReadGroup;break;case 16:i.contextData.blockContentScale=e.value,e=r.next();break;case 46:i.contextData.blockContentRotation=e.value,e=r.next();break;case 93:i.contextData.blockContentColor=e.value,e=r.next();break;case 47:i.contextData.blockTransformationMatrix=uMe(r,47),e=r.lastReadGroup;break;case 110:i.contextData.planeOriginPoint=ft(r),e=r.lastReadGroup;break;case 111:i.contextData.planeXAxisDirection=ft(r),e=r.lastReadGroup;break;case 112:i.contextData.planeYAxisDirection=ft(r),e=r.lastReadGroup;break;case 297:i.contextData.planeNormalReversed=e.value,e=r.next();break;case 301:return;case 302:a(),e=r.lastReadGroup;break;default:e=r.next();break}}function a(){let l={leaderLines:[]};for(i.contextData.leaders.push(l);!r.isEOF();)switch(e.code){case 290:l.hasSetLastLeaderLinePoint=e.value,e=r.next();break;case 291:l.hasSetDoglegVector=e.value,e=r.next();break;case 10:l.lastLeaderLinePoint=ft(r),e=r.lastReadGroup;break;case 11:l.doglegVector=ft(r),e=r.lastReadGroup;break;case 90:l.leaderBranchIndex=e.value,e=r.next();break;case 40:l.doglegLength=e.value,e=r.next();break;case 303:return;case 304:o(),e=r.lastReadGroup;break;default:e=r.next();break}}function o(){let l=i.contextData.leaders[i.contextData.leaders.length-1],c={vertices:[[]]};for(l.leaderLines.push(c);!r.isEOF();)switch(e.code){case 10:c.vertices[0].push(ft(r)),e=r.lastReadGroup;break;case 305:return;default:e=r.next();break}}return n(),i}};var eS=class{constructor(){this.ForEntityName="MTEXT"}parseEntity(r,e){let i={type:e.value};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 3:i.text?i.text+=e.value:i.text=e.value,e=r.next();break;case 1:i.text?i.text+=e.value:i.text=e.value,e=r.next();break;case 10:i.position=ft(r),e=r.lastReadGroup;break;case 7:i.textStyle=e.value,e=r.next();break;case 44:i.lineSpaceFactor=e.value,e=r.next();break;case 11:i.directionVector=ft(r),e=r.lastReadGroup;break;case 40:i.height=e.value,e=r.next();break;case 41:i.width=e.value,e=r.next();break;case 50:i.rotation=e.value,e=r.next();break;case 71:i.attachmentPoint=e.value,e=r.next();break;case 72:i.drawingDirection=e.value,e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};var tS=class{constructor(){this.ForEntityName="OLE2FRAME"}parseEntity(r,e){let i={type:e.value,binaryData:""};for(e=r.next();e.value!=="OLE"&&e.code!==0;)switch(e.code){case 3:i.documentType=e.value,e=r.next();break;case 70:i.version=e.value,e=r.next();break;case 10:i.leftUpX=e.value,e=r.next();break;case 20:i.leftUpY=e.value,e=r.next();break;case 30:i.leftUpZ=e.value,e=r.next();break;case 11:i.rightDownX=e.value,e=r.next();break;case 21:i.rightDownY=e.value,e=r.next();break;case 31:i.rightDownZ=e.value,e=r.next();break;case 90:i.lengthOfBinaryData=e.value,e=r.next();break;case 310:i.binaryData+=e.value,e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};var rS=class{constructor(){this.ForEntityName="POINT"}parseEntity(r,e){let n={type:e.value};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 10:n.position=ft(r),e=r.lastReadGroup;break;case 39:n.thickness=e.value,e=r.next();break;case 210:n.extrusionDirection=ft(r),e=r.lastReadGroup;break;case 100:e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(n,e),e=r.next();break}return n}};var iS=class{constructor(){this.ForEntityName="VERTEX"}parseEntity(r,e){var i={type:e.value};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 10:i.x=e.value,e=r.next();break;case 20:i.y=e.value,e=r.next();break;case 30:i.z=e.value,e=r.next();break;case 40:e=r.next();break;case 41:e=r.next();break;case 42:e.value!=0&&(i.bulge=e.value),e=r.next();break;case 70:i.curveFittingVertex=(e.value&1)!==0,i.curveFitTangent=(e.value&2)!==0,i.splineVertex=(e.value&8)!==0,i.splineControlPoint=(e.value&16)!==0,i.threeDPolylineVertex=(e.value&32)!==0,i.threeDPolylineMesh=(e.value&64)!==0,i.polyfaceMeshVertex=(e.value&128)!==0,e=r.next();break;case 50:e=r.next();break;case 71:i.faceA=e.value,e=r.next();break;case 72:i.faceB=e.value,e=r.next();break;case 73:i.faceC=e.value,e=r.next();break;case 74:i.faceD=e.value,e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};var nS=class{constructor(){this.ForEntityName="POLYLINE"}parseEntity(r,e){var i={type:e.value,vertices:[]};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 10:e=r.next();break;case 20:e=r.next();break;case 30:e=r.next();break;case 39:e=r.next(),i.thickness=e.value;break;case 40:e=r.next();break;case 41:e=r.next();break;case 70:i.shape=(e.value&1)!==0,i.includesCurveFitVertices=(e.value&2)!==0,i.includesSplineFitVertices=(e.value&4)!==0,i.is3dPolyline=(e.value&8)!==0,i.is3dPolygonMesh=(e.value&16)!==0,i.is3dPolygonMeshClosed=(e.value&32)!==0,i.isPolyfaceMesh=(e.value&64)!==0,i.hasContinuousLinetypePattern=(e.value&128)!==0,e=r.next();break;case 71:e=r.next();break;case 72:e=r.next();break;case 73:e=r.next();break;case 74:e=r.next();break;case 75:e=r.next();break;case 210:i.extrusionDirection=ft(r),e=r.lastReadGroup;break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i.vertices=UPt(r,e),i}};function UPt(t,r){let e=new iS,i=[];for(;!t.isEOF();)if(r.code===0){if(r.value==="VERTEX")i.push(e.parseEntity(t,r)),r=t.lastReadGroup;else if(r.value==="SEQEND"){BPt(t,r);break}}return i}function BPt(t,r){let e={type:r.value};for(r=t.next();!t.isEOF()&&r.code!==0;)if(r.code===101)for(;r.code!=0;)r=t.next();else fr(e,r),r=t.next();return e}var sS=class{constructor(){this.ForEntityName="RAY"}parseEntity(r,e){let i={type:e.value,vertices:[]};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 10:i.vertices.unshift(ft(r)),e=r.lastReadGroup;break;case 11:i.directionVector=ft(r),e=r.lastReadGroup;break;case 100:e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};var aS=class{constructor(){this.ForEntityName="REGION"}parseEntity(r,e){let n={type:e.value};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 70:n.modelerVersion=e.value,e=r.next();break;case 1:n.proprietaryData=e.value,e=r.next();break;case 3:n.proprietaryData+=e.value,e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(n,e),e=r.next();break}return n}};var oS=class{constructor(){this.ForEntityName="SEQEND"}parseEntity(r,e){let i={type:e.value};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case-2:break;default:fr(i,e),e=r.next();break}return i}};var lS=class{constructor(){this.ForEntityName="SOLID"}parseEntity(r,e){let i={type:e.value,points:[]};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 10:i.points[0]=ft(r),e=r.lastReadGroup;break;case 11:i.points[1]=ft(r),e=r.lastReadGroup;break;case 12:i.points[2]=ft(r),e=r.lastReadGroup;break;case 13:i.points[3]=ft(r),e=r.lastReadGroup;break;case 210:i.extrusionDirection=ft(r),e=r.lastReadGroup;break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};var cS=class{constructor(){this.ForEntityName="SPLINE"}parseEntity(r,e){let i={type:e.value};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 10:i.controlPoints||(i.controlPoints=[]),i.controlPoints.push(ft(r)),e=r.lastReadGroup;break;case 11:i.fitPoints||(i.fitPoints=[]),i.fitPoints.push(ft(r)),e=r.lastReadGroup;break;case 12:i.startTangent=ft(r),e=r.lastReadGroup;break;case 13:i.endTangent=ft(r),e=r.lastReadGroup;break;case 40:i.knotValues||(i.knotValues=[]),i.knotValues.push(e.value),e=r.next();break;case 70:e.value&1&&(i.closed=!0),e.value&2&&(i.periodic=!0),e.value&4&&(i.rational=!0),e.value&8&&(i.planar=!0),e.value&16&&(i.planar=!0,i.linear=!0),e=r.next();break;case 71:i.degreeOfSplineCurve=e.value,e=r.next();break;case 72:i.numberOfKnots=e.value,e=r.next();break;case 73:i.numberOfControlPoints=e.value,e=r.next();break;case 74:i.numberOfFitPoints=e.value,e=r.next();break;case 210:i.normalVector=ft(r),e=r.lastReadGroup;break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};var uS=class{constructor(){this.ForEntityName="TEXT"}parseEntity(r,e){let i={type:e.value};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 10:i.startPoint=ft(r),e=r.lastReadGroup;break;case 11:i.endPoint=ft(r),e=r.lastReadGroup;break;case 40:i.textHeight=e.value,e=r.next();break;case 41:i.xScale=e.value,e=r.next();break;case 50:i.rotation=e.value,e=r.next();break;case 1:i.text=e.value,e=r.next();break;case 72:i.halign=e.value,e=r.next();break;case 73:i.valign=e.value,e=r.next();break;case 7:i.textStyle=e.value,e=r.next();break;case 71:i.mirrored=e.value,e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};var hS=class{constructor(){this.ForEntityName="VIEWPORT"}parseEntity(r,e){let i={type:e.value};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 68:i.viewportStatus=e.value,e=r.next();break;case 40:i.width_paperSpace=e.value,e=r.next();break;case 41:i.height_paperSpace=e.value,e=r.next();break;case 69:i.viewportId=e.value,e=r.next();break;case 10:i.centerPoint=ft(r),e=r.lastReadGroup;break;case 12:i.centerPoint_dcs=ft(r),e=r.lastReadGroup;break;case 13:i.snapBasePoint_dcs=ft(r),e=r.lastReadGroup;break;case 14:i.snapSpacing_dcs=ft(r),e=r.lastReadGroup;break;case 15:i.gridSpacing_dcs=ft(r),e=r.lastReadGroup;break;case 16:i.viewDirection=ft(r),e=r.lastReadGroup;break;case 17:i.viewTarget=ft(r),e=r.lastReadGroup;break;case 42:i.perspectiveLens=e.value,e=r.next();break;case 43:i.frontClippingPlaneZ=e.value,e=r.next();break;case 44:i.backClippingPlaneZ=e.value,e=r.next();break;case 45:i.viewHeight=e.value,e=r.next();break;case 50:i.snapAngle=e.value,e=r.next();break;case 51:i.viewTwistAngle=e.value,e=r.next();break;case 72:i.circleZoomPercent=e.value,e=r.next();break;case 331:i.frozenLayerHandles=i.frozenLayerHandles||[],i.frozenLayerHandles.push(e.value),e=r.next();break;case 90:i.viewportStatusFlags=e.value,e=r.next();break;case 340:i.viewportClippingBoundaryhandleId=e.value,e=r.next();break;case 1:i.plotStyleSheetName=e.value,e=r.next();break;case 281:i.renderMode=e.value,e=r.next();break;case 71:i.viewportFlag_ucs=e.value,e=r.next();break;case 74:i.ucsIcon=e.value,e=r.next();break;case 110:i.ucsOrigin=ft(r),e=r.lastReadGroup;break;case 111:i.ucsXAxis=ft(r),e=r.lastReadGroup;break;case 112:i.ucsYAxis=ft(r),e=r.lastReadGroup;break;case 345:i.ucsTableRecordHandle=e.value,e=r.next();break;case 346:i.baseUcsTableRecordHandle=e.value,e=r.next();break;case 79:i.orthographicType=e.value,e=r.next();break;case 146:i.elevation=e.value,e=r.next();break;case 170:i.shadePlotMode=e.value,e=r.next();break;case 61:i.frequency=e.value,e=r.next();break;case 292:i.lightingFlag=e.value,e=r.next();break;case 282:i.lightingType=e.value,e=r.next();break;case 141:i.viewBrightness=e.value,e=r.next();break;case 142:i.viewContrast=e.value,e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};var pS=class{constructor(){this.ForEntityName="XLINE"}parseEntity(r,e){let i={type:e.value,vertices:[]};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 10:i.vertices.unshift(ft(r)),e=r.lastReadGroup;break;case 11:i.directionVector=ft(r),e=r.lastReadGroup;break;case 100:e=r.next();break;case 101:for(;e.code!=0;)e=r.next();break;default:fr(i,e),e=r.next();break}return i}};var jA=class{constructor(){this.ForObjectName="DICTIONARY"}parseObject(r,e){let n={type:e.value},s=[],a=[];for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 280:n.isHardOwner=e.value===1,e=r.next();break;case 281:n.cloningFlag=e.value,e=r.next();break;case 3:s.push(e.value),e=r.next();break;case 350:a.push(e.value),e=r.next();break;case 360:a.push(e.value),e=r.next();break;case 100:e=r.next();break;case 102:e=r.next();break;default:ah(n,e),e=r.next();break}if(s.length!==a.length)throw new Error("The number of Dictionary entries does not match !");return n.entries={},s.forEach((o,l)=>{n.entries[a[l]]=o}),n}};var WA=class{constructor(){this.ForObjectName="LAYOUT"}parseObject(r,e){let n={type:e.value};for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 100:e=r.next();break;case 1:n.layoutName=e.value,e=r.next();break;case 70:n.flag=e.value,e=r.next();break;case 71:n.tabOrder=e.value,e=r.next();break;case 76:n.orthographicType=e.value,e=r.next();break;case 10:n.minLimit=ft(r),e=r.lastReadGroup;break;case 11:n.maxLimit=ft(r),e=r.lastReadGroup;break;case 12:n.basePoint=ft(r),e=r.lastReadGroup;break;case 13:n.origin=ft(r),e=r.lastReadGroup;break;case 14:n.minExtent=ft(r),e=r.lastReadGroup;break;case 15:n.maxExtent=ft(r),e=r.lastReadGroup;break;case 16:n.XAxis=ft(r),e=r.lastReadGroup;break;case 17:n.YAxis=ft(r),e=r.lastReadGroup;break;case 146:n.elevation=e.value,e=r.next();break;case 331:n.viewportHandle=e.value,e=r.next();break;default:ah(n,e),e=r.next();break}return n.blockTableHandle=n.ownerHandle,n}};var qA=class{constructor(){this.ForObjectName="SORTENTSTABLE"}parseObject(r,e){let n={type:e.value},s=!1;n.sortEntsObject={},n.sortEntsObject.entityHandles=[];let a=[];for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 5:s?(a.push(e.value),n.sortEntsObject.entityHandles.push(a),a=[]):n.handle=e.value,e=r.next();break;case 100:e=r.next(),s=!0;break;case 102:e=r.next();break;case 330:s?n.sortEntsObject.ownerHandle=e.value:n.ownerHandle=e.value,e=r.next();break;case 331:a.push(e.value),e=r.next();break;default:ah(n,e),e=r.next();break}return n}};var YA=class{constructor(){this.ForObjectName="SPATIAL_FILTER"}parseObject(r,e){let n={type:e.value};n.vertices=[];let s,a;for(e=r.next();!r.isEOF()&&e.code!==0;)switch(e.code){case 11:n.origin=ft(r),e=r.lastReadGroup;break;case 70:n.numberOfPointsOnClipBoundary=e.value,n.numberOfPointsOnClipBoundary===2?(e=r.next(),s=ft(r),e=r.lastReadGroup,a=ft(r),e=r.lastReadGroup,n.vertices.push(s,{x:a.x,y:s.y},a,{x:s.x,y:a.y},s)):n.numberOfPointsOnClipBoundary>2?(n.vertices=kPt(n.numberOfPointsOnClipBoundary,r),e=r.lastReadGroup):e=r.next();break;case 71:n.clipBoundaryVisible=e.value===1,e=r.next();break;case 72:n.frontClippingPlaneFlag=e.value===1,e=r.next(),n.frontClippingPlaneFlag&&e.code===40&&(n.frontClippingPlaneDistance=e.value,e=r.next());break;case 73:n.backClippingPlaneFlag=e.value===1,e=r.next(),n.backClippingPlaneFlag&&e.code===41&&(n.backClippingPlaneDistance=e.value,e=r.next());break;case 100:e=r.next();break;case 102:e=r.next();break;case 210:n.extrusionDirectionX=e.value,e=r.next();break;case 220:n.extrusionDirectionY=e.value,e=r.next();break;case 230:n.extrusionDirectionZ=e.value,e=r.next();break;case 40:n.invertBlockMatrix=pMe(r,40),n.matrix=pMe(r,40),e=r.lastReadGroup;break;default:ah(n,e),e=r.next();break}return n}};function kPt(t,r){r.next();let e=[];for(;e.length{r.on("data",a=>{e+=a}),r.on("end",()=>{try{n(i.parse(e))}catch(a){s(a)}}),r.on("error",a=>{s(a)})})}_parse(r){let e={},i=0;if(!r.hasNext())throw Error("Empty file");let n=this,s;function a(){for(s=r.next();s.code===999;)s=r.next();for(;!r.isEOF();)if(s.code===0&&s.value==="SECTION"){if(s=r.next(),s.code!==2){ne.error("Unexpected code %s after 0:SECTION",dMe(s)),s=r.next();continue}if(s.value==="HEADER")ne.trace("> HEADER"),e.header=o(),ne.trace("<");else if(s.value==="TABLES")ne.trace("> TABLES"),e.tables=u(),ne.trace("<");else if(s.value==="BLOCKS")ne.trace("> BLOCKS"),e.blocks=l(),ne.trace("<");else if(s.value==="ENTITIES")ne.trace("> ENTITIES"),e.entities=x(!1),ne.trace("<");else if(s.value==="OBJECTS")ne.trace("> OBJECTS"),e.objects=S(),ne.trace("<");else if(s.value==="EOF")ne.trace("EOF");else{let w=s.value;n.unhandledSections[w]?n.unhandledSections[w]++:n.unhandledSections[w]=1}}else s=r.next();let _=(w,F)=>{Object.keys(F).length>0&&ne.warn(w,F)};n.unhandledSections={},n.unhandledEntities={},n.unhandledObjects={},n.unsupportedLineTypes={}}function o(){let _=null,w=null,F={};for(s=r.next();;){if(tl(s,0,"ENDSEC")){_&&(F[_]=w);break}else s.code===9?(_&&(F[_]=w),_=s.value):s.code===10?w={x:s.value}:s.code===20?w.y=s.value:s.code===30?w.z=s.value:w=s.value;s=r.next()}return s=r.next(),F}function l(){let _={};for(s=r.next();s.value!=="EOF"&&!tl(s,0,"ENDSEC");)if(tl(s,0,"BLOCK")){ne.trace("block {");let w=c();ne.trace("}"),P(w),w.name?_[w.name]=w:ne.error(`[DxfParser] Block with handle '${w.handle}' is missing a name, ignored!`)}else id(s),s=r.next();return _}function c(){let _={};for(s=r.next();s.value!=="EOF";){switch(s.code){case 1:_.xrefPath=s.value,s=r.next();break;case 2:_.name=s.value,s=r.next();break;case 3:_.name2=s.value,s=r.next();break;case 4:_.description=s.value,s=r.next();break;case 5:_.handle=s.value,s=r.next();break;case 8:_.layer=s.value,s=r.next();break;case 10:_.position=D(s),s=r.lastReadGroup;break;case 67:_.paperSpace=!!(s.value&&s.value===1),s=r.next();break;case 70:_.blockType=s.value,s=r.next();break;case 100:s=r.next();break;case 330:_.ownerHandle=s.value,s=r.next();break;case 0:if(s.value=="ENDBLK")break;_.entities=x(!0);break;default:id(s),s=r.next();break}if(tl(s,0,"ENDBLK")){s=r.next();break}}return _}function u(){let _={};for(s=r.next();s.value!=="EOF"&&!tl(s,0,"ENDSEC");)tl(s,0,"TABLE")?(s=r.next(),b[s.value]?(ne.trace(s.value+" Table {"),_[b[s.value].tableName]=p(s),ne.trace("}")):ne.trace("Unhandled Table "+s.value)):s=r.next();return s=r.next(),_}let h="ENDTAB";function p(_){let w=b[_.value],F={},X=0;for(s=r.next();!tl(s,0,h);)switch(s.code){case 5:F.handle=s.value,s=r.next();break;case 330:F.ownerHandle=s.value,s=r.next();break;case 100:s.value==="AcDbSymbolTable"||id(s),s=r.next();break;case 70:X=s.value,s=r.next();break;case 0:s.value===w.dxfSymbolName?F[w.tableRecordsProperty]=w.parseTableRecords():(id(s),s=r.next());break;default:id(s),s=r.next();break}let H=F[w.tableRecordsProperty];if(H){let he=(()=>{if(H.constructor===Array)return H.length;if(typeof H=="object")return Object.keys(H).length})();X!==he&&ne.warn(`[DxfParser] Parsed ${he} ${w.dxfSymbolName}s but expected ${X}`)}return s=r.next(),F}function d(){let _=[],w={};for(ne.trace("ViewPort {"),s=r.next();!tl(s,0,h);)switch(s.code){case 2:w.name=s.value,s=r.next();break;case 10:w.lowerLeftCorner=D(s),s=r.lastReadGroup;break;case 11:w.upperRightCorner=D(s),s=r.lastReadGroup;break;case 12:w.center=D(s),s=r.lastReadGroup;break;case 13:w.snapBasePoint=D(s),s=r.lastReadGroup;break;case 14:w.snapSpacing=D(s),s=r.lastReadGroup;break;case 15:w.gridSpacing=D(s),s=r.lastReadGroup;break;case 16:w.viewDirectionFromTarget=D(s),s=r.lastReadGroup;break;case 17:w.viewTarget=D(s),s=r.lastReadGroup;break;case 40:w.viewHeight=s.value,s=r.next();break;case 41:w.aspectRatio=s.value,s=r.next();break;case 42:w.lensLength=s.value,s=r.next();break;case 43:w.frontClippingPlane=s.value,s=r.next();break;case 44:w.backClippingPlane=s.value,s=r.next();break;case 45:w.viewHeight=s.value,s=r.next();break;case 50:w.snapRotationAngle=s.value,s=r.next();break;case 51:w.viewTwistAngle=s.value,s=r.next();break;case 79:w.orthographicType=s.value,s=r.next();break;case 110:w.ucsOrigin=D(s),s=r.lastReadGroup;break;case 111:w.ucsXAxis=D(s),s=r.lastReadGroup;break;case 112:w.ucsYAxis=D(s),s=r.lastReadGroup;break;case 281:w.renderMode=s.value,s=r.next();break;case 282:w.defaultLightingType=s.value,s=r.next();break;case 292:w.defaultLightingOn=s.value,s=r.next();break;case 330:w.ownerHandle=s.value,s=r.next();break;case 63:case 421:case 431:w.ambientColor=s.value,s=r.next();break;case 0:s.value==="VPORT"&&(ne.trace("}"),_.push(w),ne.trace("ViewPort {"),w={},s=r.next());break;default:id(s),s=r.next();break}return ne.trace("}"),_.push(w),_}function f(){let _={},w={},F=0,X="",H=!1;for(ne.trace("LType {"),s=r.next();!tl(s,0,"ENDTAB");)switch(s.code){case 2:w.name=s.value.toUpperCase(),X=w.name,s=r.next();break;case 3:w.description=s.value,s=r.next();break;case 9:s=r.next();break;case 40:w.patternLength=s.value,s=r.next();break;case 44:s=r.next();break;case 45:s=r.next();break;case 46:s=r.next();break;case 49:let he=s.value;H&&(he=Math.abs(he),H=!1),w.pattern.push(he),s=r.next();break;case 70:s=r.next();break;case 73:F=s.value,F>0&&(w.pattern=[]),s=r.next();break;case 74:s.value!==0&&(H=!0,n.unsupportedLineTypes[w.name]?n.unsupportedLineTypes[w.name]++:n.unsupportedLineTypes[w.name]=1),s=r.next();break;case 75:s=r.next();break;case 0:ne.trace("}"),F>0&&F!==w.pattern.length&&ne.warn("[DxfParser] lengths do not match on LTYPE pattern"),_[X]=w,w={},ne.trace("LType {"),s=r.next();break;default:s=r.next();break}return ne.trace("}"),_[X]=w,_}function m(){let _={},w={},F;for(ne.trace("Layer {"),s=r.next();!tl(s,0,"ENDTAB");)switch(s.code){case 2:w.name=s.value,F=s.value,s=r.next();break;case 5:w.handle=s.value,s=r.next();break;case 62:w.visible=s.value>=0,w.colorIndex=Math.abs(s.value),w.color=jPt(w.colorIndex),s=r.next();break;case 70:w.flag=s.value,w.frozen=(w.flag&1)>0,s=r.next();break;case 420:w.color=Math.abs(s.value),s=r.next();break;case 6:w.lineType=s.value.toUpperCase(),s=r.next();break;case 370:w.lineweight=s.value,s=r.next();break;case 0:s.value==="LAYER"&&(ne.trace("}"),F&&(_[F]=w),ne.trace("Layer {"),w={},F=void 0,s=r.next());break;default:id(s),s=r.next();break}return ne.trace("}"),F&&(_[F]=w),_}function g(){let _={},w={},F;for(ne.trace("Style {"),s=r.next();!tl(s,0,"ENDTAB");)switch(s.code){case 2:w.styleName=s.value,F=s.value,s=r.next();break;case 3:w.fontFile=s.value,s=r.next();break;case 4:w.bigFontFile=s.value,s=r.next();break;case 5:w.handle=s.value,s=r.next();break;case 7:w.textStyle=s.value,s=r.next();break;case 40:w.textHeight=s.value,s=r.next();break;case 41:w.xScale=s.value,s=r.next();break;case 42:w.priorTextHeight=s.value,s=r.next();break;case 50:w.rotation=s.value,s=r.next();break;case 70:s=r.next();break;case 71:w.mirroreType=s.value,s=r.next();break;case 330:w.ownerHandle=s.value,s=r.next();break;case 0:s.value==="STYLE"&&(ne.trace("}"),F&&(_[F]=w),ne.trace("Style {"),w={},F=void 0,s=r.next());break;default:s=r.next();break}return ne.trace("}"),F&&(_[F]=w),_}function y(){let _={},w={},F;for(ne.trace("DimStyle {"),s=r.next();!tl(s,0,"ENDTAB");)switch(s.code){case 2:w.styleName=s.value,F=s.value,s=r.next();break;case 40:w.DIMSCALE=s.value,s=r.next();break;case 41:w.DIMASZ=s.value,s=r.next();break;case 42:w.DIMEXO=s.value,s=r.next();break;case 44:w.DIMEXE=s.value,s=r.next();break;case 75:w.DIMSE1=s.value,s=r.next();break;case 76:w.DIMSE2=s.value,s=r.next();break;case 77:w.DIMTAD=s.value,s=r.next();break;case 140:w.DIMTXT=s.value,s=r.next();break;case 144:w.DIMLFAC=s.value,s=r.next();break;case 147:w.DIMGAP=s.value,s=r.next();break;case 176:w.DIMCLRD=s.value,s=r.next();break;case 178:w.DIMCLRT=s.value,s=r.next();break;case 271:w.DIMDEC=s.value,s=r.next();break;case 341:w.DIMLDRBLK=s.value,s=r.next();break;case 70:s=r.next();break;case 0:s.value==="DIMSTYLE"&&(ne.trace("}"),F&&(_[F]=w),ne.trace("DimStyle {"),w={},F=void 0,s=r.next());break;default:s=r.next();break}return ne.trace("}"),F&&(_[F]=w),_}function E(){let _={},w={},F;for(ne.trace("BlockRecord {"),s=r.next();!tl(s,0,"ENDTAB");)switch(s.code){case 5:w.handle=s.value,s=r.next();break;case 330:w.ownerHandle=s.value,s=r.next();break;case 2:w.blockName=s.value,F=w.blockName,s=r.next();break;case 340:w.layoutHandle=s.value,s=r.next();break;case 70:w.blockInsertUnits=s.value,s=r.next();break;case 280:w.blockExplodability=s.value,s=r.next();break;case 281:w.blockScalability=s.value,s=r.next();break;case 310:w.bitmap=s.value,s=r.next();break;case 0:if(s.value==="BLOCK_RECORD"){ne.trace("}"),F&&(_[F]=w);let H=w.layoutHandle;F&&H&&H.length>0&&H!=="0"&&(n._layoutBlocks[H]=w),ne.trace("BlockRecord {"),w={},F=void 0,s=r.next()}else id(s),s=r.next();break;default:id(s),s=r.next();break}ne.trace("}"),F&&(_[F]=w);let X=w.layoutHandle;return F&&X&&X.length>0&&X!=="0"&&(n._layoutBlocks[X]=w),_}let b={VPORT:{tableRecordsProperty:"viewPorts",tableName:"viewPort",dxfSymbolName:"VPORT",parseTableRecords:d},LTYPE:{tableRecordsProperty:"lineTypes",tableName:"lineType",dxfSymbolName:"LTYPE",parseTableRecords:f},LAYER:{tableRecordsProperty:"layers",tableName:"layer",dxfSymbolName:"LAYER",parseTableRecords:m},BLOCK_RECORD:{tableRecordsProperty:"blockRecords",tableName:"blockRecord",dxfSymbolName:"BLOCK_RECORD",parseTableRecords:E},STYLE:{tableRecordsProperty:"styles",tableName:"style",dxfSymbolName:"STYLE",parseTableRecords:g},DIMSTYLE:{tableRecordsProperty:"dimStyles",tableName:"dimStyle",dxfSymbolName:"DIMSTYLE",parseTableRecords:y}};function x(_){let w=[],F=_?"ENDBLK":"ENDSEC";for(_||(s=r.next());;)if(s.code===0){if(s.value===F)break;let X=n._entityHandlers[s.value];if(X!=null){ne.trace(s.value+" {");let H=X.parseEntity(r,s);H&&(H.layer||(H.layer="0"),H.colorIndex===void 0&&(H.colorIndex=256),H.lineType||(H.lineType=VA)),s=r.lastReadGroup,ne.trace("}"),P(H),w.push(H)}else{let H=s.value;n.unhandledEntities[H]||(n.unhandledEntities[H]=0),n.unhandledEntities[H]++,s=r.next();continue}}else s=r.next();return F=="ENDSEC"&&(s=r.next()),w}function S(){let _={},w="ENDSEC";for(s=r.next();s.value!=="EOF";)if(s.code===0){if(s.value===w)break;let F=n._objectHandlers[s.value];if(F!=null){ne.trace(s.value+" {");let X=F.parseObject(r,s),H=s.value;s=r.lastReadGroup,ne.trace("}"),P(X),_[H]||(_[H]=[]),_[H].push(X)}else{let X=s.value;n.unhandledObjects[X]||(n.unhandledObjects[X]=0),n.unhandledObjects[X]++,s=r.next();continue}}else s=r.next();return s=r.next(),_.LAYOUT&&(Object.keys(n._layoutBlocks).length!==_.LAYOUT.length&&ne.warn("[DxfParser] The number of layout and block associations does not match!"),_.LAYOUT.forEach(F=>{n._layoutBlocks[F.handle]&&(F.associatedBlockName=n._layoutBlocks[F.handle].blockName)}),_.LAYOUT.sort((F,X)=>F.tabOrder-X.tabOrder)),_}function D(_){let w={},F=_.code;if(w.x=_.value,F+=10,_=r.next(),_.code!=F)throw new Error(`Expected code for point value to be ${F} but got ${_.code}.`);return w.y=_.value,F+=10,_=r.next(),_.code!=F||(w.z=_.value,_=r.next()),w}function P(_){if(!_)throw new TypeError("entity cannot be undefined or null");_.handle||(_.handle=(i++).toString())}return a(),e}splitByLineSeparator(r){let e=[],i=0;for(let n=0,s=r.length;n(n.Added="Added",n.Removed="Removed",n.Modified="Modified",n.NoChange="NoChange",n))(ZA||{}),zs=1,$A=class{constructor(r,e){this.changes={};this.comparedBlocks=new Map;this.isComparingBlock=!1;this.isComparingDimension=!1;if(this.dxf1=r,this.dxf2=e,!r||!e)throw new Error("Invalid dxf data to compare!")}getLayerFrozen(r,e){var n,s,a;let i=(s=(n=r.tables)==null?void 0:n.layer)==null?void 0:s.layers;return i&&((a=i[e.layer])==null?void 0:a.frozen)}compare(r){return ot(this,null,function*(){this.changes={};let e=[],i=new Map;return this.dxf1.entities.forEach(n=>{if(n.inPaperSpace!==!0){let s=this.getLayerFrozen(this.dxf1,n)===!0;!$A.ignoreEntityTypes.includes(n.type)&&!s&&e.push(n)}}),this.dxf2.entities.forEach(n=>{if(n.inPaperSpace!==!0){let s=this.getLayerFrozen(this.dxf2,n)===!0;!$A.ignoreEntityTypes.includes(n.type)&&!s&&i.set(n.handle,n)}}),yield this.compareEntities(e,i,void 0,r),Promise.resolve(this.changes)})}isDimensionBlock(r){return r.includes("*D")}compareInsertOrDemensionEntities(r,e,i,n){if(!r.block||!e.block)return;let s=r.block,a;if(this.isComparingBlock=!0,this.isDimensionBlock(s)){let o=this.dxf1.blocks[r.block],l=this.dxf2.blocks[e.block],c=Date.now();this.isComparingDimension=!0,a=this.compareBlock(o,l),this.isComparingDimension=!1,ne.debug(`[DxfCompare] compare block: ${s} cost ${(Date.now()-c)/1e3}s`)}else{if(!this.comparedBlocks.has(s)){let o=this.dxf1.blocks[s],l=this.dxf2.blocks[s],c=Date.now(),u=this.compareBlock(o,l);this.comparedBlocks.set(s,u),ne.debug(`[DxfCompare] compare block: ${s} cost ${(Date.now()-c)/1e3}s`)}a=this.comparedBlocks.get(s)}return a==null||a.forEach(o=>{if(o.parentHandles||(o.parentHandles=[]),i&&n)o.type==="Added"?o.parentHandles.push(n):o.type==="Removed"&&o.parentHandles.push(i);else{let l=[...o.parentHandles,r.handle];o.type==="Added"?this.changes[zs]=Mn(Ur({id:zs},o),{parentHandles:l}):o.type==="Removed"&&(this.changes[zs]=Mn(Ur({id:zs},o),{parentHandles:l})),zs++}}),!i&&!n&&(this.isComparingBlock=!1),a}compareBlock(r,e){var o,l;let i=[],n=[];(o=r==null?void 0:r.entities)==null||o.forEach(c=>{c.type!=="ATTDEF"&&!this.bIgnoreChildEntitiesOriginalType(c)&&i.push(c)}),(l=e==null?void 0:e.entities)==null||l.forEach(c=>{c.type!=="ATTDEF"&&!this.bIgnoreChildEntitiesOriginalType(c)&&n.push(c)});let s=[],a=[];for(let c=0;c0&&s.push(...f),h=!1,n.splice(p--,1);break}else{h=!1,n.splice(p--,1);break}}h&&(s.push({type:"Removed",handle:u.handle}),a.push(u.handle))}return n.forEach(c=>{a.includes(c.handle)||s.push({type:"Added",handle:c.handle})}),s}compareEntities(r,e,i,n){return ot(this,null,function*(){var c,u;let s=r.length,a=Math.round(Math.pow(s,.5)),o=Date.now(),l=h=>ot(this,null,function*(){if(n&&(h%a===0||h===s-1)){n(new ProgressEvent("compareProgress",{loaded:h+1,total:s}));let p=500,d=Date.now();(d-o>p||h===s-1)&&(yield bs.sleep(0),o=d)}});for(let h=0;h - void main() { - //vec4 worldPosition = modelMatrix * vec4(position, 1.0); - v_pos = position; - - #include - #include - #include - }`,a=` - uniform mat4 modelMatrix; - uniform float u_cameraZoom; - uniform vec3 u_color; - varying vec3 v_pos; - - struct PatternLine { - vec2 origin; - vec2 delta; - float angle; - float pattern[MAX_PATTERN_SEGMENT_COUNT]; - float patternSum[MAX_PATTERN_SEGMENT_COUNT+1]; - float patternLength; - }; - - uniform PatternLine u_patternLines[${t.length}]; - uniform float u_patternAngle; - - #include - - // Clamp [0..1] range - #define saturate(a) clamp(a, 0.0, 1.0) - - const float EPS = 0.000001; - - vec2 getWorldScale() { - return vec2(length(modelMatrix[0].xyz), length(modelMatrix[1].xyz)); - } - - vec2 rotate(vec2 st, float rotation) { - const float PI = 3.1415926; - float angle = rotation * PI/180.0; - float sine = sin(angle), cosine = cos(angle); - return vec2(cosine * st.x - sine * st.y, cosine * st.y + sine * st.x); - } - - vec2 translate(vec2 samplePosition, vec2 offset) { - //move samplepoint in the opposite direction that we want to move shapes in - return samplePosition - offset; - } - - vec2 scale(vec2 samplePosition, float scale) { - return samplePosition / scale; - } - - float sdfLine(vec2 st, vec2 a, vec2 b) { - vec2 ap = st - a; - vec2 ab = b - a; - return abs(((ap.x * ab.y) - (ab.x * ap.y))) / length(ab); - } - - float drawSpaceLine(vec2 st, float distanceBetweenLines, float thick) { - float dist = sdfLine(st , vec2(0.0, 0.0) , vec2(1.0, 0.0)); - - //vec2 tt = dFdy(st); - //float scale = (abs(tt.x)+abs(tt.y))/2.0; - //float scale = length(fwidth(st)) * 0.5; - // close to a pixel - //float thick = 2.0; - //thick = (thick * 0.5 - 0.5) * scale; - - float lineDistance = abs(fract(dist / distanceBetweenLines + 0.5) - 0.5) * distanceBetweenLines; - //float distanceChange = fwidth(dist) * 0.5; - //float thresold = smoothstep(thick - distanceChange, thick + distanceChange, lineDistance); - //float thresold = step(thick,lineDistance); - // remove gradient - float thresold = step(thick,lineDistance); - - return saturate(thresold); - } - - float drawSolidLine(PatternLine patternLine, float thick) { - vec2 origin = patternLine.origin; - vec2 delta = patternLine.delta; - float distanceBetweenLines = length(delta); - - origin = rotate(origin,u_patternAngle); - vec2 st = rotate(v_pos.xy - origin, -(patternLine.angle + u_patternAngle)); - - return drawSpaceLine(st, distanceBetweenLines , thick); - } - - int getPatternIndex(PatternLine patternLine, float u ) { - u = mod(u, patternLine.patternLength); - float distance = 0.0; - - #pragma unroll_loop_start - for(int i = 1; i < patternLine.patternSum.length(); i++){ - if(u < patternLine.patternSum[i]) { - distance = u - patternLine.patternSum[i-1]; - return i - 1; - } - } - #pragma unroll_loop_end - - return -1; - } - - float drawDashedLine(PatternLine patternLine, float thick){ - float thresold = 1.0; - vec2 origin = patternLine.origin; - vec2 delta = patternLine.delta; - float distanceBetweenLines = length(delta.y); - - origin = rotate(origin, u_patternAngle); - vec2 st = rotate(v_pos.xy - origin, -(patternLine.angle + u_patternAngle)); - - float offsetX = st.y * delta.x/delta.y; - float u = st.x - offsetX; - int index = getPatternIndex(patternLine, u); - if(index < 0){ - return thresold; - } - - float size = patternLine.pattern[index]; - if(size >= 0.0) { - thresold = drawSpaceLine(st, distanceBetweenLines , thick); - } - - return thresold; - } - - float drawLine(PatternLine patternLine, float thick) { - float t = 0.0; - if(patternLine.patternLength > 0.0) { - t = drawDashedLine(patternLine, thick); - } else { - t = drawSolidLine(patternLine, thick); - } - return t; - } - - void main() { - #include - - if(u_cameraZoom < EPS){ - gl_FragColor = vec4(u_color, 1.0); - return; - } - - vec2 worldScale = getWorldScale(); - float averageScale = (abs(worldScale.x) + abs(worldScale.y))/2.0; - float thick = (0.7 / averageScale) / u_cameraZoom; - - float total = 0.0; - -#if ${t.length} > 1 - #pragma unroll_loop_start - for (int i = 0; i < u_patternLines.length(); i++) { - PatternLine pl = u_patternLines[i]; - float t = drawLine(pl, thick); - total += (1.0 - t); - } - #pragma unroll_loop_end -#else - float t = drawLine(u_patternLines[0], thick); - total += (1.0 - t); -#endif - - total = saturate(total); - if (total < 0.01) { - discard; - } - - gl_FragColor = vec4(u_color * total, 1.0); - } - `;return new Yt({uniforms:n,vertexShader:s,fragmentShader:a,clipping:!0})}var KA=class{static createLineShaderMaterial(r,e,i,n,s){let a=0,o=[];for(let h=0;h - - void main() { - vLineDistance = lineDistance; - - #include - #include - #include - }`,u=` - uniform mat4 modelMatrix; - uniform vec3 diffuse; - uniform vec3 u_color; - uniform float opacity; - uniform float pattern[${r.length}]; - uniform float patternLength; - uniform float u_viewportScale; - uniform float u_cameraZoom; - varying float vLineDistance; - - #include - - vec2 getWorldScale() { - return vec2(length(modelMatrix[0].xyz), length(modelMatrix[1].xyz)); - } - - void main() { - - #include - - // vec2 worldScale = getWorldScale(); - // float averageScale = (abs(worldScale.x) + abs(worldScale.y))/2.0; - // When zoomed out to a certain extent, it is displayed as a solid line. - if(patternLength * u_viewportScale * u_cameraZoom/1.5 < 1.0){ - gl_FragColor = vec4(u_color, opacity); - return; - } - - float pos = mod(vLineDistance, patternLength * u_viewportScale); - - for ( int i = 0; i < ${r.length}; i++ ) { - pos = pos - abs(pattern[i] * u_viewportScale); - if ( pos < 0.0 ) { - if ( pattern[i] > 0.0 ) { - gl_FragColor = vec4(u_color, opacity); - break; - } - discard; - } - } - }`;return new Yt({uniforms:l,vertexShader:c,fragmentShader:u,clipping:!0})}};var _8={};z_(_8,{default:()=>S8});var I8={};z_(I8,{default:()=>x8});var x8=(t,r)=>typeof r=="undefined"||+r==0?Math.round(t):(t=+t,r=+r,isNaN(t)||!(typeof r=="number"&&r%1===0)?NaN:(t=t.toString().split("e"),t=Math.round(+(t[0]+"e"+(t[1]?+t[1]-r:-r))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+r:r))));var S8=(t,r,e,i,n)=>{let s=e.length,a=e[0].length;if(t<0||t>1)throw new Error("t out of bounds [0,1]: "+t);if(r<1)throw new Error("degree must be at least 1 (linear)");if(r>s-1)throw new Error("degree must be less than or equal to point count - 1");if(i){if(i.length!==s+r+1)throw new Error("bad knot vector length")}else{i=[];for(let f=0;f=i[u]&&t<=i[u+1]);u++);let h=[];for(let f=0;fu-r-1+f;m--){p=(t-i[m])/(i[m+r+1-f]-i[m]);for(let g=0;g{t=t.replace(/%%(.)/g,(l,c)=>WPt[c]||c);let e=r==null?void 0:r.encoding,i=e instanceof TextDecoder?e:void 0,n="",s,a=[],o=l=>{n&&(a.push(n),n=""),a.push(l)};for(let l=0;l(t=XPt(t),r?$Pt(t,r):t),XPt=t=>t.replace(/\\[uU]\+([0-9a-fA-F]{4})/g,(r,e)=>String.fromCodePoint(parseInt(e,16))),$Pt=(t,r)=>{let e=r instanceof TextDecoder?r:new TextDecoder(r);return t.replace(/\\[mM]\+[0|1]([0-9a-fA-F]{2})([0-9a-fA-F]{2})/g,(i,n,s)=>(e=e||new TextDecoder(r)).decode(new Uint8Array([parseInt(n,16),parseInt(s,16)])))},QA=(t,r)=>{t=YPt(t,r==null?void 0:r.encoding);let e=0,i={text:""},n=[i],s=t.matchAll(/%%(\d\d\d|.)/g);for(let a of s){i.text+=t.slice(e,a.index);let l=a[1].toLowerCase(),c=qPt[l];c?i.text+=c:l.length===3?i.text+=String.fromCodePoint(+l):l==="k"||l==="o"||l==="u"?(i=Mn(Ur({},i),{text:""}),i[l]?delete i[l]:i[l]=1,n.push(i)):i.text+=l,e=a.index+a[0].length}return i.text+=t.slice(e),n.filter(a=>a.text)};var mMe=t=>t==="Unitless"?1:t==="Inches"?.0254:t==="Feet"?.3048:t==="Millimeters"?.001:t==="Centimeters"?.01:(t==="Meters"||console.warn(`[Units] Unsupported unit '${t}', will return 1 for unit scale.`),1),w8=(t,r)=>mMe(t)/mMe(r);var WT="0.2.23";var gMe="VERSION",KPt=()=>window.localStorage.getItem(gMe),JPt=()=>{window.localStorage.setItem(gMe,WT)},vMe=()=>KPt()!==WT?(JPt(),!0):!1;var qT=class{constructor(){this.DATABASE_NAME="gemini_viewer_db";this.TABLES=[{name:"viewpoint",options:{keyPath:"id",autoIncrement:!0},indexArray:[]},{name:"annotation",options:{keyPath:"id",autoIncrement:!0},indexArray:[]},{name:"dxfdata",options:{keyPath:"dxfDataId",autoIncrement:!1},indexArray:[]},{name:"fontdata",options:{keyPath:"url",autoIncrement:!0},indexArray:[]}];this.db=void 0}static instance(){return qT._instance||(qT._instance=new qT),qT._instance}getDatabase(){return ot(this,null,function*(){let r=yield this.getDB(this.DATABASE_NAME);return this.db||(r.close(),vMe()&&(yield this.deleteDataBase(this.DATABASE_NAME)),r=yield this.getUpgradedDB(r)),r.onclose=()=>{this.db=void 0,ne.debug(`[DB] Db ${r.name} is closed.`)},r.onerror=e=>{this.db=void 0,ne.debug(`[DB] Db ${r.name} encountered error.`,e)},r.onabort=e=>{this.db=void 0,ne.debug(`[DB] Db ${r.name} aborted.`,e)},r.onversionchange=e=>{ne.debug("onversionchange",e)},this.db=r,Promise.resolve(this.db)})}closeDatabase(){this.db&&this.db.close()}deleteDataBase(r){return new Promise((e,i)=>{let n=window.indexedDB.deleteDatabase(r);n.onerror=s=>{ne.debug(s),i(s)},n.onsuccess=s=>{let a=s.target;ne.debug(`[DB] Db ${r} delete old version ${s.oldVersion}.`),e(a)}})}getDB(r){return ot(this,null,function*(){return new Promise((e,i)=>{let n=window.indexedDB.open(r);n.onerror=i,n.onsuccess=s=>{let a=s.target.result;ne.debug(`[DB] Db ${a.name} opened (version ${a.version}).`),e(a)}})})}getUpgradedDB(r){return ot(this,null,function*(){return new Promise((e,i)=>{ne.debug(`[DB] Upgrading db ${r.name} (version ${r.version})`);let n=window.indexedDB.open(r.name,r.version+1);n.onerror=i,n.onblocked=s=>{ne.debug("onblocked",s)},n.onupgradeneeded=s=>{let a=s.target.transaction;a.oncomplete=()=>{ne.debug(`[DB] Upgrade is done (new version: ${o.version}).`)};let o=s.target.result,l=[];for(let c=0;c0&&Promise.all(l).then(()=>{ne.debug(`[DB] All(${l.length}) tables created.`)})},n.onsuccess=s=>{let a=s.target.result;ne.debug(`[DB] Db ${a.name} opened (version ${a.version}).`),e(a)}})})}createTable(r,e,i,n){return ot(this,null,function*(){return new Promise(s=>{let a=r.createObjectStore(e,i);n&&n.forEach(o=>{a.createIndex(o.name,o.fields,{unique:o.unique})}),ne.debug(`[DB] Table ${e} created.`),s(r)})})}},ns=qT;ns._instance=void 0;var oh=class{constructor(){this.db=void 0;this.isCreatingTable=!1;if(ns.instance().TABLES.findIndex(e=>e.name===this.tableName())===-1)throw new Error(`Make sure to add table '${this.tableName()}' to IndexedDbManager.TABLES!`)}tableName(){throw new Error("Derived class have to override 'tableName', and set a proper table name!")}add(r,e,i){let n=this.tableName();ns.instance().getDatabase().then(s=>{let o=s.transaction([n],"readwrite").objectStore(n).add(r);o.onsuccess=e,o.onerror=i}).finally(()=>{ns.instance().closeDatabase()}).catch(s=>{i&&i(s)})}save(r,e,i){let n=this.tableName();ns.instance().getDatabase().then(s=>{let o=s.transaction([n],"readwrite").objectStore(n).put(r);o.onsuccess=e,o.onerror=i}).finally(()=>{ns.instance().closeDatabase()})}delete(r,e,i){let n=this.tableName();ns.instance().getDatabase().then(s=>{let o=s.transaction([n],"readwrite").objectStore(n).delete(r);o.onsuccess=e,o.onerror=i}).finally(()=>{ns.instance().closeDatabase()})}update(){ns.instance().getDatabase().then(()=>{})}query(r,e){let i=this.tableName();ns.instance().getDatabase().then(n=>{let a=n.transaction([i],"readonly").objectStore(i).openCursor();a.onsuccess=o=>{let l=o.target.result;l&&l.continue(),r&&r(l)},a.onerror=e}).finally(()=>{ns.instance().closeDatabase()})}queryAll(r,e){let i=this.tableName();ns.instance().getDatabase().then(n=>{let a=n.transaction([i],"readonly").objectStore(i).getAll();a.onsuccess=o=>{r&&r(a.result)},a.onerror=e}).finally(()=>{ns.instance().closeDatabase()})}clearAll(r,e){let i=this.tableName();ns.instance().getDatabase().then(n=>{let a=n.transaction([i],"readwrite").objectStore(i).clear();a.onsuccess=o=>{r&&r(o)},a.onerror=o=>{e&&e(o)}}).finally(()=>{ns.instance().closeDatabase()})}};var YT=class extends oh{tableName(){return"annotation"}static instance(){return YT._instance||(YT._instance=new YT),YT._instance}query(r,e,i){let n=[];super.query(s=>{if(!s){e&&e(n);return}!s.value||s.value.projectId!==r||n.push(s.value)},s=>{console.log(s)})}},R8=YT;R8._instance=void 0;var XT=class extends oh{tableName(){return"viewpoint"}static instance(){return XT._instance||(XT._instance=new XT),XT._instance}query(r,e,i){let n=[];super.query(s=>{if(!s){e&&e(n);return}!s.value||s.value.projectId!==r||n.push(s.value)},s=>{i&&i(),console.log(s)})}},M8=XT;M8._instance=void 0;var $T=class extends oh{tableName(){return"dxfdata"}static instance(){return $T._instance||($T._instance=new $T),$T._instance}query(r,e,i){let n=[],s=this.tableName();ns.instance().getDatabase().then(a=>{let l=a.transaction([s],"readonly").objectStore(s).get(r);l.onerror=c=>{i&&i(c),ne.info("[DxfDataTable] Failed to query !",c)},l.onsuccess=()=>{l.result&&n.push(l.result),e&&e(n)}}).finally(()=>{ns.instance().closeDatabase()})}},ZT=$T;ZT._instance=void 0;var I0=class extends oh{tableName(){return"fontdata"}static instance(){return I0._instance||(I0._instance=new I0),I0._instance}query(r,e,i){let n;super.query(s=>{if(!s){e&&e(n);return}!s.value||s.value.url!==r||(n=s.value)},s=>{i&&i(),console.log(s)})}queryAll(){return ot(this,null,function*(){return new Promise((r,e)=>{C7(I0.prototype,this,"queryAll").call(this,i=>{r(i)},i=>{e(i)})})})}},lh=I0;lh._instance=void 0;var eO=12;var nd=class extends Ja{constructor(e,i){super();this.width=0;this.lastPoint=e,this.polyLines=i,this.width=this.calcWidth(i)}offset(e){let i=[];for(let n=0;n>8}}return r.subarray(0,e)}var e2t="\u554A\u963F\u57C3\u6328\u54CE\u5509\u54C0\u7691\u764C\u853C\u77EE\u827E\u788D\u7231\u9698\u978D\u6C28\u5B89\u4FFA\u6309\u6697\u5CB8\u80FA\u6848\u80AE\u6602\u76CE\u51F9\u6556\u71AC\u7FF1\u8884\u50B2\u5965\u61CA\u6FB3\u82AD\u634C\u6252\u53ED\u5427\u7B06\u516B\u75A4\u5DF4\u62D4\u8DCB\u9776\u628A\u8019\u575D\u9738\u7F62\u7238\u767D\u67CF\u767E\u6446\u4F70\u8D25\u62DC\u7A17\u6591\u73ED\u642C\u6273\u822C\u9881\u677F\u7248\u626E\u62CC\u4F34\u74E3\u534A\u529E\u7ECA\u90A6\u5E2E\u6886\u699C\u8180\u7ED1\u68D2\u78C5\u868C\u9551\u508D\u8C24\u82DE\u80DE\u5305\u8912\u5265\u8584\u96F9\u4FDD\u5821\u9971\u5B9D\u62B1\u62A5\u66B4\u8C79\u9C8D\u7206\u676F\u7891\u60B2\u5351\u5317\u8F88\u80CC\u8D1D\u94A1\u500D\u72C8\u5907\u60EB\u7119\u88AB\u5954\u82EF\u672C\u7B28\u5D29\u7EF7\u752D\u6CF5\u8E66\u8FF8\u903C\u9F3B\u6BD4\u9119\u7B14\u5F7C\u78A7\u84D6\u853D\u6BD5\u6BD9\u6BD6\u5E01\u5E87\u75F9\u95ED\u655D\u5F0A\u5FC5\u8F9F\u58C1\u81C2\u907F\u965B\u97AD\u8FB9\u7F16\u8D2C\u6241\u4FBF\u53D8\u535E\u8FA8\u8FA9\u8FAB\u904D\u6807\u5F6A\u8198\u8868\u9CD6\u618B\u522B\u762A\u5F6C\u658C\u6FD2\u6EE8\u5BBE\u6448\u5175\u51B0\u67C4\u4E19\u79C9\u997C\u70B3\u75C5\u5E76\u73BB\u83E0\u64AD\u62E8\u94B5\u6CE2\u535A\u52C3\u640F\u94C2\u7B94\u4F2F\u5E1B\u8236\u8116\u818A\u6E24\u6CCA\u9A73\u6355\u535C\u54FA\u8865\u57E0\u4E0D\u5E03\u6B65\u7C3F\u90E8\u6016\u64E6\u731C\u88C1\u6750\u624D\u8D22\u776C\u8E29\u91C7\u5F69\u83DC\u8521\u9910\u53C2\u8695\u6B8B\u60ED\u60E8\u707F\u82CD\u8231\u4ED3\u6CA7\u85CF\u64CD\u7CD9\u69FD\u66F9\u8349\u5395\u7B56\u4FA7\u518C\u6D4B\u5C42\u8E6D\u63D2\u53C9\u832C\u8336\u67E5\u78B4\u643D\u5BDF\u5C94\u5DEE\u8BE7\u62C6\u67F4\u8C7A\u6400\u63BA\u8749\u998B\u8C17\u7F20\u94F2\u4EA7\u9610\u98A4\u660C\u7316\u573A\u5C1D\u5E38\u957F\u507F\u80A0\u5382\u655E\u7545\u5531\u5021\u8D85\u6284\u949E\u671D\u5632\u6F6E\u5DE2\u5435\u7092\u8F66\u626F\u64A4\u63A3\u5F7B\u6F88\u90F4\u81E3\u8FB0\u5C18\u6668\u5FF1\u6C89\u9648\u8D81\u886C\u6491\u79F0\u57CE\u6A59\u6210\u5448\u4E58\u7A0B\u60E9\u6F84\u8BDA\u627F\u901E\u9A8B\u79E4\u5403\u75F4\u6301\u5319\u6C60\u8FDF\u5F1B\u9A70\u803B\u9F7F\u4F88\u5C3A\u8D64\u7FC5\u65A5\u70BD\u5145\u51B2\u866B\u5D07\u5BA0\u62BD\u916C\u7574\u8E0C\u7A20\u6101\u7B79\u4EC7\u7EF8\u7785\u4E11\u81ED\u521D\u51FA\u6A71\u53A8\u8E87\u9504\u96CF\u6EC1\u9664\u695A\u7840\u50A8\u77D7\u6410\u89E6\u5904\u63E3\u5DDD\u7A7F\u693D\u4F20\u8239\u5598\u4E32\u75AE\u7A97\u5E62\u5E8A\u95EF\u521B\u5439\u708A\u6376\u9524\u5782\u6625\u693F\u9187\u5507\u6DF3\u7EAF\u8822\u6233\u7EF0\u75B5\u8328\u78C1\u96CC\u8F9E\u6148\u74F7\u8BCD\u6B64\u523A\u8D50\u6B21\u806A\u8471\u56F1\u5306\u4ECE\u4E1B\u51D1\u7C97\u918B\u7C07\u4FC3\u8E7F\u7BE1\u7A9C\u6467\u5D14\u50AC\u8106\u7601\u7CB9\u6DEC\u7FE0\u6751\u5B58\u5BF8\u78CB\u64AE\u6413\u63AA\u632B\u9519\u642D\u8FBE\u7B54\u7629\u6253\u5927\u5446\u6B79\u50A3\u6234\u5E26\u6B86\u4EE3\u8D37\u888B\u5F85\u902E\u6020\u803D\u62C5\u4E39\u5355\u90F8\u63B8\u80C6\u65E6\u6C2E\u4F46\u60EE\u6DE1\u8BDE\u5F39\u86CB\u5F53\u6321\u515A\u8361\u6863\u5200\u6363\u8E48\u5012\u5C9B\u7977\u5BFC\u5230\u7A3B\u60BC\u9053\u76D7\u5FB7\u5F97\u7684\u8E6C\u706F\u767B\u7B49\u77AA\u51F3\u9093\u5824\u4F4E\u6EF4\u8FEA\u654C\u7B1B\u72C4\u6DA4\u7FDF\u5AE1\u62B5\u5E95\u5730\u8482\u7B2C\u5E1D\u5F1F\u9012\u7F14\u98A0\u6382\u6EC7\u7898\u70B9\u5178\u975B\u57AB\u7535\u4F43\u7538\u5E97\u60E6\u5960\u6DC0\u6BBF\u7889\u53FC\u96D5\u51CB\u5201\u6389\u540A\u9493\u8C03\u8DCC\u7239\u789F\u8776\u8FED\u8C0D\u53E0\u4E01\u76EF\u53EE\u9489\u9876\u9F0E\u952D\u5B9A\u8BA2\u4E22\u4E1C\u51AC\u8463\u61C2\u52A8\u680B\u4F97\u606B\u51BB\u6D1E\u515C\u6296\u6597\u9661\u8C46\u9017\u75D8\u90FD\u7763\u6BD2\u728A\u72EC\u8BFB\u5835\u7779\u8D4C\u675C\u9540\u809A\u5EA6\u6E21\u5992\u7AEF\u77ED\u953B\u6BB5\u65AD\u7F0E\u5806\u5151\u961F\u5BF9\u58A9\u5428\u8E72\u6566\u987F\u56E4\u949D\u76FE\u9041\u6387\u54C6\u591A\u593A\u579B\u8EB2\u6735\u8DFA\u8235\u5241\u60F0\u5815\u86FE\u5CE8\u9E45\u4FC4\u989D\u8BB9\u5A25\u6076\u5384\u627C\u904F\u9102\u997F\u6069\u800C\u513F\u8033\u5C14\u9975\u6D31\u4E8C\u8D30\u53D1\u7F5A\u7B4F\u4F10\u4E4F\u9600\u6CD5\u73D0\u85E9\u5E06\u756A\u7FFB\u6A0A\u77FE\u9492\u7E41\u51E1\u70E6\u53CD\u8FD4\u8303\u8D29\u72AF\u996D\u6CDB\u574A\u82B3\u65B9\u80AA\u623F\u9632\u59A8\u4EFF\u8BBF\u7EBA\u653E\u83F2\u975E\u5561\u98DE\u80A5\u532A\u8BFD\u5420\u80BA\u5E9F\u6CB8\u8D39\u82AC\u915A\u5429\u6C1B\u5206\u7EB7\u575F\u711A\u6C7E\u7C89\u594B\u4EFD\u5FFF\u6124\u7CAA\u4E30\u5C01\u67AB\u8702\u5CF0\u950B\u98CE\u75AF\u70FD\u9022\u51AF\u7F1D\u8BBD\u5949\u51E4\u4F5B\u5426\u592B\u6577\u80A4\u5B75\u6276\u62C2\u8F90\u5E45\u6C1F\u7B26\u4F0F\u4FD8\u670D\u6D6E\u6DAA\u798F\u88B1\u5F17\u752B\u629A\u8F85\u4FEF\u91DC\u65A7\u812F\u8151\u5E9C\u8150\u8D74\u526F\u8986\u8D4B\u590D\u5085\u4ED8\u961C\u7236\u8179\u8D1F\u5BCC\u8BA3\u9644\u5987\u7F1A\u5490\u5676\u560E\u8BE5\u6539\u6982\u9499\u76D6\u6E89\u5E72\u7518\u6746\u67D1\u7AFF\u809D\u8D76\u611F\u79C6\u6562\u8D63\u5188\u521A\u94A2\u7F38\u809B\u7EB2\u5C97\u6E2F\u6760\u7BD9\u768B\u9AD8\u818F\u7F94\u7CD5\u641E\u9550\u7A3F\u544A\u54E5\u6B4C\u6401\u6208\u9E3D\u80F3\u7599\u5272\u9769\u845B\u683C\u86E4\u9601\u9694\u94EC\u4E2A\u5404\u7ED9\u6839\u8DDF\u8015\u66F4\u5E9A\u7FB9\u57C2\u803F\u6897\u5DE5\u653B\u529F\u606D\u9F9A\u4F9B\u8EAC\u516C\u5BAB\u5F13\u5DE9\u6C5E\u62F1\u8D21\u5171\u94A9\u52FE\u6C9F\u82DF\u72D7\u57A2\u6784\u8D2D\u591F\u8F9C\u83C7\u5495\u7B8D\u4F30\u6CBD\u5B64\u59D1\u9F13\u53E4\u86CA\u9AA8\u8C37\u80A1\u6545\u987E\u56FA\u96C7\u522E\u74DC\u5250\u5BE1\u6302\u8902\u4E56\u62D0\u602A\u68FA\u5173\u5B98\u51A0\u89C2\u7BA1\u9986\u7F50\u60EF\u704C\u8D2F\u5149\u5E7F\u901B\u7470\u89C4\u572D\u7845\u5F52\u9F9F\u95FA\u8F68\u9B3C\u8BE1\u7678\u6842\u67DC\u8DEA\u8D35\u523D\u8F8A\u6EDA\u68CD\u9505\u90ED\u56FD\u679C\u88F9\u8FC7\u54C8\u9AB8\u5B69\u6D77\u6C26\u4EA5\u5BB3\u9A87\u9163\u61A8\u90AF\u97E9\u542B\u6DB5\u5BD2\u51FD\u558A\u7F55\u7FF0\u64BC\u634D\u65F1\u61BE\u608D\u710A\u6C57\u6C49\u592F\u676D\u822A\u58D5\u568E\u8C6A\u6BEB\u90DD\u597D\u8017\u53F7\u6D69\u5475\u559D\u8377\u83CF\u6838\u79BE\u548C\u4F55\u5408\u76D2\u8C89\u9602\u6CB3\u6DB8\u8D6B\u8910\u9E64\u8D3A\u563F\u9ED1\u75D5\u5F88\u72E0\u6068\u54FC\u4EA8\u6A2A\u8861\u6052\u8F70\u54C4\u70D8\u8679\u9E3F\u6D2A\u5B8F\u5F18\u7EA2\u5589\u4FAF\u7334\u543C\u539A\u5019\u540E\u547C\u4E4E\u5FFD\u745A\u58F6\u846B\u80E1\u8774\u72D0\u7CCA\u6E56\u5F27\u864E\u552C\u62A4\u4E92\u6CAA\u6237\u82B1\u54D7\u534E\u733E\u6ED1\u753B\u5212\u5316\u8BDD\u69D0\u5F8A\u6000\u6DEE\u574F\u6B22\u73AF\u6853\u8FD8\u7F13\u6362\u60A3\u5524\u75EA\u8C62\u7115\u6DA3\u5BA6\u5E7B\u8352\u614C\u9EC4\u78FA\u8757\u7C27\u7687\u51F0\u60F6\u714C\u6643\u5E4C\u604D\u8C0E\u7070\u6325\u8F89\u5FBD\u6062\u86D4\u56DE\u6BC1\u6094\u6167\u5349\u60E0\u6666\u8D3F\u79FD\u4F1A\u70E9\u6C47\u8BB3\u8BF2\u7ED8\u8364\u660F\u5A5A\u9B42\u6D51\u6DF7\u8C41\u6D3B\u4F19\u706B\u83B7\u6216\u60D1\u970D\u8D27\u7978\u51FB\u573E\u57FA\u673A\u7578\u7A3D\u79EF\u7B95\u808C\u9965\u8FF9\u6FC0\u8BA5\u9E21\u59EC\u7EE9\u7F09\u5409\u6781\u68D8\u8F91\u7C4D\u96C6\u53CA\u6025\u75BE\u6C72\u5373\u5AC9\u7EA7\u6324\u51E0\u810A\u5DF1\u84DF\u6280\u5180\u5B63\u4F0E\u796D\u5242\u60B8\u6D4E\u5BC4\u5BC2\u8BA1\u8BB0\u65E2\u5FCC\u9645\u7EE7\u7EAA\u5609\u67B7\u5939\u4F73\u5BB6\u52A0\u835A\u988A\u8D3E\u7532\u94BE\u5047\u7A3C\u4EF7\u67B6\u9A7E\u5AC1\u6B7C\u76D1\u575A\u5C16\u7B3A\u95F4\u714E\u517C\u80A9\u8270\u5978\u7F04\u8327\u68C0\u67EC\u78B1\u7877\u62E3\u6361\u7B80\u4FED\u526A\u51CF\u8350\u69DB\u9274\u8DF5\u8D31\u89C1\u952E\u7BAD\u4EF6\u5065\u8230\u5251\u996F\u6E10\u6E85\u6DA7\u5EFA\u50F5\u59DC\u5C06\u6D46\u6C5F\u7586\u848B\u6868\u5956\u8BB2\u5320\u9171\u964D\u8549\u6912\u7901\u7126\u80F6\u4EA4\u90CA\u6D47\u9A84\u5A07\u56BC\u6405\u94F0\u77EB\u4FA5\u811A\u72E1\u89D2\u997A\u7F34\u7EDE\u527F\u6559\u9175\u8F7F\u8F83\u53EB\u7A96\u63ED\u63A5\u7686\u79F8\u8857\u9636\u622A\u52AB\u8282\u830E\u775B\u6676\u9CB8\u4EAC\u60CA\u7CBE\u7CB3\u7ECF\u4E95\u8B66\u666F\u9888\u9759\u5883\u656C\u955C\u5F84\u75C9\u9756\u7ADF\u7ADE\u51C0\u70AF\u7A98\u63EA\u7A76\u7EA0\u7396\u97ED\u4E45\u7078\u4E5D\u9152\u53A9\u6551\u65E7\u81FC\u8205\u548E\u5C31\u759A\u97A0\u62D8\u72D9\u75BD\u5C45\u9A79\u83CA\u5C40\u5480\u77E9\u4E3E\u6CAE\u805A\u62D2\u636E\u5DE8\u5177\u8DDD\u8E1E\u952F\u4FF1\u53E5\u60E7\u70AC\u5267\u6350\u9E43\u5A1F\u5026\u7737\u5377\u7EE2\u6485\u652B\u6289\u6398\u5014\u7235\u6854\u6770\u6377\u776B\u7AED\u6D01\u7ED3\u89E3\u59D0\u6212\u85C9\u82A5\u754C\u501F\u4ECB\u75A5\u8BEB\u5C4A\u5DFE\u7B4B\u65A4\u91D1\u4ECA\u6D25\u895F\u7D27\u9526\u4EC5\u8C28\u8FDB\u9773\u664B\u7981\u8FD1\u70EC\u6D78\u5C3D\u52B2\u8346\u5162\u89C9\u51B3\u8BC0\u7EDD\u5747\u83CC\u94A7\u519B\u541B\u5CFB\u4FCA\u7AE3\u6D5A\u90E1\u9A8F\u5580\u5496\u5361\u54AF\u5F00\u63E9\u6977\u51EF\u6168\u520A\u582A\u52D8\u574E\u780D\u770B\u5EB7\u6177\u7CE0\u625B\u6297\u4EA2\u7095\u8003\u62F7\u70E4\u9760\u5777\u82DB\u67EF\u68F5\u78D5\u9897\u79D1\u58F3\u54B3\u53EF\u6E34\u514B\u523B\u5BA2\u8BFE\u80AF\u5543\u57A6\u6073\u5751\u542D\u7A7A\u6050\u5B54\u63A7\u62A0\u53E3\u6263\u5BC7\u67AF\u54ED\u7A9F\u82E6\u9177\u5E93\u88E4\u5938\u57AE\u630E\u8DE8\u80EF\u5757\u7B77\u4FA9\u5FEB\u5BBD\u6B3E\u5321\u7B50\u72C2\u6846\u77FF\u7736\u65F7\u51B5\u4E8F\u76D4\u5CBF\u7AA5\u8475\u594E\u9B41\u5080\u9988\u6127\u6E83\u5764\u6606\u6346\u56F0\u62EC\u6269\u5ED3\u9614\u5783\u62C9\u5587\u8721\u814A\u8FA3\u5566\u83B1\u6765\u8D56\u84DD\u5A6A\u680F\u62E6\u7BEE\u9611\u5170\u6F9C\u8C30\u63FD\u89C8\u61D2\u7F06\u70C2\u6EE5\u7405\u6994\u72FC\u5ECA\u90CE\u6717\u6D6A\u635E\u52B3\u7262\u8001\u4F6C\u59E5\u916A\u70D9\u6D9D\u52D2\u4E50\u96F7\u956D\u857E\u78CA\u7D2F\u5121\u5792\u64C2\u808B\u7C7B\u6CEA\u68F1\u695E\u51B7\u5398\u68A8\u7281\u9ECE\u7BF1\u72F8\u79BB\u6F13\u7406\u674E\u91CC\u9CA4\u793C\u8389\u8354\u540F\u6817\u4E3D\u5389\u52B1\u783E\u5386\u5229\u5088\u4F8B\u4FD0\u75E2\u7ACB\u7C92\u6CA5\u96B6\u529B\u7483\u54E9\u4FE9\u8054\u83B2\u8FDE\u9570\u5EC9\u601C\u6D9F\u5E18\u655B\u8138\u94FE\u604B\u70BC\u7EC3\u7CAE\u51C9\u6881\u7CB1\u826F\u4E24\u8F86\u91CF\u667E\u4EAE\u8C05\u64A9\u804A\u50DA\u7597\u71CE\u5BE5\u8FBD\u6F66\u4E86\u6482\u9563\u5ED6\u6599\u5217\u88C2\u70C8\u52A3\u730E\u7433\u6797\u78F7\u9716\u4E34\u90BB\u9CDE\u6DCB\u51DB\u8D41\u541D\u62CE\u73B2\u83F1\u96F6\u9F84\u94C3\u4F36\u7F9A\u51CC\u7075\u9675\u5CAD\u9886\u53E6\u4EE4\u6E9C\u7409\u69B4\u786B\u998F\u7559\u5218\u7624\u6D41\u67F3\u516D\u9F99\u804B\u5499\u7B3C\u7ABF\u9686\u5784\u62E2\u9647\u697C\u5A04\u6402\u7BD3\u6F0F\u964B\u82A6\u5362\u9885\u5E90\u7089\u63B3\u5364\u864F\u9C81\u9E93\u788C\u9732\u8DEF\u8D42\u9E7F\u6F5E\u7984\u5F55\u9646\u622E\u9A74\u5415\u94DD\u4FA3\u65C5\u5C65\u5C61\u7F15\u8651\u6C2F\u5F8B\u7387\u6EE4\u7EFF\u5CE6\u631B\u5B6A\u6EE6\u5375\u4E71\u63A0\u7565\u62A1\u8F6E\u4F26\u4ED1\u6CA6\u7EB6\u8BBA\u841D\u87BA\u7F57\u903B\u9523\u7BA9\u9AA1\u88F8\u843D\u6D1B\u9A86\u7EDC\u5988\u9EBB\u739B\u7801\u8682\u9A6C\u9A82\u561B\u5417\u57CB\u4E70\u9EA6\u5356\u8FC8\u8109\u7792\u9992\u86EE\u6EE1\u8513\u66FC\u6162\u6F2B\u8C29\u8292\u832B\u76F2\u6C13\u5FD9\u83BD\u732B\u8305\u951A\u6BDB\u77DB\u94C6\u536F\u8302\u5192\u5E3D\u8C8C\u8D38\u4E48\u73AB\u679A\u6885\u9176\u9709\u7164\u6CA1\u7709\u5A92\u9541\u6BCF\u7F8E\u6627\u5BD0\u59B9\u5A9A\u95E8\u95F7\u4EEC\u840C\u8499\u6AAC\u76DF\u9530\u731B\u68A6\u5B5F\u772F\u919A\u9761\u7CDC\u8FF7\u8C1C\u5F25\u7C73\u79D8\u89C5\u6CCC\u871C\u5BC6\u5E42\u68C9\u7720\u7EF5\u5195\u514D\u52C9\u5A29\u7F05\u9762\u82D7\u63CF\u7784\u85D0\u79D2\u6E3A\u5E99\u5999\u8511\u706D\u6C11\u62BF\u76BF\u654F\u60AF\u95FD\u660E\u879F\u9E23\u94ED\u540D\u547D\u8C2C\u6478\u6479\u8611\u6A21\u819C\u78E8\u6469\u9B54\u62B9\u672B\u83AB\u58A8\u9ED8\u6CAB\u6F20\u5BDE\u964C\u8C0B\u725F\u67D0\u62C7\u7261\u4EA9\u59C6\u6BCD\u5893\u66AE\u5E55\u52DF\u6155\u6728\u76EE\u7766\u7267\u7A46\u62FF\u54EA\u5450\u94A0\u90A3\u5A1C\u7EB3\u6C16\u4E43\u5976\u8010\u5948\u5357\u7537\u96BE\u56CA\u6320\u8111\u607C\u95F9\u6DD6\u5462\u9981\u5185\u5AE9\u80FD\u59AE\u9713\u502A\u6CE5\u5C3C\u62DF\u4F60\u533F\u817B\u9006\u6EBA\u852B\u62C8\u5E74\u78BE\u64B5\u637B\u5FF5\u5A18\u917F\u9E1F\u5C3F\u634F\u8042\u5B7D\u556E\u954A\u954D\u6D85\u60A8\u67E0\u72DE\u51DD\u5B81\u62E7\u6CDE\u725B\u626D\u94AE\u7EBD\u8113\u6D53\u519C\u5F04\u5974\u52AA\u6012\u5973\u6696\u8650\u759F\u632A\u61E6\u7CEF\u8BFA\u54E6\u6B27\u9E25\u6BB4\u85D5\u5455\u5076\u6CA4\u556A\u8DB4\u722C\u5E15\u6015\u7436\u62CD\u6392\u724C\u5F98\u6E43\u6D3E\u6500\u6F58\u76D8\u78D0\u76FC\u7554\u5224\u53DB\u4E53\u5E9E\u65C1\u802A\u80D6\u629B\u5486\u5228\u70AE\u888D\u8DD1\u6CE1\u5478\u80DA\u57F9\u88F4\u8D54\u966A\u914D\u4F69\u6C9B\u55B7\u76C6\u7830\u62A8\u70F9\u6F8E\u5F6D\u84EC\u68DA\u787C\u7BF7\u81A8\u670B\u9E4F\u6367\u78B0\u576F\u7812\u9739\u6279\u62AB\u5288\u7435\u6BD7\u5564\u813E\u75B2\u76AE\u5339\u75DE\u50FB\u5C41\u8B6C\u7BC7\u504F\u7247\u9A97\u98D8\u6F02\u74E2\u7968\u6487\u77A5\u62FC\u9891\u8D2B\u54C1\u8058\u4E52\u576A\u82F9\u840D\u5E73\u51ED\u74F6\u8BC4\u5C4F\u5761\u6CFC\u9887\u5A46\u7834\u9B44\u8FEB\u7C95\u5256\u6251\u94FA\u4EC6\u8386\u8461\u83E9\u84B2\u57D4\u6734\u5703\u666E\u6D66\u8C31\u66DD\u7011\u671F\u6B3A\u6816\u621A\u59BB\u4E03\u51C4\u6F06\u67D2\u6C8F\u5176\u68CB\u5947\u6B67\u7566\u5D0E\u8110\u9F50\u65D7\u7948\u7941\u9A91\u8D77\u5C82\u4E5E\u4F01\u542F\u5951\u780C\u5668\u6C14\u8FC4\u5F03\u6C7D\u6CE3\u8BAB\u6390\u6D3D\u7275\u6266\u948E\u94C5\u5343\u8FC1\u7B7E\u4EDF\u8C26\u4E7E\u9ED4\u94B1\u94B3\u524D\u6F5C\u9063\u6D45\u8C34\u5811\u5D4C\u6B20\u6B49\u67AA\u545B\u8154\u7F8C\u5899\u8537\u5F3A\u62A2\u6A47\u9539\u6572\u6084\u6865\u77A7\u4E54\u4FA8\u5DE7\u9798\u64AC\u7FD8\u5CED\u4FCF\u7A8D\u5207\u8304\u4E14\u602F\u7A83\u94A6\u4FB5\u4EB2\u79E6\u7434\u52E4\u82B9\u64D2\u79BD\u5BDD\u6C81\u9752\u8F7B\u6C22\u503E\u537F\u6E05\u64CE\u6674\u6C30\u60C5\u9877\u8BF7\u5E86\u743C\u7A77\u79CB\u4E18\u90B1\u7403\u6C42\u56DA\u914B\u6CC5\u8D8B\u533A\u86C6\u66F2\u8EAF\u5C48\u9A71\u6E20\u53D6\u5A36\u9F8B\u8DA3\u53BB\u5708\u98A7\u6743\u919B\u6CC9\u5168\u75CA\u62F3\u72AC\u5238\u529D\u7F3A\u7094\u7638\u5374\u9E4A\u69B7\u786E\u96C0\u88D9\u7FA4\u7136\u71C3\u5189\u67D3\u74E4\u58E4\u6518\u56B7\u8BA9\u9976\u6270\u7ED5\u60F9\u70ED\u58EC\u4EC1\u4EBA\u5FCD\u97E7\u4EFB\u8BA4\u5203\u598A\u7EAB\u6254\u4ECD\u65E5\u620E\u8338\u84C9\u8363\u878D\u7194\u6EB6\u5BB9\u7ED2\u5197\u63C9\u67D4\u8089\u8339\u8815\u5112\u5B7A\u5982\u8FB1\u4E73\u6C5D\u5165\u8925\u8F6F\u962E\u854A\u745E\u9510\u95F0\u6DA6\u82E5\u5F31\u6492\u6D12\u8428\u816E\u9CC3\u585E\u8D5B\u4E09\u53C1\u4F1E\u6563\u6851\u55D3\u4E27\u6414\u9A9A\u626B\u5AC2\u745F\u8272\u6DA9\u68EE\u50E7\u838E\u7802\u6740\u5239\u6C99\u7EB1\u50BB\u5565\u715E\u7B5B\u6652\u73CA\u82EB\u6749\u5C71\u5220\u717D\u886B\u95EA\u9655\u64C5\u8D61\u81B3\u5584\u6C55\u6247\u7F2E\u5892\u4F24\u5546\u8D4F\u664C\u4E0A\u5C1A\u88F3\u68A2\u634E\u7A0D\u70E7\u828D\u52FA\u97F6\u5C11\u54E8\u90B5\u7ECD\u5962\u8D4A\u86C7\u820C\u820D\u8D66\u6444\u5C04\u6151\u6D89\u793E\u8BBE\u7837\u7533\u547B\u4F38\u8EAB\u6DF1\u5A20\u7EC5\u795E\u6C88\u5BA1\u5A76\u751A\u80BE\u614E\u6E17\u58F0\u751F\u7525\u7272\u5347\u7EF3\u7701\u76DB\u5269\u80DC\u5723\u5E08\u5931\u72EE\u65BD\u6E7F\u8BD7\u5C38\u8671\u5341\u77F3\u62FE\u65F6\u4EC0\u98DF\u8680\u5B9E\u8BC6\u53F2\u77E2\u4F7F\u5C4E\u9A76\u59CB\u5F0F\u793A\u58EB\u4E16\u67FF\u4E8B\u62ED\u8A93\u901D\u52BF\u662F\u55DC\u566C\u9002\u4ED5\u4F8D\u91CA\u9970\u6C0F\u5E02\u6043\u5BA4\u89C6\u8BD5\u6536\u624B\u9996\u5B88\u5BFF\u6388\u552E\u53D7\u7626\u517D\u852C\u67A2\u68B3\u6B8A\u6292\u8F93\u53D4\u8212\u6DD1\u758F\u4E66\u8D4E\u5B70\u719F\u85AF\u6691\u66D9\u7F72\u8700\u9ECD\u9F20\u5C5E\u672F\u8FF0\u6811\u675F\u620D\u7AD6\u5885\u5EB6\u6570\u6F31\u6055\u5237\u800D\u6454\u8870\u7529\u5E05\u6813\u62F4\u971C\u53CC\u723D\u8C01\u6C34\u7761\u7A0E\u542E\u77AC\u987A\u821C\u8BF4\u7855\u6714\u70C1\u65AF\u6495\u5636\u601D\u79C1\u53F8\u4E1D\u6B7B\u8086\u5BFA\u55E3\u56DB\u4F3A\u4F3C\u9972\u5DF3\u677E\u8038\u6002\u9882\u9001\u5B8B\u8BBC\u8BF5\u641C\u8258\u64DE\u55FD\u82CF\u9165\u4FD7\u7D20\u901F\u7C9F\u50F3\u5851\u6EAF\u5BBF\u8BC9\u8083\u9178\u849C\u7B97\u867D\u968B\u968F\u7EE5\u9AD3\u788E\u5C81\u7A57\u9042\u96A7\u795F\u5B59\u635F\u7B0B\u84D1\u68AD\u5506\u7F29\u7410\u7D22\u9501\u6240\u584C\u4ED6\u5B83\u5979\u5854\u736D\u631E\u8E4B\u8E0F\u80CE\u82D4\u62AC\u53F0\u6CF0\u915E\u592A\u6001\u6C70\u574D\u644A\u8D2A\u762B\u6EE9\u575B\u6A80\u75F0\u6F6D\u8C2D\u8C08\u5766\u6BEF\u8892\u78B3\u63A2\u53F9\u70AD\u6C64\u5858\u642A\u5802\u68E0\u819B\u5510\u7CD6\u5018\u8EBA\u6DCC\u8D9F\u70EB\u638F\u6D9B\u6ED4\u7EE6\u8404\u6843\u9003\u6DD8\u9676\u8BA8\u5957\u7279\u85E4\u817E\u75BC\u8A8A\u68AF\u5254\u8E22\u9511\u63D0\u9898\u8E44\u557C\u4F53\u66FF\u568F\u60D5\u6D95\u5243\u5C49\u5929\u6DFB\u586B\u7530\u751C\u606C\u8214\u8146\u6311\u6761\u8FE2\u773A\u8DF3\u8D34\u94C1\u5E16\u5385\u542C\u70C3\u6C40\u5EF7\u505C\u4EAD\u5EAD\u633A\u8247\u901A\u6850\u916E\u77B3\u540C\u94DC\u5F64\u7AE5\u6876\u6345\u7B52\u7EDF\u75DB\u5077\u6295\u5934\u900F\u51F8\u79C3\u7A81\u56FE\u5F92\u9014\u6D82\u5C60\u571F\u5410\u5154\u6E4D\u56E2\u63A8\u9893\u817F\u8715\u892A\u9000\u541E\u5C6F\u81C0\u62D6\u6258\u8131\u9E35\u9640\u9A6E\u9A7C\u692D\u59A5\u62D3\u553E\u6316\u54C7\u86D9\u6D3C\u5A03\u74E6\u889C\u6B6A\u5916\u8C4C\u5F2F\u6E7E\u73A9\u987D\u4E38\u70F7\u5B8C\u7897\u633D\u665A\u7696\u60CB\u5B9B\u5A49\u4E07\u8155\u6C6A\u738B\u4EA1\u6789\u7F51\u5F80\u65FA\u671B\u5FD8\u5984\u5A01\u5DCD\u5FAE\u5371\u97E6\u8FDD\u6845\u56F4\u552F\u60DF\u4E3A\u6F4D\u7EF4\u82C7\u840E\u59D4\u4F1F\u4F2A\u5C3E\u7EAC\u672A\u851A\u5473\u754F\u80C3\u5582\u9B4F\u4F4D\u6E2D\u8C13\u5C09\u6170\u536B\u761F\u6E29\u868A\u6587\u95FB\u7EB9\u543B\u7A33\u7D0A\u95EE\u55E1\u7FC1\u74EE\u631D\u8717\u6DA1\u7A9D\u6211\u65A1\u5367\u63E1\u6C83\u5DEB\u545C\u94A8\u4E4C\u6C61\u8BEC\u5C4B\u65E0\u829C\u68A7\u543E\u5434\u6BCB\u6B66\u4E94\u6342\u5348\u821E\u4F0D\u4FAE\u575E\u620A\u96FE\u6664\u7269\u52FF\u52A1\u609F\u8BEF\u6614\u7199\u6790\u897F\u7852\u77FD\u6670\u563B\u5438\u9521\u727A\u7A00\u606F\u5E0C\u6089\u819D\u5915\u60DC\u7184\u70EF\u6EAA\u6C50\u7280\u6A84\u88AD\u5E2D\u4E60\u5AB3\u559C\u94E3\u6D17\u7CFB\u9699\u620F\u7EC6\u778E\u867E\u5323\u971E\u8F96\u6687\u5CE1\u4FA0\u72ED\u4E0B\u53A6\u590F\u5413\u6380\u9528\u5148\u4ED9\u9C9C\u7EA4\u54B8\u8D24\u8854\u8237\u95F2\u6D8E\u5F26\u5ACC\u663E\u9669\u73B0\u732E\u53BF\u817A\u9985\u7FA1\u5BAA\u9677\u9650\u7EBF\u76F8\u53A2\u9576\u9999\u7BB1\u8944\u6E58\u4E61\u7FD4\u7965\u8BE6\u60F3\u54CD\u4EAB\u9879\u5DF7\u6A61\u50CF\u5411\u8C61\u8427\u785D\u9704\u524A\u54EE\u56A3\u9500\u6D88\u5BB5\u6DC6\u6653\u5C0F\u5B5D\u6821\u8096\u5578\u7B11\u6548\u6954\u4E9B\u6B47\u874E\u978B\u534F\u631F\u643A\u90AA\u659C\u80C1\u8C10\u5199\u68B0\u5378\u87F9\u61C8\u6CC4\u6CFB\u8C22\u5C51\u85AA\u82AF\u950C\u6B23\u8F9B\u65B0\u5FFB\u5FC3\u4FE1\u8845\u661F\u8165\u7329\u60FA\u5174\u5211\u578B\u5F62\u90A2\u884C\u9192\u5E78\u674F\u6027\u59D3\u5144\u51F6\u80F8\u5308\u6C79\u96C4\u718A\u4F11\u4FEE\u7F9E\u673D\u55C5\u9508\u79C0\u8896\u7EE3\u589F\u620C\u9700\u865A\u5618\u987B\u5F90\u8BB8\u84C4\u9157\u53D9\u65ED\u5E8F\u755C\u6064\u7D6E\u5A7F\u7EEA\u7EED\u8F69\u55A7\u5BA3\u60AC\u65CB\u7384\u9009\u7663\u7729\u7EDA\u9774\u859B\u5B66\u7A74\u96EA\u8840\u52CB\u718F\u5FAA\u65EC\u8BE2\u5BFB\u9A6F\u5DE1\u6B89\u6C5B\u8BAD\u8BAF\u900A\u8FC5\u538B\u62BC\u9E26\u9E2D\u5440\u4E2B\u82BD\u7259\u869C\u5D16\u8859\u6DAF\u96C5\u54D1\u4E9A\u8BB6\u7109\u54BD\u9609\u70DF\u6DF9\u76D0\u4E25\u7814\u8712\u5CA9\u5EF6\u8A00\u989C\u960E\u708E\u6CBF\u5944\u63A9\u773C\u884D\u6F14\u8273\u5830\u71D5\u538C\u781A\u96C1\u5501\u5F66\u7130\u5BB4\u8C1A\u9A8C\u6B83\u592E\u9E2F\u79E7\u6768\u626C\u4F6F\u75A1\u7F8A\u6D0B\u9633\u6C27\u4EF0\u75D2\u517B\u6837\u6F3E\u9080\u8170\u5996\u7476\u6447\u5C27\u9065\u7A91\u8C23\u59DA\u54AC\u8200\u836F\u8981\u8000\u6930\u564E\u8036\u7237\u91CE\u51B6\u4E5F\u9875\u6396\u4E1A\u53F6\u66F3\u814B\u591C\u6DB2\u4E00\u58F9\u533B\u63D6\u94F1\u4F9D\u4F0A\u8863\u9890\u5937\u9057\u79FB\u4EEA\u80F0\u7591\u6C82\u5B9C\u59E8\u5F5D\u6905\u8681\u501A\u5DF2\u4E59\u77E3\u4EE5\u827A\u6291\u6613\u9091\u5C79\u4EBF\u5F79\u81C6\u9038\u8084\u75AB\u4EA6\u88D4\u610F\u6BC5\u5FC6\u4E49\u76CA\u6EA2\u8BE3\u8BAE\u8C0A\u8BD1\u5F02\u7FFC\u7FCC\u7ECE\u8335\u836B\u56E0\u6BB7\u97F3\u9634\u59FB\u541F\u94F6\u6DEB\u5BC5\u996E\u5C39\u5F15\u9690\u5370\u82F1\u6A31\u5A74\u9E70\u5E94\u7F28\u83B9\u8424\u8425\u8367\u8747\u8FCE\u8D62\u76C8\u5F71\u9896\u786C\u6620\u54DF\u62E5\u4F63\u81C3\u75C8\u5EB8\u96CD\u8E0A\u86F9\u548F\u6CF3\u6D8C\u6C38\u607F\u52C7\u7528\u5E7D\u4F18\u60A0\u5FE7\u5C24\u7531\u90AE\u94C0\u72B9\u6CB9\u6E38\u9149\u6709\u53CB\u53F3\u4F51\u91C9\u8BF1\u53C8\u5E7C\u8FC2\u6DE4\u4E8E\u76C2\u6986\u865E\u611A\u8206\u4F59\u4FDE\u903E\u9C7C\u6109\u6E1D\u6E14\u9685\u4E88\u5A31\u96E8\u4E0E\u5C7F\u79B9\u5B87\u8BED\u7FBD\u7389\u57DF\u828B\u90C1\u5401\u9047\u55BB\u5CEA\u5FA1\u6108\u6B32\u72F1\u80B2\u8A89\u6D74\u5BD3\u88D5\u9884\u8C6B\u9A6D\u9E33\u6E0A\u51A4\u5143\u57A3\u8881\u539F\u63F4\u8F95\u56ED\u5458\u5706\u733F\u6E90\u7F18\u8FDC\u82D1\u613F\u6028\u9662\u66F0\u7EA6\u8D8A\u8DC3\u94A5\u5CB3\u7CA4\u6708\u60A6\u9605\u8018\u4E91\u90E7\u5300\u9668\u5141\u8FD0\u8574\u915D\u6655\u97F5\u5B55\u531D\u7838\u6742\u683D\u54C9\u707E\u5BB0\u8F7D\u518D\u5728\u54B1\u6512\u6682\u8D5E\u8D43\u810F\u846C\u906D\u7CDF\u51FF\u85FB\u67A3\u65E9\u6FA1\u86A4\u8E81\u566A\u9020\u7682\u7076\u71E5\u8D23\u62E9\u5219\u6CFD\u8D3C\u600E\u589E\u618E\u66FE\u8D60\u624E\u55B3\u6E23\u672D\u8F67\u94E1\u95F8\u7728\u6805\u69A8\u548B\u4E4D\u70B8\u8BC8\u6458\u658B\u5B85\u7A84\u503A\u5BE8\u77BB\u6BE1\u8A79\u7C98\u6CBE\u76CF\u65A9\u8F97\u5D2D\u5C55\u8638\u6808\u5360\u6218\u7AD9\u6E5B\u7EFD\u6A1F\u7AE0\u5F70\u6F33\u5F20\u638C\u6DA8\u6756\u4E08\u5E10\u8D26\u4ED7\u80C0\u7634\u969C\u62DB\u662D\u627E\u6CBC\u8D75\u7167\u7F69\u5146\u8087\u53EC\u906E\u6298\u54F2\u86F0\u8F99\u8005\u9517\u8517\u8FD9\u6D59\u73CD\u659F\u771F\u7504\u7827\u81FB\u8D1E\u9488\u4FA6\u6795\u75B9\u8BCA\u9707\u632F\u9547\u9635\u84B8\u6323\u7741\u5F81\u72F0\u4E89\u6014\u6574\u62EF\u6B63\u653F\u5E27\u75C7\u90D1\u8BC1\u829D\u679D\u652F\u5431\u8718\u77E5\u80A2\u8102\u6C41\u4E4B\u7EC7\u804C\u76F4\u690D\u6B96\u6267\u503C\u4F84\u5740\u6307\u6B62\u8DBE\u53EA\u65E8\u7EB8\u5FD7\u631A\u63B7\u81F3\u81F4\u7F6E\u5E1C\u5CD9\u5236\u667A\u79E9\u7A1A\u8D28\u7099\u75D4\u6EDE\u6CBB\u7A92\u4E2D\u76C5\u5FE0\u949F\u8877\u7EC8\u79CD\u80BF\u91CD\u4EF2\u4F17\u821F\u5468\u5DDE\u6D32\u8BCC\u7CA5\u8F74\u8098\u5E1A\u5492\u76B1\u5B99\u663C\u9AA4\u73E0\u682A\u86DB\u6731\u732A\u8BF8\u8BDB\u9010\u7AF9\u70DB\u716E\u62C4\u77A9\u5631\u4E3B\u8457\u67F1\u52A9\u86C0\u8D2E\u94F8\u7B51\u4F4F\u6CE8\u795D\u9A7B\u6293\u722A\u62FD\u4E13\u7816\u8F6C\u64B0\u8D5A\u7BC6\u6869\u5E84\u88C5\u5986\u649E\u58EE\u72B6\u690E\u9525\u8FFD\u8D58\u5760\u7F00\u8C06\u51C6\u6349\u62D9\u5353\u684C\u7422\u8301\u914C\u5544\u7740\u707C\u6D4A\u5179\u54A8\u8D44\u59FF\u6ECB\u6DC4\u5B5C\u7D2B\u4ED4\u7C7D\u6ED3\u5B50\u81EA\u6E0D\u5B57\u9B03\u68D5\u8E2A\u5B97\u7EFC\u603B\u7EB5\u90B9\u8D70\u594F\u63CD\u79DF\u8DB3\u5352\u65CF\u7956\u8BC5\u963B\u7EC4\u94BB\u7E82\u5634\u9189\u6700\u7F6A\u5C0A\u9075\u6628\u5DE6\u4F50\u67DE\u505A\u4F5C\u5750\u5EA7\u9515\u55F3\u5AD2\u7477\u66A7\u972D\u8C19\u94F5\u9E4C\u5AAA\u9A9C\u9CCC\u94AF\u5457\u94A3\u9E28\u9F85\u9E4E\u8D32\u951B\u835C\u54D4\u6ED7\u94CB\u7B5A\u8DF8\u82C4\u7F0F\u7B3E\u9AA0\u98D1\u98D9\u9556\u9573\u9CD4\u50A7\u7F24\u69DF\u6BA1\u8191\u9554\u9ACC\u9B13\u7980\u997D\u94B9\u9E41\u94B8\u9A96\u9EEA\u607B\u9538\u4FAA\u9497\u5181\u8C04\u8C36\u8487\u5FCF\u5A75\u9AA3\u89C7\u7985\u9561\u4F25\u82CC\u6005\u960A\u9CB3\u7817\u4F27\u8C0C\u6987\u789C\u9F80\u67A8\u67FD\u94D6\u94DB\u996C\u9E31\u94F3\u4FE6\u5E31\u96E0\u520D\u7ECC\u8E70\u948F\u6006\u7F0D\u9E51\u8F8D\u9F8A\u9E5A\u82C1\u9AA2\u679E\u8F8F\u64BA\u9509\u9E7E\u54D2\u9791\u9A80\u7ED0\u6B9A\u8D55\u7605\u7BAA\u8C20\u7800\u88C6\u7118\u956B\u7C74\u8BCB\u8C1B\u7EE8\u89CC\u955D\u5DC5\u94BF\u766B\u94EB\u9CB7\u9CBD\u94E4\u94E5\u5CBD\u9E2B\u7AA6\u6E0E\u691F\u724D\u7B03\u9EE9\u7C16\u603C\u9566\u7096\u8DB8\u94CE\u8C14\u57A9\u960F\u8F6D\u9507\u9537\u9E57\u989A\u989B\u9CC4\u8BF6\u8FE9\u94D2\u9E38\u9C95\u94AB\u9C82\u7EEF\u9544\u9CB1\u507E\u6CA3\u51EB\u9A78\u7EC2\u7ECB\u8D59\u9EB8\u9C8B\u9CC6\u9486\u8D45\u5C34\u64C0\u7EC0\u6206\u777E\u8BF0\u7F1F\u9506\u7EA5\u9549\u988D\u4E98\u8D53\u7EE0\u9CA0\u8BDF\u7F11\u89CF\u8BC2\u6BC2\u94B4\u9522\u9E2A\u9E44\u9E58\u9E39\u63B4\u8BD6\u63BC\u9E73\u9CCF\u72B7\u5326\u523F\u59AB\u6867\u9C91\u9CDC\u886E\u7EF2\u9CA7\u57DA\u5459\u5E3C\u6901\u8748\u94EA\u961A\u7ED7\u9889\u704F\u98A2\u8BC3\u9616\u86CE\u9EC9\u8BA7\u836D\u95F3\u9C8E\u6D52\u9E55\u9A85\u6866\u94E7\u5942\u7F33\u953E\u9CA9\u9CC7\u8BD9\u835F\u54D5\u6D4D\u7F0B\u73F2\u6656\u8BE8\u9984\u960D\u94AC\u956C\u8BA6\u8BD8\u8360\u53FD\u54DC\u9AA5\u7391\u89CA\u9F51\u77F6\u7F81\u867F\u8DFB\u9701\u9C9A\u9CAB\u90CF\u6D43\u94D7\u9553\u86F2\u8C0F\u7F23\u620B\u622C\u7751\u9E63\u7B15\u9CA3\u97AF\u7EDB\u7F30\u6322\u5CE4\u9E6A\u9C9B\u7596\u988C\u9C92\u537A\u8369\u9991\u7F19\u8D46\u89D0\u522D\u6CFE\u8FF3\u5F2A\u80EB\u9753\u9604\u9E20\u9E6B\u8BB5\u5C66\u6989\u98D3\u949C\u9514\u7AAD\u9F83\u9529\u954C\u96BD\u8C32\u73CF\u76B2\u5240\u57B2\u5FFE\u607A\u94E0\u9534\u9F9B\u95F6\u94AA\u94D0\u9A92\u7F02\u8F72\u94B6\u951E\u9894\u9F88\u94FF\u55BE\u90D0\u54D9\u810D\u72EF\u9ACB\u8BD3\u8BF3\u909D\u5739\u7EA9\u8D36\u532E\u8489\u6126\u8069\u7BD1\u9603\u951F\u9CB2\u86F4\u5D03\u5F95\u6D9E\u6FD1\u8D49\u7750\u94FC\u765E\u7C41\u5C9A\u6984\u6593\u9567\u8934\u9606\u9512\u5520\u5D02\u94D1\u94F9\u75E8\u9CD3\u8BD4\u7F27\u4FEA\u90E6\u575C\u82C8\u8385\u84E0\u5456\u9026\u9A8A\u7F21\u67A5\u680E\u8F79\u783A\u9502\u9E42\u75A0\u7C9D\u8DDE\u96F3\u9CA1\u9CE2\u8539\u5941\u6F4B\u740F\u6B93\u88E2\u88E3\u9CA2\u9B49\u7F2D\u948C\u9E69\u853A\u5EEA\u6AA9\u8F9A\u8E8F\u7EEB\u68C2\u86CF\u9CAE\u6D4F\u9A9D\u7EFA\u954F\u9E68\u830F\u6CF7\u73D1\u680A\u80E7\u783B\u507B\u848C\u55BD\u5D5D\u9542\u7618\u8027\u877C\u9AC5\u5786\u64B8\u565C\u95FE\u6CF8\u6E0C\u680C\u6A79\u8F73\u8F82\u8F98\u6C07\u80EA\u9E2C\u9E6D\u823B\u9C88\u8114\u5A08\u683E\u9E3E\u92AE\u56F5\u8366\u7321\u6CFA\u6924\u8136\u9559\u6988\u891B\u950A\u5452\u551B\u5B37\u6769\u52A2\u7F26\u9558\u98A1\u9CD7\u9EBD\u626A\u7116\u61D1\u9494\u8288\u8C27\u7315\u7962\u6E11\u817C\u9EFE\u7F08\u7F2A\u95F5\u7F17\u8C1F\u84E6\u998D\u6B81\u9546\u94BC\u94D9\u8BB7\u94CC\u9CB5\u8F87\u9CB6\u8311\u8885\u9667\u8616\u55EB\u989F\u8E51\u82CE\u549B\u804D\u4FAC\u54DD\u9A7D\u9495\u50A9\u8BB4\u6004\u74EF\u8E52\u75B1\u8F94\u7EB0\u7F74\u94CD\u8C1D\u9A88\u7F25\u5AD4\u948B\u9564\u9568\u8572\u9A90\u7EEE\u6864\u789B\u9880\u9883\u9CCD\u4F65\u8368\u60AD\u9A9E\u7F31\u6920\u94A4\u5AF1\u6A2F\u6217\u709D\u9516\u9535\u956A\u7F9F\u8DC4\u8BEE\u8C2F\u835E\u7F32\u7857\u8DF7\u60EC\u9532\u7BA7\u9513\u63FF\u9CAD\u8315\u86F1\u5DEF\u8D47\u866E\u9CC5\u8BCE\u5C96\u9612\u89D1\u9E32\u8BE0\u7EFB\u8F81\u94E8\u9615\u9619\u60AB\u835B\u5A06\u6861\u996A\u8F6B\u5D58\u877E\u7F1B\u94F7\u98A6\u86AC\u98D2\u6BF5\u7CC1\u7F2B\u556C\u94EF\u7A51\u94E9\u9CA8\u917E\u8BAA\u59D7\u9A9F\u9490\u9CDD\u57A7\u6B87\u89DE\u538D\u6EE0\u7572\u8BDC\u8C02\u6E16\u8C25\u57D8\u83B3\u5F11\u8F7C\u8D33\u94C8\u9CA5\u7EF6\u6445\u7EBE\u95E9\u94C4\u53AE\u9A77\u7F0C\u9536\u9E36\u85AE\u998A\u98D5\u953C\u8C21\u7A23\u8C07\u836A\u72F2\u5522\u7743\u95FC\u94CA\u9CCE\u949B\u9C90\u6619\u94BD\u952C\u9878\u50A5\u9967\u94F4\u9557\u97EC\u94FD\u7F07\u9E48\u9617\u7C9C\u9F86\u9CA6\u6078\u94AD\u948D\u629F\u9968\u7BA8\u9F0D\u5A32\u817D\u7EA8\u7EFE\u8F8B\u8BFF\u5E0F\u95F1\u6CA9\u6DA0\u73AE\u97EA\u709C\u9C94\u960C\u83B4\u9F8C\u90AC\u5E91\u6003\u59A9\u9A9B\u9E49\u9E5C\u9969\u960B\u73BA\u89CB\u7856\u82CB\u83B6\u85D3\u5C98\u7303\u5A34\u9E47\u75EB\u869D\u7C7C\u8DF9\u8297\u9977\u9AA7\u7F03\u98E8\u54D3\u6F47\u9A81\u7EE1\u67AD\u7BAB\u4EB5\u64B7\u7EC1\u7F2C\u9649\u8365\u9990\u9E3A\u8BE9\u987C\u8C16\u94C9\u955F\u8C11\u6CF6\u9CD5\u57D9\u6D54\u9C9F\u57AD\u5A05\u6860\u6C29\u53A3\u8D5D\u4FE8\u5156\u8C33\u6079\u95EB\u917D\u9B47\u990D\u9F39\u7080\u8F7A\u9E5E\u9CD0\u9765\u8C12\u90BA\u6654\u70E8\u8BD2\u5453\u5CC4\u9974\u603F\u9A7F\u7F22\u8F76\u8D3B\u9487\u9552\u9571\u7617\u8223\u94DF\u763E\u8314\u83BA\u8426\u84E5\u6484\u5624\u6EE2\u6F46\u748E\u9E66\u763F\u988F\u7F42\u955B\u83B8\u94D5\u9C7F\u4F1B\u4FE3\u8C00\u8C15\u84E3\u5D5B\u996B\u9608\u59AA\u7EA1\u89CE\u6B24\u94B0\u9E46\u9E6C\u9F89\u6A7C\u9E22\u9F0B\u94BA\u90D3\u82B8\u607D\u6120\u7EAD\u97EB\u6B92\u6C32\u74D2\u8DB1\u933E\u9A75\u8D5C\u5567\u5E3B\u7BA6\u8C2E\u7F2F\u8C35\u8BCF\u948A\u8C2A\u8F84\u9E67\u6D48\u7F1C\u6862\u8F78\u8D48\u796F\u9E29\u8BE4\u5CE5\u94B2\u94EE\u7B5D\u9A98\u6809\u6800\u8F75\u8F7E\u8D3D\u9E37\u86F3\u7D77\u8E2C\u8E2F\u89EF\u953A\u7EA3\u7EC9\u4F2B\u69E0\u94E2\u556D\u9994\u989E\u9A93\u7F12\u8BFC\u956F\u8C18\u7F01\u8F8E\u8D40\u7726\u9531\u9F87\u9CBB\u506C\u8BF9\u9A7A\u9CB0\u955E\u7F35\u8E9C\u9CDF\u8BA0\u8C2B\u90C4\u52D0\u51FC\u5742\u5785\u57B4\u57EF\u57DD\u82D8\u836C\u836E\u839C\u83BC\u83F0\u85C1\u63F8\u5412\u5423\u5494\u549D\u54B4\u5658\u567C\u56AF\u5E5E\u5C99\u5D74\u5F77\u5FBC\u72B8\u72CD\u9980\u9987\u9993\u9995\u6123\u61B7\u61D4\u4E2C\u6E86\u6EDF\u6EB7\u6F24\u6F74\u6FB9\u752F\u7E9F\u7ED4\u7EF1\u73C9\u67A7\u684A\u6849\u69D4\u6A65\u8F71\u8F77\u8D4D\u80B7\u80E8\u98DA\u7173\u7145\u7198\u610D\u6DFC\u781C\u78D9\u770D\u949A\u94B7\u94D8\u94DE\u9503\u950D\u950E\u950F\u9518\u951D\u952A\u952B\u953F\u9545\u954E\u9562\u9565\u9569\u9572\u7A06\u9E4B\u9E5B\u9E71\u75AC\u75B4\u75D6\u766F\u88E5\u8941\u8022\u98A5\u87A8\u9EB4\u9C85\u9C86\u9C87\u9C9E\u9CB4\u9CBA\u9CBC\u9CCA\u9CCB\u9CD8\u9CD9\u9792\u97B4\u9F44",TMe="\u554A\u963F\u57C3\u6328\u54CE\u5509\u54C0\u769A\u764C\u85F9\u77EE\u827E\u7919\u611B\u9698\u978D\u6C28\u5B89\u4FFA\u6309\u6697\u5CB8\u80FA\u6848\u9AAF\u6602\u76CE\u51F9\u6556\u71AC\u7FFA\u8956\u50B2\u5967\u61CA\u6FB3\u82AD\u634C\u6252\u53ED\u5427\u7B06\u516B\u75A4\u5DF4\u62D4\u8DCB\u9776\u628A\u8019\u58E9\u9738\u7F77\u7238\u767D\u67CF\u767E\u64FA\u4F70\u6557\u62DC\u7A17\u6591\u73ED\u642C\u6273\u822C\u9812\u677F\u7248\u626E\u62CC\u4F34\u74E3\u534A\u8FA6\u7D46\u90A6\u5E6B\u6886\u699C\u8180\u7D81\u68D2\u78C5\u868C\u938A\u508D\u8B17\u82DE\u80DE\u5305\u8912\u525D\u8584\u96F9\u4FDD\u5821\u98FD\u5BF6\u62B1\u5831\u66B4\u8C79\u9B91\u7206\u676F\u7891\u60B2\u5351\u5317\u8F29\u80CC\u8C9D\u92C7\u500D\u72FD\u5099\u618A\u7119\u88AB\u5954\u82EF\u672C\u7B28\u5D29\u7E43\u752D\u6CF5\u8E66\u8FF8\u903C\u9F3B\u6BD4\u9119\u7B46\u5F7C\u78A7\u84D6\u853D\u7562\u6583\u6BD6\u5E63\u5E87\u75F9\u9589\u655D\u5F0A\u5FC5\u8F9F\u58C1\u81C2\u907F\u965B\u97AD\u908A\u7DE8\u8CB6\u6241\u4FBF\u8B8A\u535E\u8FA8\u8FAF\u8FAE\u904D\u6A19\u5F6A\u8198\u8868\u9C49\u618B\u5225\u765F\u5F6C\u658C\u7015\u6FF1\u8CD3\u64EF\u5175\u51B0\u67C4\u4E19\u79C9\u9905\u70B3\u75C5\u4E26\u73BB\u83E0\u64AD\u64A5\u7F3D\u6CE2\u535A\u52C3\u640F\u9251\u7B94\u4F2F\u5E1B\u8236\u8116\u818A\u6E24\u6CCA\u99C1\u6355\u8514\u54FA\u88DC\u57E0\u4E0D\u5E03\u6B65\u7C3F\u90E8\u6016\u64E6\u731C\u88C1\u6750\u624D\u8CA1\u776C\u8E29\u91C7\u5F69\u83DC\u8521\u9910\u53C3\u8836\u6B98\u615A\u6158\u71E6\u84BC\u8259\u5009\u6EC4\u85CF\u64CD\u7CD9\u69FD\u66F9\u8349\u5EC1\u7B56\u5074\u518A\u6E2C\u5C64\u8E6D\u63D2\u53C9\u832C\u8336\u67E5\u78B4\u643D\u5BDF\u5C94\u5DEE\u8A6B\u62C6\u67F4\u8C7A\u6519\u647B\u87EC\u995E\u8B92\u7E8F\u93DF\u7522\u95E1\u986B\u660C\u7316\u5834\u5617\u5E38\u9577\u511F\u8178\u5EE0\u655E\u66A2\u5531\u5021\u8D85\u6284\u9214\u671D\u5632\u6F6E\u5DE2\u5435\u7092\u8ECA\u626F\u64A4\u63A3\u5FB9\u6F88\u90F4\u81E3\u8FB0\u5875\u6668\u5FF1\u6C88\u9673\u8D81\u896F\u6490\u7A31\u57CE\u6A59\u6210\u5448\u4E58\u7A0B\u61F2\u6F84\u8AA0\u627F\u901E\u9A01\u79E4\u5403\u7661\u6301\u5319\u6C60\u9072\u5F1B\u99B3\u6065\u9F52\u4F88\u5C3A\u8D64\u7FC5\u65A5\u71BE\u5145\u6C96\u87F2\u5D07\u5BF5\u62BD\u916C\u7587\u8E8A\u7A20\u6101\u7C4C\u4EC7\u7DA2\u7785\u919C\u81ED\u521D\u51FA\u6AE5\u5EDA\u8E87\u92E4\u96DB\u6EC1\u9664\u695A\u790E\u5132\u77D7\u6410\u89F8\u8655\u63E3\u5DDD\u7A7F\u693D\u50B3\u8239\u5598\u4E32\u7621\u7A97\u5E62\u5E8A\u95D6\u5275\u5439\u708A\u6376\u9318\u5782\u6625\u693F\u9187\u5507\u6DF3\u7D14\u8822\u6233\u7DBD\u75B5\u8328\u78C1\u96CC\u8FAD\u6148\u74F7\u8A5E\u6B64\u523A\u8CDC\u6B21\u8070\u8525\u56EA\u5306\u5F9E\u53E2\u6E4A\u7C97\u918B\u7C07\u4FC3\u8EA5\u7BE1\u7AC4\u6467\u5D14\u50AC\u8106\u7601\u7CB9\u6DEC\u7FE0\u6751\u5B58\u5BF8\u78CB\u64AE\u6413\u63AA\u632B\u932F\u642D\u9054\u7B54\u7629\u6253\u5927\u5446\u6B79\u50A3\u6234\u5E36\u6B86\u4EE3\u8CB8\u888B\u5F85\u902E\u6020\u803D\u64D4\u4E39\u55AE\u9132\u64A3\u81BD\u65E6\u6C2E\u4F46\u619A\u6DE1\u8A95\u5F48\u86CB\u7576\u64CB\u9EE8\u8569\u6A94\u5200\u6417\u8E48\u5012\u5CF6\u79B1\u5C0E\u5230\u7A3B\u60BC\u9053\u76DC\u5FB7\u5F97\u7684\u8E6C\u71C8\u767B\u7B49\u77AA\u51F3\u9127\u5824\u4F4E\u6EF4\u8FEA\u6575\u7B1B\u72C4\u6ECC\u7FDF\u5AE1\u62B5\u5E95\u5730\u8482\u7B2C\u5E1D\u5F1F\u905E\u7DE0\u985B\u6382\u6EC7\u7898\u9EDE\u5178\u975B\u588A\u96FB\u4F43\u7538\u5E97\u60E6\u5960\u6FB1\u6BBF\u7889\u53FC\u96D5\u96D5\u5201\u6389\u540A\u91E3\u8ABF\u8DCC\u7239\u789F\u8776\u53E0\u8ADC\u758A\u4E01\u76EF\u53EE\u91D8\u9802\u9F0E\u9320\u5B9A\u8A02\u4E1F\u6771\u51AC\u8463\u61C2\u52D5\u68DF\u4F97\u606B\u51CD\u6D1E\u515C\u6296\u9B25\u9661\u8C46\u9017\u75D8\u90FD\u7763\u6BD2\u72A2\u7368\u8B80\u5835\u7779\u8CED\u675C\u934D\u809A\u5EA6\u6E21\u5992\u7AEF\u77ED\u935B\u6BB5\u65B7\u7DDE\u5806\u514C\u968A\u5C0D\u58A9\u5678\u8E72\u6566\u9813\u56E4\u920D\u76FE\u9041\u6387\u54C6\u591A\u596A\u579B\u8EB2\u6735\u8DFA\u8235\u5241\u60F0\u58AE\u86FE\u5CE8\u9D5D\u4FC4\u984D\u8A1B\u5A25\u60E1\u5384\u627C\u904F\u9102\u9913\u6069\u800C\u5152\u8033\u723E\u990C\u6D31\u4E8C\u8CB3\u767C\u7F70\u7B4F\u4F10\u4E4F\u95A5\u6CD5\u743A\u85E9\u5E06\u756A\u7FFB\u6A0A\u792C\u91E9\u7E41\u51E1\u7169\u53CD\u8FD4\u7BC4\u8CA9\u72AF\u98EF\u6CDB\u574A\u82B3\u65B9\u80AA\u623F\u9632\u59A8\u4EFF\u8A2A\u7D21\u653E\u83F2\u975E\u5561\u98DB\u80A5\u532A\u8AB9\u5420\u80BA\u5EE2\u6CB8\u8CBB\u82AC\u915A\u5429\u6C1B\u5206\u7D1B\u58B3\u711A\u6C7E\u7C89\u596E\u4EFD\u5FFF\u61A4\u7CDE\u8C50\u5C01\u6953\u8702\u5CF0\u92D2\u98A8\u760B\u70FD\u9022\u99AE\u7E2B\u8AF7\u5949\u9CF3\u4F5B\u5426\u592B\u6577\u819A\u5B75\u6276\u62C2\u8F3B\u5E45\u6C1F\u7B26\u4F0F\u4FD8\u670D\u6D6E\u6DAA\u798F\u88B1\u5F17\u752B\u64AB\u8F14\u4FEF\u91DC\u65A7\u812F\u8151\u5E9C\u8150\u8D74\u526F\u8986\u8CE6\u5FA9\u5085\u4ED8\u961C\u7236\u8179\u8CA0\u5BCC\u8A03\u9644\u5A66\u7E1B\u5490\u5676\u560E\u8A72\u6539\u6982\u9223\u84CB\u6E89\u5E79\u7518\u687F\u67D1\u7AFF\u809D\u8D95\u611F\u7A08\u6562\u8D1B\u5CA1\u525B\u92FC\u7F38\u809B\u7DB1\u5D17\u6E2F\u6760\u7BD9\u81EF\u9AD8\u818F\u7F94\u7CD5\u641E\u93AC\u7A3F\u544A\u54E5\u6B4C\u64F1\u6208\u9D3F\u80F3\u7599\u5272\u9769\u845B\u683C\u86E4\u95A3\u9694\u927B\u500B\u5404\u7D66\u6839\u8DDF\u8015\u66F4\u5E9A\u7FB9\u57C2\u803F\u6897\u5DE5\u653B\u529F\u606D\u9F94\u4F9B\u8EAC\u516C\u5BAE\u5F13\u978F\u6C5E\u62F1\u8CA2\u5171\u9264\u52FE\u6E9D\u830D\u72D7\u57A2\u69CB\u8CFC\u5920\u8F9C\u83C7\u5495\u7B8D\u4F30\u6CBD\u5B64\u59D1\u9F13\u53E4\u8831\u9AA8\u8C37\u80A1\u6545\u9867\u56FA\u96C7\u522E\u74DC\u526E\u5BE1\u639B\u8902\u4E56\u62D0\u602A\u68FA\u95DC\u5B98\u51A0\u89C0\u7BA1\u9928\u7F50\u6163\u704C\u8CAB\u5149\u5EE3\u901B\u7470\u898F\u572D\u77FD\u6B78\u9F9C\u95A8\u8ECC\u9B3C\u8A6D\u7678\u6842\u6AC3\u8DEA\u8CB4\u528A\u8F25\u6EFE\u68CD\u934B\u90ED\u570B\u679C\u88F9\u904E\u54C8\u9AB8\u5B69\u6D77\u6C26\u4EA5\u5BB3\u99ED\u9163\u61A8\u90AF\u97D3\u542B\u6DB5\u5BD2\u51FD\u558A\u7F55\u7FF0\u64BC\u634D\u65F1\u61BE\u608D\u710A\u6C57\u6F22\u592F\u676D\u822A\u58D5\u568E\u8C6A\u6BEB\u90DD\u597D\u8017\u865F\u6D69\u5475\u559D\u8377\u83CF\u6838\u79BE\u548C\u4F55\u5408\u76D2\u8C89\u95A1\u6CB3\u6DB8\u8D6B\u8910\u9DB4\u8CC0\u563F\u9ED1\u75D5\u5F88\u72E0\u6068\u54FC\u4EA8\u6A6B\u8861\u6052\u8F5F\u54C4\u70D8\u8679\u9D3B\u6D2A\u5B8F\u5F18\u7D05\u5589\u4FAF\u7334\u543C\u539A\u5019\u5F8C\u547C\u4E4E\u5FFD\u745A\u58FA\u846B\u80E1\u8774\u72D0\u7CCA\u6E56\u5F27\u864E\u552C\u8B77\u4E92\u6EEC\u6236\u82B1\u5629\u83EF\u733E\u6ED1\u756B\u5283\u5316\u8A71\u69D0\u5F8A\u61F7\u6DEE\u58DE\u6B61\u74B0\u6853\u9084\u7DE9\u63DB\u60A3\u559A\u7613\u8C62\u7165\u6E19\u5BA6\u5E7B\u8352\u614C\u9EC3\u78FA\u8757\u7C27\u7687\u51F0\u60F6\u714C\u6643\u5E4C\u604D\u8B0A\u7070\u63EE\u8F1D\u5FBD\u6062\u86D4\u56DE\u6BC0\u6094\u6167\u5349\u60E0\u6666\u8CC4\u7A62\u6703\u71F4\u532F\u8AF1\u8AA8\u7E6A\u8477\u660F\u5A5A\u9B42\u6E3E\u6DF7\u8C41\u6D3B\u5925\u706B\u7372\u6216\u60D1\u970D\u8CA8\u798D\u64CA\u573E\u57FA\u6A5F\u7578\u7A3D\u7A4D\u7B95\u808C\u9951\u8DE1\u6FC0\u8B4F\u96DE\u59EC\u7E3E\u7DDD\u5409\u6975\u68D8\u8F2F\u7C4D\u96C6\u53CA\u6025\u75BE\u6C72\u5373\u5AC9\u7D1A\u64E0\u5E7E\u810A\u5DF1\u858A\u6280\u5180\u5B63\u4F0E\u796D\u5291\u60B8\u6FDF\u5BC4\u5BC2\u8A08\u8A18\u65E2\u5FCC\u969B\u7E7C\u7D00\u5609\u67B7\u593E\u4F73\u5BB6\u52A0\u83A2\u9830\u8CC8\u7532\u9240\u5047\u7A3C\u50F9\u67B6\u99D5\u5AC1\u6BB2\u76E3\u5805\u5C16\u7B8B\u9593\u714E\u517C\u80A9\u8271\u5978\u7DD8\u7E6D\u6AA2\u67EC\u583F\u9E7C\u63C0\u64BF\u7C21\u5109\u526A\u6E1B\u85A6\u6ABB\u9452\u8E10\u8CE4\u898B\u9375\u7BAD\u4EF6\u5065\u8266\u528D\u991E\u6F38\u6FFA\u6F97\u5EFA\u50F5\u59DC\u5C07\u6F3F\u6C5F\u7586\u8523\u69F3\u734E\u8B1B\u5320\u91AC\u964D\u8549\u6912\u7901\u7126\u81A0\u4EA4\u90CA\u6F86\u9A55\u5B0C\u56BC\u652A\u9278\u77EF\u50E5\u8173\u72E1\u89D2\u9903\u7E73\u7D5E\u527F\u6559\u9175\u8F4E\u8F03\u53EB\u7A96\u63ED\u63A5\u7686\u7A2D\u8857\u968E\u622A\u52AB\u7BC0\u8396\u775B\u6676\u9BE8\u4EAC\u9A5A\u7CBE\u7CB3\u7D93\u4E95\u8B66\u666F\u9838\u975C\u5883\u656C\u93E1\u5F91\u75D9\u9756\u7ADF\u7AF6\u51C8\u70AF\u7A98\u63EA\u7A76\u7CFE\u7396\u97ED\u4E45\u7078\u4E5D\u9152\u5EC4\u6551\u820A\u81FC\u8205\u548E\u5C31\u759A\u97A0\u62D8\u72D9\u75BD\u5C45\u99D2\u83CA\u5C40\u5480\u77E9\u8209\u6CAE\u805A\u62D2\u64DA\u5DE8\u5177\u8DDD\u8E1E\u92F8\u4FF1\u53E5\u61FC\u70AC\u5287\u6350\u9D51\u5A1F\u5026\u7737\u5377\u7D79\u6485\u652B\u6289\u6398\u5014\u7235\u6854\u5091\u6377\u776B\u7AED\u6F54\u7D50\u89E3\u59D0\u6212\u85C9\u82A5\u754C\u501F\u4ECB\u75A5\u8AA1\u5C46\u5DFE\u7B4B\u65A4\u91D1\u4ECA\u6D25\u895F\u7DCA\u9326\u50C5\u8B39\u9032\u9773\u6649\u7981\u8FD1\u71FC\u6D78\u76E1\u52C1\u834A\u5162\u89BA\u6C7A\u8A23\u7D55\u5747\u83CC\u921E\u8ECD\u541B\u5CFB\u4FCA\u7AE3\u6D5A\u90E1\u99FF\u5580\u5496\u5361\u54AF\u958B\u63E9\u6977\u51F1\u6168\u520A\u582A\u52D8\u574E\u780D\u770B\u5EB7\u6177\u7CE0\u625B\u6297\u4EA2\u7095\u8003\u62F7\u70E4\u9760\u5777\u82DB\u67EF\u68F5\u78D5\u9846\u79D1\u6BBC\u54B3\u53EF\u6E34\u514B\u523B\u5BA2\u8AB2\u80AF\u5543\u58BE\u61C7\u5751\u542D\u7A7A\u6050\u5B54\u63A7\u6473\u53E3\u6263\u5BC7\u67AF\u54ED\u7A9F\u82E6\u9177\u5EAB\u8932\u8A87\u57AE\u630E\u8DE8\u80EF\u584A\u7B77\u5108\u5FEB\u5BEC\u6B3E\u5321\u7B50\u72C2\u6846\u7926\u7736\u66E0\u6CC1\u8667\u76D4\u5DCB\u7ABA\u8475\u594E\u9B41\u5080\u994B\u6127\u6F70\u5764\u6606\u6346\u56F0\u62EC\u64F4\u5ED3\u95CA\u5783\u62C9\u5587\u881F\u81D8\u8FA3\u5566\u840A\u4F86\u8CF4\u85CD\u5A6A\u6B04\u6514\u7C43\u95CC\u862D\u703E\u8B95\u652C\u89BD\u61F6\u7E9C\u721B\u6FEB\u746F\u6994\u72FC\u5ECA\u90CE\u6717\u6D6A\u6488\u52DE\u7262\u8001\u4F6C\u59E5\u916A\u70D9\u6F87\u52D2\u6A02\u96F7\u9433\u857E\u78CA\u7D2F\u5121\u58D8\u64C2\u808B\u985E\u6DDA\u68F1\u695E\u51B7\u5398\u68A8\u7281\u9ECE\u7C6C\u8C8D\u96E2\u6F13\u7406\u674E\u88CF\u9BC9\u79AE\u8389\u8354\u540F\u6817\u9E97\u53B2\u52F5\u792B\u6B77\u5229\u5088\u4F8B\u4FD0\u75E2\u7ACB\u7C92\u701D\u96B8\u529B\u7483\u54E9\u5006\u806F\u84EE\u9023\u942E\u5EC9\u6190\u6F23\u7C3E\u6582\u81C9\u93C8\u6200\u7149\u7DF4\u7CE7\u6DBC\u6881\u7CB1\u826F\u5169\u8F1B\u91CF\u667E\u4EAE\u8AD2\u64A9\u804A\u50DA\u7642\u71CE\u5BE5\u907C\u6F66\u4E86\u6482\u9410\u5ED6\u6599\u5217\u88C2\u70C8\u52A3\u7375\u7433\u6797\u78F7\u9716\u81E8\u9130\u9C57\u6DCB\u51DC\u8CC3\u541D\u62CE\u73B2\u83F1\u96F6\u9F61\u9234\u4F36\u7F9A\u6DE9\u9748\u9675\u5DBA\u9818\u53E6\u4EE4\u6E9C\u7409\u69B4\u786B\u993E\u7559\u5289\u7624\u6D41\u67F3\u516D\u9F8D\u807E\u56A8\u7C60\u7ABF\u9686\u58DF\u650F\u96B4\u6A13\u5A41\u645F\u7C0D\u6F0F\u964B\u8606\u76E7\u9871\u5EEC\u7210\u64C4\u9E75\u865C\u9B6F\u9E93\u788C\u9732\u8DEF\u8CC2\u9E7F\u6F5E\u797F\u9304\u9678\u622E\u9A62\u5442\u92C1\u4FB6\u65C5\u5C65\u5C62\u7E37\u616E\u6C2F\u5F8B\u7387\u6FFE\u7DA0\u5DD2\u6523\u5B7F\u7064\u5375\u4E82\u63A0\u7565\u6384\u8F2A\u502B\u4F96\u6DEA\u7DB8\u8AD6\u863F\u87BA\u7F85\u908F\u947C\u7C6E\u9A3E\u88F8\u843D\u6D1B\u99F1\u7D61\u5ABD\u9EBB\u746A\u78BC\u879E\u99AC\u7F75\u561B\u55CE\u57CB\u8CB7\u9EA5\u8CE3\u9081\u8108\u779E\u9945\u883B\u6EFF\u8513\u66FC\u6162\u6F2B\u8B3E\u8292\u832B\u76F2\u6C13\u5FD9\u83BD\u8C93\u8305\u9328\u6BDB\u77DB\u925A\u536F\u8302\u5192\u5E3D\u8C8C\u8CBF\u9EBD\u73AB\u679A\u6885\u9176\u9EF4\u7164\u6C92\u7709\u5A92\u9382\u6BCF\u7F8E\u6627\u5BD0\u59B9\u5A9A\u9580\u60B6\u5011\u840C\u8499\u6AAC\u76DF\u9333\u731B\u5922\u5B5F\u7787\u919A\u9761\u7CDC\u8FF7\u8B0E\u5F4C\u7C73\u79D8\u8993\u6CCC\u871C\u5BC6\u51AA\u68C9\u7720\u7DBF\u5195\u514D\u52C9\u5A29\u7DEC\u9762\u82D7\u63CF\u7784\u85D0\u79D2\u6E3A\u5EDF\u5999\u8511\u6EC5\u6C11\u62BF\u76BF\u654F\u61AB\u95A9\u660E\u879F\u9CF4\u9298\u540D\u547D\u8B2C\u6478\u6479\u8611\u6A21\u819C\u78E8\u6469\u9B54\u62B9\u672B\u83AB\u58A8\u9ED8\u6CAB\u6F20\u5BDE\u964C\u8B00\u725F\u67D0\u62C7\u7261\u755D\u59C6\u6BCD\u5893\u66AE\u5E55\u52DF\u6155\u6728\u76EE\u7766\u7267\u7A46\u62FF\u54EA\u5436\u9209\u90A3\u5A1C\u7D0D\u6C16\u4E43\u5976\u8010\u5948\u5357\u7537\u96E3\u56CA\u6493\u8166\u60F1\u9B27\u6DD6\u5462\u9912\u5167\u5AE9\u80FD\u59AE\u9713\u502A\u6CE5\u5C3C\u64EC\u59B3\u533F\u81A9\u9006\u6EBA\u852B\u62C8\u5E74\u78BE\u6506\u649A\u5FF5\u5A18\u91C0\u9CE5\u5C3F\u634F\u8076\u5B7D\u5699\u9477\u93B3\u6D85\u60A8\u6AB8\u7370\u51DD\u5BE7\u64F0\u6FD8\u725B\u626D\u9215\u7D10\u81BF\u6FC3\u8FB2\u5F04\u5974\u52AA\u6012\u5973\u6696\u8650\u7627\u632A\u61E6\u7CEF\u8AFE\u54E6\u6B50\u9DD7\u6BC6\u85D5\u5614\u5076\u6F1A\u556A\u8DB4\u722C\u5E15\u6015\u7436\u62CD\u6392\u724C\u5F98\u6E43\u6D3E\u6500\u6F58\u76E4\u78D0\u76FC\u7554\u5224\u53DB\u4E53\u9F90\u65C1\u802A\u80D6\u62CB\u5486\u5228\u70AE\u888D\u8DD1\u6CE1\u5478\u80DA\u57F9\u88F4\u8CE0\u966A\u914D\u4F69\u6C9B\u5674\u76C6\u7830\u62A8\u70F9\u6F8E\u5F6D\u84EC\u68DA\u787C\u7BF7\u81A8\u670B\u9D6C\u6367\u78B0\u576F\u7812\u9739\u6279\u62AB\u5288\u7435\u6BD7\u5564\u813E\u75B2\u76AE\u5339\u75DE\u50FB\u5C41\u8B6C\u7BC7\u504F\u7247\u9A19\u98C4\u6F02\u74E2\u7968\u6487\u77A5\u62FC\u983B\u8CA7\u54C1\u8058\u4E52\u576A\u860B\u840D\u5E73\u6191\u74F6\u8A55\u5C4F\u5761\u6F51\u9817\u5A46\u7834\u9B44\u8FEB\u7C95\u5256\u64B2\u92EA\u4EC6\u8386\u8461\u83E9\u84B2\u57D4\u6A38\u5703\u666E\u6D66\u8B5C\u66DD\u7011\u671F\u6B3A\u68F2\u621A\u59BB\u4E03\u6DD2\u6F06\u67D2\u6C8F\u5176\u68CB\u5947\u6B67\u7566\u5D0E\u81CD\u9F4A\u65D7\u7948\u7941\u9A0E\u8D77\u8C48\u4E5E\u4F01\u555F\u5951\u780C\u5668\u6C23\u8FC4\u68C4\u6C7D\u6CE3\u8A16\u6390\u6D3D\u727D\u6261\u91EC\u925B\u5343\u9077\u7C3D\u4EDF\u8B19\u4E7E\u9ED4\u9322\u9257\u524D\u6F5B\u9063\u6DFA\u8B74\u5879\u5D4C\u6B20\u6B49\u69CD\u55C6\u8154\u7F8C\u58BB\u8594\u5F37\u6436\u6A47\u936C\u6572\u6084\u6A4B\u77A7\u55AC\u50D1\u5DE7\u9798\u64AC\u7FF9\u5CED\u4FCF\u7AC5\u5207\u8304\u4E14\u602F\u7ACA\u6B3D\u4FB5\u89AA\u79E6\u7434\u52E4\u82B9\u64D2\u79BD\u5BE2\u6C81\u9752\u8F15\u6C2B\u50BE\u537F\u6E05\u64CE\u6674\u6C30\u60C5\u9803\u8ACB\u6176\u74CA\u7AAE\u79CB\u4E18\u90B1\u7403\u6C42\u56DA\u914B\u6CC5\u8DA8\u5340\u86C6\u66F2\u8EC0\u5C48\u9A45\u6E20\u53D6\u5A36\u9F72\u8DA3\u53BB\u5708\u9874\u6B0A\u919B\u6CC9\u5168\u75CA\u62F3\u72AC\u5238\u52F8\u7F3A\u7094\u7638\u537B\u9D72\u69B7\u78BA\u96C0\u88D9\u7FA4\u7136\u71C3\u5189\u67D3\u74E4\u58E4\u6518\u56B7\u8B93\u9952\u64FE\u7E5E\u60F9\u71B1\u58EC\u4EC1\u4EBA\u5FCD\u97CC\u4EFB\u8A8D\u5203\u598A\u7D09\u6254\u4ECD\u65E5\u620E\u8338\u84C9\u69AE\u878D\u7194\u6EB6\u5BB9\u7D68\u5197\u63C9\u67D4\u8089\u8339\u8815\u5112\u5B7A\u5982\u8FB1\u4E73\u6C5D\u5165\u8925\u8EDF\u962E\u854A\u745E\u92B3\u958F\u6F64\u82E5\u5F31\u6492\u7051\u85A9\u816E\u9C13\u585E\u8CFD\u4E09\u4E09\u5098\u6563\u6851\u55D3\u55AA\u6414\u9A37\u6383\u5AC2\u745F\u8272\u6F80\u68EE\u50E7\u838E\u7802\u6BBA\u524E\u6C99\u7D17\u50BB\u5565\u715E\u7BE9\u66EC\u73CA\u82EB\u6749\u5C71\u522A\u717D\u886B\u9583\u965C\u64C5\u8D0D\u81B3\u5584\u6C55\u6247\u7E55\u5891\u50B7\u5546\u8CDE\u664C\u4E0A\u5C1A\u88F3\u68A2\u634E\u7A0D\u71D2\u828D\u52FA\u97F6\u5C11\u54E8\u90B5\u7D39\u5962\u8CD2\u86C7\u820C\u820D\u8D66\u651D\u5C04\u61FE\u6D89\u793E\u8A2D\u7837\u7533\u547B\u4F38\u8EAB\u6DF1\u5A20\u7D33\u795E\u6C88\u5BE9\u5B38\u751A\u814E\u614E\u6EF2\u8072\u751F\u7525\u7272\u5347\u7E69\u7701\u76DB\u5269\u52DD\u8056\u5E2B\u5931\u7345\u65BD\u6FD5\u8A69\u5C4D\u8671\u5341\u77F3\u62FE\u6642\u4EC0\u98DF\u8755\u5BE6\u8B58\u53F2\u77E2\u4F7F\u5C4E\u99DB\u59CB\u5F0F\u793A\u58EB\u4E16\u67FF\u4E8B\u62ED\u8A93\u901D\u52E2\u662F\u55DC\u566C\u9069\u4ED5\u4F8D\u91CB\u98FE\u6C0F\u5E02\u6043\u5BA4\u8996\u8A66\u6536\u624B\u9996\u5B88\u58FD\u6388\u552E\u53D7\u7626\u7378\u852C\u6A1E\u68B3\u6B8A\u6292\u8F38\u53D4\u8212\u6DD1\u758F\u66F8\u8D16\u5B70\u719F\u85AF\u6691\u66D9\u7F72\u8700\u9ECD\u9F20\u5C6C\u8853\u8FF0\u6A39\u675F\u620D\u8C4E\u5885\u5EB6\u6578\u6F31\u6055\u5237\u800D\u6454\u8870\u7529\u5E25\u6813\u62F4\u971C\u96D9\u723D\u8AB0\u6C34\u7761\u7A05\u542E\u77AC\u9806\u821C\u8AAA\u78A9\u6714\u720D\u65AF\u6495\u5636\u601D\u79C1\u53F8\u7D72\u6B7B\u8086\u5BFA\u55E3\u56DB\u4F3A\u4F3C\u98FC\u5DF3\u677E\u8073\u616B\u980C\u9001\u5B8B\u8A1F\u8AA6\u641C\u8258\u64FB\u55FD\u8607\u9165\u4FD7\u7D20\u901F\u7C9F\u50F3\u5851\u6EAF\u5BBF\u8A34\u8085\u9178\u849C\u7B97\u96D6\u968B\u96A8\u7D8F\u9AD3\u788E\u6B72\u7A57\u9042\u96A7\u795F\u5B6B\u640D\u7B4D\u84D1\u68AD\u5506\u7E2E\u7463\u7D22\u9396\u6240\u584C\u4ED6\u5B83\u5979\u5854\u737A\u64BB\u8E4B\u8E0F\u80CE\u82D4\u64E1\u81FA\u6CF0\u915E\u592A\u614B\u6C70\u574D\u6524\u8CAA\u7671\u7058\u58C7\u6A80\u75F0\u6F6D\u8B5A\u8AC7\u5766\u6BEF\u8892\u78B3\u63A2\u5606\u70AD\u6E6F\u5858\u642A\u5802\u68E0\u819B\u5510\u7CD6\u5018\u8EBA\u6DCC\u8D9F\u71D9\u638F\u6FE4\u6ED4\u7D73\u8404\u6843\u9003\u6DD8\u9676\u8A0E\u5957\u7279\u85E4\u9A30\u75BC\u8B04\u68AF\u5254\u8E22\u92BB\u63D0\u984C\u8E44\u557C\u9AD4\u66FF\u568F\u60D5\u6D95\u5243\u5C5C\u5929\u6DFB\u586B\u7530\u751C\u606C\u8214\u8146\u6311\u689D\u8FE2\u773A\u8DF3\u8CBC\u9435\u5E16\u5EF3\u807D\u70F4\u6C40\u5EF7\u505C\u4EAD\u5EAD\u633A\u8247\u901A\u6850\u916E\u77B3\u540C\u9285\u5F64\u7AE5\u6876\u6345\u7B52\u7D71\u75DB\u5077\u6295\u982D\u900F\u51F8\u79BF\u7A81\u5716\u5F92\u9014\u5857\u5C60\u571F\u5410\u5154\u6E4D\u5718\u63A8\u9839\u817F\u86FB\u892A\u9000\u541E\u5C6F\u81C0\u62D6\u6258\u812B\u9D15\u9640\u99B1\u99DD\u6A62\u59A5\u62D3\u553E\u6316\u54C7\u86D9\u7AAA\u5A03\u74E6\u896A\u6B6A\u5916\u8C4C\u5F4E\u7063\u73A9\u9811\u4E38\u70F7\u5B8C\u7897\u633D\u665A\u7696\u60CB\u5B9B\u5A49\u842C\u8155\u6C6A\u738B\u4EA1\u6789\u7DB2\u5F80\u65FA\u671B\u5FD8\u5984\u5A01\u5DCD\u5FAE\u5371\u97CB\u9055\u6845\u570D\u552F\u60DF\u70BA\u6FF0\u7DAD\u8466\u840E\u59D4\u5049\u507D\u5C3E\u7DEF\u672A\u851A\u5473\u754F\u80C3\u9935\u9B4F\u4F4D\u6E2D\u8B02\u5C09\u6170\u885B\u761F\u6EAB\u868A\u6587\u805E\u7D0B\u543B\u7A69\u7D0A\u554F\u55E1\u7FC1\u7515\u64BE\u8778\u6E26\u7AA9\u6211\u65A1\u81E5\u63E1\u6C83\u5DEB\u55DA\u93A2\u70CF\u6C59\u8AA3\u5C4B\u7121\u856A\u68A7\u543E\u5433\u6BCB\u6B66\u4E94\u6342\u5348\u821E\u4F0D\u4FAE\u5862\u620A\u9727\u6664\u7269\u52FF\u52D9\u609F\u8AA4\u6614\u7199\u6790\u897F\u7852\u77FD\u6670\u563B\u5438\u932B\u72A7\u7A00\u606F\u5E0C\u6089\u819D\u5915\u60DC\u7184\u70EF\u6EAA\u6C50\u7280\u6A84\u8972\u5E2D\u7FD2\u5AB3\u559C\u9291\u6D17\u7CFB\u9699\u6232\u7D30\u778E\u8766\u5323\u971E\u8F44\u6687\u5CFD\u4FE0\u72F9\u4E0B\u5EC8\u590F\u5687\u6380\u9341\u5148\u4ED9\u9BAE\u7E96\u9E79\u8CE2\u929C\u8237\u9591\u6D8E\u5F26\u5ACC\u986F\u96AA\u73FE\u737B\u7E23\u817A\u9921\u7FA8\u61B2\u9677\u9650\u7DDA\u76F8\u5EC2\u9472\u9999\u7BB1\u8944\u6E58\u9109\u7FD4\u7965\u8A73\u60F3\u97FF\u4EAB\u9805\u5DF7\u6A61\u50CF\u5411\u8C61\u856D\u785D\u9704\u524A\u54EE\u56C2\u92B7\u6D88\u5BB5\u6DC6\u66C9\u5C0F\u5B5D\u6821\u8096\u562F\u7B11\u6548\u6954\u4E9B\u6B47\u880D\u978B\u5354\u633E\u651C\u90AA\u659C\u8105\u8AE7\u5BEB\u68B0\u5378\u87F9\u61C8\u6CC4\u7009\u8B1D\u5C51\u85AA\u82AF\u92C5\u6B23\u8F9B\u65B0\u5FFB\u5FC3\u4FE1\u91C1\u661F\u8165\u7329\u60FA\u8208\u5211\u578B\u5F62\u90A2\u884C\u9192\u5E78\u674F\u6027\u59D3\u5144\u5147\u80F8\u5308\u6D36\u96C4\u718A\u4F11\u4FEE\u7F9E\u673D\u55C5\u92B9\u79C0\u8896\u7E61\u589F\u620C\u9700\u865B\u5653\u9808\u5F90\u8A31\u84C4\u9157\u6558\u65ED\u5E8F\u755C\u6064\u7D6E\u5A7F\u7DD2\u7E8C\u8ED2\u55A7\u5BA3\u61F8\u65CB\u7384\u9078\u766C\u7729\u7D62\u9774\u859B\u5B78\u7A74\u96EA\u8840\u52DB\u718F\u5FAA\u65EC\u8A62\u5C0B\u99B4\u5DE1\u6B89\u6C5B\u8A13\u8A0A\u905C\u8FC5\u58D3\u62BC\u9D09\u9D28\u5440\u4E2B\u82BD\u7259\u869C\u5D16\u8859\u6DAF\u96C5\u555E\u4E9E\u8A1D\u7109\u54BD\u95B9\u7159\u6DF9\u9E7D\u56B4\u7814\u8712\u5DD6\u5EF6\u8A00\u984F\u95BB\u708E\u6CBF\u5944\u63A9\u773C\u884D\u6F14\u8277\u5830\u71D5\u53AD\u786F\u96C1\u5501\u5F65\u7130\u5BB4\u8AFA\u9A57\u6B83\u592E\u9D26\u79E7\u694A\u63DA\u4F6F\u760D\u7F8A\u6D0B\u967D\u6C27\u4EF0\u7662\u990A\u6A23\u6F3E\u9080\u8170\u5996\u7464\u6416\u582F\u9059\u7AAF\u8B20\u59DA\u54AC\u8200\u85E5\u8981\u8000\u6930\u564E\u8036\u723A\u91CE\u51B6\u4E5F\u9801\u6396\u696D\u8449\u66F3\u814B\u591C\u6DB2\u58F9\u58F9\u91AB\u63D6\u92A5\u4F9D\u4F0A\u8863\u9824\u5937\u907A\u79FB\u5100\u80F0\u7591\u6C82\u5B9C\u59E8\u5F5C\u6905\u87FB\u501A\u5DF2\u4E59\u77E3\u4EE5\u85DD\u6291\u6613\u9091\u5C79\u5104\u5F79\u81C6\u9038\u8084\u75AB\u4EA6\u88D4\u610F\u6BC5\u61B6\u7FA9\u76CA\u6EA2\u8A63\u8B70\u8ABC\u8B6F\u7570\u7FFC\u7FCC\u7E79\u8335\u852D\u56E0\u6BB7\u97F3\u9670\u59FB\u541F\u9280\u6DEB\u5BC5\u98F2\u5C39\u5F15\u96B1\u5370\u82F1\u6AFB\u5B30\u9DF9\u61C9\u7E93\u7469\u87A2\u71DF\u7192\u8805\u8FCE\u8D0F\u76C8\u5F71\u7A4E\u786C\u6620\u55B2\u64C1\u50AD\u81C3\u7670\u5EB8\u96CD\u8E34\u86F9\u8A60\u6CF3\u6E67\u6C38\u607F\u52C7\u7528\u5E7D\u512A\u60A0\u6182\u5C24\u7531\u90F5\u923E\u7336\u6CB9\u904A\u9149\u6709\u53CB\u53F3\u4F51\u91C9\u8A98\u53C8\u5E7C\u8FC2\u6DE4\u65BC\u76C2\u6986\u865E\u611A\u8F3F\u4F59\u4FDE\u903E\u9B5A\u6109\u6E1D\u6F01\u9685\u4E88\u5A1B\u96E8\u8207\u5DBC\u79B9\u5B87\u8A9E\u7FBD\u7389\u57DF\u828B\u90C1\u7C72\u9047\u55BB\u5CEA\u79A6\u6108\u6B32\u7344\u80B2\u8B7D\u6D74\u5BD3\u88D5\u9810\u8C6B\u99AD\u9D1B\u6DF5\u51A4\u5143\u57A3\u8881\u539F\u63F4\u8F45\u5712\u54E1\u5713\u733F\u6E90\u7DE3\u9060\u82D1\u9858\u6028\u9662\u66F0\u7D04\u8D8A\u8E8D\u9470\u5DBD\u7CB5\u6708\u6085\u95B1\u8018\u96F2\u9116\u52FB\u9695\u5141\u904B\u860A\u919E\u6688\u97FB\u5B55\u531D\u7838\u96DC\u683D\u54C9\u707D\u5BB0\u8F09\u518D\u5728\u54B1\u6522\u66AB\u8D0A\u8D13\u81DF\u846C\u906D\u7CDF\u947F\u85FB\u68D7\u65E9\u6FA1\u86A4\u8E81\u566A\u9020\u7682\u7AC8\u71E5\u8CAC\u64C7\u5247\u6FA4\u8CCA\u600E\u589E\u618E\u66FE\u8D08\u7D2E\u55B3\u6E23\u5284\u8ECB\u9358\u9598\u7728\u67F5\u69A8\u548B\u4E4D\u70B8\u8A50\u6458\u9F4B\u5B85\u7A84\u50B5\u5BE8\u77BB\u6C08\u8A79\u7C98\u6CBE\u76DE\u65AC\u8F3E\u5D84\u5C55\u8638\u68E7\u5360\u6230\u7AD9\u6E5B\u7DBB\u6A1F\u7AE0\u5F70\u6F33\u5F35\u638C\u6F32\u6756\u4E08\u5E33\u8CEC\u4ED7\u8139\u7634\u969C\u62DB\u662D\u627E\u6CBC\u8D99\u7167\u7F69\u5146\u8087\u53EC\u906E\u6298\u54F2\u87C4\u8F4D\u8005\u937A\u8517\u9019\u6D59\u73CD\u659F\u771F\u7504\u7827\u81FB\u8C9E\u91DD\u5075\u6795\u75B9\u8A3A\u9707\u632F\u93AE\u9663\u84B8\u6399\u775C\u5F81\u7319\u722D\u6014\u6574\u62EF\u6B63\u653F\u5E40\u7665\u912D\u8B49\u829D\u679D\u652F\u5431\u8718\u77E5\u80A2\u8102\u6C41\u4E4B\u7E54\u8077\u76F4\u690D\u6B96\u57F7\u503C\u4F84\u5740\u6307\u6B62\u8DBE\u53EA\u65E8\u7D19\u8A8C\u646F\u64F2\u81F3\u81F4\u7F6E\u5E5F\u5CD9\u5236\u667A\u79E9\u7A1A\u8CEA\u7099\u75D4\u6EEF\u6CBB\u7A92\u4E2D\u76C5\u5FE0\u9418\u8877\u7D42\u7A2E\u816B\u91CD\u4EF2\u773E\u821F\u5468\u5DDE\u6D32\u8B05\u7CA5\u8EF8\u8098\u5E1A\u5492\u76BA\u5B99\u665D\u9A5F\u73E0\u682A\u86DB\u6731\u8C6C\u8AF8\u8A85\u9010\u7AF9\u71ED\u716E\u62C4\u77DA\u56D1\u4E3B\u8457\u67F1\u52A9\u86C0\u8CAF\u9444\u7BC9\u4F4F\u8A3B\u795D\u99D0\u6293\u722A\u62FD\u5C08\u78DA\u8F49\u64B0\u8CFA\u7BC6\u6A01\u838A\u88DD\u599D\u649E\u58EF\u72C0\u690E\u9310\u8FFD\u8D05\u589C\u7DB4\u8AC4\u6E96\u6349\u62D9\u5353\u684C\u7422\u8301\u914C\u5544\u8457\u707C\u6FC1\u8332\u54A8\u8CC7\u59FF\u6ECB\u6DC4\u5B5C\u7D2B\u4ED4\u7C7D\u6ED3\u5B50\u81EA\u6F2C\u5B57\u9B03\u68D5\u8E64\u5B97\u7D9C\u7E3D\u7E31\u9112\u8D70\u594F\u63CD\u79DF\u8DB3\u5352\u65CF\u7956\u8A5B\u963B\u7D44\u9246\u7E82\u5634\u9189\u6700\u7F6A\u5C0A\u9075\u6628\u5DE6\u4F50\u67DE\u505A\u4F5C\u5750\u5EA7\u9312\u566F\u5B21\u74A6\u66D6\u9744\u8AF3\u92A8\u9D6A\u5ABC\u9A41\u9C32\u9200\u5504\u9211\u9D07\u9F59\u9D6F\u8CC1\u931B\u84FD\u55F6\u6F77\u924D\u7BF3\u8E55\u8290\u7DF6\u7C69\u9A43\u98AE\u98C6\u93E2\u9463\u9C3E\u5110\u7E7D\u6AB3\u6BAF\u81CF\u944C\u9AD5\u9B22\u7A1F\u9911\u9238\u9D53\u923D\u9A42\u9EF2\u60FB\u9364\u5115\u91F5\u56C5\u8AC2\u8B96\u8546\u61FA\u5B0B\u9A4F\u8998\u79AA\u9414\u5000\u8407\u60B5\u95B6\u9BE7\u7868\u5096\u8AF6\u6AEC\u78E3\u9F54\u68D6\u6A89\u92EE\u943A\u98ED\u9D1F\u9283\u5114\u5E6C\u8B8E\u82BB\u7D40\u8E95\u91E7\u6134\u7D9E\u9D89\u8F1F\u9F6A\u9DBF\u84EF\u9A44\u6A05\u8F33\u651B\u92BC\u9E7A\u5660\u97C3\u99D8\u7D3F\u6BAB\u8CE7\u7649\u7C1E\u8B9C\u78AD\u8960\u71FE\u9419\u7CF4\u8A46\u8AE6\u7D88\u89BF\u93D1\u5DD4\u923F\u7672\u929A\u9BDB\u9C08\u92CC\u92A9\u5D20\u9D87\u7AC7\u7006\u6ADD\u7258\u7BE4\u9EF7\u7C6A\u61DF\u9413\u71C9\u8E89\u9438\u8AE4\u580A\u95BC\u8EDB\u92E8\u9354\u9D9A\u984E\u9853\u9C77\u8A92\u9087\u927A\u9D2F\u9B9E\u9201\u9B74\u7DCB\u9428\u9BE1\u50E8\u7043\u9CE7\u99D9\u7D31\u7D3C\u8CFB\u9EA9\u9B92\u9C12\u91D3\u8CC5\u5C37\u641F\u7D3A\u6207\u776A\u8AA5\u7E1E\u92EF\u7D07\u9398\u6F41\u4E99\u8CE1\u7D86\u9BC1\u8A6C\u7DF1\u89AF\u8A41\u8F42\u9237\u932E\u9D23\u9D60\u9DBB\u9D30\u6451\u8A7F\u645C\u9E1B\u9C25\u7377\u532D\u528C\u5AAF\u6A9C\u9BAD\u9C56\u889E\u7DC4\u9BC0\u581D\u54BC\u5E57\u69E8\u87C8\u927F\u95DE\u7D4E\u9821\u705D\u9865\u8A36\u95D4\u8823\u9ECC\u8A0C\u8452\u958E\u9C5F\u6EF8\u9D98\u9A4A\u6A3A\u93F5\u5950\u7E6F\u9370\u9BC7\u9C09\u8A7C\u8588\u5666\u6FAE\u7E62\u743F\u6689\u8AE2\u991B\u95BD\u9225\u944A\u8A10\u8A70\u85BA\u5630\u568C\u9A65\u74A3\u89AC\u9F4F\u78EF\u7F88\u8806\u8E8B\u973D\u9C6D\u9BFD\u90DF\u6D79\u92CF\u93B5\u87EF\u8AEB\u7E11\u6214\u6229\u77BC\u9DBC\u7B67\u9C39\u97C9\u7D73\u97C1\u649F\u5DA0\u9DE6\u9BAB\u7664\u981C\u9B9A\u5DF9\u85CE\u9949\u7E09\u8D10\u89B2\u5244\u6D87\u9015\u5F33\u811B\u975A\u9B2E\u9CE9\u9DF2\u8A4E\u5C68\u6AF8\u98B6\u9245\u92E6\u7AB6\u9F5F\u9308\u942B\u96CB\u8B4E\u73A8\u76B8\u5274\u584F\u613E\u6137\u93A7\u9347\u9F95\u958C\u9227\u92AC\u9A0D\u7DD9\u8EFB\u9233\u9301\u9837\u9F66\u93D7\u56B3\u9136\u5672\u81BE\u736A\u9AD6\u8A86\u8A91\u913A\u58D9\u7E8A\u8CBA\u5331\u8562\u6192\u8075\u7C23\u95AB\u9315\u9BE4\u8810\u5D0D\u5FA0\u6DF6\u7028\u8CDA\u775E\u9338\u7669\u7C5F\u5D50\u6B16\u6595\u946D\u8964\u95AC\u92C3\u562E\u5D97\u92A0\u9412\u7646\u9C33\u8A84\u7E32\u5137\u9148\u58E2\u85F6\u849E\u863A\u56A6\u9090\u9A6A\u7E2D\u6AEA\u6ADF\u8F62\u792A\u92F0\u9E1D\u7658\u7CF2\u8E92\u9742\u9C7A\u9C67\u861E\u5969\u7032\u7489\u6BAE\u8933\u895D\u9C31\u9B4E\u7E5A\u91D5\u9DEF\u85FA\u5EE9\u6A81\u8F54\u8EAA\u7DBE\u6B1E\u87F6\u9BEA\u700F\u9A2E\u7DB9\u93A6\u9DDA\u8622\u7027\u74CF\u6AF3\u6727\u7931\u50C2\u851E\u560D\u5D81\u93E4\u763A\u802C\u87BB\u9ACF\u58DA\u64FC\u5695\u95AD\u7018\u6DE5\u6AE8\u6AD3\u8F64\u8F05\u8F46\u6C0C\u81DA\u9E15\u9DFA\u826B\u9C78\u81E0\u5B4C\u6B12\u9E1E\u947E\u5707\u7296\u7380\u6FFC\u6B0F\u8161\u93CD\u6ADA\u8938\u92DD\u5638\u561C\u5B24\u69AA\u52F1\u7E35\u93DD\u9859\u9C3B\u9EBC\u636B\u71DC\u61E3\u9346\u7F8B\u8B10\u737C\u79B0\u6FA0\u9766\u9EFD\u7DF2\u7E46\u9594\u7DE1\u8B28\u9A40\u9943\u6B7F\u93CC\u926C\u9403\u8A25\u922E\u9BE2\u8F26\u9BF0\u8526\u88CA\u9689\u8617\u56C1\u9862\u8EA1\u82E7\u5680\u8079\u5102\u5665\u99D1\u91F9\u513A\u8B33\u616A\u750C\u8E63\u76B0\u8F61\u7D15\u7F86\u9239\u8ADE\u99E2\u7E39\u5B2A\u91D9\u93F7\u9420\u8604\u9A0F\u7DBA\u69BF\u78E7\u980E\u980F\u9C2D\u50C9\u8541\u6173\u9A2B\u7E7E\u69E7\u9210\u5B19\u6AA3\u6227\u7197\u9306\u93D8\u93F9\u7FA5\u8E4C\u8A9A\u8B59\u854E\u7E70\u78FD\u8E7A\u611C\u9365\u7BCB\u92DF\u64B3\u9BD6\u7162\u86FA\u5DF0\u8CD5\u87E3\u9C0D\u8A58\u5D87\u95C3\u89B7\u9D1D\u8A6E\u7DA3\u8F07\u9293\u95CB\u95D5\u6128\u8558\u5B08\u6A48\u98EA\u8ED4\u5DB8\u8811\u7E1F\u92A3\u9870\u8706\u98AF\u6BFF\u7CDD\u7E45\u55C7\u92AB\u7A61\u93A9\u9BCA\u91C3\u8A15\u59CD\u9A38\u91E4\u9C54\u5770\u6BA4\u89F4\u5399\u7044\u756C\u8A75\u8AD7\u700B\u8B1A\u5852\u8494\u5F12\u8EFE\u8CB0\u9230\u9C23\u7DAC\u6504\u7D13\u9582\u9460\u5EDD\u99DF\u7DE6\u9376\u9DE5\u85EA\u993F\u98BC\u93AA\u8B16\u7A4C\u8AB6\u84C0\u733B\u55E9\u8127\u95E5\u9248\u9C28\u9226\u9B90\u66C7\u926D\u931F\u9807\u513B\u9933\u940B\u93DC\u97DC\u92F1\u7DF9\u9D5C\u95D0\u7CF6\u9F60\u9C37\u615F\u9204\u91F7\u6476\u98E9\u7C5C\u9F09\u5AA7\u8183\u7D08\u7DB0\u8F1E\u8AC9\u5E43\u95C8\u6E88\u6F7F\u744B\u97D9\u7152\u9BAA\u95BF\u8435\u9F77\u9114\u5EE1\u61AE\u5AF5\u9A16\u9D61\u9DA9\u993C\u9B29\u74BD\u89A1\u7864\u83A7\u859F\u861A\u5CF4\u736B\u5AFB\u9DF4\u7647\u8814\u79C8\u8E9A\u858C\u9909\u9A64\u7DD7\u9957\u5635\u701F\u9A4D\u7D83\u689F\u7C2B\u893B\u64F7\u7D32\u7E88\u9658\u6ECE\u9948\u9D42\u8A61\u980A\u8AFC\u9249\u93C7\u8B14\u6FA9\u9C48\u5864\u6F6F\u9C58\u57E1\u5A6D\u690F\u6C2C\u53B4\u8D17\u513C\u5157\u8B9E\u61E8\u9586\u91C5\u9B58\u995C\u9F34\u716C\u8EFA\u9DC2\u9C29\u9768\u8B01\u9134\u66C4\u71C1\u8A52\u56C8\u5DA7\u98F4\u61CC\u9A5B\u7E0A\u8EFC\u8CBD\u91D4\u93B0\u943F\u761E\u8264\u92A6\u766E\u584B\u9DAF\u7E08\u93A3\u6516\u56B6\u7005\u7020\u74D4\u9E1A\u766D\u9826\u7F4C\u93DE\u8555\u92AA\u9B77\u50B4\u4FC1\u8ADB\u8AED\u8577\u5D33\u98EB\u95BE\u5AD7\u7D06\u89A6\u6B5F\u923A\u9D52\u9DF8\u9F6C\u6ADE\u9CF6\u9EFF\u925E\u9106\u8553\u60F2\u614D\u7D1C\u97DE\u6B9E\u6C33\u74DA\u8DB2\u93E8\u99D4\u8CFE\u5616\u5E58\u7C00\u8B56\u7E52\u8B6B\u8A54\u91D7\u8B2B\u8F12\u9DD3\u6E5E\u7E1D\u6968\u8EEB\u8CD1\u798E\u9D06\u8ACD\u5D22\u9266\u931A\u7B8F\u9A2D\u6ADB\u6894\u8EF9\u8F0A\u8D04\u9DD9\u8784\u7E36\u8E93\u8E91\u89F6\u937E\u7D02\u7E10\u4F47\u6AE7\u9296\u56C0\u994C\u9873\u9A05\u7E0B\u8AD1\u9432\u8AEE\u7DC7\u8F1C\u8CB2\u7725\u9319\u9F5C\u9BD4\u50AF\u8ACF\u9A36\u9BEB\u93C3\u7E98\u8EA6\u9C52\u8A01\u8B7E\u90E4\u731B\u6C39\u962A\u58DF\u5816\u57B5\u588A\u6ABE\u8552\u8464\u84E7\u8493\u83C7\u69C1\u6463\u54A4\u551A\u54E2\u565D\u5645\u6485\u5288\u8B14\u8946\u5DB4\u810A\u4EFF\u50E5\u7341\u9E85\u9918\u9937\u994A\u9962\u695E\u6035\u61CD\u723F\u6F35\u7069\u6DF7\u6FEB\u7026\u6DE1\u5BE7\u7CF8\u7D5D\u7DD4\u7449\u6898\u68EC\u6848\u6A70\u6AEB\u8EF2\u8EE4\u8CEB\u8181\u8156\u98C8\u7CCA\u7146\u6E9C\u6E63\u6E3A\u78B8\u6EFE\u7798\u9208\u9255\u92E3\u92B1\u92E5\u92F6\u9426\u9427\u9369\u9340\u9343\u9307\u9384\u9387\u93BF\u941D\u9465\u9479\u9454\u7A6D\u9D93\u9DA5\u9E0C\u7667\u5C59\u7602\u81D2\u8947\u7E48\u802E\u986C\u87CE\u9EAF\u9B81\u9B83\u9B8E\u9BD7\u9BDD\u9BF4\u9C5D\u9BFF\u9C20\u9C35\u9C45\u97BD\u97DD\u9F47";function EMe(t){return e2t.charAt(TMe.indexOf(t.charAt(0)))}var C1r=new RegExp("[\u4E00-\u9FA5]+");function bMe(t){return TMe.includes(t)}var hi=class{static GetBytes(r){switch(typeof r){case"string":{let e=new Uint16Array(r.length);for(let i=0;i4294967295?function(e){return e[0]=r,new Uint8Array(e.buffer)}(new Float64Array(1)):function(e){return e[0]=r,new Uint8Array(e.buffer)}(new Int32Array(1)):function(e){return e[0]=r,new Uint8Array(e.buffer)}(new Float64Array(1));case"boolean":return function(e){return e[0]=Number(r),e}(new Uint8Array(1));default:if(r instanceof Array){let e=[];for(let a=0;ar.length&&(i-=e);let n="";for(let s=0;sr.length&&(i-=e);let n=new Uint8Array(i);for(let s=0;s1&&(s.push(a.slice()),a=[]);break;case 3:c++,i/=e[c];break;case 4:c++,i*=e[c];break;case 5:if(o.length===4)throw"The position stack is only four locations deep";o.push(n);break;case 6:n=o.pop(),a.length>1&&(s.push(a.slice()),a=[]),l&&a.push(n.clone());break;case 7:{let h=0,p,d=i*r.baseUp,f=n.clone();switch(a.length>1&&(s.push(a.slice()),a=[]),r.type){case 0:c++,h=e[c];break;case 1:c++,h=e[c],h==0&&(c++,h=hi.ToUInt16(new Uint8Array([e[c++],e[c++]]),0),f.x=e[c++]*i,f.y=e[c++]*i,d=e[c]*i);break;case 2:c+=2,h=hi.ToUInt16(new Uint8Array([e[c-1],e[c]]),0);break;default:break}h!==0&&(p=r.getGraphicTextShape(h,d,f),p&&(s.push(...p.polyLines.slice()),n=p.lastPoint.clone()))}break;case 8:{let h=new le;h.x=hi.byteTosbyte(e[++c]),h.y=hi.byteTosbyte(e[++c]),n.add(h.multiplyScalar(i)),l&&a.push(n.clone())}break;case 9:for(;;){let p=new le;if(p.x=hi.byteTosbyte(e[++c]),p.y=hi.byteTosbyte(e[++c]),p.x==0&&p.y==0)break;n.add(p.multiplyScalar(i)),l&&a.push(n.clone())}break;case 10:{let h=e[++c]*i,p=hi.byteTosbyte(e[++c]),d=(p&112)>>4,f=p&7;f==0&&(f=8);let m=Math.PI/4,g=m*f,y=jf.CICLESPAN;p<0&&(y=-y,g=-g);let E=m*d,b=E+g,x=n.clone().sub(new le(Math.cos(E)*h,Math.sin(E)*h));if(n=x.clone().add(new le(Math.cos(b)*h,Math.sin(b)*h)),l){let S=E,D=!0;for(;D&&(S+=y,p>=0&&Sb);)a.push(x.clone().add(new le(h*Math.cos(S),h*Math.sin(S))));a.push(n.clone())}}break;case 11:{let h=e[++c],p=e[++c],d=e[++c],f=e[++c],m=(d*255+f)*i,g=hi.byteTosbyte(e[++c]),y=(g&112)>>4,E=g&7;E==0&&(E=8),p!=0&&E--;let b=Math.PI/4,x=b*E,S=jf.CICLESPAN,D=1;g<0&&(S=-S,x=-x,D=-1);let P=b*y,_=P+x;P+=b*h/256*D,_+=b*p/256*D;let w=n.clone().sub(new le(m*Math.cos(P),m*Math.sin(P)));if(n=w.clone().add(new le(m*Math.cos(_),m*Math.sin(_))),l){let F=P,X=!0;for(;X&&(F+=S,g>0&&F<_||g<0&&F>_);)a.push(w.clone().add(new le(m*Math.cos(F),m*Math.sin(F))));a.push(n.clone())}}break;case 12:{let h=new le;h.x=hi.byteTosbyte(e[++c])*i,h.y=hi.byteTosbyte(e[++c])*i;let p=hi.byteTosbyte(e[++c]);p<-127&&(p=-127),l&&(p==0?a.push(n.clone().add(h)):a.push(jf._generateArcPoints(n,h,p/127))),n.add(h)}break;case 13:for(;;){let p=new le;if(p.x=hi.byteTosbyte(e[++c])*i,p.y=hi.byteTosbyte(e[++c])*i,p.x==0&&p.y==0)break;let d=hi.byteTosbyte(e[++c]);d<-127&&(d=-127),l&&(d==0?a.push(n.clone().add(p)):a.push(jf._generateArcPoints(n.clone(),p,d/127))),n.add(p)}break;case 14:c=jf.skipCode(r,e,++c);break;default:if(u>15){let h=(u&240)>>4,p=u&15,d=new le;switch(p){case 0:d.x=1;break;case 1:d.x=1,d.y=.5;break;case 2:d.x=1,d.y=1;break;case 3:d.x=.5,d.y=1;break;case 4:d.y=1;break;case 5:d.x=-.5,d.y=1;break;case 6:d.x=-1,d.y=1;break;case 7:d.x=-1,d.y=.5;break;case 8:d.x=-1;break;case 9:d.x=-1,d.y=-.5;break;case 10:d.x=-1,d.y=-1;break;case 11:d.x=-.5,d.y=-1;break;case 12:d.y=-1;break;case 13:d.x=.5,d.y=-1;break;case 14:d.x=1,d.y=-1;break;case 15:d.x=1,d.y=-.5;break}n.add(d.multiplyScalar(h*i)),l&&a.push(n.clone())}break}}return new nd(n,s)}static skipCode(r,e,i){switch(e[i]){case 0:break;case 1:break;case 2:break;case 3:case 4:i++;break;case 5:break;case 6:break;case 7:switch(r.type){case 0:i++;break;case 1:i++,e[i]==0&&(i+=6);break;case 2:i+=2;break}break;case 8:i+=2;break;case 9:for(;;){let a=e[++i],o=e[++i];if(a==0&&o==0)break}break;case 10:i+=2;break;case 11:i+=5;break;case 12:i+=3;break;case 13:for(;;){let a=e[++i],o=e[++i];if(a==0&&o==0)break;let l=e[++i]}break;case 14:break;default:break}return i}static _generateArcPoints(r,e,i){let n=r.clone().add(e),s=i<0,a=!1;i=Math.abs(i);let o=e.length()/2,l=o*i,c=2*Math.atan(1/i),u=new le(e.y,-e.x);u.normalize(),u.multiplyScalar(l);let h=Math.abs(o/Math.sin(c/2)),p=r.add(e.divideScalar(2));a!==s?p.add(u):p.sub(u);let d=r.sub(p),f=n.sub(p),m=Math.atan2(d.y,d.x),g=Math.atan2(f.y,f.x),y=jf.CICLESPAN;s?(y=-y,mg&&(m-=2*Math.PI);let E=m,b=!0;for(;b;){if(E+=y,!s&&Eg)return p.add(new le(h*Math.cos(E),h*Math.sin(E)));break}return n}},Xl=jf;Xl.stopFlag="0x00",Xl.FILE_STOP_FLAG=["\r",` -`,""],Xl.CICLESPAN=Math.PI/18;var rO={130:[[[5,0],[5,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]]],131:[[[3,0],[7,0]],[[5,0],[5,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]]],132:[[[3,0],[7,0]],[[4,0],[4,9.5]],[[6,0],[6,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]]],133:[[[3,0],[7,0]],[[4,0],[4,9.5]],[[6,0],[6,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]],[[3,9.5],[7,9.5]]],134:[[[3,0],[7,0]],[[5,0],[5,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]],[[12,10],[9,10],[9,6]],[[9,8],[11,8]]],135:[[[3,0],[7,0]],[[4,0],[4,9.5]],[[6,0],[6,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]],[[12,10],[9,10],[9,6]],[[9,8],[11,8]]],136:[[[3,0],[7,0]],[[4,0],[4,9.5]],[[6,0],[6,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]],[[3,9.5],[7,9.5]],[[12,10],[9,10],[9,6]],[[9,8],[11,8]]],178:[[[1.142,9.285],[1.142,9.428],[1.285,9.714],[1.428,9.857],[1.714,10],[2.285,10],[2.571,9.857],[2.714,9.714],[2.857,9.428],[2.857,9.142],[2.714,8.857],[2.428,8.428],[1,7],[3,7]]],8960:[[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]],[[0,0],[8,8]]],20393:[[[0,0],[0,6.666]],[[0,4.761],[1.428,6.19],[2.38,6.666],[3.809,6.666],[4.761,6.19],[5.238,4.761],[5.238,0]],[[5.238,4.761],[6.666,6.19],[7.619,6.666],[9.047,6.666],[10,6.19],[10.476,4.761],[10.476,0]],[[11.142,9.285],[11.142,9.428],[11.285,9.714],[11.428,9.857],[11.714,10],[12.285,10],[12.571,9.857],[12.714,9.714],[12.857,9.428],[12.857,9.142],[12.714,8.857],[12.428,8.428],[11,7],[13,7]]],41123:[],55714:[[[2,5.9],[2.6,6.1],[3.4,7],[3.4,1]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],55970:[[[2.3,5.6],[2.3,5.9],[2.6,6.4],[2.9,6.7],[3.4,7],[4.6,7],[5.1,6.7],[5.4,6.4],[5.7,5.9],[5.7,5.3],[5.4,4.7],[4.9,3.9],[2,1],[6,1]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],56226:[[[2.6,7],[5.7,7],[4,4.7],[4.9,4.7],[5.4,4.4],[5.7,4.1],[6,3.3],[6,2.7],[5.7,1.9],[5.1,1.3],[4.3,1],[3.4,1],[2.6,1.3],[2.3,1.6],[2,2.1]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],56482:[[[4.9,7],[2,3],[6.3,3]],[[4.9,7],[4.9,1]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],56738:[[[5.4,7],[2.6,7],[2.3,4.4],[2.6,4.7],[3.4,5],[4.3,5],[5.1,4.7],[5.7,4.1],[6,3.3],[6,2.7],[5.7,1.9],[5.1,1.3],[4.3,1],[3.4,1],[2.6,1.3],[2.3,1.6],[2,2.1]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],56994:[[[5.4,6.1],[5.1,6.7],[4.3,7],[3.7,7],[2.9,6.7],[2.3,5.9],[2,4.4],[2,3],[2.3,1.9],[2.9,1.3],[3.7,1],[4,1],[4.9,1.3],[5.4,1.9],[5.7,2.7],[5.7,3],[5.4,3.9],[4.9,4.4],[4,4.7],[3.7,4.7],[2.9,4.4],[2.3,3.9],[2,3]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],57250:[[[2,7],[6,7],[3.1,1]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],57506:[[[3.4,7],[2.6,6.7],[2.3,6.1],[2.3,5.6],[2.6,5],[3.1,4.7],[4.3,4.4],[5.1,4.1],[5.7,3.6],[6,3],[6,2.1],[5.7,1.6],[5.4,1.3],[4.6,1],[3.4,1],[2.6,1.3],[2.3,1.6],[2,2.1],[2,3],[2.3,3.6],[2.9,4.1],[3.7,4.4],[4.9,4.7],[5.4,5],[5.7,5.6],[5.7,6.1],[5.4,6.7],[4.6,7],[3.4,7]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],57762:[[[5.7,5],[5.4,4.1],[4.9,3.6],[4,3.3],[3.7,3.3],[2.9,3.6],[2.3,4.1],[2,5],[2,5.3],[2.3,6.1],[2.9,6.7],[3.7,7],[4,7],[4.9,6.7],[5.4,6.1],[5.7,5],[5.7,3.6],[5.4,2.1],[4.9,1.3],[4,1],[3.4,1],[2.6,1.3],[2.3,1.9]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],60070:[[[0,6],[10,6],[10,4]]],60326:[[[0,7],[0,5],[10,5]]]};var iO=new Qi,Wf=class{constructor(r){this.type=1;this.info="";this.orientation=0;this.baseUp=0;this.baseDown=0;this.fileHeader="";this.fileVersion="";this.datas={};this.graphicData=new Map;this.url=r}getGraphicDataByCode(r,e){if(r===0)return;let i=this.datas;if(!this.graphicData.has(r))if(i[r]){let n=i[r],s=eO/this.baseUp,a=Xl.parserCode(this,n,s);this.graphicData.set(r,a)}else{if(rO[r]){let n=[];for(let o=0;onew le(l[0],l[1])));let s=new nd(new le,n),a=e/eO;return iO.identity().scale(a,a),s.transform(iO)}return}if(this.graphicData.has(r)){let n=e/eO;return iO.identity().scale(n,n),this.graphicData.get(r).transform(iO)}}getGraphicTextShape(r,e,i){var n;return(n=this.getGraphicDataByCode(r,e))==null?void 0:n.offset(i)}getFontFile(){return{url:this.url,type:this.type,datas:this.datas,info:this.info,orientation:this.orientation,baseUp:this.baseUp,baseDown:this.baseDown,fileHeader:this.fileHeader,fileVersion:this.fileVersion}}setFontFile(r){this.url=r.url,this.type=r.type,this.datas=r.datas,this.info=r.info,this.orientation=r.orientation,this.baseUp=r.baseUp,this.baseDown=r.baseDown,this.fileHeader=r.fileHeader,this.fileVersion=r.fileVersion}releaseFontData(){this.datas={},this.graphicData.clear()}setFontDataToIndexedDb(){return ot(this,null,function*(){let r=this.getFontFile();return new Promise((e,i)=>{lh.instance().save(r,()=>{console.log(`[FontFile] Saved '${this.url}' (${this.fileHeader}) to indexedDb`),e()},n=>i(`[FontFile] Failed to save '${this.url}' (${this.fileHeader}) to indexedDb! ${n}`))})})}getFontDataByIndexedDb(){return ot(this,null,function*(){return new Promise((r,e)=>{lh.instance().query(this.url,i=>{r(i)},()=>e("[FontFile] Failed to get FontData from IndexedDB"))})})}};var fS=class extends Wf{constructor(e){super(e);this.isExtend=!1;this.type=1}init(e){hi.ToInt16(e.readBytes(2),0);let i=hi.ToInt16(e.readBytes(2),0),n=hi.ToInt16(e.readBytes(2),0);for(let u=0;u>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r+=String.fromCharCode(i);break;case 12:case 13:n=t[e++],r+=String.fromCharCode((i&31)<<6|n&63);break;case 14:n=t[e++],s=t[e++],r+=String.fromCharCode((i&15)<<12|(n&63)<<6|(s&63)<<0);break}return r}var mS=class extends Wf{constructor(e){super(e);this.type=0}init(e){e.readBytes(2),e.readBytes(2);let i=hi.ToInt16(e.readBytes(2),0),n=[];for(let c=0;co){d?(p+=E.width+a,d=!1):(d=!0,p=0,h-=s+n),nO.set(p,h);let b=E.offset(nO);c.push(b),!d&&(p+=E.width+a)}else{nO.set(p,h);let b=E.offset(nO);c.push(b),p+=E.width+a}}d=!1,p=0,h-=s+n}return c}getNotFoundTextShape(e){let i=Xl.getCode("\uFF1F");return this.getGraphicDataByCode(i,e)}generateShapes(e,i=sO.DEFAULT_SIZE,n=0,s=0,a=0){return this.getGraphicData(e,i,n,s,a)}addUnsupportedChar(e){this.unsupportedChars[e]||(this.unsupportedChars[e]=0),this.unsupportedChars[e]++}static checkFontIsLoaded(e){return ot(this,null,function*(){let i=!1,n=yield lh.instance().queryAll();if(n.length!==e.length)return!1;for(let s=0;si.setFontDataToIndexedDb());return yield Promise.all(e).then(()=>{ne.debug("[ShxFont] Saves font data to IndexDB")})})}getFontData(){return ot(this,null,function*(){let e=yield lh.instance().queryAll(),i=[],n=new Map;for(let s=0;s{let o=this.parse(a);e&&e(o)}).catch(a=>{n&&n(a)})}loadFile(r,e){return ot(this,null,function*(){return new Promise((n,s)=>{let a=new ci(this.manager);a.setResponseType("arraybuffer"),a.load(r,o=>{n({url:r,arrayBuffer:o})},e,o=>{s(o)})})})}loadAsync(r,e){return ot(this,null,function*(){return Array.isArray(r)||(r=[r]),(yield Xc.checkFontIsLoaded(r))?Promise.resolve(new Xc):new Promise((n,s)=>{this.load(r,n,e,s)})})}parse(r){return new Xc(r)}static isShxFile(r){var e;return((e=r.split(".").pop())==null?void 0:e.toLowerCase())==="shx"}};var qf=new A(1,0,0),O8=new A(0,1,0),aO=new A(0,0,1),xMe=new A(0,0,0),Yf=0,i2t="CONTINUOUS",P8=new Vn({color:Yf}),Pa=new Tr({color:Yf}),vS=new or({color:Yf}),IMe=new Ue;var N8=new Ue,$c=new Ue,ps=new A,yS=new A,TS=new le,SMe=new Or,n2t=t=>t.viewDirectionFromTarget!==void 0,s2t=t=>{if(t){let r=t.match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(r&&r.length>0){let e=r[1],i=t.replace("data:"+e+";","").split(",");if(i&&i.length===2&&i[0]==="base64"){let n=i[1];return HRe.decode(n)}}}return null},KT={Math:{}};KT.Math.angle2=function(t,r){let e=new le(t.x,t.y),i=new le(r.x,r.y);return i.sub(e),i.normalize(),i.y<0?-Math.acos(i.x):Math.acos(i.x)};KT.Math.polar=function(t,r,e){return{x:t.x+r*Math.cos(e),y:t.y+r*Math.sin(e)}};var a2t=(t,r,e,i)=>{let n=t?new le(t.x,t.y):new le(0,0),s=r?new le(r.x,r.y):new le(1,0);e=e||1;let a=4*Math.atan(e),o=n.distanceTo(s)/2/Math.sin(a/2),l=KT.Math.polar(t,o,KT.Math.angle2(n,s)+(Math.PI/2-a/2));i=i||Math.max(Math.abs(Math.ceil(a/(Math.PI/18))),6);let c=KT.Math.angle2(l,n),u=a/i,h=[];h.push(new A(n.x,n.y,0));for(let p=1;p<=i-1;p++){let d=KT.Math.polar(l,Math.abs(o),c+u*p);h.push(new A(d.x,d.y,0))}return h},o2t=(t,r,e,i=t.length*2,n)=>{let s=[],a=t.map(o=>[o.x,o.y]);for(let o=0;o<1;o+=1/i){let l=S8(o,r,a,e,n);s.push(new A(l[0],l[1],0))}return s},L8=(t,r=!1)=>{let e=[],i=t.length;for(let n=0;n{let r=[];return t.faceA&&r.push(t.faceA),t.faceB&&r.push(t.faceB),t.faceC&&r.push(t.faceC),t.faceD&&r.push(t.faceD),r},c2t=t=>{let r=[],e=[];t.forEach(n=>{n.polyfaceMeshVertex&&(n.threeDPolylineMesh?r.push(new A(n.x,n.y,n.z)):e.push(l2t(n)))});let i=[];for(let n=0;n=r.length||c<0){o=!1;break}a.push(r[c])}!o||a.length===0||(a.push(a[0]),i.push(a))}return i},Ri=class extends li{constructor(e=!1,i=!0){super();this.timer=Date.now();this.ignorePaperSpace=!1;this.angBase=0;this.angDir=0;this.header=void 0;this.pointsMaterials={};this.lineBasicMaterials={};this.lineShaderMaterials={};this.meshBasicMaterials={};this.meshTextureMaterials={};this.hatchShaderMaterials=[];this.entityCount=0;this.curveCount=0;this.averageCurveSize=0;this.enableRenderOrder=!1;this.enableLocalCache=!0;this.enableReleaseData=!0;this.enableMerge=!0;this.enableSimplify=!0;this.enableRTC=!0;this.enableWidthLine=!1;this.dxfDataId=void 0;this.compareContext=void 0;this.statsInfo={unsupportedEntity:{},unsupportedEntityTypes:{},unsupportedTextStyles:{},unsupportedHatchPatterns:{},invisibleEntities:{},ignoredFrozenLayersAndEntityCount:{},ignoredInserts:{},entityTypesAndMeshCount:{},ignoredPaperSpaceEntityTypesAndCount:{},rebasedEntityCount:0};this.blockReferencesCache={};this.blockRecordsCache=void 0;this.entitiesCache=void 0;this.blocksCache=void 0;this.dictionaryOwnerHandleAndSpatialFilterHandlesCache=void 0;this.spatialFiltersCache=void 0;this.entityThreejsCache=void 0;this.entityTypesAndTimes=void 0;this.nonSnapableTypes=new Set(["ATTDEF","ATTRIB","LEADER","MTEXT","MULTILEADER","OLE2FRAME","TEXT"]);this.entityHandlesWithRenderOrder={};this.addViewport=(e,i)=>{if(e.type==="VIEWPORT"){i[e.ownerHandle]||(i[e.ownerHandle]=[]);let n=e;i[e.ownerHandle].push(n)}};Ri.abortJobs=!1,this.ignorePaperSpace=e,this.enableLocalCache=i,this.pointsMaterials[Yf]=P8,this.lineBasicMaterials[Yf]=Pa,this.meshBasicMaterials[Yf]=vS}setFont(e){return this.font=e,this}download(e,i){return ot(this,null,function*(){let n=s2t(e);if(!n){let s=Date.now(),a=new ci(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),n=yield a.loadAsync(e,i),ne.info(`[DxfLoader] ${e} dxf file downloaded in ${(Date.now()-s)/1e3}s`)}return n})}load(e,i,n){return ot(this,null,function*(){return this.enableLocalCache&&i&&(i=i.trim()).length>0&&(this.dxfDataId=i),this.loadAsync(e,n)})}loadAsync(e,i){return ot(this,null,function*(){let n=(u,h,p)=>{let d=u.loaded*100/u.total;d=d*(p-h)/100+h,i&&i(new ProgressEvent(u.type,{loaded:d,total:100}))},s=u=>n(u,0,50),a=u=>n(u,50,100),o=u=>n(u,10,100);if(this.enableLocalCache&&this.dxfDataId){let u;try{if(this.timer=Date.now(),u=yield this.getDxfDataFromIndexedDb(this.dxfDataId),u){ne.info(`[DxfLoader] Loaded DxfData from indexedDb in ${(Date.now()-this.timer)/1e3}s`);let h=yield this.loadEntities(u,o);return Promise.resolve(h)}}catch(h){ne.warn("[DxfLoader] Failed to parse data from indexedDb",h)}}let l=yield this.parse(e,s);return yield this.loadEntities(l,a)})}parse(e,i){return ot(this,null,function*(){let n=c=>{i&&i(new ProgressEvent("",{loaded:c,total:100}))},s=(c,u,h)=>{let p=c.loaded*100/c.total;p=p*(h-u)/100+u,p>h&&(ne.warn("[DxfLoader] Invalid ProgressEvent:",c),p=h),i&&i(new ProgressEvent(c.type,{loaded:p,total:100}))},a=c=>s(c,0,40),o=yield this.download(e,a);if(!o)return Promise.reject(`[DxfLoader] Failed to download ${e}`);if(Ri.abortJobs)return Promise.reject("[DXFLoader] Job aborted");this.timer=Date.now(),ne.info("[DxfLoader] Start parsing...");let l=new x0().parseSync(o);if(n(80),ne.info(`[DxfLoader] Parsed in ${(Date.now()-this.timer)/1e3}s, creating entities...`),Ri.abortJobs)return Promise.reject("[DXFLoader] Job aborted");if(l&&(l.objects.LAYOUT||(ne.warn("[DxfLoader] No layout defined! Will add a default 'Model' layout!"),l.objects.LAYOUT=[{layoutName:Ri.MODEL_LAYOUT_NAME}]),this.enableLocalCache&&this.dxfDataId)){let c=Date.now();try{yield this.setDxfDataToIndexedDb(this.dxfDataId,l),ne.info(`[DxfLoader] Saved to indexedDb in ${(Date.now()-c)/1e3}s`)}catch(u){ne.warn(`[DxfLoader] Failed to save '${this.dxfDataId}' to indexedDb!`,u)}}return n(100),l})}parseHeader(e){if(!e){ne.error("[DxfLoader]: Invalid header!");return}this.header=e;let i=e.$ACADVER.toString();i!=="AC1032"&&ne.warn(`[DxfLoader] Unexpected version: ${i}. But we'll try to continue.`),this.angBase=e.$ANGBASE||0,this.angDir=e.$ANGDIR||0}loadEntities(e,i){return ot(this,null,function*(){let n=Date.now();this.parseHeader(e.header),this.enableRenderOrder&&(this.initRenderOrderInfo(e),this.enableMerge=!1);let s=0,a=e.entities.length;this.entityCount=a,Object.keys(e.blocks).forEach(x=>{var S;this.entityCount+=((S=e.blocks[x].entities)==null?void 0:S.length)||0});let o=Math.round(Math.pow(a,.5)),l=Date.now(),c=x=>ot(this,null,function*(){if(i&&(x%o===0||x===a-1)){i(new ProgressEvent("parseProgress",{loaded:x+1,total:a}));let S=500,D=Date.now();(D-l>S||x===a-1)&&(yield bs.sleep(0),l=D)}}),u={};e.objects.LAYOUT.forEach(x=>{let S=x;u[S.layoutName]=S});let h={},p=x=>{let S=x.userData.layerName,D=h[S];D||(D=[],h[S]=D),D.push(x)},d={},f={},m=new hr;Qr.setSharedVariablesOfObject(m);for(let x=0;xH.name===_);w||(w=new hr,Qr.setSharedVariablesOfObject(w),w.name=_,w.userData.isLayoutLevelObject=!0,m.add(w)),s++,f[_]||(f[_]={object:w,layerObjects:{}});let F=f[_],X;if(_!==Ri.MODEL_LAYOUT_NAME){let H=u[_];H.directAssociatedLeafObjectSet||(H.directAssociatedLeafObjectSet=new Set),X=H.directAssociatedLeafObjectSet}if(this.enableMerge&&D.geometry){Qr.setSharedVariablesOfObject(D);let H=D.userData.layerName;this.getLayerVisible(e,H)===!1&&(D.visible=!1),F.layerObjects[H]||(F.layerObjects[H]=[]),F.layerObjects[H].push(D)}else w.add(D),D.traverse(H=>{if(Qr.setSharedVariablesOfObject(H),H.geometry){let he=H.userData.layerName;this.getLayerVisible(e,he)===!1&&(H.visible=!1),p(H),X&&X.add(H)}});yield c(x)}e.objects.LAYOUT.forEach(x=>{let S=x,D=S.layoutName;if(this.ignorePaperSpace&&D!==Ri.MODEL_LAYOUT_NAME)return;let P=S.associatedBlockName,_=e.blocks[P];_&&this.drawLayout(_,e,S,m,h,d)}),ne.debug(`[DxfLoader] Drew entities in ${(Date.now()-n)/1e3}s`);for(let x in f){let S=f[x],D=S.object,P;if(x!==Ri.MODEL_LAYOUT_NAME){let _=u[x];_.directAssociatedLeafObjectSet||(_.directAssociatedLeafObjectSet=new Set),P=_.directAssociatedLeafObjectSet}for(let _ in S.layerObjects){let w=S.layerObjects[_],F=ji.deepMerge(w,void 0,!1,!1,!0),X=F.added,H=F.removed;if(H.length!==w.length){let he=H;H.length>=100&&(he=new Set(H));let C=N=>Array.isArray(he)?he.indexOf(N)>=0:he.has(N);for(let N=0,k=w.length;N{y+=x}),this.enableRTC&&ne.debug(`[DxfLoader] Totally rebased ${this.statsInfo.rebasedEntityCount}(out of ${y}) entities`),this.enableMerge){let x=ji.mergeInfo;ne.debug(`[DxfLoader] Inner merged ${x.removedObjects} objects to ${x.mergedMeshes} meshes, ${x.mergedLines} lines, ${x.mergedPoints} points, ${x.mergedUnknownTypeObjects?x.mergedUnknownTypeObjects+" unknown type,":""} in ${x.elapsedTime/1e3}s`)}let E=(x,S,...D)=>{Object.keys(S).length>0};E("[DxfLoader] Unsupported entity types and count:",this.statsInfo.unsupportedEntityTypes),E("[DxfLoader] Unsupported text style names and count:",this.statsInfo.unsupportedTextStyles),E("[DxfLoader] Unsupported hatch pattern names and count:",this.statsInfo.unsupportedHatchPatterns,". Filling in solid lines instead."),E("[DxfLoader] Ignored invisible entity types and count:",this.statsInfo.invisibleEntities),E("[DxfLoader] Ignored frozen layers and entity count:",this.statsInfo.ignoredFrozenLayersAndEntityCount),E("[DxfLoader] Ignored inserts and count (may because they don't contain anything):",this.statsInfo.ignoredInserts),this.ignorePaperSpace&&E("[DxfLoader] Ignored paper space entity count:",this.statsInfo.ignoredPaperSpaceEntityTypesAndCount),this.font.unsupportedChars&&E("[DxfLoader] Unsupported chars and count:",this.font.unsupportedChars),this.enableReleaseData&&(this.releaseCachedData(),this.releaseDxfData(e)),ne.info(`[DxfLoader] loadEntities() done in ${(Date.now()-n)/1e3}s`);let b=Mn(Ur({},e),{threejsObject:m,layersAndThreejsObjects:h,loadedEntityCount:s,layoutViewportsMap:d});return Promise.resolve(b)})}loadEntitiesForCompare(e,i,n,s){return ot(this,null,function*(){let a=e.entities.length,o=i.entities.length,l=()=>ot(this,null,function*(){var S;let u=this.compareContext,h=u.isTheFirstFile,p=h?e:i,d=new hr,f=h?a:o,m=p.entities.length;this.entityCount=m,Object.keys(p.blocks).forEach(D=>{var P;this.entityCount+=((P=p.blocks[D].entities)==null?void 0:P.length)||0});let g=Math.round(Math.pow(f,.5)),y=Date.now(),E=D=>ot(this,null,function*(){if(s&&(D%g===0||D===f-1)){let P=D+1;h||(P+=a),s(new ProgressEvent("parseProgress",{loaded:P,total:a+o}));let _=500,w=Date.now();(w-y>_||D===f-1)&&(yield bs.sleep(0),y=w)}});this.parseHeader(p.header);let b={};for(let D=0;D{if(X.geometry){let H=X.userData.layerName;this.getLayerVisible(p,H)===!1&&(X.visible=!1);let he=b[H];he||(he=[],b[H]=he),he.push(X)}}),yield E(D)}let x=p;x.threejsObject=d,d.updateMatrixWorld(!0),x.layersAndThreejsObjects=b,x.layoutViewportsMap={},h&&(u.preservedHandles||(u.preservedHandles=new Set));for(let D in n){let P=n[D];h&&(P.type==="Added"||P.type==="Modified")&&((S=u.preservedHandles)==null||S.add(P.handle),P.parentHandles&&P.parentHandles.forEach(w=>{var F;return(F=u.preservedHandles)==null?void 0:F.add(w)}));let _=this.entityThreejsCache&&this.entityThreejsCache[P.handle];P.parentHandles&&(_=this.entityThreejsCache&&this.entityThreejsCache[P.parentHandles[P.parentHandles.length-1]]),_&&(_=this.setObjectColorByChange(_,P)),P.type!=="NoChange"&&_&&(P.type==="Added"?!h&&(P.box=new Ot().setFromObject(_)):P.type==="Removed"?h&&(P.box=new Ot().setFromObject(_)):P.type==="Modified"&&(P.box?P.box.union(new Ot().setFromObject(_)):P.box=new Ot().setFromObject(_)))}Ri.merge(x)}),c=Date.now();this.compareContext={changes:n,isTheFirstFile:!0},St.printMemory("Before loading entities for first dxf"),yield l(),ne.info(`[DxfLoader] loadEntities for first dxf in ${(Date.now()-c)/1e3}s`),St.printMemory("After loading entities for first dxf"),this.releaseCachedData(!1),this.releaseDxfData(e),St.printMemory("Before loading entities for second dxf"),c=Date.now(),this.compareContext.isTheFirstFile=!1,yield l(),ne.info(`[DxfLoader] loadEntities for second dxf in ${(Date.now()-c)/1e3}s`);for(let u of Object.values(n))u.box||delete n[u.handle];this.compareContext.preservedHandles=void 0,this.enableReleaseData&&(this.releaseCachedData(),this.releaseDxfData(i)),St.printMemory("After loading entities for second dxf")})}setObjectColorByChange(e,i){let n=o=>{var c;let l=Wn.ENTITY_COLOR_NO_CHANGE;return o.type==="Added"?l=Wn.ENTITY_COLOR_ADDED:o.type==="Removed"?l=Wn.ENTITY_COLOR_REMOVED:o.type==="Modified"&&(l=(c=this.compareContext)!=null&&c.isTheFirstFile?Wn.ENTITY_COLOR_REMOVED:Wn.ENTITY_COLOR_ADDED),l},s=(o,l)=>{o.traverse(c=>{if(c.material){if(c.material instanceof Tr)c.material=this.getLineBasicMaterial(l);else if(c.material instanceof or)c.material=this.getMeshBasicMaterial(l);else if(c.material instanceof Vn)c.material=this.getPointsMaterial(l);else if(c.material instanceof Yt){let u=c.material.clone();this.updateMaterialUniforms(u),u.uniforms.u_color.value.set(l),c.material=u}}})},a=n(i);return e.traverse(o=>{i.parentHandles?o.userData&&o.userData.handle&&o.userData.handle===i.handle&&(s(o,a),e=o):s(o,a)}),e}releaseCachedData(e=!0){e&&(this.pointsMaterials={},this.lineBasicMaterials={},this.lineShaderMaterials={},this.meshBasicMaterials={},this.meshTextureMaterials={},this.hatchShaderMaterials=[]),this.header=void 0,this.blockReferencesCache={},this.blockRecordsCache=void 0,this.blocksCache=void 0,this.entitiesCache=void 0,this.dictionaryOwnerHandleAndSpatialFilterHandlesCache=void 0,this.spatialFiltersCache=void 0,this.entityThreejsCache=void 0,this.entityTypesAndTimes=void 0,this.entityHandlesWithRenderOrder={},this.statsInfo={unsupportedEntity:{},unsupportedEntityTypes:{},unsupportedTextStyles:{},unsupportedHatchPatterns:{},invisibleEntities:{},ignoredFrozenLayersAndEntityCount:{},ignoredInserts:{},entityTypesAndMeshCount:{},ignoredPaperSpaceEntityTypesAndCount:{},rebasedEntityCount:0}}releaseEntity(e){e.vertices&&(e.vertices=void 0),e.knotValues&&(e.knotValues=void 0),e.controlPoints&&(e.controlPoints=void 0),e.binaryData&&(e.binaryData=void 0),e.text&&(e.text=void 0),e.extendedData&&(e.extendedData=void 0),e.contextData&&(e.contextData=void 0);let i=e;i.boundaryPaths&&(i.boundaryPaths=[]),i.patternLines&&(i.patternLines=void 0)}releaseDxfData(e){delete e.objects.DICTIONARY,delete e.objects.SORTENTSTABLE,delete e.objects.XRECORD,delete e.tables.dimStyle,delete e.tables.lineType,delete e.tables.style,delete e.tables.blockRecord,e.entities=[],e.blocks={}}drawEntity(e,i,n,s=!1){if(this.compareContext&&this.compareContext.preservedHandles&&this.compareContext.preservedHandles.has(e.handle)&&T0.includes(e.type)&&(s=!0),!s&&this.compareContext&&this.compareContext.preservedHandles&&!T0.includes(e.type)&&!this.compareContext.preservedHandles.has(e.handle)&&(!n||n&&!this.compareContext.preservedHandles.has(n.handle)))return;if(this.getLayerFrozen(i,e)===!0){let u=e.layer;this.statsInfo.ignoredFrozenLayersAndEntityCount[u]||(this.statsInfo.ignoredFrozenLayersAndEntityCount[u]=0),this.statsInfo.ignoredFrozenLayersAndEntityCount[u]++;return}if(e.visible===!1||e.invisible){this.statsInfo.invisibleEntities[e.type]||(this.statsInfo.invisibleEntities[e.type]=0),this.statsInfo.invisibleEntities[e.type]++;return}if(this.ignorePaperSpace&&e.inPaperSpace){this.statsInfo.ignoredPaperSpaceEntityTypesAndCount[e.type]||(this.statsInfo.ignoredPaperSpaceEntityTypesAndCount[e.type]=0),this.statsInfo.ignoredPaperSpaceEntityTypesAndCount[e.type]++;return}this.entityThreejsCache||(this.entityThreejsCache={});let o=Date.now(),l,c=!1;if(!this.compareContext&&this.entityThreejsCache[e.handle])l=this.entityThreejsCache[e.handle].clone(),c=!0;else if(!this.statsInfo.unsupportedEntity[e.handle]){if(e.type==="CIRCLE"||e.type==="ARC")l=this.drawArc(e,i,n);else if(e.type==="LINE"||e.type==="POLYLINE")l=this.drawLine(e);else if(e.type==="XLINE")l=this.drawXLine(e);else if(e.type!=="SEQEND"){if(e.type==="RAY")l=this.drawRay(e);else if(e.type==="LWPOLYLINE")l=this.drawLWPolyline(e,i,n);else if(e.type==="3DFACE")l=this.draw3DFace(e);else if(e.type==="TEXT")l=this.drawText(e,i,n);else if(e.type==="SOLID")l=this.drawSolid(e,i,n);else if(e.type==="POINT")l=this.drawPoint(e,i,n);else if(e.type==="INSERT")l=this.drawInsert(e,i,s);else if(e.type==="SPLINE")l=this.drawSpline(e,n);else if(e.type==="MTEXT")l=this.drawMText(e,i,n);else if(e.type==="ELLIPSE")l=this.drawEllipse(e,i,n);else if(e.type==="DIMENSION")l=this.drawDimension(e,i);else if(e.type!=="REGION")if(e.type==="ATTDEF")l=this.drawAttDef(e,i,n);else if(e.type==="ATTRIB"){if(!n)for(let u=0;u{Qr.setSharedVariablesOfObject(p),p.matrixAutoUpdate=!1,p.updateMatrix(),p.geometry&&(h===!1&&(p.userData.layerVisible=!1),p.userData.layerName=u,this.setMaterial(p,e,i,n))}),c||(this.nonSnapableTypes.has(e.type)&&l.traverse(p=>{p.layers.set(10)}),this.enableRenderOrder&&(this.entityHandlesWithRenderOrder[e.handle]?l.renderOrder=parseInt(this.entityHandlesWithRenderOrder[e.handle],16)+.1:l.renderOrder=parseInt(e.handle,16)))}return T0.includes(e.type)||(this.entityTypesAndTimes||(this.entityTypesAndTimes={}),this.entityTypesAndTimes[e.type]||(this.entityTypesAndTimes[e.type]={createCount:0,totalTime:0,averageTime:0}),this.entityTypesAndTimes[e.type].createCount++,this.entityTypesAndTimes[e.type].totalTime+=Date.now()-o),l?this.statsInfo.entityTypesAndMeshCount[e.type]?this.statsInfo.entityTypesAndMeshCount[e.type]++:this.statsInfo.entityTypesAndMeshCount[e.type]=1:(this.statsInfo.unsupportedEntityTypes[e.type]?this.statsInfo.unsupportedEntityTypes[e.type]++:this.statsInfo.unsupportedEntityTypes[e.type]=1,T0.includes(e.type)||(this.statsInfo.unsupportedEntity[e.handle]?this.statsInfo.unsupportedEntity[e.handle]++:this.statsInfo.unsupportedEntity[e.handle]=1)),l}drawEllipse(e,i,n){if(!e.majorAxisEndPoint||!e.center||e.axisRatio===void 0||e.startAngle===void 0||e.endAngle===void 0)return;let s=e.startAngle,a=e.endAngle;if(e.extrusionDirection&&e.extrusionDirection.z<0&&(s=Math.PI*2-e.endAngle,a=Math.PI*2-e.startAngle),lr.areNumbersEqual(s,a,1e-5)){ne.warn("[DxfLoader] Ellipse entity (handle '%s') contains the same start and end angle, ignored!",e.handle);return}let o=a-s;for(;o>Math.PI*2;)o-=Math.PI*2;Math.abs(o)<=1e-5&&(a=lr.floorNumber(s+Math.PI*2,5));let l=Math.sqrt(Math.pow(e.majorAxisEndPoint.x,2)+Math.pow(e.majorAxisEndPoint.y,2)),c=l*e.axisRatio,u=Math.atan2(e.majorAxisEndPoint.y,e.majorAxisEndPoint.x),h=new xp(e.center.x,e.center.y,l,c,s,a,!1,u),p=1,d=n;d!=null&&d.xScale&&(d!=null&&d.yScale)&&(p=Math.max(Math.abs(d.xScale),Math.abs(d.yScale)));let f=this.getDivision(s,a,Math.max(l,c)*p),m=h.getPoints(f),g=[],y=m.length;for(let D=0;D{g.geometry&&g.geometry.translate(d,f,0)}),e.rotation&&(l.rotation.z=e.rotation*Math.PI/180),e.directionVector){let g=e.directionVector,y=new A(g.x,g.y,g.z),E=y.clone().cross(qf),b=new A(1,0,0).angleTo(y);l.rotateZ(E.z>0?-b:b)}return o.lineLength>1?l.position.y-=u.y+o.style.textHeight:l.position.y-=u.y,l}getMTextGroup(e,i,n,s,a){var h;if(e.length===0)return;let o=(a?a.style.textHeight:i.textHeight)||0;if(i.textStyle){let p=n.tables.style.styles[i.textStyle];o=o||p.textHeight}let l=o/1.5,c=o/2,u=new hr;for(let p=0;p{a&&a[a.length-1]&&a[a.length-1].colorIndex===u.colorIndex?a[a.length-1].text+=u.text:a.push(u)}),s=c.lineLength}else if(typeof l=="object"){if(l.S&&l.S.length===3){let c=l.S[0]+"/"+l.S[2],u=this.getTextLineNum(c);a&&a[a.length-1]&&a[a.length-1].colorIndex===void 0?a[a.length-1].text+=c:a.push({text:l.S[0]+"/"+l.S[2],lineNum:s}),s+=u}else if(l.C!==void 0&&(o++,typeof e[o]=="string")){let c=this.getTextLineNum(e[o]);a&&a[a.length-1]&&a[a.length-1].colorIndex===l.C?a[a.length-1].text+=e[o]:a.push({colorIndex:l.C,text:e[o],lineNum:s}),s+=c}}}return{text:a,lineLength:s,style:n}}getTextLineNum(e){let i=e.match(new RegExp("\\n","g"));return i?i.length:0}draw3DFace(e){if(!e.vertices||e.vertices.length===0){ne.warn("[DxfLoader] Entity is missing vertices:",e.handle);return}let i=e.vertices.map(l=>new A(l.x,l.y,l.z));if(i.length===0)return;lr.areVector3sEqual(i[0],i[i.length-1])||i.push(i[0]);let n=new A,s=!1;this.enableRTC&&(s=Wt.checkAndRebasePositionsOnRTC(i,n));let a=new it().setFromPoints(i),o=new _r(a,Pa);return s&&(this.setRTCUserData(o),o.position.x+=n.x,o.position.y+=n.y),o.renderOrder=2,o}drawSpline(e,i){if(!e.controlPoints||!e.degreeOfSplineCurve||!e.knotValues)return;let n=1/0,s=1/0,a=-1/0,o=-1/0;for(let E of e.controlPoints)E.xa&&(a=E.x),E.y>o&&(o=E.y);let l=1,c=i;c!=null&&c.xScale&&(c!=null&&c.yScale)&&(l=Math.max(Math.abs(c.xScale),Math.abs(c.yScale)));let u=Math.max(a-n,o-s),h=this.getBSplineInterpolationsPerSplineSegment(e.controlPoints.length,u*l),p=o2t(e.controlPoints,e.degreeOfSplineCurve,e.knotValues,h),d=new A,f=!1;this.enableRTC&&(f=Wt.checkAndRebasePositionsOnRTC(p,d));let m=Wt.getAdjacentNonRepeatPoints(p);if(m.length<2){ne.warn("[DxfLoader] Spline entity (handle '%s') contains less than 2 points, ignored!",e.handle);return}let g=new it().setFromPoints(m),y=new _r(g,Pa);return f&&(this.setRTCUserData(y),y.position.x+=d.x,y.position.y+=d.y),y}drawXLine(e){if(!e.vertices||e.vertices.length===0){ne.warn("[DxfLoader] Entity is missing vertices:",e.handle);return}let i=St.arrayOrObjectToVector3(e.directionVector),n=new A(e.vertices[0].x,e.vertices[0].y,0),s=[];if(s.push(i.clone().multiplyScalar(-1e6).add(n)),s.push(i.clone().multiplyScalar(1e6).add(n)),s.length===0)return;let a=new A,o=!1;this.enableRTC&&(o=Wt.checkAndRebasePositionsOnRTC(s,a));let l=new it().setFromPoints(s),c=new _r(l,Pa);return o&&(this.setRTCUserData(c),c.position.x+=a.x,c.position.y+=a.y),c.renderOrder=2,c}drawRay(e){if(!e.vertices||e.vertices.length===0){ne.warn("[DxfLoader] Entity is missing vertices:",e.handle);return}let i=St.arrayOrObjectToVector3(e.directionVector),n=e.vertices.map(c=>new A(c.x,c.y,0));if(n.push(i.multiplyScalar(1e6).add(n[0])),n.length===0)return;let s=new A,a=!1;this.enableRTC&&(a=Wt.checkAndRebasePositionsOnRTC(n,s));let o=new it().setFromPoints(n),l=new _r(o,Pa);return a&&(this.setRTCUserData(l),l.position.x+=s.x,l.position.y+=s.y),l.renderOrder=2,l}drawLine(e){if(!e.vertices||e.vertices.length===0){ne.warn("[DxfLoader] Entity is missing vertices:",e.handle);return}let i=[];if(e.isPolyfaceMesh)i=c2t(e.vertices);else{let l=L8(e.vertices,e.shape);e.shape&&l.length>0&&l.push(l[0]),l.length>0&&(i=[l])}if(i.length===0)return;let n=[];for(let l=0;l0){if(this.enableRTC){let m=0;i.forEach(g=>{g.forEach(y=>{s.add(y),m++})}),s.divideScalar(m),a=Wt.shouldRebasePositionOnRTC(s)}let l=[],c=[],u=0,h=0,p=0,d=0;i.forEach(m=>{for(let g=0;g0&&c.push(u+g-1,u+g);u=m.length});let f=new it().setFromPoints(l);f.setIndex(c),o=new oi(f,Pa)}if(n.length>0){this.enableRTC&&(a=Wt.checkAndRebasePositionsOnRTC(n,s));let l=new it().setFromPoints(n);o=new rn(l,P8)}if(o)return a&&(this.setRTCUserData(o),o.position.x+=s.x,o.position.y+=s.y),o}drawLWPolyline(e,i,n){var h;if(!e.vertices||e.vertices.length<2){ne.warn("[DxfLoader] Invalid LWPolyline entity (handle '%s'), ignored!",e.handle);return}let s=e;if(s.extrusionDirectionX!==void 0&&s.extrusionDirectionY!==void 0&&s.extrusionDirectionZ!==void 0){ps.set(s.extrusionDirectionX,s.extrusionDirectionY,s.extrusionDirectionZ);let p=Ri.getOcsMatrix(ps).invert(),d=0;s.elevation!==void 0&&s.elevation>0&&(d=s.elevation),s.vertices.forEach(f=>{let m=ps.set(f.x,f.y,d).applyMatrix4(p);f.x=m.x,f.y=m.y})}let a=L8(e.vertices,e.shape);if(e.shape&&a.length>0&&!lr.areVector3sEqual(a[0],a[a.length-1])&&a.push(a[0]),a.length<2){ne.warn("[DxfLoader] Invalid LWPolyline entity (handle '%s'), ignored!",e.handle);return}(h=e.extendedData)!=null&&h.outlines&&e.extendedData.outlines.forEach(d=>{let f=d.map(m=>new A(m[0],m[1],0));lr.areVectorsClose(f[0],f[f.length-1])||f.push(f[0]),a.push(...f)});let o=new A,l=!1;this.enableRTC&&(l=Wt.checkAndRebasePositionsOnRTC(a,o));let c=Wt.getAdjacentNonRepeatPoints(a);if(c.length<2){ne.warn("[DxfLoader] Invalid LWPolyline entity (handle '%s'), ignored!",e.handle);return}let u;if(this.enableWidthLine&&s.constantWidth!==void 0&&s.constantWidth>1){let p=i.tables.lineType.lineTypes[this.getLineType(e,i,n)];if(!(p&&p.pattern&&p.pattern.length!==0)){let d=Wt.convertWidthLineToMeshGeometry(c,s.constantWidth);if(!d)ne.warn("[DxfLoader] Failed to convert width line to mesh geometry: %s ",e.handle);else{let f=new Je(d,vS);u=new hr,u.add(f);let m=Qr.createOutlineSync(d,f.matrix,Pa);m.layers.set(10),u.add(m)}}}return u||(u=new _r(new it().setFromPoints(c),Pa)),l&&(this.setRTCUserData(u),u.position.x+=o.x,u.position.y+=o.y,u.position.z+=o.z),u}drawMLeader(e,i,n){var u,h,p,d,f,m,g,y;let s=i.tables.dimStyle.dimStyles[e.dimensionStyle]||this.getDefaultDimensionStyle(i),a=new hr,o=JA((u=e.contextData)==null?void 0:u.defaultTextContents),l=this.mtextContentAndFormattingToTextAndStyle(o,e),c=this.getMTextGroup(l.text,e,i,n,l);if(c){(h=e.contextData)!=null&&h.textLocation&&(c.position.x+=e.contextData.textLocation.x,c.position.y+=e.contextData.textLocation.y);let E=((p=e.contextData)==null?void 0:p.textWidth)||1;switch(l.style.horizontalAlignment){case"left":break;case"center":E&&(c.position.x+=E/2);break;case"right":E&&(c.position.x+=E);break;default:break}let S=new Ot().setFromObject(c).getSize(ps),D=S.x,P=S.y,_=0,w=0;switch((d=e.contextData)==null?void 0:d.textAttachment){case 1:_=0,w=0;break;case 2:_-=D/2,w=0;break;case 3:_-=D,w=0;break;case 4:_=0,w+=P/2;break;case 5:_-=D/2,w+=P/2;break;case 6:_-=D,w+=P/2;break;case 7:_=0,w+=P;break;case 8:_-=D/2,w+=P;break;case 9:_-=D,w+=P;break;default:return}if(c.traverse(F=>{F.geometry&&F.geometry.translate(_,w,0)}),(f=e.contextData)!=null&&f.textRotation&&(c.rotation.z=e.contextData.textRotation*Math.PI/180),(m=e.contextData)!=null&&m.textDirection){let F=e.contextData.textDirection,X=new A(F.x,F.y,F.z),H=X.clone().cross(new A(1,0,0)),he=new A(1,0,0).angleTo(X);c.rotateZ(H.z>0?-he:he)}c.renderOrder=5,a.add(c)}if(e.leaderLineType!==0){let E=[],b=(g=e.contextData)==null?void 0:g.leaders[0];if(!b)return a;let x=b.lastLeaderLinePoint;if(e.enableDogLeg){let F=new A(x.x,x.y,x.z),X=b.doglegLength,he=new A(b.doglegVector.x,b.doglegVector.y,b.doglegVector.z).multiplyScalar(X),C=F.clone().add(he);E.push(C,F)}let S=((y=e.contextData)==null?void 0:y.leaders[0].leaderLines)||[];for(let F=0;Fnew A(j.x,j.y,j.z)),he=new A(x.x,x.y,x.z);for(let j=0;j0?(p.add(g),ji.merge(p,!1),p):g}drawDefaultLeadArrow(e,i,n,s){let a=n*(e.x-i.x),o=n*(e.y-i.y),l=o,c=-a,u=new A(i.x+a+l/6,i.y+o+c/6,0),h=new A(i.x+a-l/6,i.y+o-c/6,0);s.push(i,u),s.push(i,h),s.push(u,h)}getBlockByHandle(e,i){if(!this.blocksCache){this.blocksCache={};for(let n in e){let s=e[n];this.blocksCache[s.ownerHandle]||(this.blocksCache[s.ownerHandle]=s)}}return this.blocksCache[i]}static transformAngleByOcsMatrix(e,i){let a=ps.set(Math.cos(i)*1,Math.sin(i)*1,0).applyMatrix4(e);return Math.atan2(a.y,a.x)}static getArcAnglesByOcsMatrix(e,i,n){let s=lr.getArcAngleSpanRad(i,n),a=Ri.transformAngleByOcsMatrix(e,i),o=Ri.transformAngleByOcsMatrix(e,n),l;if(lr.areNumbersClose(s,Math.PI)){s=1;let c=Ri.transformAngleByOcsMatrix(e,i+s);l=lr.getArcAngleSpanRad(a,c)}else{if(lr.areNumbersClose(s,Math.PI*2))return[a,a+Math.PI*2];l=lr.getArcAngleSpanRad(a,o)}return lr.areNumbersClose(s,l,1e-8)?[a,o]:[o,a]}drawArc(e,i,n){var x,S,D;if(!e.radius||e.radius<.001){ne.warn(`[DxfLoader] The radius of arc (handle '${e.handle}') is undefined, ignored!`);return}if(!e.radius||e.radius<.001){ne.warn(`[DxfLoader] The radius of arc (handle '${e.handle}') is too small, ignored!`);return}let s=new A(0,0,1);e.extrusionDirectionX!==void 0&&e.extrusionDirectionY!==void 0&&e.extrusionDirectionZ!==void 0&&s.set(e.extrusionDirectionX,e.extrusionDirectionY,e.extrusionDirectionZ);let a=Ri.getOcsMatrix(s),o,l;if(e.type==="CIRCLE")o=e.startAngle||0,l=o+2*Math.PI;else{if(e.startAngle==null||e.endAngle==null||(o=e.startAngle,l=e.endAngle,lr.areNumbersEqual(o,l,.001)))return;if(!lr.areNumbersClose(lr.getArcAngleSpanRad(o,l),Math.PI*2)){let P=Ri.getArcAnglesByOcsMatrix(a,o,l);o=P[0],l=P[1]}}let c=new Eg(0,0,e.radius,o,l,this.angBase!==0),u=1,h=n;h!=null&&h.xScale&&(h!=null&&h.yScale)&&(u=Math.max(Math.abs(h.xScale),Math.abs(h.yScale)));let p=this.getDivision(o,l,e.radius*u),d=c.getPoints(p),f=new A,m=!1;this.enableRTC&&(m=Wt.checkAndRebasePositionsOnRTC(d,f));let g=new it().setFromPoints(d),y=new _r(g,Pa),E=new A;e.center&&(E.x=e.center.x,E.y=e.center.y);let b=new A((x=e.center)==null?void 0:x.x,(S=e.center)==null?void 0:S.y,(D=e.center)==null?void 0:D.z).applyMatrix4(a.invert());return E.x=b.x,E.y=b.y,y.position.copy(E),m?(this.setRTCUserData(y),y.position.x+=f.x,y.position.y+=f.y):Wt.shouldRebasePositionOnRTC(y.position)&&this.setRTCUserData(y),y}addTriangleFacingCamera(e,i,n,s){let a=new A,o=new A;a.subVectors(n,i),o.subVectors(s,i),a.cross(o);let l=new A(i.x,i.y,i.z),c=new A(n.x,n.y,n.z),u=new A(s.x,s.y,s.z);a.z<0?e.push(u,c,l):e.push(l,c,u)}drawSolid(e,i,n){let s=e.points;if(!s||s.length<4)return;if(e.extrusionDirection&&e.extrusionDirection.z){ps.set(0,0,e.extrusionDirection.z);let p=Ri.getOcsMatrix(ps).invert();s.forEach(d=>{let f=ps.set(d.x,d.y,0).applyMatrix4(p);d.x=f.x,d.y=f.y})}let a=[],o=[];this.addTriangleFacingCamera(a,s[0],s[1],s[2]),o.push(0,1,2),this.addTriangleFacingCamera(a,s[1],s[2],s[3]),o.push(3,4,5);let l=new A,c=!1;this.enableRTC&&(c=Wt.checkAndRebasePositionsOnRTC(a,l));let u=new it().setFromPoints(a);u.setIndex(o);let h=new Je(u,vS);return c&&(this.setRTCUserData(h),h.position.x+=l.x,h.position.y+=l.y),h}getDefaultTextStyle(e){return e.tables.style.styles.STANDARD||e.tables.style.styles.Standard||{}}getDefaultDimensionStyle(e){return e.tables.dimStyle.dimStyles.STANDARD||e.tables.dimStyle.dimStyles.Standard||{}}getTextEncoding(e){return e.bigFontFile&&e.bigFontFile.toUpperCase().startsWith("GB")?"gbk":"utf8"}getTextMesh(e,i,n,s,a){if(!e)return;i.textStyle&&(this.statsInfo.unsupportedTextStyles[i.textStyle]||(this.statsInfo.unsupportedTextStyles[i.textStyle]=0),this.statsInfo.unsupportedTextStyles[i.textStyle]++);let o,l=(a?a.style.textHeight:i.textHeight)||0,c=.67,u={_TCH_DIM:1.45};if(i.textStyle&&u[i.textStyle]&&(c=u[i.textStyle]),i.xScale&&(c*=i.xScale),i.textStyle){let p=n.tables.style.styles[i.textStyle];c*=(p==null?void 0:p.xScale)||1,l=l||p.textHeight}let h=0;if(i.width&&(h=i.width/c+2),i.contextData&&i.contextData.textWidth&&i.contextData.textHeightm.toThreeGeometry()),f=qo(d);f.scale(c,1,1),o=new oi(f,Pa)}else if(this.font instanceof Zg){let p={font:this.font,height:0,size:l||12,curveSegments:3,bevelSegments:3},d=new GA(e,p);o=new Je(d,vS)}return o}transformTextMesh(e,i){let s=new Ot().setFromObject(i).getSize(ps),{halign:a,valign:o}=e,l=e.width||s.x,c=s.y;if(a===void 0&&o===void 0&&e.startPoint||[3,5].includes(a)&&e.startPoint?(i.position.x+=e.startPoint.x,i.position.y+=e.startPoint.y,i.position.z+=e.startPoint.z):e.endPoint&&(i.position.x+=e.endPoint.x,i.position.y+=e.endPoint.y,i.position.z+=e.endPoint.z),a!==3&&a!==5){if(e.rotation){let u=e.rotation*Math.PI/180;i.rotateZ(u)}e.mirrored===2?i.rotateY(Math.PI):e.mirrored===4&&i.rotateX(Math.PI)}switch(a){case 0:break;case 1:i.translateX(-l/2);break;case 2:i.translateX(-l);break;case 3:if(e.startPoint&&e.endPoint){let u=new A(e.startPoint.x,e.startPoint.y,e.startPoint.z),h=new A(e.endPoint.x,e.endPoint.y,e.endPoint.z),p=new A().subVectors(u,h),f=p.length()/l;i.scale.multiplyScalar(f);let m=p.clone().cross(qf),g=p.angleTo(qf);i.rotateZ(m.z>0?Math.PI-g:g-Math.PI),(e.mirrored===2||e.mirrored===4)&&i.rotateX(Math.PI)}break;case 4:i.translateX(-l/2),i.translateY(-c/2);break;case 5:if(e.startPoint&&e.endPoint){let u=new A(e.startPoint.x,e.startPoint.y,e.startPoint.z),h=new A(e.endPoint.x,e.endPoint.y,e.endPoint.z),p=new A().subVectors(u,h),f=p.length()/l;i.scale.setX(f);let m=p.clone().cross(qf),g=p.angleTo(qf);i.rotateZ(m.z>0?Math.PI-g:g-Math.PI),(e.mirrored===2||e.mirrored===4)&&i.rotateX(Math.PI)}break;default:break}switch(o){case 0:break;case 1:break;case 2:i.translateY(-c/2);break;case 3:i.translateY(-c);break;default:break}return i.position.z=0,i}drawText(e,i,n){let s=e.text;if(!s||!this.font)return;let a=i.tables.style.styles[e.textStyle]||this.getDefaultTextStyle(i);s=QA(s,{encoding:this.getTextEncoding(a)}).map(u=>u.text).join("");let l=this.getTextMesh(s,e,i,n);if(!l)return;let c=l.geometry;if(l instanceof Je&&!c.getIndex()){let u=c.getAttribute("position"),h=[];for(let p=0;pc.text).join();let o=this.getTextMesh(s,e,i,n);if(!o)return;let l=o.geometry;if(l.hasAttribute("uv")&&l.deleteAttribute("uv"),l.hasAttribute("normal")&&l.deleteAttribute("normal"),this.transformTextMesh(e,o),Wt.shouldRebasePositionOnRTC(o.position))this.setRTCUserData(o);else{let c=Wt.caculateGeometryCenter(l);c&&Wt.shouldRebasePositionOnRTC(c)&&this.setRTCUserData(o)}return o}drawAttrib(e,i,n){let s=e.text;if(!s||!this.font)return;s=QA(s).map(c=>c.text).join();let o=this.getTextMesh(s,e,i,n);if(!o)return;let l=o.geometry;if(l.hasAttribute("uv")&&l.deleteAttribute("uv"),l.hasAttribute("normal")&&l.deleteAttribute("normal"),this.transformTextMesh(e,o),Wt.shouldRebasePositionOnRTC(o.position))this.setRTCUserData(o);else{let c=Wt.caculateGeometryCenter(l);c&&Wt.shouldRebasePositionOnRTC(c)&&this.setRTCUserData(o)}return o}drawPoint(e,i,n){if(!e.position)return;let s=new it,a=[new A(e.position.x,e.position.y,e.position.z)];ps.set(0,0,0);let o=ps,l=!1;this.enableRTC&&(l=Wt.checkAndRebasePositionsOnRTC(a,o)),s.setFromPoints(a);let c=new rn(s,P8);return l&&(this.setRTCUserData(c),c.position.x+=o.x,c.position.y+=o.y),c}drawDimension(e,i){if(!e.block)return;let n=i.blocks[e.block];if(!n||!n.entities)return;let s=i.tables.dimStyle.dimStyles[e.dimStyleName]||this.getDefaultDimensionStyle(i);s&&s.DIMCLRD>0&&(e.colorIndex=s.DIMCLRD,e.color=E0(e.colorIndex));let a=new hr;for(let l=0;l`,a.userData.entityType=e.type;let o=e==null?void 0:e.insertionPoint;return o&&(a.position.x+=o.x,a.position.y+=o.y),Wt.shouldRebasePositionOnRTC(a.position)&&this.setRTCUserData(a),a}drawInsert(e,i,n=!1){if(!e.block)return;let s=i.blocks[e.block];if(!s.entities)return;e.blockPosition=s.position;let a=new hr;for(let h=0;h`,a.userData.entityType=e.type,e!=null&&e.blockPosition&&(a.position.x-=e.blockPosition.x,a.position.y-=e.blockPosition.y,a.updateMatrix());let o=ps.set(1,1,1);e.xScale&&(o.x=e.xScale),e.yScale&&(o.y=e.yScale);let l=new Sr;e.rotation&&(l.z=e.rotation*Math.PI/180),SMe.setFromEuler(l,!1);let c=yS.set(0,0,0);e.position&&(c.x=e.position.x,c.y=e.position.y),$c.compose(c,SMe,o),e.extrusionDirection&&e.extrusionDirection.z<0&&$c.premultiply(IMe.identity().makeScale(-1,1,1)),N8.copy(a.matrix),a.applyMatrix4($c),Wt.shouldRebasePositionOnRTC(a.position)&&this.setRTCUserData(a);let u=this.findSpatialFilterByHandle(e.handle,i);if(u){let h=this.drawSpatialFilter(u),p=u;p&&p.clipPolylines&&p.clipPolylines.length>0&&(a.userData.spatialFilterHandle=u.handle,this.cloneMaterialsForSpatialFilter(a),h&&h.applyMatrix4(N8.invert()),ne.debug("[DxfLoader] Spatial filter:",e.associatedSpatialFilter))}return a}drawSpatialFilter(e){let i=e;if(i.threejsObject)return i.threejsObject.clone();let n=e.invertBlockMatrix;$c.set(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],0,0,0,1);let s=[];e.vertices.forEach(l=>{s.push(new A(l.x,l.y,0))});let a={polyline:[],bConcave:!1,bReversed:!1};if(e.numberOfPointsOnClipBoundary===2)a.polyline=s;else{let l=e.numberOfPointsOnClipBoundary,c=3;if(lf;g--){let y=s[g];if(lr.areVector3sEqual(m,y)&&f+10)break;u.push(m)}if(h>0)for(let f=h+1;f{p.push(new le(f.x,f.y)),d.push([f.x,f.y])}),!Wt.isConvex(p)){ne.warn(`[DxfLoader] Concave polygon is not supported for spatial filter (handle '${e.handle}'), converting to convex polygon!`);let f=(0,_Me.default)(d,1/0);u=[],f.forEach(m=>{u.push(new A(m[0],m[1],0))})}lr.areVector3sEqual(u[0],u[u.length-1])||u.push(u[0]),a.polyline=u,a.bReversed=h>0}let o;return this.enableReleaseData&&(e.vertices=[],e.matrix=[],e.invertBlockMatrix=[]),i.localMatrix=$c.clone(),i.clipPolylines=[],i.clipPolylines.push(a),o}drawLayout(e,i,n,s,a,o){if(!e.entities)return;let l;if(n.layoutName!==Ri.MODEL_LAYOUT_NAME){let p=n;p.directAssociatedLeafObjectSet||(p.directAssociatedLeafObjectSet=new Set),l=p.directAssociatedLeafObjectSet}let c=new hr;Qr.setSharedVariablesOfObject(c);for(let p=0;p{if(m.geometry){let g=m.userData.layerName;this.getLayerVisible(i,g)===!1&&(m.visible=!1);let y=a[g];y||(y=[],a[g]=y),y.push(m),l&&l.add(m)}}))}if(c.children.length===0)return;c.userData.layerName=e.layer;let u=n.layoutName,h=s.children.find(p=>p.name===u);h||(h=new hr,Qr.setSharedVariablesOfObject(h),h.name=u,h.userData.isLayoutLevelObject=!0,s.add(h)),h.add(c),e.position&&c.position.set(e.position.x,e.position.y,e.position.z||0),c.matrixAutoUpdate=!1,c.updateMatrix()}convertEdgeToPoints(e){let i=[];switch(e.type){case 1:{let s=e;i.push(new le(s.startPoint.x,s.startPoint.y)),i.push(new le(s.endPoint.x,s.endPoint.y));break}case 2:{let s=e,a=s.startAngle*wr.DEG2RAD,o=s.endAngle*wr.DEG2RAD;s.bCounterclockwise||(a=Math.PI*2-a,o=Math.PI*2-o);let l=new Eg(s.center.x,s.center.y,s.radius,a,o,!s.bCounterclockwise),c=this.getDivision(a,o,s.radius);i.push(...l.getPoints(c));break}case 3:{let s=e,a=Math.sqrt(Math.pow(s.majorAxisEndPoint.x,2)+Math.pow(s.majorAxisEndPoint.y,2)),o=a*s.minorRatio,l=Math.atan2(s.majorAxisEndPoint.y,s.majorAxisEndPoint.x),c=s.startAngle*wr.DEG2RAD,u=s.endAngle*wr.DEG2RAD;s.bCounterclockwise||(c=Math.PI*2-c,u=Math.PI*2-u);let h=new xp(s.center.x,s.center.y,a,o,c,u,!s.bCounterclockwise,l),p=this.getDivision(c,u,Math.max(a,o));i.push(...h.getPoints(p));break}case 4:{let s=e;i.push(...s.controlPoints);break}case 0:{let s=e;i.push(...L8(s.points,s.isClosed));break}}return i}drawHatch(e,i,n){var y;let s=e;if(s.boundaryPaths.length==0)return;let a=[],o=[],l=[];if(s.boundaryPaths.forEach((E,b)=>{if(this.IsfilteredByPathTypeFlag(E.pathTypeFlag)){let P="[DxfLoader] The %d path type flag is filtered at the %dth boundrayPath (hatch handle '%s')";ne.info(P,E.pathTypeFlag,b,s.handle);return}let x=E.edges;if(x.length===0)return;let S=[];for(let P=0;P31&&!(_=>{for(let w=1;w<_.length;++w){let F=_[w-1].endPoint,X=_[w].startPoint;if(!F||!X||!lr.areVector2sEqual(F,X))return!1}return!0})(E.edges)){let _="[DxfLoader] The %dth boundaryPath (hatch handle '%s') has unknown path, ignored!";ne.warn(_,b,s.handle);return}lr.areVector2sEqual(S[0],S[S.length-1])||S.push(S[0]);let D=S.map(P=>new le(St.roundNumber(P.x,7),St.roundNumber(P.y,7)));if((D==null?void 0:D.length)>0){a.push(D);let P=new Ds().setFromPoints(D);o.push(P);let _=P.getSize(TS),w=_.x*_.y;l.push({area:w,index:a.length-1})}}),a.length===0)return;let c=new le,u=this.checkAndRebasePolygonsOnRTC(a,c);l.sort((E,b)=>E.area-b.area);let h=[];l.forEach(E=>{h.push(E.index)});let p=this.buildContainHierarchyTree(a,o,h),d=[];this.buildHatchGeometry(a,p,d);let f;if(d.length>0&&(f=qo(d)),!f||!f.getIndex()||((y=f.getIndex())==null?void 0:y.count)===0){ne.warn("[DxfLoader] Failed to convert hatch boundaries!");return}let m=new Je(f,vS);m.layers.set(10),this.setHatchMaterial(m,s,i,c,n);let g=m;return u?(this.setRTCUserData(m),g.position.x+=c.x,g.position.y+=c.y):Wt.shouldRebasePositionOnRTC(g.position)&&this.setRTCUserData(g),g}drawOle2frame(e,i){let{leftUpX:n,leftUpY:s,rightDownX:a,rightDownY:o}=e;if(!n||!s||!a||!o)return;let l=[new le(n,s),new le(n,o),new le(a,o),new le(a,s),new le(n,s)],c=new A,u=!1;this.enableRTC&&(u=Wt.checkAndRebasePositionsOnRTC(l,c));let h=new it().setFromPoints(l),p=this.getLineBasicMaterial(16777215),d=new _r(h,p);u&&(this.setRTCUserData(d),d.position.x+=c.x,d.position.y+=c.y);let f=new hr;f.add(d);let m,g=i.objects.DICTIONARY;for(let E of g){let b=E;for(let x in b.entries)if(b.entries[x]===e.handle){m=x;break}}let y;if(m)if(this.meshTextureMaterials[m])y=this.meshTextureMaterials[m];else for(let E=0;E1?f:d}static getOcsMatrix(e){let i=qf,n=O8,s=aO,a=new A(0,1,0),o=new A(0,0,1);return lr.areVectorsClose(e,o)?$c.identity():(s=e.clone().normalize(),lr.areVectorsClose(s,o)||(Math.abs(s.x)<1/64&&Math.abs(s.y)<1/64?i=a.cross(s).normalize():i=o.cross(s).normalize(),n=s.clone().cross(i).normalize()),$c.set(i.x,i.y,i.z,0,n.x,n.y,n.z,0,s.x,s.y,s.z,0,0,0,0,1))}static getDcs2WcsMatrix(e,i){let n;n2t(e)?n=e.viewDirectionFromTarget:n=e.viewDirection;let s=new A(n.x,n.y,n.z),a=new A(e.viewTarget.x,e.viewTarget.y,e.viewTarget.z),o=e.viewTwistAngle,l,c,u;u=s.clone().normalize(),l=aO.clone().cross(s),l.length()>0?(l.normalize(),c=u.clone().cross(l)):u.z<0?(l=qf.clone().negate(),c=O8,u=aO.clone().negate()):(l=qf,c=O8,u=aO);let h=new Ue,p=$c.identity();return p.makeBasis(l,c,u),h.premultiply(p),h.premultiply($c.identity().compose(a.clone(),new Or().setFromAxisAngle(new A(0,0,1),wr.degToRad(i?o:-o)),new A(1,1,1))),h}getViewportMsToPsMatrix(e){let i=new A(e.centerPoint_dcs.x,e.centerPoint_dcs.y,0),n=new A(e.centerPoint.x,e.centerPoint.y,e.centerPoint.z),s=e.viewHeight,a=e.height_paperSpace,o=s/a,l=Ri.getDcs2WcsMatrix(e,this.angDir),c=new Ue;c.setPosition(xMe.clone().sub(n));let u=IMe.identity();u.scale(ps.set(o,o,o));let h=N8.identity().setPosition(xMe.clone().sub(n));u.premultiply(h.clone().invert()).multiply(h),c.multiply(u);let p=$c.identity();p.setPosition(i),l.multiply(p);let d=$c.identity();return c.invert().multiply(d).multiply(l.invert())}drawViewport(e,i,n){let s=e;if(s.viewportId=="1"){e.psBBox=new Ot,e.msToPsMatrix=new Ue;return}let a=[],o=s.centerPoint,l=s.width_paperSpace/2,c=s.height_paperSpace/2;a.push(new A(o.x-l,o.y-c,0)),a.push(new A(o.x-l,o.y+c,0)),a.push(new A(o.x+l,o.y+c,0)),a.push(new A(o.x+l,o.y-c,0)),a.push(a[0]),e.psBBox=new Ot(a[0],a[2]),e.msToPsMatrix=this.getViewportMsToPsMatrix(s);let u=new A,h=!1;this.enableRTC&&(h=Wt.checkAndRebasePositionsOnRTC(a,u));let p=new it().setFromPoints(a),d=new _r(p,Pa);h&&(this.setRTCUserData(d),d.position.x+=u.x,d.position.y+=u.y),d.userData.entityType=e.type;let f=new hr;f.add(d);let m=e.psBBox.clone();m.applyMatrix4(e.msToPsMatrix.clone().invert()),m.min.z=0,m.max.z=0;let g=[];g.push(m.min),g.push(new A(m.min.x,m.max.y,0)),g.push(m.max),g.push(new A(m.max.x,m.min.y,0)),g.push(g[0]);let y=new A,E=!1;this.enableRTC&&(E=Wt.checkAndRebasePositionsOnRTC(g,y));let b=new it().setFromPoints(g),x=new _r(b,Pa);return E&&(this.setRTCUserData(x),x.position.x+=y.x,x.position.y+=y.y),x.userData.entityType=e.type,x.userData.inPaperSpace=!0,f.add(x),d}getColor(e,i,n){var a,o,l,c,u,h;if(this.compareContext){let p=e.compareChangeType;return p==="Added"?Wn.ENTITY_COLOR_ADDED:p==="Removed"?Wn.ENTITY_COLOR_REMOVED:p==="Modified"?this.compareContext.isTheFirstFile?Wn.ENTITY_COLOR_REMOVED:Wn.ENTITY_COLOR_ADDED:Wn.ENTITY_COLOR_NO_CHANGE}let s=e;if(s&&s.isGradientColor){let p=s.gradientColors;if(p&&p.length>=2){if(p[0]!==p[1]){let d=`[DxfLoader] Gradient colors are not supported for hatch '${e.handle}', will use the first color!`;ne.warn(d)}return p[0]}}if(e.isTrueColor||e.colorIndex>0&&e.colorIndex<256)return e.color;if(e.colorIndex===0)return n?this.getColor(n,i):(o=(a=i.tables)==null?void 0:a.layer)==null?void 0:o.layers[0].color;if(e.colorIndex===256){let p=(c=(l=i.tables)==null?void 0:l.layer)==null?void 0:c.layers,d=p&&p[e.layer],f=p&&n&&p[n.layer],m=Yf;return d&&d.name!=="0"?m=d.color:f?m=f.color:d?m=d.color:m=(h=(u=i.tables)==null?void 0:u.layer)==null?void 0:h.layers[0].color,m}return ne.warn("[DxfLoader] Unknown colorIndex"),Yf}getLineType(e,i,n){var o,l;if(n&&n.type==="DIMENSION")return this.getLineType(n,i);if(e.lineType!==VA&&e.lineType!==g8)return e.lineType;if(e.lineType===g8)return n?this.getLineType(n,i):e.lineType;let s=(l=(o=i.tables)==null?void 0:o.layer)==null?void 0:l.layers,a=i2t;if(e.layer!=="0"){let c=s&&s[e.layer];if(c)return c.lineType}else if(n){let c=s&&s[n.layer];if(c)return c.lineType}return a}getLayerName(e,i,n){var c,u;let s=(u=(c=i.tables)==null?void 0:c.layer)==null?void 0:u.layers,a=s&&s[e.layer],o=s&&n&&s[n.layer],l=a.name;return a&&a.name==="0"&&o&&(l=o.name),l||"0"}setMaterial(e,i,n,s){let a=e;if(!a.geometry||(this.setRenderOrderByObjectType(e),i.type==="OLE2FRAME"))return;if(i.type==="MTEXT"){e.renderOrder=5;return}if(i.type==="HATCH"){TS.set(0,0),this.setHatchMaterial(e,i,n,TS,s);return}let o,l=this.getColor(i,n,s);if(i.type==="LWPOLYLINE"&&(a.isMesh?(o=this.getMeshBasicMaterial(l),e.renderOrder=1):e.userData.isOutline&&(o=this.getLineBasicMaterial(l),e.renderOrder=3),o)){a.material=o;return}if(i.type==="SOLID")o=this.getMeshBasicMaterial(l);else if(i.type==="TEXT"||i.type==="ATTDEF"||i.type==="ATTRIB")o=this.getLineBasicMaterial(l),e.renderOrder=5;else if(i.type==="LEADER"||i.type==="MULTILEADER"||i.type==="VIEWPORT")o=this.getLineBasicMaterial(l);else if(i.type==="POINT")o=this.getPointsMaterial(l);else{if(e.material instanceof Vn){o=this.getPointsMaterial(l),a.material=o;return}let c=n.tables.lineType.lineTypes[this.getLineType(i,n,s)],u=i.lineTypeScale||1;c&&c.pattern&&c.pattern.length!==0?(o=this.getLineShaderMaterial(c,l,u),e.renderOrder=3):o=this.getLineBasicMaterial(l)}a.material=o}setHatchMaterial(e,i,n,s,a){let o=e;if(!o.geometry)return;let l=this.getColor(i,n,a);if(o.isLine){o.material=this.getLineBasicMaterial(l);return}let c=-1,u;if(i.solidFill)u=this.getMeshBasicMaterial(l);else{if(o.material instanceof Yt){u=o.material;let h=new Ve(l);o.material.uniforms.u_color.value.equals(h)||(u=o.material.clone(),this.updateMaterialUniforms(u),u.uniforms.u_color.value.set(l))}else u=this.getHatchShaderMaterial(i,l,s);c=0}u||(u=this.getMeshBasicMaterial(l),c=-1),o.material=u,o.renderOrder=c}setRenderOrderByObjectType(e){let i=e,n=0;i.isMesh?n=-1:i.isLine?n=2:i.isPoints&&(n=4),e.renderOrder=n}getPointsMaterial(e){return this.pointsMaterials[e]||(this.pointsMaterials[e]=new Vn({size:.2,color:e})),this.pointsMaterials[e]}getLineBasicMaterial(e){return this.lineBasicMaterials[e]||(this.lineBasicMaterials[e]=new Tr({color:e})),this.lineBasicMaterials[e]}getLineShaderMaterial(e,i,n){let s=`${e.name}_${i}_${n}`;if(!this.lineShaderMaterials[s]){let a=this.getLineTypeScales(),o=a.ltScale*a.celtScale*n;this.lineShaderMaterials[s]=KA.createLineShaderMaterial(e.pattern,i,o,Ri.viewportScaleUniform,Ri.cameraZoomUniform)}return this.lineShaderMaterials[s]}getMeshBasicMaterial(e){return this.meshBasicMaterials[e]||(this.meshBasicMaterials[e]=new or({color:e})),this.meshBasicMaterials[e]}getHatchShaderMaterial(e,i,n){if(!e.patternLines||e.patternLines.length<1)return;let s=this.findMatchedHatchShaderMaterial(e,i);if(s)return s;let a=.005,o=.05,l=2;e.patternLines.forEach(d=>{l=Math.max(d.dashPattern.length,l)});let c=0,u=[],h=new le;for(let d of e.patternLines){let f=new le(d.origin.x,d.origin.y).sub(n).rotateAround(h,-wr.degToRad(e.patternAngle)),m=new le(d.delta.x,d.delta.y).rotateAround(h,-wr.degToRad(d.angle));if(m.y===0){ne.warn("[DxfLoader] delta.y is equal to zero !");return}let g=d.dashPattern.length,y=!0,E=0;for(let _=0;_0&&(y=!1),E+=Math.abs(w)}let b=y?o:a,x=[],S=[],D=0;S[0]=D;for(let _=0;_Ri.maxFragmentUniforms){ne.warn("[DxfLoader] There will be warning in fragment shader when number of uniforms exceeds 1024, so extra hatch line patterns are ignored here!");break}u.push(P)}let p=fMe(u,e.patternAngle,Ri.cameraZoomUniform,new Ve(i));return p.defines={MAX_PATTERN_SEGMENT_COUNT:l},this.hatchShaderMaterials.push({patternLines:e.patternLines,patternAngle:e.patternAngle,color:i,material:p}),p}getDivision(e,i,n){let s=Math.round(5e4/this.entityCount);s=Math.max(s,2),s=Math.min(s,10);let a=s*5,l=s*2;if(this.averageCurveSize){let h=Math.pow(n/this.averageCurveSize,.5);l*=h,l=Math.max(l,s),l=Math.min(l,a)}let c=i-e;c<0&&(c+=Math.PI*2),l=Math.ceil(l*(c/Math.PI));let u=8;return c<.087?u=2:c<.174?u=3:c<.52?u=4:c<1.57?u=5:c<3.14?u=6:c<4.71&&(u=7),l=Math.max(l,u),this.averageCurveSize=(this.averageCurveSize*this.curveCount+n)/(this.curveCount+1),this.curveCount++,Math.max(l,12)}getBSplineInterpolationsPerSplineSegment(e,i){let n=1;this.averageCurveSize&&(n=Math.pow(i/this.averageCurveSize,.5),n=Math.max(n,.5),n=Math.min(n,2)),this.averageCurveSize=(this.averageCurveSize*this.curveCount+i)/(this.curveCount+1),this.curveCount++;let s=e*2*n;if(e>20){let a=Math.log10(e);s/=a}return s}getSimplifyTolerance(){return .03}setDxfDataToIndexedDb(e,i){return ot(this,null,function*(){let n={dxfDataId:e,dxf:i};return new Promise((s,a)=>{ZT.instance().add(n,()=>{ne.info(`[DxfLoader] Saved '${e}' to indexedDb`),s()},o=>{a(o)})})})}getDxfDataFromIndexedDb(e){return ot(this,null,function*(){return new Promise((i,n)=>{ZT.instance().query(e,s=>{s&&s.length>0&&i(s[0].dxf),i(void 0)},()=>n())})})}buildContainHierarchyTree(e,i,n){var l;let s=new Map,a=n.length;for(let c=0;c{c.children.length===0?s.push(c.index):a.set(c.index,c.children.map(u=>u.index))});let o=c=>{try{let u=new _p(c);u.hasAttribute("uv")&&u.deleteAttribute("uv"),u.hasAttribute("normal")&&u.deleteAttribute("normal"),n.push(u)}catch(u){ne.warn(`[DxfLoader] triangulate shape error: ${c.getPoints().map(h=>h.toArray()).toString()}`)}};s.forEach(c=>{let u=e[c];if(u.length===0)return;let h=new Ja(u);o(h)});let l=c=>c.map(u=>u.toArray());for(let c of a){let u=new Ja(e[c[0]]),h={regions:[],inverted:!1},p=this.findIntersectHole(e,c[1]);p.forEach(f=>{let m={regions:[],inverted:!1};try{f.forEach((g,y)=>{if($l.epsilon(lr.getVector2RelativeEps(e[g][0]),1e-6),y===0)m=$l.segments({regions:[l(e[g])],inverted:!1});else{let E=$l.segments({regions:[l(e[g])],inverted:!1}),b=$l.combine(m,E);h=$l.polygon($l.selectUnion(b)),h.regions.length>0?h.regions.forEach(x=>{if(x.length===0)return;let S=x.map(D=>new le(D[0],D[1]));u.holes.push(new ku(S))}):ne.warn("[DxfLoader] mergedHoles.regions is empty")}})}catch(g){ne.warn(`[DxfLoader] polybooljs has error: ${g}, epsilon is ${$l.epsilon()}`)}});let d=p.flat(2);for(let f=0;f{c.children.forEach(u=>{this.buildHatchGeometry(e,u,n)})})}findIntersectHole(e,i){let n=i.length,s=[];for(let a=0;a{a.forEach(o=>{i.add(o),n++})}),i.divideScalar(n);let s=!1;if(this.enableRTC&&Wt.shouldRebasePositionOnRTC(i)){s=!0;for(let a=0;a{o.entries[l]&&o.entries[l]==="ACAD_SORTENTS"&&i.add(l)})}if(i.size===0)return;let s=e.objects.SORTENTSTABLE;if(s)for(let a=0;aMath.abs(u-h)<1e-5,a=(u,h)=>{if(u.length!==h.length)return!1;for(let p=0;ps(u.angle,h.angle)&&s(u.delta.x,h.delta.x)&&s(u.delta.y,h.delta.y)&&s(u.origin.x,h.origin.x)&&s(u.origin.y,h.origin.y)&&a(u.dashPattern,h.dashPattern),l=(u,h)=>{if(u.length!==h.length)return!1;for(let p=0;pu.color===i&&u.patternAngle===e.patternAngle&&l(u.patternLines,n));return c==null?void 0:c.material}getLayout(e,i){if(!this.blockRecordsCache){this.blockRecordsCache={};let a=this.blockRecordsCache,o=e.tables.blockRecord.blockRecords;Object.values(o).forEach(l=>{a[l.handle]=l.layoutHandle})}let n=this.blockRecordsCache[i.ownerHandle];if(n){let o=e.objects.LAYOUT.find(l=>l.handle===n);if(o)return o}if(!this.entitiesCache){this.entitiesCache={};let a=this.entitiesCache;Object.values(e.entities).forEach(o=>{a[o.handle]=o})}let s=this.entitiesCache[i.ownerHandle];return s?this.getLayout(e,s):(ne.warn("[DxfLoader] Failed to find layout name for entity:",i),e.objects.LAYOUT.find(a=>a.layoutName===Ri.MODEL_LAYOUT_NAME))}getLayerVisible(e,i){var s,a,o;let n=(a=(s=e.tables)==null?void 0:s.layer)==null?void 0:a.layers;return n&&((o=n[i])==null?void 0:o.visible)}getLayerFrozen(e,i){var s,a,o;let n=(a=(s=e.tables)==null?void 0:s.layer)==null?void 0:a.layers;return n&&((o=n[i.layer])==null?void 0:o.frozen)}updateMaterialUniforms(e){e instanceof Yt&&(e.uniforms.u_cameraZoom&&(e.uniforms.u_cameraZoom=Ri.cameraZoomUniform),e.uniforms.u_viewportScale&&(e.uniforms.u_viewportScale=Ri.viewportScaleUniform))}cloneMaterialsForSpatialFilter(e){let i=new Map,n=s=>{let a;return Array.isArray(s)?(a=[],s.forEach(o=>{if(i.has(o.id))a.push(i.get(o.id));else{let l=o.clone();this.updateMaterialUniforms(l),i.set(o.id,l),a.push(l)}})):s&&(i.has(s.id)?a=i.get(s.id):(a=s.clone(),this.updateMaterialUniforms(a),i.set(s.id,a))),a};e.traverse(s=>{s.material&&(s.material=n(s.material))})}getLineTypeScales(){let e={ltScale:1,celtScale:1};return this.header&&(e.ltScale=this.header.$LTSCALE||1,e.celtScale=this.header.$CELTSCALE||1),e}static getDxfUnits(e){switch(e||0){case 0:return"Unitless";case 1:return"Inches";case 2:return"Feet";case 4:return"Millimeters";case 5:return"Centimeters";case 6:return"Meters";default:ne.warn(`[DxfLoader] Unsupported $INSUNITS '${e}'`);break}return"Unitless"}static computeLineDistance(e){let i=e.isLineSegments===!0,n=e.geometry,s=e.matrixWorld;if(n.index&&(ne.debug(`[DxfLoader] Line with id '${e.id}' contains index buffer, going to convert it to non-indexed.`),n=Wt.convertGeometryWithIndexedToNonIndexed(n)),n.index===null){let a=n.attributes.position;if(!a||a.count===0)return;let o=[];if(i)for(let l=0,c=a.count;l{let s=n;s.isLine&&s.material instanceof Yt&&Ri.computeLineDistance(s)}),ne.debug(`[DxfLoader] Computed line distances in ${(Date.now()-i)/1e3}s`)}static merge(e){let i={};e.objects.LAYOUT.forEach(p=>{var f;let d=p;i[d.layoutName]=d,(f=d.directAssociatedLeafObjectSet)==null||f.clear()});let n=Date.now(),s={},a={},o=15e3,l=0,c=0,u=()=>{let p=Date.now();for(let d in s){let f=s[d];Ri.removeEmptyObjectsFromRemovingMarkedObjects(f.children,f.object),f.children=[]}l=0,c+=Date.now()-p};for(let p in e.layersAndThreejsObjects){let d=e.layersAndThreejsObjects[p];if(d.length<=1)continue;let f=Date.now(),m={};for(let y of d){let E,b=y;for(;b;){if(b.userData.isLayoutLevelObject){E=b;break}b=b.parent}if(!E)continue;let x=E.name;m[x]||(m[x]={object:E,children:[]}),m[x].children.push(y)}let g=[];for(let y in m){let E;if(y!==Ri.MODEL_LAYOUT_NAME){let _=i[y];_.directAssociatedLeafObjectSet||(_.directAssociatedLeafObjectSet=new Set),E=_.directAssociatedLeafObjectSet}let b=m[y],x=ji.deepMerge(b.children,b.object,!1,!1,!0),S=x.added,D=x.removed;s[y]||(s[y]={object:b.object,children:[]}),a[y]||(a[y]={object:b.object,children:[]});let P=D.length>o;if(P){let _=Date.now();Ri.removeEmptyObjectsFromRemovingMarkedObjects(D,b.object),c+=Date.now()-_}else l+=D.length;if(D.length===b.children.length)P||D.forEach(_=>{s[y].children.push(_)});else{let _=D;D.length>=100&&(_=new Set(D));let w=F=>Array.isArray(_)?_.indexOf(F)>=0:_.has(F);for(let F=0;Fo&&u()}e.layersAndThreejsObjects[p]=g,ne.debug(`[DxfLoader] Merged layer '${p}' in ${(Date.now()-f)/1e3}s`)}l>0&&u();for(let p in a){let d=a[p];e.threejsObject.children.find(m=>m.name===p)||e.threejsObject.add(d.object),d.children.forEach(m=>{d.object.add(m),m.updateWorldMatrix(!1,!1)}),d.children=[]}ne.debug(`[DxfLoader] MergeUtils.deepMerge costed ${ji.mergeInfo.elapsedTime/1e3}s`),ne.debug(`[DxfLoader] The remove operation of deep merge costed ${c/1e3}s`),ne.debug(`[DxfLoader] Deep merge totally costed ${(Date.now()-n)/1e3}s`);let h=ji.mergeInfo;ne.debug(`[DxfLoader] Totally merged ${h.removedObjects} objects to ${h.mergedMeshes} meshes, ${h.mergedLines} lines, ${h.mergedPoints} points, ${h.mergedUnknownTypeObjects?h.mergedUnknownTypeObjects+" unknown type,":""} `)}static statLayoutAndLayerObjects(e){let i=new WeakSet,n=0;for(let o in e.layersAndThreejsObjects)e.layersAndThreejsObjects[o].forEach(c=>{c.geometry&&(n++,i.has(c)?console.warn(c):i.add(c))});let s=new WeakSet,a=0;if(e.threejsObject.traverse(o=>{o.geometry&&(a++,s.has(o)?console.warn(o):s.add(o))}),n!=a)for(let o in e.layersAndThreejsObjects)e.layersAndThreejsObjects[o].forEach(c=>{c.geometry&&(s.has(c)||console.warn(c))});ne.info(`[DxfLoader] The count of layer objects is ${n},The count of layout objects is ${a} `)}static removeEmptyObjectsFromRemovingMarkedObjects(e,i){if(e.length===0)return;let n=s=>{let a=[];for(let o of s){o.userData.validCount=0;let l=o.parent;l&&l!==i&&(l.userData.validCount===void 0&&(l.userData.validCount=l.children.length),--l.userData.validCount===0&&a.push(l))}a.length>0&&n(a)};n(e),this.removeEmptyObjectsFromMark(i)}static removeEmptyObjectsFromMark(e){if(e.userData.validCount===0||Qr.isEmptyObject(e))return e.removeFromParent(),!0;for(let i=0;i>3],i=r&7;return(e&128>>i)>>7-i}setBit(r,e){var i=r>>3,n=this.u8[i],s=r&7;e?this.u8[i]=n|128>>s:this.u8[i]=n&~(128>>s)}getInt12(r){var e=r/8|0,i=this.u8[e],n=this.u8[e+1],s=this.u8[e+2],a=r%8,o=8-a,l=Math.min(12-o,8),c=Math.max(12-o-l,0),u=~(255<>12-a)-2048}setInt12(r,e){e+=2048;var i=r/8|0,n=r%8,s=e<<12-n,a=(s&16711680)>>16,o=(s&65280)>>8,l=s&255,c=8-n,u=Math.min(12-c,8),h=Math.max(12-c-u,0),p=255<>8-(2-s))),c=255<<8-o;return i&=l,n&=c,((i<<8)+n>>10-s)-32}setInt6(r,e){e+=32;var i=r/8|0,n=r%8,s=e<<10-n,a=(s&65280)>>8,o=s&255,l=8-n,c=Math.max(6-l,0),u=(255<>8-(2-n));this.u8[i]=(this.u8[i]&u)+a;var h=~(255<<8-c);this.u8[i+1]=(this.u8[i+1]&h)+o}test(){var r=new ArrayBuffer(3),e=new _0(r),i,n;for(n=0;n<12;n++)for(i=-2048;i<2048;i++)if(e.setInt12(n,i),e.getInt12(n)!=i){console.log("12-bit prob at",n,i),console.log("expected",i,"got",e.getInt12(n));break}for(n=0;n<18;n++)for(i=-32;i<32;i++)if(e.setInt6(n,i),e.getInt6(n)!=i){console.log("6-bit prob at",n,i),console.log("expected",i,"got",e.getInt6(n));break}return e}};var oO=class{parse(r){var e={},i=new DataView(r),n=0;if(e.fileCode=i.getInt32(n,!1),e.fileCode!=9994)throw new Error("Unknown file code: "+e.fileCode);for(n+=6*4,e.wordLength=i.getInt32(n,!1),e.byteLength=e.wordLength*2,n+=4,e.version=i.getInt32(n,!0),n+=4,e.shapeType=i.getInt32(n,!0),n+=4,e.minX=i.getFloat64(n,!0),e.minY=i.getFloat64(n+8,!0),e.maxX=i.getFloat64(n+16,!0),e.maxY=i.getFloat64(n+24,!0),e.minZ=i.getFloat64(n+32,!0),e.maxZ=i.getFloat64(n+40,!0),e.minM=i.getFloat64(n+48,!0),e.maxM=i.getFloat64(n+56,!0),n+=8*8,e.records=[];ng.push(...b));let y=new it;y.setFromPoints(f),y.setIndex(g),e.push(y);let E=new it;f.length>2&&!f[0].equals(f[f.length-1])&&f.push(f[0]),E.setFromPoints(f),i.push(E)}else{let m=new it;m.setFromPoints(f),i.push(m)}}}for(var d=new pr,n=0;n1023||Math.abs(a-r[l+1])>1023?(i.push(n),o+=1,n=[],s=r[l],a=r[l+1],n.push(s,a),o+=4,l++):(n.push((r[l]-s)/8,(r[l+1]-a)/8),s+=((r[l]-s)/8|0)*8,a+=((r[l+1]-a)/8|0)*8,o+=2,l++)}return this.storeDeltas(o,e)}deltaEncode6(r){var e=[],i=[],n=[],s=0,a=0,o=0,l=0;for(o=0;o31||Math.abs(a-r[o+1])>31?(i.push(n),l+=1,n=[],s=r[o],a=r[o+1],n.push(s,a),l+=4,o++):(n.push(r[o]-s,r[o+1]-a),s+=r[o]-s,a+=r[o+1]-a,l+=2,o++)}return this.storeDeltas6(l,e)}storeDeltas(r,e){for(var i=new ArrayBuffer(r),n=new DataView(i),s=0,a=0;a{this.updateProgress(i,50);let o=new oO().parse(s.response),l=new lO().createModel(o);this.updateProgress(i,99),e(l)},s.onerror=n,s.open("GET",r),s.send(null)})}updateProgress(r,e){if(r){let i={lengthComputable:!0,loaded:e,total:100};r(new ProgressEvent("progress",i))}}};var u2t="three/js/libs/draco/gltf/",Zc=class{constructor(r){this.manager=r}loadLocalModel(r,e,i){return ot(this,null,function*(){let n=e.toLowerCase();return n.endsWith("fbx")?this.loadFbx(r,i):n.endsWith("obj")?this.loadObj(r,i):n.endsWith("stl")?this.loadStl(r,i):n.endsWith("ifc")?this.loadIfc(r,i):n.endsWith("shp")?this.loadShp(r,i):n.endsWith("dae")?this.loadDae(r,i):n.endsWith("dxf")?this.loadDxf(r,i):n.endsWith("jpg")||n.endsWith("jpeg")||n.endsWith("png")?this.loadImage(r,i):this.loadGltf(r,i)})}loadModel(r,e,i){return ot(this,null,function*(){let n=r;if(!n)return Promise.resolve();let s=(e==null?void 0:e.toLowerCase())||"";if(!s){let a=n.split("?")[0].toLowerCase();if(a){let o=a.lastIndexOf(".");o!==-1&&(s=a.slice(o+1))}}return s.endsWith("fbx")?this.loadFbx(n,i):s.endsWith("obj")?this.loadObj(n,i):s.endsWith("stl")?this.loadStl(n,i):s.endsWith("ifc")?this.loadIfc(n,i):s.endsWith("shp")?this.loadShp(n,i):s.endsWith("dae")?this.loadDae(n,i):s.endsWith("dxf")?this.loadDxf(n,i):s.endsWith("jpg")||s.endsWith("jpeg")||s.endsWith("png")?this.loadImage(n,i):this.loadGltf(n,i)})}loadGltf(r,e){return ot(this,null,function*(){let i=this.getGltfLoader();r.indexOf("#")!==-1&&console.warn(`[LoadingHelper] '#' is not allowed in filename ${r}`),r=r.replace(/#/g,encodeURIComponent("#"));let n=yield i.loadAsync(r,e);return Promise.resolve(n.scene)})}parseGltf(r,e,i,n){return this.getGltfLoader().parse(r,e,a=>i(a.scene),n)}loadFbx(r,e){return ot(this,null,function*(){let n=yield new KC(this.manager).loadAsync(r,e);return Promise.resolve(n)})}loadObj(r,e){return ot(this,null,function*(){let i=new AA(this.manager),n=new DA(this.manager),s=r.replace(".obj",".mtl"),a=yield n.loadAsync(s,e);a.preload(),i.setMaterials(a);let o=yield i.loadAsync(r,e);return Promise.resolve(o)})}loadStl(r,e){return ot(this,null,function*(){let n=yield new NA(this.manager).loadAsync(r,e);return Promise.resolve(new Je(n))})}loadIfc(r,e){return ot(this,null,function*(){let i=new MA(this.manager),n=i.ifcManager;n&&typeof n.setWasmPath=="function"&&n.setWasmPath("../three/js/libs/ifc/");let s=yield i.loadAsync(r,e);return Promise.resolve(s.mesh)})}loadShp(r,e){return ot(this,null,function*(){let i=new cO;return new Promise((n,s)=>{i.load(r,a=>{n(a)},e,a=>{s(a)})})})}loadDae(r,e){return ot(this,null,function*(){let n=yield new YC(this.manager).loadAsync(r,e);return Promise.resolve(n.scene)})}loadDxf(r,e){return ot(this,null,function*(){this.font||console.warn("[LoadingHelper] Should set font first!");let i=new xr;try{let n=yield i.loadAsync(r,e);return Promise.resolve(n.threejsObject)}catch(n){let s=new ErrorEvent("");return Promise.reject(s)}})}loadPly(r,e){return ot(this,null,function*(){let n=yield new PA(this.manager).loadAsync(r,e);return Promise.resolve(new Je(n))})}loadImage(r,e){return ot(this,null,function*(){let n=yield new Es(this.manager).loadAsync(r,e);if(!n)return Promise.reject("Failed to load image!");let s=10,a=n.image,o=a&&a.height||s,l=a&&a.width||s;o=s/l*o,l=s;let c=new or({map:n,side:wi,transparent:!0}),u=new ts(l,o),h=new Je(u,c);return Promise.resolve(h)})}loadDxfDataAsync(r,e,i,n,s,a){return ot(this,null,function*(){var l;this.font||console.warn("[LoadingHelper] Should set font first!");let o=new xr(s,a);return o.setFont(this.font),o.manager.onLoad=()=>{n&&n()},this.font.getFontData&&(yield(l=this.font)==null?void 0:l.getFontData()),o.load(r,e,i)})}setFont(r){this.font=r}getGltfLoader(){if(!this.gltfLoader){this.gltfLoader=new Yu(this.manager);let r=new XC(this.manager);r.setDecoderPath(u2t),this.gltfLoader.setDRACOLoader(r)}return this.gltfLoader}};var JT=class{constructor(r){this.running=!1;this.workers=[];let e=1;r?e=r:window.navigator&&(e=Math.max(e,window.navigator.hardwareConcurrency-1));for(let i=0;i{let s=this.workers.length,a=r.length,o=[],l=Math.floor(a/s),c=a%s,u=0,h=0;for(let p=0;p=h)break;ne.debug("startIndex: "+u+" endIndex: "+h),o.push(d.generate(r.slice(u,h),e))}Promise.allSettled(o).then(()=>{this.running=!1,n()})})})}dispose(){for(let r=0;r{n.traverse(s=>{let a=s;if(a.isMesh&&a.geometry&&ji.isMergedMesh(a)&&!(a instanceof tn)){if(i.has(a.geometry.id))return;a.geometry.index&&e.saveOriginalIndex&&(a.geometry.userData.originalIndex=a.geometry.index.array.slice()),a.geometry.boundsTree=new Nc(a.geometry,e),i.add(a.geometry.id)}})})}static createMeshBvhAsync(r,e={}){let i=new Set,n=[];r.forEach(a=>{a.traverse(o=>{let l=o;if(l.isMesh&&l.geometry&&ji.isMergedMesh(l)&&!(l instanceof tn)){if(i.has(l.geometry.id))return;n.push(l.geometry),i.add(l.geometry.id)}})});let s=new JT;s.generate(n,e).then(()=>{s.dispose()})}};function QT(t){return{type:t}}var ch={movable:!1,startDistBetweenFingers:0,scale:1},eE=2*Math.PI,wMe=1e-6,uO=class extends Ra{constructor(e,i,n=!1){super();this.enabled=!0;this.target=new A;this.enableZoom=!1;this.enablePan=!1;this.enableRotate=!0;this.state=-1;this.rotateSpeed=1;this.zoomSpeed=1;this.panSpeed=1;this.scale=1;this.minZoom=0;this.maxZoom=1/0;this.screenSpacePanning=!0;this.autoRotate=!0;this.autoRotateSpeed=2;this.enableDamping=!1;this.dampingFactor=.05;this.minAzimuthAngle=-1/0;this.maxAzimuthAngle=1/0;this.minPolarAngle=0;this.maxPolarAngle=Math.PI;this.minDistance=0;this.maxDistance=1/0;this.keyPanSpeed=7;this.minFov=50;this.maxFov=95;this.zoomChanged=!1;this.panOffset=new A;this.pointerPositions={};this.rotateStart=new le;this.rotateEnd=new le;this.rotateDelta=new le;this.dollyStart=new le;this.dollyEnd=new le;this.dollyDelta=new le;this.panStart=new le;this.panEnd=new le;this.panDelta=new le;this.pointers=[];this.spherical=new Pc;this.sphericalDelta=new Pc;this.update=function(e){let i=new A,n=new A,s=new Or;return function(){let o=e.quat,l=o.clone().invert(),c=e.object.position;i.copy(c).sub(e.target),i.applyQuaternion(o),e.spherical.setFromVector3(i),e.autoRotate&&e.state===-1&&(e.isVRMode?e.sphericalDelta.theta+=eE/60/60*e.autoRotateSpeed:e.sphericalDelta.theta-=eE/60/60*e.autoRotateSpeed),e.enableDamping?(e.spherical.theta+=e.sphericalDelta.theta*e.dampingFactor,e.spherical.phi+=e.sphericalDelta.phi*e.dampingFactor):(e.spherical.theta+=e.sphericalDelta.theta,e.spherical.phi+=e.sphericalDelta.phi);let u=e.minAzimuthAngle,h=e.maxAzimuthAngle;return isFinite(u)&&isFinite(h)&&(u<-Math.PI?u+=eE:u>Math.PI&&(u-=eE),h<-Math.PI?h+=eE:h>Math.PI&&(h-=eE),u<=h?e.spherical.theta=Math.max(u,Math.min(h,e.spherical.theta)):e.spherical.theta=e.spherical.theta>(u+h)/2?Math.max(u,e.spherical.theta):Math.min(h,e.spherical.theta)),e.spherical.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,e.spherical.phi)),e.spherical.makeSafe(),e.spherical.radius*=e.scale,e.spherical.radius=Math.max(e.minDistance,Math.min(e.maxDistance,e.spherical.radius)),e.enableDamping===!0?e.target.addScaledVector(e.panOffset,e.dampingFactor):e.target.add(e.panOffset),i.setFromSpherical(e.spherical),i.applyQuaternion(l),c.copy(e.target).add(i),e.object.lookAt(e.target),e.enableDamping===!0?(e.sphericalDelta.theta*=1-e.dampingFactor,e.sphericalDelta.phi*=1-e.dampingFactor,e.panOffset.multiplyScalar(1-e.dampingFactor)):(e.sphericalDelta.set(0,0,0),e.panOffset.set(0,0,0)),e.scale=1,e.zoomChanged||n.distanceToSquared(e.object.position)>wMe||8*(1-s.dot(e.object.quaternion))>wMe?(e.dispatchEvent(QT("change")),n.copy(e.object.position),s.copy(e.object.quaternion),e.zoomChanged=!1,!0):!1}}(this);this.onContextMenu=function(e){return i=>{e.enabled!==!1&&i.preventDefault()}}(this);this.onPointerDown=function(e){return i=>{e.enabled!==!1&&(e.pointers.length===0&&(e.domElement.setPointerCapture(i.pointerId),e.domElement.addEventListener("pointermove",e.onPointerMove),e.domElement.addEventListener("pointerup",e.onPointerUp)),e.addPointer(i),i.pointerType==="touch"?e.onTouchStart(i):e.onMouseDown(i))}}(this);this.onPointerMove=function(e){return i=>{e.enabled!==!1&&(i.pointerType==="touch"?e.onTouchMove(i):e.onMouseMove(i))}}(this);this.onPointerUp=function(e){return i=>{e.removePointer(i),e.pointers.length===0&&(e.domElement.releasePointerCapture(i.pointerId),e.domElement.removeEventListener("pointermove",e.onPointerMove),e.domElement.removeEventListener("pointerup",e.onPointerUp)),i.pointerType==="touch"&&e.handlerTouchEnd(i),e.dispatchEvent(QT("end")),e.state=-1}}(this);this.onPointerCancel=function(e){return i=>{e.removePointer(i),e.handlerTouchEnd(i)}}(this);this.onMouseWheel=function(e){return i=>{e.enabled===!1||e.enableZoom===!1||e.state!==-1||(i.preventDefault(),i.stopPropagation(),e.dispatchEvent(QT("start")),e.handleMouseWheel(i),e.dispatchEvent(QT("end")))}}(this);this.pan=function(e){let i=new A;return function(s,a){let o=e.domElement;if(e.object instanceof qr){let l=e.object.position;i.copy(l).sub(e.target);let c=i.length();c*=Math.tan(e.object.fov/2*Math.PI/180),e.panLeft(2*s*c/o.clientHeight,e.object.matrix),e.panUp(2*a*c/o.clientHeight,e.object.matrix)}else console.warn("WARNING: VRControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1}}(this);this.panLeft=function(e){let i=new A;return function(s,a){i.setFromMatrixColumn(a,0),i.multiplyScalar(-s),e.panOffset.add(i)}}(this);this.panUp=function(e){let i=new A;return function(s,a){e.screenSpacePanning===!0?i.setFromMatrixColumn(a,1):(i.setFromMatrixColumn(a,0),i.crossVectors(e.object.up,i)),i.multiplyScalar(s),e.panOffset.add(i)}}(this);this.onKeyDown=e=>{this.enabled===!1||this.enablePan===!1||this.handleKeyDown(e)};this.object=e,this.domElement=i,this.isVRMode=n,this.quat=new Or().setFromUnitVectors(this.object.up,new A(0,1,0)),this.domElement&&this.domElement.style&&(this.domElement.style.touchAction="none"),this.domElement.addEventListener("contextmenu",this.onContextMenu),this.domElement.addEventListener("pointerdown",this.onPointerDown),this.domElement.addEventListener("pointercancel",this.onPointerCancel),this.domElement.addEventListener("wheel",this.onMouseWheel,{passive:!1}),this.update()}dispose(){this.domElement.removeEventListener("contextmenu",this.onContextMenu),this.domElement.removeEventListener("pointerdown",this.onPointerDown),this.domElement.removeEventListener("pointercancel",this.onPointerCancel),this.domElement.removeEventListener("wheel",this.onMouseWheel),this.domElement.removeEventListener("pointermove",this.onPointerMove),this.domElement.removeEventListener("pointerup",this.onPointerUp),this.domElementKeyEvents&&this.domElementKeyEvents.removeEventListener("keydown",this.onKeyDown)}addPointer(e){this.pointers.push(e)}removePointer(e){delete this.pointerPositions[e.pointerId];for(let i=0;i0&&this.dollyOut(i),this.update()}handleMouseDownRotate(e){this.rotateStart.set(e.clientX,e.clientY)}handleMouseDownDolly(e){this.dollyStart.set(e.clientX,e.clientY)}handleMouseDownPan(e){this.panStart.set(e.clientX,e.clientY)}handleTouchStartRotate(){if(this.pointers.length===1)this.rotateStart.set(this.pointers[0].pageX,this.pointers[0].pageY);else{let e=.5*(this.pointers[0].pageX+this.pointers[1].pageX),i=.5*(this.pointers[0].pageY+this.pointers[1].pageY);this.rotateStart.set(e,i)}}handleTouchStartDolly(e){if(e.length<2)return;let i=e[0],n=e[1];ch.startDistBetweenFingers=this.getDist([i.pageX,i.pageY],[n.pageX,n.pageY]),ch.movable=!0,ch.scale=1}updateRotate(){let e=this.isVRMode,i=this.sphericalDelta;this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart).multiplyScalar(this.rotateSpeed);let n=this.domElement;e?(i.theta+=2*Math.PI*this.rotateDelta.x/n.clientHeight,i.phi+=2*Math.PI*this.rotateDelta.y/n.clientHeight):(i.theta-=2*Math.PI*this.rotateDelta.x/n.clientHeight,i.phi-=2*Math.PI*this.rotateDelta.y/n.clientHeight),this.rotateStart.copy(this.rotateEnd)}handleMouseMoveRotate(e){this.rotateEnd.set(e.clientX,e.clientY),this.updateRotate()}dollyOut(e){this.object instanceof qr?this.scale/=e:(console.warn("WARNING: VRControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}dollyIn(e){this.object instanceof qr?this.scale*=e:(console.warn("WARNING: VRControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}handleMouseMoveDolly(e){this.dollyEnd.set(e.clientX,e.clientY),this.dollyDelta.subVectors(this.dollyEnd,this.dollyStart);let i=Math.pow(.95,this.zoomSpeed);this.dollyDelta.y>0?this.dollyOut(i):this.dollyIn(i),this.dollyStart.copy(this.dollyEnd)}handleMouseMovePan(e){this.panEnd.set(e.clientX,e.clientY),this.panDelta.subVectors(this.panEnd,this.panStart).multiplyScalar(this.panSpeed),this.pan(this.panDelta.x,this.panDelta.y),this.panStart.copy(this.panEnd)}getSecondPointerPosition(e){let i=e.pointerId===this.pointers[0].pointerId?this.pointers[1]:this.pointers[0];return this.pointerPositions[i.pointerId]}handleTouchMoveRotate(e){if(this.pointers.length==1)this.rotateEnd.set(e.pageX,e.pageY);else{let i=this.getSecondPointerPosition(e),n=.5*(e.pageX+i.x),s=.5*(e.pageY+i.y);this.rotateEnd.set(n,s)}this.updateRotate()}updateFov(e){var u;let i=this.object;if(!i||!(i instanceof qr)){console.warn("WARNING: VRControls.js encountered an unknown camera type - updateFov disabled.");return}let n=this.minFov,s=this.maxFov,a=h=>{let p=i.fov+h;p=Math.min(p,s),p=Math.max(p,n),i.fov!==p&&(i.fov=p,i.updateProjectionMatrix(),this.dispatchEvent({type:"change"}))},o=20,l=5,c=e/o;for(let h=0;ha(c),h*l);this.autoRotate&&((u=this.controlsHelper)==null||u.delayAutoRotate())}handleTouchMoveDolly(e){if(!ch.movable||this.pointers.length<2)return;let i=this.getSecondPointerPosition(e),n=[e.pageX,e.pageY],s=[i.x,i.y],a=ch.startDistBetweenFingers,o=this.getDist(n,s);if(!a||!o||Math.abs(a-o)<10)return;let l=o/a;console.log(l);let c=3;l=Math.min(l,c),l=Math.max(l,1/c);let u=.05,h=l-ch.scale;if(Math.abs(h)0,d=0;p?d=-h*10:d=(ch.scale/l-1)*10,this.updateFov(d),ch.scale=l}handleKeyDown(e){let i=!1;switch(e.code){case"ArrowUp":this.pan(0,this.keyPanSpeed),i=!0;break;case"ArrowDown":this.pan(0,-this.keyPanSpeed),i=!0;break;case"ArrowLeft":this.pan(this.keyPanSpeed,0),i=!0;break;case"ArrowRight":this.pan(-this.keyPanSpeed,0),i=!0;break}i&&(e.preventDefault(),this.update())}listenToKeyEvents(e){e.addEventListener("keydown",this.onKeyDown),this.domElementKeyEvents=e}};var Ps={LEFT:1,RIGHT:2,MIDDLE:4},Nt=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768});function w0(t){return t.isPerspectiveCamera}function Xf(t){return t.isOrthographicCamera}var tE=Math.PI*2,RMe=Math.PI/2,FMe=1e-5;function _n(t,r=FMe){return Math.abs(t){r.x+=e.clientX,r.y+=e.clientY}),r.x/=t.length,r.y/=t.length}function H8(t,r){return Xf(t)?(console.warn(`${r} is not supported in OrthographicCamera`),!0):!1}function DMe(t){return t.invert?t.invert():t.inverse(),t}var V8=class{constructor(){this._listeners={}}addEventListener(r,e){let i=this._listeners;i[r]===void 0&&(i[r]=[]),i[r].indexOf(e)===-1&&i[r].push(e)}removeEventListener(r,e){let n=this._listeners[r];if(n!==void 0){let s=n.indexOf(e);s!==-1&&n.splice(s,1)}}removeAllEventListeners(r){if(!r){this._listeners={};return}Array.isArray(this._listeners[r])&&(this._listeners[r].length=0)}dispatchEvent(r){let i=this._listeners[r.type];if(i!==void 0){r.target=this;let n=i.slice(0);for(let s=0,a=n.length;s{},this._enabled=!0,this._state=Nt.NONE,this._viewport=null,this._dollyControlAmount=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._activePointers=[],this._truckInternal=(i,n,s)=>{if(w0(this._camera)){let a=pi.copy(this._camera.position).sub(this._target),o=this._camera.getEffectiveFOV()*mr.MathUtils.DEG2RAD,l=a.length()*Math.tan(o*.5),c=this.truckSpeed*i*l/this._elementRect.height,u=this.truckSpeed*n*l/this._elementRect.height;this.verticalDragToForward?(s?this.setFocalOffset(this._focalOffsetEnd.x+c,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(c,0,!0),this.forward(-u,!0)):s?this.setFocalOffset(this._focalOffsetEnd.x+c,this._focalOffsetEnd.y+u,this._focalOffsetEnd.z,!0):this.truck(c,u,!0)}else if(Xf(this._camera)){let a=this._camera,o=i*(a.right-a.left)/a.zoom/this._elementRect.width,l=n*(a.top-a.bottom)/a.zoom/this._elementRect.height;s?this.setFocalOffset(this._focalOffsetEnd.x+o,this._focalOffsetEnd.y+l,this._focalOffsetEnd.z,!0):this.truck(o,l,!0)}},this._rotateInternal=(i,n)=>{let s=tE*this.azimuthRotateSpeed*i/this._elementRect.height,a=tE*this.polarRotateSpeed*n/this._elementRect.height;this.rotate(s,a,!0)},this._dollyInternal=(i,n,s)=>{let a=Math.pow(.95,-i*this.dollySpeed),o=this._sphericalEnd.radius*a,l=this._sphericalEnd.radius,c=l*(i>=0?-1:1);this.dollyTo(o),this.infinityDolly&&(o{let a=Math.pow(.95,i*this.dollySpeed),o=this._zoomEnd;this.zoomTo(this._zoom*a),this.dollyToCursor&&(this._dollyControlAmount+=this._zoomEnd-o,this._dollyControlCoord.set(n,s))},typeof mr=="undefined"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=r,this._yAxisUpSpace=new mr.Quaternion().setFromUnitVectors(this._camera.up,pO),this._yAxisUpSpaceInverse=DMe(this._yAxisUpSpace.clone()),this._state=Nt.NONE,this._domElement=e,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._target=new mr.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new mr.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new mr.Spherical().setFromVector3(pi.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._nearPlaneCorners=[new mr.Vector3,new mr.Vector3,new mr.Vector3,new mr.Vector3],this._updateNearPlaneCorners(),this._boundary=new mr.Box3(new mr.Vector3(-1/0,-1/0,-1/0),new mr.Vector3(1/0,1/0,1/0)),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlAmount=0,this._dollyControlCoord=new mr.Vector2,this.mouseButtons={left:Nt.ROTATE,middle:Nt.DOLLY,right:Nt.TRUCK,wheel:w0(this._camera)?Nt.DOLLY:Xf(this._camera)?Nt.ZOOM:Nt.NONE},this.touches={one:Nt.TOUCH_ROTATE,two:w0(this._camera)?Nt.TOUCH_DOLLY_TRUCK:Xf(this._camera)?Nt.TOUCH_ZOOM_TRUCK:Nt.NONE,three:Nt.TOUCH_TRUCK},this._domElement){let i=new mr.Vector2,n=new mr.Vector2,s=new mr.Vector2,a=S=>{if(!this._enabled)return;let D={pointerId:S.pointerId,clientX:S.clientX,clientY:S.clientY,deltaX:0,deltaY:0};this._activePointers.push(D),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",p),this._domElement.ownerDocument.addEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",p),E(S)},o=S=>{if(!this._enabled)return;let D={pointerId:0,clientX:S.clientX,clientY:S.clientY,deltaX:0,deltaY:0};this._activePointers.push(D),this._domElement.ownerDocument.removeEventListener("mousemove",u),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.addEventListener("mousemove",u),this._domElement.ownerDocument.addEventListener("mouseup",d),E(S)},l=S=>{this._enabled&&(S.preventDefault(),Array.prototype.forEach.call(S.changedTouches,D=>{let P={pointerId:D.identifier,clientX:D.clientX,clientY:D.clientY,deltaX:0,deltaY:0};this._activePointers.push(P)}),this._domElement.ownerDocument.removeEventListener("touchmove",h,{passive:!1}),this._domElement.ownerDocument.removeEventListener("touchend",f),this._domElement.ownerDocument.addEventListener("touchmove",h,{passive:!1}),this._domElement.ownerDocument.addEventListener("touchend",f),E(S))},c=S=>{S.cancelable&&S.preventDefault();let D=S.pointerId,P=this._findPointerById(D);if(P){if(P.clientX=S.clientX,P.clientY=S.clientY,P.deltaX=S.movementX,P.deltaY=S.movementY,S.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=0,(S.buttons&Ps.LEFT)===Ps.LEFT&&(this._state=this._state|this.mouseButtons.left),(S.buttons&Ps.MIDDLE)===Ps.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(S.buttons&Ps.RIGHT)===Ps.RIGHT&&(this._state=this._state|this.mouseButtons.right);b()}},u=S=>{let D=this._findPointerById(0);D&&(D.clientX=S.clientX,D.clientY=S.clientY,D.deltaX=S.movementX,D.deltaY=S.movementY,this._state=0,(S.buttons&Ps.LEFT)===Ps.LEFT&&(this._state=this._state|this.mouseButtons.left),(S.buttons&Ps.MIDDLE)===Ps.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(S.buttons&Ps.RIGHT)===Ps.RIGHT&&(this._state=this._state|this.mouseButtons.right),b())},h=S=>{S.cancelable&&S.preventDefault(),Array.prototype.forEach.call(S.changedTouches,D=>{let P=D.identifier,_=this._findPointerById(P);_&&(_.clientX=D.clientX,_.clientY=D.clientY)}),b()},p=S=>{let D=S.pointerId,P=this._findPointerById(D);if(P&&this._activePointers.splice(this._activePointers.indexOf(P),1),S.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=Nt.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=Nt.NONE;x()},d=()=>{let S=this._findPointerById(0);S&&this._activePointers.splice(this._activePointers.indexOf(S),1),this._state=Nt.NONE,x()},f=S=>{switch(Array.prototype.forEach.call(S.changedTouches,D=>{let P=D.identifier,_=this._findPointerById(P);_&&this._activePointers.splice(this._activePointers.indexOf(_),1)}),this._activePointers.length){case 0:this._state=Nt.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}x()},m=-1,g=S=>{if(!this._enabled||this.mouseButtons.wheel===Nt.NONE)return;if(S.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===Nt.ROTATE||this.mouseButtons.wheel===Nt.TRUCK){let F=performance.now();m-F<1e3&&this._getClientRect(this._elementRect),m=F}let D=h2t?-1:-3,P=S.deltaMode===1?S.deltaY/D:S.deltaY/(D*10),_=this.dollyToCursor?(S.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,w=this.dollyToCursor?(S.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case Nt.ROTATE:{this._rotateInternal(S.deltaX,S.deltaY);break}case Nt.TRUCK:{this._truckInternal(S.deltaX,S.deltaY,!1);break}case Nt.OFFSET:{this._truckInternal(S.deltaX,S.deltaY,!0);break}case Nt.DOLLY:{this._dollyInternal(-P,_,w);break}case Nt.ZOOM:{this._zoomInternal(-P,_,w);break}}this.dispatchEvent({type:"control"})},y=S=>{this._enabled&&S.preventDefault()},E=S=>{if(!this._enabled)return;if(F8(this._activePointers,bo),this._getClientRect(this._elementRect),i.copy(bo),n.copy(bo),this._activePointers.length>=2){let P=bo.x-this._activePointers[1].clientX,_=bo.y-this._activePointers[1].clientY,w=Math.sqrt(P*P+_*_);s.set(0,w);let F=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,X=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;n.set(F,X)}if("touches"in S||"pointerType"in S&&S.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=0,(S.buttons&Ps.LEFT)===Ps.LEFT&&(this._state=this._state|this.mouseButtons.left),(S.buttons&Ps.MIDDLE)===Ps.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(S.buttons&Ps.RIGHT)===Ps.RIGHT&&(this._state=this._state|this.mouseButtons.right);this.dispatchEvent({type:"controlstart"})},b=()=>{if(!this._enabled)return;F8(this._activePointers,bo);let S=this._domElement&&document.pointerLockElement===this._domElement,D=S?-this._activePointers[0].deltaX:n.x-bo.x,P=S?-this._activePointers[0].deltaY:n.y-bo.y;if(n.copy(bo),((this._state&Nt.ROTATE)===Nt.ROTATE||(this._state&Nt.TOUCH_ROTATE)===Nt.TOUCH_ROTATE||(this._state&Nt.TOUCH_DOLLY_ROTATE)===Nt.TOUCH_DOLLY_ROTATE||(this._state&Nt.TOUCH_ZOOM_ROTATE)===Nt.TOUCH_ZOOM_ROTATE)&&this._rotateInternal(D,P),(this._state&Nt.DOLLY)===Nt.DOLLY||(this._state&Nt.ZOOM)===Nt.ZOOM){let _=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,w=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;this._state===Nt.DOLLY?this._dollyInternal(P*hO,_,w):this._zoomInternal(P*hO,_,w)}if((this._state&Nt.TOUCH_DOLLY)===Nt.TOUCH_DOLLY||(this._state&Nt.TOUCH_ZOOM)===Nt.TOUCH_ZOOM||(this._state&Nt.TOUCH_DOLLY_TRUCK)===Nt.TOUCH_DOLLY_TRUCK||(this._state&Nt.TOUCH_ZOOM_TRUCK)===Nt.TOUCH_ZOOM_TRUCK||(this._state&Nt.TOUCH_DOLLY_OFFSET)===Nt.TOUCH_DOLLY_OFFSET||(this._state&Nt.TOUCH_ZOOM_OFFSET)===Nt.TOUCH_ZOOM_OFFSET||(this._state&Nt.TOUCH_DOLLY_ROTATE)===Nt.TOUCH_DOLLY_ROTATE||(this._state&Nt.TOUCH_ZOOM_ROTATE)===Nt.TOUCH_ZOOM_ROTATE){let _=bo.x-this._activePointers[1].clientX,w=bo.y-this._activePointers[1].clientY,F=Math.sqrt(_*_+w*w),X=s.y-F;s.set(0,F);let H=this.dollyToCursor?(n.x-this._elementRect.x)/this._elementRect.width*2-1:0,he=this.dollyToCursor?(n.y-this._elementRect.y)/this._elementRect.height*-2+1:0;this._state===Nt.TOUCH_DOLLY||this._state===Nt.TOUCH_DOLLY_ROTATE||this._state===Nt.TOUCH_DOLLY_TRUCK||this._state===Nt.TOUCH_DOLLY_OFFSET?this._dollyInternal(X*hO,H,he):this._zoomInternal(X*hO,H,he)}((this._state&Nt.TRUCK)===Nt.TRUCK||(this._state&Nt.TOUCH_TRUCK)===Nt.TOUCH_TRUCK||(this._state&Nt.TOUCH_DOLLY_TRUCK)===Nt.TOUCH_DOLLY_TRUCK||(this._state&Nt.TOUCH_ZOOM_TRUCK)===Nt.TOUCH_ZOOM_TRUCK)&&this._truckInternal(D,P,!1),((this._state&Nt.OFFSET)===Nt.OFFSET||(this._state&Nt.TOUCH_OFFSET)===Nt.TOUCH_OFFSET||(this._state&Nt.TOUCH_DOLLY_OFFSET)===Nt.TOUCH_DOLLY_OFFSET||(this._state&Nt.TOUCH_ZOOM_OFFSET)===Nt.TOUCH_ZOOM_OFFSET)&&this._truckInternal(D,P,!0),this.dispatchEvent({type:"control"})},x=()=>{F8(this._activePointers,bo),n.copy(bo),this._activePointers.length===0&&(this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",p),this._domElement.ownerDocument.removeEventListener("touchmove",h,{passive:!1}),this._domElement.ownerDocument.removeEventListener("touchend",f),this.dispatchEvent({type:"controlend"}))};this._domElement.addEventListener("pointerdown",a),CMe&&this._domElement.addEventListener("mousedown",o),CMe&&this._domElement.addEventListener("touchstart",l),this._domElement.addEventListener("pointercancel",p),this._domElement.addEventListener("wheel",g,{passive:!1}),this._domElement.addEventListener("contextmenu",y),this._removeAllEventListeners=()=>{this._domElement.removeEventListener("pointerdown",a),this._domElement.removeEventListener("mousedown",o),this._domElement.removeEventListener("touchstart",l),this._domElement.removeEventListener("pointercancel",p),this._domElement.removeEventListener("wheel",g,{passive:!1}),this._domElement.removeEventListener("contextmenu",y),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",u),this._domElement.ownerDocument.removeEventListener("touchmove",h,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",p),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.removeEventListener("touchend",f)},this.cancel=()=>{this._state!==Nt.NONE&&(this._state=Nt.NONE,this._activePointers.length=0,x())}}this.update(0)}static install(r){mr=r.THREE,AMe=Object.freeze(new mr.Vector3(0,0,0)),pO=Object.freeze(new mr.Vector3(0,1,0)),U8=Object.freeze(new mr.Vector3(0,0,1)),bo=new mr.Vector2,pi=new mr.Vector3,sn=new mr.Vector3,rE=new mr.Vector3,uh=new mr.Vector3,hh=new mr.Vector3,R0=new mr.Vector3,OMe=new mr.Vector3,PMe=new mr.Vector3,Kc=new mr.Spherical,xS=new mr.Spherical,iE=new mr.Box3,NMe=new mr.Box3,B8=new mr.Sphere,LMe=new mr.Quaternion,k8=new mr.Quaternion,G8=new mr.Matrix4,dO=new mr.Raycaster}static get ACTION(){return Nt}get camera(){return this._camera}set camera(r){this._camera=r,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(r){this._enabled=r,r?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="")}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(r){this._spherical.radius===r&&this._sphericalEnd.radius===r||(this._spherical.radius=r,this._sphericalEnd.radius=r,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(r){this._spherical.theta===r&&this._sphericalEnd.theta===r||(this._spherical.theta=r,this._sphericalEnd.theta=r,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(r){this._spherical.phi===r&&this._sphericalEnd.phi===r||(this._spherical.phi=r,this._sphericalEnd.phi=r,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(r){this._boundaryEnclosesCamera=r,this._needsUpdate=!0}addEventListener(r,e){super.addEventListener(r,e)}removeEventListener(r,e){super.removeEventListener(r,e)}rotate(r,e,i=!1){return this.rotateTo(this._sphericalEnd.theta+r,this._sphericalEnd.phi+e,i)}rotateAzimuthTo(r,e=!1){return this.rotateTo(r,this._sphericalEnd.phi,e)}rotatePolarTo(r,e=!1){return this.rotateTo(this._sphericalEnd.theta,r,e)}rotateTo(r,e,i=!1){let n=mr.MathUtils.clamp(r,this.minAzimuthAngle,this.maxAzimuthAngle),s=mr.MathUtils.clamp(e,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=n,this._sphericalEnd.phi=s,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,i||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);let a=!i||Sn(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Sn(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(a)}dolly(r,e=!1){return this.dollyTo(this._sphericalEnd.radius-r,e)}dollyTo(r,e=!1){let i=this._sphericalEnd.radius,n=mr.MathUtils.clamp(r,this.minDistance,this.maxDistance);if(this.colliderMeshes.length>=1){let o=this._collisionTest(),l=Sn(o,this._spherical.radius);if(!(i>n)&&l)return Promise.resolve();this._sphericalEnd.radius=Math.min(n,o)}else this._sphericalEnd.radius=n;this._needsUpdate=!0,e||(this._spherical.radius=this._sphericalEnd.radius);let a=!e||Sn(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(a)}zoom(r,e=!1){return this.zoomTo(this._zoomEnd+r,e)}zoomTo(r,e=!1){this._zoomEnd=mr.MathUtils.clamp(r,this.minZoom,this.maxZoom),this._needsUpdate=!0,e||(this._zoom=this._zoomEnd);let i=!e||Sn(this._zoom,this._zoomEnd,this.restThreshold);return this._createOnRestPromise(i)}pan(r,e,i=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(r,e,i)}truck(r,e,i=!1){this._camera.updateMatrix(),uh.setFromMatrixColumn(this._camera.matrix,0),hh.setFromMatrixColumn(this._camera.matrix,1),uh.multiplyScalar(r),hh.multiplyScalar(-e);let n=pi.copy(uh).add(hh),s=sn.copy(this._targetEnd).add(n);return this.moveTo(s.x,s.y,s.z,i)}forward(r,e=!1){pi.setFromMatrixColumn(this._camera.matrix,0),pi.crossVectors(this._camera.up,pi),pi.multiplyScalar(r);let i=sn.copy(this._targetEnd).add(pi);return this.moveTo(i.x,i.y,i.z,e)}moveTo(r,e,i,n=!1){let s=pi.set(r,e,i).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,s,this.boundaryFriction),this._needsUpdate=!0,n||this._target.copy(this._targetEnd);let a=!n||Sn(this._target.x,this._targetEnd.x,this.restThreshold)&&Sn(this._target.y,this._targetEnd.y,this.restThreshold)&&Sn(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(a)}fitToBox(r,e,{cover:i=!1,paddingLeft:n=0,paddingRight:s=0,paddingBottom:a=0,paddingTop:o=0}={}){let l=[],c=r.isBox3?iE.copy(r):iE.setFromObject(r);c.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());let u=MMe(this._sphericalEnd.theta,RMe),h=MMe(this._sphericalEnd.phi,RMe);l.push(this.rotateTo(u,h,e));let p=pi.setFromSpherical(this._sphericalEnd).normalize(),d=LMe.setFromUnitVectors(p,U8),f=Sn(Math.abs(p.y),1);f&&d.multiply(k8.setFromAxisAngle(pO,u)),d.multiply(this._yAxisUpSpaceInverse);let m=NMe.makeEmpty();sn.copy(c.min).applyQuaternion(d),m.expandByPoint(sn),sn.copy(c.min).setX(c.max.x).applyQuaternion(d),m.expandByPoint(sn),sn.copy(c.min).setY(c.max.y).applyQuaternion(d),m.expandByPoint(sn),sn.copy(c.max).setZ(c.min.z).applyQuaternion(d),m.expandByPoint(sn),sn.copy(c.min).setZ(c.max.z).applyQuaternion(d),m.expandByPoint(sn),sn.copy(c.max).setY(c.min.y).applyQuaternion(d),m.expandByPoint(sn),sn.copy(c.max).setX(c.min.x).applyQuaternion(d),m.expandByPoint(sn),sn.copy(c.max).applyQuaternion(d),m.expandByPoint(sn),m.min.x-=n,m.min.y-=a,m.max.x+=s,m.max.y+=o,d.setFromUnitVectors(U8,p),f&&d.premultiply(k8.invert()),d.premultiply(this._yAxisUpSpace);let g=m.getSize(pi),y=m.getCenter(sn).applyQuaternion(d);if(w0(this._camera)){let E=this.getDistanceToFitBox(g.x,g.y,g.z,i);l.push(this.moveTo(y.x,y.y,y.z,e)),l.push(this.dollyTo(E,e)),l.push(this.setFocalOffset(0,0,0,e))}else if(Xf(this._camera)){let E=this._camera,b=E.right-E.left,x=E.top-E.bottom,S=i?Math.max(b/g.x,x/g.y):Math.min(b/g.x,x/g.y);l.push(this.moveTo(y.x,y.y,y.z,e)),l.push(this.zoomTo(S,e)),l.push(this.setFocalOffset(0,0,0,e))}return Promise.all(l)}fitToSphere(r,e){let i=[],s=r instanceof mr.Sphere?B8.copy(r):p2t(r,B8);if(i.push(this.moveTo(s.center.x,s.center.y,s.center.z,e)),w0(this._camera)){let a=this.getDistanceToFitSphere(s.radius);i.push(this.dollyTo(a,e))}else if(Xf(this._camera)){let a=this._camera.right-this._camera.left,o=this._camera.top-this._camera.bottom,l=2*s.radius,c=Math.min(a/l,o/l);i.push(this.zoomTo(c,e))}return i.push(this.setFocalOffset(0,0,0,e)),Promise.all(i)}setLookAt(r,e,i,n,s,a,o=!1){let l=sn.set(n,s,a),c=pi.set(r,e,i);this._targetEnd.copy(l),this._sphericalEnd.setFromVector3(c.sub(l).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));let u=!o||Sn(this._target.x,this._targetEnd.x,this.restThreshold)&&Sn(this._target.y,this._targetEnd.y,this.restThreshold)&&Sn(this._target.z,this._targetEnd.z,this.restThreshold)&&Sn(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Sn(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Sn(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerpLookAt(r,e,i,n,s,a,o,l,c,u,h,p,d,f=!1){let m=pi.set(n,s,a),g=sn.set(r,e,i);Kc.setFromVector3(g.sub(m).applyQuaternion(this._yAxisUpSpace));let y=rE.set(u,h,p),E=sn.set(o,l,c);xS.setFromVector3(E.sub(y).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(m.lerp(y,d));let b=xS.theta-Kc.theta,x=xS.phi-Kc.phi,S=xS.radius-Kc.radius;this._sphericalEnd.set(Kc.radius+S*d,Kc.phi+x*d,Kc.theta+b*d),this.normalizeRotations(),this._needsUpdate=!0,f||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));let D=!f||Sn(this._target.x,this._targetEnd.x,this.restThreshold)&&Sn(this._target.y,this._targetEnd.y,this.restThreshold)&&Sn(this._target.z,this._targetEnd.z,this.restThreshold)&&Sn(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Sn(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Sn(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(D)}setPosition(r,e,i,n=!1){return this.setLookAt(r,e,i,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,n)}setTarget(r,e,i,n=!1){let s=this.getPosition(pi);return this.setLookAt(s.x,s.y,s.z,r,e,i,n)}setFocalOffset(r,e,i,n=!1){this._focalOffsetEnd.set(r,e,i),this._needsUpdate=!0,n||this._focalOffset.copy(this._focalOffsetEnd);let s=!n||Sn(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&Sn(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&Sn(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(s)}setOrbitPoint(r,e,i){this._camera.updateMatrixWorld(),uh.setFromMatrixColumn(this._camera.matrixWorldInverse,0),hh.setFromMatrixColumn(this._camera.matrixWorldInverse,1),R0.setFromMatrixColumn(this._camera.matrixWorldInverse,2);let n=pi.set(r,e,i),s=n.distanceTo(this._camera.position),a=n.sub(this._camera.position);uh.multiplyScalar(a.x),hh.multiplyScalar(a.y),R0.multiplyScalar(a.z),pi.copy(uh).add(hh).add(R0),pi.z=pi.z+s,this.dollyTo(s,!1),this.setFocalOffset(-pi.x,pi.y,-pi.z,!1),this.moveTo(r,e,i,!1)}setBoundary(r){if(!r){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(r),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(r,e,i,n){if(r===null){this._viewport=null;return}this._viewport=this._viewport||new mr.Vector4,typeof r=="number"?this._viewport.set(r,e,i,n):this._viewport.copy(r)}getDistanceToFitBox(r,e,i,n=!1){if(H8(this._camera,"getDistanceToFitBox"))return this._spherical.radius;let s=r/e,a=this._camera.getEffectiveFOV()*mr.MathUtils.DEG2RAD,o=this._camera.aspect;return((n?s>o:si.pointerId===r?(e=i,!0):!1),e}_encloseToBoundary(r,e,i){let n=e.lengthSq();if(n===0)return r;let s=sn.copy(e).add(r),o=this._boundary.clampPoint(s,rE).sub(s),l=o.lengthSq();if(l===0)return r.add(e);if(l===n)return r;if(i===0)return r.add(e).add(o);{let c=1+i*l/e.dot(o);return r.add(sn.copy(e).multiplyScalar(c)).add(o.multiplyScalar(1-i))}}_updateNearPlaneCorners(){if(w0(this._camera)){let r=this._camera,e=r.near,i=r.getEffectiveFOV()*mr.MathUtils.DEG2RAD,n=Math.tan(i*.5)*e,s=n*r.aspect;this._nearPlaneCorners[0].set(-s,-n,0),this._nearPlaneCorners[1].set(s,-n,0),this._nearPlaneCorners[2].set(s,n,0),this._nearPlaneCorners[3].set(-s,n,0)}else if(Xf(this._camera)){let r=this._camera,e=1/r.zoom,i=r.left*e,n=r.right*e,s=r.top*e,a=r.bottom*e;this._nearPlaneCorners[0].set(i,s,0),this._nearPlaneCorners[1].set(n,s,0),this._nearPlaneCorners[2].set(n,a,0),this._nearPlaneCorners[3].set(i,a,0)}}_collisionTest(){let r=1/0;if(!(this.colliderMeshes.length>=1)||H8(this._camera,"_collisionTest"))return r;let i=pi.setFromSpherical(this._spherical).divideScalar(this._spherical.radius);G8.lookAt(AMe,i,this._camera.up);for(let n=0;n<4;n++){let s=sn.copy(this._nearPlaneCorners[n]);s.applyMatrix4(G8);let a=rE.addVectors(this._target,s);dO.set(a,i),dO.far=this._spherical.radius+1;let o=dO.intersectObjects(this.colliderMeshes);o.length!==0&&o[0].distance{let i=()=>{this.removeEventListener("rest",i),e()};this.addEventListener("rest",i)}))}_removeAllEventListeners(){}};function p2t(t,r){let e=r,i=e.center;iE.makeEmpty(),t.traverseVisible(s=>{s.isMesh&&iE.expandByObject(s)}),iE.getCenter(i);let n=0;return t.traverseVisible(s=>{if(!s.isMesh)return;let a=s,o=a.geometry.clone();if(o.applyMatrix4(a.matrixWorld),o.isBufferGeometry){let c=o.attributes.position;for(let u=0,h=c.count;u{!this.enabled||!this.enablePan||this.handleKeyDown(r)};qn.install({THREE:Pt}),this.cameraControls=new qn(r,e),this.object=r,this.domElement=e,this.dampingFactor=.05,this.zoomSpeed=.05,this.rotateSpeed=1,this.panSpeed=1,this.mouseButtons={LEFT:bi.ROTATE,MIDDLE:bi.DOLLY,RIGHT:bi.PAN},this.touches={ONE:ao.ROTATE,TWO:ao.DOLLY_PAN}}get minDistance(){return this.cameraControls.minDistance}set minDistance(r){this.cameraControls.minDistance=r}get maxDistance(){return this.cameraControls.maxDistance}set maxDistance(r){this.cameraControls.maxDistance=r}get minZoom(){return this.cameraControls.minZoom}set minZoom(r){this.cameraControls.minZoom=r}get maxZoom(){return this.cameraControls.maxZoom}set maxZoom(r){this.cameraControls.maxZoom=r}get minPolarAngle(){return this.cameraControls.minPolarAngle}set minPolarAngle(r){this.cameraControls.minPolarAngle=r}get maxPolarAngle(){return this.cameraControls.maxPolarAngle}set maxPolarAngle(r){this.cameraControls.maxPolarAngle=r}get minAzimuthAngle(){return this.cameraControls.minAzimuthAngle}set minAzimuthAngle(r){this.cameraControls.minAzimuthAngle=r}get maxAzimuthAngle(){return this.cameraControls.maxAzimuthAngle}set maxAzimuthAngle(r){this.cameraControls.maxAzimuthAngle=r}get enabled(){return this.cameraControls.enabled}set enabled(r){this.cameraControls.enabled=r}get position(){return this.cameraControls.getPosition(new A)}set position(r){this.cameraControls.setPosition(r.x,r.y,r.z)}get target(){let r=new A;return this.cameraControls.getTarget(r),r}set target(r){this.cameraControls.setTarget(r.x,r.y,r.z)}get enableDamping(){return this._enableDamping}set enableDamping(r){this._enableDamping=r,r||(this.dampingFactorValue=this.cameraControls.dampingFactor),this.cameraControls.dampingFactor=r?this.dampingFactorValue:1,this.cameraControls.draggingDampingFactor=r?this.dampingFactorValue:1,r&&(this.dampingFactorValue=void 0)}get dampingFactor(){return this.cameraControls.dampingFactor}set dampingFactor(r){this.cameraControls.dampingFactor=r,this.cameraControls.draggingDampingFactor=r}get enableZoom(){return this._enableZoom}set enableZoom(r){this._enableZoom=r,r||(this.dollySpeedValue=this.cameraControls.dollySpeed),this.cameraControls.dollySpeed=r?this.dollySpeedValue:0,r&&(this.dollySpeedValue=void 0)}get zoomSpeed(){return this.cameraControls.dollySpeed}set zoomSpeed(r){this.cameraControls.dollySpeed=r}get enableRotate(){return this._enableRotate}set enableRotate(r){this._enableRotate=r,r||(this.rotateSpeedValue=this.cameraControls.azimuthRotateSpeed),this.cameraControls.azimuthRotateSpeed=r?this.rotateSpeedValue:0,this.cameraControls.polarRotateSpeed=r?this.rotateSpeedValue:0,r&&(this.rotateSpeedValue=void 0)}get rotateSpeed(){return this.cameraControls.azimuthRotateSpeed}set rotateSpeed(r){this.cameraControls.azimuthRotateSpeed=r,this.cameraControls.polarRotateSpeed=r}get enablePan(){return this._enablePan}set enablePan(r){this._enablePan=r,r||(this.panSpeedValue=this.cameraControls.truckSpeed),this.cameraControls.truckSpeed=r?this.panSpeedValue:0,r&&(this.panSpeedValue=void 0)}get panSpeed(){return this.cameraControls.truckSpeed}set panSpeed(r){this.cameraControls.truckSpeed=r}get dollyToCursor(){return this.cameraControls.dollyToCursor}set dollyToCursor(r){this.cameraControls.dollyToCursor=r}get screenSpacePanning(){return!this.cameraControls.verticalDragToForward}set screenSpacePanning(r){this.cameraControls.verticalDragToForward=!r}get mouseButtons(){return this._mouseButtons}set mouseButtons(r){this._mouseButtons=r;for(let e in r){let i=d2t(this.object)[r[e]];e==="MIDDLE"?this.cameraControls.mouseButtons.wheel=i:this.cameraControls.mouseButtons[e.toLowerCase()]=i}this.cameraControls.mouseButtons.middle=qn.ACTION.NONE}get touches(){return this._touches}set touches(r){this._touches=r;for(let e in r){let i=f2t(this.object)[r[e]],n=e.toLowerCase();if(n==="one"){(i===qn.ACTION.TOUCH_ROTATE||i===qn.ACTION.TOUCH_TRUCK)&&(this.cameraControls.touches[n]=i);continue}this.cameraControls.touches[n]=i}}get target0(){let r=JSON.parse(this.cameraControls.toJSON()).target0;return new A(r[0],r[1],r[2])}set target0(r){let e=JSON.parse(this.cameraControls.toJSON());e.target0=r.toArray(),this.cameraControls.fromJSON(JSON.stringify(e))}get position0(){let r=JSON.parse(this.cameraControls.toJSON()).position0;return new A(r[0],r[1],r[2])}set position0(r){let e=JSON.parse(this.cameraControls.toJSON());e.position0=r.toArray(),this.cameraControls.fromJSON(JSON.stringify(e))}get zoom0(){return JSON.parse(this.cameraControls.toJSON()).zoom0}set zoom0(r){let e=JSON.parse(this.cameraControls.toJSON());e.zoom0=r,this.cameraControls.fromJSON(JSON.stringify(e))}handleKeyDown(r){let e=!1;switch(r.code){case this.keys.UP:r.ctrlKey||r.metaKey||r.shiftKey?this.cameraControls.rotateAzimuthTo(2*Math.PI*this.cameraControls.azimuthRotateSpeed/this.domElement.clientHeight,!1):this.cameraControls.truck(0,this.keyPanSpeed*.05/this.panSpeed,!1),e=!0;break;case this.keys.BOTTOM:r.ctrlKey||r.metaKey||r.shiftKey?this.cameraControls.rotateAzimuthTo(-2*Math.PI*this.cameraControls.azimuthRotateSpeed/this.domElement.clientHeight,!1):this.cameraControls.truck(0,-this.keyPanSpeed*.05/this.panSpeed,!1),e=!0;break;case this.keys.LEFT:r.ctrlKey||r.metaKey||r.shiftKey?this.cameraControls.rotatePolarTo(2*Math.PI*this.cameraControls.polarRotateSpeed/this.domElement.clientHeight,!1):this.cameraControls.truck(this.keyPanSpeed*.05/this.panSpeed,0,!1),e=!0;break;case this.keys.RIGHT:r.ctrlKey||r.metaKey||r.shiftKey?this.cameraControls.rotatePolarTo(-2*Math.PI*this.cameraControls.polarRotateSpeed/this.domElement.clientHeight,!1):this.cameraControls.truck(-this.keyPanSpeed*.05/this.panSpeed,0,!1),e=!0;break}e&&(r.preventDefault(),this.update())}getAutoRotationAngle(){return 2*Math.PI/60/60*this.autoRotateSpeed}listenToKeyEvents(r){r.addEventListener("keydown",this.onKeyDown),this.domElementKeyEvents=r}update(){let r=this.clock.getDelta();this.cameraControls.update(r),this.autoRotate&&this.cameraControls.currentAction===qn.ACTION.NONE&&this.cameraControls.rotate(this.getAutoRotationAngle(),0,!1)}saveState(){this.cameraControls.saveState()}reset(){this.cameraControls.reset(!0)}dispose(){this.cameraControls.dispose()}getPolarAngle(){return this.cameraControls.polarAngle}getAzimuthalAngle(){return this.cameraControls.azimuthAngle}getDistance(){return this.cameraControls.distance}addEventListener(r,e){this.cameraControls.addEventListener(r,e)}removeEventListener(r,e){this.cameraControls.removeEventListener(r,e)}dispatchEvent(r){this.cameraControls.dispatchEvent(r)}setLookAt(r,e){this.cameraControls.setLookAt(r.x,r.y,r.z,e.x,e.y,e.z,!1),this.cameraControls.setFocalOffset(0,0,0,!1)}setOrbitPoint(r){this.cameraControls.setOrbitPoint(r.x,r.y,r.z)}};var mO,rl=class extends po{constructor(e){super(St.guid());this.needsFrustumCulled=!1;this.snapType="Dot";this.snapLineVisible=!1;this.snapType=e,this.drawSnapFunctions={Dot:this.drawDot.bind(this),Square:this.drawSquare.bind(this),Cross:this.drawCross.bind(this),Triangle:this.drawTriangle.bind(this),Perpendicular:this.drawPerpendicular.bind(this)}}setSnapLineVisible(e){this.snapLineVisible=e}draw(e,i){this.osnapInfo&&(this.snapLineVisible&&this.drawSnapLine(e,i),e.save(),e.fillStyle=rl.FILL_COLOR,e.strokeStyle=rl.LINE_COLOR,e.lineWidth=rl.LINE_WIDTH,e.beginPath(),this.drawSnapFunctions[this.snapType](e,i),mO&&this.drawDebug(e,i),e.closePath(),e.fill(),e.stroke(),e.restore())}drawDebug(e,i){mO==null||mO.forEach(n=>{let s=this.transToScreenCoord(n.start,i),a=this.transToScreenCoord(n.end,i);e.moveTo(s.x,s.y),e.lineTo(a.x,a.y)})}drawSelect(e,i){}isPointInPath(e){return!1}drawSnapLine(e,i){e.save(),e.strokeStyle=rl.SNAP_LINE_COLOR,e.lineWidth=rl.LINE_WIDTH;let n=this.transToScreenCoord(this.osnapInfo.line.start,i),s=this.transToScreenCoord(this.osnapInfo.line.end,i);e.moveTo(n.x,n.y),e.lineTo(s.x,s.y),e.stroke(),e.restore()}drawDot(e,i){let n=this.transToScreenCoord(this.osnapInfo.point,i);e.arc(n.x,n.y,rl.SNAP_ICON_SIZE/3,0,Math.PI*2)}drawSquare(e,i){let n=this.transToScreenCoord(this.osnapInfo.point,i),s=rl.SNAP_ICON_SIZE/1.2,a=rl.SNAP_ICON_SIZE/1.2;e.rect(n.x-s/2,n.y-a/2,s,a)}drawTriangle(e,i){let n=this.transToScreenCoord(this.osnapInfo.point,i),s=rl.SNAP_ICON_SIZE/1.2/2,a=new le(0,-s).add(n),o=new le(-.87*s,s/2).add(n),l=new le(.87*s,s/2).add(n);e.moveTo(a.x,a.y),e.lineTo(o.x,o.y),e.lineTo(l.x,l.y),e.closePath()}drawCross(e,i){let n=this.transToScreenCoord(this.osnapInfo.point,i),s=rl.SNAP_ICON_SIZE/1.2/2,a=new le(-s,-s).add(n),o=new le(s,s).add(n),l=new le(s,-s).add(n),c=new le(-s,s).add(n);e.moveTo(a.x,a.y),e.lineTo(o.x,o.y),e.moveTo(l.x,l.y),e.lineTo(c.x,c.y)}drawPerpendicular(e,i){let n=this.transToScreenCoord(this.osnapInfo.point,i),s=rl.SNAP_ICON_SIZE/1.2/2;[new le(0,0).add(n),new le(-s,0).add(n),new le(0,0).add(n),new le(0,s).add(n),new le(s,s).add(n),new le(-s,s).add(n),new le(-s,s).add(n),new le(-s,-s).add(n)].forEach((o,l)=>{l===0?e.moveTo(o.x,o.y):e.lineTo(o.x,o.y)})}update(e){this.osnapInfo=e}getClassType(){return"SnapDrawable"}},il=rl;il.LINE_COLOR="rgba(255, 240, 0, 0.8)",il.FILL_COLOR="rgba(135, 206, 250, 0.5)",il.SNAP_LINE_COLOR="rgba(255, 240, 0, 0.3)",il.LINE_WIDTH=2.5,il.SNAP_ICON_SIZE=10;Dr._registerDrawableClass(il);var m2t=1e-5,gO=class{constructor(r){this.drawableList=new Hp("snap");this.markers={};this.activeOSnapType=0;this.snapTolerance=1;var e;this.overlayRender=r,(e=this.overlayRender)==null||e.addDrawableList(this.drawableList),this.initOSnapMarkers()}initOSnapMarkers(){let r=new il("Square"),e=new il("Triangle"),i=new il("Dot"),n=new il("Cross"),s=new il("Perpendicular");this.markers[2]=r,this.markers[4]=r,this.markers[8]=e,this.markers[1]=i,this.markers[32]=n,this.markers[16]=s,Object.values(this.markers).forEach(a=>{a.visible=!1,this.drawableList.addDrawable(a)})}updateSnapTolerance(r){this.snapTolerance=r}getSnapTolerance(){return this.snapTolerance}getMarker(r){return this.markers[r]}deactivate(){this.activeOSnapType&&(this.markers[this.activeOSnapType].visible=!1),this.activeOSnapType=0}destroy(){}handleSnap(r,e,i,n){if(!(e!=null&&e.length)){this.activateMarker(0);return}let s=this.getInteractionLines(r,e);if(s){let a=this.getSnapInfo(r,s,n);if(!a||a.type===0){this.activateMarker(0);return}return this.activateMarker(a.type,i,a),a.point}this.activateMarker(0)}activateMarker(r,e=!1,i){var s;this.activeOSnapType&&(this.markers[this.activeOSnapType].visible=!1),this.activeOSnapType=r;let n=this.markers[r];n&&i&&(n.setSnapLineVisible(e),n.update(i),n.visible=!0),(s=this.overlayRender)==null||s.render()}getFootOfPerpendicular(r,e,i=m2t){let{start:n,end:s}=e,a=n.x-s.x,o=n.y-s.y,l=n.z-s.z;if(n.distanceTo(s)o.type-a.type),n[0]}};var W8=Un(Yl(),1);var ph=class{constructor(r,e,i){this.follow=r=>{let{x:e,y:i}=Mr.getScreenPointByEvent(r,this.parentNode);this.node.style.left=e+15+"px",this.node.style.top=i-30+"px"};this.show=()=>this.node.hasAttribute("hidden")&&this.node.removeAttribute("hidden");this.hide=()=>!this.node.hasAttribute("hidden")&&this.node.setAttribute("hidden","");this.destroy=()=>{this.target?this.target.removeEventListener(wf,this.follow):document.removeEventListener(wf,this.follow),this.parentNode.removeChild(this.node)};this.node=document.createElement("div"),this.node.id=r,e&&this.node.append(e),this.childNode=document.createElement("div"),this.target=i==null?void 0:i.target,this.parentNode=(i==null?void 0:i.parentNode)||document.body,i!=null&&i.followPointer&&(this.node.classList.add("follow-tooltip"),this.target?this.target.addEventListener(wf,this.follow):document.addEventListener(wf,this.follow)),this.parentNode.appendChild(this.node),!(i!=null&&i.showOnCreate)&&this.node.setAttribute("hidden","")}setContent(r){this.node.textContent&&(this.node.textContent=null),(0,W8.forEach)(this.node.children,e=>{this.node.removeChild(e)}),this.node.append(r),this.node.appendChild(this.childNode)}updateChildContent(r){this.childNode.textContent&&(this.childNode.textContent=null),(0,W8.forEach)(this.childNode.children,e=>{this.childNode.removeChild(e)}),this.childNode.append(r)}};var vO=class{constructor(r){this.mouseDown=!1;this.mouseMove=!1;this.mouseDownPositionX=-1;this.mouseDownPositionY=-1;this.tempEnableRotate=!1;this.actived=!1;this.isResolvedOrRejected=!1;this.mousedown=r=>{var e,i;if(r.preventDefault(),r.button===0){this.mouseDown=!0;let n=Mr.getScreenPointByEvent(r,this.viewerContainer);this.mouseDownPositionX=n.x,this.mouseDownPositionY=n.y,(e=this.tooltip)==null||e.hide(),(i=this.tooltip)==null||i.destroy(),this.tooltip=void 0}};this.mousemove=r=>{if(r.preventDefault(),!this.mouseDown)return;let e=Mr.getScreenPointByEvent(r,this.viewerContainer);if(this.mouseDownPositionX>=0&&this.mouseDownPositionY>=0&&(Math.abs(e.x-this.mouseDownPositionX)>=5||Math.abs(e.y-this.mouseDownPositionY)>=5)){this.mouseMove=!0;let n=new le(Math.min(this.mouseDownPositionX,e.x),Math.min(this.mouseDownPositionY,e.y)),s=new le(Math.max(this.mouseDownPositionX,e.x),Math.max(this.mouseDownPositionY,e.y));this.drawRect(n,s)}};this.mouseup=r=>{if(r.preventDefault(),this.mouseDown&&this.mouseMove){let e=Mr.getScreenPointByEvent(r,this.viewerContainer),i=new le(Math.min(this.mouseDownPositionX,e.x),Math.min(this.mouseDownPositionY,e.y)),n=new le(Math.max(this.mouseDownPositionX,e.x),Math.max(this.mouseDownPositionY,e.y)),s=new Ds(i,n);this.deactivate(),this.setRectDomVisible(!1),this.resolve&&(this.resolve(s),this.isResolvedOrRejected=!0)}this.mouseDown=!1,this.mouseMove=!1,this.mouseDownPositionX=-1,this.mouseDownPositionY=-1};this.viewer=r}get viewerContainer(){return this.viewer.viewerContainer}isActived(){return this.actived}activate(){var i;if(this.isActived()){this.reject&&(this.reject("BoxSelectHelper is already actived!"),this.isResolvedOrRejected=!0);return}this.actived=!0,this.viewerContainer.addEventListener("pointerdown",this.mousedown),this.viewerContainer.addEventListener("pointermove",this.mousemove),this.viewerContainer.addEventListener("pointerup",this.mouseup);let r=this.viewer.controls;this.tempKey=r.mouseButtons.LEFT,this.tempEnableRotate=r.enableRotate,r.mouseButtons.LEFT=-1,r.enableRotate=!1;let e=this.viewer.translate;if(e){this.tooltip=new ph("box-select-tooltip",e("Tooltip.boxSelect"),{followPointer:!0,showOnCreate:!0,parentNode:this.viewer.widgetContainer,target:this.viewerContainer});let n=document.getElementById("box-select-tooltip");n&&(n.style.pointerEvents="none");let s=e("Tooltip.boxSelect");s&&this.tooltip&&((i=this.tooltip)==null||i.setContent(s))}}deactivate(){var r,e;this.actived=!1,this.viewerContainer.removeEventListener("pointerdown",this.mousedown),this.viewerContainer.removeEventListener("pointermove",this.mousemove),this.viewerContainer.removeEventListener("pointerup",this.mouseup),(r=this.tooltip)==null||r.hide(),(e=this.tooltip)==null||e.destroy(),this.tooltip=void 0,this.viewer.controls.mouseButtons.LEFT=this.tempKey,this.viewer.controls.enableRotate=this.tempEnableRotate}drawRect(r,e){this.rectDom||(this.rectDom=document.createElement("div"),this.rectDom.style.cssText=`position: absolute;border: ${vO.BORDER_WIDTH} solid ${vO.BORDER_COLOR};`,this.viewerContainer.appendChild(this.rectDom)),this.setRectDomVisible(!0),this.rectDom.style.left=`${r.x}px`,this.rectDom.style.top=`${r.y}px`;let i=Math.abs(e.x-r.x),n=Math.abs(e.y-r.y);this.rectDom.style.width=`${i}px`,this.rectDom.style.height=`${n}px`}setRectDomVisible(r){this.rectDom&&(this.rectDom.style.display=r?"inline-block":"none")}select(){return ot(this,null,function*(){return new Promise((r,e)=>{this.resolve=r,this.reject=e,this.activate()})})}destroy(){var r;this.deactivate(),(r=this.rectDom)==null||r.remove(),this.rectDom=void 0,this.isResolvedOrRejected||this.reject&&this.reject("BoxSelectHelper is not done for some reason!")}},$f=vO;$f.BORDER_COLOR="#fff000",$f.BORDER_WIDTH="2px";var UMe=Un(Yl(),1),nE=class{constructor(r){this.history=[];this.step=0;this.maxCount=50;this.maxCount=r||this.maxCount}addRecord(r,e){this.history.length===this.maxCount&&this.history.shift(),this.step!==this.history.length&&this.history.splice(this.step),this.history.push({type:r,payload:(0,UMe.cloneDeep)(e)}),this.step++}undo(){if(this.step!==0)return this.step--,this.history[this.step]}redo(){if(this.step!==this.history.length)return this.step++,this.history[this.step-1]}clear(){this.history=[],this.step=0}destroy(){this.clear(),this.maxCount=0}};function Jc(t){return Jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Jc(t)}function Zl(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function BMe(t,r){for(var e=0;et.length)&&(r=t.length);for(var e=0,i=new Array(r);e1&&arguments[1]!==void 0?arguments[1]:{};Zl(this,t),this.init(r,e)}return Kl(t,[{key:"init",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=i.prefix||"i18next:",this.logger=e||g2t,this.options=i,this.debug=i.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,i=new Array(e),n=0;n1?i-1:0),s=1;s-1?o.replace(/###/g,"."):o}function n(){return!t||typeof t=="string"}for(var s=typeof r!="string"?[].concat(r):r.split(".");s.length>1;){if(n())return{};var a=i(s.shift());!t[a]&&e&&(t[a]=new e),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={}}return n()?{}:{obj:t,k:i(s.shift())}}function zMe(t,r,e){var i=J8(t,r,Object),n=i.obj,s=i.k;n[s]=e}function T2t(t,r,e,i){var n=J8(t,r,Object),s=n.obj,a=n.k;s[a]=s[a]||[],i&&(s[a]=s[a].concat(e)),i||s[a].push(e)}function bO(t,r){var e=J8(t,r),i=e.obj,n=e.k;if(i)return i[n]}function jMe(t,r,e){var i=bO(t,e);return i!==void 0?i:bO(r,e)}function rDe(t,r,e){for(var i in r)i!=="__proto__"&&i!=="constructor"&&(i in t?typeof t[i]=="string"||t[i]instanceof String||typeof r[i]=="string"||r[i]instanceof String?e&&(t[i]=r[i]):rDe(t[i],r[i],e):t[i]=r[i]);return t}function aE(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var E2t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function b2t(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(r){return E2t[r]}):t}var IO=typeof window!="undefined"&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,x2t=[" ",",","?","!",";"];function I2t(t,r,e){r=r||"",e=e||"";var i=x2t.filter(function(o){return r.indexOf(o)<0&&e.indexOf(o)<0});if(i.length===0)return!0;var n=new RegExp("(".concat(i.map(function(o){return o==="?"?"\\?":o}).join("|"),")")),s=!n.test(t);if(!s){var a=t.indexOf(e);a>0&&!n.test(t.substring(0,a))&&(s=!0)}return s}function WMe(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),e.push.apply(e,i)}return e}function TO(t){for(var r=1;r2&&arguments[2]!==void 0?arguments[2]:".";if(t){if(t[r])return t[r];for(var i=r.split(e),n=t,s=0;ss+a;)a++,o=i.slice(s,s+a).join(e),l=n[o];if(l===void 0)return;if(r.endsWith(o)){if(typeof l=="string")return l;if(o&&typeof l[o]=="string")return l[o]}var c=i.slice(s+a).join(e);return c?iDe(l,c,e):void 0}n=n[i[s]]}return n}}var w2t=function(t){sE(e,t);var r=S2t(e);function e(i){var n,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Zl(this,e),n=r.call(this),IO&&Kf.call(Qc(n)),n.data=i||{},n.options=s,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.options.ignoreJSONStructure===void 0&&(n.options.ignoreJSONStructure=!0),n}return Kl(e,[{key:"addNamespaces",value:function(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}},{key:"removeNamespaces",value:function(n){var s=this.options.ns.indexOf(n);s>-1&&this.options.ns.splice(s,1)}},{key:"getResource",value:function(n,s,a){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,c=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[n,s];a&&typeof a!="string"&&(u=u.concat(a)),a&&typeof a=="string"&&(u=u.concat(l?a.split(l):a)),n.indexOf(".")>-1&&(u=n.split("."));var h=bO(this.data,u);return h||!c||typeof a!="string"?h:iDe(this.data&&this.data[n]&&this.data[n][s],a,l)}},{key:"addResource",value:function(n,s,a,o){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var u=[n,s];a&&(u=u.concat(c?a.split(c):a)),n.indexOf(".")>-1&&(u=n.split("."),o=s,s=u[1]),this.addNamespaces(s),zMe(this.data,u,o),l.silent||this.emit("added",n,s,a,o)}},{key:"addResources",value:function(n,s,a){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(n,s,l,a[l],{silent:!0});o.silent||this.emit("added",n,s,a)}},{key:"addResourceBundle",value:function(n,s,a,o,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[n,s];n.indexOf(".")>-1&&(u=n.split("."),o=a,a=s,s=u[1]),this.addNamespaces(s);var h=bO(this.data,u)||{};o?rDe(h,a,l):h=TO(TO({},h),a),zMe(this.data,u,h),c.silent||this.emit("added",n,s,a)}},{key:"removeResourceBundle",value:function(n,s){this.hasResourceBundle(n,s)&&delete this.data[n][s],this.removeNamespaces(s),this.emit("removed",n,s)}},{key:"hasResourceBundle",value:function(n,s){return this.getResource(n,s)!==void 0}},{key:"getResourceBundle",value:function(n,s){return s||(s=this.options.defaultNS),this.options.compatibilityAPI==="v1"?TO(TO({},{}),this.getResource(n,s)):this.getResource(n,s)}},{key:"getDataByLanguage",value:function(n){return this.data[n]}},{key:"hasLanguageSomeTranslations",value:function(n){var s=this.getDataByLanguage(n),a=s&&Object.keys(s)||[];return!!a.find(function(o){return s[o]&&Object.keys(s[o]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),e}(Kf),nDe={processors:{},addPostProcessor:function(r){this.processors[r.name]=r},handle:function(r,e,i,n,s){var a=this;return r.forEach(function(o){a.processors[o]&&(e=a.processors[o].process(e,i,n,s))}),e}};function qMe(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),e.push.apply(e,i)}return e}function Na(t){for(var r=1;r1&&arguments[1]!==void 0?arguments[1]:{};return Zl(this,e),n=r.call(this),IO&&Kf.call(Qc(n)),y2t(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,Qc(n)),n.options=s,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.logger=mh.create("translator"),n}return Kl(e,[{key:"changeLanguage",value:function(n){n&&(this.language=n)}},{key:"exists",value:function(n){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(n==null)return!1;var a=this.resolve(n,s);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(n,s){var a=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,l=s.ns||this.options.defaultNS||[],c=a&&n.indexOf(a)>-1,u=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!I2t(n,a,o);if(c&&!u){var h=n.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:n,namespaces:l};var p=n.split(a);(a!==o||a===o&&this.options.ns.indexOf(p[0])>-1)&&(l=p.shift()),n=p.join(o)}return typeof l=="string"&&(l=[l]),{key:n,namespaces:l}}},{key:"translate",value:function(n,s,a){var o=this;if(Jc(s)!=="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),s||(s={}),n==null)return"";Array.isArray(n)||(n=[String(n)]);var l=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=this.extractFromKey(n[n.length-1],s),h=u.key,p=u.namespaces,d=p[p.length-1],f=s.lng||this.language,m=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&f.toLowerCase()==="cimode"){if(m){var g=s.nsSeparator||this.options.nsSeparator;return l?(y.res="".concat(d).concat(g).concat(h),y):"".concat(d).concat(g).concat(h)}return l?(y.res=h,y):h}var y=this.resolve(n,s),E=y&&y.res,b=y&&y.usedKey||h,x=y&&y.exactUsedKey||h,S=Object.prototype.toString.apply(E),D=["[object Number]","[object Function]","[object RegExp]"],P=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,w=typeof E!="string"&&typeof E!="boolean"&&typeof E!="number";if(_&&E&&w&&D.indexOf(S)<0&&!(typeof P=="string"&&S==="[object Array]")){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,E,Na(Na({},s),{},{ns:p})):"key '".concat(h," (").concat(this.language,")' returned an object instead of string.");return l?(y.res=F,y):F}if(c){var X=S==="[object Array]",H=X?[]:{},he=X?x:b;for(var C in E)if(Object.prototype.hasOwnProperty.call(E,C)){var N="".concat(he).concat(c).concat(C);H[C]=this.translate(N,Na(Na({},s),{joinArrays:!1,ns:p})),H[C]===N&&(H[C]=E[C])}E=H}}else if(_&&typeof P=="string"&&S==="[object Array]")E=E.join(P),E&&(E=this.extendTranslation(E,n,s,a));else{var k=!1,G=!1,U=s.count!==void 0&&typeof s.count!="string",j=e.hasDefaultValue(s),ee=U?this.pluralResolver.getSuffix(f,s.count,s):"",ae=s["defaultValue".concat(ee)]||s.defaultValue;!this.isValidLookup(E)&&j&&(k=!0,E=ae),this.isValidLookup(E)||(G=!0,E=h);var se=s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,ue=se&&G?void 0:E,ve=j&&ae!==E&&this.options.updateMissing;if(G||k||ve){if(this.logger.log(ve?"updateKey":"missingKey",f,d,h,ve?ae:E),c){var be=this.resolve(h,Na(Na({},s),{},{keySeparator:!1}));be&&be.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var de=[],we=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&we&&we[0])for(var Fe=0;Fe1&&arguments[1]!==void 0?arguments[1]:{},o,l,c,u,h;return typeof n=="string"&&(n=[n]),n.forEach(function(p){if(!s.isValidLookup(o)){var d=s.extractFromKey(p,a),f=d.key;l=f;var m=d.namespaces;s.options.fallbackNS&&(m=m.concat(s.options.fallbackNS));var g=a.count!==void 0&&typeof a.count!="string",y=g&&!a.ordinal&&a.count===0&&s.pluralResolver.shouldUseIntlApi(),E=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",b=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);m.forEach(function(x){s.isValidLookup(o)||(h=x,!YMe["".concat(b[0],"-").concat(x)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(h)&&(YMe["".concat(b[0],"-").concat(x)]=!0,s.logger.warn('key "'.concat(l,'" for languages "').concat(b.join(", "),`" won't get resolved as namespace "`).concat(h,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(function(S){if(!s.isValidLookup(o)){u=S;var D=[f];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(D,f,S,x,a);else{var P;g&&(P=s.pluralResolver.getSuffix(S,a.count,a));var _="_zero";if(g&&(D.push(f+P),y&&D.push(f+_)),E){var w="".concat(f).concat(s.options.contextSeparator).concat(a.context);D.push(w),g&&(D.push(w+P),y&&D.push(w+_))}}for(var F;F=D.pop();)s.isValidLookup(o)||(c=F,o=s.getResource(S,x,F,a))}}))})}}),{res:o,usedKey:l,exactUsedKey:c,usedLng:u,usedNS:h}}},{key:"isValidLookup",value:function(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}},{key:"getResource",value:function(n,s,a){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(n,s,a,o):this.resourceStore.getResource(n,s,a,o)}}],[{key:"hasDefaultValue",value:function(n){var s="defaultValue";for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a)&&s===a.substring(0,s.length)&&n[a]!==void 0)return!0;return!1}}]),e}(Kf);function K8(t){return t.charAt(0).toUpperCase()+t.slice(1)}var D2t=function(){function t(r){Zl(this,t),this.options=r,this.supportedLngs=this.options.supportedLngs||!1,this.logger=mh.create("languageUtils")}return Kl(t,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var i=e.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var i=e.split("-");return this.formatLanguageCode(i[0])}},{key:"formatLanguageCode",value:function(e){if(typeof e=="string"&&e.indexOf("-")>-1){var i=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(function(s){return s.toLowerCase()}):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),i.indexOf(n[1].toLowerCase())>-1&&(n[1]=K8(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),i.indexOf(n[1].toLowerCase())>-1&&(n[1]=K8(n[1].toLowerCase())),i.indexOf(n[2].toLowerCase())>-1&&(n[2]=K8(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var i=this;if(!e)return null;var n;return e.forEach(function(s){if(!n){var a=i.formatLanguageCode(s);(!i.options.supportedLngs||i.isSupportedCode(a))&&(n=a)}}),!n&&this.options.supportedLngs&&e.forEach(function(s){if(!n){var a=i.getLanguagePartFromCode(s);if(i.isSupportedCode(a))return n=a;n=i.options.supportedLngs.find(function(o){if(o.indexOf(a)===0)return o})}}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}},{key:"getFallbackCodes",value:function(e,i){if(!e)return[];if(typeof e=="function"&&(e=e(i)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!i)return e.default||[];var n=e[i];return n||(n=e[this.getScriptPartFromCode(i)]),n||(n=e[this.formatLanguageCode(i)]),n||(n=e[this.getLanguagePartFromCode(i)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,i){var n=this,s=this.getFallbackCodes(i||this.options.fallbackLng||[],e),a=[],o=function(c){c&&(n.isSupportedCode(c)?a.push(c):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof e=="string"&&e.indexOf("-")>-1?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):typeof e=="string"&&o(this.formatLanguageCode(e)),s.forEach(function(l){a.indexOf(l)<0&&o(n.formatLanguageCode(l))}),a}}]),t}(),C2t=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],A2t={1:function(r){return Number(r>1)},2:function(r){return Number(r!=1)},3:function(r){return 0},4:function(r){return Number(r%10==1&&r%100!=11?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2)},5:function(r){return Number(r==0?0:r==1?1:r==2?2:r%100>=3&&r%100<=10?3:r%100>=11?4:5)},6:function(r){return Number(r==1?0:r>=2&&r<=4?1:2)},7:function(r){return Number(r==1?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2)},8:function(r){return Number(r==1?0:r==2?1:r!=8&&r!=11?2:3)},9:function(r){return Number(r>=2)},10:function(r){return Number(r==1?0:r==2?1:r<7?2:r<11?3:4)},11:function(r){return Number(r==1||r==11?0:r==2||r==12?1:r>2&&r<20?2:3)},12:function(r){return Number(r%10!=1||r%100==11)},13:function(r){return Number(r!==0)},14:function(r){return Number(r==1?0:r==2?1:r==3?2:3)},15:function(r){return Number(r%10==1&&r%100!=11?0:r%10>=2&&(r%100<10||r%100>=20)?1:2)},16:function(r){return Number(r%10==1&&r%100!=11?0:r!==0?1:2)},17:function(r){return Number(r==1||r%10==1&&r%100!=11?0:1)},18:function(r){return Number(r==0?0:r==1?1:2)},19:function(r){return Number(r==1?0:r==0||r%100>1&&r%100<11?1:r%100>10&&r%100<20?2:3)},20:function(r){return Number(r==1?0:r==0||r%100>0&&r%100<20?1:2)},21:function(r){return Number(r%100==1?1:r%100==2?2:r%100==3||r%100==4?3:0)},22:function(r){return Number(r==1?0:r==2?1:(r<0||r>10)&&r%10==0?2:3)}},O2t=["v1","v2","v3"],$Me={zero:0,one:1,two:2,few:3,many:4,other:5};function P2t(){var t={};return C2t.forEach(function(r){r.lngs.forEach(function(e){t[e]={numbers:r.nr,plurals:A2t[r.fc]}})}),t}var N2t=function(){function t(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Zl(this,t),this.languageUtils=r,this.options=e,this.logger=mh.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl=="undefined"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=P2t()}return Kl(t,[{key:"addRule",value:function(e,i){this.rules[e]=i}},{key:"getRule",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:i.ordinal?"ordinal":"cardinal"})}catch(n){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,i);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(function(s){return"".concat(i).concat(s)})}},{key:"getSuffixes",value:function(e){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(e,n);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort(function(a,o){return $Me[a]-$Me[o]}).map(function(a){return"".concat(i.options.prepend).concat(a)}):s.numbers.map(function(a){return i.getSuffix(e,a,n)}):[]}},{key:"getSuffix",value:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.getRule(e,n);return s?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(s.select(i)):this.getSuffixRetroCompatible(s,i):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,i){var n=this,s=e.noAbs?e.plurals(i):e.plurals(Math.abs(i)),a=e.numbers[s];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var o=function(){return n.options.prepend&&a.toString()?n.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?o():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}},{key:"shouldUseIntlApi",value:function(){return!O2t.includes(this.options.compatibilityJSON)}}]),t}();function ZMe(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),e.push.apply(e,i)}return e}function eu(t){for(var r=1;r0&&arguments[0]!==void 0?arguments[0]:{};Zl(this,t),this.logger=mh.create("interpolator"),this.options=r,this.format=r.interpolation&&r.interpolation.format||function(e){return e},this.init(r)}return Kl(t,[{key:"init",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var i=e.interpolation;this.escape=i.escape!==void 0?i.escape:b2t,this.escapeValue=i.escapeValue!==void 0?i.escapeValue:!0,this.useRawValueToEscape=i.useRawValueToEscape!==void 0?i.useRawValueToEscape:!1,this.prefix=i.prefix?aE(i.prefix):i.prefixEscaped||"{{",this.suffix=i.suffix?aE(i.suffix):i.suffixEscaped||"}}",this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||",",this.unescapePrefix=i.unescapeSuffix?"":i.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":i.unescapeSuffix||"",this.nestingPrefix=i.nestingPrefix?aE(i.nestingPrefix):i.nestingPrefixEscaped||aE("$t("),this.nestingSuffix=i.nestingSuffix?aE(i.nestingSuffix):i.nestingSuffixEscaped||aE(")"),this.nestingOptionsSeparator=i.nestingOptionsSeparator?i.nestingOptionsSeparator:i.nestingOptionsSeparator||",",this.maxReplaces=i.maxReplaces?i.maxReplaces:1e3,this.alwaysFormat=i.alwaysFormat!==void 0?i.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var i="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(i,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,i,n,s){var a=this,o,l,c,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function h(g){return g.replace(/\$/g,"$$$$")}var p=function(y){if(y.indexOf(a.formatSeparator)<0){var E=jMe(i,u,y);return a.alwaysFormat?a.format(E,void 0,n,eu(eu(eu({},s),i),{},{interpolationkey:y})):E}var b=y.split(a.formatSeparator),x=b.shift().trim(),S=b.join(a.formatSeparator).trim();return a.format(jMe(i,u,x),S,n,eu(eu(eu({},s),i),{},{interpolationkey:x}))};this.resetRegExp();var d=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,f=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,m=[{regex:this.regexpUnescape,safeValue:function(y){return h(y)}},{regex:this.regexp,safeValue:function(y){return a.escapeValue?h(a.escape(y)):h(y)}}];return m.forEach(function(g){for(c=0;o=g.regex.exec(e);){var y=o[1].trim();if(l=p(y),l===void 0)if(typeof d=="function"){var E=d(e,o,s);l=typeof E=="string"?E:""}else if(s&&s.hasOwnProperty(y))l="";else if(f){l=o[0];continue}else a.logger.warn("missed to pass in variable ".concat(y," for interpolating ").concat(e)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=VMe(l));var b=g.safeValue(l);if(e=e.replace(o[0],b),f?(g.regex.lastIndex+=b.length,g.regex.lastIndex-=o[0].length):g.regex.lastIndex=0,c++,c>=a.maxReplaces)break}}),e}},{key:"nest",value:function(e,i){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,o,l=eu({},s);l.applyPostProcessor=!1,delete l.defaultValue;function c(d,f){var m=this.nestingOptionsSeparator;if(d.indexOf(m)<0)return d;var g=d.split(new RegExp("".concat(m,"[ ]*{"))),y="{".concat(g[1]);d=g[0],y=this.interpolate(y,l),y=y.replace(/'/g,'"');try{l=JSON.parse(y),f&&(l=eu(eu({},f),l))}catch(E){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),E),"".concat(d).concat(m).concat(y)}return delete l.defaultValue,d}for(;a=this.nestingRegexp.exec(e);){var u=[],h=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var p=a[1].split(this.formatSeparator).map(function(d){return d.trim()});a[1]=p.shift(),u=p,h=!0}if(o=i(c.call(this,a[1].trim(),l),l),o&&a[0]===e&&typeof o!="string")return o;typeof o!="string"&&(o=VMe(o)),o||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(e)),o=""),h&&(o=u.reduce(function(d,f){return n.format(d,f,s.lng,eu(eu({},s),{},{interpolationkey:a[1].trim()}))},o.trim())),e=e.replace(a[0],o),this.regexp.lastIndex=0}return e}}]),t}();function KMe(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),e.push.apply(e,i)}return e}function Zf(t){for(var r=1;r-1){var i=t.split("(");r=i[0].toLowerCase().trim();var n=i[1].substring(0,i[1].length-1);if(r==="currency"&&n.indexOf(":")<0)e.currency||(e.currency=n.trim());else if(r==="relativetime"&&n.indexOf(":")<0)e.range||(e.range=n.trim());else{var s=n.split(";");s.forEach(function(a){if(a){var o=a.split(":"),l=Z8(o),c=l[0],u=l.slice(1),h=u.join(":");e[c.trim()]||(e[c.trim()]=h.trim()),h.trim()==="false"&&(e[c.trim()]=!1),h.trim()==="true"&&(e[c.trim()]=!0),isNaN(h.trim())||(e[c.trim()]=parseInt(h.trim(),10))}})}}return{formatName:r,formatOptions:e}}var H2t=function(){function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zl(this,t),this.logger=mh.create("formatter"),this.options=r,this.formats={number:function(i,n,s){return new Intl.NumberFormat(n,s).format(i)},currency:function(i,n,s){return new Intl.NumberFormat(n,Zf(Zf({},s),{},{style:"currency"})).format(i)},datetime:function(i,n,s){return new Intl.DateTimeFormat(n,Zf({},s)).format(i)},relativetime:function(i,n,s){return new Intl.RelativeTimeFormat(n,Zf({},s)).format(i,s.range||"day")},list:function(i,n,s){return new Intl.ListFormat(n,Zf({},s)).format(i)}},this.init(r)}return Kl(t,[{key:"init",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},n=i.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,i){this.formats[e.toLowerCase().trim()]=i}},{key:"format",value:function(e,i,n,s){var a=this,o=i.split(this.formatSeparator),l=o.reduce(function(c,u){var h=F2t(u),p=h.formatName,d=h.formatOptions;if(a.formats[p]){var f=c;try{var m=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},g=m.locale||m.lng||s.locale||s.lng||n;f=a.formats[p](c,g,Zf(Zf(Zf({},d),s),m))}catch(y){a.logger.warn(y)}return f}else a.logger.warn("there was no format function for ".concat(p));return c},e);return l}}]),t}();function JMe(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),e.push.apply(e,i)}return e}function QMe(t){for(var r=1;r3&&arguments[3]!==void 0?arguments[3]:{};return Zl(this,e),a=r.call(this),IO&&Kf.call(Qc(a)),a.backend=i,a.store=n,a.services=s,a.languageUtils=s.languageUtils,a.options=o,a.logger=mh.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=o.maxParallelReads||10,a.readingCalls=0,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(s,o.backend,o),a}return Kl(e,[{key:"queueLoad",value:function(n,s,a,o){var l=this,c={},u={},h={},p={};return n.forEach(function(d){var f=!0;s.forEach(function(m){var g="".concat(d,"|").concat(m);!a.reload&&l.store.hasResourceBundle(d,m)?l.state[g]=2:l.state[g]<0||(l.state[g]===1?u[g]===void 0&&(u[g]=!0):(l.state[g]=1,f=!1,u[g]===void 0&&(u[g]=!0),c[g]===void 0&&(c[g]=!0),p[m]===void 0&&(p[m]=!0)))}),f||(h[d]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(p)}}},{key:"loaded",value:function(n,s,a){var o=n.split("|"),l=o[0],c=o[1];s&&this.emit("failedLoading",l,c,s),a&&this.store.addResourceBundle(l,c,a),this.state[n]=s?-1:2;var u={};this.queue.forEach(function(h){T2t(h.loaded,[l],c),k2t(h,n),s&&h.errors.push(s),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(function(p){u[p]||(u[p]={});var d=Object.keys(u[p]);d.length&&d.forEach(function(f){d[f]!==void 0&&(u[p][f]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(h){return!h.done})}},{key:"read",value:function(n,s,a){var o=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:350,u=arguments.length>5?arguments[5]:void 0;if(!n.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:s,fcName:a,tried:l,wait:c,callback:u});return}return this.readingCalls++,this.backend[a](n,s,function(h,p){if(h&&p&&l<5){setTimeout(function(){o.read.call(o,n,s,a,l+1,c*2,u)},c);return}if(o.readingCalls--,o.waitingReads.length>0){var d=o.waitingReads.shift();o.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}u(h,p)})}},{key:"prepareLoading",value:function(n,s){var a=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof n=="string"&&(n=this.languageUtils.toResolveHierarchy(n)),typeof s=="string"&&(s=[s]);var c=this.queueLoad(n,s,o,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(function(u){a.loadOne(u)})}},{key:"load",value:function(n,s,a){this.prepareLoading(n,s,{},a)}},{key:"reload",value:function(n,s,a){this.prepareLoading(n,s,{reload:!0},a)}},{key:"loadOne",value:function(n){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=n.split("|"),l=o[0],c=o[1];this.read(l,c,"read",void 0,void 0,function(u,h){u&&s.logger.warn("".concat(a,"loading namespace ").concat(c," for language ").concat(l," failed"),u),!u&&h&&s.logger.log("".concat(a,"loaded namespace ").concat(c," for language ").concat(l),h),s.loaded(n,u,h)})}},{key:"saveMissing",value:function(n,s,a,o,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(s)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}a==null||a===""||(this.backend&&this.backend.create&&this.backend.create(n,s,a,o,null,QMe(QMe({},c),{},{isUpdate:l})),!(!n||!n[0])&&this.store.addResource(n[0],s,a,o))}}]),e}(Kf);function V2t(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(r){var e={};if(Jc(r[1])==="object"&&(e=r[1]),typeof r[1]=="string"&&(e.defaultValue=r[1]),typeof r[2]=="string"&&(e.tDescription=r[2]),Jc(r[2])==="object"||Jc(r[3])==="object"){var i=r[3]||r[2];Object.keys(i).forEach(function(n){e[n]=i[n]})}return e},interpolation:{escapeValue:!0,format:function(r,e,i,n){return r},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function eDe(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function tDe(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),e.push.apply(e,i)}return e}function fh(t){for(var r=1;r0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(Zl(this,e),i=r.call(this),IO&&Kf.call(Qc(i)),i.options=eDe(n),i.services={},i.logger=mh,i.modules={external:[]},W2t(Qc(i)),s&&!i.isInitialized&&!n.isClone){if(!i.options.initImmediate)return i.init(n,s),M0(i,Qc(i));setTimeout(function(){i.init(n,s)},0)}return i}return Kl(e,[{key:"init",value:function(){var n=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof s=="function"&&(a=s,s={}),!s.defaultNS&&s.ns&&(typeof s.ns=="string"?s.defaultNS=s.ns:s.ns.indexOf("translation")<0&&(s.defaultNS=s.ns[0]));var o=V2t();this.options=fh(fh(fh({},o),this.options),eDe(s)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=fh(fh({},o.interpolation),this.options.interpolation)),s.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=s.keySeparator),s.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=s.nsSeparator);function l(y){return y?typeof y=="function"?new y:y:null}if(!this.options.isClone){this.modules.logger?mh.init(l(this.modules.logger),this.options):mh.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=H2t);var u=new D2t(this.options);this.store=new w2t(this.options.resources,this.options);var h=this.services;h.logger=mh,h.resourceStore=this.store,h.languageUtils=u,h.pluralResolver=new N2t(u,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(h.formatter=l(c),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new L2t(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new G2t(l(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(y){for(var E=arguments.length,b=new Array(E>1?E-1:0),x=1;x1?E-1:0),x=1;x0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var d=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];d.forEach(function(y){n[y]=function(){var E;return(E=n.store)[y].apply(E,arguments)}});var f=["addResource","addResources","addResourceBundle","removeResourceBundle"];f.forEach(function(y){n[y]=function(){var E;return(E=n.store)[y].apply(E,arguments),n}});var m=SS(),g=function(){var E=function(x,S){n.isInitialized&&!n.initializedStoreOnce&&n.logger.warn("init: i18next is already initialized. You should call init just once!"),n.isInitialized=!0,n.options.isClone||n.logger.log("initialized",n.options),n.emit("initialized",n.options),m.resolve(S),a(x,S)};if(n.languages&&n.options.compatibilityAPI!=="v1"&&!n.isInitialized)return E(null,n.t.bind(n));n.changeLanguage(n.options.lng,E)};return this.options.resources||!this.options.initImmediate?g():setTimeout(g,0),m}},{key:"loadResources",value:function(n){var s=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:EO,o=a,l=typeof n=="string"?n:this.language;if(typeof n=="function"&&(o=n),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return o();var c=[],u=function(d){if(d){var f=s.services.languageUtils.toResolveHierarchy(d);f.forEach(function(m){c.indexOf(m)<0&&c.push(m)})}};if(l)u(l);else{var h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.forEach(function(p){return u(p)})}this.options.preload&&this.options.preload.forEach(function(p){return u(p)}),this.services.backendConnector.load(c,this.options.ns,function(p){!p&&!s.resolvedLanguage&&s.language&&s.setResolvedLanguage(s.language),o(p)})}else o(null)}},{key:"reloadResources",value:function(n,s,a){var o=SS();return n||(n=this.languages),s||(s=this.options.ns),a||(a=EO),this.services.backendConnector.reload(n,s,function(l){o.resolve(),a(l)}),o}},{key:"use",value:function(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&nDe.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}},{key:"setResolvedLanguage",value:function(n){if(!(!n||!this.languages)&&!(["cimode","dev"].indexOf(n)>-1))for(var s=0;s-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(n,s){var a=this;this.isLanguageChangingTo=n;var o=SS();this.emit("languageChanging",n);var l=function(p){a.language=p,a.languages=a.services.languageUtils.toResolveHierarchy(p),a.resolvedLanguage=void 0,a.setResolvedLanguage(p)},c=function(p,d){d?(l(d),a.translator.changeLanguage(d),a.isLanguageChangingTo=void 0,a.emit("languageChanged",d),a.logger.log("languageChanged",d)):a.isLanguageChangingTo=void 0,o.resolve(function(){return a.t.apply(a,arguments)}),s&&s(p,function(){return a.t.apply(a,arguments)})},u=function(p){!n&&!p&&a.services.languageDetector&&(p=[]);var d=typeof p=="string"?p:a.services.languageUtils.getBestMatchFromCodes(p);d&&(a.language||l(d),a.translator.language||a.translator.changeLanguage(d),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage(d)),a.loadResources(d,function(f){c(f,d)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(n),o}},{key:"getFixedT",value:function(n,s,a){var o=this,l=function c(u,h){var p;if(Jc(h)!=="object"){for(var d=arguments.length,f=new Array(d>2?d-2:0),m=2;m1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;var u=function(d,f){var m=s.services.backendConnector.state["".concat(d,"|").concat(f)];return m===-1||m===2};if(a.precheck){var h=a.precheck(this,u);if(h!==void 0)return h}return!!(this.hasResourceBundle(o,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(o,n)&&(!l||u(c,n)))}},{key:"loadNamespaces",value:function(n,s){var a=this,o=SS();return this.options.ns?(typeof n=="string"&&(n=[n]),n.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){o.resolve(),s&&s(l)}),o):(s&&s(),Promise.resolve())}},{key:"loadLanguages",value:function(n,s){var a=SS();typeof n=="string"&&(n=[n]);var o=this.options.preload||[],l=n.filter(function(c){return o.indexOf(c)<0});return l.length?(this.options.preload=o.concat(l),this.loadResources(function(c){a.resolve(),s&&s(c)}),a):(s&&s(),Promise.resolve())}},{key:"dir",value:function(n){if(n||(n=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!n)return"rtl";var s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return s.indexOf(this.services.languageUtils.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var n=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:EO,o=fh(fh(fh({},this.options),s),{isClone:!0}),l=new e(o),c=["store","services","language"];return c.forEach(function(u){l[u]=n[u]}),l.services=fh({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new XMe(l.services,l.options),l.translator.on("*",function(u){for(var h=arguments.length,p=new Array(h>1?h-1:0),d=1;d0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new xO(t,r)});var La=xO.createInstance();La.createInstance=xO.createInstance;var NSr=La.createInstance,LSr=La.init,FSr=La.loadResources,HSr=La.reloadResources,USr=La.use,BSr=La.changeLanguage,kSr=La.getFixedT,gh=La.t,GSr=La.exists,VSr=La.setDefaultNamespace,zSr=La.hasLoadedNamespace,jSr=La.loadNamespaces,WSr=La.loadLanguages,Q8=La;var Jf=class extends jo{constructor(e){super();this.name="BaseViewer";this.translate=this.initLocalization();this.height=0;this.width=0;this.enableOverlayRenderer=!0;this.viewerCfg=e,this.initLocalization(),this.initViewerContainer(),this.initWidgetContainer()}initLocalization(){var i;let e=((i=this.viewerCfg)==null?void 0:i.language)||"cn";return Q8.init({lng:e,debug:!1,resources:{en:{translation:gpe},cn:{translation:vpe}}}),Q8.t}initViewerContainer(){let e=document.getElementById(this.viewerCfg.containerId);e||(ne.error("[BaseViewer] containerId:",this.viewerCfg.containerId,"is not found in dom tree! will append to document body"),e=document.body);let i=document.createElement("div");i.classList.add("viewer-container"),i.style.cssText="width: 100%; height: 100%; position: absolute; overflow: hidden;",e.appendChild(i),this.width=i.clientWidth,this.height=i.clientHeight,this.viewerContainer=i}initWidgetContainer(){var i;let e=document.createElement("div");e.classList.add("widget-container"),(i=this.viewerContainer)==null||i.appendChild(e),this.widgetContainer=e}destroy(){var e,i,n;(e=this.widgetContainer)==null||e.remove(),this.widgetContainer=void 0,(i=this.viewerContainer)==null||i.remove(),this.viewerContainer=void 0,(n=this.scene)==null||n.clear(),this.scene=void 0,this.renderer&&(this.renderer.domElement.remove(),this.renderer.clear(),this.renderer.dispose(),this.renderer.forceContextLoss(),this.renderer=void 0),this.overlayRender&&(this.overlayRender.destroy(),this.overlayRender=void 0),this.camera=void 0,this.controls&&(this.controls.dispose(),this.controls=void 0),this.groundPlane&&(this.groundPlane.geometry.dispose(),this.groundPlane.clear(),this.groundPlane=void 0)}enableRender(){}getRaycaster(){}getRaycastableObjectsByMouse(e){return[]}getBBox(){}getActiveSection(){}flyTo(e,i){}is3d(){return!0}deactivateMeasurement(){}setMeasurementsVisibility(e){}screenshot(e){return ot(this,null,function*(){})}showStats(){}hideStats(){}};var oE=class{constructor(r){this.viewer=r,this.boxSelectHelper=new $f(r)}get viewerContainer(){return this.viewer.viewerContainer}get camera(){return this.viewer.camera}get raycaster(){return this.viewer.getRaycaster()}activate(){var r;(r=this.boxSelectHelper)==null||r.select().then(e=>{this.handleZoomToRect(e.min,e.max)})}deactivate(){var r;(r=this.boxSelectHelper)==null||r.deactivate(),this.boxSelectHelper=void 0}pickPositionByScreenPoint(r){let e=Mr.screenPoint2NdcPoint(r,this.camera,this.viewerContainer);this.raycaster.setFromCamera(e,this.camera);let i=[];this.viewer.name==="BimViewer"?i=this.viewer.getRaycastableObjectsByMouse({clientX:r.x,clientY:r.y}):this.viewer.name==="DxfViewer"&&(i=[this.viewer.groundPlane]);let n=this.raycaster.intersectObjects(i)||[];if(n.length>0)return n[0].point}handleZoomToRect(r,e){let i=this.pickPositionByScreenPoint(r),n=this.pickPositionByScreenPoint(e);if(i&&n){let s=new A(Math.min(i.x,n.x),Math.min(i.y,n.y),Math.min(i.z,n.z)),a=new A(Math.max(i.x,n.x),Math.max(i.y,n.y),Math.max(i.z,n.z)),o=new Ot(s,a);this.viewer.zoomToBBox(o)}}destroy(){this.deactivate()}};var _O=class extends nE{constructor(e,i){super(i);this.manager=e}undo(){let e=super.undo();switch(e==null?void 0:e.type){case"Add":{let i=this.manager.getMarkupById(e.payload.id);i&&this.manager.removeMarkup(i,!1)}break;case"Remove":{let i=this.manager.createMarkup(e.payload);i&&this.manager.addMarkup(i,!1)}break;case"Update":{let{from:i,to:n}=e.payload,s=this.manager.getMarkupById(i.id);s&&this.manager.updateMarkup(s,i,!1)}break;default:break}return e}redo(){let e=super.redo();switch(e==null?void 0:e.type){case"Add":{let i=this.manager.createMarkup(e.payload);i&&this.manager.addMarkup(i,!1)}break;case"Remove":{let i=this.manager.getMarkupById(e.payload.id);i&&this.manager.removeMarkup(i,!1)}break;case"Update":{let{from:i,to:n}=e.payload,s=this.manager.getMarkupById(n.id);s&&this.manager.updateMarkup(s,n,!1)}break;default:break}return e}};var sDe=new A,D0=class extends jo{constructor(e){var i;super();this.drawableList=new Hp("markup");this.lineWidth=2;this.lineColor="#ff0000";this.fillColor="rgba(255, 0, 0, 0.3)";this.fontSize=20;this.mouseDown=!1;this.mouseDownPositionX=void 0;this.mouseDownPositionY=void 0;this.isDrawing=!1;this.tempPoints=[];this.actived=!1;this.undoRedoHelper=new _O(this);this.mousedown=e=>{var n;let i=this.pickThreejsPositionByMouse(e);if(this.mouseDownPositionX=i.x,this.mouseDownPositionY=i.y,e.button===0&&(this.mouseDown=!0),e.button===2&&(this.creatingShape&&this.tempPoints.length<2?(this.removeMarkup(this.creatingShape,!1),this.creatingShape=void 0):(n=this.creatingShape)==null||n.update(this.tempPoints),this.isDrawing&&this.endDraw(this.creatingShape)),this.selectedShape&&(this.selectedShape.selected=!1,this.selectedShape=void 0,this.render()),!this.isDrawing){let s=this.drawableList.getDrawableByPosition(i);s&&(this.selectedShape=s,s.selected=!0,this.render(),this.textInput&&(this.textInput.style.display="none"))}if(this.isCreateTextMode()&&this.mouseDown&&!this.selectedShape&&((!this.textInitialPosition||this.textInput&&this.textInput.value.length===0)&&(this.textInitialPosition=i.clone()),this.addInput(e.clientX,e.clientY)),this.isCreateLineMode()&&this.mouseDown&&!this.selectedShape){if(this.tempPoints.length>0){let s=this.tempPoints[0];if(sDe.subVectors(s,i).length(){e.preventDefault();let i=this.pickThreejsPositionByMouse(e);if(this.selectedShape){if(this.mouseDown&&this.mouseDownPositionX!==void 0&&this.mouseDownPositionY!==void 0){this.isEditing()||(this.initialDataForEditing=this.selectedShape.getData());let n=i.x-this.mouseDownPositionX,s=i.y-this.mouseDownPositionY;this.selectedShape.translate(n,s),this.render(),this.mouseDownPositionX=i.x,this.mouseDownPositionY=i.y}}else{if(this.isCreateDotMode())return;if(this.mouseDown&&this.isCreateShapeMode()&&this.mouseDownPositionX!==void 0&&this.mouseDownPositionY!==void 0){let n=new A(this.mouseDownPositionX,this.mouseDownPositionY,0);if(!this.creatingShape){let s=this.creatingShape=this.drawShape(n,i);s&&this.addMarkup(s,!1)}this.creatingShape.update([n,i]),this.isDrawing=!0,this.render()}if(this.isCreateLineMode()&&this.tempPoints.length>0&&this.isDrawing){if(!this.creatingShape){let s=this.creatingShape=this.drawLine([...this.tempPoints,i]);s&&this.addMarkup(s,!1)}let n=this.tempPoints[0];sDe.subVectors(n,i).length(){e.preventDefault(),this.mouseDown=!1,this.selectedShape&&this.isEditing()&&this.endEdit(this.selectedShape),this.isCreateShapeMode()&&this.isDrawing&&this.endDraw(this.creatingShape)};this.keydown=e=>{e.code==="Delete"?this.selectedShape&&this.removeMarkup(this.selectedShape):e.ctrlKey&&e.code==="KeyZ"?this.undo():e.ctrlKey&&e.code==="KeyY"?this.redo():e.code==="Escape"&&this.cancelDraw(this.creatingShape)};this.viewer=e,this.overlayRender=this.viewer.overlayRender,(i=this.overlayRender)==null||i.addDrawableList(this.drawableList)}get viewerCanvas(){var e;return(e=this.viewer.renderer)==null?void 0:e.domElement}get camera(){return this.viewer.camera}get raycaster(){return this.viewer.getRaycaster()}removeMarkupEventFromViewer(){}setMarkupsVisibility(e){this.drawableList.getDrawables().forEach(i=>i.visible=e)}clearAll(){this.drawableList.clear(),this.textInput&&(this.textInput.style.display="none"),this.undoRedoHelper.clear(),this.isDrawing&&this.endDraw(),this.render()}isMarkupActive(){return this.actived}activate(){this.actived=!0,this.viewerCanvas.addEventListener("pointerdown",this.mousedown),this.viewerCanvas.addEventListener("pointermove",this.mousemove),this.viewerCanvas.addEventListener("pointerup",this.mouseup),window.addEventListener("keydown",this.keydown);let e=this.viewer.controls;this.tempKey=e.mouseButtons.LEFT,e.mouseButtons.LEFT=-1,this.tempArrowKeys=e.keys,e.keys={},this.render()}deactivate(){this.actived=!1;let e=this.viewerCanvas;e&&(e.removeEventListener("pointerdown",this.mousedown),e.removeEventListener("pointermove",this.mousemove),e.removeEventListener("pointerup",this.mouseup)),window.removeEventListener("keydown",this.keydown),this.viewer.controls.mouseButtons.LEFT=this.tempKey,this.viewer.controls.keys=this.tempArrowKeys,this.textInput&&this.textInput.remove(),this.textInput=void 0,this.textInitialPosition=void 0,this.mouseDown=!1,this.selectedShape=void 0,this.tempPoints=[],this.isDrawing=!1,this.creatingShape=void 0}getActiveMarkupType(){return this.type}setDrawType(e){this.type=e,this.endDraw()}setLineWidth(e){this.lineWidth=e}getLineWidth(){return this.lineWidth}setLineColor(e){this.lineColor=e}getLineColor(){return this.lineColor}setFillColor(e){this.fillColor=e}getFillColor(){return this.fillColor}setFontSize(e){this.fontSize=e}getFontSize(){return this.fontSize}pickPositionByScreenPoint(e){let i=new A,n=Mr.screenPoint2NdcPoint(e,this.camera,this.viewerCanvas);this.raycaster.setFromCamera(n,this.camera);let s=this.viewer.scene,a=this.raycaster.intersectObject(this.viewer.groundPlane||s)||[];return a.length>0&&i.copy(a[0].point),i}pickThreejsPositionByMouse(e){let i=Mr.getScreenPointByEvent(e,this.viewerCanvas);return this.pickPositionByScreenPoint(i)}isEditing(){return!!this.initialDataForEditing}endEdit(e){this.undoRedoHelper.addRecord("Update",{from:this.initialDataForEditing,to:e.getData()}),this.initialDataForEditing=void 0}endDraw(e){e&&this.undoRedoHelper.addRecord("Add",e.getData()),this.reset()}cancelDraw(e){e&&this.removeMarkup(e,!1),this.reset()}reset(){this.textInput&&(this.textInput.style.display="none",this.textInput.value=""),this.textInitialPosition=void 0,this.tempPoints=[],this.isDrawing=!1,this.creatingShape=void 0,this.mouseDownPositionX=void 0,this.mouseDownPositionY=void 0,this.render()}render(){var e;(e=this.overlayRender)==null||e.render()}addMarkup(e,i=!0){this.drawableList.addDrawable(e),this.render(),i&&this.undoRedoHelper.addRecord("Add",e.getData())}updateMarkup(e,i,n=!0){this.drawableList.updateDrawable(e,i),this.render(),n&&this.undoRedoHelper.addRecord("Update",e.getData())}removeMarkup(e,i=!0){this.drawableList.removeDrawable(e),this.render(),i&&this.undoRedoHelper.addRecord("Remove",e.getData())}removeMarkupById(e,i=!0){let n=this.getMarkupById(e);this.drawableList.removeDrawable(n),this.render(),i&&this.undoRedoHelper.addRecord("Remove",n.getData())}createMarkup(e){return Dr.createDrawable(e)}getMarkupById(e){return this.drawableList.getDrawableById(e)}getMarkupData(){return this.drawableList.getDrawableDatas()}setMarkupData(e){this.drawableList.clear(),this.drawableList.setDrawableDatas(e),this.render()}isCreateLineMode(){return["PolylineMarkup","CloudLineMarkup"].includes(this.type)}isCreateDotMode(){return["DotMarkup"].includes(this.type)}isCreateTextMode(){return["TextMarkup"].includes(this.type)}isCreateShapeMode(){return["XMarkup","RectMarkup","CloudRectMarkup","CircleMarkup","EllipseMarkup","ArrowMarkup","DotMarkup"].includes(this.type)}drawShape(e,i){let n=[[e.x,e.y]];return i&&n.push([i.x,i.y]),Dr.createDrawable({id:St.guid(),lineWidth:this.lineWidth,lineColor:this.lineColor,fillColor:this.fillColor,type:this.type,points:n})}drawLine(e){return Dr.createDrawable({id:St.guid(),lineWidth:this.lineWidth,lineColor:this.lineColor,fillColor:this.fillColor,type:this.type,points:e.map(i=>[i.x,i.y])})}drawText(e,i){return Dr.createDrawable({id:St.guid(),lineWidth:this.lineWidth,lineColor:this.lineColor,fillColor:this.fillColor,fontSize:this.fontSize*this.overlayRender.getPixelSize(1,this.camera),type:this.type,text:i,points:[[e.x,e.y]]})}addInput(e,i){var s;if(!this.textInput){let a=document.createElement("textarea");a.style.cssText=` - position: fixed; - border: 1px solid red; - background: transparent; - outline: none; - resize: none; - overflow: hidden; - z-index: 1000; - box-sizing: content-box; - padding: 0px 2px; - color: ${this.lineColor}`,a.setAttribute("wrap","off"),a.onkeydown=l=>{if(l.key==="Enter"){let c=parseInt(a.style.height);a.style.height=`${c+this.fontSize}px`}this.isDrawing=!0};let o;a.onkeyup=l=>{var h;let c=l.target.value,u=((h=this.overlayRender)==null?void 0:h.measureTextLength(c,`${this.fontSize}px Arial`))||0;u>50&&(o&&clearTimeout(o),o=setTimeout(()=>{l.target.style.width=`${u+4}px`},0))},a.onfocus=()=>{},a.onblur=l=>{let c=l.target.value;if(c.length>0&&this.textInitialPosition){let u=this.creatingShape=this.drawText(this.textInitialPosition,c);u.setTolerance(this.overlayRender.getPixelSize(1,this.camera)),this.addMarkup(u,!1),this.endDraw(this.creatingShape)}},(s=this.viewer.viewerContainer)==null||s.appendChild(a),this.textInput=a}setTimeout(()=>{this.textInput.focus()},0),this.textInput.style.width=`${50}px`,this.textInput.style.height=`${this.fontSize}px`,this.textInput.style.lineHeight=`${this.fontSize}px`,this.textInput.style.fontSize=`${this.fontSize}px`,this.textInput.style.color=this.lineColor,this.textInput.style.display="inline-block",this.textInput.style.left=e+4+"px",this.textInput.style.top=i-this.fontSize+"px"}undo(){this.undoRedoHelper.undo()}redo(){this.undoRedoHelper.redo()}clearUndoRedo(){this.undoRedoHelper.clear()}destroy(){this.deactivate(),this.clearAll()}};var aDe=new A,wO=class extends po{constructor(e,i){super(e);this.lineSegments=[];this.boxes=i,this.lineColor="red",this.lineWidth=2,this.calculateCloudLineSegments(i)}calculateCloudLineSegments(e){var i;for(let n=0;n>>0,1):t.set(r,[]))},emit:function(r,e){var i=t.get(r);i&&i.slice().map(function(n){n(e)}),(i=t.get("*"))&&i.slice().map(function(n){n(r,e)})}}}var cE=(Oe=>(Oe.HomeView="HomeView",Oe.OrthoMode="OrthoMode",Oe.Measure="Measure",Oe.MeasureDistance="MeasureDistance",Oe.MeasureArea="MeasureArea",Oe.MeasureAngle="MeasureAngle",Oe.MeasureCoordinate="MeasureCoordinate",Oe.MeasureClear="MeasureClear",Oe.Markup="Markup",Oe.MarkupArrow="Arrow",Oe.MarkupRect="Rect",Oe.MarkupCloudRect="CloudRect",Oe.MarkupPolyLine="PolyLine",Oe.MarkupCloudLine="CloudLine",Oe.MarkupEllipse="Ellipse",Oe.MarkupCircle="Circle",Oe.MarkupDot="Dot",Oe.MarkupText="Text",Oe.MarkupX="X",Oe.MarkupStrokeStyle="StrokeStyle",Oe.MarkupLineWidth="LineWidth",Oe.MarkupLineWidth2="LineWidth2",Oe.MarkupLineWidth5="LineWidth5",Oe.MarkupLineWidth10="LineWidth10",Oe.MarkupFontSize="FontSize",Oe.MarkupFontSize14="FontSize14",Oe.MarkupFontSize18="FontSize18",Oe.MarkupFontSize24="FontSize24",Oe.MarkupClear="MarkupClear",Oe.MarkupQuit="MarkupQuit",Oe.Section="Section",Oe.SectionBox="SectionBox",Oe.SectionPlane="SectionPlane",Oe.SectionAxis="SectionAxis",Oe.BimTree="BimTree",Oe.Viewpoint="Viewpoint",Oe.Annotation="Annotation",Oe.Property="Property",Oe.Settings="Settings",Oe.Compared="Compared",Oe.QuitCompare="QuitCompare",Oe.Fullscreen="FullScreen",Oe.SceneClear="SceneClear",Oe.Layers="Layers",Oe.ZoomToRectangle="ZoomToRectangle",Oe.Screenshot="GetScreenshot",Oe))(cE||{}),oDe=[["HomeView","OrthoMode","FullScreen","ZoomToRectangle","GetScreenshot"],["Measure","Markup","Section"],["BimTree","Viewpoint","Annotation","Property","Compared","QuitCompare","Layers"],["Settings"]];var vh=class{constructor(r,e,i=[...oDe]){this.bimViewer=r;this.menuConfig=e;this.groupConfig=i;this.visible=!0;this.menuList=new Map;this.keydown=r=>{this.visible&&r.code==="Escape"&&this.clearActive()};this.init()}init(){var e;let r=document.createElement("div");r.classList.add("toolbar"),this.groupConfig.forEach((i,n)=>{let s=document.createElement("div");s.classList.add("toolbar-group");let a=document.createElement("div");a.classList.add("toolbar-group-division"),i.forEach(o=>{let l=(0,Yn.get)(this.menuConfig,o);if(l&&l.visible!==!1){let c=this.createToolbarMenu(this.bimViewer,o,l);s.appendChild(c.element)}}),s.hasChildNodes()&&(n&&r.appendChild(a),r.appendChild(s))}),this.element=r,(e=this.bimViewer.widgetContainer)==null||e.appendChild(r),r.oncontextmenu=i=>{i.preventDefault()},window.addEventListener("keydown",this.keydown,!1)}clearActive(){if(this.activateMenuId){let r=this.menuList.get(this.activateMenuId);r==null||r.setActive(!1),this.activateMenuId=void 0}}createToolbarMenu(r,e,i,n){let s=new eG(r,this,e,i,n);if(this.menuList.set(e,s),i.children){let a=document.createElement("div");a.classList.add("toolbar-sub-menu");let o=document.createElement("div");o.classList.add("toolbar-sub-menu-list"),a.appendChild(o),(0,Yn.forIn)(i.children,(l,c)=>{if(l&&l.visible!==!1){let u=this.createToolbarMenu(r,c,l,s);o.appendChild(u.element)}}),s.element.appendChild(a)}return s}updateMenu(r,e){(0,Yn.assign)(this.menuConfig[r],e),this.refresh()}updateMenus(r){(0,Yn.forEach)(r,({menuId:e,config:i})=>{(0,Yn.assign)(this.menuConfig[e],i)}),this.refresh()}addMenu(r,e,i){if((0,Yn.keys)(this.menuConfig).includes(r)){ne.error("[Toolbar]",r,"exists.");return}if((0,Yn.assign)(this.menuConfig,{[r]:e}),i){let[n,s]=i;if(n>this.groupConfig.length-1)this.groupConfig=(0,Yn.concat)(this.groupConfig,[[r]]);else{let a=this.groupConfig[n];this.groupConfig[n]=s>a.length-1?(0,Yn.concat)(a,r):(0,Yn.concat)((0,Yn.take)(a,s),r,(0,Yn.takeRight)(a,a.length-s))}}else this.groupConfig=(0,Yn.concat)(this.groupConfig,[[r]]);this.refresh()}refresh(){this.destroy(),this.init()}show(){this.element&&(this.element.style.display=""),this.visible=!0}hide(){this.element&&(this.element.style.display="none"),this.visible=!1}destroy(){this.element&&this.element.remove(),this.element=void 0,this.menuList.clear(),window.removeEventListener("keydown",this.keydown,!1)}},eG=class{constructor(r,e,i,n,s){this.bimViewer=r;this.toolbar=e;this.menuId=i;this.eventBus=lE();this.active=n.defaultActive||!1,this.element=n.customElement&&n.customElement(r,this.menuId,n)||this.createButton(r,this.menuId,n),this.eventBus.on("activeChange",a=>{a?(this.element.classList.add("active"),(0,Yn.forEach)(n.mutexIds,o=>{var c;let l=(c=this.toolbar)==null?void 0:c.menuList.get(o);l&&l.active&&l.setActive(!1)}),n.onActive&&n.onActive(r)):(this.element.classList.remove("active"),n.onDeactive&&n.onDeactive(r)),this.element.firstChild instanceof HTMLElement&&IC(this.element.firstChild.classList,n.icon,this.active),s&&s.setActive(a)}),this.element.onclick=a=>{switch(a.stopPropagation(),n.type){case 1:{n.onClick&&n.onClick(r,this.toolbar,a);break}case 4:{n.onClick&&n.onClick(r,this.toolbar,a),this.active=!this.active,this.toolbar.activateMenuId=this.menuId,this.eventBus.emit("activeChange",this.active);break}default:}}}createButton(r,e,i){let n=document.createElement("div");n.id=e,n.classList.add("toolbar-menu"),i.defaultActive&&n.classList.add("active"),i.children&&n.classList.add("toolbar-parent-menu");let{default:s="icon-new",iconFont:a=ho}=i.icon;return n.innerHTML=`
`,n.title=gh(i.menuName),n.innerHTML+=`${n.title}`,n}setActive(r){this.active=r,this.eventBus.emit("activeChange",this.active)}};var cDe={["Arrow"]:{menuName:"Toolbar.markupArrow",icon:{default:"icon-arrow",iconFont:"iconfont"},type:4,onActive:t=>{t.activateMarkup("ArrowMarkup")},onDeactive(t){t.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","CloudLine","Ellipse","Circle","Dot","Text","X"]},["Rect"]:{defaultActive:!0,menuName:"Toolbar.markupRect",icon:{default:"icon-rectangle",iconFont:"iconfont"},type:4,onActive:t=>{t.activateMarkup("RectMarkup")},onDeactive(t){t.deactivateMarkup()},mutexIds:["Arrow","CloudRect","PolyLine","CloudLine","Ellipse","Circle","Dot","Text","X"]},["CloudRect"]:{menuName:"Toolbar.markupCloudRect",icon:{default:"icon-cloud",iconFont:"iconfont"},type:4,onActive:t=>{t.activateMarkup("CloudRectMarkup")},onDeactive(t){t.deactivateMarkup()},mutexIds:["Rect","Arrow","PolyLine","CloudLine","Ellipse","Circle","Dot","Text","X"]},["PolyLine"]:{menuName:"Toolbar.markupPolyLine",icon:{default:"icon-polyline",iconFont:"iconfont"},type:4,onActive:t=>{t.activateMarkup("PolylineMarkup")},onDeactive(t){t.deactivateMarkup()},mutexIds:["Rect","Arrow","CloudRect","CloudLine","Ellipse","Circle","Dot","Text","X"]},["CloudLine"]:{menuName:"Toolbar.markupCloudLine",icon:{default:"icon-cloud-segment",iconFont:"iconfont"},type:4,onActive:t=>{t.activateMarkup("CloudLineMarkup")},onDeactive(t){t.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","Arrow","Ellipse","Circle","Dot","Text","X"]},["Ellipse"]:{menuName:"Toolbar.markupEllipse",icon:{default:"icon-oval",iconFont:"iconfont"},type:4,onActive:t=>{t.activateMarkup("EllipseMarkup")},onDeactive(t){t.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","CloudLine","Arrow","Circle","Dot","Text","X"]},["Circle"]:{menuName:"Toolbar.markupCircle",icon:{default:"icon-round",iconFont:"iconfont"},type:4,onActive:t=>{t.activateMarkup("CircleMarkup")},onDeactive(t){t.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","CloudLine","Ellipse","Arrow","Dot","Text","X"]},["Dot"]:{menuName:"Toolbar.markupDot",icon:{default:"icon-round",iconFont:"iconfont"},type:4,onActive:t=>{t.activateMarkup("DotMarkup")},onDeactive(t){t.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","CloudLine","Ellipse","Arrow","Circle","Text","X"]},["X"]:{menuName:"Toolbar.markupX",icon:{default:"icon-cross",iconFont:"iconfont"},type:4,onActive:t=>{t.activateMarkup("XMarkup")},onDeactive(t){t.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","CloudLine","Ellipse","Circle","Dot","Arrow","Text"]},["Text"]:{menuName:"Toolbar.markupText",icon:{default:"icon-text",iconFont:"iconfont"},type:4,onActive:t=>{t.activateMarkup("TextMarkup")},onDeactive(t){t.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","CloudLine","Ellipse","Circle","Dot","Arrow","X"]},["StrokeStyle"]:{menuName:"Toolbar.markupStroke",icon:{default:"icon-color-red",iconFont:"iconfont"},type:1,onClick:(t,r,e)=>{let i=e.target.parentElement,n=i==null?void 0:i.firstElementChild,s=document.createElement("input");s.setAttribute("type","color"),s.style.position="absolute",s.style.left=`${e.x}px`,s.style.top=`${e.y}px`,s.value=t.getMarkupLineColor(),s.click(),s.oninput=a=>{let o=a.target.value;t.setMarkupLineColor(o),n.style.color=o}}},["LineWidth"]:{menuName:"Toolbar.markupLineWidth",icon:{default:"icon-line",iconFont:"iconfont"},customElement(t,r,e){let i=document.createElement("div");return i.id=r,i.classList.add("toolbar-menu"),e.children&&i.classList.add("toolbar-parent-menu"),i.title=gh(e.menuName),i.innerHTML+=`${i.title}`,i},type:3,children:{["LineWidth2"]:{defaultActive:!0,icon:{default:"icon-line-2",iconFont:"iconfont"},onClick:t=>{t.setMarkupLineWidth(2)},type:4,menuName:"Toolbar.markupLineWidth2",mutexIds:["LineWidth5","LineWidth10"]},["LineWidth5"]:{icon:{default:"icon-line-3",iconFont:"iconfont"},onClick:t=>{t.setMarkupLineWidth(3)},type:4,menuName:"Toolbar.markupLineWidth5",mutexIds:["LineWidth2","LineWidth10"]},["LineWidth10"]:{icon:{default:"icon-line-4",iconFont:"iconfont"},onClick:t=>{t.setMarkupLineWidth(4)},type:4,menuName:"Toolbar.markupLineWidth10",mutexIds:["LineWidth2","LineWidth5"]}}},["FontSize"]:{menuName:"Toolbar.markupFontSize",icon:{default:"icon-font"},customElement(t,r,e){let i=document.createElement("div");return i.id=r,i.classList.add("toolbar-menu"),e.children&&i.classList.add("toolbar-parent-menu"),i.title=gh(e.menuName),i.innerHTML+=`${i.title}`,i},type:3,children:{["FontSize14"]:{icon:{default:"icon-font14",iconFont:"iconfont"},onClick:t=>{t.setMarkupFontSize(14)},type:4,menuName:"",mutexIds:["FontSize18","FontSize24"]},["FontSize18"]:{defaultActive:!0,icon:{default:"icon-font18",iconFont:"iconfont"},onClick:t=>{t.setMarkupFontSize(18)},type:4,menuName:"",mutexIds:["FontSize14","FontSize24"]},["FontSize24"]:{icon:{default:"icon-font24",iconFont:"iconfont"},onClick:t=>{t.setMarkupFontSize(24)},type:4,menuName:"",mutexIds:["FontSize14","FontSize18"]}}},["MarkupClear"]:{icon:{default:"icon-eraser",iconFont:"iconfont"},onClick:t=>{ne.info("[Toolbar]","Clear Markup",t),t.clearMarkups()},type:1,menuName:"Toolbar.clearMarkup"},["MarkupQuit"]:{icon:{default:""},customElement(t,r,e){let i=document.createElement("div");return i.id=r,i.classList.add("toolbar-menu"),e.children&&i.classList.add("toolbar-parent-menu"),i.title=gh(e.menuName),i.innerHTML+=`${i.title}`,i},onClick:(t,r)=>{var e;t.deactivateMarkup(),r.destroy(),(e=t.toolbar)==null||e.show()},type:1,menuName:"Toolbar.quitMarkup"}},q2t=[["Arrow","Rect","CloudRect","PolyLine","Ellipse","Circle","Text","MarkupClear","MarkupQuit"]],RO=class extends vh{constructor(r,e,i=[...q2t]){super(r,e,i)}};var uE=class{constructor(r,e,i=document.body){this.container=i;this.isFollowing=!1;this.diffX=0;this.diffY=0;this.start=r=>{this.isFollowing=!0,this.diffX=r.clientX-this.element.offsetLeft,this.diffY=r.clientY-this.element.offsetTop};this.stop=()=>{this.isFollowing=!1};this.follow=r=>{if(!this.isFollowing)return;let e=r.clientX-this.diffX,i=r.clientY-this.diffY;this.element.style.left=e+"px",this.element.style.top=i+"px"};this.element=document.createElement("div"),this.element.id=r,this.element.classList.add("pop-panel");let n=document.createElement("div");n.classList.add("pop-panel-header"),n.append(e),this.element.appendChild(n),this.header=n;let s=document.createElement("div");s.classList.add("pop-panel-body"),this.element.appendChild(s),this.body=s,n.addEventListener(vB,this.start),n.addEventListener(gB,this.stop),document.body.addEventListener(wf,this.follow),this.container.appendChild(this.element)}destroy(){document.body.removeEventListener(wf,this.follow),this.element.removeEventListener(vB,this.start),this.element.removeEventListener(gB,this.stop),this.element.remove()}};var Fa=new A(1,0,0),Qf=new A(0,1,0),em=new A(0,0,1);var uDe=new A(0,1,0),_S=new Ue,tG=2,tu=class extends hr{constructor(e=Fa){super();this.redMaterial=new or({color:16711680,depthTest:!1});this.greenMaterial=new or({color:65280,depthTest:!1});this.blueMaterial=new or({color:255,depthTest:!1});this.highlightMaterial=new or({color:16776960,depthTest:!1});this.pickableMaterial=new or({color:9807270,depthTest:!1});this.initIgnoreClipMaterial(),this.initOrUpdateByAxis(e)}initIgnoreClipMaterial(){[this.redMaterial,this.greenMaterial,this.blueMaterial,this.highlightMaterial,this.pickableMaterial].forEach(e=>{e.onBeforeCompile=function(i,n){i.fragmentShader=i.fragmentShader.replace("#include ","").replace("#include ",""),i.vertexShader=i.vertexShader.replace("#include ","").replace("#include ","")}})}setDirection(e){let i=new Or;i.setFromUnitVectors(Fa,e),this.applyQuaternion(i)}initOrUpdateByAxis(e){this.clear(),[{actionType:"TranslateX",direction:Fa,material:this.redMaterial},{actionType:"TranslateY",direction:Qf,material:this.greenMaterial},{actionType:"TranslateZ",direction:em,material:this.blueMaterial}].forEach(i=>{let{actionType:n,direction:s,material:a}=i,o=this.createTranslateGizmo(n,s,tG,s.angleTo(e)===0?a:this.pickableMaterial);this.add(o)}),[{actionType:"RotateX",direction:Fa,material:this.redMaterial,degree:90},{actionType:"RotateY",direction:Qf,material:this.greenMaterial,degree:90},{actionType:"RotateZ",direction:em,material:this.blueMaterial,degree:90}].forEach(i=>{let{actionType:n,direction:s,material:a,degree:o}=i;if(s.angleTo(e)!==0){let l=this.createRotateGizmo(n,s,tG,a,o);this.add(l)}}),this.createSphere(1,this.pickableMaterial)}createTranslateGizmo(e,i,n,s){let a=i.angleTo(uDe),o=uDe.clone().cross(i);_S.makeRotationAxis(o,a);let l=new Dl(n/5,n/5,n*20),c=n*10;l.translate(0,c,0),l.applyMatrix4(_S);let u=new Dl(0,n,n*3),h=c*2;u.translate(0,h,0),u.applyMatrix4(_S);let p=qo([u,l]),d=new Je(p,s);return d.userData.actionType=e,s===this.pickableMaterial&&d.layers.set(11),d}createRotateGizmo(e,i,n,s,a){let o=new A(0,0,1),l=i.clone().cross(o),c=i.angleTo(o);_S.makeRotationAxis(l,c);let u=new wp(n*12,n/5,8,36,wr.degToRad(a));u.applyMatrix4(_S);let h=new Je(u,s);return h.userData.actionType=e,h}createSphere(e,i){let n=new ro(e,32,16),s=new Je(n,i);s.layers.set(11),this.add(s)}setActiveAxis(e){this.initOrUpdateByAxis(e)}createHoverRotateObjectByAxis(e){let i=Fa;switch(e){case"RotateX":i=Fa;break;case"RotateY":i=Qf;break;case"RotateZ":i=em;break;default:break}return this.createRotateGizmo("",i,tG,this.highlightMaterial,360)}setActive(e,i){var s;let n=i.userData.actionType;["RotateX","RotateY","RotateZ"].includes(n)?e?(this.hoverObject=this.createHoverRotateObjectByAxis(n),this.add(this.hoverObject),i.visible=!1):((s=this.hoverObject)==null||s.removeFromParent(),i.visible=!0,this.hoverObject=void 0):e?(this.originalMaterial=i.material,i.material=this.highlightMaterial):this.originalMaterial&&(i.material=this.originalMaterial)}adjustSize(e){let i=new A;this.getWorldPosition(i);let n=e.position,s=1;e instanceof Zi?s=(e.top-e.bottom)/e.zoom:e instanceof qr&&(s=i.distanceTo(n)*Math.min(1.9*Math.tan(Math.PI*e.fov/360)/e.zoom,7)),this.scale.set(1,1,1).multiplyScalar(s/180)}};var tm=class{constructor(r){this.mouseDown=!1;this.lastWorldPos=new A;this.mouseMoved=!1;this.dragStarted=!1;this.refrencePlane=new Ei;this.isShowSectionPlane=!1;this.mousedown=r=>{r.button===0&&this.camera&&this.selectedObject&&(this.mouseDown=!0)};this.mousemove=r=>{if(this.dragStarted)this.updateRaycasterByMouse(r),this.onDragMove(r);else{this.activateSelectedObject(!1);let e=this.getIntersections(r);e?(this.selectedObject=e.object,this.activateSelectedObject(!0),this.mouseDown&&(this.dragStarted||(this.dragStarted=!0,this.onDragStart(r)))):this.selectedObject=void 0}this.viewer.enableRender()};this.mouseup=r=>{r.button===0&&(this.mouseDown&&this.dragStarted&&(this.onDragEnd(r),this.dragStarted=!1),this.mouseDown=!1,this.selectedObject=void 0)};this.keydown=r=>{r.code==="Escape"&&this.deactivate()};if(!r.camera||!r.renderer||!r.controls||!r.scene)throw new Error("Invalid bimViewer!");this.viewer=r,this.scene=r.scene,this.renderer=r.renderer;let e=r.getBBox();if(!e)throw new Error("Need to set sectionBox first!");this.sectionBox=e.clone()}get canvas(){var r;return(r=this.viewer.renderer)==null?void 0:r.domElement}get isActive(){return!!this.raycaster}get camera(){return this.viewer.camera}get controls(){return this.viewer.controls}setGlobalClippingEnable(r){this.clipPlanes&&(r?(this.renderer.localClippingEnabled=!0,this.renderer.clippingPlanes=this.clipPlanes):(this.renderer.localClippingEnabled=!1,this.renderer.clippingPlanes=[]))}activate(){this.canvas.addEventListener("pointerdown",this.mousedown),this.canvas.addEventListener("pointermove",this.mousemove),this.canvas.addEventListener("pointerup",this.mouseup),window.addEventListener("keydown",this.keydown),this.raycaster=this.viewer.getRaycaster()}deactivate(){var e;let r=this.canvas;r&&(r.removeEventListener("pointerdown",this.mousedown),r.removeEventListener("pointermove",this.mousemove),r.removeEventListener("pointerup",this.mouseup)),window.removeEventListener("keydown",this.keydown),this.setGlobalClippingEnable(!1),(e=this.selectedObject)==null||e.removeFromParent(),this.selectedObject=void 0,this.dragStarted=!1,this.raycaster=void 0}getIntersections(r){if(!this.raycaster)return;this.updateRaycasterByMouse(r);let e=this.raycaster.intersectObjects(this.getIntersectObjects())||[],i=e.find(n=>n.object&&n.object.parent instanceof tu);return i||e[0]}updateRaycasterByMouse(r){if(!this.raycaster)return;let e=Mr.getScreenPointByEvent(r,this.canvas),i=Mr.screenPoint2NdcPoint(e,this.camera,this.canvas);this.raycaster&&this.raycaster.layers.disable(11),this.raycaster.setFromCamera(i,this.camera)}destroy(){this.deactivate()}};var pDe=new Ot,dDe=new Or,MO=class extends Je{constructor(e,i){super();this.vertices=[];this.actionType=e,this.geometry=new it,this.vertices=i,this.geometry.setFromPoints(i),this.geometry.setIndex([0,1,2,0,2,3]),this.material=new or({depthTest:!1,color:MO.normalPlaneColor,transparent:!0,opacity:.1,side:wi}),this.createIgnoreClipMateriasl(this.material),this.geometry.computeVertexNormals(),this.edge=this.createEdge(i),this.add(this.edge)}createIgnoreClipMateriasl(e){e.onBeforeCompile=function(i,n){i.fragmentShader=i.fragmentShader.replace("#include ","").replace("#include ",""),i.vertexShader=i.vertexShader.replace("#include ","").replace("#include ","")}}createEdge(e){let i=new it;i.setFromPoints(e),i.setIndex([0,1,1,2,2,3,3,0]);let n=new Tr({color:MO.normalLineColor});this.createIgnoreClipMateriasl(n);let s=new _r(i,n);return s.layers.set(11),s}update(e){this.geometry.setFromPoints(e),this.geometry.computeBoundingSphere(),this.geometry.computeVertexNormals(),this.edge.geometry.setFromPoints(e),this.vertices=e}rotatePlane(e,i){let n=this.getPlaneCenter();dDe.setFromAxisAngle(e,i),this.vertices=this.vertices.map(s=>s.sub(n).applyQuaternion(dDe).add(n)),this.update(this.vertices)}setDirection(e){let i=new Or;i.setFromUnitVectors(Fa,e);let n=this.getPlaneCenter();this.vertices=this.vertices.map(s=>s.sub(n).applyQuaternion(i).add(n)),this.update(this.vertices)}getPlaneNormal(){let[e,i,n]=this.vertices,s=new A;return un.getNormal(e,i,n,s),s}setActive(e){this.material.opacity=e?.2:.1}getPlaneCenter(){pDe.setFromPoints(this.vertices);let e=new A;return pDe.getCenter(e),e}},an=MO;an.normalPlaneColor=new Ve(0,.855,.718),an.activePlaneColor=new Ve(1,1,0),an.normalLineColor=16777215;var DO=class extends tm{constructor(e){super(e);this.activeAxis="X";this.center=new A,this.sectionBox.getCenter(this.center),this.axisInfoMap={["X"]:{normal:new A(1,0,0)},["Y"]:{normal:new A(0,1,0)},["Z"]:{normal:new A(0,0,1)}},this.viewer.addEventListener("RenderAfter",()=>{var i;this.isActive&&((i=this.gizmo)==null||i.adjustSize(this.camera))})}activate(){super.activate(),this.setActiveAxis("X")}deactivate(){var e,i;super.deactivate(),(e=this.planeMesh)==null||e.removeFromParent(),(i=this.gizmo)==null||i.removeFromParent(),this.setGlobalClippingEnable(!1),this.planeMesh=void 0,this.gizmo=void 0}resetSection(){var e,i;(e=this.planeMesh)==null||e.removeFromParent(),(i=this.gizmo)==null||i.removeFromParent(),this.setGlobalClippingEnable(!1),this.planeMesh=void 0,this.gizmo=void 0,this.setActiveAxis("X")}setActiveAxis(e){this.activeAxis=e,this.initOrUpdateGizmo(),this.initOrUpdateSectionPlane(),this.initOrUpdateClipPlane(),this.setGlobalClippingEnable(!0),this.viewer.enableRender()}setSectionVisible(e){this.gizmo&&this.planeMesh&&(this.gizmo.visible=e,this.planeMesh.visible=e),this.isShowSectionPlane=e,this.viewer.enableRender()}initOrUpdateClipPlane(){switch(this.activeAxis){case"X":this.clipPlane=new Ei(new A(-1,0,0),this.center.x);break;case"Y":this.clipPlane=new Ei(new A(0,-1,0),this.center.y);break;case"Z":this.clipPlane=new Ei(new A(0,0,-1),this.center.z);break;default:break}this.clipPlane&&(this.clipPlanes=[this.clipPlane])}initOrUpdateSectionPlane(){var l;let e=new A;this.sectionBox.getSize(e);let i=e.length(),n=this.center,s=new Ot().setFromCenterAndSize(n,new A(i,i,i)),{min:a,max:o}=s;switch((l=this.planeMesh)==null||l.removeFromParent(),this.activeAxis){case"X":this.planeMesh=new an("X",[new A(n.x,o.y,a.z),new A(n.x,o.y,o.z),new A(n.x,a.y,o.z),new A(n.x,a.y,a.z)]);break;case"Y":this.planeMesh=new an("Y",[new A(o.x,n.y,a.z),new A(a.x,n.y,a.z),new A(a.x,n.y,o.z),new A(o.x,n.y,o.z)]);break;case"Z":this.planeMesh=new an("Z",[new A(o.x,o.y,n.z),new A(a.x,o.y,n.z),new A(a.x,a.y,n.z),new A(o.x,a.y,n.z)]);break;default:break}this.planeMesh&&this.scene.add(this.planeMesh),this.viewer.enableRender()}initOrUpdateGizmo(){var i,n;(i=this.gizmo)==null||i.removeFromParent();let e=this.axisInfoMap[this.activeAxis].normal;this.gizmo=new tu,this.gizmo.setDirection(e),this.sectionBox.getCenter(this.gizmo.position),(n=this.scene)==null||n.add(this.gizmo)}onDragStart(e){var n;if(this.selectedObject instanceof an)return;this.controls&&this.dragStarted&&this.selectedObject&&!(this.selectedObject instanceof an)&&(this.controls.enableRotate=!1),ne.info("[AxisPlaneSection] onDragStart:",e);let i=new A;this.sectionBox.getCenter(i),this.refrencePlane.setFromNormalAndCoplanarPoint(this.camera.getWorldDirection(this.refrencePlane.normal),i),(n=this.raycaster)==null||n.ray.intersectPlane(this.refrencePlane,this.lastWorldPos)}onDragMove(e){var d,f,m;if(!this.lastWorldPos||!this.selectedObject||!this.clipPlane||!this.planeMesh||!this.gizmo||this.selectedObject&&this.selectedObject instanceof an)return;let i=new A;(d=this.raycaster)==null||d.ray.intersectPlane(this.refrencePlane,i),console.log(i);let n=this.selectedObject.userData.actionType,s=new A().subVectors(this.lastWorldPos,this.center).normalize(),a=new A().subVectors(i,this.center).normalize(),o=new A().subVectors(i,this.lastWorldPos).projectOnVector(Fa.clone().applyQuaternion(this.gizmo.quaternion)),l=s.angleTo(a),c=new A().crossVectors(s,a),u=new A;this.sectionBox.getSize(u);let h=Math.max(u.x,u.y,u.z),p;switch(n){case"TranslateX":case"TranslateY":case"TranslateZ":p=new A().addVectors(this.gizmo.position,o),this.sectionBox.clone().setFromCenterAndSize(this.center,new A(h,h,h)).containsPoint(p)&&((f=this.gizmo)==null||f.position.add(o),(m=this.planeMesh)==null||m.position.add(o));break;case"RotateX":{let g=Fa.clone().applyQuaternion(this.gizmo.quaternion);c.dot(g)<0&&(l=-l),this.gizmo.rotateX(l),this.planeMesh.rotatePlane(g,l)}break;case"RotateY":{let g=Qf.clone().applyQuaternion(this.gizmo.quaternion);c.dot(g)<0&&(l=-l),this.gizmo.rotateY(l),this.planeMesh.rotatePlane(g,l)}break;case"RotateZ":{let g=em.clone().applyQuaternion(this.gizmo.quaternion);c.dot(g)<0&&(l=-l),this.gizmo.rotateZ(l),this.planeMesh.rotatePlane(g,l)}break;default:break}this.clipPlane.setFromNormalAndCoplanarPoint(this.planeMesh.getPlaneNormal().negate(),this.gizmo.position),this.lastWorldPos=i}onDragEnd(e){this.selectedObject instanceof an||(this.controls&&!this.controls.enableRotate&&(this.controls.enableRotate=!0),this.activateSelectedObject(!1),this.dragStarted=!1,this.selectedObject=void 0,ne.info("[AxisPlaneSection] onDragEnd:",e))}getIntersectObjects(){return!this.planeMesh||!this.gizmo?[]:[this.planeMesh,this.gizmo]}activateSelectedObject(e){this.selectedObject&&(this.selectedObject instanceof an?this.selectedObject.setActive(e):this.selectedObject.parent instanceof tu&&this.selectedObject.parent.setActive(e,this.selectedObject))}};var CO=class extends uE{constructor(e){let i=e.widgetContainer;super("axis-section-pop-panel","\u8F74\u5411\u5256\u5207",i);this.axis="x";this.isVisible=!0;this.keydown=e=>{e.code==="Escape"&&this.destroy()};this.section=e.getActiveSection(),this.createGroupSelectLayout(),this.addGroupSelectItems(),this.createActiveSelectLayout(),this.addActiveItems(),window.addEventListener("keydown",this.keydown)}destroy(){super.destroy(),window.removeEventListener("keydown",this.keydown)}createGroupSelectLayout(){let e=document.createElement("div");e.classList.add("pop-panel-group-select"),this.body.appendChild(e),this.groupSelectNode=e}addGroupSelectItems(){let e=(l,c,u=!1)=>{let h=document.createElement("div");return h.classList.add("pop-panel-item"),h.setAttribute("itemName",l),h.append(c),u&&h.classList.add("active"),this.groupSelectNode&&this.groupSelectNode.appendChild(h),h},i=()=>{s.classList.remove("active"),a.classList.remove("active"),o.classList.remove("active")},n=(l,c)=>u=>{u.stopPropagation(),this.activeItem!==l&&(i(),this.activeItem=l,c.classList.add("active"),this.section.setActiveAxis(l))},s=e("X","X",!0);s.onclick=n("X",s);let a=e("Y","Y");a.onclick=n("Y",a);let o=e("Z","Z");o.onclick=n("Z",o)}createActiveSelectLayout(){let e=document.createElement("div");e.classList.add("pop-panel-active-select"),this.body.appendChild(e),this.activeSelectNode=e}addActiveItems(){let e=(s,a)=>{let o=document.createElement("i");o.classList.add(ho),o.classList.add(a),s.innerHTML="",s.appendChild(o)},n=((s,a,o="")=>{let l=document.createElement("div");return l.classList.add("pop-panel-item"),a&&l.setAttribute("title",a),l.setAttribute("itemName",s),l.setAttribute("isActive","false"),e(l,o),l})("visible","\u9690\u85CF\u5256\u5207\u9762","icon-hidesectionplane");n.onclick=()=>{this.isVisible=!this.isVisible,this.isVisible?(e(n,"icon-hidesectionplane"),n.setAttribute("title","\u9690\u85CF\u5256\u5207\u9762")):(e(n,"icon-showsectionplane"),n.setAttribute("title","\u663E\u793A\u5256\u5207\u9762")),this.section.setSectionVisible(this.isVisible)}}};var AO=class extends uE{constructor(e){let i=e.widgetContainer;super("pick-section-pop-panel","\u62FE\u53D6\u9762\u5256\u5207",i);this.isVisible=!0;this.enabled=!0;this.keydown=e=>{e.code==="Escape"&&this.destroy()};this.section=e.getActiveSection(),this.createActiveSelectLayout(),this.addActiveItems(),window.addEventListener("keydown",this.keydown)}destroy(){super.destroy(),window.removeEventListener("keydown",this.keydown)}createActiveSelectLayout(){let e=document.createElement("div");e.classList.add("pop-panel-active-select"),this.body.appendChild(e),this.activeSelectNode=e}addActiveItems(){let e=(a,o)=>{let l=document.createElement("i");l.classList.add(ho),l.classList.add(o),a.innerHTML="",a.appendChild(l)},i=(a,o,l="")=>{let c=document.createElement("div");return c.classList.add("pop-panel-item"),o&&c.setAttribute("title",o),c.setAttribute("itemName",a),c.setAttribute("isActive","false"),e(c,l),c},n=i("visible","\u9690\u85CF\u5256\u5207\u9762","icon-hidesectionplane");n.onclick=()=>{this.enabled&&(this.isVisible=!this.isVisible,this.isVisible?(e(n,"icon-hidesectionplane"),n.setAttribute("title","\u9690\u85CF\u5256\u5207\u9762")):(e(n,"icon-showsectionplane"),n.setAttribute("title","\u663E\u793A\u5256\u5207\u9762")),this.section.setSectionVisible(this.isVisible))},this.activeSelectNode&&this.activeSelectNode.appendChild(n),this.visibleNode=n;let s=i("reset","\u91CD\u7F6E","icon-reset");s.onclick=a=>{a.stopPropagation(),this.enabled&&(this.isVisible=!0,e(n,"icon-hidesectionplane"),n.setAttribute("title","\u9690\u85CF\u5256\u5207\u9762"),this.section.resetSection())},this.activeSelectNode&&this.activeSelectNode.appendChild(s),this.resetNode=s}enable(){this.enabled=!0,this.visibleNode&&this.visibleNode.classList.remove("disable")}disable(){this.enabled=!1,this.visibleNode&&this.visibleNode.classList.add("disable")}};var nl=(n=>(n.Distance="Distance",n.Area="Area",n.Angle="Angle",n.Coordinate="Coordinate",n))(nl||{}),ru=class extends jo{constructor(e,i,n,s){super();this.mouseMoved=!1;this.mouseDowned=!1;this.mouseDownPositionX=-1;this.mouseDownPositionY=-1;this.tempEdgeMaterial=new Tr({color:16711680});this.snapPoint=void 0;this.mousedown=e=>{let i=Mr.getScreenPointByEvent(e,this.canvas);this.mouseDownPositionX=i.x,this.mouseDownPositionY=i.y,this.mouseMoved=!1,this.mouseDowned=!0};this.mousemove=e=>{if(this.lastMoveEvent=e,this.mouseDownPositionX>=0&&this.mouseDownPositionY>=0&&(Math.abs(e.offsetX-this.mouseDownPositionX)>5||Math.abs(e.offsetY-this.mouseDownPositionY)>5)&&(this.mouseMoved=!0),this.mouseDowned)return;let i=this.getIntersections(e);if(!i.length)return;let n=Date.now();this.handleSnap(i),ne.debug(`[BaseMeasurement] this.handleSnap costs ${(Date.now()-n)/1e3}s`),this.onMouseMove(this.snapPoint),this.viewer.enableRender()};this.mouseup=e=>{e.buttons===0&&(this.mouseDowned=!1),this.mouseMoved||this.onMouseClick(e)};this.dblclick=()=>{ne.info("[Measure] Double clicked")};this.keydown=e=>{if(e.code==="Enter"){let i=new MouseEvent("pointerup",{button:bi.RIGHT});this.onMouseClick(i)}else e.code==="Escape"&&this.cancel()};this.getIntersections=e=>{if(!this.raycaster)return[];this.raycaster&&this.raycaster.layers.disable(10);let i=this.viewer.getRaycastableObjectsByMouse(e);ne.debug(`[BaseMeasurement] The count of raycastable object is ${i.length}`,i);let n=Date.now(),s=this.raycaster.intersectObjects(i,!0)||[];return ne.debug(`[BaseMeasurement] this.raycaster.intersectObjects costs ${(Date.now()-n)/1e3}s`),this.renderer.clippingPlanes.length>0&&(s=s.filter(a=>this.renderer.clippingPlanes.every(function(o){return o.distanceToPoint(a.point)>0}))),s};this.type=e,this.viewer=i,this.drawList=n,this.osnapHelper=s}get canvas(){var e;return(e=this.viewer.renderer)==null?void 0:e.domElement}get camera(){return this.viewer.camera}get renderer(){return this.viewer.renderer}get isActive(){return!!this.raycaster}get isMeasuring(){return this.isActive&&!this.completed}activate(){this.canvas.addEventListener("pointerdown",this.mousedown),this.canvas.addEventListener("pointermove",this.mousemove),this.canvas.addEventListener("pointerup",this.mouseup),this.canvas.addEventListener("dblclick",this.dblclick),window.addEventListener("keydown",this.keydown);let e=this.viewer.translate;if(e){this.tooltip=new ph("measure-tooltip",e("Tooltip.measure"),{followPointer:!0,showOnCreate:!0,parentNode:this.viewer.widgetContainer,target:this.canvas});let i=document.getElementById("measure-tooltip");i&&(i.style.pointerEvents="none")}this.setTooltipContent(),this.raycaster=this.viewer.getRaycaster()}deactivate(){var i,n;let e=this.canvas;e&&(e.removeEventListener("pointerdown",this.mousedown),e.removeEventListener("pointermove",this.mousemove),e.removeEventListener("pointerup",this.mouseup),e.removeEventListener("dblclick",this.dblclick)),window.removeEventListener("keydown",this.keydown),(i=this.tooltip)==null||i.hide(),(n=this.tooltip)==null||n.destroy(),this.tooltip=void 0,this.raycaster=void 0,this.currentMeasureDrawable&&this.removeDrawable(this.currentMeasureDrawable),this.osnapHelper.deactivate(),this.drawingPoints=void 0,this.currentMeasureDrawable=void 0,this.lastMouseDownPosition=void 0}removeDrawable(e){this.drawList.removeDrawable(e)}clearClickedDrawable(){this.clickedOnMeasurementDrawable&&(this.clickedOnMeasurementDrawable.selected=!1,this.clickedOnMeasurementDrawable=void 0)}onMouseClick(e){let i=Date.now();if(!(this.lastClickTime&&i-this.lastClickTime<500)&&(this.lastClickTime=i,this.clickedOnMeasurementDrawable=void 0,this.completed==null||this.completed===!0)){let n=this.getIntersections(e)[0];if(n){let s=this.drawList.getDrawableByPosition(n.point,this.raycaster);s&&(this.dispatchEvent("clickedonmeasurement",s),this.clickedOnMeasurementDrawable=s)}}}getIntersectsOutline(e){var n,s;let i=[];for(let a=0;al instanceof rn?0:l instanceof oi?2:l instanceof _r?1:3;i.sort((l,c)=>{let u=o(l.object),h=o(c.object);return u!==h?u-h:l.distance-c.distance})}}i=this.getIntersectsOutline(i),ne.debug("[BaseMeasurement] filteredIntersections:",i),this.snapPoint=((a=this.osnapHelper.handleSnap(n,i,this.viewer.is3d(),this.lastMouseDownPosition))==null?void 0:a.clone())||e[0].point.clone(),this.snapPoint||(this.viewer.is3d()?this.snapPoint=e[0].point:this.snapPoint=n)}};ru.MAX_DISTANCE=5e3;var ra=class extends po{constructor(e,i){super(e);this.type="Distance";this.labelBounds=new Ds;this.drawing=!1;this.update(i)}setDrawingState(e){this.drawing=e}drawSelect(e,i){let n=this.getVertexs();this.drawPoints(e,i,n)}drawPoints(e,i,n){e.save(),e.fillStyle=ra.MAJOR_COLOR,e.strokeStyle=ra.MINOR_COLOR,e.lineWidth=ra.LINE_WIDTH,e.beginPath(),n.forEach(s=>{let a=this.transToScreenCoord(s,i);e.moveTo(a.x+ra.POINT_RADIUS,a.y),e.arc(a.x,a.y,ra.POINT_RADIUS,0,Math.PI*2)}),e.closePath(),e.fill(),e.stroke(),e.restore()}drawText(e,i){if(!this.label||!this.labelPositon)return;e.font=`${ra.LABEL_FONT_SIZE}px Arial`;let n=e.measureText(this.label).width*1.2,s=ra.LABEL_FONT_SIZE*1.5;this.labelBounds.setFromCenterAndSize(this.labelPositon,new le(n,s)),this.drawRoundRect(e,this.labelPositon.x-n/2,this.labelPositon.y-s/2,n,s,4),e.save(),e.fillStyle=ra.MINOR_COLOR,e.textBaseline="middle",e.textAlign="center",e.fillText(this.label,this.labelPositon.x,this.labelPositon.y),e.restore()}drawRoundRect(e,i,n,s,a,o){s<2*o&&(o=s/2),a<2*o&&(o=a/2),e.save(),e.fillStyle=ra.MAJOR_COLOR,e.strokeStyle=ra.MINOR_COLOR,e.lineWidth=ra.LINE_WIDTH,e.beginPath(),e.moveTo(i+o,n),e.arcTo(i+s,n,i+s,n+a,o),e.arcTo(i+s,n+a,i,n+a,o),e.arcTo(i,n+a,i,n,o),e.arcTo(i,n,i+s,n,o),e.closePath(),e.fill(),this.selected&&e.stroke(),e.restore()}getVertexs(){return this.points}update(e){let{min:i,max:n}=new Ot().setFromPoints(e);return this.x=i.x,this.y=i.y,this.width=Math.abs(n.x-i.x),this.height=Math.abs(n.y-i.y),this.points=e,this}getBounds(){let e=this.getVertexs();return new Ot().setFromPoints(e)}getData(){return{id:this.id,type:this.type,points:this.points.map(e=>[e.x,e.y,e.z])}}setData(e){super.setData(e),this.setLineColor(ra.MAJOR_COLOR),this.setFillColor(ra.AREA_FILL_COLOR),this.setLineWidth(ra.LINE_WIDTH)}isPointInPath(e,i){let n=i==null?void 0:i.ray;if(!n)return!1;let s=3*this.tolerance,a=this.transToScreenCoord(e,i.camera);if(this.labelBounds.containsPoint(a))return!0;let o=new A,l=new A,c=this.points;for(let u=0;u{let o=this.transToScreenCoord(s,i);a===0?e.moveTo(o.x,o.y):e.lineTo(o.x,o.y)}),this.points.length===3){let[s,a,o]=this.points.map(d=>this.transToScreenCoord(d,i)),l=new le().subVectors(s,a).normalize(),c=new le().subVectors(o,a).normalize(),u=Math.min(s.distanceTo(a),o.distanceTo(a)),h=l.angle(),p=c.angle();e.moveTo(a.x,a.y),e.arc(a.x,a.y,u/5,h,p,l.cross(c)<0)}e.stroke(),e.restore(),this.drawing&&this.drawPoints(e,i,this.points.slice(0,this.points.length-1)),this.drawText(e,i)}drawText(e,i){if(this.points.length<3)return;let[n,s,a]=this.points,o=this.getAngleBisector(n,s,a),l=this.calculateAngle(n,s,a);this.label=`${Wu(l,2)} ${this.getUnitString()}`;let u=Math.min(n.distanceTo(s),a.distanceTo(s))*.3;this.labelPositon=this.transToScreenCoord(s.clone().add(new A(o.x*u,o.y*u,o.z*u)),i),super.drawText(e,i)}getAngleBisector(e,i,n){let s=e,a=i,o=n,l=new A(s.x-a.x,s.y-a.y,s.z-a.z).normalize(),c=new A(o.x-a.x,o.y-a.y,o.z-a.z).normalize();return new A(l.x+c.x,l.y+c.y,l.z+c.z).normalize()}calculateAngle(e,i,n){let s=e,a=i,o=n,l=new A(s.x-a.x,s.y-a.y,s.z-a.z),c=new A(o.x-a.x,o.y-a.y,o.z-a.z);return l.angleTo(c)*180/Math.PI}getClassType(){return"Angle"}};Dr._registerDrawableClass(wS);var OO=class extends ru{constructor(r,e,i){super("Angle",r,e,i)}onMouseMove(r){this.createOrUpdateAngleMeasureDrawable(r)}onMouseClick(r){var s;if(super.onMouseClick(r),this.clickedOnMeasurementDrawable)return;if(this.drawingPoints||(this.drawingPoints=[]),r.button===bi.RIGHT){this.drawingPoints=void 0,this.currentMeasureDrawable&&(this.removeDrawable(this.currentMeasureDrawable),this.currentMeasureDrawable=void 0),this.completed=void 0,this.lastMouseDownPosition=void 0;return}let e=this.getIntersections(r)[0];if(!e)return;let i=(s=this.snapPoint)!=null?s:e==null?void 0:e.point,n=this.drawingPoints;n.push(i),this.lastMouseDownPosition=i,n.length===1&&(this.dispatchEvent("firstpointpicked"),this.completed=!1),this.createOrUpdateAngleMeasureDrawable(),n.length>=3&&this.complete()}complete(){var r;(r=this.currentMeasureDrawable)==null||r.setDrawingState(!1),this.dispatchEvent("complete",this.currentMeasureDrawable),this.completed=!0,this.currentMeasureDrawable=void 0,this.drawingPoints=void 0,this.lastMouseDownPosition=void 0}cancel(){let r=this.drawingPoints;if(r&&r.length>0){if(r.pop(),r.length===0&&(this.currentMeasureDrawable&&(this.removeDrawable(this.currentMeasureDrawable),this.currentMeasureDrawable=void 0),this.completed=!0),this.lastMoveEvent){let e=this.getIntersections(this.lastMoveEvent)[0];e&&this.onMouseMove(e.point)}}else this.deactivate(),this.dispatchEvent("deactivate",this.type);this.osnapHelper.deactivate(),this.lastMouseDownPosition=void 0}deactivate(){super.deactivate(),this.currentMeasureDrawable&&this.removeDrawable(this.currentMeasureDrawable)}setTooltipContent(){var i;let r=this.viewer.translate;if(!r)return;let e=r("Tooltip.measure");e&&this.tooltip&&((i=this.tooltip)==null||i.setContent(e))}createOrUpdateAngleMeasureDrawable(r){if(!this.drawingPoints||this.drawingPoints&&this.drawingPoints.length<1)return;let e=[...this.drawingPoints];this.currentMeasureDrawable||(this.currentMeasureDrawable=new wS(St.guid(),this.drawingPoints),this.drawList.addDrawable(this.currentMeasureDrawable)),r&&e.push(r),this.currentMeasureDrawable.update(e),this.currentMeasureDrawable.setDrawingState(!0)}};var RS=class extends Oi{constructor(e,i){super(e,i);this.type="Area";this.update(i)}draw(e,i){let n=this.points;e.save(),e.lineWidth=Oi.LINE_WIDTH,e.strokeStyle=Oi.MAJOR_COLOR,e.fillStyle=Oi.AREA_FILL_COLOR,e.beginPath(),n.forEach((s,a)=>{let o=this.transToScreenCoord(s,i);a===0?e.moveTo(o.x,o.y):e.lineTo(o.x,o.y)}),e.closePath(),e.fill(),e.stroke(),e.restore(),this.drawing&&this.drawPoints(e,i,this.points.slice(0,this.points.length-1)),this.drawText(e,i)}drawText(e,i){let n=this.points,s=this.calculateArea(n);this.label=`${Wu(s,2)}`,this.labelPositon=this.transToScreenCoord(this.getBarycenter(n),i),super.drawText(e,i)}calculateArea(e){let i=0,n=Mf.getFaces(e);for(let s=0;s{n+=o.x,s+=o.y,a+=o.z}),new A(n/i,s/i,a/i)}isPointInPath(e,i){let n=i==null?void 0:i.ray;if(!n)return!1;let s=this.transToScreenCoord(e,i.camera);if(this.labelBounds.containsPoint(s))return!0;let a=Mf.getFaces(this.points);for(let o=0;o=3&&!Mf.arePointsCoplanar([...e,n])){ne.warn("[Measure] The position is not coplanar with other points");return}e.push(n),this.lastMouseDownPosition=n,e.length===1&&(this.dispatchEvent("firstpointpicked"),this.completed=!1),this.createOrUpdateAreaMeasureDrawable()}complete(){var r;(r=this.currentMeasureDrawable)==null||r.setDrawingState(!1),this.dispatchEvent("complete",this.currentMeasureDrawable),this.completed=!0,this.drawingPoints=void 0,this.currentMeasureDrawable=void 0,this.lastMouseDownPosition=void 0}cancel(){let r=this.drawingPoints;if(r&&r.length>0){if(r.pop(),r.length===0&&(this.currentMeasureDrawable&&(this.removeDrawable(this.currentMeasureDrawable),this.currentMeasureDrawable=void 0),this.completed=!0),this.lastMoveEvent){let e=this.getIntersections(this.lastMoveEvent)[0];e&&this.onMouseMove(e.point)}}else this.deactivate(),this.dispatchEvent("deactivate",this.type);this.osnapHelper.deactivate(),this.lastMouseDownPosition=void 0}deactivate(){super.deactivate(),this.currentMeasureDrawable&&this.removeDrawable(this.currentMeasureDrawable)}setTooltipContent(){var e;let r=this.viewer.translate;if(r){let i=r("Tooltip.areaMeasurement");i&&this.tooltip&&((e=this.tooltip)==null||e.setContent(i))}}createOrUpdateAreaMeasureDrawable(r){if(!this.drawingPoints||this.drawingPoints&&this.drawingPoints.length<1)return;let e=[...this.drawingPoints];this.currentMeasureDrawable||(this.currentMeasureDrawable=new RS(St.guid(),this.drawingPoints),this.drawList.addDrawable(this.currentMeasureDrawable)),r&&e.push(r),this.currentMeasureDrawable.update(e),this.currentMeasureDrawable.setDrawingState(!0)}};var MS=class extends Oi{constructor(e,i){super(e,i);this.type="Coordinate";this.update(i)}draw(e,i){this.drawText(e,i),e.save(),e.lineWidth=Oi.LINE_WIDTH,e.strokeStyle=Oi.MAJOR_COLOR,e.fillStyle=Oi.AREA_FILL_COLOR;let n=this.points;e.beginPath(),n.forEach(s=>{let a=this.transToScreenCoord(s,i);e.arc(a.x,a.y,Oi.POINT_RADIUS,0,Math.PI*2)}),e.fill(),e.stroke(),e.restore()}drawText(e,i){let n=this.points[0];lr.areNumbersEqual(n.x,0);let s=lr.areNumbersEqual(n.x,0)?0:n.x,a=lr.areNumbersEqual(n.y,0)?0:n.y,o=lr.areNumbersEqual(n.z,0)?0:n.z;this.label=`${Wu(s,2)}, ${Wu(a,2)}, ${Wu(o,2)}`,e.font=`${Oi.LABEL_FONT_SIZE}px Arial`;let l=e.measureText(this.label).width*1.2,c=Oi.LABEL_FONT_SIZE*1.5;this.labelPositon=this.transToScreenCoord(n,i),this.labelPositon.y-=c/2,this.labelBounds.setFromCenterAndSize(this.labelPositon,new le(l,c)),this.drawRoundRect(e,this.labelPositon.x-l/2,this.labelPositon.y-c/2,l,c,4),e.save(),e.fillStyle=Oi.MINOR_COLOR,e.textBaseline="middle",e.textAlign="center",e.fillText(this.label,this.labelPositon.x,this.labelPositon.y),e.restore()}getClassType(){return"Coordinate"}};Dr._registerDrawableClass(MS);var NO=class extends ru{constructor(r,e,i){super("Coordinate",r,e,i)}onMouseMove(r){this.createOrUpdatePointMarker(r)}onMouseClick(r){var s;if(super.onMouseClick(r),this.clickedOnMeasurementDrawable)return;if(this.drawingPoints||(this.drawingPoints=[]),r.button===bi.RIGHT){this.drawingPoints=void 0,this.currentMeasureDrawable&&(this.removeDrawable(this.currentMeasureDrawable),this.currentMeasureDrawable=void 0),this.completed=void 0,this.lastMouseDownPosition=void 0;return}let e=this.getIntersections(r)[0];if(!e)return;let i=(s=this.snapPoint)!=null?s:e==null?void 0:e.point,n=this.drawingPoints;n.push(i),this.lastMouseDownPosition=i,n.length===1&&(this.dispatchEvent("firstpointpicked"),this.completed=!1),this.createOrUpdatePointMarker(i),n.length>=1&&this.complete()}complete(){this.dispatchEvent("complete",this.currentMeasureDrawable),this.completed=!0,this.drawingPoints=void 0,this.currentMeasureDrawable=void 0,this.lastMouseDownPosition=void 0}cancel(){let r=this.drawingPoints;if(r&&r.length>0){if(r.pop(),r.length===0&&(this.completed=!0),this.lastMoveEvent){let e=this.getIntersections(this.lastMoveEvent)[0];e&&this.onMouseMove(e.point)}}else this.deactivate(),this.dispatchEvent("deactivate",this.type);this.osnapHelper.deactivate(),this.drawingPoints=void 0,this.currentMeasureDrawable=void 0,this.lastMouseDownPosition=void 0}setTooltipContent(){var e;let r=this.viewer.translate;if(r){let i=r("Tooltip.measure");i&&this.tooltip&&((e=this.tooltip)==null||e.setContent(i))}}createOrUpdatePointMarker(r){if(!this.drawingPoints||this.drawingPoints&&this.drawingPoints.length<1)return;let e=[...this.drawingPoints];this.currentMeasureDrawable||(this.currentMeasureDrawable=new MS(St.guid(),this.drawingPoints),this.currentMeasureDrawable.selected=!0,this.drawList.addDrawable(this.currentMeasureDrawable)),r&&e.push(r),this.currentMeasureDrawable.update(e)}};var rG=class extends Oi{constructor(e,i){super(e,i);this.type="Distance";this.update(i)}draw(e,i){let n=this.points;e.save(),e.lineWidth=Oi.LINE_WIDTH,e.strokeStyle=Oi.MAJOR_COLOR,e.beginPath(),n.forEach((s,a)=>{let o=this.transToScreenCoord(s,i);a===0?e.moveTo(o.x,o.y):e.lineTo(o.x,o.y)}),e.closePath(),e.stroke(),e.restore(),this.drawing?this.drawPoints(e,i,this.points.slice(0,this.points.length-1)):this.selected||this.drawVerticalLine(e,i),this.drawText(e,i)}drawText(e,i){if(this.points.length<2)return;let[n,s]=this.points,a=n.distanceTo(s);this.label=`${Wu(a,2)}`,this.labelPositon=this.transToScreenCoord(n.clone().add(s).divideScalar(2),i),super.drawText(e,i)}drawVerticalLine(e,i){if(this.points.length<2)return;let[n,s]=this.points.map(u=>this.transToScreenCoord(u,i)),[a,o]=this.getShortLineBySegments(n,s),[l,c]=this.getShortLineBySegments(s,n);e.save(),e.lineWidth=Oi.LINE_WIDTH,e.strokeStyle=Oi.MAJOR_COLOR,e.beginPath(),e.moveTo(a.x,a.y),e.lineTo(o.x,o.y),e.moveTo(l.x,l.y),e.lineTo(c.x,c.y),e.stroke(),e.restore()}getShortLineBySegments(e,i){let n=new le().subVectors(i,e).normalize(),s=rG.SHORT_LINE_LENGTH/2,a=Math.PI/2,o=n.clone().rotateAround(new le,a).normalize().multiplyScalar(s).add(e),l=n.clone().rotateAround(new le,-a).normalize().multiplyScalar(s).add(e);return[o,l]}getClassType(){return"Distance"}},hE=rG;hE.SHORT_LINE_LENGTH=12;Dr._registerDrawableClass(hE);var LO=class extends ru{constructor(r,e,i){super("Distance",r,e,i)}onMouseMove(r){this.createOrUpdateDistanceMeasureDrawable(r)}onMouseClick(r){var s;if(super.onMouseClick(r),this.clickedOnMeasurementDrawable)return;if(this.drawingPoints||(this.drawingPoints=[]),r.button===bi.RIGHT){this.drawingPoints=void 0,this.currentMeasureDrawable&&(this.removeDrawable(this.currentMeasureDrawable),this.currentMeasureDrawable=void 0),this.completed=void 0,this.lastMouseDownPosition=void 0;return}let e=this.getIntersections(r)[0];if(!e)return;let i=(s=this.snapPoint)!=null?s:e==null?void 0:e.point,n=this.drawingPoints;n.length<2&&n.push(i),this.lastMouseDownPosition=i,n.length===1&&(this.dispatchEvent("firstpointpicked"),this.completed=!1),this.createOrUpdateDistanceMeasureDrawable(),n.length>=2&&this.complete()}complete(){var r;(r=this.currentMeasureDrawable)==null||r.setDrawingState(!1),this.dispatchEvent("complete",this.currentMeasureDrawable),this.completed=!0,this.drawingPoints=void 0,this.currentMeasureDrawable=void 0,this.lastMouseDownPosition=void 0}cancel(){let r=this.drawingPoints;r&&r.length>0?(r.pop(),r.length===0&&(this.completed=!0),this.currentMeasureDrawable&&this.removeDrawable(this.currentMeasureDrawable)):(this.deactivate(),this.dispatchEvent("deactivate",this.type)),this.osnapHelper.deactivate(),this.drawingPoints=void 0,this.currentMeasureDrawable=void 0,this.lastMouseDownPosition=void 0}deactivate(){super.deactivate(),this.currentMeasureDrawable&&this.removeDrawable(this.currentMeasureDrawable)}setTooltipContent(){var e;let r=this.viewer.translate;if(r){let i=r("Tooltip.measure");i&&this.tooltip&&((e=this.tooltip)==null||e.setContent(i))}}createOrUpdateDistanceMeasureDrawable(r){if(!this.drawingPoints||this.drawingPoints&&this.drawingPoints.length<1)return;let e=[...this.drawingPoints];this.currentMeasureDrawable||(this.currentMeasureDrawable=new hE(St.guid(),this.drawingPoints),this.drawList.addDrawable(this.currentMeasureDrawable)),r&&e.push(r),this.currentMeasureDrawable.update(e),this.currentMeasureDrawable.setDrawingState(!0)}};var FO=class extends nE{constructor(e,i=30){super(i);this.manager=e}undo(){let e=super.undo();switch(e==null?void 0:e.type){case"ADD":{let i=e.payload.id;i&&this.manager.removeMeasurementById(i,!1)}break;case"REMOVE":{let i=e.payload,n=this.manager.createMeasurement(i);this.manager.addMeasurement(n,!1)}break;default:break}return e}redo(){let e=super.redo();switch(e==null?void 0:e.type){case"ADD":{let i=e.payload,n=this.manager.createMeasurement(i);this.manager.addMeasurement(n,!1)}break;case"REMOVE":{let i=e.payload.id;i&&this.manager.removeMeasurementById(i,!1)}break;default:break}return e}};var Ql=class{constructor(r){this.selectedMeasurementDrawable=void 0;this.drawableList=new Hp("measure");this.measurements={};this.activeMeasurementType=void 0;this.undoRedoHelper=new FO(this);this.keydown=r=>{let e=this.getActiveMeasurementType(),i;e&&(i=this.measurements[e]);let n=this.selectedMeasurementDrawable;n&&r.code==="Delete"&&(this.removeMeasurement(n),this.activeMeasurementType&&this.measurements[this.activeMeasurementType].clearClickedDrawable()),r.ctrlKey&&r.code==="KeyZ"&&(i!=null&&i.isMeasuring?i.cancel():this.undo()),r.ctrlKey&&r.code==="KeyY"&&(i!=null&&i.isMeasuring||this.redo()),this.viewer.enableRender()};var e;this.viewer=r,this.overlayRender=this.viewer.overlayRender,(e=this.overlayRender)==null||e.addDrawableList(this.drawableList),this.scene=new On,this.osnapHelper=new gO(this.overlayRender),this.measurements["Distance"]=new LO(this.viewer,this.drawableList,this.osnapHelper),this.measurements["Area"]=new PO(this.viewer,this.drawableList,this.osnapHelper),this.measurements["Angle"]=new OO(this.viewer,this.drawableList,this.osnapHelper),this.measurements["Coordinate"]=new NO(this.viewer,this.drawableList,this.osnapHelper),this.canvas.addEventListener("wheel",()=>{this.updateSnapTolerance()}),this.initEvents()}initEvents(){Object.values(this.measurements).forEach(r=>{r.addEventListener("complete",e=>{this.undoRedoHelper.addRecord("ADD",e.getData()),this.selectMeasurement(e)}),r.addEventListener("deactivate",()=>{this.osnapHelper.deactivate(),this.viewer.deactivateMeasurement()}),r.addEventListener("firstpointpicked",()=>{this.unselectMeasurement()}),r.addEventListener("clickedonmeasurement",e=>{this.selectMeasurement(e)})})}get canvas(){var r;return(r=this.viewer.renderer)==null?void 0:r.domElement}get raycaster(){return this.viewer.getRaycaster()}getPixelSizeInWorldCoord(){if(!this.viewer.viewerContainer)return ne.error("[BaseMeasurement] Missing viewer.container"),0;let r=this.viewer.camera,{clientWidth:e,clientHeight:i}=this.viewer.viewerContainer,n=0;if(r.type==="OrthographicCamera"){let s=r;n=Math.max(s.right-s.left,s.top-s.bottom)/s.zoom/Math.max(e,i)}else if(r.type==="PerspectiveCamera"){let s=r,a=this.viewer.cameraCfg,o=a&&St.arrayToVector3(a.eye),l=a&&St.arrayToVector3(a.look);n=2*(o.distanceTo(l)*Math.tan(s.fov/2*Math.PI/180))/i}return n}addMeasurement(r,e=!0){this.drawableList.addDrawable(r),this.selectedMeasurementDrawable=r,e&&this.undoRedoHelper.addRecord("ADD",r.getData()),this.viewer.enableRender()}createMeasurement(r){return Dr.createDrawable(r)}removeMeasurement(r,e=!0){this.drawableList.removeDrawable(r),this.selectedMeasurementDrawable=void 0,e&&this.undoRedoHelper.addRecord("REMOVE",r.getData()),this.viewer.enableRender()}updateSnapTolerance(r=3){let e=this.getPixelSizeInWorldCoord()*r;this.osnapHelper.updateSnapTolerance(e)}activateMeasurement(r){this.activeMeasurementType&&this.deactivateMeasurement(),this.measurements[r]?(this.measurements[r].activate(),this.activeMeasurementType=r,this.updateSnapTolerance()):(this.activeMeasurementType=void 0,ne.error("[Measure] Failed to activate measurement, type:",r)),window.addEventListener("keydown",this.keydown)}deactivateMeasurement(){this.unselectMeasurement();let r=this.activeMeasurementType;r&&this.measurements[r].deactivate(),this.activeMeasurementType=void 0,window.removeEventListener("keydown",this.keydown)}getActiveMeasurementType(){return this.activeMeasurementType}isMeasurementActive(){let r=this.activeMeasurementType;return r?this.measurements[r].isActive:!!this.getActiveMeasurementType()}getMeasurementsData(){return this.drawableList.getDrawableDatas()}setMeasurementsData(r){this.drawableList.clear(),r.forEach(e=>{this.measurements[e.type]?e.points.length>=2?this.addMeasurement(Dr.createDrawable(e),!1):ne.info("[Measure] Invalid points found in MeasurementData:",e):ne.warn("[Measure] Failed to add measurement data for",e)})}setMeasurementsVisibility(r){this.drawableList.getDrawables().forEach(e=>e.visible=r),this.viewer.enableRender()}clearMeasurements(){this.drawableList.clear(),this.viewer.enableRender()}removeMeasurementById(r,e=!0){let i=this.drawableList.getDrawableById(r);i&&(this.removeMeasurement(i,e),ne.warn("[Measure] Failed to find measurement by id:",r))}selectMeasurementById(r){this.unselectMeasurement();let e=this.drawableList.getDrawableById(r);e&&(e.selected=!0,this.selectedMeasurementDrawable=e),this.viewer.enableRender()}selectMeasurement(r){this.unselectMeasurement(),r.selected=!0,this.selectedMeasurementDrawable=r,this.viewer.enableRender()}unselectMeasurement(){this.selectedMeasurementDrawable&&(this.selectedMeasurementDrawable.selected=!1),this.selectedMeasurementDrawable=void 0,this.viewer.enableRender()}undo(){this.undoRedoHelper.undo()}redo(){this.undoRedoHelper.redo()}clearUndoRedo(){this.undoRedoHelper.clear()}destroy(){var r;this.deactivateMeasurement(),this.clearMeasurements(),this.measurements={},(r=this.osnapHelper)==null||r.destroy(),this.scene.clear(),this.undoRedoHelper.destroy()}};var ia,fDe={["HomeView"]:{icon:{default:"icon-home",active:"icon-home-filled"},menuName:"Toolbar.homeView",type:1,onClick:t=>{t.goToHomeView()}},["OrthoMode"]:{icon:{default:"icon-orthomode",active:"icon-orthomode-filled"},menuName:"Toolbar.orthoView",type:4,onActive:t=>{ne.info("[Toolbar]","Enter OrthoMode"),t.setToOrthographicCamera(!0)},onDeactive:t=>{ne.info("[Toolbar]","Exit OrthoMode"),t.setToOrthographicCamera(!1)}},["Measure"]:{icon:{default:"icon-measure",active:"icon-measure-filled"},menuName:"Toolbar.measurement",type:3,children:{["MeasureDistance"]:{icon:{default:"icon-distancemeasure",active:"icon-distancemeasure-filled"},menuName:"Toolbar.distanceMeasurement",onActive:t=>{t.deactivateSection(),t.activateMeasurement("Distance")},onDeactive:t=>{t.deactivateMeasurement()},type:4,mutexIds:["MeasureArea","MeasureAngle","MeasureCoordinate"]},["MeasureArea"]:{icon:{default:"icon-areameasure",active:"icon-areameasure-filled"},onActive:t=>{t.deactivateSection(),t.activateMeasurement("Area")},onDeactive:t=>{t.deactivateMeasurement()},type:4,menuName:"Toolbar.areaMeasurement",mutexIds:["MeasureDistance","MeasureAngle","MeasureCoordinate"]},["MeasureAngle"]:{menuName:"Toolbar.angleMeasurement",icon:{default:"icon-anglemeasure"},type:4,onActive:t=>{t.deactivateSection(),t.activateMeasurement("Angle")},onDeactive:t=>{t.deactivateMeasurement()},mutexIds:["MeasureDistance","MeasureArea","MeasureCoordinate"]},["MeasureCoordinate"]:{menuName:"Toolbar.coordinateMeasurement",icon:{default:"icon-distancemeasure"},type:4,onActive:t=>{t.deactivateSection(),t.activateMeasurement("Coordinate")},onDeactive:t=>{t.deactivateMeasurement()},mutexIds:["MeasureDistance","MeasureArea","MeasureAngle"]},["MeasureClear"]:{icon:{default:"icon-clear",active:"icon-clear-filled"},onClick:t=>{ne.debug("[Toolbar]","Clearing Measure",t),t.clearMeasurements()},type:1,menuName:"Toolbar.clearMeasurement"}},mutexIds:["Section","SectionAxis","SectionBox","SectionPlane"]},["Section"]:{icon:{default:"icon-section",active:"icon-section-filled"},menuName:"Toolbar.section",type:3,children:{["SectionAxis"]:{icon:{default:"icon-sectionplane",active:"icon-sectionplane-filled"},menuName:"Toolbar.axisSection",type:4,onActive:t=>{t.deactivateMeasurement(),t.setMeasurementsVisibility(!1),ia==null||ia.destroy(),t.activateSection("AxisPlaneSection"),ia=new CO(t)},onDeactive:t=>{t.setMeasurementsVisibility(!0),t.deactivateSection(),ia==null||ia.destroy(),ia=void 0},mutexIds:["SectionBox","SectionPlane"]},["SectionPlane"]:{icon:{default:"icon-choosesectionplane",active:"icon-choosesectionplane-filled"},menuName:"Toolbar.pickSectionPlane",type:4,onActive:t=>{t.deactivateMeasurement(),t.setMeasurementsVisibility(!1),ia==null||ia.destroy(),t.activateSection("PickPlaneSection"),ia=new AO(t)},onDeactive:t=>{t.setMeasurementsVisibility(!0),t.deactivateSection(),ia==null||ia.destroy(),ia=void 0},mutexIds:["SectionAxis","SectionBox"]},["SectionBox"]:{icon:{default:"icon-sectionbox",active:"icon-sectionbox-filled"},menuName:"Toolbar.sectionBox",type:4,onActive:t=>{t.deactivateMeasurement(),t.setMeasurementsVisibility(!1),t.activateSection()},onDeactive:t=>{t.setMeasurementsVisibility(!0),t.deactivateSection()},mutexIds:["SectionAxis","SectionPlane"]}},mutexIds:["Measure","MeasureDistance","MeasureArea","MeasureAngle","MeasureCoordinate"]},["BimTree"]:{icon:{default:"icon-bimtree",active:"icon-bimtree-filled"},menuName:"Toolbar.bimTree",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Bim Tree")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Bim Tree")}},["Viewpoint"]:{icon:{default:"icon-viewpoint",active:"icon-viewpoint-filled"},menuName:"Toolbar.viewpoint",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Viewpoint")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Viewpoint")},visible:!1},["Annotation"]:{icon:{default:"icon-annotation",active:"icon-annotation-filled"},menuName:"Toolbar.annotation",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Annotation")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Annotation")},visible:!1},["Property"]:{icon:{default:"icon-property",active:"icon-property-filled"},menuName:"Toolbar.property",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Property")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Property")},visible:!1},["Settings"]:{icon:{default:"icon-settings",active:"icon-settings-filled"},menuName:"Toolbar.settings",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Settings")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Settings")},visible:!1},["FullScreen"]:{icon:{default:"icon-fullscreen",active:"icon-fullscreen-filled"},menuName:"Toolbar.fullscreen",type:4,onClick:(t,r)=>{let e=()=>{let i=r==null?void 0:r.menuList.get("FullScreen");i&&i.setActive(St.isFullScreen())};St.isFullScreen()?(St.exitFullscreen(),window.removeEventListener("resize",e)):St.fullScreen(t.viewerContainer),window.addEventListener("resize",e)}}},mDe={["SceneClear"]:{icon:{default:"icon-clear",active:"icon-clear-filled"},menuName:"clear",type:1,onClick:()=>{}}},gDe={["HomeView"]:{icon:{default:"icon-zhushitu",active:"icon-zhushitu",iconFont:"iconfont"},menuName:"Toolbar.homeView",type:1,onClick:t=>{t.goToHomeView()}},["ZoomToRectangle"]:{icon:{default:"icon-kuangxuanfangda",active:"icon-kuangxuanfangda",iconFont:"iconfont"},menuName:"Toolbar.zoomToRectangle",type:1,onClick:t=>{t.zoomToRect()}},["GetScreenshot"]:{icon:{default:"icon-frame-clipping",active:"icon-frame-clipping",iconFont:"iconfont"},menuName:"Toolbar.screenshot",type:1,onClick:t=>{t.getScreenshot().then(r=>{ne.info("[Toolbar] getScreenshot() returns:",r),r||ne.error("[Toolbar] Failed to get screenshot!");let e=document.createElement("a");e.href=r,e.download="",e.click()}).catch(r=>{ne.error("[Toolbar] Failed to get screenshot, reason:",r)})}},["Measure"]:{icon:{default:"icon-celiang1",active:"icon-celiang1",iconFont:"iconfont"},menuName:"Toolbar.measurement",type:3,children:{["MeasureDistance"]:{icon:{default:"icon-distancemeasure",active:"icon-distancemeasure-filled"},menuName:"Toolbar.distanceMeasurement",onActive:t=>{t.activateMeasurement("Distance")},onDeactive:t=>{t.deactivateMeasurement()},type:4,mutexIds:["MeasureArea","MeasureAngle","MeasureCoordinate"]},["MeasureArea"]:{icon:{default:"icon-areameasure",active:"icon-areameasure-filled"},onActive:t=>{t.activateMeasurement("Area")},onDeactive:t=>{t.deactivateMeasurement()},type:4,menuName:"Toolbar.areaMeasurement",mutexIds:["MeasureDistance","MeasureAngle","MeasureCoordinate"]},["MeasureAngle"]:{menuName:"Toolbar.angleMeasurement",icon:{default:"icon-anglemeasure"},type:4,onActive:t=>{t.activateMeasurement("Angle")},onDeactive:t=>{t.deactivateMeasurement()},mutexIds:["MeasureDistance","MeasureArea","MeasureCoordinate"]},["MeasureCoordinate"]:{menuName:"Toolbar.coordinateMeasurement",icon:{default:"icon-distancemeasure"},type:4,onActive:t=>{t.activateMeasurement("Coordinate")},onDeactive:t=>{t.deactivateMeasurement()},visible:!1,mutexIds:["MeasureDistance","MeasureArea","MeasureAngle"]},["MeasureClear"]:{icon:{default:"icon-clear",active:"icon-clear-filled"},onClick:t=>{ne.debug("[Toolbar]","Clearing Measure",t),t.clearMeasurements()},type:1,menuName:"Toolbar.clearMeasurement"}}},["Markup"]:{icon:{default:"icon-tianjiapizhu",iconFont:"iconfont"},menuName:"Toolbar.markup",type:1,onClick:(t,r)=>{t.activateMarkup("RectMarkup"),r.hide(),t.deactivateMeasurement(),new RO(t,Ur({},cDe))}},["Settings"]:{icon:{default:"icon-settings",active:"icon-settings-filled"},menuName:"Toolbar.settings",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Settings")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Settings")},visible:!0},["Compared"]:{icon:{default:"icon-compared",iconFont:"iconfont"},menuName:"Toolbar.compared",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Compare")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Compare")},visible:!1},["QuitCompare"]:{icon:{default:"icon-compared",iconFont:"iconfont"},menuName:"Toolbar.quitCompare",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Compare")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Compare")},visible:!1},["Layers"]:{icon:{default:"icon-tucengkongzhi",active:"icon-tucengkongzhi",iconFont:"iconfont"},menuName:"Toolbar.layers",type:4,onClick:()=>{}},["FullScreen"]:{icon:{default:"icon-quanping",active:"icon-quanping",iconFont:"iconfont"},menuName:"Toolbar.fullscreen",type:4,onClick:(t,r)=>{let e=()=>{let i=r==null?void 0:r.menuList.get("FullScreen");i&&i.setActive(St.isFullScreen())};St.isFullScreen()?(St.exitFullscreen(),window.removeEventListener("resize",e)):St.fullScreen(t.viewerContainer),window.addEventListener("resize",e)}}};var vDe={enableNavCube:!0,enableAxisGizmo:!0,enableToolbar:!0,enableBottomBar:!0,enableContextMenu:!0,enableSpinner:!0,containerId:"myCanvas",units:"meters"};var DS=class{constructor(r="uploadModelFile"){this.input=document.createElement("input"),this.input.id=r,this.input.type="file",this.input.multiple=!0,this.input.accept=this.formats().map(e=>"."+e).join(","),this.input.style.display="none",this.input.onchange=e=>{let i=e.target.files;if(!i||i.length<=0){ne.error("[Uploader] No files to be uploaded!");return}this.uploadFiles(i)}}formats(){return ne.warn("[Uploader]: Should call derived class instead!"),[]}uploadFiles(r){ne.warn(`[Uploader]: Should call derived class instead! files: ${r}`)}openFileBrowserToUpload(){this.input.click()}},CS=class extends DS{constructor(e,i){super(i);this.defaultModelConfig={src:"",position:[0,0,0],rotation:[0,0,0],scale:[1,1,1],instantiate:!1,merge:!1};this.viewer=e}formats(){return["gltf","glb","dxf","obj","stl","fbx","ifc","dae","*"]}uploadFiles(e){let i=e.length;if(i===0)return;let n=Ur({},this.defaultModelConfig),s,a,o,l=new Map;for(let h=0;h{o&&(s=URL.createObjectURL(o),c.push(s),n.src=o.name)};if(!o)o=e[0],u();else{u();let h=ks.extractUrlBase(s);a=new Ap,a.setURLModifier(p=>{let d=decodeURI(p).replace(h,"").replace(/^(\.?\/)/,"");if(l.has(d)){let f=l.get(d),m=URL.createObjectURL(f);return c.push(m),m}return p})}this.viewer.loadLocalModel(s,n,a,h=>{let p=Math.floor(h.loaded*100/h.total);ne.info(`[Uploader] Loading ${o==null?void 0:o.name}, ${p}%`)}).then(()=>{ne.info(`[Uploader] Loaded ${o==null?void 0:o.name}`),c.forEach(URL.revokeObjectURL)})}},iG=class extends DS{constructor(e,i){super(i);this.defaultModelConfig={src:"",position:[0,0,0],rotation:[0,0,0],scale:[1,1,1],instantiate:!1,merge:!0};this.viewer=e}formats(){return["dxf"]}uploadFiles(e){let i=n=>{let s=(n.loaded*100/n.total).toFixed(1);ne.info(`[Uploader] Progress: ${s}%`)};if(e.length===2){let n=e[0],s=e[1],a=URL.createObjectURL(n),o=URL.createObjectURL(s);this.viewer.compare({src:a,modelId:n.name},{src:o,modelId:s.name},i).then(()=>{this.onSuccess&&this.onSuccess({compare:!0}),ne.debug(`[Uploader] Compared models: ${a}, ${o}`)}).catch(l=>{ne.error(`[Uploader] Failed to compare models: ${a}, ${o}. reason: ${l}`)})}else{let n=e[0],s=URL.createObjectURL(n),a=Ur({},this.defaultModelConfig);a.src=s,a.modelId=n.name;try{this.viewer.loadModelAsync(a,i).then(()=>{this.onSuccess&&this.onSuccess({}),ne.info(`[Uploader] Loaded model '${a.src}'`)})}catch(o){ne.info(o)}}}},nG=class extends DS{constructor(e,i){super(i);this.viewer=e}formats(){return["png","jpg","jpeg"]}uploadFiles(e){let i={panoramas:[],id:"viewpoint_1",name:"",position:[0,1,0],initialDirection:[0,0,1]};if(e.length===1){let n=[];n.push(URL.createObjectURL(e[0])),i.panoramas.push({id:"panorama_1",images:n}),this.viewer.setViewpoints([i]),this.viewer.activatePanoramaById(i.id,i.panoramas[0].id)}else if(e.length===6){let n=p=>{let d="";for(let f=0;f({position:new A(t,r,e),rotation:new Sr(i,n,s)}),Z2t={["Front"]:Mn(Ur({},Ns([0,0,1],[0,0,0])),{label:"NavCube.front"}),["Right"]:Mn(Ur({},Ns([1,0,0],[0,Yi,0])),{label:"NavCube.right"}),["Back"]:Mn(Ur({},Ns([0,0,-1],[0,Math.PI,0])),{label:"NavCube.back"}),["Left"]:Mn(Ur({},Ns([-1,0,0],[0,-Yi,0])),{label:"NavCube.left"}),["Top"]:Mn(Ur({},Ns([0,1,0],[-Yi,0,0])),{label:"NavCube.top"}),["Bottom"]:Mn(Ur({},Ns([0,-1,0],[Yi,0,0])),{label:"NavCube.bottom"})},K2t=[Ns([0,1,1],[-gi,0,-Yi]),Ns([0,1,-1],[-3*gi,0,-Yi]),Ns([0,-1,1],[gi,0,-Yi]),Ns([0,-1,-1],[3*gi,0,-Yi]),Ns([1,1,0],[-Yi,gi,0]),Ns([1,-1,0],[-Yi,3*gi,0]),Ns([-1,1,0],[-Yi,-gi,0]),Ns([-1,-1,0],[-Yi,-3*gi,0]),Ns([1,0,1],[0,gi,0]),Ns([1,0,-1],[0,3*gi,0]),Ns([-1,0,1],[0,-gi,0]),Ns([-1,0,-1],[0,-3*gi,0])],J2t=[{position:new A(1,1,1),rotation:[new Sr(-Yi,Yi,-gi),new Sr(-Yi,0,gi),new Sr(0,0,3*gi)]},{position:new A(1,1,-1),rotation:[new Sr(0,Yi,3*gi),new Sr(-Yi,0,3*gi),new Sr(0,Math.PI,-3*gi)]},{position:new A(-1,1,-1),rotation:[new Sr(Math.PI,-Yi,gi),new Sr(-Yi,0,-3*gi),new Sr(0,Math.PI,3*gi)]},{position:new A(-1,1,1),rotation:[new Sr(0,-Yi,3*gi),new Sr(-Yi,0,-gi),new Sr(0,0,-3*gi)]},{position:new A(1,-1,1),rotation:[new Sr(0,Yi,-gi),new Sr(-Yi,Math.PI,-gi),new Sr(0,0,gi)]},{position:new A(1,-1,-1),rotation:[new Sr(-Yi,Yi,3*gi),new Sr(Yi,0,gi),new Sr(0,Math.PI,-gi)]},{position:new A(-1,-1,1),rotation:[new Sr(0,-Yi,gi),new Sr(Yi,0,-3*gi),new Sr(0,0,-gi)]},{position:new A(-1,-1,-1),rotation:[new Sr(0,-Yi,-gi),new Sr(Yi,0,-gi),new Sr(0,Math.PI,gi)]}],UO=class extends pr{constructor(e={}){super();this.NAVCUBE_SIZE=100;this.clickHandler=e.onClick,(0,A0.forEach)(Z2t,i=>{this.createPlane(i)}),(0,A0.forEach)(K2t,i=>{this.createEdge(i)}),(0,A0.forEach)(J2t,(i,n)=>{this.createCorner(i,n)})}createPlane(e){let i=e.position.clone().multiplyScalar(this.NAVCUBE_SIZE/2),{rotation:n,label:s}=e,a=document.createElement("div");a.style.width=this.NAVCUBE_SIZE+"px",a.style.height=this.NAVCUBE_SIZE+"px",a.classList.add("navcube-plane"),a.classList.add("outer");let o=document.createElement("div");o.style.width=this.NAVCUBE_SIZE-4+"px",o.style.height=this.NAVCUBE_SIZE-4+"px",o.innerHTML=gh(s),o.classList.add("navcube-plane"),o.classList.add("inner"),a.appendChild(o);let l=new C0(a);l.position.copy(i),l.rotation.copy(n),this.add(l),a.addEventListener("click",()=>{this.clickHandler&&this.clickHandler(i.clone().normalize(),n)})}createEdge(e){let i=e.position.clone().multiplyScalar(this.NAVCUBE_SIZE/2),n=document.createElement("div");n.style.width=4+"px",n.style.height=this.NAVCUBE_SIZE-40+"px",n.style.background=EDe,n.classList.add("navcube-edge");let s=new C0(n);s.position.copy(i),s.rotation.copy(e.rotation),this.add(s),n.addEventListener("click",()=>{this.clickHandler&&this.clickHandler(i.clone().normalize(),e.rotation)})}createCorner(e,i){let n=h=>{h.addEventListener("click",()=>{this.clickHandler&&this.clickHandler(e.position.clone().normalize(),new Sr)}),h.addEventListener("mouseenter",()=>{let p=document.getElementsByClassName("group-"+i);(0,A0.forEach)(p,d=>{d instanceof HTMLElement&&d.classList.add("highlight")})}),h.addEventListener("mouseleave",()=>{let p=document.getElementsByClassName("group-"+i);(0,A0.forEach)(p,d=>{d instanceof HTMLElement&&d.classList.remove("highlight")})})},s=e.position.clone().multiplyScalar(this.NAVCUBE_SIZE/2+.5),a=document.createElement("div");a.style.borderTop=`${14*Math.sqrt(3)}px solid #efefef`,a.style.borderLeft=`${14}px solid transparent`,a.style.borderRight=`${14}px solid transparent`,a.classList.add("navcube-corner"),a.classList.add("group-"+i);let o=new C0(a);o.position.copy(s).lerp(e.position,.14);let l=Math.atan2(s.z,s.x);o.rotateY(s.z*s.x<0?Math.PI+l:l);let c=new Sr().setFromVector3(s.clone().normalize());o.rotateX(-c.y),s.y<0&&o.rotateZ(Math.PI),this.add(o);let u=(h,p,d)=>{let f=document.createElement("div");f.style.borderTop=`${13}px solid ${EDe}`,f.style.borderLeft=`${13}px solid transparent`,f.style.borderRight=`${13}px solid transparent`,f.classList.add("navcube-corner-plane"),f.classList.add("group-"+p);let m=new C0(f),g=e.position.clone();g.setComponent(d,0),m.position.copy(s).sub(g),m.rotateX(h.x),m.rotateY(h.y),m.rotateZ(h.z),this.add(m),n(f)};(0,A0.forEach)(e.rotation,(h,p)=>{u(h,i,p)}),n(a)}};var BO=class{constructor(r,e){this.height=150;this.width=150;this.width=r||this.width,this.height=e||this.height,this.init()}init(){this.initRenderer(),this.initScene(),this.animate()}initRenderer(){this.renderer=new HO,this.renderer.setSize(this.width,this.height),this.renderer.domElement.classList.add("css3d-navcube"),document.body.appendChild(this.renderer.domElement)}initScene(){this.scene=new On;let r=window.innerWidth/window.innerHeight,e=200;this.camera=new Zi(e*r/-2,e*r/2,e/2,e/-2,1,1e3),this.camera.position.set(-200,200,200),this.scene.add(this.camera);let i=n=>{if(!this.camera||!n||!this.hostViewer||!this.hostViewer.camera||!this.hostViewer.controls)return;let s=this.hostViewer.controls.target,o=this.hostViewer.camera.position.distanceTo(s);this.hostViewer.flyTo(s.clone().add(n.clone().multiplyScalar(o)),s)};this.navCube=new UO({onClick:i}),this.scene.add(this.navCube)}render(){this.renderer&&this.scene&&this.camera&&(this.update(),this.renderer.render(this.scene,this.camera))}animate(){requestAnimationFrame(this.animate.bind(this)),this.render()}setHostViewer(r){this.hostViewer=r,this.update()}update(){if(!this.hostViewer||!this.hostViewer.camera)return;let r=this.hostViewer.camera;if(r){let e=new A;r.getWorldDirection(e);let i=r.up;this.updateCameraDirection(e,i)}}updateCameraDirection(r,e){if(!this.camera||!r)return;r.normalize();let i=20,n=0;this.camera.position.set(-r.x*i+n,-r.y*i+n,-r.z*i+n),this.camera.lookAt(n,n,n),this.camera.up=e}dispose(){!this.scene||!this.camera||!this.navCube||(this.scene.clear(),this.hostViewer=void 0,this.camera=void 0,this.navCube=void 0,this.scene=void 0)}};var Q2t=new A(1,0,0),eNt=new A(0,1,0),tNt=new A(0,0,1),kO=class extends tm{constructor(e){super(e);let{min:i,max:n}=this.sectionBox;this.sectionRange={x:[i.x,n.x],y:[i.y,n.y],z:[i.z,n.z]}}activate(){super.activate(),this.initOrUpdateClipPlane(),this.initOrUpdateVertices(),this.initOrUpdateSectionPlane(),this.setGlobalClippingEnable(!0)}deactivate(){super.deactivate(),this.planesMesh&&this.scene.remove(...this.planesMesh),this.planesMesh=void 0}initOrUpdateVertices(){if(!this.sectionBox)return;let{min:e,max:i}=this.sectionBox;this.vertices=[new A(i.x,i.y,i.z),new A(e.x,i.y,i.z),new A(e.x,e.y,i.z),new A(i.x,e.y,i.z),new A(i.x,i.y,e.z),new A(e.x,i.y,e.z),new A(e.x,e.y,e.z),new A(i.x,e.y,e.z)]}initOrUpdateClipPlane(){let{min:e,max:i}=this.sectionBox;this.clipPlanes?(this.clipPlanes[0].constant=i.x,this.clipPlanes[1].constant=-e.x,this.clipPlanes[2].constant=i.y,this.clipPlanes[3].constant=-e.y,this.clipPlanes[4].constant=i.z,this.clipPlanes[5].constant=-e.z):this.clipPlanes=[new Ei(new A(-1,0,0),i.x),new Ei(new A(1,0,0),-e.x),new Ei(new A(0,-1,0),i.y),new Ei(new A(0,1,0),-e.y),new Ei(new A(0,0,-1),i.z),new Ei(new A(0,0,1),-e.z)],this.renderer.clippingPlanes=this.clipPlanes}initOrUpdateSectionPlane(){let e=this.vertices;if(e){if(this.planesMesh)this.planesMesh[0].update([e[4],e[0],e[3],e[7]]),this.planesMesh[1].update([e[1],e[5],e[6],e[2]]),this.planesMesh[2].update([e[4],e[5],e[1],e[0]]),this.planesMesh[3].update([e[6],e[7],e[3],e[2]]),this.planesMesh[4].update([e[0],e[1],e[2],e[3]]),this.planesMesh[5].update([e[5],e[4],e[7],e[6]]);else{let i=[new an("Right",[e[4],e[0],e[3],e[7]]),new an("Left",[e[1],e[5],e[6],e[2]]),new an("Top",[e[4],e[5],e[1],e[0]]),new an("Bottom",[e[6],e[7],e[3],e[2]]),new an("Front",[e[0],e[1],e[2],e[3]]),new an("Back",[e[5],e[4],e[7],e[6]])];this.planesMesh=i,this.scene.add(...i)}this.viewer.enableRender()}}activateSelectedObject(e){var i;(i=this.selectedObject)==null||i.setActive(e)}onDragStart(e){var i;this.selectedObject&&(this.controls&&this.dragStarted&&(this.controls.enableRotate=!1),ne.info("[ObjectsBoxSection] onDragStart:",e),this.refrencePlane.setFromNormalAndCoplanarPoint(this.camera.getWorldDirection(this.refrencePlane.normal),this.selectedObject.getPlaneCenter()),(i=this.raycaster)==null||i.ray.intersectPlane(this.refrencePlane,this.lastWorldPos))}onDragMove(e){var s;if(!this.lastWorldPos||!this.selectedObject)return;let i=new A;(s=this.raycaster)==null||s.ray.intersectPlane(this.refrencePlane,i);let n=this.selectedObject.actionType;switch(n){case"Top":case"Bottom":this.dragTranslateSectionPlane(eNt,this.lastWorldPos,i,n);break;case"Left":case"Right":this.dragTranslateSectionPlane(Q2t,this.lastWorldPos,i,n);break;case"Front":case"Back":this.dragTranslateSectionPlane(tNt,this.lastWorldPos,i,n);break;default:break}this.lastWorldPos=i}onDragEnd(e){this.controls&&!this.controls.enableRotate&&(this.controls.enableRotate=!0),this.activateSelectedObject(!1),this.dragStarted=!1,this.selectedObject=void 0,ne.info("[ObjectsBoxSection] onDragEnd:",e)}dragTranslateSectionPlane(e,i,n,s){let{min:a,max:o}=this.sectionBox,l=n.clone().sub(i).projectOnVector(e),c;switch(s){case"Top":c=o.y+l.y,this.isInRange(c,this.sectionRange.y)&&(o.y=c);break;case"Bottom":c=a.y+l.y,this.isInRange(c,this.sectionRange.y)&&(a.y=c);break;case"Left":c=a.x+l.x,this.isInRange(c,this.sectionRange.x)&&(a.x=c);break;case"Right":c=o.x+l.x,this.isInRange(c,this.sectionRange.x)&&(o.x=c);break;case"Front":c=o.z+l.z,this.isInRange(c,this.sectionRange.z)&&(o.z=c);break;case"Back":c=a.z+l.z,this.isInRange(c,this.sectionRange.z)&&(a.z=c);break;default:break}this.initOrUpdateVertices(),this.initOrUpdateSectionPlane(),this.initOrUpdateClipPlane(),this.viewer.enableRender()}isInRange(e,i){return e>i[0]&&en.visible=e),this.isShowSectionPlane=e,this.viewer.enableRender()}};var GO=class extends tm{constructor(e){super(e);this.mousedown=e=>{var n;if(e.button===0){if(!this.faceInfo){let s=this.pickFace(e);if(s&&s.face){let a=s.face.normal,o=new Qi;a.applyNormalMatrix(o.getNormalMatrix(s.object.matrixWorld)),this.faceInfo={position:s.point,normal:a.normalize()},this.setSection(),(n=this.tooltip)==null||n.hide()}return}this.camera&&this.selectedObject&&(this.mouseDown=!0)}};this.mousemove=e=>{var i,n,s;if(!this.faceInfo)this.pickFace(e)?(i=this.tooltip)==null||i.show():(n=this.tooltip)==null||n.hide();else{if(this.dragStarted)this.updateRaycasterByMouse(e),this.onDragMove(e);else{this.activateSelectedObject(!1);let a=this.getIntersections(e);a?(this.selectedObject=a.object,this.activateSelectedObject(!0),this.mouseDown&&((s=this.selectedObject)==null?void 0:s.parent)instanceof tu&&(this.dragStarted||(this.dragStarted=!0,this.onDragStart(e)))):this.selectedObject=void 0}this.viewer.enableRender()}};this.center=new A,this.sectionBox.getCenter(this.center),this.viewer.addEventListener("RenderAfter",()=>{var i;this.isActive&&((i=this.gizmo)==null||i.adjustSize(this.camera))})}activate(){super.activate(),this.tooltip=new ph("pick-section-plane",gh("Tooltip.section"),{parentNode:this.viewer.widgetContainer,followPointer:!0})}deactivate(){var e,i,n;super.deactivate(),(e=this.planeMesh)==null||e.removeFromParent(),(i=this.gizmo)==null||i.removeFromParent(),this.planeMesh=void 0,this.gizmo=void 0,this.faceInfo=void 0,(n=this.tooltip)==null||n.destroy(),this.tooltip=void 0}setSection(){this.initOrUpdateGizmo(),this.initOrUpdateSectionPlane(),this.initOrUpdateClipPlane(),this.setGlobalClippingEnable(!0),this.viewer.enableRender()}resetSection(){var e,i,n;(e=this.planeMesh)==null||e.removeFromParent(),(i=this.gizmo)==null||i.removeFromParent(),this.setGlobalClippingEnable(!1),this.planeMesh=void 0,this.gizmo=void 0,this.faceInfo=void 0,(n=this.tooltip)==null||n.show(),this.viewer.enableRender()}setSectionVisible(e){this.gizmo&&this.planeMesh&&(this.gizmo.visible=e,this.planeMesh.visible=e),this.isShowSectionPlane=e,this.viewer.enableRender()}initOrUpdateClipPlane(){if(!this.faceInfo)return;let{normal:e,position:i}=this.faceInfo;this.clipPlane=new Ei().setFromNormalAndCoplanarPoint(e.clone().negate(),i),this.clipPlane&&(this.clipPlanes=[this.clipPlane])}initOrUpdateSectionPlane(){var u;if(!this.faceInfo)return;let{normal:e,position:i}=this.faceInfo,n=new A;this.sectionBox.getSize(n);let s=n.length(),a=i,o=new Ot().setFromCenterAndSize(a,new A(s,s,s)),{min:l,max:c}=o;(u=this.planeMesh)==null||u.removeFromParent(),this.planeMesh=new an("Plane",[new A(a.x,c.y,l.z),new A(a.x,c.y,c.z),new A(a.x,l.y,c.z),new A(a.x,l.y,l.z)]),this.planeMesh.setDirection(e),this.planeMesh&&this.scene.add(this.planeMesh),this.viewer.enableRender()}initOrUpdateGizmo(){var n,s;if(!this.faceInfo)return;(n=this.gizmo)==null||n.removeFromParent();let{normal:e,position:i}=this.faceInfo;this.gizmo=new tu,this.gizmo.setDirection(e),this.gizmo.position.copy(i),(s=this.scene)==null||s.add(this.gizmo)}onDragStart(e){var n;if(!this.faceInfo||this.selectedObject instanceof an)return;this.controls&&this.dragStarted&&this.selectedObject&&!(this.selectedObject instanceof an)&&(this.controls.enableRotate=!1),ne.info("[PickPlaneSection] onDragStart:",e);let{position:i}=this.faceInfo;this.refrencePlane.setFromNormalAndCoplanarPoint(this.camera.getWorldDirection(this.refrencePlane.normal),i),(n=this.raycaster)==null||n.ray.intersectPlane(this.refrencePlane,this.lastWorldPos)}onDragMove(e){var f,m,g;if(!this.lastWorldPos||!this.selectedObject||!this.clipPlane||!this.planeMesh||!this.gizmo||!this.faceInfo||this.selectedObject&&this.selectedObject instanceof an)return;let i=new A;(f=this.raycaster)==null||f.ray.intersectPlane(this.refrencePlane,i);let n=this.selectedObject.userData.actionType,{position:s}=this.faceInfo,a=new A().subVectors(this.lastWorldPos,s).normalize(),o=new A().subVectors(i,s).normalize(),l=new A().subVectors(i,this.lastWorldPos).projectOnVector(Fa.clone().applyQuaternion(this.gizmo.quaternion)),c=a.angleTo(o),u=new A().crossVectors(a,o),h=new A;this.sectionBox.getSize(h);let p=Math.max(h.x,h.y,h.z),d;switch(n){case"TranslateX":case"TranslateY":case"TranslateZ":d=new A().addVectors(this.gizmo.position,l),this.sectionBox.clone().setFromCenterAndSize(this.center,new A(p,p,p)).containsPoint(d)&&((m=this.gizmo)==null||m.position.add(l),(g=this.planeMesh)==null||g.position.add(l));break;case"RotateX":{let y=Fa.clone().applyQuaternion(this.gizmo.quaternion);u.dot(y)<0&&(c=-c),this.gizmo.rotateX(c),this.planeMesh.rotatePlane(y,c)}break;case"RotateY":{let y=Qf.clone().applyQuaternion(this.gizmo.quaternion);u.dot(y)<0&&(c=-c),this.gizmo.rotateY(c),this.planeMesh.rotatePlane(y,c)}break;case"RotateZ":{let y=em.clone().applyQuaternion(this.gizmo.quaternion);u.dot(y)<0&&(c=-c),this.gizmo.rotateZ(c),this.planeMesh.rotatePlane(y,c)}break;default:break}this.clipPlane.setFromNormalAndCoplanarPoint(this.planeMesh.getPlaneNormal().negate(),this.gizmo.position),this.lastWorldPos=i}onDragEnd(e){this.selectedObject instanceof an||(this.controls&&!this.controls.enableRotate&&(this.controls.enableRotate=!0),this.activateSelectedObject(!1),this.dragStarted=!1,this.selectedObject=void 0,ne.info("[PickPlaneSection] onDragEnd:",e))}getIntersectObjects(){return!this.planeMesh||!this.gizmo?[]:[this.planeMesh,this.gizmo]}activateSelectedObject(e){this.selectedObject&&(this.selectedObject instanceof an?this.selectedObject.setActive(e):this.selectedObject.parent instanceof tu&&this.selectedObject.parent.setActive(e,this.selectedObject))}pickFace(e){if(!this.raycaster)return;let i=Mr.getScreenPointByEvent(e,this.canvas),n=Mr.screenPoint2NdcPoint(i,this.camera,this.canvas);this.raycaster.setFromCamera(n,this.camera);let s=[];return Object.values(this.viewer.loadedModels).forEach(l=>{let c=this.scene&&this.scene.getObjectById(l.id);c&&c.visible&&s.push(c)}),(this.raycaster.intersectObjects(this.viewer.getRaycastableObjectsByMouse(e))||[]).find(l=>{let c=l.object;return c.visible&&(c.userData.selectable!==!1||c instanceof Je)})}};var VO=class{constructor(r){this.sections={};this.viewer=r,this.sections["ObjectsBoxSection"]=new kO(r),this.sections["AxisPlaneSection"]=new DO(r),this.sections["PickPlaneSection"]=new GO(r)}get raycaster(){return this.viewer.getRaycaster()}activateSection(r){this.activeSectionType&&this.deactivateSection(),this.activeSectionType=r,this.sections[r].activate()}deactivateSection(){let r=this.activeSectionType;r&&this.sections[r].deactivate(),this.activeSectionType=void 0}resetSection(){}isSectionActive(){let r=this.activeSectionType;return r?this.sections[r].isActive:!!this.getActiveSectionType()}getActiveSectionType(){return this.activeSectionType}getActiveSection(){if(this.activeSectionType)return this.sections[this.activeSectionType]}destroy(){this.deactivateSection(),this.activeSectionType=void 0}};function sG(t){let r;try{r=new URL(t,"http://fakehost.com/")}catch(s){return null}let e=r.pathname.split("/").pop(),i=e.lastIndexOf(".");return i===-1||i===e.length-1?null:e.substring(i+1)}function rNt(t){Promise.resolve().then(t)}var zO=class{constructor(){this.maxSize=800,this.minSize=600,this.unloadPercent=.05,this.itemSet=new Map,this.itemList=[],this.usedSet=new Set,this.callbacks=new Map,this.unloadPriorityCallback=null;let r=this.itemSet;this.defaultPriorityCallback=e=>r.get(e)}isFull(){return this.itemSet.size>=this.maxSize}add(r,e){let i=this.itemSet;if(i.has(r)||this.isFull())return!1;let n=this.usedSet,s=this.itemList,a=this.callbacks;return s.push(r),n.add(r),i.set(r,Date.now()),a.set(r,e),!0}remove(r){let e=this.usedSet,i=this.itemSet,n=this.itemList,s=this.callbacks;if(i.has(r)){s.get(r)(r);let a=n.indexOf(r);return n.splice(a,1),e.delete(r),i.delete(r),s.delete(r),!0}return!1}markUsed(r){let e=this.itemSet,i=this.usedSet;e.has(r)&&!i.has(r)&&(e.set(r,Date.now()),i.add(r))}markAllUnused(){this.usedSet.clear()}unloadUnusedContent(){let r=this.unloadPercent,e=this.minSize,i=this.itemList,n=this.itemSet,s=this.usedSet,a=this.callbacks,o=i.length-s.size,l=i.length-e,c=this.unloadPriorityCallback||this.defaultPriorityCallback;if(l>0&&o>0){i.sort((f,m)=>{let g=s.has(f),y=s.has(m);return g&&y?0:!g&&!y?c(m)-c(f):g?1:-1});let u=Math.min(l,o),h=Math.max(e*r,u*r),p=Math.min(h,o);p=Math.ceil(p);let d=i.splice(0,p);for(let f=0,m=d.length;f{this.scheduled=!1,this.unloadUnusedContent(),r&&this.markAllUnused()}))}};var AS=class{constructor(){this.maxJobs=6,this.items=[],this.callbacks=new Map,this.currJobs=0,this.scheduled=!1,this.autoUpdate=!0,this.priorityCallback=()=>{throw new Error("PriorityQueue: PriorityCallback function not defined.")},this.schedulingCallback=r=>{requestAnimationFrame(r)},this._runjobs=()=>{this.tryRunJobs(),this.scheduled=!1}}sort(){let r=this.priorityCallback;this.items.sort(r)}add(r,e){return new Promise((i,n)=>{let s=(...l)=>e(...l).then(i).catch(n),a=this.items,o=this.callbacks;a.push(r),o.set(r,s),this.autoUpdate&&this.scheduleJobRun()})}remove(r){let e=this.items,i=this.callbacks,n=e.indexOf(r);n!==-1&&(e.splice(n,1),i.delete(r))}tryRunJobs(){this.sort();let r=this.items,e=this.callbacks,i=this.maxJobs,n=this.currJobs;for(;i>n&&r.length>0;){n++;let s=r.pop(),a=e.get(s);e.delete(s),a(s).then(()=>{this.currJobs--,this.autoUpdate&&this.scheduleJobRun()}).catch(()=>{this.currJobs--,this.autoUpdate&&this.scheduleJobRun()})}this.currJobs=n}scheduleJobRun(){this.scheduled||(this.schedulingCallback(this._runjobs),this.scheduled=!0)}};var iNt=.0033528106647474805,bDe=-(iNt*6378137-6378137);function oG(t){return t===3||t===4}function O0(t,r){return t.__lastFrameVisited===r&&t.__used}function xDe(t,r){t.__lastFrameVisited!==r&&(t.__lastFrameVisited=r,t.__used=!1,t.__inFrustum=!1,t.__isLeaf=!1,t.__visible=!1,t.__active=!1,t.__error=1/0,t.__distanceFromCamera=1/0,t.__childrenWereVisible=!1,t.__allChildrenLoaded=!1)}function IDe(t,r,e){if(xDe(t,r),t.__used=!0,e.markUsed(t),t.__contentEmpty){let i=t.children;for(let n=0,s=i.length;n0&&t.__depth+1>=s))return!0;let u=!1,h=t.children;for(let p=0,d=h.length;pt.__depth!==r.__depth?t.__depth>r.__depth?-1:1:t.__inFrustum!==r.__inFrustum?t.__inFrustum?1:-1:t.__used!==r.__used?t.__used?1:-1:t.__error!==r.__error?t.__error>r.__error?1:-1:t.__distanceFromCamera!==r.__distanceFromCamera?t.__distanceFromCamera>r.__distanceFromCamera?-1:1:0,nNt=t=>1/(t.__depthFromRenderedParent+1),qO=class{get rootTileSet(){let r=this.tileSets[this.rootURL];return!r||r instanceof Promise?null:r}get root(){let r=this.rootTileSet;return r?r.root:null}constructor(r){this.tileSets={},this.rootURL=r,this.fetchOptions={},this.preprocessURL=null;let e=new zO;e.unloadPriorityCallback=nNt;let i=new AS;i.maxJobs=4,i.priorityCallback=wDe;let n=new AS;n.maxJobs=1,n.priorityCallback=wDe,this.lruCache=e,this.downloadQueue=i,this.parseQueue=n,this.stats={parsing:0,downloading:0,failed:0,inFrustum:0,used:0,active:0,visible:0},this.frameCount=0,this.errorTarget=6,this.errorThreshold=1/0,this.loadSiblings=!0,this.displayActiveTiles=!1,this.maxDepth=1/0,this.stopAtEmptyTiles=!0}traverse(r,e){let n=this.tileSets[this.rootURL];!n||!n.root||WO(n.root,r,e)}update(){let r=this.stats,e=this.lruCache,i=this.tileSets,n=i[this.rootURL];if(this.rootURL in i){if(!n||!n.root)return}else{this.loadRootTileSet(this.rootURL);return}let s=n.root;r.inFrustum=0,r.used=0,r.active=0,r.visible=0,this.frameCount++,lG(s,this),cG(s,this),uG(s,this),hG(s,this),e.scheduleUnload()}parseTile(r,e,i){return null}disposeTile(r){}preprocessNode(r,e,i){if(r.content&&(!("uri"in r.content)&&"url"in r.content&&(r.content.uri=r.content.url,delete r.content.url),r.content.uri&&(r.content.uri=new URL(r.content.uri,i+"/").toString()),r.content.boundingVolume&&!("box"in r.content.boundingVolume||"sphere"in r.content.boundingVolume||"region"in r.content.boundingVolume)&&delete r.content.boundingVolume),r.parent=e,r.children=r.children||[],r.content&&r.content.uri){let s=sG(r.content.uri),a=Boolean(s&&s.toLowerCase()==="json");r.__externalTileSet=a,r.__contentEmpty=a}else r.__externalTileSet=!1,r.__contentEmpty=!0;r.__distanceFromCamera=1/0,r.__error=1/0,r.__inFrustum=!1,r.__isLeaf=!1,r.__usedLastFrame=!1,r.__used=!1,r.__wasSetVisible=!1,r.__visible=!1,r.__childrenWereVisible=!1,r.__allChildrenLoaded=!1,r.__wasSetActive=!1,r.__active=!1,r.__loadingState=0,r.__loadIndex=0,r.__loadAbort=null,r.__depthFromRenderedParent=-1,e===null?(r.__depth=0,r.refine=r.refine||"REPLACE"):(r.__depth=e.__depth+1,r.refine=r.refine||e.refine)}setTileActive(r,e){}setTileVisible(r,e){}calculateError(r){return 0}tileInView(r){return!0}resetFailedTiles(){let r=this.stats;r.failed!==0&&(this.traverse(e=>{e.__loadingState===4&&(e.__loadingState=0)}),r.failed=0)}fetchTileSet(r,e,i=null){return fetch(r,e).then(n=>{if(n.ok)return n.json();throw new Error(`TilesRenderer: Failed to load tileset "${r}" with status ${n.status} : ${n.statusText}`)}).then(n=>{let s=n.asset.version;console.assert(s==="1.0"||s==="0.0",'asset.version is expected to be a string of "1.0" or "0.0"');let a=r.replace(/\/[^\/]*\/?$/,"");return a=new URL(a,window.location.href).toString(),WO(n.root,(o,l)=>this.preprocessNode(o,l,a),null,i,i?i.__depth:0),n})}loadRootTileSet(r){let e=this.tileSets;if(r in e)return e[r]instanceof Error?Promise.reject(e[r]):Promise.resolve(e[r]);{let i=this.fetchTileSet(this.preprocessURL?this.preprocessURL(r):r,this.fetchOptions).then(n=>{e[r]=n});return i.catch(n=>{console.error(n),e[r]=n}),e[r]=i,i}}requestTileContents(r){if(r.__loadingState!==0)return;let e=this.stats,i=this.lruCache,n=this.downloadQueue,s=this.parseQueue,a=r.__externalTileSet;i.add(r,h=>{h.__loadingState===1?(h.__loadAbort.abort(),h.__loadAbort=null):a?h.children.length=0:this.disposeTile(h),h.__loadingState===1?e.downloading--:h.__loadingState===2&&e.parsing--,h.__loadingState=0,h.__loadIndex++,s.remove(h),n.remove(h)}),r.__loadIndex++;let o=r.__loadIndex,l=new AbortController,c=l.signal;e.downloading++,r.__loadAbort=l,r.__loadingState=1;let u=h=>{r.__loadIndex===o&&(h.name!=="AbortError"?(s.remove(r),n.remove(r),r.__loadingState===2?e.parsing--:r.__loadingState===1&&e.downloading--,e.failed++,console.error(`TilesRenderer : Failed to load tile at url "${r.content.uri}".`),console.error(h),r.__loadingState=4):i.remove(r))};a?n.add(r,h=>{if(h.__loadIndex!==o)return Promise.resolve();let p=this.preprocessURL?this.preprocessURL(h.content.uri):h.content.uri;return this.fetchTileSet(p,Object.assign({signal:c},this.fetchOptions),h)}).then(h=>{r.__loadIndex===o&&(e.downloading--,r.__loadAbort=null,r.__loadingState=3,r.children.push(h.root))}).catch(u):n.add(r,h=>{if(h.__loadIndex!==o)return Promise.resolve();let p=this.preprocessURL?this.preprocessURL(h.content.uri):h.content.uri;return fetch(p,Object.assign({signal:c},this.fetchOptions))}).then(h=>{if(r.__loadIndex===o){if(h.ok)return h.arrayBuffer();throw new Error(`Failed to load model with error code ${h.status}`)}}).then(h=>{if(r.__loadIndex===o)return e.downloading--,e.parsing++,r.__loadAbort=null,r.__loadingState=2,s.add(r,p=>{if(p.__loadIndex!==o)return Promise.resolve();let d=p.content.uri,f=sG(d);return this.parseTile(h,p,f)})}).then(()=>{r.__loadIndex===o&&(e.parsing--,r.__loadingState=3,r.__wasSetVisible&&this.setTileVisible(r,!0),r.__wasSetActive&&this.setTileActive(r,!0))}).catch(u)}dispose(){let r=this.lruCache;this.traverse(e=>{r.remove(e)}),this.stats={parsing:0,downloading:0,failed:0,inFrustum:0,used:0,active:0,visible:0},this.frameCount=0}};function YO(t){return new TextDecoder().decode(t)}var ad=class{constructor(r,e,i,n){this.buffer=r,this.binOffset=e+i,this.binLength=n;let s=null;if(i!==0){let a=new Uint8Array(r,e,i);s=JSON.parse(YO(a))}else s={};this.header=s}getKeys(){return Object.keys(this.header)}getData(r,e,i=null,n=null){let s=this.header;if(!(r in s))return null;let a=s[r];if(a instanceof Object){if(Array.isArray(a))return a;{let{buffer:o,binOffset:l,binLength:c}=this,u=a.byteOffset||0,h=a.type||n,p=a.componentType||i;if("type"in a&&n&&a.type!==n)throw new Error("FeatureTable: Specified type does not match expected type.");let d;switch(h){case"SCALAR":d=1;break;case"VEC2":d=2;break;case"VEC3":d=3;break;case"VEC4":d=4;break;default:throw new Error(`FeatureTable : Feature type not provided for "${r}".`)}let f,m=l+u,g=e*d;switch(p){case"BYTE":f=new Int8Array(o,m,g);break;case"UNSIGNED_BYTE":f=new Uint8Array(o,m,g);break;case"SHORT":f=new Int16Array(o,m,g);break;case"UNSIGNED_SHORT":f=new Uint16Array(o,m,g);break;case"INT":f=new Int32Array(o,m,g);break;case"UNSIGNED_INT":f=new Uint32Array(o,m,g);break;case"FLOAT":f=new Float32Array(o,m,g);break;case"DOUBLE":f=new Float64Array(o,m,g);break;default:throw new Error(`FeatureTable : Feature component type not provided for "${r}".`)}if(m+g*f.BYTES_PER_ELEMENT>l+c)throw new Error("FeatureTable: Feature data read outside binary body length.");return f}}else return a}},rm=class extends ad{constructor(r,e,i,n,s){super(r,i,n,s),this.batchSize=e}getData(r,e=null,i=null){return super.getData(r,this.batchSize,e,i)}};var ec=class{constructor(){this.fetchOptions={},this.workingPath=""}load(r){return fetch(r,this.fetchOptions).then(e=>{if(!e.ok)throw new Error(`Failed to load file "${r}" with status ${e.status} : ${e.statusText}`);return e.arrayBuffer()}).then(e=>(this.workingPath===""&&(this.workingPath=this.workingPathForURL(r)),this.parse(e)))}resolveExternalURL(r){return/^[^\\/]/.test(r)?this.workingPath+"/"+r:r}workingPathForURL(r){let e=r.split(/[\\/]/g);return e.pop(),e.join("/")+"/"}parse(r){throw new Error("LoaderBase: Parse not implemented.")}};function iu(t){let r;if(t instanceof DataView?r=t:r=new DataView(t),String.fromCharCode(r.getUint8(0))==="{")return null;let e="";for(let i=0;i<4;i++)e+=String.fromCharCode(r.getUint8(i));return e}var XO=class extends ec{parse(r){let e=new DataView(r),i=iu(e);console.assert(i==="b3dm");let n=e.getUint32(4,!0);console.assert(n===1);let s=e.getUint32(8,!0);console.assert(s===r.byteLength);let a=e.getUint32(12,!0),o=e.getUint32(16,!0),l=e.getUint32(20,!0),c=e.getUint32(24,!0),u=28,h=r.slice(u,u+a+o),p=new ad(h,0,a,o),d=u+a+o,f=r.slice(d,d+l+c),m=new rm(f,p.getData("BATCH_LENGTH"),0,l,c),g=d+l+c,y=new Uint8Array(r,g,s-g);return{version:n,featureTable:p,batchTable:m,glbBytes:y}}};var pE=class extends XO{constructor(r=oo){super(),this.manager=r,this.adjustmentTransform=new Ue}parse(r){let e=super.parse(r),i=e.glbBytes.slice().buffer;return new Promise((n,s)=>{let a=this.manager,o=this.fetchOptions,l=a.getHandler("path.gltf")||new Yu(a);o.credentials==="include"&&o.mode==="cors"&&l.setCrossOrigin("use-credentials"),"credentials"in o&&l.setWithCredentials(o.credentials==="include"),o.headers&&l.setRequestHeader(o.headers);let c=this.workingPath;!/[\\/]$/.test(c)&&c.length&&(c+="/");let u=this.adjustmentTransform;l.parse(i,c,h=>{let{batchTable:p,featureTable:d}=e,{scene:f}=h,m=d.getData("RTC_CENTER");m&&(f.position.x+=m[0],f.position.y+=m[1],f.position.z+=m[2]),h.scene.updateMatrix(),h.scene.matrix.multiply(u),h.scene.matrix.decompose(h.scene.position,h.scene.quaternion,h.scene.scale),h.batchTable=p,h.featureTable=d,f.batchTable=p,f.featureTable=d,n(h)},s)})}};var $O=class extends ec{parse(r){let e=new DataView(r),i=iu(e);console.assert(i==="pnts");let n=e.getUint32(4,!0);console.assert(n===1);let s=e.getUint32(8,!0);console.assert(s===r.byteLength);let a=e.getUint32(12,!0),o=e.getUint32(16,!0),l=e.getUint32(20,!0),c=e.getUint32(24,!0),u=28,h=r.slice(u,u+a+o),p=new ad(h,0,a,o),d=u+a+o,f=r.slice(d,d+l+c),m=new rm(f,p.getData("BATCH_LENGTH")||p.getData("POINTS_LENGTH"),0,l,c);return Promise.resolve({version:n,featureTable:p,batchTable:m})}};var dE=class extends $O{constructor(r=oo){super(),this.manager=r}parse(r){return super.parse(r).then(e=>{let{featureTable:i}=e,n=i.getData("POINTS_LENGTH"),s=i.getData("POSITION",n,"FLOAT","VEC3"),a=i.getData("RGB",n,"UNSIGNED_BYTE","VEC3");["QUANTIZED_VOLUME_OFFSET","QUANTIZED_VOLUME_SCALE","CONSTANT_RGBA","BATCH_LENGTH","POSITION_QUANTIZED","RGBA","RGB565","NORMAL","NORMAL_OCT16P"].forEach(h=>{h in i.header&&console.warn(`PNTSLoader: Unsupported FeatureTable feature "${h}" detected.`)});let o=new it;o.setAttribute("position",new jt(s,3,!1));let l=new Vn;l.size=2,l.sizeAttenuation=!1,a!==null&&(o.setAttribute("color",new jt(a,3,!0)),l.vertexColors=!0);let c=new rn(o,l);e.scene=c,e.scene.featureTable=i;let u=i.getData("RTC_CENTER");return u&&(e.scene.position.x+=u[0],e.scene.position.y+=u[1],e.scene.position.z+=u[2]),e})}};var ZO=class extends ec{parse(r){let e=new DataView(r),i=iu(e);console.assert(i==="i3dm");let n=e.getUint32(4,!0);console.assert(n===1);let s=e.getUint32(8,!0);console.assert(s===r.byteLength);let a=e.getUint32(12,!0),o=e.getUint32(16,!0),l=e.getUint32(20,!0),c=e.getUint32(24,!0),u=e.getUint32(28,!0),h=32,p=r.slice(h,h+a+o),d=new ad(p,0,a,o),f=h+a+o,m=r.slice(f,f+l+c),g=new rm(m,d.getData("INSTANCES_LENGTH"),0,l,c),y=f+l+c,E=new Uint8Array(r,y,s-y),b=null,x=null;if(u)b=E,x=Promise.resolve();else{let S=this.resolveExternalURL(YO(E));x=fetch(S,this.fetchOptions).then(D=>{if(!D.ok)throw new Error(`I3DMLoaderBase : Failed to load file "${S}" with status ${D.status} : ${D.statusText}`);return D.arrayBuffer()}).then(D=>{b=new Uint8Array(D)})}return x.then(()=>({version:n,featureTable:d,batchTable:g,glbBytes:b}))}};var RDe=new A,fG=new A,mG=new A,MDe=new A,gG=new Or,KO=new A,JO=new Ue,fE=class extends ZO{constructor(r=oo){super(),this.manager=r,this.adjustmentTransform=new Ue}resolveExternalURL(r){return this.manager.resolveURL(super.resolveExternalURL(r))}parse(r){return super.parse(r).then(e=>{let{featureTable:i,batchTable:n}=e,s=e.glbBytes.slice().buffer;return new Promise((a,o)=>{let l=this.fetchOptions,c=this.manager,u=c.getHandler("path.gltf")||new Yu(c);l.credentials==="include"&&l.mode==="cors"&&u.setCrossOrigin("use-credentials"),"credentials"in l&&u.setWithCredentials(l.credentials==="include"),l.headers&&u.setRequestHeader(l.headers);let h=this.workingPath;/[\\/]$/.test(h)||(h+="/");let p=this.adjustmentTransform;u.parse(s,h,d=>{let f=i.getData("INSTANCES_LENGTH"),m=i.getData("POSITION",f,"FLOAT","VEC3"),g=i.getData("NORMAL_UP",f,"FLOAT","VEC3"),y=i.getData("NORMAL_RIGHT",f,"FLOAT","VEC3"),E=i.getData("SCALE_NON_UNIFORM",f,"FLOAT","VEC3"),b=i.getData("SCALE",f,"FLOAT","SCALAR");["RTC_CENTER","QUANTIZED_VOLUME_OFFSET","QUANTIZED_VOLUME_SCALE","EAST_NORTH_UP","POSITION_QUANTIZED","NORMAL_UP_OCT32P","NORMAL_RIGHT_OCT32P"].forEach(P=>{P in i.header&&console.warn(`I3DMLoader: Unsupported FeatureTable feature "${P}" detected.`)});let x=new Map,S=[];d.scene.traverse(P=>{if(P.isMesh){let{geometry:_,material:w}=P,F=new tn(_,w,f);F.position.copy(P.position),F.rotation.copy(P.rotation),F.scale.copy(P.scale),S.push(F),x.set(P,F)}});let D=new A;for(let P=0;P{let w=_.parent;w&&(w.remove(_),w.add(P),P.updateMatrixWorld(),P.position.copy(D).applyMatrix4(P.matrixWorld))});for(let P=0;P{let o=new hr;return a.forEach(l=>{o.add(l.scene)}),{tiles:a,scene:o}})}};var t3=class{constructor(){this.name="CESIUM_RTC"}afterRoot(r){if(r.parser.json.extensions&&r.parser.json.extensions.CESIUM_RTC){let{center:e}=r.parser.json.extensions.CESIUM_RTC;e&&(r.scene.position.x+=e[0],r.scene.position.y+=e[1],r.scene.position.z+=e[2])}}};var r3=class extends ec{constructor(r=oo){super(),this.manager=r}parse(r){return new Promise((e,i)=>{let n=this.manager,s=this.fetchOptions,a=n.getHandler("path.gltf")||n.getHandler("path.glb");a||(a=new Yu(n),a.register(()=>new t3),s.credentials==="include"&&s.mode==="cors"&&a.setCrossOrigin("use-credentials"),"credentials"in s&&a.setWithCredentials(s.credentials==="include"),s.headers&&a.setRequestHeader(s.headers));let o=a.resourcePath||a.path||this.workingPath;!/[\\/]$/.test(o)&&o.length&&(o+="/"),a.parse(r,o,l=>{e(l)},i)})}};var i3=new Ue,n3=class extends hr{constructor(r){super(),this.name="TilesRenderer.TilesGroup",this.tilesRenderer=r}raycast(r,e){this.tilesRenderer.optimizeRaycast&&this.tilesRenderer.raycast(r,e)}updateMatrixWorld(r){if(this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldNeedsUpdate||r){this.parent===null?i3.copy(this.matrix):i3.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1;let e=i3.elements,i=this.matrixWorld.elements,n=!1;for(let s=0;s<16;s++){let a=e[s],o=i[s];if(Math.abs(a-o)>Number.EPSILON){n=!0;break}}if(n){this.matrixWorld.copy(i3);let s=this.children;for(let a=0,o=s.length;a=e&&E<=i&&b>=n&&b<=s){let x=aNt(r);p.push(x),this.getCartographicToPosition(E,b,m,x)}}}return p}getBoundingBox(r,e){ADe();let{latStart:i,latEnd:n,lonStart:s,lonEnd:a}=this;if(n-i{Object.getPrototypeOf(i).raycast.call(i,r,e)})}function EG(t,r,e,i){if(e.has(t))if(TG(t.cached.scene,i,tc),tc.length>0){tc.length>1&&tc.sort(yG);let l=tc[0];return tc.length=0,l}else return null;let n=[],s=t.children;for(let l=0,c=s.length;l1e-6&&console.warn("ThreeTilesRenderer : Non uniform scale used for tile which may cause issues when raycasting.");let y={distance:1/0,tile:null};n.push(y),y.distance=ODe.distanceToSquared(yE.origin)*g*g,y.tile=u}else continue}n.sort(yG);let a=1/0,o=null;for(let l=0,c=n.length;la)break;{let p=u.tile,d=p.cached.scene,f=null;if(e.has(p)?(TG(d,i,tc),tc.length>0&&(tc.length>1&&tc.sort(yG),f=tc[0])):f=EG(p,r,e,i),f){let m=f.distance*f.distance;m{e.frustumCulled=e[LDe]&&r})}var LS=class extends qO{get autoDisableRendererCulling(){return this._autoDisableRendererCulling}set autoDisableRendererCulling(r){this._autoDisableRendererCulling!==r&&(super._autoDisableRendererCulling=r,this.forEachLoadedModel(e=>{NDe(e,!r)}))}constructor(...r){super(...r),this.group=new n3(this),this.cameras=[],this.cameraMap=new Map,this.cameraInfo=[],this.activeTiles=new Set,this.visibleTiles=new Set,this._autoDisableRendererCulling=!0,this.optimizeRaycast=!0,this.onLoadTileSet=null,this.onLoadModel=null,this.onDisposeModel=null,this.onTileVisibilityChange=null;let e=new Ap;e.setURLModifier(n=>this.preprocessURL?this.preprocessURL(n):n),this.manager=e;let i=this;this._overridenRaycast=function(n,s){i.optimizeRaycast||Object.getPrototypeOf(this).raycast.call(this,n,s)}}getBounds(r){if(!this.root)return!1;let e=this.root.cached,i=e.box,n=e.boxTransform;return i?(r.copy(i),r.applyMatrix4(n),!0):!1}getOrientedBounds(r,e){if(!this.root)return!1;let i=this.root.cached,n=i.box,s=i.boxTransform;return n?(r.copy(n),e.copy(s),!0):!1}getBoundingSphere(r){if(!this.root)return!1;let e=this.root.cached.sphere;return e?(r.copy(e),!0):!1}forEachLoadedModel(r){this.traverse(e=>{let i=e.cached.scene;i&&r(i,e)})}raycast(r,e){if(this.root)if(r.firstHitOnly){let i=EG(this.root,this.group,this.activeTiles,r);i&&e.push(i)}else bG(this.root,this.group,this.activeTiles,r,e)}hasCamera(r){return this.cameraMap.has(r)}setCamera(r){let e=this.cameras,i=this.cameraMap;return i.has(r)?!1:(i.set(r,new le),e.push(r),!0)}setResolution(r,e,i){let n=this.cameraMap;return n.has(r)?(e instanceof le?n.get(r).copy(e):n.get(r).set(e,i),!0):!1}setResolutionFromRenderer(r,e){let i=this.cameraMap;if(!i.has(r))return!1;let n=i.get(r);return e.getSize(n),n.multiplyScalar(e.getPixelRatio()),!0}deleteCamera(r){let e=this.cameras,i=this.cameraMap;if(i.has(r)){let n=e.indexOf(r);return e.splice(n,1),i.delete(r),!0}return!1}fetchTileSet(r,...e){let i=super.fetchTileSet(r,...e);return i.then(n=>{this.onLoadTileSet&&Promise.resolve().then(()=>{this.onLoadTileSet(n,r)})}),i}update(){let r=this.group,e=this.cameras,i=this.cameraMap,n=this.cameraInfo;if(e.length===0){console.warn("TilesRenderer: no cameras defined. Cannot update 3d tiles.");return}for(;n.length>e.length;)n.pop();for(;n.length1e-6&&console.warn("ThreeTilesRenderer : Non uniform scale used for tile which may cause issues when calculating screen space error.");for(let a=0,o=n.length;ay.scene);break}case"pnts":{let g=new dE(l);g.workingPath=a,g.fetchOptions=o,u=g.parse(r).then(y=>y.scene);break}case"i3dm":{let g=new fE(l);g.workingPath=a,g.fetchOptions=o,g.adjustmentTransform.copy(nu),u=g.parse(r).then(y=>y.scene);break}case"cmpt":{let g=new e3(l);g.workingPath=a,g.fetchOptions=o,g.adjustmentTransform.copy(nu),u=g.parse(r).then(y=>y.scene);break}case"gltf":case"glb":let m=new r3(l);m.workingPath=a,m.fetchOptions=o,u=m.parse(r).then(g=>g.scene);break;default:console.warn(`TilesRenderer: Content type "${f}" not supported.`),u=Promise.resolve(null);break}return u.then(m=>{if(e._loadIndex!==c)return;m.updateMatrix(),(f==="glb"||f==="gltf")&&m.matrix.multiply(nu),m.matrix.premultiply(d),m.matrix.decompose(m.position,m.quaternion,m.scale),m.traverse(b=>{b[LDe]=b.frustumCulled}),NDe(m,!this.autoDisableRendererCulling),p.scene=m,m.traverse(b=>{b.raycast=this._overridenRaycast});let g=[],y=[],E=[];m.traverse(b=>{if(b.geometry&&y.push(b.geometry),b.material){let x=b.material;g.push(b.material);for(let S in x){let D=x[S];D&&D.isTexture&&E.push(D)}}}),p.materials=g,p.geometry=y,p.textures=E,this.onLoadModel&&this.onLoadModel(m,e)})}disposeTile(r){let e=r.cached;if(e.scene){let i=e.materials,n=e.geometry,s=e.textures,a=e.scene.parent;for(let o=0,l=n.length;o=s+1e3&&(o.update(a*1e3/(u-s),100),s=u,a=0,c)){var h=performance.memory;c.update(h.usedJSHeapSize/1048576,h.jsHeapSizeLimit/1048576)}return u},update:function(){n=this.end()},domElement:r,setMode:i}};US.Panel=function(t,r,e){var i=1/0,n=0,s=Math.round,a=s(window.devicePixelRatio||1),o=80*a,l=48*a,c=3*a,u=2*a,h=3*a,p=15*a,d=74*a,f=30*a,m=document.createElement("canvas");m.width=o,m.height=l,m.style.cssText="width:80px;height:48px";var g=m.getContext("2d");return g.font="bold "+9*a+"px Helvetica,Arial,sans-serif",g.textBaseline="top",g.fillStyle=e,g.fillRect(0,0,o,l),g.fillStyle=r,g.fillText(t,c,u),g.fillRect(h,p,d,f),g.fillStyle=e,g.globalAlpha=.9,g.fillRect(h,p,d,f),{dom:m,update:function(y,E){i=Math.min(i,y),n=Math.max(n,y),g.fillStyle=e,g.globalAlpha=1,g.fillRect(0,0,o,p),g.fillStyle=r,g.fillText(s(y)+" "+t+" ("+s(i)+"-"+s(n)+")",c,u),g.drawImage(m,h+a,p,d-a,f,h,p,d-a,f),g.fillRect(h+d-a,p,a,f),g.fillStyle=e,g.globalAlpha=.9,g.fillRect(h+d-a,p,a,s((1-y/E)*f))}}};var u3=US;var ss=class{constructor(){this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}},cNt=new Zi(-1,1,1,-1,0,1),IG=new it;IG.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3));IG.setAttribute("uv",new ct([0,2,0,0,2,0],2));var na=class{constructor(r){this._mesh=new Je(IG,r)}dispose(){this._mesh.geometry.dispose()}render(r){r.render(this._mesh,cNt)}get material(){return this._mesh.material}set material(r){this._mesh.material=r}};var SG={defines:{KERNEL_SIZE_FLOAT:"25.0",KERNEL_SIZE_INT:"25"},uniforms:{tDiffuse:{value:null},uImageIncrement:{value:new le(.001953125,0)},cKernel:{value:[]}},vertexShader:` - - uniform vec2 uImageIncrement; - - varying vec2 vUv; - - void main() { - - vUv = uv - ( ( KERNEL_SIZE_FLOAT - 1.0 ) / 2.0 ) * uImageIncrement; - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - - }`,fragmentShader:` - - uniform float cKernel[ KERNEL_SIZE_INT ]; - - uniform sampler2D tDiffuse; - uniform vec2 uImageIncrement; - - varying vec2 vUv; - - void main() { - - vec2 imageCoord = vUv; - vec4 sum = vec4( 0.0, 0.0, 0.0, 0.0 ); - - for( int i = 0; i < KERNEL_SIZE_INT; i ++ ) { - - sum += texture2D( tDiffuse, imageCoord ) * cKernel[ i ]; - imageCoord += uImageIncrement; - - } - - gl_FragColor = sum; - - }`,buildKernel:function(t){let e=2*Math.ceil(t*3)+1;e>25&&(e=25);let i=(e-1)*.5,n=new Array(e),s=0;for(let a=0;a0){r.getClearColor(this._oldClearColor),this.oldClearAlpha=r.getClearAlpha();let a=r.autoClear;r.autoClear=!1,s&&r.state.buffers.stencil.setTest(!1),r.setClearColor(16777215,1),this.changeVisibilityOfSelectedObjects(!1);let o=this.renderScene.background;if(this.renderScene.background=null,this.renderScene.overrideMaterial=this.depthMaterial,r.setRenderTarget(this.renderTargetDepthBuffer),r.clear(),r.render(this.renderScene,this.renderCamera),this.changeVisibilityOfSelectedObjects(!0),this._visibilityCache.clear(),this.updateTextureMatrix(),this.changeVisibilityOfNonSelectedObjects(!1),this.renderScene.overrideMaterial=this.prepareMaskMaterial,this.prepareMaskMaterial.uniforms.cameraNearFar.value.set(this.renderCamera.near,this.renderCamera.far),this.prepareMaskMaterial.uniforms.depthTexture.value=this.renderTargetDepthBuffer.texture,this.prepareMaskMaterial.uniforms.textureMatrix.value=this.textureMatrix,r.setRenderTarget(this.renderTargetMaskBuffer),r.clear(),r.render(this.renderScene,this.renderCamera),this.renderScene.overrideMaterial=null,this.changeVisibilityOfNonSelectedObjects(!0),this._visibilityCache.clear(),this.renderScene.background=o,this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetMaskBuffer.texture,r.setRenderTarget(this.renderTargetMaskDownSampleBuffer),r.clear(),this.fsQuad.render(r),this.tempPulseColor1.copy(this.visibleEdgeColor),this.tempPulseColor2.copy(this.hiddenEdgeColor),this.pulsePeriod>0){let l=.625+Math.cos(performance.now()*.01/this.pulsePeriod)*.75/2;this.tempPulseColor1.multiplyScalar(l),this.tempPulseColor2.multiplyScalar(l)}this.fsQuad.material=this.edgeDetectionMaterial,this.edgeDetectionMaterial.uniforms.maskTexture.value=this.renderTargetMaskDownSampleBuffer.texture,this.edgeDetectionMaterial.uniforms.texSize.value.set(this.renderTargetMaskDownSampleBuffer.width,this.renderTargetMaskDownSampleBuffer.height),this.edgeDetectionMaterial.uniforms.visibleEdgeColor.value=this.tempPulseColor1,this.edgeDetectionMaterial.uniforms.hiddenEdgeColor.value=this.tempPulseColor2,r.setRenderTarget(this.renderTargetEdgeBuffer1),r.clear(),this.fsQuad.render(r),this.fsQuad.material=this.separableBlurMaterial1,this.separableBlurMaterial1.uniforms.colorTexture.value=this.renderTargetEdgeBuffer1.texture,this.separableBlurMaterial1.uniforms.direction.value=au.BlurDirectionX,this.separableBlurMaterial1.uniforms.kernelRadius.value=this.edgeThickness,r.setRenderTarget(this.renderTargetBlurBuffer1),r.clear(),this.fsQuad.render(r),this.separableBlurMaterial1.uniforms.colorTexture.value=this.renderTargetBlurBuffer1.texture,this.separableBlurMaterial1.uniforms.direction.value=au.BlurDirectionY,r.setRenderTarget(this.renderTargetEdgeBuffer1),r.clear(),this.fsQuad.render(r),this.fsQuad.material=this.separableBlurMaterial2,this.separableBlurMaterial2.uniforms.colorTexture.value=this.renderTargetEdgeBuffer1.texture,this.separableBlurMaterial2.uniforms.direction.value=au.BlurDirectionX,r.setRenderTarget(this.renderTargetBlurBuffer2),r.clear(),this.fsQuad.render(r),this.separableBlurMaterial2.uniforms.colorTexture.value=this.renderTargetBlurBuffer2.texture,this.separableBlurMaterial2.uniforms.direction.value=au.BlurDirectionY,r.setRenderTarget(this.renderTargetEdgeBuffer2),r.clear(),this.fsQuad.render(r),this.fsQuad.material=this.overlayMaterial,this.overlayMaterial.uniforms.maskTexture.value=this.renderTargetMaskBuffer.texture,this.overlayMaterial.uniforms.edgeTexture1.value=this.renderTargetEdgeBuffer1.texture,this.overlayMaterial.uniforms.edgeTexture2.value=this.renderTargetEdgeBuffer2.texture,this.overlayMaterial.uniforms.patternTexture.value=this.patternTexture,this.overlayMaterial.uniforms.edgeStrength.value=this.edgeStrength,this.overlayMaterial.uniforms.edgeGlow.value=this.edgeGlow,this.overlayMaterial.uniforms.usePatternTexture.value=this.usePatternTexture,s&&r.state.buffers.stencil.setTest(!0),r.setRenderTarget(i),this.fsQuad.render(r),r.setClearColor(this._oldClearColor,this.oldClearAlpha),r.autoClear=a}this.renderToScreen&&(this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=i.texture,r.setRenderTarget(null),this.fsQuad.render(r))}getPrepareMaskMaterial(){return new Yt({uniforms:{depthTexture:{value:null},cameraNearFar:{value:new le(.5,.5)},textureMatrix:{value:null}},vertexShader:`#include - #include - - varying vec4 projTexCoord; - varying vec4 vPosition; - uniform mat4 textureMatrix; - - void main() { - - #include - #include - #include - #include - #include - - vPosition = mvPosition; - - vec4 worldPosition = vec4( transformed, 1.0 ); - - #ifdef USE_INSTANCING - - worldPosition = instanceMatrix * worldPosition; - - #endif - - worldPosition = modelMatrix * worldPosition; - - projTexCoord = textureMatrix * worldPosition; - - }`,fragmentShader:`#include - varying vec4 vPosition; - varying vec4 projTexCoord; - uniform sampler2D depthTexture; - uniform vec2 cameraNearFar; - - void main() { - - float depth = unpackRGBAToDepth(texture2DProj( depthTexture, projTexCoord )); - float viewZ = - DEPTH_TO_VIEW_Z( depth, cameraNearFar.x, cameraNearFar.y ); - float depthTest = (-vPosition.z > viewZ) ? 1.0 : 0.0; - gl_FragColor = vec4(0.0, depthTest, 1.0, 1.0); - - }`})}getEdgeDetectionMaterial(){return new Yt({uniforms:{maskTexture:{value:null},texSize:{value:new le(.5,.5)},visibleEdgeColor:{value:new A(1,1,1)},hiddenEdgeColor:{value:new A(1,1,1)}},vertexShader:`varying vec2 vUv; - - void main() { - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - }`,fragmentShader:`varying vec2 vUv; - - uniform sampler2D maskTexture; - uniform vec2 texSize; - uniform vec3 visibleEdgeColor; - uniform vec3 hiddenEdgeColor; - - void main() { - vec2 invSize = 1.0 / texSize; - vec4 uvOffset = vec4(1.0, 0.0, 0.0, 1.0) * vec4(invSize, invSize); - vec4 c1 = texture2D( maskTexture, vUv + uvOffset.xy); - vec4 c2 = texture2D( maskTexture, vUv - uvOffset.xy); - vec4 c3 = texture2D( maskTexture, vUv + uvOffset.yw); - vec4 c4 = texture2D( maskTexture, vUv - uvOffset.yw); - float diff1 = (c1.r - c2.r)*0.5; - float diff2 = (c3.r - c4.r)*0.5; - float d = length( vec2(diff1, diff2) ); - float a1 = min(c1.g, c2.g); - float a2 = min(c3.g, c4.g); - float visibilityFactor = min(a1, a2); - vec3 edgeColor = 1.0 - visibilityFactor > 0.001 ? visibleEdgeColor : hiddenEdgeColor; - gl_FragColor = vec4(edgeColor, 1.0) * vec4(d); - }`})}getSeperableBlurMaterial(r){return new Yt({defines:{MAX_RADIUS:r},uniforms:{colorTexture:{value:null},texSize:{value:new le(.5,.5)},direction:{value:new le(.5,.5)},kernelRadius:{value:1}},vertexShader:`varying vec2 vUv; - - void main() { - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - }`,fragmentShader:`#include - varying vec2 vUv; - uniform sampler2D colorTexture; - uniform vec2 texSize; - uniform vec2 direction; - uniform float kernelRadius; - - float gaussianPdf(in float x, in float sigma) { - return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma; - } - - void main() { - vec2 invSize = 1.0 / texSize; - float sigma = kernelRadius/2.0; - float weightSum = gaussianPdf(0.0, sigma); - vec4 diffuseSum = texture2D( colorTexture, vUv) * weightSum; - vec2 delta = direction * invSize * kernelRadius/float(MAX_RADIUS); - vec2 uvOffset = delta; - for( int i = 1; i <= MAX_RADIUS; i ++ ) { - float x = kernelRadius * float(i) / float(MAX_RADIUS); - float w = gaussianPdf(x, sigma); - vec4 sample1 = texture2D( colorTexture, vUv + uvOffset); - vec4 sample2 = texture2D( colorTexture, vUv - uvOffset); - diffuseSum += ((sample1 + sample2) * w); - weightSum += (2.0 * w); - uvOffset += delta; - } - gl_FragColor = diffuseSum/weightSum; - }`})}getOverlayMaterial(){return new Yt({uniforms:{maskTexture:{value:null},edgeTexture1:{value:null},edgeTexture2:{value:null},patternTexture:{value:null},edgeStrength:{value:1},edgeGlow:{value:1},usePatternTexture:{value:0}},vertexShader:`varying vec2 vUv; - - void main() { - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - }`,fragmentShader:`varying vec2 vUv; - - uniform sampler2D maskTexture; - uniform sampler2D edgeTexture1; - uniform sampler2D edgeTexture2; - uniform sampler2D patternTexture; - uniform float edgeStrength; - uniform float edgeGlow; - uniform bool usePatternTexture; - - void main() { - vec4 edgeValue1 = texture2D(edgeTexture1, vUv); - vec4 edgeValue2 = texture2D(edgeTexture2, vUv); - vec4 maskColor = texture2D(maskTexture, vUv); - vec4 patternColor = texture2D(patternTexture, 6.0 * vUv); - float visibilityFactor = 1.0 - maskColor.g > 0.0 ? 1.0 : 0.5; - vec4 edgeValue = edgeValue1 + edgeValue2 * edgeGlow; - vec4 finalColor = edgeStrength * maskColor.r * edgeValue; - if(usePatternTexture) - finalColor += + visibilityFactor * (1.0 - maskColor.r) * (1.0 - patternColor.r); - gl_FragColor = finalColor; - }`,blending:fp,depthTest:!1,depthWrite:!1,transparent:!0})}};au.BlurDirectionX=new le(1,0);au.BlurDirectionY=new le(0,1);var d3=class extends ss{constructor(r,e,i,n,s){super(),this.scene=r,this.camera=e,this.overrideMaterial=i,this.clearColor=n,this.clearAlpha=s!==void 0?s:0,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new Ve}render(r,e,i){let n=r.autoClear;r.autoClear=!1;let s,a;this.overrideMaterial!==void 0&&(a=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(r.getClearColor(this._oldClearColor),s=r.getClearAlpha(),r.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&r.clearDepth(),r.setRenderTarget(this.renderToScreen?null:i),this.clear&&r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil),r.render(this.scene,this.camera),this.clearColor&&r.setClearColor(this._oldClearColor,s),this.overrideMaterial!==void 0&&(this.scene.overrideMaterial=a),r.autoClear=n}};var kS={defines:{NUM_SAMPLES:7,NUM_RINGS:4,NORMAL_TEXTURE:0,DIFFUSE_TEXTURE:0,DEPTH_PACKING:1,PERSPECTIVE_CAMERA:1},uniforms:{tDepth:{value:null},tDiffuse:{value:null},tNormal:{value:null},size:{value:new le(512,512)},cameraNear:{value:1},cameraFar:{value:100},cameraProjectionMatrix:{value:new Ue},cameraInverseProjectionMatrix:{value:new Ue},scale:{value:1},intensity:{value:.1},bias:{value:.5},minResolution:{value:0},kernelRadius:{value:100},randomSeed:{value:0}},vertexShader:` - - varying vec2 vUv; - - void main() { - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - }`,fragmentShader:` - - #include - - varying vec2 vUv; - - #if DIFFUSE_TEXTURE == 1 - uniform sampler2D tDiffuse; - #endif - - uniform sampler2D tDepth; - - #if NORMAL_TEXTURE == 1 - uniform sampler2D tNormal; - #endif - - uniform float cameraNear; - uniform float cameraFar; - uniform mat4 cameraProjectionMatrix; - uniform mat4 cameraInverseProjectionMatrix; - - uniform float scale; - uniform float intensity; - uniform float bias; - uniform float kernelRadius; - uniform float minResolution; - uniform vec2 size; - uniform float randomSeed; - - // RGBA depth - - #include - - vec4 getDefaultColor( const in vec2 screenPosition ) { - #if DIFFUSE_TEXTURE == 1 - return texture2D( tDiffuse, vUv ); - #else - return vec4( 1.0 ); - #endif - } - - float getDepth( const in vec2 screenPosition ) { - #if DEPTH_PACKING == 1 - return unpackRGBAToDepth( texture2D( tDepth, screenPosition ) ); - #else - return texture2D( tDepth, screenPosition ).x; - #endif - } - - float getViewZ( const in float depth ) { - #if PERSPECTIVE_CAMERA == 1 - return perspectiveDepthToViewZ( depth, cameraNear, cameraFar ); - #else - return orthographicDepthToViewZ( depth, cameraNear, cameraFar ); - #endif - } - - vec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) { - float clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3]; - vec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 ); - clipPosition *= clipW; // unprojection. - - return ( cameraInverseProjectionMatrix * clipPosition ).xyz; - } - - vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPosition ) { - #if NORMAL_TEXTURE == 1 - return unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz ); - #else - return normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) ); - #endif - } - - float scaleDividedByCameraFar; - float minResolutionMultipliedByCameraFar; - - float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) { - vec3 viewDelta = sampleViewPosition - centerViewPosition; - float viewDistance = length( viewDelta ); - float scaledScreenDistance = scaleDividedByCameraFar * viewDistance; - - return max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - bias) / (1.0 + pow2( scaledScreenDistance ) ); - } - - // moving costly divides into consts - const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES ); - const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES ); - - float getAmbientOcclusion( const in vec3 centerViewPosition ) { - // precompute some variables require in getOcclusion. - scaleDividedByCameraFar = scale / cameraFar; - minResolutionMultipliedByCameraFar = minResolution * cameraFar; - vec3 centerViewNormal = getViewNormal( centerViewPosition, vUv ); - - // jsfiddle that shows sample pattern: https://jsfiddle.net/a16ff1p7/ - float angle = rand( vUv + randomSeed ) * PI2; - vec2 radius = vec2( kernelRadius * INV_NUM_SAMPLES ) / size; - vec2 radiusStep = radius; - - float occlusionSum = 0.0; - float weightSum = 0.0; - - for( int i = 0; i < NUM_SAMPLES; i ++ ) { - vec2 sampleUv = vUv + vec2( cos( angle ), sin( angle ) ) * radius; - radius += radiusStep; - angle += ANGLE_STEP; - - float sampleDepth = getDepth( sampleUv ); - if( sampleDepth >= ( 1.0 - EPSILON ) ) { - continue; - } - - float sampleViewZ = getViewZ( sampleDepth ); - vec3 sampleViewPosition = getViewPosition( sampleUv, sampleDepth, sampleViewZ ); - occlusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition ); - weightSum += 1.0; - } - - if( weightSum == 0.0 ) discard; - - return occlusionSum * ( intensity / weightSum ); - } - - void main() { - float centerDepth = getDepth( vUv ); - if( centerDepth >= ( 1.0 - EPSILON ) ) { - discard; - } - - float centerViewZ = getViewZ( centerDepth ); - vec3 viewPosition = getViewPosition( vUv, centerDepth, centerViewZ ); - - float ambientOcclusion = getAmbientOcclusion( viewPosition ); - - gl_FragColor = getDefaultColor( vUv ); - gl_FragColor.xyz *= 1.0 - ambientOcclusion; - }`};var hd={defines:{KERNEL_RADIUS:4,DEPTH_PACKING:1,PERSPECTIVE_CAMERA:1},uniforms:{tDiffuse:{value:null},size:{value:new le(512,512)},sampleUvOffsets:{value:[new le(0,0)]},sampleWeights:{value:[1]},tDepth:{value:null},cameraNear:{value:10},cameraFar:{value:1e3},depthCutoff:{value:10}},vertexShader:` - - #include - - uniform vec2 size; - - varying vec2 vUv; - varying vec2 vInvSize; - - void main() { - vUv = uv; - vInvSize = 1.0 / size; - - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - }`,fragmentShader:` - - #include - #include - - uniform sampler2D tDiffuse; - uniform sampler2D tDepth; - - uniform float cameraNear; - uniform float cameraFar; - uniform float depthCutoff; - - uniform vec2 sampleUvOffsets[ KERNEL_RADIUS + 1 ]; - uniform float sampleWeights[ KERNEL_RADIUS + 1 ]; - - varying vec2 vUv; - varying vec2 vInvSize; - - float getDepth( const in vec2 screenPosition ) { - #if DEPTH_PACKING == 1 - return unpackRGBAToDepth( texture2D( tDepth, screenPosition ) ); - #else - return texture2D( tDepth, screenPosition ).x; - #endif - } - - float getViewZ( const in float depth ) { - #if PERSPECTIVE_CAMERA == 1 - return perspectiveDepthToViewZ( depth, cameraNear, cameraFar ); - #else - return orthographicDepthToViewZ( depth, cameraNear, cameraFar ); - #endif - } - - void main() { - float depth = getDepth( vUv ); - if( depth >= ( 1.0 - EPSILON ) ) { - discard; - } - - float centerViewZ = -getViewZ( depth ); - bool rBreak = false, lBreak = false; - - float weightSum = sampleWeights[0]; - vec4 diffuseSum = texture2D( tDiffuse, vUv ) * weightSum; - - for( int i = 1; i <= KERNEL_RADIUS; i ++ ) { - - float sampleWeight = sampleWeights[i]; - vec2 sampleUvOffset = sampleUvOffsets[i] * vInvSize; - - vec2 sampleUv = vUv + sampleUvOffset; - float viewZ = -getViewZ( getDepth( sampleUv ) ); - - if( abs( viewZ - centerViewZ ) > depthCutoff ) rBreak = true; - - if( ! rBreak ) { - diffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight; - weightSum += sampleWeight; - } - - sampleUv = vUv - sampleUvOffset; - viewZ = -getViewZ( getDepth( sampleUv ) ); - - if( abs( viewZ - centerViewZ ) > depthCutoff ) lBreak = true; - - if( ! lBreak ) { - diffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight; - weightSum += sampleWeight; - } - - } - - gl_FragColor = diffuseSum / weightSum; - }`},GS={createSampleWeights:function(t,r){let e=[];for(let i=0;i<=t;i++)e.push(hNt(i,r));return e},createSampleOffsets:function(t,r){let e=[];for(let i=0;i<=t;i++)e.push(r.clone().multiplyScalar(i));return e},configure:function(t,r,e,i){t.defines.KERNEL_RADIUS=r,t.uniforms.sampleUvOffsets.value=GS.createSampleOffsets(r,i),t.uniforms.sampleWeights.value=GS.createSampleWeights(r,e),t.needsUpdate=!0}};function hNt(t,r){return Math.exp(-(t*t)/(2*(r*r)))/(Math.sqrt(2*Math.PI)*r)}var f3={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:` - - varying vec2 vUv; - - void main() { - - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - - }`,fragmentShader:` - - uniform float opacity; - - uniform sampler2D tDiffuse; - - varying vec2 vUv; - - #include - - void main() { - - float depth = 1.0 - unpackRGBAToDepth( texture2D( tDiffuse, vUv ) ); - gl_FragColor = vec4( vec3( depth ), opacity ); - - }`};var VS=class extends ss{constructor(r,e,i=!1,n=!1,s=new le(256,256)){super(),this.scene=r,this.camera=e,this.clear=!0,this.needsSwap=!1,this.supportsDepthTextureExtension=i,this.supportsNormalTexture=n,this.originalClearColor=new Ve,this._oldClearColor=new Ve,this.oldClearAlpha=1,this.params={output:0,saoBias:.5,saoIntensity:.18,saoScale:1,saoKernelRadius:100,saoMinResolution:0,saoBlur:!0,saoBlurRadius:8,saoBlurStdDev:4,saoBlurDepthCutoff:.01},this.resolution=new le(s.x,s.y),this.saoRenderTarget=new kr(this.resolution.x,this.resolution.y),this.blurIntermediateRenderTarget=this.saoRenderTarget.clone(),this.beautyRenderTarget=this.saoRenderTarget.clone(),this.normalRenderTarget=new kr(this.resolution.x,this.resolution.y,{minFilter:Di,magFilter:Di}),this.depthRenderTarget=this.normalRenderTarget.clone();let a;this.supportsDepthTextureExtension&&(a=new lf,a.type=_x,this.beautyRenderTarget.depthTexture=a,this.beautyRenderTarget.depthBuffer=!0),this.depthMaterial=new Tp,this.depthMaterial.depthPacking=Gy,this.depthMaterial.blending=Fi,this.normalMaterial=new hf,this.normalMaterial.blending=Fi,this.saoMaterial=new Yt({defines:Object.assign({},kS.defines),fragmentShader:kS.fragmentShader,vertexShader:kS.vertexShader,uniforms:hn.clone(kS.uniforms)}),this.saoMaterial.extensions.derivatives=!0,this.saoMaterial.defines.DEPTH_PACKING=this.supportsDepthTextureExtension?0:1,this.saoMaterial.defines.NORMAL_TEXTURE=this.supportsNormalTexture?1:0,this.saoMaterial.defines.PERSPECTIVE_CAMERA=this.camera.isPerspectiveCamera?1:0,this.saoMaterial.uniforms.tDepth.value=this.supportsDepthTextureExtension?a:this.depthRenderTarget.texture,this.saoMaterial.uniforms.tNormal.value=this.normalRenderTarget.texture,this.saoMaterial.uniforms.size.value.set(this.resolution.x,this.resolution.y),this.saoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.saoMaterial.uniforms.cameraProjectionMatrix.value=this.camera.projectionMatrix,this.saoMaterial.blending=Fi,this.vBlurMaterial=new Yt({uniforms:hn.clone(hd.uniforms),defines:Object.assign({},hd.defines),vertexShader:hd.vertexShader,fragmentShader:hd.fragmentShader}),this.vBlurMaterial.defines.DEPTH_PACKING=this.supportsDepthTextureExtension?0:1,this.vBlurMaterial.defines.PERSPECTIVE_CAMERA=this.camera.isPerspectiveCamera?1:0,this.vBlurMaterial.uniforms.tDiffuse.value=this.saoRenderTarget.texture,this.vBlurMaterial.uniforms.tDepth.value=this.supportsDepthTextureExtension?a:this.depthRenderTarget.texture,this.vBlurMaterial.uniforms.size.value.set(this.resolution.x,this.resolution.y),this.vBlurMaterial.blending=Fi,this.hBlurMaterial=new Yt({uniforms:hn.clone(hd.uniforms),defines:Object.assign({},hd.defines),vertexShader:hd.vertexShader,fragmentShader:hd.fragmentShader}),this.hBlurMaterial.defines.DEPTH_PACKING=this.supportsDepthTextureExtension?0:1,this.hBlurMaterial.defines.PERSPECTIVE_CAMERA=this.camera.isPerspectiveCamera?1:0,this.hBlurMaterial.uniforms.tDiffuse.value=this.blurIntermediateRenderTarget.texture,this.hBlurMaterial.uniforms.tDepth.value=this.supportsDepthTextureExtension?a:this.depthRenderTarget.texture,this.hBlurMaterial.uniforms.size.value.set(this.resolution.x,this.resolution.y),this.hBlurMaterial.blending=Fi,this.materialCopy=new Yt({uniforms:hn.clone(sa.uniforms),vertexShader:sa.vertexShader,fragmentShader:sa.fragmentShader,blending:Fi}),this.materialCopy.transparent=!0,this.materialCopy.depthTest=!1,this.materialCopy.depthWrite=!1,this.materialCopy.blending=Op,this.materialCopy.blendSrc=Uy,this.materialCopy.blendDst=ff,this.materialCopy.blendEquation=Sa,this.materialCopy.blendSrcAlpha=Hy,this.materialCopy.blendDstAlpha=ff,this.materialCopy.blendEquationAlpha=Sa,this.depthCopy=new Yt({uniforms:hn.clone(f3.uniforms),vertexShader:f3.vertexShader,fragmentShader:f3.fragmentShader,blending:Fi}),this.fsQuad=new na(null)}render(r,e,i){if(this.renderToScreen&&(this.materialCopy.blending=Fi,this.materialCopy.uniforms.tDiffuse.value=i.texture,this.materialCopy.needsUpdate=!0,this.renderPass(r,this.materialCopy,null)),this.params.output===1)return;r.getClearColor(this._oldClearColor),this.oldClearAlpha=r.getClearAlpha();let n=r.autoClear;r.autoClear=!1,r.setRenderTarget(this.depthRenderTarget),r.clear(),this.saoMaterial.uniforms.bias.value=this.params.saoBias,this.saoMaterial.uniforms.intensity.value=this.params.saoIntensity,this.saoMaterial.uniforms.scale.value=this.params.saoScale,this.saoMaterial.uniforms.kernelRadius.value=this.params.saoKernelRadius,this.saoMaterial.uniforms.minResolution.value=this.params.saoMinResolution,this.saoMaterial.uniforms.cameraNear.value=this.camera.near,this.saoMaterial.uniforms.cameraFar.value=this.camera.far;let s=this.params.saoBlurDepthCutoff*(this.camera.far-this.camera.near);this.vBlurMaterial.uniforms.depthCutoff.value=s,this.hBlurMaterial.uniforms.depthCutoff.value=s,this.vBlurMaterial.uniforms.cameraNear.value=this.camera.near,this.vBlurMaterial.uniforms.cameraFar.value=this.camera.far,this.hBlurMaterial.uniforms.cameraNear.value=this.camera.near,this.hBlurMaterial.uniforms.cameraFar.value=this.camera.far,this.params.saoBlurRadius=Math.floor(this.params.saoBlurRadius),(this.prevStdDev!==this.params.saoBlurStdDev||this.prevNumSamples!==this.params.saoBlurRadius)&&(GS.configure(this.vBlurMaterial,this.params.saoBlurRadius,this.params.saoBlurStdDev,new le(0,1)),GS.configure(this.hBlurMaterial,this.params.saoBlurRadius,this.params.saoBlurStdDev,new le(1,0)),this.prevStdDev=this.params.saoBlurStdDev,this.prevNumSamples=this.params.saoBlurRadius),r.setClearColor(0),r.setRenderTarget(this.beautyRenderTarget),r.clear(),r.render(this.scene,this.camera),this.supportsDepthTextureExtension||this.renderOverride(r,this.depthMaterial,this.depthRenderTarget,0,1),this.supportsNormalTexture&&this.renderOverride(r,this.normalMaterial,this.normalRenderTarget,7829503,1),this.renderPass(r,this.saoMaterial,this.saoRenderTarget,16777215,1),this.params.saoBlur&&(this.renderPass(r,this.vBlurMaterial,this.blurIntermediateRenderTarget,16777215,1),this.renderPass(r,this.hBlurMaterial,this.saoRenderTarget,16777215,1));let a=this.materialCopy;this.params.output===3?this.supportsDepthTextureExtension?(this.materialCopy.uniforms.tDiffuse.value=this.beautyRenderTarget.depthTexture,this.materialCopy.needsUpdate=!0):(this.depthCopy.uniforms.tDiffuse.value=this.depthRenderTarget.texture,this.depthCopy.needsUpdate=!0,a=this.depthCopy):this.params.output===4?(this.materialCopy.uniforms.tDiffuse.value=this.normalRenderTarget.texture,this.materialCopy.needsUpdate=!0):(this.materialCopy.uniforms.tDiffuse.value=this.saoRenderTarget.texture,this.materialCopy.needsUpdate=!0),this.params.output===0?a.blending=Op:a.blending=Fi,this.renderPass(r,a,this.renderToScreen?null:i),r.setClearColor(this._oldClearColor,this.oldClearAlpha),r.autoClear=n}renderPass(r,e,i,n,s){r.getClearColor(this.originalClearColor);let a=r.getClearAlpha(),o=r.autoClear;r.setRenderTarget(i),r.autoClear=!1,n!=null&&(r.setClearColor(n),r.setClearAlpha(s||0),r.clear()),this.fsQuad.material=e,this.fsQuad.render(r),r.autoClear=o,r.setClearColor(this.originalClearColor),r.setClearAlpha(a)}renderOverride(r,e,i,n,s){r.getClearColor(this.originalClearColor);let a=r.getClearAlpha(),o=r.autoClear;r.setRenderTarget(i),r.autoClear=!1,n=e.clearColor||n,s=e.clearAlpha||s,n!=null&&(r.setClearColor(n),r.setClearAlpha(s||0),r.clear()),this.scene.overrideMaterial=e,r.render(this.scene,this.camera),this.scene.overrideMaterial=null,r.autoClear=o,r.setClearColor(this.originalClearColor),r.setClearAlpha(a)}setSize(r,e){this.beautyRenderTarget.setSize(r,e),this.saoRenderTarget.setSize(r,e),this.blurIntermediateRenderTarget.setSize(r,e),this.normalRenderTarget.setSize(r,e),this.depthRenderTarget.setSize(r,e),this.saoMaterial.uniforms.size.value.set(r,e),this.saoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.saoMaterial.uniforms.cameraProjectionMatrix.value=this.camera.projectionMatrix,this.saoMaterial.needsUpdate=!0,this.vBlurMaterial.uniforms.size.value.set(r,e),this.vBlurMaterial.needsUpdate=!0,this.hBlurMaterial.uniforms.size.value.set(r,e),this.hBlurMaterial.needsUpdate=!0}dispose(){this.saoRenderTarget.dispose(),this.blurIntermediateRenderTarget.dispose(),this.beautyRenderTarget.dispose(),this.normalRenderTarget.dispose(),this.depthRenderTarget.dispose(),this.depthMaterial.dispose(),this.normalMaterial.dispose(),this.saoMaterial.dispose(),this.vBlurMaterial.dispose(),this.hBlurMaterial.dispose(),this.materialCopy.dispose(),this.depthCopy.dispose(),this.fsQuad.dispose()}};VS.OUTPUT={Beauty:1,Default:0,SAO:2,Depth:3,Normal:4};var m3=class extends ss{constructor(r,e,i,n){super(),this.scene=r,this.camera=e,this.sampleLevel=4,this.unbiased=!0,this.clearColor=i!==void 0?i:0,this.clearAlpha=n!==void 0?n:0,this._oldClearColor=new Ve;let s=sa;this.copyUniforms=hn.clone(s.uniforms),this.copyMaterial=new Yt({uniforms:this.copyUniforms,vertexShader:s.vertexShader,fragmentShader:s.fragmentShader,transparent:!0,depthTest:!1,depthWrite:!1,blending:Op,blendEquation:Sa,blendDst:Fy,blendDstAlpha:Fy,blendSrc:Ix,blendSrcAlpha:Fy}),this.fsQuad=new na(this.copyMaterial)}dispose(){this.sampleRenderTarget&&(this.sampleRenderTarget.dispose(),this.sampleRenderTarget=null),this.copyMaterial.dispose(),this.fsQuad.dispose()}setSize(r,e){this.sampleRenderTarget&&this.sampleRenderTarget.setSize(r,e)}render(r,e,i){this.sampleRenderTarget||(this.sampleRenderTarget=new kr(i.width,i.height),this.sampleRenderTarget.texture.name="SSAARenderPass.sample");let n=pNt[Math.max(0,Math.min(this.sampleLevel,5))],s=r.autoClear;r.autoClear=!1,r.getClearColor(this._oldClearColor);let a=r.getClearAlpha(),o=1/n.length,l=1/32;this.copyUniforms.tDiffuse.value=this.sampleRenderTarget.texture;let c={fullWidth:i.width,fullHeight:i.height,offsetX:0,offsetY:0,width:i.width,height:i.height},u=Object.assign({},this.camera.view);u.enabled&&Object.assign(c,u);for(let h=0;hm?(g=1,y=0):(g=0,y=1);let E=f-g+u,b=m-y+u,x=f-1+2*u,S=m-1+2*u,D=l&255,P=c&255,_=this.perm[D+this.perm[P]]%12,w=this.perm[D+g+this.perm[P+y]]%12,F=this.perm[D+1+this.perm[P+1]]%12,X=.5-f*f-m*m;X<0?i=0:(X*=X,i=X*X*this.dot(this.grad3[_],f,m));let H=.5-E*E-b*b;H<0?n=0:(H*=H,n=H*H*this.dot(this.grad3[w],E,b));let he=.5-x*x-S*S;return he<0?s=0:(he*=he,s=he*he*this.dot(this.grad3[F],x,S)),70*(i+n+s)}noise3d(r,e,i){let n,s,a,o,l=.3333333333333333,c=(r+e+i)*l,u=Math.floor(r+c),h=Math.floor(e+c),p=Math.floor(i+c),d=1/6,f=(u+h+p)*d,m=u-f,g=h-f,y=p-f,E=r-m,b=e-g,x=i-y,S,D,P,_,w,F;E>=b?b>=x?(S=1,D=0,P=0,_=1,w=1,F=0):E>=x?(S=1,D=0,P=0,_=1,w=0,F=1):(S=0,D=0,P=1,_=1,w=0,F=1):bF?32:0,C=w>X?16:0,N=F>X?8:0,k=w>H?4:0,G=F>H?2:0,U=X>H?1:0,j=he+C+N+k+G+U,ee=a[j][0]>=3?1:0,ae=a[j][1]>=3?1:0,se=a[j][2]>=3?1:0,ue=a[j][3]>=3?1:0,ve=a[j][0]>=2?1:0,be=a[j][1]>=2?1:0,de=a[j][2]>=2?1:0,we=a[j][3]>=2?1:0,Fe=a[j][0]>=1?1:0,je=a[j][1]>=1?1:0,Oe=a[j][2]>=1?1:0,dt=a[j][3]>=1?1:0,Be=w-ee+c,ke=F-ae+c,nt=X-se+c,bt=H-ue+c,mt=w-ve+2*c,_e=F-be+2*c,J=X-de+2*c,$=H-we+2*c,re=w-Fe+3*c,me=F-je+3*c,z=X-Oe+3*c,Y=H-dt+3*c,xe=w-1+4*c,Ce=F-1+4*c,Ge=X-1+4*c,Ze=H-1+4*c,gt=g&255,ye=y&255,Re=E&255,ut=b&255,vt=o[gt+o[ye+o[Re+o[ut]]]]%32,Et=o[gt+ee+o[ye+ae+o[Re+se+o[ut+ue]]]]%32,Ct=o[gt+ve+o[ye+be+o[Re+de+o[ut+we]]]]%32,Dt=o[gt+Fe+o[ye+je+o[Re+Oe+o[ut+dt]]]]%32,cr=o[gt+1+o[ye+1+o[Re+1+o[ut+1]]]]%32,Xt=.6-w*w-F*F-X*X-H*H;Xt<0?u=0:(Xt*=Xt,u=Xt*Xt*this.dot4(s[vt],w,F,X,H));let gr=.6-Be*Be-ke*ke-nt*nt-bt*bt;gr<0?h=0:(gr*=gr,h=gr*gr*this.dot4(s[Et],Be,ke,nt,bt));let Ae=.6-mt*mt-_e*_e-J*J-$*$;Ae<0?p=0:(Ae*=Ae,p=Ae*Ae*this.dot4(s[Ct],mt,_e,J,$));let Xe=.6-re*re-me*me-z*z-Y*Y;Xe<0?d=0:(Xe*=Xe,d=Xe*Xe*this.dot4(s[Dt],re,me,z,Y));let lt=.6-xe*xe-Ce*Ce-Ge*Ge-Ze*Ze;return lt<0?f=0:(lt*=lt,f=lt*lt*this.dot4(s[cr],xe,Ce,Ge,Ze)),27*(u+h+p+d+f)}};var zS={defines:{PERSPECTIVE_CAMERA:1,KERNEL_SIZE:32},uniforms:{tDiffuse:{value:null},tNormal:{value:null},tDepth:{value:null},tNoise:{value:null},kernel:{value:null},cameraNear:{value:null},cameraFar:{value:null},resolution:{value:new le},cameraProjectionMatrix:{value:new Ue},cameraInverseProjectionMatrix:{value:new Ue},kernelRadius:{value:8},minDistance:{value:.005},maxDistance:{value:.05}},vertexShader:` - - varying vec2 vUv; - - void main() { - - vUv = uv; - - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - - }`,fragmentShader:` - - uniform sampler2D tDiffuse; - uniform sampler2D tNormal; - uniform sampler2D tDepth; - uniform sampler2D tNoise; - - uniform vec3 kernel[ KERNEL_SIZE ]; - - uniform vec2 resolution; - - uniform float cameraNear; - uniform float cameraFar; - uniform mat4 cameraProjectionMatrix; - uniform mat4 cameraInverseProjectionMatrix; - - uniform float kernelRadius; - uniform float minDistance; // avoid artifacts caused by neighbour fragments with minimal depth difference - uniform float maxDistance; // avoid the influence of fragments which are too far away - - varying vec2 vUv; - - #include - - float getDepth( const in vec2 screenPosition ) { - - return texture2D( tDepth, screenPosition ).x; - - } - - float getLinearDepth( const in vec2 screenPosition ) { - - #if PERSPECTIVE_CAMERA == 1 - - float fragCoordZ = texture2D( tDepth, screenPosition ).x; - float viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar ); - return viewZToOrthographicDepth( viewZ, cameraNear, cameraFar ); - - #else - - return texture2D( tDepth, screenPosition ).x; - - #endif - - } - - float getViewZ( const in float depth ) { - - #if PERSPECTIVE_CAMERA == 1 - - return perspectiveDepthToViewZ( depth, cameraNear, cameraFar ); - - #else - - return orthographicDepthToViewZ( depth, cameraNear, cameraFar ); - - #endif - - } - - vec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) { - - float clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3]; - - vec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 ); - - clipPosition *= clipW; // unprojection. - - return ( cameraInverseProjectionMatrix * clipPosition ).xyz; - - } - - vec3 getViewNormal( const in vec2 screenPosition ) { - - return unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz ); - - } - - void main() { - - float depth = getDepth( vUv ); - float viewZ = getViewZ( depth ); - - vec3 viewPosition = getViewPosition( vUv, depth, viewZ ); - vec3 viewNormal = getViewNormal( vUv ); - - vec2 noiseScale = vec2( resolution.x / 4.0, resolution.y / 4.0 ); - vec3 random = vec3( texture2D( tNoise, vUv * noiseScale ).r ); - - // compute matrix used to reorient a kernel vector - - vec3 tangent = normalize( random - viewNormal * dot( random, viewNormal ) ); - vec3 bitangent = cross( viewNormal, tangent ); - mat3 kernelMatrix = mat3( tangent, bitangent, viewNormal ); - - float occlusion = 0.0; - - for ( int i = 0; i < KERNEL_SIZE; i ++ ) { - - vec3 sampleVector = kernelMatrix * kernel[ i ]; // reorient sample vector in view space - vec3 samplePoint = viewPosition + ( sampleVector * kernelRadius ); // calculate sample point - - vec4 samplePointNDC = cameraProjectionMatrix * vec4( samplePoint, 1.0 ); // project point and calculate NDC - samplePointNDC /= samplePointNDC.w; - - vec2 samplePointUv = samplePointNDC.xy * 0.5 + 0.5; // compute uv coordinates - - float realDepth = getLinearDepth( samplePointUv ); // get linear depth from depth texture - float sampleDepth = viewZToOrthographicDepth( samplePoint.z, cameraNear, cameraFar ); // compute linear depth of the sample view Z value - float delta = sampleDepth - realDepth; - - if ( delta > minDistance && delta < maxDistance ) { // if fragment is before sample point, increase occlusion - - occlusion += 1.0; - - } - - } - - occlusion = clamp( occlusion / float( KERNEL_SIZE ), 0.0, 1.0 ); - - gl_FragColor = vec4( vec3( 1.0 - occlusion ), 1.0 ); - - }`},jS={defines:{PERSPECTIVE_CAMERA:1},uniforms:{tDepth:{value:null},cameraNear:{value:null},cameraFar:{value:null}},vertexShader:`varying vec2 vUv; - - void main() { - - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - - }`,fragmentShader:`uniform sampler2D tDepth; - - uniform float cameraNear; - uniform float cameraFar; - - varying vec2 vUv; - - #include - - float getLinearDepth( const in vec2 screenPosition ) { - - #if PERSPECTIVE_CAMERA == 1 - - float fragCoordZ = texture2D( tDepth, screenPosition ).x; - float viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar ); - return viewZToOrthographicDepth( viewZ, cameraNear, cameraFar ); - - #else - - return texture2D( tDepth, screenPosition ).x; - - #endif - - } - - void main() { - - float depth = getLinearDepth( vUv ); - gl_FragColor = vec4( vec3( 1.0 - depth ), 1.0 ); - - }`},WS={uniforms:{tDiffuse:{value:null},resolution:{value:new le}},vertexShader:`varying vec2 vUv; - - void main() { - - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - - }`,fragmentShader:`uniform sampler2D tDiffuse; - - uniform vec2 resolution; - - varying vec2 vUv; - - void main() { - - vec2 texelSize = ( 1.0 / resolution ); - float result = 0.0; - - for ( int i = - 2; i <= 2; i ++ ) { - - for ( int j = - 2; j <= 2; j ++ ) { - - vec2 offset = ( vec2( float( i ), float( j ) ) ) * texelSize; - result += texture2D( tDiffuse, vUv + offset ).r; - - } - - } - - gl_FragColor = vec4( vec3( result / ( 5.0 * 5.0 ) ), 1.0 ); - - }`};var rc=class extends ss{constructor(r,e,i,n){super(),this.width=i!==void 0?i:512,this.height=n!==void 0?n:512,this.clear=!0,this.camera=e,this.scene=r,this.kernelRadius=8,this.kernelSize=32,this.kernel=[],this.noiseTexture=null,this.output=0,this.minDistance=.005,this.maxDistance=.1,this._visibilityCache=new Map,this.generateSampleKernel(),this.generateRandomKernelRotations();let s=new lf;s.format=gp,s.type=dp,this.beautyRenderTarget=new kr(this.width,this.height),this.normalRenderTarget=new kr(this.width,this.height,{minFilter:Di,magFilter:Di,depthTexture:s}),this.ssaoRenderTarget=new kr(this.width,this.height),this.blurRenderTarget=this.ssaoRenderTarget.clone(),this.ssaoMaterial=new Yt({defines:Object.assign({},zS.defines),uniforms:hn.clone(zS.uniforms),vertexShader:zS.vertexShader,fragmentShader:zS.fragmentShader,blending:Fi}),this.ssaoMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.ssaoMaterial.uniforms.tNormal.value=this.normalRenderTarget.texture,this.ssaoMaterial.uniforms.tDepth.value=this.normalRenderTarget.depthTexture,this.ssaoMaterial.uniforms.tNoise.value=this.noiseTexture,this.ssaoMaterial.uniforms.kernel.value=this.kernel,this.ssaoMaterial.uniforms.cameraNear.value=this.camera.near,this.ssaoMaterial.uniforms.cameraFar.value=this.camera.far,this.ssaoMaterial.uniforms.resolution.value.set(this.width,this.height),this.ssaoMaterial.uniforms.cameraProjectionMatrix.value.copy(this.camera.projectionMatrix),this.ssaoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.normalMaterial=new hf,this.normalMaterial.blending=Fi,this.blurMaterial=new Yt({defines:Object.assign({},WS.defines),uniforms:hn.clone(WS.uniforms),vertexShader:WS.vertexShader,fragmentShader:WS.fragmentShader}),this.blurMaterial.uniforms.tDiffuse.value=this.ssaoRenderTarget.texture,this.blurMaterial.uniforms.resolution.value.set(this.width,this.height),this.depthRenderMaterial=new Yt({defines:Object.assign({},jS.defines),uniforms:hn.clone(jS.uniforms),vertexShader:jS.vertexShader,fragmentShader:jS.fragmentShader,blending:Fi}),this.depthRenderMaterial.uniforms.tDepth.value=this.normalRenderTarget.depthTexture,this.depthRenderMaterial.uniforms.cameraNear.value=this.camera.near,this.depthRenderMaterial.uniforms.cameraFar.value=this.camera.far,this.copyMaterial=new Yt({uniforms:hn.clone(sa.uniforms),vertexShader:sa.vertexShader,fragmentShader:sa.fragmentShader,transparent:!0,depthTest:!1,depthWrite:!1,blendSrc:Uy,blendDst:ff,blendEquation:Sa,blendSrcAlpha:Hy,blendDstAlpha:ff,blendEquationAlpha:Sa}),this.fsQuad=new na(null),this.originalClearColor=new Ve}dispose(){this.beautyRenderTarget.dispose(),this.normalRenderTarget.dispose(),this.ssaoRenderTarget.dispose(),this.blurRenderTarget.dispose(),this.normalMaterial.dispose(),this.blurMaterial.dispose(),this.copyMaterial.dispose(),this.depthRenderMaterial.dispose(),this.fsQuad.dispose()}render(r,e){switch(r.capabilities.isWebGL2===!1&&(this.noiseTexture.format=YD),r.setRenderTarget(this.beautyRenderTarget),r.clear(),r.render(this.scene,this.camera),this.overrideVisibility(),this.renderOverride(r,this.normalMaterial,this.normalRenderTarget,7829503,1),this.restoreVisibility(),this.ssaoMaterial.uniforms.kernelRadius.value=this.kernelRadius,this.ssaoMaterial.uniforms.minDistance.value=this.minDistance,this.ssaoMaterial.uniforms.maxDistance.value=this.maxDistance,this.renderPass(r,this.ssaoMaterial,this.ssaoRenderTarget),this.renderPass(r,this.blurMaterial,this.blurRenderTarget),this.output){case rc.OUTPUT.SSAO:this.copyMaterial.uniforms.tDiffuse.value=this.ssaoRenderTarget.texture,this.copyMaterial.blending=Fi,this.renderPass(r,this.copyMaterial,this.renderToScreen?null:e);break;case rc.OUTPUT.Blur:this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget.texture,this.copyMaterial.blending=Fi,this.renderPass(r,this.copyMaterial,this.renderToScreen?null:e);break;case rc.OUTPUT.Beauty:this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=Fi,this.renderPass(r,this.copyMaterial,this.renderToScreen?null:e);break;case rc.OUTPUT.Depth:this.renderPass(r,this.depthRenderMaterial,this.renderToScreen?null:e);break;case rc.OUTPUT.Normal:this.copyMaterial.uniforms.tDiffuse.value=this.normalRenderTarget.texture,this.copyMaterial.blending=Fi,this.renderPass(r,this.copyMaterial,this.renderToScreen?null:e);break;case rc.OUTPUT.Default:this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=Fi,this.renderPass(r,this.copyMaterial,this.renderToScreen?null:e),this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget.texture,this.copyMaterial.blending=Op,this.renderPass(r,this.copyMaterial,this.renderToScreen?null:e);break;default:console.warn("THREE.SSAOPass: Unknown output type.")}}renderPass(r,e,i,n,s){r.getClearColor(this.originalClearColor);let a=r.getClearAlpha(),o=r.autoClear;r.setRenderTarget(i),r.autoClear=!1,n!=null&&(r.setClearColor(n),r.setClearAlpha(s||0),r.clear()),this.fsQuad.material=e,this.fsQuad.render(r),r.autoClear=o,r.setClearColor(this.originalClearColor),r.setClearAlpha(a)}renderOverride(r,e,i,n,s){r.getClearColor(this.originalClearColor);let a=r.getClearAlpha(),o=r.autoClear;r.setRenderTarget(i),r.autoClear=!1,n=e.clearColor||n,s=e.clearAlpha||s,n!=null&&(r.setClearColor(n),r.setClearAlpha(s||0),r.clear()),this.scene.overrideMaterial=e,r.render(this.scene,this.camera),this.scene.overrideMaterial=null,r.autoClear=o,r.setClearColor(this.originalClearColor),r.setClearAlpha(a)}setSize(r,e){this.width=r,this.height=e,this.beautyRenderTarget.setSize(r,e),this.ssaoRenderTarget.setSize(r,e),this.normalRenderTarget.setSize(r,e),this.blurRenderTarget.setSize(r,e),this.ssaoMaterial.uniforms.resolution.value.set(r,e),this.ssaoMaterial.uniforms.cameraProjectionMatrix.value.copy(this.camera.projectionMatrix),this.ssaoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.blurMaterial.uniforms.resolution.value.set(r,e)}generateSampleKernel(){let r=this.kernelSize,e=this.kernel;for(let i=0;i - varying vec2 vUv; - uniform sampler2D colorTexture; - uniform vec2 texSize; - uniform vec2 direction; - - float gaussianPdf(in float x, in float sigma) { - return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma; - } - void main() { - vec2 invSize = 1.0 / texSize; - float fSigma = float(SIGMA); - float weightSum = gaussianPdf(0.0, fSigma); - vec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum; - for( int i = 1; i < KERNEL_RADIUS; i ++ ) { - float x = float(i); - float w = gaussianPdf(x, fSigma); - vec2 uvOffset = direction * invSize * x; - vec3 sample1 = texture2D( colorTexture, vUv + uvOffset).rgb; - vec3 sample2 = texture2D( colorTexture, vUv - uvOffset).rgb; - diffuseSum += (sample1 + sample2) * w; - weightSum += 2.0 * w; - } - gl_FragColor = vec4(diffuseSum/weightSum, 1.0); - }`})}getCompositeMaterial(r){return new Yt({defines:{NUM_MIPS:r},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:`varying vec2 vUv; - void main() { - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - }`,fragmentShader:`varying vec2 vUv; - uniform sampler2D blurTexture1; - uniform sampler2D blurTexture2; - uniform sampler2D blurTexture3; - uniform sampler2D blurTexture4; - uniform sampler2D blurTexture5; - uniform float bloomStrength; - uniform float bloomRadius; - uniform float bloomFactors[NUM_MIPS]; - uniform vec3 bloomTintColors[NUM_MIPS]; - - float lerpBloomFactor(const in float factor) { - float mirrorFactor = 1.2 - factor; - return mix(factor, mirrorFactor, bloomRadius); - } - - void main() { - gl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) + - lerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) + - lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) + - lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) + - lerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) ); - }`})}};pd.BlurDirectionX=new le(1,0);pd.BlurDirectionY=new le(0,1);var UDe={uniforms:{tDiffuse:{value:null},resolution:{value:new le(1/1024,1/512)}},vertexShader:` - - varying vec2 vUv; - - void main() { - - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - - }`,fragmentShader:` - precision highp float; - - uniform sampler2D tDiffuse; - - uniform vec2 resolution; - - varying vec2 vUv; - - // FXAA 3.11 implementation by NVIDIA, ported to WebGL by Agost Biro (biro@archilogic.com) - - //---------------------------------------------------------------------------------- - // File: es3-keplerFXAAassetsshaders/FXAA_DefaultES.frag - // SDK Version: v3.00 - // Email: gameworks@nvidia.com - // Site: http://developer.nvidia.com/ - // - // Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. - // - // Redistribution and use in source and binary forms, with or without - // modification, are permitted provided that the following conditions - // are met: - // * Redistributions of source code must retain the above copyright - // notice, this list of conditions and the following disclaimer. - // * Redistributions in binary form must reproduce the above copyright - // notice, this list of conditions and the following disclaimer in the - // documentation and/or other materials provided with the distribution. - // * Neither the name of NVIDIA CORPORATION nor the names of its - // contributors may be used to endorse or promote products derived - // from this software without specific prior written permission. - // - // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY - // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - // - //---------------------------------------------------------------------------------- - - #ifndef FXAA_DISCARD - // - // Only valid for PC OpenGL currently. - // Probably will not work when FXAA_GREEN_AS_LUMA = 1. - // - // 1 = Use discard on pixels which don't need AA. - // For APIs which enable concurrent TEX+ROP from same surface. - // 0 = Return unchanged color on pixels which don't need AA. - // - #define FXAA_DISCARD 0 - #endif - - /*--------------------------------------------------------------------------*/ - #define FxaaTexTop(t, p) texture2D(t, p, -100.0) - #define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r), -100.0) - /*--------------------------------------------------------------------------*/ - - #define NUM_SAMPLES 5 - - // assumes colors have premultipliedAlpha, so that the calculated color contrast is scaled by alpha - float contrast( vec4 a, vec4 b ) { - vec4 diff = abs( a - b ); - return max( max( max( diff.r, diff.g ), diff.b ), diff.a ); - } - - /*============================================================================ - - FXAA3 QUALITY - PC - - ============================================================================*/ - - /*--------------------------------------------------------------------------*/ - vec4 FxaaPixelShader( - vec2 posM, - sampler2D tex, - vec2 fxaaQualityRcpFrame, - float fxaaQualityEdgeThreshold, - float fxaaQualityinvEdgeThreshold - ) { - vec4 rgbaM = FxaaTexTop(tex, posM); - vec4 rgbaS = FxaaTexOff(tex, posM, vec2( 0.0, 1.0), fxaaQualityRcpFrame.xy); - vec4 rgbaE = FxaaTexOff(tex, posM, vec2( 1.0, 0.0), fxaaQualityRcpFrame.xy); - vec4 rgbaN = FxaaTexOff(tex, posM, vec2( 0.0,-1.0), fxaaQualityRcpFrame.xy); - vec4 rgbaW = FxaaTexOff(tex, posM, vec2(-1.0, 0.0), fxaaQualityRcpFrame.xy); - // . S . - // W M E - // . N . - - bool earlyExit = max( max( max( - contrast( rgbaM, rgbaN ), - contrast( rgbaM, rgbaS ) ), - contrast( rgbaM, rgbaE ) ), - contrast( rgbaM, rgbaW ) ) - < fxaaQualityEdgeThreshold; - // . 0 . - // 0 0 0 - // . 0 . - - #if (FXAA_DISCARD == 1) - if(earlyExit) FxaaDiscard; - #else - if(earlyExit) return rgbaM; - #endif - - float contrastN = contrast( rgbaM, rgbaN ); - float contrastS = contrast( rgbaM, rgbaS ); - float contrastE = contrast( rgbaM, rgbaE ); - float contrastW = contrast( rgbaM, rgbaW ); - - float relativeVContrast = ( contrastN + contrastS ) - ( contrastE + contrastW ); - relativeVContrast *= fxaaQualityinvEdgeThreshold; - - bool horzSpan = relativeVContrast > 0.; - // . 1 . - // 0 0 0 - // . 1 . - - // 45 deg edge detection and corners of objects, aka V/H contrast is too similar - if( abs( relativeVContrast ) < .3 ) { - // locate the edge - vec2 dirToEdge; - dirToEdge.x = contrastE > contrastW ? 1. : -1.; - dirToEdge.y = contrastS > contrastN ? 1. : -1.; - // . 2 . . 1 . - // 1 0 2 ~= 0 0 1 - // . 1 . . 0 . - - // tap 2 pixels and see which ones are "outside" the edge, to - // determine if the edge is vertical or horizontal - - vec4 rgbaAlongH = FxaaTexOff(tex, posM, vec2( dirToEdge.x, -dirToEdge.y ), fxaaQualityRcpFrame.xy); - float matchAlongH = contrast( rgbaM, rgbaAlongH ); - // . 1 . - // 0 0 1 - // . 0 H - - vec4 rgbaAlongV = FxaaTexOff(tex, posM, vec2( -dirToEdge.x, dirToEdge.y ), fxaaQualityRcpFrame.xy); - float matchAlongV = contrast( rgbaM, rgbaAlongV ); - // V 1 . - // 0 0 1 - // . 0 . - - relativeVContrast = matchAlongV - matchAlongH; - relativeVContrast *= fxaaQualityinvEdgeThreshold; - - if( abs( relativeVContrast ) < .3 ) { // 45 deg edge - // 1 1 . - // 0 0 1 - // . 0 1 - - // do a simple blur - return mix( - rgbaM, - (rgbaN + rgbaS + rgbaE + rgbaW) * .25, - .4 - ); - } - - horzSpan = relativeVContrast > 0.; - } - - if(!horzSpan) rgbaN = rgbaW; - if(!horzSpan) rgbaS = rgbaE; - // . 0 . 1 - // 1 0 1 -> 0 - // . 0 . 1 - - bool pairN = contrast( rgbaM, rgbaN ) > contrast( rgbaM, rgbaS ); - if(!pairN) rgbaN = rgbaS; - - vec2 offNP; - offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x; - offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y; - - bool doneN = false; - bool doneP = false; - - float nDist = 0.; - float pDist = 0.; - - vec2 posN = posM; - vec2 posP = posM; - - int iterationsUsed = 0; - int iterationsUsedN = 0; - int iterationsUsedP = 0; - for( int i = 0; i < NUM_SAMPLES; i++ ) { - iterationsUsed = i; - - float increment = float(i + 1); - - if(!doneN) { - nDist += increment; - posN = posM + offNP * nDist; - vec4 rgbaEndN = FxaaTexTop(tex, posN.xy); - doneN = contrast( rgbaEndN, rgbaM ) > contrast( rgbaEndN, rgbaN ); - iterationsUsedN = i; - } - - if(!doneP) { - pDist += increment; - posP = posM - offNP * pDist; - vec4 rgbaEndP = FxaaTexTop(tex, posP.xy); - doneP = contrast( rgbaEndP, rgbaM ) > contrast( rgbaEndP, rgbaN ); - iterationsUsedP = i; - } - - if(doneN || doneP) break; - } - - - if ( !doneP && !doneN ) return rgbaM; // failed to find end of edge - - float dist = min( - doneN ? float( iterationsUsedN ) / float( NUM_SAMPLES - 1 ) : 1., - doneP ? float( iterationsUsedP ) / float( NUM_SAMPLES - 1 ) : 1. - ); - - // hacky way of reduces blurriness of mostly diagonal edges - // but reduces AA quality - dist = pow(dist, .5); - - dist = 1. - dist; - - return mix( - rgbaM, - rgbaN, - dist * .5 - ); - } - - void main() { - const float edgeDetectionQuality = .2; - const float invEdgeDetectionQuality = 1. / edgeDetectionQuality; - - gl_FragColor = FxaaPixelShader( - vUv, - tDiffuse, - resolution, - edgeDetectionQuality, // [0,1] contrast needed, otherwise early discard - invEdgeDetectionQuality - ); - - } - `};var RG=Un(Yl(),1);var dNt="bottomBar";var fNt={["stats"]:{icon:{default:"icon-showsectionplane"},mutexIds:["statistics","cameraInfo","tips"],onActive:t=>{t.viewer.showStats()},onDeactive:t=>{t.viewer.hideStats()}},["statistics"]:{icon:{default:"icon-info",active:"icon-info-filled"},mutexIds:["stats","cameraInfo","tips"],onActive:t=>{let r=document.createElement("span");if(!t.viewer.scene){r.textContent="Failed!";return}r.textContent="Comupting...";let e={components:{},points:0,faces:0,materials:{},lights:{}},i=(l,c)=>{if(c.components[l.type]?c.components[l.type]++:c.components[l.type]=1,l.geometry){let p=l.geometry;if(l instanceof Je){if(p.index&&p.index.count){let d=Math.round(p.index.count/3);l instanceof tn&&(d*=l.count),c.faces+=d}else if(p.groups.length>0)for(let d=0;d{c.materials[p]?c.materials[p]++:c.materials[p]=1},h=l.material;h instanceof Gr?u(h.id):Array.isArray(h)&&h.forEach(p=>u(p.id))},n=l=>{var u;let c=(u=l.renderer)==null?void 0:u.domElement;return c==null?void 0:c.dataset.engine},s=["SKYBOX","GROUND_GRID","GRASS_GROUND","BIM_VIEWER_BOX_HELPER"];t.viewer.scene.traverse(l=>{(l instanceof Je||l instanceof _r||l instanceof rn)&&!s.includes(l.name)?i(l,e):l instanceof Al&&(e.lights[l.type]?e.lights[l.type]++:e.lights[l.type]=1)});let a=(l,c)=>{r.innerHTML+=`

${l}:${c}

`};r.innerHTML="";let o=` (${n(t.viewer)})`;if(a("Version",`${WT}${o}`),a("Components",JSON.stringify(e.components)),a("Points",e.points),a("Faces",e.faces),a("Materials",Object.keys(e.materials).length),a("Lights",JSON.stringify(e.lights)),t.viewer.name==="DxfViewer"){let l=t.viewer.getEntitiesCount();a("Entities",l)}t.tooltip.setContent(r),t.tooltip.show()},onDeactive:t=>{t.tooltip.hide()},onUpdate:t=>{let r=t.viewer.renderer,e=document.createElement("span"),i=(s,a)=>{e.innerHTML+=`

${s}:${a}

`};e.innerHTML="

-- Renderer Info --

";let n=r==null?void 0:r.info;i("Drawcalls",JSON.stringify(n==null?void 0:n.render.calls)),i("Points",JSON.stringify(n==null?void 0:n.render.points)),i("Lines",JSON.stringify(n==null?void 0:n.render.lines)),i("Triangles",JSON.stringify(n==null?void 0:n.render.triangles)),i("Geometries",JSON.stringify(n==null?void 0:n.memory.geometries)),i("Textures",JSON.stringify(n==null?void 0:n.memory.textures)),t.tooltip.updateChildContent(e)}},["cameraInfo"]:{icon:{default:"icon-view",active:"icon-view-filled"},mutexIds:["stats","statistics","tips"],onActive:t=>{let r=()=>{if(!t.viewer||!t.viewer.camera||!t.viewer.controls)return;let e=t.viewer.camera,i=t.viewer.controls,n=l=>St.numberToString(l),s=l=>St.vectorToString(l),a=e.position,o=i.target;if(a){let l=document.createElement("span");l.innerHTML=` -

Camera position:${s(a)}

-

Camera target:${s(o)}

`,e instanceof Zi&&(l.innerHTML+=` -

top: ${n(e.top)}, bottom: ${n(e.bottom)}, left: ${n(e.left)}, right: ${n(e.right)}

-

zoom: ${n(e.zoom)}

`),t.tooltip.setContent(l)}t.active||window.removeEventListener("mouseup",r)};if(r(),window.addEventListener("mouseup",r),t.viewer.name==="BimViewer"){let e=t.viewer.controls;e==null||e.addEventListener("update",r)}else t.viewer.controls.addEventListener("change",r);t.tooltip.show()},onDeactive:t=>{t.tooltip.hide()}},["tips"]:{icon:{default:"icon-more"},mutexIds:["stats","cameraInfo","cameraInfo"],onActive:t=>{let r=document.createElement("span");t.viewer.name==="BimViewer"?r.innerHTML=` -

W: Move forward

-

A: Move backward

-

S: Move left

-

D: Move right

-

Q: Rise up

-

E: Lower down

-

\u2191: Rotate up

-

\u2193: Rotate down

-

\u2190: Rotate to left

-

\u2192: Rotate to right

- `:t.viewer.name==="DxfViewer"?r.innerHTML=` -

\u2191: Move up

-

\u2193: Move down

-

\u2190: Move to left

-

\u2192: Move to right

- `:t.viewer.name==="BaseViewer"?r.innerHTML=` -

\u2191: Rotate up

-

\u2193: Rotate down

-

\u2190: Rotate to left

-

\u2192: Rotate to right

- `:r.innerHTML=` -

Nothing to show

- `,t.tooltip.setContent(r),t.tooltip.show()},onDeactive:t=>{t.tooltip.hide()}}},nm=class{constructor(r){this.viewer=r;this.itemList=new Map;this.init()}update(){this.itemList.forEach(r=>{r.update()})}init(){var e;let r=document.createElement("div");r.id=dNt,r.classList.add("bottom-bar"),(0,RG.forEach)(fNt,(i,n)=>{let s=this.createItem(this.viewer,n,i);r.appendChild(s.element)}),this.element=r,(e=this.viewer.widgetContainer)==null||e.appendChild(this.element)}createItem(r,e,i){let n=new wG(r,this,e,i);return this.itemList.set(e,n),n}},wG=class{constructor(r,e,i,n){this.viewer=r;this.bottomBar=e;this.menuId=i;this.cfg=n;this.eventBus=lE();this.active=!1;this.itemconfig=n,this.element=this.createButton(this.menuId,n),this.tooltip=new ph(i+"-tooltip",null,{parentNode:r.widgetContainer}),this.eventBus.on("activeChange",s=>{s?(this.element.classList.add("active"),(0,RG.forEach)(n.mutexIds,a=>{var l;let o=(l=this.bottomBar)==null?void 0:l.itemList.get(a);o&&o.active&&o.setActive(!1)}),n.onActive&&n.onActive(this)):(this.element.classList.remove("active"),n.onDeactive&&n.onDeactive(this)),this.element instanceof HTMLElement&&IC(this.element.classList,n.icon,this.active)})}createButton(r,e){let i=document.createElement("i");i.id=r;let{default:n="icon-new",iconFont:s=ho}=e.icon;return i.classList.add("icon"),i.classList.add(s),i.classList.add(n),i.onclick=()=>{this.active=!this.active,e.onClick&&e.onClick(this),this.eventBus.emit("activeChange",this.active)},i}setActive(r){this.active=r,this.eventBus.emit("activeChange",this.active)}update(){this.active&&this.itemconfig.onUpdate&&this.itemconfig.onUpdate(this)}};var qS=Un(Yl(),1);var mNt="gemini-context-menu",v3=class{constructor(r){this.itemList=[];this.id=r.id||mNt,this.container=r.container||document.body,this.context=r.context||{},this.element=this.createMenuUI(r.items||[]),this.handleClick=()=>{this.hide()},r.hideOnMouseDown!==!1&&document.addEventListener("click",this.handleClick),this.hide()}isEnable(r){return r.getEnabled?r.getEnabled(this.context):r.enabled!==void 0?r.enabled:!0}isShown(r){return r.getShown?r.getShown(this.context):r.shown!==void 0?r.shown:!0}getTitle(r){return r.title||r.getTitle&&r.getTitle(this.context)||""}createMenuUI(r){let e=document.createElement("div");e.id=this.id,e.classList.add("context-menu");let i=this.createMenuGroup(r);return e.append(...i),this.container.appendChild(e),e}createMenuGroup(r){return(0,qS.map)(r,e=>{let i=document.createElement("ul");return(0,qS.forEach)(e,n=>{let s=this.createMenuItem(n);i.append(s)}),i})}createMenuItem(r){let e=document.createElement("li");return e.innerHTML=this.getTitle(r),e.onclick=()=>r.doAction&&r.doAction(this.context),this.isEnable(r)?e.classList.remove("disabled"):e.classList.add("disabled"),this.isShown(r)?e.removeAttribute("hidden"):e.setAttribute("hidden",""),this.itemList.push([r,e]),e}updateMenuItems(){(0,qS.forEach)(this.itemList,([r,e])=>{this.isEnable(r)?e.classList.remove("disabled"):e.classList.add("disabled"),this.isShown(r)?e.removeAttribute("hidden"):e.setAttribute("hidden",""),e.innerHTML=this.getTitle(r)})}showMenuElement(r,e){let i=this.element.offsetHeight,n=this.element.offsetWidth;e+i>window.innerHeight&&(e=window.innerHeight-i-5),r+n>window.innerWidth&&(r=window.innerWidth-n-5),this.element.style.left=r+"px",this.element.style.top=e+"px"}show(r,e){this.updateMenuItems(),this.element.removeAttribute("hidden"),this.showMenuElement(r,e)}hide(){this.element.setAttribute("hidden","")}destroy(){document.removeEventListener("click",this.handleClick),this.container.removeChild(this.element)}};var xo=t=>({bimViewer:r})=>r.translate(`ContextMenu.${t}`),kDe=t=>{var e;let r=0;return(e=t.scene)==null||e.traverseVisible(i=>{i instanceof Je&&r++}),r>0},gNt=t=>{var e,i;let r=0;return(e=t.scene)==null||e.traverse(n=>{n instanceof Je&&r++}),(i=t.scene)==null||i.traverseVisible(n=>{n instanceof Je&&r--}),r>0},MG=t=>t.hasTransparentObject(),y3=t=>t.userData.selectable!==!1,BDe=(t,r,e,i)=>{let n=t.selectedObject;return!n||!r||n.id!==r.id?!1:e!=null&&n.isInstancedMesh?e===n.userData.instanceId:i!=null&&ji.isMergedMesh(n)?i===n.userData.batchId:!0},vNt={getTitle:xo("viewFitEntity"),getShown:({hit:t})=>t,doAction:({bimViewer:t,hit:r})=>{t.flyToObject(r)}},yNt={getTitle:xo("viewFitAll"),getEnabled:({bimViewer:t})=>kDe(t),doAction:({bimViewer:t})=>t.viewFitAll()},TNt={getTitle:xo("hideEntity"),getShown:({hit:t})=>t,doAction:({bimViewer:t,hit:r})=>{y3(r)&&(r.visible=!1,t.enableRender())}},ENt={getTitle:xo("hideOthers"),getShown:({hit:t})=>t,doAction:({bimViewer:t,hit:r})=>{var e;(e=t.scene)==null||e.traverse(i=>{i instanceof Je&&y3(i)&&(i.visible=!1)}),r.visible=!0,t.enableRender()}},bNt={getTitle:xo("hideAll"),getEnabled:({bimViewer:t})=>kDe(t),doAction:({bimViewer:t})=>{var r;(r=t.scene)==null||r.traverse(e=>{e instanceof Je&&y3(e)&&(e.visible=!1)}),t.enableRender()}},xNt={getTitle:xo("showAll"),getEnabled:({bimViewer:t})=>gNt(t),doAction:({bimViewer:t})=>{var r;(r=t.scene)==null||r.traverse(e=>{e instanceof Je&&y3(e)&&(e.visible=!0)}),t.enableRender()}},INt={getTitle:({hit:t,bimViewer:r,instanceId:e,batchId:i})=>BDe(r,t,e,i)?xo("deselect")({bimViewer:r}):xo("select")({bimViewer:r}),getShown:({hit:t})=>t,doAction:({hit:t,bimViewer:r,instanceId:e,batchId:i})=>{if(t.userData.selectable===!1){ne.debug(`[ContextMenu] object(type: ${t.type}, name: ${t.name}) not selectable!`);return}BDe(r,t,e,i)?r.clearSelection():r.selectObject(t,t.instanceId,i)}},SNt={getTitle:xo("selectNone"),getEnabled:({bimViewer:t})=>t.selectedObject,doAction:({bimViewer:t})=>t.clearSelection()},_Nt={getTitle:xo("xRayAll"),getShown:({bimViewer:t})=>!MG(t),doAction:({bimViewer:t})=>{t.addOrRemoveObjectOpacity(!0),t.enableRender()}},wNt={getTitle:xo("xRayNone"),getEnabled:({bimViewer:t})=>MG(t),doAction:({bimViewer:t})=>{MG(t)&&(t.addOrRemoveObjectOpacity(!1),t.enableRender())}},RNt={getTitle:xo("xRayEntity"),getShown:({hit:t})=>t,doAction:({bimViewer:t,hit:r})=>{t.addOrRemoveObjectOpacity(!0,void 0,[r.id],void 0)}},MNt={getTitle:xo("xRayOthers"),getShown:({hit:t})=>t,doAction:({bimViewer:t,hit:r})=>{t.addOrRemoveObjectOpacity(!0,.1,void 0,[r.id]),t.enableRender()}},DNt={getTitle:({bimViewer:t})=>{let r="";switch(t.sectionType){case"PickPlaneSection":r="*showSectionPlane";break;case"AxisPlaneSection":r="showAxisSection";break;case"ObjectsBoxSection":r="*showSectionBox";break}return t.translate(`ContextMenu.${r}`)},getShown:({bimViewer:t,section:r})=>t.sectionType==="PickPlaneSection"||t.sectionType==="AxisPlaneSection"?!!r&&!r.isShowSectionPlane:!1,doAction:({bimViewer:t,section:r})=>{(t.sectionType==="PickPlaneSection"||t.sectionType==="AxisPlaneSection")&&(r==null||r.setSectionVisible(!0))}},CNt={getTitle:({bimViewer:t})=>{let r="";switch(t.sectionType){case"PickPlaneSection":r="hideSectionPlane";break;case"AxisPlaneSection":r="hideAxisSection";break;case"ObjectsBoxSection":r="hideSectionBox";break}return t.translate(`ContextMenu.${r}`)},getShown:t=>GDe(t),doAction:({bimViewer:t,section:r})=>{(t.sectionType==="PickPlaneSection"||t.sectionType==="AxisPlaneSection")&&(r==null||r.setSectionVisible(!1))}},ANt={getTitle:xo("undoSection"),getShown:t=>GDe(t),doAction:({bimViewer:t,toolbar:r})=>{if(t.sectionType==="PickPlaneSection"){let e=r==null?void 0:r.menuList.get("SectionPlane");e==null||e.setActive(!1)}else if(t.sectionType==="AxisPlaneSection"){let e=r==null?void 0:r.menuList.get("SectionAxis");e==null||e.setActive(!1)}else if(t.sectionType==="ObjectsBoxSection"){let e=r==null?void 0:r.menuList.get("SectionBox");e==null||e.setActive(!1)}}},GDe=({bimViewer:t,hit:r,section:e})=>t.sectionType==="PickPlaneSection"?!!e&&e.isShowSectionPlane&&(r==null?void 0:r.name)===yB:t.sectionType==="AxisPlaneSection"?!!e&&e.isShowSectionPlane&&(r==null?void 0:r.name)===yB:!1,VDe=[[DNt],[CNt,ANt],[vNt,yNt],[TNt,ENt,bNt,xNt],[RNt,MNt,_Nt,wNt],[INt,SNt]];function ONt(t){if(t&&typeof window!="undefined"){var r=document.createElement("style");return r.setAttribute("type","text/css"),r.innerHTML=t,document.head.appendChild(r),t}}function IE(t,r){var e=t.__state.conversionName.toString(),i=Math.round(t.r),n=Math.round(t.g),s=Math.round(t.b),a=t.a,o=Math.round(t.h),l=t.s.toFixed(1),c=t.v.toFixed(1);if(r||e==="THREE_CHAR_HEX"||e==="SIX_CHAR_HEX"){for(var u=t.hex.toString(16);u.length<6;)u="0"+u;return"#"+u}else{if(e==="CSS_RGB")return"rgb("+i+","+n+","+s+")";if(e==="CSS_RGBA")return"rgba("+i+","+n+","+s+","+a+")";if(e==="HEX")return"0x"+t.hex.toString(16);if(e==="RGB_ARRAY")return"["+i+","+n+","+s+"]";if(e==="RGBA_ARRAY")return"["+i+","+n+","+s+","+a+"]";if(e==="RGB_OBJ")return"{r:"+i+",g:"+n+",b:"+s+"}";if(e==="RGBA_OBJ")return"{r:"+i+",g:"+n+",b:"+s+",a:"+a+"}";if(e==="HSV_OBJ")return"{h:"+o+",s:"+l+",v:"+c+"}";if(e==="HSVA_OBJ")return"{h:"+o+",s:"+l+",v:"+c+",a:"+a+"}"}return"unknown format"}var zDe=Array.prototype.forEach,YS=Array.prototype.slice,ht={BREAK:{},extend:function(r){return this.each(YS.call(arguments,1),function(e){var i=this.isObject(e)?Object.keys(e):[];i.forEach(function(n){this.isUndefined(e[n])||(r[n]=e[n])}.bind(this))},this),r},defaults:function(r){return this.each(YS.call(arguments,1),function(e){var i=this.isObject(e)?Object.keys(e):[];i.forEach(function(n){this.isUndefined(r[n])&&(r[n]=e[n])}.bind(this))},this),r},compose:function(){var r=YS.call(arguments);return function(){for(var e=YS.call(arguments),i=r.length-1;i>=0;i--)e=[r[i].apply(this,e)];return e[0]}},each:function(r,e,i){if(r){if(zDe&&r.forEach&&r.forEach===zDe)r.forEach(e,i);else if(r.length===r.length+0){var n=void 0,s=void 0;for(n=0,s=r.length;n1?ht.toArray(arguments):arguments[0];return ht.each(PNt,function(e){if(e.litmus(r))return ht.each(e.conversions,function(i,n){if(XS=i.read(r),T3===!1&&XS!==!1)return T3=XS,XS.conversionName=n,XS.conversion=i,ht.BREAK}),ht.BREAK}),T3},jDe=void 0,b3={hsv_to_rgb:function(r,e,i){var n=Math.floor(r/60)%6,s=r/60-Math.floor(r/60),a=i*(1-e),o=i*(1-s*e),l=i*(1-(1-s)*e),c=[[i,l,a],[o,i,a],[a,i,l],[a,o,i],[l,a,i],[i,a,o]][n];return{r:c[0]*255,g:c[1]*255,b:c[2]*255}},rgb_to_hsv:function(r,e,i){var n=Math.min(r,e,i),s=Math.max(r,e,i),a=s-n,o=void 0,l=void 0;if(s!==0)l=a/s;else return{h:NaN,s:0,v:0};return r===s?o=(e-i)/a:e===s?o=2+(i-r)/a:o=4+(r-e)/a,o/=6,o<0&&(o+=1),{h:o*360,s:l,v:s/255}},rgb_to_hex:function(r,e,i){var n=this.hex_with_component(0,2,r);return n=this.hex_with_component(n,1,e),n=this.hex_with_component(n,0,i),n},component_from_hex:function(r,e){return r>>e*8&255},hex_with_component:function(r,e,i){return i<<(jDe=e*8)|r&~(255<-1?r.length-r.indexOf(".")-1:0}var rCe=function(t){am(r,t);function r(e,i,n){ou(this,r);var s=om(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,i)),a=n||{};return s.__min=a.min,s.__max=a.max,s.__step=a.step,ht.isUndefined(s.__step)?s.initialValue===0?s.__impliedStep=1:s.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(s.initialValue))/Math.LN10))/10:s.__impliedStep=s.__step,s.__precision=WDe(s.__impliedStep),s}return lu(r,[{key:"setValue",value:function(i){var n=i;return this.__min!==void 0&&nthis.__max&&(n=this.__max),this.__step!==void 0&&n%this.__step!==0&&(n=Math.round(n/this.__step)*this.__step),sm(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"setValue",this).call(this,n)}},{key:"min",value:function(i){return this.__min=i,this}},{key:"max",value:function(i){return this.__max=i,this}},{key:"step",value:function(i){return this.__step=i,this.__impliedStep=i,this.__precision=WDe(i),this}}]),r}(N0);function BNt(t,r){var e=Math.pow(10,r);return Math.round(t*e)/e}var x3=function(t){am(r,t);function r(e,i,n){ou(this,r);var s=om(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,i,n));s.__truncationSuspended=!1;var a=s,o=void 0;function l(){var f=parseFloat(a.__input.value);ht.isNaN(f)||a.setValue(f)}function c(){a.__onFinishChange&&a.__onFinishChange.call(a,a.getValue())}function u(){c()}function h(f){var m=o-f.clientY;a.setValue(a.getValue()+m*a.__impliedStep),o=f.clientY}function p(){We.unbind(window,"mousemove",h),We.unbind(window,"mouseup",p),c()}function d(f){We.bind(window,"mousemove",h),We.bind(window,"mouseup",p),o=f.clientY}return s.__input=document.createElement("input"),s.__input.setAttribute("type","text"),We.bind(s.__input,"change",l),We.bind(s.__input,"blur",u),We.bind(s.__input,"mousedown",d),We.bind(s.__input,"keydown",function(f){f.keyCode===13&&(a.__truncationSuspended=!0,this.blur(),a.__truncationSuspended=!1,c())}),s.updateDisplay(),s.domElement.appendChild(s.__input),s}return lu(r,[{key:"updateDisplay",value:function(){return this.__input.value=this.__truncationSuspended?this.getValue():BNt(this.getValue(),this.__precision),sm(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"updateDisplay",this).call(this)}}]),r}(rCe);function qDe(t,r,e,i,n){return i+(n-i)*((t-r)/(e-r))}var AG=function(t){am(r,t);function r(e,i,n,s,a){ou(this,r);var o=om(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,i,{min:n,max:s,step:a})),l=o;o.__background=document.createElement("div"),o.__foreground=document.createElement("div"),We.bind(o.__background,"mousedown",c),We.bind(o.__background,"touchstart",p),We.addClass(o.__background,"slider"),We.addClass(o.__foreground,"slider-fg");function c(m){document.activeElement.blur(),We.bind(window,"mousemove",u),We.bind(window,"mouseup",h),u(m)}function u(m){m.preventDefault();var g=l.__background.getBoundingClientRect();return l.setValue(qDe(m.clientX,g.left,g.right,l.__min,l.__max)),!1}function h(){We.unbind(window,"mousemove",u),We.unbind(window,"mouseup",h),l.__onFinishChange&&l.__onFinishChange.call(l,l.getValue())}function p(m){m.touches.length===1&&(We.bind(window,"touchmove",d),We.bind(window,"touchend",f),d(m))}function d(m){var g=m.touches[0].clientX,y=l.__background.getBoundingClientRect();l.setValue(qDe(g,y.left,y.right,l.__min,l.__max))}function f(){We.unbind(window,"touchmove",d),We.unbind(window,"touchend",f),l.__onFinishChange&&l.__onFinishChange.call(l,l.getValue())}return o.updateDisplay(),o.__background.appendChild(o.__foreground),o.domElement.appendChild(o.__background),o}return lu(r,[{key:"updateDisplay",value:function(){var i=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=i*100+"%",sm(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"updateDisplay",this).call(this)}}]),r}(rCe),iCe=function(t){am(r,t);function r(e,i,n){ou(this,r);var s=om(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,i)),a=s;return s.__button=document.createElement("div"),s.__button.innerHTML=n===void 0?"Fire":n,We.bind(s.__button,"click",function(o){return o.preventDefault(),a.fire(),!1}),We.addClass(s.__button,"button"),s.domElement.appendChild(s.__button),s}return lu(r,[{key:"fire",value:function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}}]),r}(N0),OG=function(t){am(r,t);function r(e,i){ou(this,r);var n=om(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,i));n.__color=new Ls(n.getValue()),n.__temp=new Ls(0);var s=n;n.domElement=document.createElement("div"),We.makeSelectable(n.domElement,!1),n.__selector=document.createElement("div"),n.__selector.className="selector",n.__saturation_field=document.createElement("div"),n.__saturation_field.className="saturation-field",n.__field_knob=document.createElement("div"),n.__field_knob.className="field-knob",n.__field_knob_border="2px solid ",n.__hue_knob=document.createElement("div"),n.__hue_knob.className="hue-knob",n.__hue_field=document.createElement("div"),n.__hue_field.className="hue-field",n.__input=document.createElement("input"),n.__input.type="text",n.__input_textShadow="0 1px 1px ",We.bind(n.__input,"keydown",function(m){m.keyCode===13&&h.call(this)}),We.bind(n.__input,"blur",h),We.bind(n.__selector,"mousedown",function(){We.addClass(this,"drag").bind(window,"mouseup",function(){We.removeClass(s.__selector,"drag")})}),We.bind(n.__selector,"touchstart",function(){We.addClass(this,"drag").bind(window,"touchend",function(){We.removeClass(s.__selector,"drag")})});var a=document.createElement("div");ht.extend(n.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),ht.extend(n.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:n.__field_knob_border+(n.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),ht.extend(n.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),ht.extend(n.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),ht.extend(a.style,{width:"100%",height:"100%",background:"none"}),YDe(a,"top","rgba(0,0,0,0)","#000"),ht.extend(n.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),GNt(n.__hue_field),ht.extend(n.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:n.__input_textShadow+"rgba(0,0,0,0.7)"}),We.bind(n.__saturation_field,"mousedown",o),We.bind(n.__saturation_field,"touchstart",o),We.bind(n.__field_knob,"mousedown",o),We.bind(n.__field_knob,"touchstart",o),We.bind(n.__hue_field,"mousedown",l),We.bind(n.__hue_field,"touchstart",l);function o(m){d(m),We.bind(window,"mousemove",d),We.bind(window,"touchmove",d),We.bind(window,"mouseup",c),We.bind(window,"touchend",c)}function l(m){f(m),We.bind(window,"mousemove",f),We.bind(window,"touchmove",f),We.bind(window,"mouseup",u),We.bind(window,"touchend",u)}function c(){We.unbind(window,"mousemove",d),We.unbind(window,"touchmove",d),We.unbind(window,"mouseup",c),We.unbind(window,"touchend",c),p()}function u(){We.unbind(window,"mousemove",f),We.unbind(window,"touchmove",f),We.unbind(window,"mouseup",u),We.unbind(window,"touchend",u),p()}function h(){var m=CG(this.value);m!==!1?(s.__color.__state=m,s.setValue(s.__color.toOriginal())):this.value=s.__color.toString()}function p(){s.__onFinishChange&&s.__onFinishChange.call(s,s.__color.toOriginal())}n.__saturation_field.appendChild(a),n.__selector.appendChild(n.__field_knob),n.__selector.appendChild(n.__saturation_field),n.__selector.appendChild(n.__hue_field),n.__hue_field.appendChild(n.__hue_knob),n.domElement.appendChild(n.__input),n.domElement.appendChild(n.__selector),n.updateDisplay();function d(m){m.type.indexOf("touch")===-1&&m.preventDefault();var g=s.__saturation_field.getBoundingClientRect(),y=m.touches&&m.touches[0]||m,E=y.clientX,b=y.clientY,x=(E-g.left)/(g.right-g.left),S=1-(b-g.top)/(g.bottom-g.top);return S>1?S=1:S<0&&(S=0),x>1?x=1:x<0&&(x=0),s.__color.v=S,s.__color.s=x,s.setValue(s.__color.toOriginal()),!1}function f(m){m.type.indexOf("touch")===-1&&m.preventDefault();var g=s.__hue_field.getBoundingClientRect(),y=m.touches&&m.touches[0]||m,E=y.clientY,b=1-(E-g.top)/(g.bottom-g.top);return b>1?b=1:b<0&&(b=0),s.__color.h=b*360,s.setValue(s.__color.toOriginal()),!1}return n}return lu(r,[{key:"updateDisplay",value:function(){var i=CG(this.getValue());if(i!==!1){var n=!1;ht.each(Ls.COMPONENTS,function(o){if(!ht.isUndefined(i[o])&&!ht.isUndefined(this.__color.__state[o])&&i[o]!==this.__color.__state[o])return n=!0,{}},this),n&&ht.extend(this.__color.__state,i)}ht.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var s=this.__color.v<.5||this.__color.s>.5?255:0,a=255-s;ht.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+s+","+s+","+s+")"}),this.__hue_knob.style.marginTop=(1-this.__color.h/360)*100+"px",this.__temp.s=1,this.__temp.v=1,YDe(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),ht.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+s+","+s+","+s+")",textShadow:this.__input_textShadow+"rgba("+a+","+a+","+a+",.7)"})}}]),r}(N0),kNt=["-moz-","-o-","-webkit-","-ms-",""];function YDe(t,r,e,i){t.style.background="",ht.each(kNt,function(n){t.style.cssText+="background: "+n+"linear-gradient("+r+", "+e+" 0%, "+i+" 100%); "})}function GNt(t){t.style.background="",t.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",t.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",t.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",t.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",t.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}var VNt={load:function(r,e){var i=e||document,n=i.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=r,i.getElementsByTagName("head")[0].appendChild(n)},inject:function(r,e){var i=e||document,n=document.createElement("style");n.type="text/css",n.innerHTML=r;var s=i.getElementsByTagName("head")[0];try{s.appendChild(n)}catch(a){}}},zNt=`
- - Here's the new load parameter for your GUI's constructor: - - - -
- - Automatically save - values to localStorage on exit. - -
The values saved to localStorage will - override those passed to dat.GUI's constructor. This makes it - easier to work incrementally, but localStorage is fragile, - and your friends may not see the same values you do. - -
- -
- -
`,jNt=function(r,e){var i=r[e];return ht.isArray(arguments[2])||ht.isObject(arguments[2])?new HNt(r,e,arguments[2]):ht.isNumber(i)?ht.isNumber(arguments[2])&&ht.isNumber(arguments[3])?ht.isNumber(arguments[4])?new AG(r,e,arguments[2],arguments[3],arguments[4]):new AG(r,e,arguments[2],arguments[3]):ht.isNumber(arguments[4])?new x3(r,e,{min:arguments[2],max:arguments[3],step:arguments[4]}):new x3(r,e,{min:arguments[2],max:arguments[3]}):ht.isString(i)?new UNt(r,e):ht.isFunction(i)?new iCe(r,e,""):ht.isBoolean(i)?new tCe(r,e):null};function WNt(t){setTimeout(t,1e3/60)}var qNt=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||WNt,YNt=function(){function t(){ou(this,t),this.backgroundElement=document.createElement("div"),ht.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),We.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),ht.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var r=this;We.bind(this.backgroundElement,"click",function(){r.hide()})}return lu(t,[{key:"show",value:function(){var e=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),ht.defer(function(){e.backgroundElement.style.opacity=1,e.domElement.style.opacity=1,e.domElement.style.webkitTransform="scale(1)"})}},{key:"hide",value:function(){var e=this,i=function n(){e.domElement.style.display="none",e.backgroundElement.style.display="none",We.unbind(e.domElement,"webkitTransitionEnd",n),We.unbind(e.domElement,"transitionend",n),We.unbind(e.domElement,"oTransitionEnd",n)};We.bind(this.domElement,"webkitTransitionEnd",i),We.bind(this.domElement,"transitionend",i),We.bind(this.domElement,"oTransitionEnd",i),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"}},{key:"layout",value:function(){this.domElement.style.left=window.innerWidth/2-We.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-We.getHeight(this.domElement)/2+"px"}}]),t}(),XNt=ONt(`.dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .cr.function .property-name{width:100%}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda} -`);VNt.inject(XNt);var XDe="dg",$De=72,ZDe=20,JS="Default",$S=function(){try{return!!window.localStorage}catch(t){return!1}}(),ZS=void 0,KDe=!0,bE=void 0,DG=!1,nCe=[],Tn=function t(r){var e=this,i=r||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),We.addClass(this.domElement,XDe),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],i=ht.defaults(i,{closeOnTop:!1,autoPlace:!0,width:t.DEFAULT_WIDTH}),i=ht.defaults(i,{resizable:i.autoPlace,hideable:i.autoPlace}),ht.isUndefined(i.load)?i.load={preset:JS}:i.preset&&(i.load.preset=i.preset),ht.isUndefined(i.parent)&&i.hideable&&nCe.push(this),i.resizable=ht.isUndefined(i.parent)&&i.resizable,i.autoPlace&&ht.isUndefined(i.scrollable)&&(i.scrollable=!0);var n=$S&&localStorage.getItem(xE(this,"isLocal"))==="true",s=void 0,a=void 0;if(Object.defineProperties(this,{parent:{get:function(){return i.parent}},scrollable:{get:function(){return i.scrollable}},autoPlace:{get:function(){return i.autoPlace}},closeOnTop:{get:function(){return i.closeOnTop}},preset:{get:function(){return e.parent?e.getRoot().preset:i.load.preset},set:function(p){e.parent?e.getRoot().preset=p:i.load.preset=p,JNt(this),e.revert()}},width:{get:function(){return i.width},set:function(p){i.width=p,LG(e,p)}},name:{get:function(){return i.name},set:function(p){i.name=p,a&&(a.innerHTML=i.name)}},closed:{get:function(){return i.closed},set:function(p){i.closed=p,i.closed?We.addClass(e.__ul,t.CLASS_CLOSED):We.removeClass(e.__ul,t.CLASS_CLOSED),this.onResize(),e.__closeButton&&(e.__closeButton.innerHTML=p?t.TEXT_OPEN:t.TEXT_CLOSED)}},load:{get:function(){return i.load}},useLocalStorage:{get:function(){return n},set:function(p){$S&&(n=p,p?We.bind(window,"unload",s):We.unbind(window,"unload",s),localStorage.setItem(xE(e,"isLocal"),p))}}}),ht.isUndefined(i.parent)){if(this.closed=i.closed||!1,We.addClass(this.domElement,t.CLASS_MAIN),We.makeSelectable(this.domElement,!1),$S&&n){e.useLocalStorage=!0;var o=localStorage.getItem(xE(this,"gui"));o&&(i.load=JSON.parse(o))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=t.TEXT_CLOSED,We.addClass(this.__closeButton,t.CLASS_CLOSE_BUTTON),i.closeOnTop?(We.addClass(this.__closeButton,t.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(We.addClass(this.__closeButton,t.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),We.bind(this.__closeButton,"click",function(){e.closed=!e.closed})}else{i.closed===void 0&&(i.closed=!0);var l=document.createTextNode(i.name);We.addClass(l,"controller-name"),a=UG(e,l);var c=function(p){return p.preventDefault(),e.closed=!e.closed,!1};We.addClass(this.__ul,t.CLASS_CLOSED),We.addClass(a,"title"),We.bind(a,"click",c),i.closed||(this.closed=!1)}i.autoPlace&&(ht.isUndefined(i.parent)&&(KDe&&(bE=document.createElement("div"),We.addClass(bE,XDe),We.addClass(bE,t.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(bE),KDe=!1),bE.appendChild(this.domElement),We.addClass(this.domElement,t.CLASS_AUTO_PLACE)),this.parent||LG(e,i.width)),this.__resizeHandler=function(){e.onResizeDebounced()},We.bind(window,"resize",this.__resizeHandler),We.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),We.bind(this.__ul,"transitionend",this.__resizeHandler),We.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),i.resizable&&KNt(this),s=function(){$S&&localStorage.getItem(xE(e,"isLocal"))==="true"&&localStorage.setItem(xE(e,"gui"),JSON.stringify(e.getSaveObject()))},this.saveToLocalStorageIfPossible=s;function u(){var h=e.getRoot();h.width+=1,ht.defer(function(){h.width-=1})}i.parent||u()};Tn.toggleHide=function(){DG=!DG,ht.each(nCe,function(t){t.domElement.style.display=DG?"none":""})};Tn.CLASS_AUTO_PLACE="a";Tn.CLASS_AUTO_PLACE_CONTAINER="ac";Tn.CLASS_MAIN="main";Tn.CLASS_CONTROLLER_ROW="cr";Tn.CLASS_TOO_TALL="taller-than-window";Tn.CLASS_CLOSED="closed";Tn.CLASS_CLOSE_BUTTON="close-button";Tn.CLASS_CLOSE_TOP="close-top";Tn.CLASS_CLOSE_BOTTOM="close-bottom";Tn.CLASS_DRAG="drag";Tn.DEFAULT_WIDTH=245;Tn.TEXT_CLOSED="Close Controls";Tn.TEXT_OPEN="Open Controls";Tn._keydownHandler=function(t){document.activeElement.type!=="text"&&(t.which===$De||t.keyCode===$De)&&Tn.toggleHide()};We.bind(window,"keydown",Tn._keydownHandler,!1);ht.extend(Tn.prototype,{add:function(r,e){return KS(this,r,e,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(r,e){return KS(this,r,e,{color:!0})},remove:function(r){this.__ul.removeChild(r.__li),this.__controllers.splice(this.__controllers.indexOf(r),1);var e=this;ht.defer(function(){e.onResize()})},destroy:function(){if(this.parent)throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");this.autoPlace&&bE.removeChild(this.domElement);var r=this;ht.each(this.__folders,function(e){r.removeFolder(e)}),We.unbind(window,"keydown",Tn._keydownHandler,!1),JDe(this)},addFolder:function(r){if(this.__folders[r]!==void 0)throw new Error('You already have a folder in this GUI by the name "'+r+'"');var e={name:r,parent:this};e.autoPlace=this.autoPlace,this.load&&this.load.folders&&this.load.folders[r]&&(e.closed=this.load.folders[r].closed,e.load=this.load.folders[r]);var i=new Tn(e);this.__folders[r]=i;var n=UG(this,i.domElement);return We.addClass(n,"folder"),i},removeFolder:function(r){this.__ul.removeChild(r.domElement.parentElement),delete this.__folders[r.name],this.load&&this.load.folders&&this.load.folders[r.name]&&delete this.load.folders[r.name],JDe(r);var e=this;ht.each(r.__folders,function(i){r.removeFolder(i)}),ht.defer(function(){e.onResize()})},open:function(){this.closed=!1},close:function(){this.closed=!0},hide:function(){this.domElement.style.display="none"},show:function(){this.domElement.style.display=""},onResize:function(){var r=this.getRoot();if(r.scrollable){var e=We.getOffset(r.__ul).top,i=0;ht.each(r.__ul.childNodes,function(n){r.autoPlace&&n===r.__save_row||(i+=We.getHeight(n))}),window.innerHeight-e-ZDe0&&(r.preset=this.preset,r.remembered||(r.remembered={}),r.remembered[this.preset]=E3(this)),r.folders={},ht.each(this.__folders,function(e,i){r.folders[i]=e.getSaveObject()}),r},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=E3(this),PG(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(r){this.load.remembered||(this.load.remembered={},this.load.remembered[JS]=E3(this,!0)),this.load.remembered[r]=E3(this),this.preset=r,NG(this,r,!0),this.saveToLocalStorageIfPossible()},revert:function(r){ht.each(this.__controllers,function(e){this.getRoot().load.remembered?sCe(r||this.getRoot(),e):e.setValue(e.initialValue),e.__onFinishChange&&e.__onFinishChange.call(e,e.getValue())},this),ht.each(this.__folders,function(e){e.revert(e)}),r||PG(this.getRoot(),!1)},listen:function(r){var e=this.__listening.length===0;this.__listening.push(r),e&&aCe(this.__listening)},updateDisplay:function(){ht.each(this.__controllers,function(r){r.updateDisplay()}),ht.each(this.__folders,function(r){r.updateDisplay()})}});function UG(t,r,e){var i=document.createElement("li");return r&&i.appendChild(r),e?t.__ul.insertBefore(i,e):t.__ul.appendChild(i),t.onResize(),i}function JDe(t){We.unbind(window,"resize",t.__resizeHandler),t.saveToLocalStorageIfPossible&&We.unbind(window,"unload",t.saveToLocalStorageIfPossible)}function PG(t,r){var e=t.__preset_select[t.__preset_select.selectedIndex];r?e.innerHTML=e.value+"*":e.innerHTML=e.value}function $Nt(t,r,e){if(e.__li=r,e.__gui=t,ht.extend(e,{options:function(a){if(arguments.length>1){var o=e.__li.nextElementSibling;return e.remove(),KS(t,e.object,e.property,{before:o,factoryArgs:[ht.toArray(arguments)]})}if(ht.isArray(a)||ht.isObject(a)){var l=e.__li.nextElementSibling;return e.remove(),KS(t,e.object,e.property,{before:l,factoryArgs:[a]})}},name:function(a){return e.__li.firstElementChild.firstElementChild.innerHTML=a,e},listen:function(){return e.__gui.listen(e),e},remove:function(){return e.__gui.remove(e),e}}),e instanceof AG){var i=new x3(e.object,e.property,{min:e.__min,max:e.__max,step:e.__step});ht.each(["updateDisplay","onChange","onFinishChange","step","min","max"],function(s){var a=e[s],o=i[s];e[s]=i[s]=function(){var l=Array.prototype.slice.call(arguments);return o.apply(i,l),a.apply(e,l)}}),We.addClass(r,"has-slider"),e.domElement.insertBefore(i.domElement,e.domElement.firstElementChild)}else if(e instanceof x3){var n=function(a){if(ht.isNumber(e.__min)&&ht.isNumber(e.__max)){var o=e.__li.firstElementChild.firstElementChild.innerHTML,l=e.__gui.__listening.indexOf(e)>-1;e.remove();var c=KS(t,e.object,e.property,{before:e.__li.nextElementSibling,factoryArgs:[e.__min,e.__max,e.__step]});return c.name(o),l&&c.listen(),c}return a};e.min=ht.compose(n,e.min),e.max=ht.compose(n,e.max)}else e instanceof tCe?(We.bind(r,"click",function(){We.fakeEvent(e.__checkbox,"click")}),We.bind(e.__checkbox,"click",function(s){s.stopPropagation()})):e instanceof iCe?(We.bind(r,"click",function(){We.fakeEvent(e.__button,"click")}),We.bind(r,"mouseover",function(){We.addClass(e.__button,"hover")}),We.bind(r,"mouseout",function(){We.removeClass(e.__button,"hover")})):e instanceof OG&&(We.addClass(r,"color"),e.updateDisplay=ht.compose(function(s){return r.style.borderLeftColor=e.__color.toString(),s},e.updateDisplay),e.updateDisplay());e.setValue=ht.compose(function(s){return t.getRoot().__preset_select&&e.isModified()&&PG(t.getRoot(),!0),s},e.setValue)}function sCe(t,r){var e=t.getRoot(),i=e.__rememberedObjects.indexOf(r.object);if(i!==-1){var n=e.__rememberedObjectIndecesToControllers[i];if(n===void 0&&(n={},e.__rememberedObjectIndecesToControllers[i]=n),n[r.property]=r,e.load&&e.load.remembered){var s=e.load.remembered,a=void 0;if(s[t.preset])a=s[t.preset];else if(s[JS])a=s[JS];else return;if(a[i]&&a[i][r.property]!==void 0){var o=a[i][r.property];r.initialValue=o,r.setValue(o)}}}}function KS(t,r,e,i){if(r[e]===void 0)throw new Error('Object "'+r+'" has no property "'+e+'"');var n=void 0;if(i.color)n=new OG(r,e);else{var s=[r,e].concat(i.factoryArgs);n=jNt.apply(t,s)}i.before instanceof N0&&(i.before=i.before.__li),sCe(t,n),We.addClass(n.domElement,"c");var a=document.createElement("span");We.addClass(a,"property-name"),a.innerHTML=n.property;var o=document.createElement("div");o.appendChild(a),o.appendChild(n.domElement);var l=UG(t,o,i.before);return We.addClass(l,Tn.CLASS_CONTROLLER_ROW),n instanceof OG?We.addClass(l,"color"):We.addClass(l,NNt(n.getValue())),$Nt(t,l,n),t.__controllers.push(n),n}function xE(t,r){return document.location.href+"."+r}function NG(t,r,e){var i=document.createElement("option");i.innerHTML=r,i.value=r,t.__preset_select.appendChild(i),e&&(t.__preset_select.selectedIndex=t.__preset_select.length-1)}function QDe(t,r){r.style.display=t.useLocalStorage?"block":"none"}function ZNt(t){var r=t.__save_row=document.createElement("li");We.addClass(t.domElement,"has-save"),t.__ul.insertBefore(r,t.__ul.firstChild),We.addClass(r,"save-row");var e=document.createElement("span");e.innerHTML=" ",We.addClass(e,"button gears");var i=document.createElement("span");i.innerHTML="Save",We.addClass(i,"button"),We.addClass(i,"save");var n=document.createElement("span");n.innerHTML="New",We.addClass(n,"button"),We.addClass(n,"save-as");var s=document.createElement("span");s.innerHTML="Revert",We.addClass(s,"button"),We.addClass(s,"revert");var a=t.__preset_select=document.createElement("select");if(t.load&&t.load.remembered?ht.each(t.load.remembered,function(h,p){NG(t,p,p===t.preset)}):NG(t,JS,!1),We.bind(a,"change",function(){for(var h=0;h{let t=lCe[0],r={};for(let e of lCe)if((e==null?void 0:e[1])in document){for(let[n,s]of e.entries())r[t[n]]=s;return r}return!1})(),cCe={change:dd.fullscreenchange,error:dd.fullscreenerror},sl={request(t=document.documentElement,r){return new Promise((e,i)=>{let n=()=>{sl.off("change",n),e()};sl.on("change",n);let s=t[dd.requestFullscreen](r);s instanceof Promise&&s.then(n).catch(i)})},exit(){return new Promise((t,r)=>{if(!sl.isFullscreen){t();return}let e=()=>{sl.off("change",e),t()};sl.on("change",e);let i=document[dd.exitFullscreen]();i instanceof Promise&&i.then(e).catch(r)})},toggle(t,r){return sl.isFullscreen?sl.exit():sl.request(t,r)},onchange(t){sl.on("change",t)},onerror(t){sl.on("error",t)},on(t,r){let e=cCe[t];e&&document.addEventListener(e,r,!1)},off(t,r){let e=cCe[t];e&&document.removeEventListener(e,r,!1)},raw:dd};Object.defineProperties(sl,{isFullscreen:{get:()=>Boolean(document[dd.fullscreenElement])},element:{enumerable:!0,get:()=>{var t;return(t=document[dd.fullscreenElement])!=null?t:void 0}},isEnabled:{enumerable:!0,get:()=>Boolean(document[dd.fullscreenEnabled])}});dd||(sl={isEnabled:!1});var I3=sl;function uCe(t,r,e,i,n,s,a){let o=t.addFolder(r);o.add(e,"x",n,s,a).onChange(i),o.add(e,"y",n,s,a).onChange(i),o.add(e,"z",n,s,a).onChange(i)}var S3=class{constructor(r){this.exploderDict={};this.controls={showGroundGrid:!1,showGrassGround:!1,skyMode:["None","Black Background","White Background","Gradient ramp","Cloudy"],environments:["None","Default (City Streat 64x32)","Venice Sunset","Footprint Court (HDR Labs)","City Street"],homeView:()=>console.log("[DGH] Go to home view"),views:["Top","Bottom","Front","Back","Left","Right"],OrthographicCamera:!1,viewpoints:!1,annotations:!1,takeSnapshot:()=>console.log("[DGH] Taking snapshot..."),fullScreen:()=>console.log("[DGH] Full screen..."),webcam:!1,uploadFile:()=>console.log("[DGH] Upload file..."),showBimTree:!1,showPropertyPanel:!1,transparentMode:!1,showVertexNormals:!1,sectionMode:["No section","Box section","Plane section"],alVisible:!0,alColor:"#cccccc",alIntensity:1,dlColor:"#dddddd",showDlHelper:!1,hlVisible:!0,hlIntensity:1,hlColor:[255,255,255,.6],hlGroundColor:[200,255,200,.6],fogEnabled:!1,fogColor:14540253,fogNearDistance:1,fogFarDistance:1e3,composerEnabled:!1,renderPassEnabled:!1,fxaaEnabled:!1,saoEnabled:!1,ssaoEnabled:!1,outlineEnabled:!1,ssaaEnabled:!1,bloomEnabled:!1,unrealBloomEnabled:!1};this.viewer=r,this.init()}init(){if(!this.viewer||!this.viewer.renderer||!this.viewer.scene)throw new Error("Need to initialize renderer, scene first!");let r=this.viewer,e=this.viewer.scene,i=this.controls;this.gui=new oCe({name:"controls",autoPlace:!0,width:300,closed:!0}),this.gui.domElement.style.opacity="0.6";let n=this.gui.addFolder("Common settings");n.add(i,"showGroundGrid").name("Show ground grid").onChange(m=>{r.groundGrid?r.groundGrid.visible=m:m&&(r.groundGrid=Ks.createGroundGrid(),e.add(r.groundGrid),r.enableRender()),r.enableRender()}),n.add(i,"showGrassGround").name("Show grass ground").onChange(m=>{r.grassGround?r.grassGround.visible=m:m&&ot(this,null,function*(){r.grassGround=yield Ks.createGrassGround(),e.add(r.grassGround),r.enableRender()}),r.enableRender()});let s=n.add(i,"skyMode",i.skyMode).name("Sky mode");s.onChange(m=>{if(r.skyOfGradientRamp&&(r.skyOfGradientRamp.visible=m==="Gradient ramp"),m==="Black Background")e.background=new Ve(0);else if(m==="White Background")e.background=new Ve(16777215);else if(m==="Gradient ramp")r.skyOfGradientRamp||(r.skyOfGradientRamp=Xo.createSkyOfGradientRamp(),e.add(r.skyOfGradientRamp)),r.skyOfGradientRamp.visible=!0;else if(m==="Cloudy"){let g=["right.jpg","left.jpg","top.jpg","bottom.jpg","front.jpg","back.jpg"];g=g.map(y=>`${window.location.origin}/images/skybox/cloudy/${y}`),Xo.createSkyFromTextures(g).then(y=>{e.background=y})}else e.background=r.sceneBackgroundColor;r.enableRender()}),s.setValue("Gradient ramp"),n.add(i,"environments",i.environments).name("Environments").onChange(m=>{let g="";if(m==="Default (City Streat 64x32)"){if(r.pmremGenerator){Lc.createEnvTextureFromDataArray(r.pmremGenerator).then(y=>{e.environment=y}),r.enableRender();return}}else m==="Venice Sunset"?g="venice_sunset_1k.hdr":m==="Footprint Court (HDR Labs)"?g="footprint_court_2k.hdr":m==="City Street"&&(g="city_street_256.hdr");g===""?e.environment=null:(g=`${window.location.origin}/images/envmap/${g}`,Lc.createEnvTexture(r.pmremGenerator,g).then(y=>{e.environment=y})),r.enableRender()}),n.add(i,"homeView").name("Go to home view").onChange(()=>{r.goToHomeView()}),n.add(i,"views",i.views).name("Views").onChange(m=>{var x;let g=new A,y=new A,E=vn.getVisibleObjectBoundingBox(e),b=bs.getCameraDirectionByView(m);bs.getCameraPositionByBboxAndDirection(E,g,y,(x=r.camera)==null?void 0:x.projectionMatrix,b),r.flyTo(g,y)}),n.add(i,"OrthographicCamera").name("Orth Camera").onChange(m=>{r.setToOrthographicCamera(m)}),n.add(i,"takeSnapshot").name("Take snapshot").onChange(()=>{}),n.add(i,"fullScreen").name("Full screen").onChange(()=>{I3&&I3.isEnabled&&I3.request(),r.enableRender()}),n.add(i,"uploadFile").name("Upload file").onChange(()=>{new CS(r).openFileBrowserToUpload()});let o=this.gui.addFolder("Model operations");o.add(i,"transparentMode",i.transparentMode).name("Transparent mode").onChange(m=>{r.addOrRemoveObjectOpacity(m),r.enableRender()}),o.add(i,"showVertexNormals",i.showVertexNormals).name("Show Vertex Normals").onChange(m=>{r.showVertexNormals(m),r.enableRender()}),o.add(i,"sectionMode",i.sectionMode).name("Section mode").onChange(m=>{m==="No section"?r.deactivateSection():m==="Box section"?r.activateSection("ObjectsBoxSection"):m==="Plane section"&&r.activateSection("PickPlaneSection"),r.enableRender()});let l=this.viewer.ambientLight,c=this.gui.addFolder("Ambient light");c.add(i,"alVisible",i.alVisible).name("visible").onChange(m=>{l&&(l.visible=m),r.enableRender()}),c.addColor(i,"alColor").name("color").onChange(m=>{l&&(l.color=new Ve(m)),r.enableRender()}),c.add(i,"alIntensity",0,5).name("intensity").onChange(m=>{l&&(l.intensity=m),r.enableRender()});let u=this.viewer.directionalLight;if(u){let m=this.gui.addFolder("Directional light");m.add(u,"visible").name("visible").onChange(E=>{u&&(u.visible=E),r.enableRender()}),m.addColor(i,"dlColor").name("color").onChange(E=>{u&&(u.color=new Ve(E)),r.enableRender()}),m.add(u,"intensity",0,5).name("intensity").onChange(E=>{u&&(u.intensity=E),r.enableRender()}),m.add(u,"castShadow").name("castShadow").onChange(E=>{u&&(u.castShadow=E),r.enableRender()}),m.add(i,"showDlHelper").name("showDlHelper").onChange(E=>{r.showDirectionalLightHelper(E),r.enableRender()});let g=()=>{r.updateDirectionalLight(),r.enableRender()};uCe(m,"position",u.position,g),uCe(m,"target",u.target.position,g);let y=m.addFolder("shadow");y.add(u.shadow.camera,"near").name("near").onChange(g),y.add(u.shadow.camera,"far").name("far").onChange(g),y.add(u.shadow.camera,"zoom").name("zoom").onChange(g)}let h=this.viewer.hemisphereLight,p=this.gui.addFolder("Hemisphere Light");p.add(i,"hlVisible",i.hlVisible).name("visible").onChange(m=>{h&&(h.visible=m),r.enableRender()}),p.add(i,"hlIntensity",0,5).name("intensity").onChange(m=>{h&&(h.intensity=m),r.enableRender()}),p.addColor(i,"hlColor").name("color").onChange(m=>{h&&(h.color=new Ve(m)),r.enableRender()}),p.addColor(i,"hlGroundColor").name("groundColor").onChange(m=>{h&&(h.groundColor=new Ve(m)),r.enableRender()});let d=this.gui.addFolder("Fog");d.add(i,"fogEnabled",i.fogEnabled).name("Enabled").onChange(m=>{m?e.fog=new Uu(i.fogColor,i.fogNearDistance,i.fogFarDistance):e.fog=null,r.enableRender()}),d.add(i,"fogNearDistance",0,100).name("Near").onChange(m=>{i.fogEnabled&&e&&(e.fog=new Uu(i.fogColor,m,i.fogFarDistance)),r.enableRender()}),d.add(i,"fogFarDistance",100,2e3).name("Far").onChange(m=>{i.fogEnabled&&e&&(e.fog=new Uu(i.fogColor,i.fogNearDistance,m)),r.enableRender()});let f=this.gui.addFolder("Composer");f.add(i,"composerEnabled",i.composerEnabled).name("Composer Enabled").onChange(m=>{r.enableComposer(m)}),f.add(i,"renderPassEnabled",i.renderPassEnabled).name("RenderPass Enabled").onChange(m=>{r.enableRenderPass(m)}),f.add(i,"fxaaEnabled",i.fxaaEnabled).name("Effect FXAA Enabled").onChange(m=>{r.enableFxaaPass(m)}),f.add(i,"saoEnabled",i.saoEnabled).name("SAO Enabled").onChange(m=>{r.enableSaoPass(m)}),f.add(i,"ssaoEnabled",i.ssaoEnabled).name("SSAO Enabled").onChange(m=>{r.enableSsaoPass(m)}),f.add(i,"outlineEnabled",i.outlineEnabled).name("OutlinePass Enabled").onChange(m=>{r.enableOutlinePass(m)}),f.add(i,"ssaaEnabled",i.ssaaEnabled).name("SSAA Enabled").onChange(m=>{r.enableSsaaPass(m)}),f.add(i,"bloomEnabled",i.bloomEnabled).name("Bloom Enabled").onChange(m=>{r.enableBloomPass(m)}),f.add(i,"unrealBloomEnabled",i.unrealBloomEnabled).name("Unreal Bloom Enabled").onChange(m=>{r.enableUnrealBloomPass(m)})}setExplodeMode(r,e=!1){!this.viewer||!this.viewer.scene||!this.viewer.loadedModels||!this.exploderDict||(r?vn.explodeObjects(this.viewer.scene,this.exploderDict,Object.values(this.viewer.loadedModels).map(i=>i.id),e):vn.unexplodeObjects(this.viewer.scene,this.exploderDict||{}))}open(){this.gui&&this.gui.open()}close(){this.gui&&this.gui.close()}beforeDestroy(){this.viewer=void 0,this.gui&&this.gui.destroy(),this.gui=void 0,this.exploderDict=[]}};var _3=class{constructor(){this.vertexShader=` - varying vec2 vUv; - void main( void ) { - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0); - }`;this.fragmentShader=` - uniform vec3 keyColor; - uniform float similarity; - uniform float smoothness; - varying vec2 vUv; - uniform sampler2D map; - void main() { - vec4 videoColor = texture2D(map, vUv); - - float Y1 = 0.299 * keyColor.r + 0.587 * keyColor.g + 0.114 * keyColor.b; - float Cr1 = keyColor.r - Y1; - float Cb1 = keyColor.b - Y1; - - float Y2 = 0.299 * videoColor.r + 0.587 * videoColor.g + 0.114 * videoColor.b; - float Cr2 = videoColor.r - Y2; - float Cb2 = videoColor.b - Y2; - - float blend = smoothstep(similarity, similarity + smoothness, distance(vec2(Cr2, Cb2), vec2(Cr1, Cb1))); - gl_FragColor = vec4(videoColor.rgb, videoColor.a * blend); - }`;let r=document.createElement("video");this.webcam=r;let e={video:{width:600,height:400}};navigator.mediaDevices.getUserMedia(e).then(s=>{r.srcObject=s,r.onloadedmetadata=()=>{r.setAttribute("autoplay","true"),r.setAttribute("playsinline","true"),r.play()}}).catch(function(s){alert(s.name+": "+s.message)}),this.webcamCanvas=document.createElement("canvas");let i=this.webcamCanvas.getContext("2d");this.canvasCtx=i,i.fillStyle="#000000",i.fillRect(0,0,this.webcamCanvas.width,this.webcamCanvas.height);let n=new Hi(this.webcamCanvas);this.webcamTexture=n,n.minFilter=ai,n.magFilter=ai,this.shaderMaterial=new Yt({transparent:!0,uniforms:{map:{value:n},keyColor:{value:[0,1,0]},similarity:{value:.3},smoothness:{value:0}},vertexShader:this.vertexShader,fragmentShader:this.fragmentShader})}getShaderMaterial(){return this.shaderMaterial}createWebCamPlane(r=5,e=4){let i=new ts(r,e);return new Je(i,this.shaderMaterial)}animate(){this.webcam.readyState===this.webcam.HAVE_ENOUGH_DATA&&(this.canvasCtx.drawImage(this.webcam,0,0,this.webcamCanvas.width,this.webcamCanvas.height),this.webcamTexture.needsUpdate=!0)}};var hCe=new A,pCe=new zi,BG=class extends Jf{constructor(e,i){var n;super(e);this.name="BimViewer";this.timer=Date.now();this.selectedObject=void 0;this.sceneBackgroundColor=new Ve(15463159);this.loadedModels={};this.loaded3dTiles={};this.composerRenderEnabled=!0;this.composerEnabled=!1;this.savedMaterialsForOpacity=[];this.mouseMoved=!1;this.mouseDoubleClicked=!1;this.raf=new uT;this.renderEnabled=!0;this.isFrustumInsectChecking=!1;this.lastFrameExecuteTime=Date.now();this.maxFps=60;this.events=[];this.settings=sT;this.jobCount=0;this.twoDModelCount=0;this.bbox=new Ot;this.onResize=()=>{var i;let e=(i=this.renderer)==null?void 0:i.domElement;e&&e.parentElement&&this.resize(e.parentElement.clientWidth,e.parentElement.clientHeight)};this.enableRender=(e=1e3)=>{this.renderEnabled=!0,this.raf&&(this.timeoutSymbol&&this.raf.clearTimeout(this.timeoutSymbol),this.timeoutSymbol=this.raf.setTimeout(()=>{this.renderEnabled=!1,this.composerRenderEnabled=!0},e))};this.applyOptionsAndAddToScene=(e,i,n)=>{ne.info(`[BimViewer] '${e}' is loaded in ${(Date.now()-this.timer)/1e3}s, adding to scene...`),this.timer=Date.now();let s=n.src&&n.src.toLowerCase();if(s&&s.endsWith("dxf")&&this.twoDModelCount++,n.matrix&&n.matrix.length===16){let l=new Ue;l.elements=n.matrix,i.applyMatrix4(l)}else{let l=n.position||[0,0,0],c=n.rotation||[0,0,0],u=n.scale||[1,1,1];i.position.set(l[0],l[1],l[2]),i.rotation.set(c[0]*Math.PI/180,c[1]*Math.PI/180,c[2]*Math.PI/180),i.scale.set(u[0],u[1],u[2])}i.matrixAutoUpdate=!1,i.updateMatrix(),i.traverse(l=>{!!1&&l.matrixAutoUpdate&&(l.matrixAutoUpdate=!1,l.updateMatrix())});let a=n.instantiate,o=n.merge;a?setTimeout(()=>{this.instantiate(i),setTimeout(()=>{o&&this.merge(i),this.addLoadedModelToScene(i,n)},0)},0):o?setTimeout(()=>{this.merge(i),setTimeout(()=>this.addLoadedModelToScene(i,n),0)},0):this.addLoadedModelToScene(i,n)};this.updateOrbPoint=()=>{var e;((e=this.anchor)==null?void 0:e.className.indexOf("active"))!==-1&&this.lastOrbPoint&&this.controls&&this.controls.setOrbitPoint(this.lastOrbPoint)};this.onPointerDown=e=>{var i,n;!((i=this.controls)!=null&&i.enableRotate)||!this.renderer||(n=this.sectionManager)!=null&&n.isSectionActive()||this.setOrbitPoint(e)};this.onAnchorPointerUp=()=>{this.anchor&&(this.anchor.className="anchor")};this.viewerCfg=Ur(Ur({},vDe),e),ne.info("[BimViewer]","viewerCfg:",this.viewerCfg),this.settings=sT,this.cameraCfg=i,this.cameraCfg&&this.cameraCfg.near&&(this.settings.camera.near=this.cameraCfg.near),this.cameraCfg&&this.cameraCfg.far&&(this.settings.camera.far=this.cameraCfg.far),this.increaseJobCount(),this.init(),this.animate(),this.renderer&&((n=this.viewerContainer)==null||n.append(this.renderer.domElement)),window.addEventListener("resize",this.onResize),window.addEventListener("keyup",s=>{s.altKey&&s.code==="KeyR"&&this.flyToRandomObject()}),this.decreaseJobCount(),ne.info(`[BimViewer] Initialized in ${(Date.now()-this.timer)/1e3}s`)}init(){let e=this.viewerCfg;this.initSpinner(),this.initScene(),this.initRenderer(),this.initCamera(),this.initControls(),this.initLights(),this.initPointerEvents(),e.enableDatGui===!0&&this.initDatGui(),this.initOthers(),e.enableAxisGizmo===!0&&(this.axes=this.initAxes()),e.enableStats===!0&&(this.stats=this.initStats()),e.enableToolbar&&(this.toolbar=this.initToolbar()),e.enableBottomBar&&(this.bottomBar=this.initBottomBar()),e.enableNavCube&&(this.navCube=this.initNavCube()),e.enableContextMenu&&(this.contextMenu=this.initContextMenu())}initScene(){this.scene=new On,this.scene.matrixAutoUpdate=!1}initRenderer(){this.renderer=new Pl({antialias:!0,preserveDrawingBuffer:!0}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),this.renderer.outputEncoding=yr,this.renderer.toneMappingExposure=1,this.renderer.physicallyCorrectLights=!0,this.renderer.setClearColor(11119017,1),this.renderer.shadowMap.enabled=!0,this.renderer.shadowMap.type=Ly,St.printGpuInfo(this.renderer.getContext()),this.pmremGenerator=new yp(this.renderer),this.pmremGenerator.compileEquirectangularShader(),this.enableOverlayRenderer&&(this.overlayRender=new Dr(this)),this.setEnvironmentFromDataArray()}initCamera(){this.scene&&(this.perspectiveCamera=new qr(45,this.width/this.height,this.settings.camera.near,this.settings.camera.far),this.perspectiveCamera.layers.enable(11),this.perspectiveCamera.position.set(0,100,0),this.scene.add(this.perspectiveCamera),this.camera=this.perspectiveCamera)}initControls(e=!1){if(!this.renderer)return;aT.printDeviceInfo();let i=e?this.orthoCamera:this.perspectiveCamera;if(!i)return;let n;(!this.perspectiveCameraControls||!this.orthoCameraConrols)&&(n=new fO(i,this.renderer.domElement),n.dollyToCursor=!1,n.enableDamping=!0,n.dampingFactor=.5,n.enabled=!0,n.keyPanSpeed=10,n.keys={LEFT:"KeyD",UP:"KeyE",RIGHT:"KeyA",BOTTOM:"KeyQ"},n.listenToKeyEvents(document.body),n.update()),n&&(e?(this.orthoCameraConrols=n,n.minZoom=3):(this.perspectiveCameraControls=n,this.bbox&&(n.minDistance=.1,n.maxDistance=this.bbox.getSize(new A).length()*3)),this.controls=n,this.addEvent(n,"update",this.onControlsChange(this)),this.addEvent(window,"keydown",this.onKeyDown(this)))}initRotateToCursor(){var e,i,n;this.anchor=this.createAnchor(),(e=this.renderer)==null||e.domElement.addEventListener("pointerdown",this.onPointerDown),(i=this.renderer)==null||i.domElement.addEventListener("pointerup",this.onAnchorPointerUp),(n=this.controls)==null||n.addEventListener("update",this.updateOrbPoint)}onControlsChange(e){return()=>{e.enableRender()}}onKeyDown(e){return i=>{let n=e.camera,s=e.controls;if(!n||!s)return;let a=this.settings.keyboard.sensitivity||3,o=s.position,l=s.target,c=l.clone();if(i.code==="ArrowLeft"||i.code==="ArrowRight"){let h=Math.PI*a/180;i.code==="ArrowLeft"&&(h=-h),c.x=(l.x-o.x)*Math.cos(h)-(l.z-o.z)*Math.sin(h)+o.x,c.z=(l.z-o.z)*Math.cos(h)+(l.x-o.x)*Math.sin(h)+o.z,s.target=c,s.update()}else if(i.code==="ArrowUp"||i.code==="ArrowDown"){let h=Math.PI*a/180,d=new A(l.x-o.x,l.y-o.y,l.z-o.z).length(),f=l.y-o.y;i.code==="ArrowDown"&&(h=-h);let m=Math.asin(f/d)+h;if(m<-Math.PI/2||m>Math.PI/2)return;let g=Math.sin(m)*d;c.y=l.y+(g-f),s.target=c,s.update()}else if(i.code==="KeyW"){let u=a*.01,h=o.distanceTo(l);h0){let h=u.find(p=>{let d=p.object;return d.visible&&d instanceof Je});if(h&&h.point&&this.camera&&this.controls){let p=this.camera.position,d=h.point,f=this.controls.target,m=p.distanceTo(d);if(m>n.near&&m{if(!e.mouseDoubleClicked){switch(i.button){case bi.LEFT:{e.handleMouseClick(i);break}case bi.MIDDLE:break;case bi.RIGHT:{e.handleRightClick(i);break}default:}e.enableRender()}}}initLights(){if(!this.scene)return;let e=16777215,i=1.5,n=new $s(e,i);n.name="sun",n.castShadow=!0,n.position.set(-2,2,4),n.shadow.autoUpdate=!1,n.shadow.mapSize.width=1024,n.shadow.mapSize.height=1024,this.directionalLight=n,this.scene.add(n),this.scene.add(n.target),this.directionalLightHelper=new Ex(this.directionalLight),this.directionalLightHelper.traverse(s=>{s.layers.set(11)}),this.directionalLightHelper.visible=!1,this.scene.add(this.directionalLightHelper),this.shadowCameraHelper=new bx(this.directionalLight.shadow.camera),this.shadowCameraHelper.layers.set(11),this.shadowCameraHelper.visible=!1,this.scene.add(this.shadowCameraHelper),this.ambientLight=new Ol(3158064),this.hemisphereLight=new pf(e,14540253,2),this.hemisphereLight.position.set(0,300,0),this.scene.add(this.ambientLight),this.scene.add(this.hemisphereLight)}initPointerEvents(){if(!this.renderer||!this.camera||!this.controls)return;let e=-1,i=-1;this.renderer.domElement.addEventListener("pointerdown",n=>{e=n.x,i=n.y,this.mouseMoved=!1,setTimeout(()=>{this.dynamicallyUpdateControllerTarget()},10),this.enableRender()}),this.renderer.domElement.addEventListener("pointermove",n=>{this.section&&this.enableRender(),e>=0&&i>=0&&(Math.abs(n.x-e)>5||Math.abs(n.y-i)>5)&&(this.mouseMoved=!0)}),this.renderer.domElement.addEventListener("pointerup",n=>{var s;!this.mouseMoved&&!this.mouseDoubleClicked&&!this.section&&!((s=this.measurementManager)!=null&&s.isMeasurementActive())&&setTimeout(this.onPointerUp(this,n),200),this.mouseDoubleClicked&&setTimeout(()=>{this.mouseDoubleClicked=!1},200),e=-1,i=-1}),this.renderer.domElement.addEventListener("dblclick",n=>{var s;this.mouseDoubleClicked=!0,!this.mouseMoved&&!this.section&&!((s=this.measurementManager)!=null&&s.isMeasurementActive())&&(this.handleMouseClick(n),this.flyToSelectedObject(),this.enableRender())}),this.initRotateToCursor(),this.raycaster=new Oc}initDatGui(){this.datGui=new S3(this),this.datGui.close()}initSpinner(){var s;if(!this.viewerCfg.enableSpinner)return;let i=document.createElement("div");i.classList.add("bim-viewer-spinner");let n=document.createElement("div");n.classList.add(ho,"icon-loading"),i.append(n),(s=this.widgetContainer)==null||s.appendChild(i),this.spinner=i,this.setSpinnerVisibility(this.jobCount>0)}initOthers(){if(!this.scene||!this.renderer||!this.camera)return;let e=this.datGui&&this.datGui.controls;e&&(e.showGroundGrid&&(this.groundGrid=Ks.createGroundGrid(),this.scene.add(this.groundGrid)),e.showGrassGround&&ot(this,null,function*(){this.grassGround=yield Ks.createGrassGround(),this.scene&&this.scene.add(this.grassGround),this.enableRender()}),e.webcam&&this.enableWebCam(),this.composerEnabled=e.composerEnabled,this.composerEnabled&&(this.enableComposer(!0),this.enableRenderPass(e.renderPassEnabled),this.enableFxaaPass(e.fxaaEnabled),this.enableSaoPass(e.saoEnabled),this.enableSsaoPass(e.ssaoEnabled),this.enableOutlinePass(e.outlineEnabled),this.enableSsaaPass(e.ssaaEnabled),this.enableBloomPass(e.bloomEnabled),this.enableUnrealBloomPass(e.unrealBloomEnabled))),this.renderer.domElement.style.outlineWidth="0"}initNavCube(){var n;let e=document.createElement("div");e.id="navCube";let i=new BO;return i.renderer&&(e.appendChild(i.renderer.domElement),i.setHostViewer(this)),(n=this.widgetContainer)==null||n.appendChild(e),i}initAxes(){var n,s;let e=document.createElement("div");e.classList.add("axesRenderer");let i=new If(e,this.camera);return(n=this.widgetContainer)==null||n.append(e),this.axesInScene=new iT(!1),(s=this.scene)==null||s.add(this.axesInScene),i}initStats(){var n;let e=u3();e.setMode(0);let i=document.createElement("div");return i.classList.add("statsOutput"),i.appendChild(e.domElement),(n=this.widgetContainer)==null||n.append(i),e}initContextMenu(){let e=new v3({items:VDe,context:{bimViewer:this,toolbar:this.toolbar,section:this.section},container:this.widgetContainer});return window.oncontextmenu=i=>i.preventDefault(),e}initToolbar(){let e=this.viewerCfg;return new vh(this,(0,lm.merge)(fDe,e.toolbarMenuConfig))}initBottomBar(){return new nm(this)}get has2dModel(){return this.twoDModelCount>0}showContextMenu(e){if(!this.contextMenu||!this.widgetContainer)return;let i=this.getAllIntersections(e);ne.debug("[BimViewer] showContextMenu intersections = ",i);let n=(0,lm.find)(i,h=>{let p=h.object;return p instanceof Je&&p.visible}),s=this.contextMenu.context,a=n==null?void 0:n.instanceId,o=n==null?void 0:n.faceIndex,l;o&&(l=ji.getBatchIdByFaceIndex(n==null?void 0:n.object,o)),this.contextMenu.context=Mn(Ur({},s),{hit:n==null?void 0:n.object,instanceId:a,batchId:l});let{x:c,y:u}=Mr.getScreenPointByEvent(e,this.widgetContainer);this.contextMenu.show(c,u)}handleRightClick(e){this.showContextMenu(e)}sycnCameraPosition(e,i){let n=e.position;if(i.position.set(n.x,n.y,n.z),this.scene){let s=this.scene.position;i.lookAt(s)}}sycnControls(e,i,n){let s=n,a=e.target;i.center?i.center.set(s.x,s.y,s.z):i.center=s.clone(),i.position=e.position,i.target=a,i.update()}setToOrthographicCamera(e=!1){var o;if(!this.scene||!this.controls)return;let i=this.perspectiveCamera,n=this.perspectiveCameraControls,s=this.orthoCamera,a=this.orthoCameraConrols;e?(s||(s=new Zi(-this.width/2,this.width/2,this.height/2,-this.height/2,this.settings.camera.near,this.settings.camera.far),s.layers.enable(11),s.position.set(0,100,0),s.zoom=10,s.updateProjectionMatrix(),this.scene&&this.scene.add(s),this.orthoCamera=s),a||(this.initControls(!0),a=this.orthoCameraConrols),i&&(this.sycnCameraPosition(i,s),s.zoom=10,s.updateProjectionMatrix()),n&&a&&i&&this.sycnControls(n,a,i.position),this.camera=s,this.controls=a):(i&&s&&this.sycnCameraPosition(s,i),n&&a&&s&&this.sycnControls(a,n,s.position),this.camera=i,this.controls=n),(o=this.axes)==null||o.setHostCamera(this.camera),this.resize(this.width,this.height),this.dispatchEvent("CameraChanged")}animate(){var e,i;if(requestAnimationFrame(this.animate.bind(this)),this.maxFps>0){if(Date.now()-this.lastFrameExecuteTime<1e3/this.maxFps)return;this.lastFrameExecuteTime=Date.now()}this.webcam&&this.webcam.animate(),this.controls&&this.controls.update(),this.scene&&this.camera&&this.renderEnabled&&(this.update3dTiles(),this.renderer&&this.renderer.render(this.scene,this.camera),this.dispatchEvent("RenderAfter")),this.composerRenderEnabled&&this.composer&&this.composerEnabled&&(this.composer.render(),this.composerRenderEnabled=!1),this.frustrumCullingByModelBBox(),(e=this.stats)==null||e.update(),(i=this.bottomBar)==null||i.update()}update3dTiles(){if(!this.camera)return;let e=Object.values(this.loaded3dTiles);e.length!==0&&(this.camera.updateMatrixWorld(),e.forEach(i=>{i.renderer.update()}))}frustrumCullingByModelBBox(){let e=new eo,i=new Ue;this.isFrustumInsectChecking=!0,this.camera&&(i.multiplyMatrices(this.camera.projectionMatrix,this.camera.matrixWorldInverse),e.setFromProjectionMatrix(i),Object.values(this.loadedModels).forEach(n=>{let s=this.scene&&this.scene.getObjectById(n.id),a=n.bbox;s&&a&&this.scene&&(typeof s.userData._visible=="undefined"&&(s.userData._visible=!0,Object.defineProperties(s,{visible:{set:o=>{s.userData._visible=o,this.isFrustumInsectChecking||(s.userData.userConfigVisibility=!0)},get:()=>s.userData._visible}})),typeof s.userData.userConfigVisibility=="undefined"&&(a.geometry.computeBoundingBox(),a.geometry.boundingBox&&(s.visible=e.intersectsBox(a.geometry.boundingBox))))}),Object.values(this.loaded3dTiles).forEach(n=>{let s=n.renderer.group;s&&!n.bbox.isEmpty()&&this.scene&&(typeof s.userData._visible=="undefined"&&(s.userData._visible=!0,Object.defineProperties(s,{visible:{set:a=>{s.userData._visible=a,this.isFrustumInsectChecking||(s.userData.userConfigVisibility=!0)},get:()=>s.userData._visible}})),typeof s.userData.userConfigVisibility=="undefined"&&(s.visible=e.intersectsBox(n.bbox)))})),this.isFrustumInsectChecking=!1}destroy(){var i,n,s;this.events.forEach(a=>a.node.removeEventListener(a.type,a.func)),this.events=[],this.datGui&&this.datGui.gui&&(this.datGui.beforeDestroy(),this.datGui=void 0);let e=this.webcamPlane;this.scene&&e&&(this.scene.remove(e),e.geometry.dispose(),e.material.dispose(),this.webcamPlane=void 0),this.webcam=void 0,this.composer=void 0,this.renderPass=void 0,this.effectFxaaPass=void 0,this.saoPass=void 0,this.ssaoPass=void 0,this.outlinePass=void 0,this.ambientLight=void 0,this.directionalLight=void 0,this.hemisphereLight=void 0,this.directionalLightHelper&&(this.directionalLightHelper.dispose(),this.directionalLightHelper=void 0),this.controls&&(this.disposeRotateToCursor(),this.controls.dispose(),this.controls=void 0),this.perspectiveCameraControls&&(this.perspectiveCameraControls.dispose(),this.perspectiveCameraControls=void 0),this.shadowCameraHelper&&(this.shadowCameraHelper.dispose(),this.shadowCameraHelper=void 0),this.stats=void 0,this.raycaster=void 0,this.selectedObject=void 0,this.groundGrid&&(this.groundGrid.geometry.dispose(),this.groundGrid.material.dispose(),this.groundGrid.clear(),this.groundGrid=void 0),this.grassGround&&(this.grassGround.geometry.dispose(),this.grassGround.material.dispose(),this.grassGround.clear(),this.grassGround=void 0),this.skyOfGradientRamp&&(this.skyOfGradientRamp.geometry.dispose(),this.skyOfGradientRamp.material.dispose(),this.skyOfGradientRamp.clear(),this.skyOfGradientRamp=void 0),this.savedMaterialsForOpacity=void 0,this.section=void 0,this.sectionType=void 0,Object.keys(this.loadedModels).forEach(a=>{delete this.loadedModels[a]}),Object.values(this.loaded3dTiles).forEach(a=>{a.renderer.dispose()}),this.loaded3dTiles={},this.perspectiveCamera=void 0,this.perspectiveCameraControls=void 0,this.raf&&(this.timeoutSymbol&&this.raf.clearTimeout(this.timeoutSymbol),this.raf=void 0),this.contextMenu&&(this.contextMenu.destroy(),this.contextMenu=void 0),this.navCube&&(this.navCube.dispose(),this.navCube=void 0),this.axes&&(this.axes.dispose(),this.axes=void 0),this.axesInScene&&(this.axesInScene.clear(),this.axesInScene=void 0),this.toolbar&&(this.toolbar.destroy(),this.toolbar=void 0),this.spinner&&(this.spinner.remove(),this.spinner=void 0),this.bottomBar=void 0,this.pmremGenerator&&(this.pmremGenerator.dispose(),this.pmremGenerator=void 0),(i=this.measurementManager)==null||i.destroy(),this.measurementManager=void 0,(n=this.zoomToRect)==null||n.destroy(),this.zoomToRect=void 0,(s=this.sectionManager)==null||s.destroy(),this.sectionManager=void 0,window.removeEventListener("resize",this.onResize),super.destroy()}loadLocalModel(e,i,n,s){return ot(this,null,function*(){this.timer=Date.now(),this.increaseJobCount();let a;try{a=yield new Zc(n).loadLocalModel(e,i.src,s)}catch(o){let l=`Error loading ${i.src}`;return ne.error(l,o),Promise.reject(l)}finally{this.decreaseJobCount()}return a?(this.applyOptionsAndAddToScene(e,a,i),Promise.resolve()):Promise.reject()})}loadModel(e,i){return ot(this,null,function*(){this.timer=Date.now(),this.increaseJobCount();let n;try{n=yield new Zc().loadModel(e.src,e.fileFormat,i)}catch(s){let a=`Error loading ${e.src}`;return ne.error(a,s),Promise.reject(a)}finally{this.decreaseJobCount()}return n?(this.applyOptionsAndAddToScene(e.src,n,e),Promise.resolve()):Promise.reject()})}load3dTiles(e){return ot(this,null,function*(){var a;this.timer=Date.now(),this.increaseJobCount();let i=new LS(e.src),n=new Ot,s=yield new Promise((o,l)=>{i.onLoadTileSet=()=>{i.getBounds(n)||(i.getBoundingSphere(pCe)?pCe.getBoundingBox(n):(ne.warn(`[BimViewer] Can't get the correct bounding box of 3dTiles '${e.src}'!`),l())),ne.debug(n),i.onLoadTileSet=null;let u=i.group;ne.debug(u),o(u)},i.onLoadModel=c=>{c.traverse(u=>{!!1&&u.matrixAutoUpdate&&(u.matrixAutoUpdate=!1,u.updateMatrix()),u.isMesh&&(u.castShadow=!0,u.receiveShadow=!0)}),c.updateWorldMatrix(!1,!0),this.updateDirectionalLightShadow(),this.enableRender()},i.setCamera(this.camera),i.setResolutionFromRenderer(this.camera,this.renderer),i.update()});if(s){let o=Date.now(),l=e.modelId||e.src;if(this.loaded3dTiles[l]){let h=1;for(;this.loaded3dTiles[`${l}_${h}`];)h++;l=`${l}_${h}`,ne.warn(`[BimViewer] 3dTiles '${l}' is loaded more than once!`)}if(this.loaded3dTiles[l]={id:s.id,bbox:n,renderer:i},e.matrix&&e.matrix.length===16){let h=new Ue;h.elements=e.matrix,s.applyMatrix4(h)}else{let h=e.position||[0,0,0],p=e.rotation||[0,0,0],d=e.scale||[1,1,1];s.position.set(h[0],h[1],h[2]),s.rotation.set(p[0]*Math.PI/180,p[1]*Math.PI/180,p[2]*Math.PI/180),s.scale.set(d[0],d[1],d[2])}if(s.matrixAutoUpdate=!1,s.updateMatrix(),s.updateMatrixWorld(!0),(a=this.scene)==null||a.add(s),n.applyMatrix4(s.matrix),this.computeBoundingBox(),this.tryAdjustDirectionalLight(),Object.keys(this.loadedModels).length===0&&Object.keys(this.loaded3dTiles).length===1){let h=this.datGui&&this.datGui.controls;this.regenSkyOfGradientRamp(),h&&h.showGroundGrid&&this.regenGroundGrid(),this.tryAdjustCameraNearAndFar(),this.goToHomeView()}return ne.info(`[BimViewer] Added 3dTiles '${e.src}' to scene in ${(Date.now()-o)/1e3}s`),this.enableRender(),this.decreaseJobCount(),Promise.resolve()}return this.decreaseJobCount(),Promise.reject()})}addLoadedModelToScene(e,i){if(!this.scene)return;if(i.merge){let l=Date.now();JT.createMeshBvhAsync([e],{saveOriginalIndex:!0}),ne.info(`[BimViewer] Creates mesh bvh cost ${(Date.now()-l)/1e3}s`)}e.traverse(l=>{l.isMesh&&(l.castShadow=!0,l.receiveShadow=!0)}),this.scene.add(e);let n=new Lg(e);n.name="BIM_VIEWER_BOX_HELPER",n.visible=!1,n.matrixAutoUpdate=!1,n.material&&(n.material=void 0,n.layers.set(11));let s=i.modelId||i.src;if(this.loadedModels[s]){let l=1;for(;this.loadedModels[`${s}_${l}`];)l++;s=`${s}_${l}`,ne.warn(`[BimViewer] Model '${s}' is loaded more than once!`)}this.loadedModels[s]={id:e.id,bbox:n},this.computeBoundingBox(),this.tryAdjustDirectionalLight();let a=Object.values(this.loadedModels).map(l=>l.id);if(Object.values(this.loaded3dTiles).forEach(l=>a.push(l.id)),!a||a.length<=1){if(this.has2dModel)this.setToOrthographicCamera(!0),this.skyOfGradientRamp&&this.scene.remove(this.skyOfGradientRamp);else{let l=this.datGui&&this.datGui.controls;this.regenSkyOfGradientRamp(),l&&l.showGroundGrid&&this.regenGroundGrid()}this.tryAdjustCameraNearAndFar(),this.goToHomeView()}this.scene.add(n),i.edges&&Qr.addOutlines(e),ne.info(`[BimViewer] Added '${i.src}' to scene in ${(Date.now()-this.timer)/1e3}s`),this.enableRender(),this.decreaseJobCount()}addOrRemoveObjectOpacity(e=!0,i=.3,n,s){if(this.savedMaterialsForOpacity||(this.savedMaterialsForOpacity=[]),!this.scene)return;let a=this.scene,o=[],l=Object.values(this.loadedModels).map(c=>c.id);Object.values(this.loaded3dTiles).forEach(c=>l.push(c.id)),l.forEach(c=>{if(e){this.savedMaterialsForOpacity&&this.savedMaterialsForOpacity.length>0&&Qr.revertObjectOpacityById(a,c,this.savedMaterialsForOpacity);let u=Qr.setObjectOpacityById(a,c,i,n,s);o.push(...u)}else this.savedMaterialsForOpacity&&Qr.revertObjectOpacityById(a,c,this.savedMaterialsForOpacity)}),e?this.savedMaterialsForOpacity=o:this.savedMaterialsForOpacity=[],this.enableRender()}hasTransparentObject(){return!!(this.savedMaterialsForOpacity&&this.savedMaterialsForOpacity.length>0)}showVertexNormals(e,i=.1){var n,s,a;e?(this.vertexNormalsHelpers||(this.vertexNormalsHelpers=new hr),(n=this.scene)==null||n.traverseVisible(o=>{var c;let l=["SKYBOX","GROUND_GRID","GRASS_GROUND","BIM_VIEWER_BOX_HELPER"];if(o instanceof Je&&!l.includes(o.name)){if(!o.geometry.attributes.normal)return;let h=new c3(o,i,16711680);(c=this.vertexNormalsHelpers)==null||c.add(h)}}),(s=this.scene)==null||s.add(this.vertexNormalsHelpers)):this.vertexNormalsHelpers&&((a=this.scene)==null||a.remove(this.vertexNormalsHelpers),this.vertexNormalsHelpers=void 0)}resize(e,i){let n=this.camera;n&&(this.width=e||window.innerWidth,this.height=i||window.innerHeight,n instanceof qr?n.aspect=this.width/this.height:n instanceof Zi&&(n.left=-this.width/2,n.right=this.width/2,n.top=this.height/2,n.bottom=-this.height/2),n.updateProjectionMatrix(),this.renderer&&this.renderer.setSize(this.width,this.height),this.composer&&this.composer.setSize(this.width,this.height),this.effectFxaaPass&&this.effectFxaaPass.uniforms.resolution.value.set(1/this.width,1/this.height),this.overlayRender&&this.overlayRender.setSize(this.width,this.height)),this.enableRender()}getRaycaster(){return this.raycaster}getRaycastableObjectsByMouse(e){let i=[];if(!this.raycaster||!this.camera||!this.scene||!e||!this.viewerContainer)return i;let n;e instanceof MouseEvent?n=Mr.getScreenPointByEvent(e,this.viewerContainer):n=Mr.getScreenPointByTouchEvent(e,this.viewerContainer);let s=Mr.screenPoint2NdcPoint(n,this.camera,this.viewerContainer);return this.raycaster.setFromCamera(s,this.camera),i=this.getRaycastableObjects(),i}getRaycastableObjects(){let e=[];return Object.values(this.loadedModels).forEach(i=>{let n=this.scene&&this.scene.getObjectById(i.id);n&&n.visible&&e.push(n)}),Object.values(this.loaded3dTiles).forEach(i=>{let n=this.scene&&this.scene.getObjectById(i.id);n&&n.visible&&e.push(n)}),e}getIntersections(e){let i=this.getRaycastableObjectsByMouse(e);return this.raycaster&&this.raycaster.intersectObjects(i,!0)||[]}getAllIntersections(e){if(!this.raycaster||!this.camera||!this.scene||!this.viewerContainer)return[];let i=new le;e&&(e instanceof MouseEvent?i=Mr.getScreenPointByEvent(e,this.viewerContainer):i=Mr.getScreenPointByTouchEvent(e,this.viewerContainer));let n=Mr.screenPoint2NdcPoint(i,this.camera,this.viewerContainer);this.raycaster.setFromCamera(n,this.camera);let s=this.scene.children;return this.raycaster.intersectObjects(s,!0)||[]}handleMouseClick(e){var c,u,h;if((c=this.measurementManager)!=null&&c.isMeasurementActive()||(u=this.sectionManager)!=null&&u.isSectionActive())return;let i=Date.now(),n=this.getIntersections(e);ne.debug(`[BimViewer] getIntersections costs ${(Date.now()-i)/1e3}s`);let s=n.find(p=>{let d=p.object;return d.visible&&(d.userData.selectable!==!1||d instanceof Je)}),a=s&&s.object||void 0,o,l;if(a)if(a instanceof tn)o=s.instanceId,this.selectedObject&&this.selectedObject.id===a.id&&this.selectedObject.userData.instanceId===o&&(a=void 0);else if(ji.isMergedMesh(a)){let p=s&&s.faceIndex||-1;p>=0?(l=ji.getBatchIdByFaceIndex(a,p),this.selectedObject&&this.selectedObject.id===a.id&&this.selectedObject.userData.batchId===l&&(a=void 0)):a=void 0}else this.selectedObject&&this.selectedObject.id===a.id&&(a=void 0);if(n.length>0&&n[0].point){let p=(h=this.overlayRender)==null?void 0:h.getDrawablesByPosition(n[0].point,this.raycaster);if(p&&p.length>0){this.clearSelection(),p[0].selected=!0,this.selectedObject=p[0];return}}this.selectedObject&&this.clearSelection(),a?this.selectObject(a,o,l):this.clearSelection()}selectObject(e,i,n,s=void 0){if(this.selectedObject){let a=this.selectedObject.userData;if(a.instanceId!=null&&a.originalMatrix&&a.clonedMesh){this.scene&&this.scene.remove(a.clonedMesh);let o=this.selectedObject;if(o.setMatrixAt(a.instanceId,a.originalMatrix),o.instanceMatrix.needsUpdate=!0,o.updateMatrix(),delete a.instanceId,delete a.originalMatrix,e===a.clonedMesh){a.clonedMesh.geometry.dispose(),delete a.clonedMesh,this.selectedObject=void 0,this.outlinePass&&(this.outlinePass.selectedObjects=[]);return}a.clonedMesh.geometry.dispose(),delete a.clonedMesh}else if(a.batchId!=null&&a.clonedMesh){if(this.scene&&this.scene.remove(a.clonedMesh),delete a.batchId,e===a.clonedMesh){a.clonedMesh.geometry.dispose(),delete a.clonedMesh,this.selectedObject=void 0,this.outlinePass&&(this.outlinePass.selectedObjects=[]);return}a.clonedMesh.geometry.dispose(),delete a.clonedMesh}else if(a.originalMaterial){if(this.selectedObject.material){let o=this.selectedObject.material;Array.isArray(o)?o.forEach(l=>l.dispose()):o instanceof Gr&&o.dispose()}this.selectedObject.material=a.originalMaterial,delete a.originalMaterial}this.selectedObject=void 0,this.outlinePass&&(this.outlinePass.selectedObjects=[])}if(!this.scene||!e){this.enableRender();return}if(e instanceof tn&&i!=null){let a=e,o=new Ue,l=new Ue;l.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),a.getMatrixAt(i,o),this.selectedObject=e,this.outlinePass&&(this.outlinePass.selectedObjects=[e]);let c=Cs.clonedHighlightMaterials(e,{depthTest:s});if(c){let u=new Je(a.geometry.clone(),c);u.applyMatrix4(e.matrixWorld.multiply(o)),u.matrixWorldNeedsUpdate=!0,u.name="Cloned mesh for highlighting";let h=o.clone();h.multiplyMatrices(o,l),a.setMatrixAt(i,h),a.instanceMatrix.needsUpdate=!0,a.updateMatrix(),this.selectedObject.userData.instanceId=i,this.selectedObject.userData.originalMatrix=o,this.selectedObject.userData.clonedMesh=u,this.scene.add(u)}}else if(ji.isMergedMesh(e)&&n!=null){let a=ji.getBatchByBatchId(e,n),o=`[BimViewer] Clicked on merged mesh(id: ${e.id}).`;o+=` Original mesh batchId: ${n}, name: ${a==null?void 0:a.name}`,ne.info(o);let l=Cs.clonedHighlightMaterials(e,{depthTest:s}),c=ji.cloneGeometryForBatch(e,a);if(l&&c){let u=new Je(c,l);u.applyMatrix4(e.matrixWorld),u.matrixWorldNeedsUpdate=!0,u.name="Cloned mesh for highlighting",this.selectedObject=e,this.selectedObject.userData.batchId=n,this.selectedObject.userData.clonedMesh=u,this.scene.add(u)}}else{let a=Cs.clonedHighlightMaterials(e,{depthTest:s});a&&(this.selectedObject=e,this.selectedObject.userData.originalMaterial=this.selectedObject.material,this.selectedObject.material=a,this.outlinePass&&(this.outlinePass.selectedObjects=[e]))}this.enableRender()}clearSelection(){this.selectedObject&&this.selectedObject instanceof po?this.selectedObject.selected=!1:this.selectObject(),this.selectedObject=void 0}getBBox(){return this.bbox}flyToObjects(e){if(!e||e.length===0||!this.camera)return;let i=new A,n=new A,s=new Ot;e.forEach(o=>{let l=vn.getBoundingBox(o);s.union(l)});let a=new A;this.camera.getWorldDirection(a),bs.getCameraPositionByBboxAndDirection(s,i,n,this.camera.projectionMatrix,a),this.flyTo(i,n)}flyToObject(e){this.flyToObjects([e])}flyToSelectedObject(){if(!this.selectedObject)return;let e=this.selectedObject;(e instanceof tn&&e.userData.clonedMesh||ji.isMergedMesh(e)&&e.userData.clonedMesh)&&(e=e.userData.clonedMesh),this.flyToObject(e)}flyToRandomObject(){var u,h,p;let e=Object.values(this.loadedModels).map(d=>d.id);Object.values(this.loaded3dTiles).forEach(d=>e.push(d.id));let i=e.length;if(i<=0)return;let n=Math.floor(Math.random()*i),s=e[n];if(!((u=this.scene)==null?void 0:u.getObjectById(s)))return;let o=[];if((h=this.scene)==null||h.traverseVisible(d=>{let f=["SKYBOX","GROUND_GRID","GRASS_GROUND","BIM_VIEWER_BOX_HELPER"];(d instanceof Je||d instanceof _r)&&!f.includes(d.name)&&o.push(d.id)}),o.length<1)return;let l=Math.floor(Math.random()*o.length),c=(p=this.scene)==null?void 0:p.getObjectById(o[l]);c&&(ne.info(`[BimViewer] Flying to random object: ${c.name}, type: ${c.type}`),this.selectObject(c,void 0,void 0,!0),this.flyToObject(c))}flyTo(e,i){let n=this.camera,s=this.controls;if(!n||!s)return;if(e.equals(i)){ne.error("[BimViewer] camera position and lookAt cannot be the same!");return}else if(!St.isVectorValid(e)||!St.isVectorValid(i)){ne.error("[BimViewer] invalid position or lookAt!");return}let a=e.distanceTo(i);an.far&&(e=e.clone().sub(i).normalize().multiplyScalar(n.far*.9),ne.warn("[BimViewer] camera could be too far to see the object!"));let o=(f,m)=>{s.setLookAt(f,m),s.update(),this.enableRender()},l=n.position.clone(),c=new A;n.getWorldDirection(c);let u=s.target.distanceTo(l),h=l.clone().addScaledVector(c,u),p=500,d=Date.now();this.cameraUpdateInterval&&clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=setInterval(()=>{let f=Date.now()-d;f>p&&(f=p);let m=(E,b,x)=>{let S=E.x+(b.x-E.x)*x,D=E.y+(b.y-E.y)*x,P=E.z+(b.z-E.z)*x;return new A(S,D,P)},g=m(l,e,f/p),y=m(h,i,f/p);o(g,y),f>=p&&(clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=void 0)},10)}viewFitAll(){var a;if(!this.scene||!this.camera)return;let e=new A,i=new A,n=vn.getVisibleObjectBoundingBox(this.scene),s=new A;(a=this.camera)==null||a.getWorldDirection(s),bs.getCameraPositionByBboxAndDirection(n,e,i,this.camera.projectionMatrix,s),this.flyTo(e,i)}goToHomeView(){let e=this.camera,i=this.cameraCfg,n=i&&St.arrayToVector3(i.eye),s=i&&St.arrayToVector3(i.look);if(n&&s)this.flyTo(n,s);else if(this.scene){let a=new A,o=new A,l=new A(-1,-.5,-1);if(this.has2dModel){let c=this.bbox.max.x-this.bbox.min.x,u=this.bbox.max.y-this.bbox.min.y,h=this.bbox.max.z-this.bbox.min.z,p=Math.min(c,u,h);c-p<=0?l.set(1,0,0):u-p<=0?l.set(0,-1,0):h-p<=0&&l.set(0,0,-1)}if(bs.getCameraPositionByBboxAndDirection(this.bbox,a,o,e==null?void 0:e.projectionMatrix,l),(!this.cameraCfg||this.cameraCfg&&(!this.cameraCfg.eye||!this.cameraCfg.look))&&(this.cameraCfg={eye:a.toArray(),look:o.toArray()}),e instanceof Zi){let c=this.bbox,u=c.max.x-c.min.x,h=c.max.z-c.min.z,p=e.right-e.left,d=e.top-e.bottom;e.zoom=Math.max(p,d)/Math.max(u,h),e.zoom/=2,e.updateProjectionMatrix()}a.equals(o)||this.flyTo(a,o)}}zoomToBBox(e){var a,o;let i=new A,n=new A,s=new A;(a=this.camera)==null||a.getWorldDirection(s),bs.getCameraPositionByBboxAndDirection(e,i,n,(o=this.camera)==null?void 0:o.projectionMatrix,s),i.equals(n)||this.flyTo(i,n)}tryAdjustCameraNearAndFar(){let e=this.camera;if(!this.scene||!e)return;let i=this.bbox,n=e.near,s=e.far,a=i.max.x-i.min.x,o=i.max.y-i.min.y,l=i.max.z-i.min.z,c=Math.max(a,o,l),u=5,h=c/u,p=c*u;if(n>h||sSt.numberToString(f);ne.info(`[BimViewer] BBox's longest side is: ${d(c)}`),n>h&&(ne.warn(`[BimViewer] camera.near(${d(n)}) shouldn't bigger than ${d(h)}, will change it!`),e.near=h),si.id);if(Object.values(this.loaded3dTiles).forEach(i=>e.push(i.id)),e){let i=this.cameraCfg,n=i&&St.arrayToVector3(i.eye),s=i&&St.arrayToVector3(i.look),a=new Ot;if(n&&s){let o=n,l=s;a.expandByPoint(new A(o.x,o.y,o.z)),a.expandByPoint(new A(l.x,l.y,l.z))}else a=vn.getObjectsBoundingBox(this.scene,e);this.skyOfGradientRamp=Xo.createSkyOfGradientRampByBoundingBox(a),this.scene.add(this.skyOfGradientRamp)}}regenGroundGrid(){if(!this.scene)return;this.groundGrid&&(this.groundGrid.geometry.dispose(),this.groundGrid.material.dispose(),this.scene.remove(this.groundGrid));let e=Object.values(this.loadedModels).map(i=>i.id);if(Object.values(this.loaded3dTiles).forEach(i=>e.push(i.id)),e){let i=this.cameraCfg,n=i&&St.arrayToVector3(i.look);n&&(n.y=0),this.groundGrid=Ks.createGroundGrid(void 0,void 0,n),this.scene.add(this.groundGrid)}}setOrbitPoint(e){let i=this.controls;if(!this.camera||!this.renderer||!this.controls||!this.scene||!this.raycaster||!this.viewerContainer)return;let n=this.getIntersections(e),s=Mr.getScreenPointByEvent(e,this.viewerContainer);if(n&&n.length!==0)i.setOrbitPoint(n[0].point),this.setAnchorPosition(s),this.lastOrbPoint=n[0].point;else{let a=this.bbox.getCenter(new A),o=Mr.worldPosition2ScreenPoint(a,this.camera,this.renderer.domElement);this.setAnchorPosition(o),i.setOrbitPoint(a),this.lastOrbPoint=a}}setAnchorPosition(e){this.anchor&&(this.anchor.className="anchor active",this.anchor.style.left=`${e.x}px`,this.anchor.style.top=`${e.y}px`)}createAnchor(){var i;let e=document.createElement("div");return e.className="anchor",(i=this.viewerContainer)==null||i.appendChild(e),e}disposeAnchor(){var e;this.anchor&&((e=this.viewerContainer)==null||e.removeChild(this.anchor),this.anchor=void 0)}disposeRotateToCursor(){var e,i,n;this.disposeAnchor(),(e=this.renderer)==null||e.domElement.removeEventListener("pointerdown",this.onPointerDown),(i=this.renderer)==null||i.domElement.removeEventListener("pointerup",this.onAnchorPointerUp),(n=this.controls)==null||n.removeEventListener("update",this.updateOrbPoint)}enableComposer(e){!this.scene||!this.camera||!this.renderer||(this.composerEnabled=e,e&&!this.composer&&(this.composer=new p3(this.renderer)),this.enableRender())}enableRenderPass(e){if(!(!this.scene||!this.camera||!this.renderer||!this.composer)){if(e&&!this.renderPass){let i=new d3(this.scene,this.camera);i.setSize(this.width,this.height),this.composer.addPass(i),this.renderPass=i}this.renderPass&&(this.renderPass.enabled=e),this.enableRender()}}enableFxaaPass(e){if(!(!this.scene||!this.camera||!this.renderer||!this.composer)){if(e&&!this.effectFxaaPass){let i=new EE(UDe);i.uniforms.resolution.value.set(1/this.width,1/this.height),i.setSize(this.width,this.height),i.renderToScreen=!0,this.composer.addPass(i),this.effectFxaaPass=i}this.effectFxaaPass&&(this.effectFxaaPass.enabled=e),this.enableRender()}}enableSaoPass(e){if(!(!this.scene||!this.camera||!this.renderer||!this.composer)){if(e&&!this.saoPass){let i=new VS(this.scene,this.camera,!1,!0,new le(1/this.width,1/this.height));i.setSize(this.width,this.height),i.params.output=0,i.params.saoBias=.5,i.params.saoIntensity=5e-5,i.params.saoScale=5,i.params.saoKernelRadius=40,i.params.saoMinResolution=0,this.composer.addPass(i),this.saoPass=i}this.saoPass&&(this.saoPass.enabled=e),this.enableRender()}}enableSsaoPass(e){if(!(!this.scene||!this.camera||!this.renderer||!this.composer)){if(e&&!this.ssaoPass){let i=new rc(this.scene,this.camera,this.width,this.height);i.kernelRadius=16,i.minDistance=.005,i.maxDistance=.1,this.composer.addPass(i),this.ssaoPass=i}this.ssaoPass&&(this.ssaoPass.enabled=e),this.enableRender()}}enableOutlinePass(e){if(!(!this.scene||!this.camera||!this.renderer||!this.composer)){if(e&&!this.outlinePass){let i=new au(new le(this.width,this.height),this.scene,this.camera);i.edgeStrength=3,i.edgeGlow=0,i.edgeThickness=2,i.pulsePeriod=0,i.visibleEdgeColor.set(16711680),i.hiddenEdgeColor.set(16752768),this.composer.addPass(i),this.outlinePass=i}this.outlinePass&&(this.outlinePass.enabled=e),this.enableRender()}}enableSsaaPass(e){if(!(!this.scene||!this.camera||!this.renderer||!this.composer)){if(e&&!this.ssaaRenderPass){let i=new m3(this.scene,this.camera,16777215,0);this.composer.addPass(i),this.ssaaRenderPass=i}this.ssaaRenderPass&&(this.ssaaRenderPass.enabled=e),this.enableRender()}}enableBloomPass(e){if(!(!this.scene||!this.camera||!this.renderer||!this.composer)){if(e&&!this.bloomPass){let i=new Th(1,25,4);i.renderToScreen=!0,this.composer.addPass(i),this.bloomPass=i}this.bloomPass&&(this.bloomPass.enabled=e),this.enableRender()}}enableUnrealBloomPass(e){if(!(!this.scene||!this.camera||!this.renderer||!this.composer)){if(e&&!this.unrealBloomPass){let i=new pd(new le(this.width,this.height),1,0,0);i.threshold=0,i.strength=.5,i.radius=0,this.composer.addPass(i),this.unrealBloomPass=i}this.unrealBloomPass&&(this.unrealBloomPass.enabled=e),this.enableRender()}}activateSection(e="ObjectsBoxSection"){this.sectionType=e,this.clearSelection(),this.sectionManager||(this.sectionManager=new VO(this)),this.sectionManager.activateSection(e),this.enableRender()}deactivateSection(){var e;(e=this.sectionManager)==null||e.deactivateSection(),this.enableRender()}getActiveSection(){var e;return(e=this.sectionManager)==null?void 0:e.getActiveSection()}activateMeasurement(e){this.measurementManager||(this.measurementManager=new Ql(this)),this.measurementManager.activateMeasurement(e),this.clearSelection()}deactivateMeasurement(){var e;(e=this.measurementManager)==null||e.deactivateMeasurement()}setMeasurementsVisibility(e){this.measurementManager||(this.measurementManager=new Ql(this)),this.measurementManager.setMeasurementsVisibility(e)}clearMeasurements(){var e;(e=this.measurementManager)==null||e.clearMeasurements()}activateZoomToRect(){this.zoomToRect||(this.zoomToRect=new oE(this)),this.zoomToRect.activate()}deactivateZoomToRect(){var e;(e=this.zoomToRect)==null||e.activate()}enableWebCam(){this.scene&&(this.webcam||(this.webcam=new _3),this.webcamPlane||(this.webcamPlane=this.webcam.createWebCamPlane(),this.webcamPlane.position.set(10,2,0)),this.scene.add(this.webcamPlane))}disableWebCam(){this.scene&&this.webcamPlane&&(this.webcamPlane.geometry.dispose(),this.webcamPlane.material.dispose(),this.scene.remove(this.webcamPlane))}setEnvironment(e){Lc.createEnvTexture(this.pmremGenerator,e).then(i=>{this.scene&&(this.scene.environment=i)})}setEnvironmentFromDataArray(e){Lc.createEnvTextureFromDataArray(this.pmremGenerator,e).then(i=>{this.scene&&(this.scene.environment=i)})}takeObjectsScreenshot(e){return ot(this,null,function*(){return new Promise((i,n)=>{var s;this.renderer||n("renderer is undefined"),(s=this.scene)==null||s.traverse(a=>{a instanceof Je&&((0,lm.includes)(e,(0,lm.get)(a.userData,"UniqueId"))?a.visible=!0:a.visible=!1)}),this.enableRender(),setTimeout(()=>{var a;i((a=this.renderer)==null?void 0:a.domElement.toDataURL("image/png"))},1e3)})})}updateRaycasterThreshold(){let e=this.camera;if(!e||!this.raycaster)return;let i=12/e.zoom,n=this.raycaster.params;n.Line?n.Line.threshold=i:n.Line={threshold:i},n.Points?n.Points.threshold=i:n.Points={threshold:i}}instantiate(e){new qC(e).instantiate()}merge(e){this.increaseJobCount();try{let i=[];e.traverse(n=>{n.geometry&&n.material&&i.push(n)}),ji.deepMerge(i,e)}finally{this.decreaseJobCount()}}setSpinnerVisibility(e){this.spinner&&(e?this.spinner.classList.remove("hidden"):this.spinner.classList.add("hidden"))}increaseJobCount(){this.setSpinnerVisibility(++this.jobCount>0)}decreaseJobCount(){this.setSpinnerVisibility(--this.jobCount>0)}addEvent(e,i,n){e.addEventListener(i,n),this.events.push({node:e,type:i,func:n})}updateProjectSettings(e){this.settings=e;let i=(n,s)=>{n&&s&&(n.near=s.near,n.far=s.far,n.updateProjectionMatrix())};i(this.perspectiveCamera,this.settings.camera),i(this.orthoCamera,this.settings.camera),this.enableRender(10)}dynamicallyUpdateControllerTarget(e){let i=this.getIntersections(e);if(i.length<0)return;let n=this.camera,s=this.controls;if(!n||!s)return;let a=i.find(o=>{if(o.distancen.far)return!1;let l=o.object;return l.visible&&l instanceof Je});if(a!=null&&a.point&&s){let o=n.position,l=s.target,c=a.distance,u=o.distanceTo(l),h=o.clone().lerp(l,c/u);s.target=h}}computeBoundingBox(){let e=new Ot;return Object.values(this.loadedModels).forEach(i=>{if(i.bbox){i.bbox.geometry.computeBoundingBox();let n=i.bbox.geometry.boundingBox;n&&!n.isEmpty()&&e.union(n)}}),Object.values(this.loaded3dTiles).forEach(i=>{i.bbox.isEmpty()||e.union(i.bbox)}),this.bbox=e,this.controls&&(this.controls.minDistance=.1,this.controls.maxDistance=this.bbox.getSize(new A).length()*3),e}};var mCe=Un(Yl(),1);var w3=class{constructor(r){this.viewer=r;this.itemList={};this.handleMouseWheel=r=>{r.preventDefault(),this.element&&(this.element.scrollLeft+=r.deltaY)};this.init()}init(){var i;let r=document.createElement("div");r.classList.add("model-layout-switch-bar");let e=document.createElement("div");e.classList.add("model-layout-switch-bar-content"),e.addEventListener("wheel",this.handleMouseWheel),this.viewer.getLayoutNames().forEach((n,s)=>{let a=this.createItem(n,s);this.itemList[n]=a,a.resetActivate=()=>{for(let o in this.itemList)this.itemList[o].resetActive()},e==null||e.appendChild(a.element)}),this.element=r,this.content=e,this.element.appendChild(this.content),(i=this.viewer.widgetContainer)==null||i.appendChild(this.element)}createItem(r,e){let i=new kG(this.viewer,r);return e===0&&i.setActive(!0),i}destroy(){var r,e;for(let i in this.itemList){let n=this.itemList[i];n.destroy(),(r=this.content)==null||r.removeChild(n.element)}this.itemList={},this.element&&this.content&&(this.element.removeChild(this.content),this.element.removeEventListener("wheel",this.handleMouseWheel),(e=this.viewer.widgetContainer)==null||e.removeChild(this.element),this.element=void 0)}show(){this.element&&(this.element.style.display="block")}hide(){this.element&&(this.element.style.display="none")}},kG=class{constructor(r,e){this.viewer=r;this.eventBus=lE();this.active=!1;this.element=this.createItem(e),this.eventBus.on("activechange",i=>{this.resetActivate&&this.resetActivate(),i?(this.element.classList.add("activate"),this.viewer.activateLayout(e)):this.element.classList.remove("activate")})}createItem(r){let e=document.createElement("div"),i=document.createElement("span");return e.classList.add("model-layout-switch-item"),e.onclick=()=>{this.active=!this.active,this.eventBus.emit("activechange",this.active)},i.innerText=r,e.appendChild(i),e}setActive(r){this.active!==r&&(this.active=r,this.eventBus.emit("activechange",r))}resetActive(){this.active=!1,this.element.classList.remove("activate")}destroy(){this.eventBus.off("activechange")}};var R3=class{constructor(r){this.progresseItems=[];this.element=document.createElement("div"),this.element.classList.add("progress-bar"),r.appendChild(this.element)}setVisibility(r){this.element&&(r?this.element.classList.remove("hidden"):this.element.classList.add("hidden"))}addProgressItem(r,e){let i=this.progresseItems.find(n=>n.id===r);if(!i){let n=document.createElement("div");n.classList.add("progress-bar-item"),n.innerHTML=e||"",this.element.append(n),i={id:r,div:n},this.progresseItems.push(i)}this.setVisibility(!0)}updateProgress(r,e,i){let n=this.progresseItems.find(a=>a.id===r);if(!n)return;let s=e?`${e}`:"";e&&i&&(s+=": "),i&&(s+=`${i.toFixed(2)}%`),n.div.innerHTML=s}removeProgressItem(r){let e=this.progresseItems.find(i=>i.id===r);e&&e.div.remove(),this.progresseItems.length===0&&this.setVisibility(!1)}delayRemoveProgressItem(r,e=3e3){setTimeout(()=>{this.removeProgressItem(r)},e)}};var QS=new Ue,dCe=new Ue,fCe=new eo,M3=new A,GG=class extends Jf{constructor(e){super(e);this.name="DxfViewer";this.CAMERA_Z_POSITION=100;this.CAMERA_MIN_ZOOM=1e-6;this.timer=Date.now();this.loadedModels={};this.masterModelId="";this.raycaster=new Oc;this.mouseMoved=!1;this.mouseDoubleClicked=!1;this.selected=!0;this.raf=new uT;this.renderEnabled=!1;this.jobCount=0;this.enableHideVisuallySmallObjects=!0;this.sortedHidableObjects={};this.lastCameraZoom=1/0;this.activeLayoutName="";this.layoutInfos={};this.units=void 0;this.fpsUtils=new _C;this.onResize=()=>{var i;let e=(i=this.renderer)==null?void 0:i.domElement;e&&e.parentElement&&this.resize(e.parentElement.clientWidth,e.parentElement.clientHeight)};this.enableRender=(e=1e3)=>{this.renderEnabled=!0,this.raf&&(this.timeoutSymbol&&this.raf.clearTimeout(this.timeoutSymbol),this.timeoutSymbol=this.raf.setTimeout(()=>{this.renderEnabled=!1},e))};this.loadingDxfCount=0;this.compareMode=!1;this.viewerCfg=e,this.increaseJobCount(),this.init(),this.animate(),this.enableRender(),this.decreaseJobCount(),ne.info(`[DxfViewer] Initialized in ${(Date.now()-this.timer)/1e3}s`)}init(){let e=this.viewerCfg;this.initSpinner(),this.initScene(),this.initRenderer(),this.initCSS2DRenderer(),this.initCamera(),this.initControls(),this.initEvents(),this.initMouseWheel(),this.initOthers(),e.enableAxisGizmo===!0&&(this.axes=this.initAxes()),e.enableStats===!0&&(this.stats=this.initStats()),e.enableToolbar&&(this.toolbar=this.initToolbar()),e.enableBottomBar&&(this.bottomBar=this.initBottomBar()),e.enableProgressBar&&(this.loadingProgressBar=this.initLoadingProgressBar()),this.enableSelection=e.enableSelection}initScene(){let e=new On;e.background=new Ve(2172976),e.matrixAutoUpdate=!1,e.matrixWorldAutoUpdate=!1,this.scene=e}initRenderer(){var e;this.renderer=new Pl({antialias:!0,preserveDrawingBuffer:!0,alpha:!1,stencil:!1}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),this.renderer.setClearColor(11119017,1),this.renderer.localClippingEnabled=!0,this.renderer.domElement.classList.add("webgl-renderer"),(e=this.viewerContainer)==null||e.appendChild(this.renderer.domElement),St.printGpuInfo(this.renderer.getContext()),xr.maxFragmentUniforms=this.renderer.capabilities.maxFragmentUniforms-20,this.enableOverlayRenderer&&(this.overlayRender=new Dr(this))}initCSS2DRenderer(){var i;let e=new xf;e.setSize(this.width,this.height),e.domElement.style.height="0",e.domElement.style.width="0",e.domElement.style.position="absolute",e.domElement.style.top="0",e.domElement.style.left="0",e.domElement.style.overflow="visible",e.domElement.classList.add("css2d-renderer"),(i=this.viewerContainer)==null||i.appendChild(e.domElement),this.css2dRenderer=e}initCamera(){if(!this.scene)return;let e=new Zi(-this.width/2,this.width/2,this.height/2,-this.height/2,.1,1e5);e.layers.enable(10),e.position.set(0,0,this.CAMERA_Z_POSITION),e.zoom=10,e.updateProjectionMatrix(),this.scene.add(e),this.camera=e}initControls(){let e=this.camera;if(!this.renderer||!e)return;let i=new cT(e,this.renderer.domElement);i.enableDamping=!1,i.enableRotate=!1,i.dampingFactor=.5,i.enabled=!0,i.keyPanSpeed=10,i.mouseButtons={LEFT:bi.PAN,MIDDLE:bi.PAN,RIGHT:bi.PAN},i.zoomSpeed=1,i.enableZoom=!0,i.touches={ONE:ao.PAN,TWO:ao.DOLLY_PAN},i.listenToKeyEvents(document.body),i.update(),this.controls=i,i.addEventListener("change",this.onControlsChange(this)),i.addEventListener("end",this.onControlsEnd(this))}onControlsChange(e){return()=>{e.enableRender()}}onControlsEnd(e){return()=>{e.enableRender()}}initSpinner(){var s;if(!this.viewerCfg.enableSpinner)return;let i=document.createElement("div");i.classList.add("bim-viewer-spinner");let n=document.createElement("div");n.classList.add(ho,"icon-loading"),i.append(n),(s=this.widgetContainer)==null||s.appendChild(i),this.spinner=i,this.setSpinnerVisibility(this.jobCount>0)}initEvents(){let e=this.renderer;if(!e||!this.camera||!this.controls)return;let i=-1,n=-1;e.domElement.addEventListener("pointerdown",s=>{i=s.x,n=s.y,this.mouseMoved=!1,s.button===bi.MIDDLE&&(e.domElement.style.cursor="move")}),e.domElement.addEventListener("pointermove",s=>{i>=0&&n>=0&&(Math.abs(s.x-i)>5||Math.abs(s.y-n)>5)&&(this.mouseMoved=!0,e.domElement.style.cursor="move")}),e.domElement.addEventListener("pointerup",s=>{!this.mouseMoved&&!this.mouseDoubleClicked&&s.button===bi.LEFT&&setTimeout(()=>{this.handleMouseClick(s)},200),this.mouseDoubleClicked&&setTimeout(()=>{this.mouseDoubleClicked=!1},200),i=-1,n=-1,e.domElement.style.cursor="auto"}),e.domElement.addEventListener("dblclick",()=>{this.mouseDoubleClicked=!0,this.mouseMoved}),window.addEventListener("keydown",s=>{s.altKey&&s.code==="KeyR"&&this.flyToRandomObject()}),window.addEventListener("resize",()=>{var a;let s=(a=this.renderer)==null?void 0:a.domElement;s&&s.parentElement&&this.resize(s.parentElement.clientWidth,s.parentElement.clientHeight)})}initMouseWheel(){let e=this.renderer;if(!e)return;let i=Date.now();e.domElement.addEventListener("wheel",n=>{let s=this.camera,a=this.viewerContainer;if(!s||!this.controls)return;n.preventDefault(),n.stopPropagation();let o=this.controls.zoomSpeed,l=Date.now(),c=l-i,u=10,h=30;if(c0?d*p:d/p,m=Mr.getScreenPointByEvent(n,a),g=Mr.screenPoint2NdcPoint(m,s,a),y=new A(g.x,g.y,0),E=y.clone().unproject(s);f=this.checkAndGetLimitedCameraZoom(f),s.zoom=Math.max(this.controls.minZoom,Math.min(this.controls.maxZoom,f)),s.updateProjectionMatrix();let b=y.clone().unproject(s),x=M3.set(0,0,0);x.subVectors(b,E),x.z=0,this.updateHidableObjectsVisibility(),s.position.sub(x),this.controls.target.sub(x),this.controls.update()})}initOthers(){!this.scene||!this.renderer||!this.camera||(this.renderer.domElement.style.outlineWidth="0")}initAxes(){var n;let e=document.createElement("div");e.classList.add("axesRenderer");let i=new If(e,this.camera,!0);return(n=this.widgetContainer)==null||n.append(e),i}initStats(){var n;let e=u3();e.setMode(0);let i=document.createElement("div");return i.classList.add("statsOutput"),i.appendChild(e.domElement),e.domElement.style.position="absolute",(n=this.widgetContainer)==null||n.append(i),e}showStats(){this.stats||(this.stats=this.initStats()),this.stats.showPanel(0)}hideStats(){this.stats&&this.stats.showPanel(-1)}initToolbar(){let e=this.viewerCfg;return new vh(this,(0,mCe.merge)(gDe,e.toolbarMenuConfig))}initBottomBar(){return new nm(this)}initLoadingProgressBar(){return new R3(this.widgetContainer)}showLayoutBar(){var e;(e=this.dxfLayoutBar)==null||e.show()}hideLayoutBar(){var e;(e=this.dxfLayoutBar)==null||e.hide()}animate(){var e,i,n,s,a;requestAnimationFrame(this.animate.bind(this)),this.scene&&this.camera&&this.renderEnabled&&(xr.resolutionUniform.value.set(this.width,this.height),(e=this.renderer)==null||e.render(this.scene,this.camera),this.hotpointRoot&&this.hotpointRoot.children.length>0&&((i=this.css2dRenderer)==null||i.render(this.scene,this.camera)),this.dispatchEvent("RenderAfter")),(n=this.controls)==null||n.update(),(s=this.stats)==null||s.update(),this.fpsUtils.update(),(a=this.bottomBar)==null||a.update()}getFps(){return this.fpsUtils.fps}is3d(){return!1}destroy(){var e,i,n,s,a;xr.abortJobs=!0,this.dxfLayoutBar&&(this.dxfLayoutBar.destroy(),this.dxfLayoutBar=void 0),(e=this.measurementManager)==null||e.destroy(),this.measurementManager=void 0,(i=this.markupManager)==null||i.destroy(),this.markupManager=void 0,(n=this.zoomToRectHelper)==null||n.destroy(),this.zoomToRectHelper=void 0,(s=this.boxSelectHelper)==null||s.destroy(),this.boxSelectHelper=void 0,this.sortedHidableObjects={},this.layoutInfos={},this.raycastableObjects=void 0,this.changes={},Object.keys(this.loadedModels).forEach(o=>{delete this.loadedModels[o]}),this.loadedModels={},this.css2dRenderer&&((a=this.viewerContainer)==null||a.removeChild(this.css2dRenderer.domElement),this.css2dRenderer=void 0),this.stats=void 0,this.raycaster=void 0,this.selectedObject=void 0,this.raf&&(this.timeoutSymbol&&this.raf.clearTimeout(this.timeoutSymbol),this.raf=void 0),this.contextMenu&&(this.contextMenu.destroy(),this.contextMenu=void 0),this.axes&&(this.axes.dispose(),this.axes=void 0),this.toolbar&&(this.toolbar.destroy(),this.toolbar=void 0),this.spinner&&(this.spinner.remove(),this.spinner=void 0),this.bottomBar=void 0,this.font=void 0,window.removeEventListener("resize",this.onResize),super.destroy()}loadModelAsync(e,i){return ot(this,null,function*(){var g,y;this.loadingDxfCount++,this.timer=Date.now(),this.increaseJobCount();let n=e.modelId||e.src;this.masterModelId||(this.masterModelId=n);let s=e.ignorePaperSpace||this.masterModelId!==n;e.ignorePaperSpace===!1&&s&&ne.warn(`[DxfViewer] Paper space will be ignored for '${n}' although 'ignorePaperSpace' is false!`),St.printMemory("Before loadModelAsync");let a=new Zc;a.setFont(this.font);let o=n,l=this.translate("ProgressBar.Loading"),c=E=>{var b;(b=this.loadingProgressBar)==null||b.updateProgress(o,l,E),i&&i(new ProgressEvent("LoadProgress",{loaded:E,total:100}))},u=(E,b,x)=>{var D;let S=E.loaded*100/E.total;S=S*(x-b)/100+b,(D=this.loadingProgressBar)==null||D.updateProgress(o,l,S),i&&i(new ProgressEvent("LoadProgress",{loaded:S,total:100}))},h=E=>u(E,0,90);(g=this.loadingProgressBar)==null||g.addProgressItem(o),c(0);let p=this.viewerCfg,d=yield a.loadDxfDataAsync(e.src,e.modelId,h,void 0,s,p.enableLocalCache).finally(()=>{this.loadingDxfCount--,this.loadingDxfCount===0&&this.font.releaseFontData&&this.font.releaseFontData()});if(ne.info(`[DxfViewer] Loaded '${e.src}' in ${(Date.now()-this.timer)/1e3}s, adding to scene...`),xr.abortJobs&&Promise.reject("[DxfViewer] abort load dxf"),d.threejsObject.children.length===0){let E=`[DxfViewer] Nothing was loaded from ${e.src}`;return ne.warn(E),this.decreaseJobCount(),Promise.reject(E)}let f=d.threejsObject;f.name=n;let m=this.getDxfUnits(d);if(this.masterModelId===e.modelId&&(this.units=m),ne.info(`[DxfViewer] Units of '${e.src}' is '${m}'`),m){let E=1;this.units&&m!==this.units&&(E=w8(m,this.units)),e.scale?e.scale=[e.scale[0]*E,e.scale[0]*E,e.scale[0]*E]:e.scale=[E,E,E]}if(e.matrix&&e.matrix.length===16){let E=new Ue;E.elements=e.matrix,f.applyMatrix4(E)}else{let E=e.position||[0,0,0],b=e.rotation||[0,0,0],x=e.scale||[1,1,1];f.position.set(E[0],E[1],E[2]),f.rotation.set(b[0]*Math.PI/180,b[1]*Math.PI/180,b[2]*Math.PI/180),f.scale.set(x[0],x[1],x[2])}return this.addLoadedModelToScene(f,e,d),St.printMemory("After addLoadedModelToScene"),ne.info(`[DxfViewer] Added '${e.src}' to scene in ${(Date.now()-this.timer)/1e3}s`),p.enableLayoutBar&&!this.dxfLayoutBar&&this.masterModelId===n&&(this.dxfLayoutBar=new w3(this)),this.decreaseJobCount(),c(100),(y=this.loadingProgressBar)==null||y.delayRemoveProgressItem(o),Promise.resolve()})}unloadDxf(){throw new Error("Not implemented yet!")}isCompareMode(){return this.compareMode}compare(e,i,n){return ot(this,null,function*(){var he,C,N,k,G;let{src:s,modelId:a}=e,{src:o}=i;if(this.compareMode)return Promise.reject("[DxfViewer] It is already under comparing mode!");if(this.masterModelId||Object.keys(this.loadedModels).length>0)return Promise.reject("[DxfViewer] Shouldn't load anything else before compare!");if(this.compareMode=!0,this.timer=Date.now(),this.increaseJobCount(),!this.font)return Promise.reject("[DxfViewer] Should set font first!");let l=new xr(!0);l.setFont(this.font),this.font instanceof Xc&&this.font.getFontData&&(yield this.font.getFontData());let c=s+o,u=this.translate("ProgressBar.Comparing"),h=U=>{var j;(j=this.loadingProgressBar)==null||j.updateProgress(c,u,U),n&&n(new ProgressEvent("CompareProgress",{loaded:U,total:100}))},p=(U,j,ee)=>{var se;let ae=U.loaded*100/U.total;ae=ae*(ee-j)/100+j,(se=this.loadingProgressBar)==null||se.updateProgress(c,u,ae),n&&n(new ProgressEvent("CompareProgress",{loaded:ae,total:100}))},d=U=>p(U,0,15),f=U=>p(U,15,30),m=U=>p(U,30,60),g=U=>p(U,60,95);St.printMemory("Before comparing"),this.masterModelId=a||s,this.loadingDxfCount+=2,(he=this.loadingProgressBar)==null||he.addProgressItem(c),h(0);let y=Date.now(),E=yield l.parse(s,d),b=yield l.parse(o,f),[x,S]=yield Promise.allSettled([E,b]);if(x.status==="rejected")return Promise.reject(`[DxfViewer] Failed to parse ${s}`);if(S.status==="rejected")return Promise.reject(`[DxfViewer] Failed to parse ${o}`);if(ne.info(`[DxfViewer] loadFiles in ${(Date.now()-y)/1e3}s`),xr.abortJobs)return Promise.reject("[DxfViewer] compare loadFile aborted");let D=x.value,P=S.value;y=Date.now();let _=yield new Wn(D,P).compare(m);if(ne.info(`[DxfViewer] Compared in ${(Date.now()-y)/1e3}s`),ne.debug("Compared results:",_),xr.abortJobs)return Promise.reject("[DxfViewer] compare change aborted");St.printMemory("After getting the comparison results"),y=Date.now(),yield l.loadEntitiesForCompare(D,P,_,g),St.printMemory("After Creating threejs objects based on comparison result"),(C=this.font)==null||C.releaseFontData(),this.changes=_,ne.info(`[DxfViewer] Creates threejs objects based on comparison result in ${(Date.now()-y)/1e3}s`);let w=D,F=P;if(this.loadingDxfCount-=2,this.decreaseJobCount(),Object.keys(_).length||ne.info("[DxfViewer] No change found"),((N=w.threejsObject)==null?void 0:N.children.length)===0&&((k=F.threejsObject)==null?void 0:k.children.length)===0){let U=`[DxfViewer] Nothing was loaded from ${s} and ${o}`;return ne.warn(U),Promise.reject(U)}let X=w.threejsObject,H=F.threejsObject;return X.name=s,H.name=o,y=Date.now(),this.addLoadedModelToScene(X,Ur({},e),w),St.printMemory("After adding first loaded Model to scene"),h(95),this.addLoadedModelToScene(H,Ur({},i),F),St.printMemory("After adding second loaded Model to scene"),ne.info(`[DxfViewer] Added compared objects to scene in ${(Date.now()-y)/1e3}s`),ne.info(`[DxfViewer] The comparison between ${s}' and '${o}' is completed in ${(Date.now()-this.timer)/1e3}s !`),h(100),(G=this.loadingProgressBar)==null||G.delayRemoveProgressItem(c),Promise.resolve()})}getEntitiesCount(){let e=0;return Object.values(this.loadedModels).forEach(i=>{var n;e+=((n=i.dxfData)==null?void 0:n.loadedEntityCount)||0}),e}getLoadedDxfModelIds(){return Object.keys(this.loadedModels)}getLayoutNames(){let e=[];return this.getLayouts().forEach(n=>{e.push(n.layoutName)}),e}getLayouts(){let e=[],i=this.loadedModels[this.masterModelId];if(i){let n=i.dxfData,s=n==null?void 0:n.objects.LAYOUT;s==null||s.forEach(a=>{e.push(a)})}return e}handleOverlayDxf(e){var a;let i=this.loadedModels[e];if(!i){ne.warn(`[DxfViewer] Can't find model for modelId '${e}'!`);return}this.increaseJobCount(),this.switchTransformMs(xr.MODEL_LAYOUT_NAME,e);let n=(a=i.dxfData)==null?void 0:a.threejsObject,s=n==null?void 0:n.children.find(o=>o.name===xr.MODEL_LAYOUT_NAME);s&&(s.traverse(o=>{this.addSpatialFilterSection(o,i.dxfData)}),this.calBoundingBoxOfLayoutChild(s)),this.showLayoutObjects(this.activeLayoutName),this.decreaseJobCount()}activateLayout(e){var p,d,f;if(this.increaseJobCount(),e.length==0){ne.warn("[DxfViewer] layout name is empty !"),this.decreaseJobCount();return}if(e===this.activeLayoutName){this.decreaseJobCount();return}let i=Date.now(),n=this.camera,s=this.getLayoutByName(e);if(!s){ne.warn(`[DxfViewer] Can't find layout of ${e} !`),this.decreaseJobCount();return}let a=this.loadedModels[this.masterModelId];if(!a){ne.warn(`[DxfViewer] Can't find master model for modelId '${this.masterModelId}'!`),this.decreaseJobCount();return}if(this.raycastableObjects=void 0,this.activeLayoutName){let m=this.getActiveLayoutInfo();m.lastCameraPosition||(m.lastCameraPosition=new A),(p=this.camera)==null||p.getWorldPosition(m.lastCameraPosition),m.lastCameraZoom=n.zoom}if(!(m=>{let g=this.layoutInfos[m];return!!(g!=null&&g.lastCameraZoom)})(e)){this.switchTransformMs(e,this.masterModelId);let m=this.getLayoutViewports(s),g=[];m.length>0&&(g=m[0].frozenLayerHandles);let y=e!==xr.MODEL_LAYOUT_NAME,E=(d=a.dxfData)==null?void 0:d.threejsObject,b=E==null?void 0:E.children.find(S=>S.name===e);if(b){let S=[],D=(f=a.dxfData)==null?void 0:f.layersAndThreejsObjects;b.traverse(P=>{this.addSpatialFilterSection(P,a.dxfData);let _=P;if(y&&_.material&&_.geometry){let w=_.userData.layerName;if(!this.isLayerFrozenForViewport(a.dxfData,w,g))return;S.push(_);let F=-1;D&&D[w]&&(F=D[w].indexOf(_),F>=0&&D[w].splice(F,1)),F<0&&ne.warn(`[DxfViewer] Failed to find object for modelId '${this.masterModelId}', layer '${w}', layout '${e}'`)}}),S.forEach(P=>{P.removeFromParent()})}let x=this.getFilteredViewports(s);ne.debug("[DxfViewer] Active layout:",e,", viewports:",x),console.time("[DxfViewer] generateObjectsByViewport"),x.forEach(S=>{this.generateObjectsByViewport(e,S,a.dxfData)}),console.timeEnd("[DxfViewer] generateObjectsByViewport"),e!==xr.MODEL_LAYOUT_NAME&&this.switchTransformMs(xr.MODEL_LAYOUT_NAME,this.masterModelId),e!==xr.MODEL_LAYOUT_NAME&&b&&this.setLayoutHidableObjectArray(b),b&&this.calBoundingBoxOfLayoutChild(b)}let c=this.getActiveLayoutInfo();this.measurementManager&&(c.measurementData=this.measurementManager.getMeasurementsData()||[],c.measurementData.forEach(m=>m.layoutName=this.activeLayoutName),this.setMeasurementsVisibility(!1),this.measurementManager.clearUndoRedo()),this.markupManager&&(c.markupData=this.markupManager.getMarkupData()||[],c.markupData.forEach(m=>m.layoutName=this.activeLayoutName),this.setMarkupsVisibility(!1),this.markupManager.clearUndoRedo()),this.showLayoutObjects(e),this.activeLayoutName=e,c=this.getActiveLayoutInfo();let u=c.measurementData;this.measurementManager&&(this.measurementManager.setMeasurementsData(u||[]),this.setMeasurementsVisibility(!0));let h=c.markupData;if(this.markupManager&&(this.markupManager.setMarkupData(h||[]),this.setMarkupsVisibility(!0)),c.lastCameraPosition)this.goTo(c.lastCameraPosition,c.lastCameraZoom,!1);else{let m=this.getLayoutExtentEx(s);if(m){let E=m.max.x-m.min.x,b=m.max.y-m.min.y;(E<1e-16||b<1e-16||E>1e16||b>1e16)&&(ne.warn(`[BimViewer] Got wired bbox, max: ${m.max.toArray()}, min: ${m.min.toArray()}, going to calculate one...`),m=this.computeBoundingBox()),c.bbox=m,this.activeLayoutName!==xr.MODEL_LAYOUT_NAME&&this.updateGroundPlane(),this.zoomToBBox(m)}}this.dispatchEvent("LayoutChanged"),St.printMemory(`After activated layout '${this.activeLayoutName}'`),this.enableRender(),this.decreaseJobCount(),ne.info(`[DxfViewer] Activated layout '${e}' in ${(Date.now()-i)/1e3}s`)}calBoundingBoxOfLayoutChild(e){let i=e.children.length;for(let n=0;n0?s.userData.boundingBox=vn.getBoundingBox(s):s.userData.boundingBox&&delete s.userData.boundingBox}}getActiveLayoutName(){return this.activeLayoutName}getLayers(){var i,n;let e=[];if(this.masterModelId){let s=this.loadedModels[this.masterModelId],a=(i=s==null?void 0:s.dxfData)==null?void 0:i.tables.layer.layers;a&&e.push({modelId:this.masterModelId,layers:a})}for(let[s,a]of Object.entries(this.loadedModels)){if(s===this.masterModelId)continue;let o=(n=a==null?void 0:a.dxfData)==null?void 0:n.tables.layer.layers;o&&e.push({modelId:s,layers:o})}return e}setModelVisibility(e,i){let n=this.loadedModels[e];if(!n||!n.dxfData)throw new Error(`Failed to find model by modelId '${e}'!`);n.dxfData.threejsObject.visible=i,this.enableRender()}setLayerVisibility(e,i,n){let s=this.camera;n=n||this.masterModelId;let a=this.loadedModels[n];if(!a)throw new Error(`Failed to find layer by modelId '${n}'!`);let o=a.dxfData,l=o==null?void 0:o.tables.layer.layers[e];l?l.visible=i:ne.warn(`[DxfViewer] Layer '${e}' not found from dxfData!`);let c=o==null?void 0:o.layersAndThreejsObjects[e];if(c){let u=s.zoom;c.forEach(h=>{this.enableHideVisuallySmallObjects&&i&&u&&h.userData.visibleMinZoom&&u{let u=c;u.material&&Cs.setMaterialColor(u.material,new Ve(i))}):ne.warn(`[DxfViewer] No object found for layer '${e}'`),this.enableRender()}setFont(e){return ot(this,null,function*(){console.time("[DxfViewer] Font file(s) load time"),S0.isShxFile(e[0])?this.font=yield new S0().loadAsync(e):(e.length>1&&ne.warn("[DxfViewer] Only support 1 typeface font file for now, others will be ignored!"),this.font=yield new pT().loadAsync(e[0])),console.timeEnd("[DxfViewer] Font file(s) load time")})}setDisplayLengthUnits(){throw new Error("Not implemented yet!")}setDisplayAreaUnits(){throw new Error("Not implemented yet!")}setDisplayPrecision(){throw new Error("Not implemented yet!")}getScreenshot(){return ot(this,null,function*(){var h;let n={type:"image/png",quality:.8},s=(h=this.renderer)==null?void 0:h.domElement;if(!s)return;let a;this.boxSelectHelper||(this.boxSelectHelper=new $f(this)),a=yield this.boxSelectHelper.select();let o=yield St.canvasToImage(s),l=document.createElement("canvas");l.width=s.width,l.height=s.height;let c=window.devicePixelRatio,u=l.getContext("2d");if(u.drawImage(o,0,0,o.width/c,o.height/c),this.overlayRender){let p=this.overlayRender.getCanvas(),d=yield St.canvasToImage(p);u.drawImage(d,0,0,d.width/c,d.height/c)}return St.renderingContextToImage(u,a,n.type,n.quality)})}activateMeasurement(e){this.measurementManager||(this.measurementManager=new Ql(this)),this.measurementManager.activateMeasurement(e),this.clearSelection()}deactivateMeasurement(){var e;(e=this.measurementManager)==null||e.deactivateMeasurement()}getActiveMeasurementType(){var e;return(e=this.measurementManager)==null?void 0:e.getActiveMeasurementType()}getMeasurements(){var n,s;let e=this.getActiveLayoutInfo();e.measurementData=((n=this.measurementManager)==null?void 0:n.getMeasurementsData())||[],e.measurementData.forEach(a=>{a.layoutName||(a.layoutName=this.activeLayoutName)});let i=[];for(let a of Object.values(this.layoutInfos))(s=a.measurementData)==null||s.forEach(o=>i.push(o));return i}setMeasurements(e){e.forEach(s=>{var l;let a=s.layoutName||xr.MODEL_LAYOUT_NAME;(l=this.getLayoutInfo(a).measurementData)==null||l.push(s)});let i=this.getActiveLayoutInfo();this.measurementManager||(this.measurementManager=new Ql(this));let n=this.measurementManager;i.measurementData&&n.setMeasurementsData(i.measurementData)}selectMeasurement(e){this.measurementManager||(this.measurementManager=new Ql(this)),this.measurementManager.selectMeasurementById(e)}unselectMeasurement(){this.measurementManager||(this.measurementManager=new Ql(this)),this.measurementManager.unselectMeasurement()}removeMeasurement(e){this.measurementManager||(this.measurementManager=new Ql(this)),this.measurementManager.removeMeasurementById(e)}setMeasurementsVisibility(e){this.measurementManager||(this.measurementManager=new Ql(this)),this.measurementManager.setMeasurementsVisibility(e)}clearMeasurements(){var e;(e=this.measurementManager)==null||e.clearMeasurements();for(let i of Object.values(this.layoutInfos))i.measurementData=[]}activateMarkup(e){this.markupManager||(this.markupManager=new D0(this)),this.markupManager.isMarkupActive()||this.markupManager.activate(),this.markupManager.setDrawType(e),this.clearSelection()}deactivateMarkup(){this.markupManager&&this.markupManager.deactivate()}getActiveMarkupType(){var e;return(e=this.markupManager)==null?void 0:e.getActiveMarkupType()}setMarkupLineColor(e){var i;(i=this.markupManager)==null||i.setLineColor(e)}getMarkupLineColor(){var e;return(e=this.markupManager)==null?void 0:e.getLineColor()}setMarkupFillColor(e){var i;(i=this.markupManager)==null||i.setFillColor(e)}getMarkupFillColor(){var e;return(e=this.markupManager)==null?void 0:e.getFillColor()}setMarkupLineWidth(e){var i;(i=this.markupManager)==null||i.setLineWidth(e)}getMarkupLineWidth(){var e;return(e=this.markupManager)==null?void 0:e.getLineWidth()}setMarkupFontSize(e){var i;(i=this.markupManager)==null||i.setFontSize(e)}getMarkupFontSize(){var e;return(e=this.markupManager)==null?void 0:e.getFontSize()}getMarkups(){var n,s;let e=this.getActiveLayoutInfo();e.markupData=((n=this.markupManager)==null?void 0:n.getMarkupData())||[],e.markupData.forEach(a=>{a.layoutName||(a.layoutName=this.activeLayoutName)});let i=[];for(let a of Object.values(this.layoutInfos))(s=a.markupData)==null||s.forEach(o=>i.push(o));return i}setMarkups(e){this.clearMarkups(),e.forEach(s=>{var l;let a=s.layoutName||xr.MODEL_LAYOUT_NAME;(l=this.getLayoutInfo(a).markupData)==null||l.push(s)});let i=this.getActiveLayoutInfo();this.markupManager||(this.markupManager=new D0(this));let n=this.markupManager;i.markupData&&n.setMarkupData(i.markupData),this.enableRender()}setMarkupsVisibility(e){this.markupManager||(this.markupManager=new D0(this)),this.markupManager.setMarkupsVisibility(e)}removeMarkup(e){this.markupManager||(this.markupManager=new D0(this)),this.markupManager.removeMarkupById(e)}clearMarkups(){var e;(e=this.markupManager)==null||e.clearAll();for(let i of Object.values(this.layoutInfos))i.markupData=[]}addHotpoint(e){var a;if(this.hasHotpoint(e.hotpointId)){ne.warn(`[DxfViewer] Hotpoint with id '${e.hotpointId}' already exist!`);return}let n=e.anchorPosition,s=Sf.createHotpoint(e.html);s.position.set(n[0]||0,n[1]||0,n[2]||0),s.visible=e.visible!==!1,s.userData.hotpoint=e,s.updateWorldMatrix(!1,!1),this.hotpointRoot||(this.hotpointRoot=new hr,this.hotpointRoot.matrixAutoUpdate=!1,this.hotpointRoot.matrixWorldAutoUpdate=!1,this.hotpointRoot.name="HotpointRoot",(a=this.scene)==null||a.add(this.hotpointRoot)),this.hotpointRoot.add(s),this.enableRender()}removeHotpoint(e){var n,s;let i=((n=this.hotpointRoot)==null?void 0:n.children)||[];for(let a=0;a{var a;return((a=s.userData.hotpoint)==null?void 0:a.hotpointId)===e})!==-1}getHitResult(e){let i=this.viewerContainer;if(!this.camera||!this.raycaster||!this.groundPlane)return;let n=Mr.getScreenPointByEvent(e,i),s=Mr.screenPoint2NdcPoint(n,this.camera,i);this.raycaster.setFromCamera(s,this.camera),this.raycaster.layers.enable(10);let a=this.raycaster.intersectObject(this.groundPlane,!0);if(a&&a.length>0){let o=a[0].point;return{location:[o.x,o.y]}}}zoomToRect(){this.zoomToRectHelper||(this.zoomToRectHelper=new oE(this)),this.zoomToRectHelper.activate()}getLayoutByName(e){let i,n=this.getLayouts();for(let s of n)if(s.layoutName===e){i=s;break}return i}getActiveLayoutInfo(){return this.getLayoutInfo(this.activeLayoutName)}getMsTransformMatrix(e){var p,d;let i=this.loadedModels[e],n=(p=i.dxfData)==null?void 0:p.header;if(!n)return;let s=n.$ANGDIR,a=this.getDxfUnits(i.dxfData),o=(d=i.dxfData)==null?void 0:d.tables.viewPort.viewPorts.filter(f=>f.name.toLocaleUpperCase()==="*ACTIVE");if(!o)return;let l=new Ue,c=xr.getDcs2WcsMatrix(o[0],s),u=new A(o[0].center.x,o[0].center.y,0).applyMatrix4(c),h=1;this.units&&a!==this.units&&(h=w8(a,this.units)),u.multiplyScalar(h),l.makeTranslation(u.x,u.y,0),l.multiply(new Ue().makeRotationZ(wr.degToRad(o[0].viewTwistAngle))),l.multiply(new Ue().makeTranslation(-u.x,-u.y,0)),this.loadedModels[e].msTransformMatrix=l}switchTransformMs(e,i){var l;let n=this.loadedModels[i];if(!n){ne.warn(`[DxfViewer] Can't find model whose modelId is ${i}`);return}let s=n.msTransformMatrix;if(QS.identity(),!s||s.equals(QS))return;let a=(l=n.dxfData)==null?void 0:l.threejsObject,o=a==null?void 0:a.children.find(c=>c.name===xr.MODEL_LAYOUT_NAME);o&&(e===xr.MODEL_LAYOUT_NAME?o.applyMatrix4(s):o.applyMatrix4(s.clone().invert()),o.updateMatrixWorld(!0))}getLayoutExtentEx(e){return e.layoutName===xr.MODEL_LAYOUT_NAME?this.getModelSpaceExtent():this.getLayoutExtent(e)}getModelSpaceExtent(){var u,h;let e=this.loadedModels[this.masterModelId],i=(u=e.dxfData)==null?void 0:u.header,n=new A,s=new A;if(!i)throw new Error(`Header is undefined in ${this.masterModelId}!`);let a=(h=e.dxfData)==null?void 0:h.tables.viewPort.viewPorts,o=i.$EXTMIN,l=i.$EXTMAX,c=i.$ANGDIR;if(a&&a.length>0){for(let p=0;p0){let p=o.filter(b=>parseInt(b.viewportId)===1),d;p.length>0?d=p[0]:d=o[0];let{centerPoint:f,width_paperSpace:m,height_paperSpace:g}=d,y=xr.getDcs2WcsMatrix(d,u),E=new A(f.x,f.y,0);return E.applyMatrix4(y),l={x:E.x-m/2,y:E.y-g/2,z:0},c={x:E.x+m/2,y:E.y+g/2,z:0},s.set(l.x,l.y,l.z),a.set(c.x,c.y,c.z),new Ot(s,a)}}showLayoutObjects(e){Object.values(this.loadedModels).forEach(n=>{var l;let s=0,a=0,o=(l=n.dxfData)==null?void 0:l.threejsObject;o==null||o.children.forEach(c=>{let u=c.name===e;c.visible=u,u?s++:a++}),ne.debug(`[DxfViewer] showLayoutObjects('${e}') sets ${s} layout level object(s) to visible and ${a} to hidden for model '${o==null?void 0:o.name}'`)})}getLayoutViewports(e){var a;let i=this.loadedModels[this.masterModelId],n=e.ownerHandle,s=(a=i.dxfData)==null?void 0:a.layoutViewportsMap[n];return s||[]}setMaterialUniforms(e,i){e instanceof Yt&&(e.uniforms.u_cameraZoom&&(e.uniforms.u_cameraZoom=xr.cameraZoomUniform),e.uniforms.u_viewportScale&&(i==null?void 0:i.header.$PSLTSCALE)===1&&(e.uniforms.u_viewportScale=xr.viewportScaleUniform))}isLayerFrozenForViewport(e,i,n){if(!e||!i)return!1;let s=e.tables.layer.layers[i];return s&&(s.flag&1)>0?!0:!n||n.length<=0?!1:s&&n.indexOf(s.handle)>=0}getFilteredViewports(e){let i=this.getLayoutViewports(e),n=i.filter(s=>s.viewportId!=="1");return n.length===i.length&&(n=i.filter((s,a)=>a!==0)),n}generateObjectsByViewport(e,i,n,s=[]){let a=i;if(i.viewportId=="1")return;if(!a.psBBox||!a.msToPsMatrix)throw new Error("The bbox or matrix is invalid in the viewport!");xr.transformMatrixUniform={value:a.msToPsMatrix},xr.viewportScaleUniform={value:i.viewHeight/i.height_paperSpace};let o=a.psBBox.clone();o.applyMatrix4(a.msToPsMatrix.clone().invert()),o.min.setZ(-1),o.max.setZ(1);let l=this.getObjectsByBoundingBox(o);if(l.length===0)return;let c=a.psBBox.min,u=a.psBBox.max,h=new Ds(new le(c.x,c.y),new le(u.x,u.y)),p=qu.generateSectionPlanesByBox(h),d=[],f=P=>(d[P.id]||(d[P.id]=P.clone(),this.setMaterialUniforms(d[P.id],n),qu.setMaterialSection(d[P.id],p)),d[P.id]),m=P=>{if(Array.isArray(P)){let _=[];return P.forEach(w=>{let F=f(w);_.push(F)}),_}else return f(P)},g=[...s,...i.frozenLayerHandles||[]],y;if(e!==xr.MODEL_LAYOUT_NAME){let P=i;P.associatedLeafObjectSet||(P.associatedLeafObjectSet=new Set),y=P.associatedLeafObjectSet}let E=new hr;E.name=i.viewportId;let b=n==null?void 0:n.layersAndThreejsObjects,x=[];if(l.forEach(P=>{let _=P.clone();_.traverse(w=>{if(w.material&&w.geometry){let F=w.userData.layerName;if(this.isLayerFrozenForViewport(n,F,g)){x.push(w);return}w.userData.layerVisible!==!1&&(w.visible=!0),w.material=m(w.material),y==null||y.add(w),b&&b[F]?b[F].push(w):ne.warn(`[DxfViewer] Failed to find object for modelId '${this.masterModelId}', layer '${F}', layout '${e}'`)}}),_.userData.boundingBox&&(_.visible=!0,delete _.userData.boundingBox),E.add(_)}),y&&y.size===0)return;Qr.removeEmptyObjectsFromRemovingObjects(x,E);let S=n==null?void 0:n.threejsObject,D=S==null?void 0:S.children.find(P=>P.name===e);D||(D=new hr,Qr.setSharedVariablesOfObject(D),D.name=e,S==null||S.add(D)),D.add(E),E.applyMatrix4(a.msToPsMatrix),E.updateMatrixWorld(!0),E.traverse(P=>{Qr.setSharedVariablesOfObject(P),this.addSpatialFilterSection(P,n,!0)})}findSpatialFilter(e,i){let n=i.objects.SPATIAL_FILTER;if(!n)return;let s;for(let a of n)if(a.handle===e){s=a;break}return s}getAnyMaterial(e){let i=e;if(i.material)return Array.isArray(i.material)?i.material[0]:i.material;let n;for(let s=0;s0),o=l.clipIntersection),a&&o!==s.clipPolylines[0].bReversed){ne.warn("[DxfViewer] Material cannot set clipIntersection to different values at the same time. clipIntersection needs to be set to true here!");return}o=s.clipPolylines[0].bReversed;let c=this.generateSectionsBySpatialFilter(s,e.matrixWorld);if(c){let u=d=>{let f=0;return d.clippingPlanes&&(f=d.clippingPlanes.length),f+c.length>xr.maxFragmentUniforms},h=new Set,p=d=>{h.has(d.id)||(h.add(d.id),u(d)||qu.setMaterialSection(d,c,a,o))};e.traverse(d=>{let f=d.material;Array.isArray(f)?f.forEach(m=>{p(m)}):f&&p(f)})}}}getObjectsByBoundingBox(e){var l;let i=[];if(e.isEmpty())return ne.warn("[DxfViewer] bbox is empty !"),i;let n=c=>{let u=vn.getBoundingBox(c,!1);e.intersectsBox(u)&&i.push(c)},a=(l=this.loadedModels[this.masterModelId].dxfData)==null?void 0:l.threejsObject,o=a==null?void 0:a.children.find(c=>c.name===xr.MODEL_LAYOUT_NAME);return o&&o.children.forEach(c=>{n(c)}),i}getDxfUnits(e){if(e||Object.keys(this.loadedModels).length>0&&(e=this.loadedModels[this.masterModelId].dxfData),!e)return"Unitless";let i=e==null?void 0:e.header;if(!i)return ne.warn("DxfData or its header is undefined!"),"Unitless";let n=i.$INSUNITS;return xr.getDxfUnits(n)}generateSectionsBySpatialFilter(e,i){let n=e.clipPolylines[0];if(n.bConcave){ne.warn("[DxfViewer] clipPolyline.bConcave = true is not supported yet in spatialFilter !");return}QS.copy(i),e.localMatrix&&QS.multiply(e.localMatrix);let s=n.polyline,a=[];s.forEach(c=>{let u=c.clone().applyMatrix4(QS);a.push(new le(u.x,u.y))});let o=es.isClockWise(a),l=!o&&!n.bReversed||o&&n.bReversed;return qu.generateSectionPlanesByPoints(a,l)}addLoadedModelToScene(e,i,n){if(!this.scene)return;let s=i.modelId||i.src;if(this.loadedModels[s]){let o=1;for(;this.loadedModels[`${s}_${o}`];)o++;s=`${s}_${o}`,ne.warn(`[DxfViewer] Model '${s}' is loaded more than once!`)}this.loadedModels[s]={dxfData:n},e.matrixAutoUpdate=!1,e.updateMatrix(),St.printMemory("Before merge"),i.merge&&(xr.merge(n),St.printMemory("After merged")),e.updateMatrixWorld(!0),xr.computeLineDistances(e),this.getMsTransformMatrix(s),this.masterModelId===s?this.activateLayout(xr.MODEL_LAYOUT_NAME):this.handleOverlayDxf(s),ne.debug(n),this.scene.add(e);let a=n==null?void 0:n.threejsObject.children.find(o=>o.name===xr.MODEL_LAYOUT_NAME);a&&this.setLayoutHidableObjectArray(a),this.updateGroundPlane(),this.raycastableObjects=void 0,this.masterModelId===s?this.goToHomeView():this.enableRender()}resize(e,i){let n=this.camera;if(n){let s=e||window.innerWidth,a=i||window.innerHeight,o=s/a;n.left=-this.height*o/2,n.right=this.height*o/2,n.top=this.height/2,n.bottom=-this.height/2,n.updateProjectionMatrix(),this.renderer&&this.renderer.setSize(s,a),this.css2dRenderer&&(this.css2dRenderer.setSize(s,a),this.css2dRenderer.domElement.style.width="0",this.css2dRenderer.domElement.style.height="0"),this.overlayRender&&this.overlayRender.setSize(s,a)}this.enableRender()}getRaycaster(){return this.raycaster}getRaycastableObjects(){var n;if(this.raycastableObjects)return this.raycastableObjects;let e=Date.now(),i=[];for(let s of Object.values(this.loadedModels)){let a=(n=s.dxfData)==null?void 0:n.threejsObject,o=a&&a.children.find(l=>l.name===this.activeLayoutName);o&&o.traverseVisible(l=>{Qr.isLeafObject(l)&&i.push(l)})}return this.groundPlane&&i.push(this.groundPlane),this.raycastableObjects=i,ne.debug(`[DxfViewer] getRaycastableObjects() finds ${i.length} objects`),ne.debug(`[DxfViewer] getRaycastableObjects() costs ${(Date.now()-e)/1e3} s`),i}getViewportByPoint(e){if(this.activeLayoutName.length===0||this.activeLayoutName===xr.MODEL_LAYOUT_NAME)return;let i=this.getLayoutByName(this.activeLayoutName);if(!i)return;let n=a=>e.xa.max.x||e.ya.max.y,s=this.getFilteredViewports(i);for(let a=0,o=s.length;a{d.visible&&(i.push(d),l.add(d))})}let u=this.getViewportByPoint(this.raycaster.ray.origin);u&&u.associatedLeafObjectSet?(this.getRaycastableObjects().forEach(p=>{var d;(d=u.associatedLeafObjectSet)!=null&&d.has(p)&&!l.has(p)&&p.visible&&(i.push(p),l.add(p))}),ne.debug("[DxfViewer] getRaycastableObjectsByMouse() from inside of viewport:",u.viewportId)):ne.debug("[DxfViewer] getRaycastableObjectsByMouse() from out of viewport"),this.groundPlane&&i.push(this.groundPlane)}return ne.debug(`[DxfViewer] getRaycastableObjectsByMouse() costs ${(Date.now()-s)/1e3} s`),i}getIntersections(e){this.raycaster&&this.raycaster.layers.enable(10);let i=this.getRaycastableObjectsByMouse(e);return this.raycaster&&this.raycaster.intersectObjects(i,!0)||[]}handleMouseClick(e){var a;if(!this.enableSelection||this.measurementManager&&this.measurementManager.isMeasurementActive()||this.markupManager&&this.markupManager.isMarkupActive())return;let i=this.getIntersections(e);if(i.length>0){let o=l=>St.vectorToString(l);ne.debug(`[DxfViewer] Clicked at: ${o(i[0].point)}`)}let n=i.find(o=>{let l=o.object;return l.visible&&l.userData.selectable!==!1}),s=n&&n.object||void 0;if(i.length>0&&i[0].point){let o=(a=this.overlayRender)==null?void 0:a.getDrawablesByPosition(i[0].point,this.raycaster);if(o&&o.length>0){this.clearSelection(),o[0].selected=!0,this.selectedObject=o[0];return}}this.selectedObject&&this.clearSelection(),s&&this.selectedObject&&this.selectedObject.id===s.id&&(s=void 0),s?this.selectObject(s):this.clearSelection()}selectObject(e,i){if(!this.enableSelection)return;let n=a=>{if(a.children.length>0&&a.children.forEach(o=>n(o)),a instanceof Je||a instanceof _r){let o=Cs.clonedHighlightMaterials(a,{depthTest:i});o&&(a.userData.originalMaterial=a.material,a.material=o)}},s=a=>{if(a.children.length>0&&a.children.forEach(o=>s(o)),(a instanceof Je||a instanceof _r)&&a.userData.originalMaterial){let o=a.material;a.material=a.userData.originalMaterial,delete a.userData.originalMaterial,Array.isArray(o)?o.forEach(l=>l.dispose()):o instanceof Gr&&o.dispose()}};this.selectedObject&&(s(this.selectedObject),this.selectedObject=void 0),e&&(n(e),this.selectedObject=e,e.userData.dxfEntity?ne.info("[DxfViewer] Selected entity:",e.userData.dxfEntity):ne.info("[DxfViewer] Selected object:",e)),this.enableRender()}clearSelection(){this.selectedObject&&this.selectedObject instanceof po?this.selectedObject.selected=!1:this.selectObject(),this.selectedObject=void 0}flyToObjects(e){if(!e||e.length===0||!this.camera)return;let i=new Ot;e.forEach(n=>{let s=vn.getBoundingBox(n);s.isEmpty()||i.union(s)}),this.zoomToBBox(i)}flyToObject(e){this.flyToObjects([e])}flyToSelectedObject(){if(!this.selectedObject)return;let e=this.selectedObject;(e instanceof tn&&e.userData.clonedMesh||e instanceof Je&&ji.isMergedMesh(e)&&e.userData.clonedMesh)&&(e=e.userData.clonedMesh),this.flyToObject(e)}flyToRandomObject(){var h;let e=this.scene,i=[];for(let p of Object.values(this.loadedModels)){let d=(h=p.dxfData)==null?void 0:h.threejsObject;d&&i.push(d.id)}let n=i.length;if(n<=0)return;let s=Math.floor(Math.random()*n),a=i[s];if(!e.getObjectByProperty("id",a.toString()))return;let l=[];if(e.traverseVisible(p=>{let d=["SKYBOX","GROUND_GRID","GRASS_GROUND","BIM_VIEWER_BOX_HELPER"];(p instanceof Je||p instanceof _r)&&!d.includes(p.name)&&l.push(p.id)}),l.length<1)return;let c=Math.floor(Math.random()*l.length),u=e.getObjectById(l[c]);u&&(ne.info(`[DxfViewer] Flying to random object: ${u.name}, type: ${u.type}`),this.selectObject(u,void 0),this.flyToObject(u))}flyTo(e,i,n,s){let a=this.camera,o=this.controls;if(!a||!o)return;if(n&&(n=this.checkAndGetLimitedCameraZoom(n)),e.equals(i)){ne.error("[DxfViewer] Camera position and lookAt cannot be the same!");return}else if(!St.isVectorValid(e)||!St.isVectorValid(i)){ne.error("[DxfViewer] Invalid position or lookAt!",e,i);return}let l=e.distanceTo(i);la.far&&(e=e.clone().sub(i).normalize().multiplyScalar(a.far*.9),ne.warn("[DxfViewer] Camera could be too far to see the object!"));let c=(m,g,y)=>{a.lookAt(g),a.position.set(m.x,m.y,m.z),y&&Number.isFinite(y)&&(a.zoom=y,a.updateProjectionMatrix(),this.updateHidableObjectsVisibility()),o.target.set(g.x,g.y,g.z),o.update()};if(s===!1){this.cameraUpdateInterval&&clearInterval(this.cameraUpdateInterval),c(e,i,n);return}let u=a.position.clone(),h=o.target.clone(),p=a.zoom,d=300,f=Date.now();this.cameraUpdateInterval&&clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=setInterval(()=>{let m=Date.now()-f;m>d&&(m=d);let g=(x,S,D)=>{let P=x.x+(S.x-x.x)*D,_=x.y+(S.y-x.y)*D,w=x.z+(S.z-x.z)*D;return new A(P,_,w)},y=g(u,e,m/d),E=g(h,i,m/d),b;n&&(b=p+(n-p)*m/d),c(y,E,b),m>=d&&(clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=void 0)},10)}goTo(e,i,n){let s=this.camera,a=this.controls;if(!s||!a)return;let o=new A(e.x,e.y,s.position.z),l=new A(e.x,e.y,a.target.z);this.flyTo(o,l,i,n)}goToHomeView(){let e=this.getActiveLayoutInfo();e.bbox?this.zoomToBBox(e.bbox):ne.error(`[DxfViewer] Failed to find extent for ${this.activeLayoutName}`)}zoomToBBox(e){let i=this.camera;if(!i)return;let n=e.max.x-e.min.x,s=e.max.y-e.min.y,a=i.right-i.left,o=i.top-i.bottom,l=Math.min(a/n,o/s);l/=1.1;let c=new A;e.getCenter(c),c.z=0;let u=c.clone().setZ(this.CAMERA_Z_POSITION);u.equals(c)||this.flyTo(u,c,l,!1)}zoomToCompareChange(e){if(this.changes){let i=this.changes[e];if(!i)return;let n=i.box;n&&this.zoomToBBox(n.clone().expandByScalar(1.2))}}getCompareChanges(){return this.changes}setBackgroundColor(e,i,n){this.scene&&(this.scene.background=new Ve(e,i,n),this.enableRender())}setSpinnerVisibility(e){this.spinner&&(e?this.spinner.classList.remove("hidden"):this.spinner.classList.add("hidden"))}increaseJobCount(){this.setSpinnerVisibility(++this.jobCount>0)}decreaseJobCount(){this.setSpinnerVisibility(--this.jobCount>0)}getLayoutInfo(e){return this.layoutInfos[e]||(this.layoutInfos[e]={measurementData:[],markupData:[]}),this.layoutInfos[e]}updateGroundPlane(){if(!this.scene)return;let e=this.getActiveLayoutInfo();if(!e.bbox)return;let i=e.bbox.clone();St.expandBoxByScale(i,3);let n=i.min,s=i.max,a=s.x-n.x+s.y-n.y+s.z-n.z;St.expandBoxByMinSize(i,a);let o=[],l=(h,p,d)=>{o.push(new A(h,p,d))},c=i.getSize(new A),u=i.getCenter(new A);if(l(-c.x/2,-c.y/2,0),l(c.x/2,-c.y/2,0),l(c.x/2,c.y/2,0),l(-c.x/2,c.y/2,0),this.groundPlane)this.groundPlane.geometry.setFromPoints(o),this.groundPlane.geometry.computeBoundingSphere(),this.groundPlane.geometry.computeBoundingBox(),this.groundPlane.geometry.computeVertexNormals();else{let h=new it;h.setFromPoints(o),h.setIndex([0,3,2,0,2,1]),h.computeVertexNormals();let p=0,d=new or({color:"#888",transparent:!0,opacity:p,side:wi});this.groundPlane=new Je(h,d),this.groundPlane.frustumCulled=!1,this.groundPlane.position.copy(u),this.groundPlane.scale.set(1e5,1e5,1),this.groundPlane.name="groundPlane",this.groundPlane.userData.selectable=!1,this.groundPlane.renderOrder=-1e3,this.scene.add(this.groundPlane)}this.groundPlane.updateMatrixWorld()}computeBoundingBox(){var i;let e=new Ot;for(let n of Object.values(this.loadedModels)){let s=(i=n.dxfData)==null?void 0:i.threejsObject;if(s){let a=vn.getBoundingBox(s,!1);a.isEmpty()||e.union(a)}}return e.min.z=0,e.max.z=0,ne.info(`[BimViewer] computeBoundingBox(), BBox's max: ${e.max.toArray()}, min: ${e.min.toArray()}`),e}checkAndGetLimitedCameraZoom(e){if(!e)return 1;let i=e;return e{a.visible&&a.children.forEach(o=>{o.userData.boundingBox&&(fCe.intersectsBox(o.userData.boundingBox)?o.visible=!0:o.visible=!1)})})}ne.debug(`[DxfViewer] setVisibilityByCameraFrustum cost: ${(Date.now()-e)/1e3}s`)}getVisiblePixelSize(e){let i=wr.smoothstep(e,1e4,3e4)*6.5+.5;return ne.debug("[DxfViewer] visiblePixelSize:",i),i}setLayoutHidableObjectArray(e){let i=this.camera;if(!this.enableHideVisuallySmallObjects||!i)return;let n=Date.now(),s=e.name;this.sortedHidableObjects[s]||(this.sortedHidableObjects[s]=[]);let a=this.sortedHidableObjects[s],o=i.zoom;this.lastCameraZoom=o;let l=h=>{if(!this.isCompareMode()||!h.material)return!1;let p;return h.material instanceof Yt?p=h.material.uniforms.u_color.value:p=h.material.color,p.equals(new Ve(Wn.ENTITY_COLOR_ADDED))||p.equals(new Ve(Wn.ENTITY_COLOR_REMOVED))},c=1;e.traverse(h=>{if(this.isCompareMode()&&l(h)||!Qr.isLeafObject(h))return;let p=h.geometry;p.boundingBox||p.computeBoundingBox();let d=p.boundingBox.clone();if(!d||!St.isBoxValid(d))return;d.applyMatrix4(h.matrixWorld),d.getSize(M3);let f=Math.max(M3.x,M3.y),m=c/f;m<1/0?a.push({visibleMinZoom:m,object:h}):h instanceof rn?a.push({visibleMinZoom:c,object:h}):ne.warn("[DxfViewer] The size of bbox is 0 ! ",h)}),c=this.getVisiblePixelSize(a.length);let u=0;a.forEach(h=>{let p=h.visibleMinZoom*c;h.visibleMinZoom=p,h.object.userData.visibleMinZoom=p,p>o&&(h.object.visible=!1,u++)}),a.sort((h,p)=>h.visibleMinZoom-p.visibleMinZoom),ne.debug(`[DxfViewer] setLayoutHidableObjectArray cost: ${(Date.now()-n)/1e3}s, ${u} objects changed to hidden`)}statObjects(e){let i=this.sortedHidableObjects[this.activeLayoutName],n=c=>{let u=0,h=c;for(;h&&(u++,h!==e);)h=h.parent;return u},s=i.length,a={},o=0;i.forEach(c=>{let u=c.object;if(u.geometry&&u.material){o++;let h=n(c.object);a[h]||(a[h]=0),a[h]++}});let l=0;e.traverse(c=>{let u=c;u.geometry&&u.material&&l++}),ne.info(`[DxfViewer] hidableObjects count:${s}, real count:${o}, layout count: ${l}, level:`,a),ne.info("[DxfViewer] scene:",this.scene)}updateHidableObjectsVisibility(){let e=this.camera;if(!e)return;let i=Date.now(),n=e.zoom;if(Math.abs(n-this.lastCameraZoom)<1e-5||(this.updateRaycasterThreshold(),this.updateCameraZoomUniform(n),this.raycastableObjects=void 0,!this.sortedHidableObjects[this.activeLayoutName]))return;let s=this.sortedHidableObjects[this.activeLayoutName];if(s.length===0)return;let a=n>this.lastCameraZoom,o=Math.min(n,this.lastCameraZoom),l=Math.max(n,this.lastCameraZoom),c=[],u=0;for(let h=0;hl)break;s[h].object.visible=a,a&&c.push(s[h].object),u++}this.lastCameraZoom=n,ne.debug(`[DxfViewer] updateHidableObjectsVisibility cost: ${(Date.now()-i)/1e3}s, ${u}(out of ${s.length}) objects changed to ${a?"visible":"hidden"}`),this.groundPlane&&c.push(this.groundPlane),this.raycastableObjects=c}updateRaycasterThreshold(){let e=this.camera;if(!e||!this.raycaster)return;let i=12/e.zoom,n=this.raycaster.params;n.Line?n.Line.threshold=i:n.Line={threshold:i},n.Points?n.Points.threshold=i:n.Points={threshold:i}}updateCameraZoomUniform(e){xr.cameraZoomUniform.value=e}};var D3=Un(Yl(),1);var VG=class{constructor(r,e,i){this.scene=this.initScene();this.selectedObject=void 0;this.loadedModels={};this.viewerMode=0;this.raycaster=new Oc;this.savedMaterialsForOpacity=[];this.jobCount=0;this.bbox=new Ot;this.outlineMaterial=new Tr({color:1118481});this.outlineRoot=new hr;this.transparentObjectIds=[];this.applyOptionsAndAddToScene=(r,e,i)=>{if(ne.info(`[SimplifiedBimViewer] '${r}' is loaded, adding to scene...`),i.matrix&&i.matrix.length===16){let n=new Ue;n.elements=i.matrix,e.applyMatrix4(n)}else{let n=i.position||[0,0,0],s=i.rotation||[0,0,0],a=i.scale||[1,1,1];e.position.set(n[0],n[1],n[2]),e.rotation.set(s[0]*Math.PI/180,s[1]*Math.PI/180,s[2]*Math.PI/180),e.scale.set(a[0],a[1],a[2])}this.addLoadedModelToScene(e,i)};this.getMeshes=r=>{let e=[];return r instanceof Je?e.push(r):r.traverseVisible(i=>{i instanceof Je&&e.push(i)}),e};if(this.containerOrCanvas=r,e&&(this.viewerMode=e),this.glContext=i,this.viewerMode===1&&!(!(r instanceof HTMLDivElement)&&i))throw new Error("[SimplifiedBimViewer] Parameters don't match Browserless viewerMode !");this.increaseJobCount(),this.init(),this.decreaseJobCount(),ne.info("[SimplifiedBimViewer] Initialized"),this.animate()}init(){this.initRenderer(),this.initCamera(),this.initControls(),this.initLights(),this.initPointerEvents(),this.scene.add(this.outlineRoot)}initScene(){let r=new On;return r.background=new Ve(7112861),r.matrixAutoUpdate=!0,r}isBrowserlessMode(){return this.viewerMode===1}isBrowserMode(){return this.viewerMode===0}initRenderer(){let r={antialias:!0,preserveDrawingBuffer:!0},e=this.isBrowserlessMode();e&&Object.assign(r,{canvas:this.containerOrCanvas,context:this.glContext});let i=new Pl(r);if(e){let n=this.containerOrCanvas.width,s=this.containerOrCanvas.height;ne.info(`[SimplifiedBimViewer] Render target size: ${n} x ${s}`),this.renderTarget=new kr(n,s,{minFilter:ai,magFilter:Di,format:Bs,type:Fu}),i.setRenderTarget(this.renderTarget)}else{let n=this.containerOrCanvas.clientWidth,s=this.containerOrCanvas.clientHeight;this.containerOrCanvas.append(i.domElement),i.setPixelRatio(window.devicePixelRatio),i.setSize(n,s)}i.outputEncoding=yr,i.toneMappingExposure=1,i.physicallyCorrectLights=!0,i.setClearColor(11119017,1),i.shadowMap.enabled=!0,i.shadowMap.type=Ly,this.renderer=i,e||(this.pmremGenerator=new yp(i),this.pmremGenerator.compileEquirectangularShader(),this.setEnvironmentFromDataArray())}initCamera(){if(!this.scene)return;let r=this.containerOrCanvas.clientWidth||this.containerOrCanvas.width||0,e=this.containerOrCanvas.clientHeight||this.containerOrCanvas.height||0,i=1;r&&e&&(i=r/e),this.camera=new qr(68,i,.05,1e4),this.camera.position.set(10,10,10),this.camera.lookAt(0,0,0),this.scene.add(this.camera)}initControls(){if(!this.renderer)return;let r=this.camera;if(!r)return;let e=new cT(r,this.renderer.domElement);e.enableDamping=!0,e.dampingFactor=.5,e.enabled=!0,e.keyPanSpeed=10,e.keys={LEFT:"KeyD",UP:"KeyE",RIGHT:"KeyA",BOTTOM:"KeyQ"},e.update(),this.controls=e,e.addEventListener("change",()=>{!this.isBrowserMode()&&this.renderer&&this.renderer.render(this.scene,r)})}initLights(){if(!this.scene)return;let r=16777215,e=.3,i=new $s(r,e);i.position.set(-2,2,4);let n=new Ol(3158064),s=new pf(r,14540253,3);s.position.set(0,300,0),this.scene.add(i),this.scene.add(n),this.scene.add(s)}initPointerEvents(){if(!this.renderer||!this.camera||!this.controls)return;let r=!1,e=!1,i=-1,n=-1;this.renderer.domElement.addEventListener("pointerdown",s=>{i=s.x,n=s.y,r=!1}),this.renderer.domElement.addEventListener("pointermove",s=>{i>=0&&n>=0&&(Math.abs(s.x-i)>5||Math.abs(s.y-n)>5)&&(r=!0)}),this.renderer.domElement.addEventListener("pointerup",()=>{e&&setTimeout(()=>{e=!1},200),i=-1,n=-1}),this.renderer.domElement.addEventListener("dblclick",s=>{e=!0,r||(this.handleMouseClick(s),this.flyToSelectedObject())})}animate(){var r;this.isBrowserMode()&&requestAnimationFrame(this.animate.bind(this)),this.controls&&this.controls.update(),this.scene&&this.camera&&((r=this.renderer)==null||r.render(this.scene,this.camera))}destroy(){this.camera=void 0,this.scene&&this.scene.clear(),this.renderer&&(this.containerOrCanvas.removeChild(this.renderer.domElement),this.renderer.clear(),this.renderer.dispose(),this.renderer=void 0),this.controls&&(this.controls.dispose(),this.controls=void 0),this.renderTarget&&(this.renderTarget.dispose(),this.renderTarget=void 0),this.raycaster=void 0,this.selectedObject=void 0,this.savedMaterialsForOpacity=void 0,Object.keys(this.loadedModels).forEach(r=>{delete this.loadedModels[r]})}loadLocalModel(r,e,i){return ot(this,null,function*(){let s=yield new Zc().loadLocalModel(r,e.src,i);return s?(this.applyOptionsAndAddToScene(r,s,e),Promise.resolve()):Promise.reject()})}loadModel(r,e){return ot(this,null,function*(){this.increaseJobCount();let n=yield new Zc().loadModel(r.src,r.fileFormat,e);return n?(this.applyOptionsAndAddToScene(r.src,n,r),Promise.resolve()):Promise.reject()})}parseGltf(r,e,i,n){this.increaseJobCount(),new Zc().parseGltf(r,e.src,s=>{this.applyOptionsAndAddToScene(e.src,s,e),i&&i(s)},s=>{n&&n(s)})}addLoadedModelToScene(r,e){if(!this.scene)return;r.updateMatrix(),this.scene.add(r);let i=new Lg(r);i.name="BIM_VIEWER_BOX_HELPER",i.visible=!1,i.material&&(i.material=void 0,i.layers.set(11));let n=e.modelId||e.src;if(this.loadedModels[n]){let o=1;for(;this.loadedModels[`${n}_${o}`];)o++;n=`${n}_${o}`,ne.warn(`[BimViewer] Model '${n}' is loaded more than once!`)}this.loadedModels[n]={id:r.id,bbox:i},this.computeBoundingBox();let s=Object.values(this.loadedModels).map(o=>o.id);(!s||s.length<=1)&&(this.tryAdjustCameraNearAndFar(),this.goToHomeView()),this.scene.add(i),e.edges&&Qr.addOutlines(r),this.decreaseJobCount(),ne.info(`[SimplifiedBimViewer] Added '${e.src}' to scene`)}addOrRemoveObjectOpacity(r=!0,e=.3,i,n){if(this.savedMaterialsForOpacity||(this.savedMaterialsForOpacity=[]),!this.scene)return;let s=this.scene,a=[];Object.keys(this.loadedModels).forEach(o=>{let l=this.loadedModels[o];if(r){this.savedMaterialsForOpacity&&this.savedMaterialsForOpacity.length>0&&Qr.revertObjectOpacityById(s,l.id,this.savedMaterialsForOpacity);let c=Qr.setObjectOpacityById(s,l.id,e,i,n);a.push(...c)}else this.savedMaterialsForOpacity&&Qr.revertObjectOpacityById(s,l.id,this.savedMaterialsForOpacity)}),r?this.savedMaterialsForOpacity=a:this.savedMaterialsForOpacity=[]}hasTransparentObject(){return!!(this.savedMaterialsForOpacity&&this.savedMaterialsForOpacity.length>0)}getIntersections(r){if(!this.raycaster||!this.camera||!this.scene)return[];let e=new le;r&&(e=Mr.getScreenPointByEvent(r,this.containerOrCanvas));let i=Mr.screenPoint2NdcPoint(e,this.camera,this.containerOrCanvas);this.raycaster.setFromCamera(i,this.camera);let n=[];return Object.values(this.loadedModels).forEach(s=>{let a=this.scene&&this.scene.getObjectById(s.id);a&&a.visible&&n.push(a)}),this.raycaster.intersectObjects(n,!0)||[]}handleMouseClick(r){let i=this.getIntersections(r).find(s=>{let a=s.object;return a.visible&&(a.userData.selectable!==!1||a instanceof Je)}),n=i&&i.object||void 0;n&&this.selectedObject&&this.selectedObject.id===n.id&&(n=void 0),n?this.selectObject(n):this.clearSelection()}selectObject(r){if(this.selectedObject){let i=this.selectedObject.userData;if(i.originalMaterial){if(this.selectedObject.material){let n=this.selectedObject.material;Array.isArray(n)?n.forEach(s=>s.dispose()):n instanceof Gr&&n.dispose()}this.selectedObject.material=i.originalMaterial,delete i.originalMaterial}this.selectedObject=void 0}if(!this.scene||!r)return;let e=Cs.clonedHighlightMaterials(r);e&&(this.selectedObject=r,this.selectedObject.userData.originalMaterial=this.selectedObject.material,this.selectedObject.material=e)}clearSelection(){this.selectObject()}flyToObjects(r){if(!r||r.length===0||!this.camera)return;let e=new A,i=new A,n=new Ot;r.forEach(a=>{let o=vn.getBoundingBox(a);n.union(o)});let s=new A;this.camera.getWorldDirection(s),bs.getCameraPositionByBboxAndDirection(n,e,i,this.camera.projectionMatrix,s),this.flyTo(e,i)}flyToObject(r){this.flyToObjects([r])}flyToSelectedObject(){this.selectedObject&&this.flyToObject(this.selectedObject)}flyTo(r,e,i){var l;let n=this.camera,s=this.controls;if(!n||!s)return;r=Array.isArray(r)?new A(r[0],r[1],r[2]):r,e=Array.isArray(e)?new A(e[0],e[1],e[2]):e;let a=r,o=e;ne.info("[SimplifiedBimViewer] flyTo: ",St.vectorToString(a)),n.lookAt(o.x,o.y,o.z),n.position.set(a.x,a.y,a.z),s.target.set(o.x,o.y,o.z),s.update(),this.isBrowserMode()||(l=this.renderer)==null||l.render(this.scene,n),i&&i()}goToHomeView(){var l;let r=new A,e=new A,i=new A,n=new A;this.bbox.getSize(n),this.bbox.getCenter(i);let s=(n.x+n.y+n.z)/3*1.5,a=new A(i.x+s,i.y+s/1.5,i.z+s),o=i.clone().sub(a);bs.getCameraPositionByBboxAndDirection(this.bbox,r,e,(l=this.camera)==null?void 0:l.projectionMatrix,o),r.equals(e)||this.flyTo(r,e)}setEnvironmentFromDataArray(r){Lc.createEnvTextureFromDataArray(this.pmremGenerator,r).then(e=>{this.scene.environment=e,this.isBrowserMode()||this.animate()})}tryAdjustCameraNearAndFar(){let r=this.camera;if(!this.scene||!r)return;let e=this.bbox,i=r.near,n=r.far,s=e.max.x-e.min.x,a=e.max.y-e.min.y,o=e.max.z-e.min.z,l=Math.max(s,a,o),c=5,u=l/c,h=l*c;if(i>u||nSt.numberToString(d);ne.info(`[SimplifiedBimViewer] BBox's longest side is: ${p(l)}`),i>u&&(ne.warn(`[SimplifiedBimViewer] camera.near(${p(i)}) shouldn't bigger than ${p(u)}, will change it!`),r.near=u),n0?void 0:this.transparentObjectIds,i=this.transparentObjectIds.length>0?this.transparentObjectIds:void 0,n=new or({color:16777215,transparent:!0,opacity:.1});Object.keys(this.loadedModels).forEach(a=>{let o=this.loadedModels[a];Qr.applyMaterialToObjectById(this.scene,o.id,n,i,e)}),this.outlineRoot.clear();let s=[];if(r.forEach(a=>{let o=a.modelId,l=o?this.scene.getObjectById(this.loadedModels[o].id):this.scene;l||(ne.warn(`[BimViewer] The ModelId of ${o} has no corresponding model.`),l=this.scene),l.traverse(c=>{if((0,D3.includes)(a.id,(0,D3.get)(c.userData,"UniqueId"))){let u=this.getMeshes(c);s=s.concat(u)}})}),s.length>0){s.forEach(o=>{var c;let l=Qr.createOutline(o.geometry,o.matrix,this.outlineMaterial);(c=o.parent)!=null&&c.matrixWorld&&l.applyMatrix4(o.parent.matrixWorld),this.outlineRoot.add(l)});let a=s.map(o=>o.id);Object.keys(this.loadedModels).forEach(o=>{let l=this.loadedModels[o];Qr.revertAppliedMaterialToObjectById(this.scene,l.id,a)}),this.transparentObjectIds=a,this.flyToObjects(s)}else ne.warn(`[BimViewer] No object found with uniqueIds: ${r.map(a=>a.id)}`);this.isBrowserMode()||this.animate()}increaseJobCount(){++this.jobCount}decreaseJobCount(){--this.jobCount}computeBoundingBox(){let r=new Ot;return Object.values(this.loadedModels).forEach(e=>{if(e.bbox){e.bbox.geometry.computeBoundingBox();let i=e.bbox.geometry.boundingBox;i&&!i.isEmpty()&&r.union(i)}}),this.bbox=r,r}getContext(){var r;return(r=this.renderer)==null?void 0:r.getContext()}getCameraDirection(){var e;let r=new A;return(e=this.camera)==null||e.getWorldDirection(r),{x:r.x,y:r.y,z:r.z}}setFov(r){this.camera&&(this.camera.fov=r,this.camera.updateProjectionMatrix())}};var gCe=Un(Yl(),1);var cm=class extends hr{constructor(e,i,n=10){super();this.images=e,this.thumbnailImages=i,this.size=n,this.textureLoader=new Es,this.mesh=new Je}fadeIn(e=1e3){let n=this.getMaterials();if(Array.isArray(n)&&n.length>0)n.forEach(a=>a.opacity=0);else{this.visible=!0;return}let s=1/(e/10);this.visible=!0,this.clearFading(),this.renderOrder+=1,this.fadingInInterval=setInterval(()=>{let a=1,o=this.getMaterials();this.materialEquals(n,o)||(n=o),n.length>0&&(a=Math.min(n[0].opacity+s,1),n.forEach(l=>l.opacity=a)),a>=1&&this.clearFading()},10)}materialEquals(e,i){return gCe.default.isEqualWith(e,i,(n,s)=>{if(!(Array.isArray(n)&&Array.isArray(s)))return n.id===s.id})}fadeOut(e=1e3){let n=this.getMaterials(),s=1/(e/10),a=2,o=3,l=(o-a)/(e/10);this.clearFading(),this.scale.set(a,a,a),this.fadingOutInterval=setInterval(()=>{let c=this.scale.x+l;this.scale.set(c,c,c);let u=0;n.length>0&&(u=Math.max(n[0].opacity-s,0),n.forEach(h=>h.opacity=u)),(u<=0||c>=o)&&this.clearFading()},10)}clearFading(){let e=this.getMaterials();this.fadingInInterval&&(clearInterval(this.fadingInInterval),this.fadingInInterval=void 0,this.visible=!0,e.forEach(i=>i.opacity=1),this.renderOrder-=1),this.fadingOutInterval&&(clearInterval(this.fadingOutInterval),this.fadingOutInterval=void 0,this.visible=!1,e.forEach(i=>i.opacity=1),this.scale.set(1,1,1))}getMaterials(){let e=this.thumbnailMesh;e||(e=this.mesh);let i=[];return Array.isArray(e.material)?i.push(...e.material):e.material&&i.push(e.material),i}create(){}createThumbnailMesh(e){return ot(this,null,function*(){if(!this.thumbnailImages||this.thumbnailImages.length!=6)return;this.thumbnailMesh=new Je(new Qa(e,e,e)),this.thumbnailMesh.geometry.scale(1,1,-1);let n=(yield this.loadTexturesAsync(this.thumbnailImages)).map(s=>new or({map:s,side:en,transparent:!0}));this.thumbnailMesh&&(this.thumbnailMesh.material=n,this.add(this.thumbnailMesh))})}loadTextures(e){return e.map(i=>this.textureLoader.load(i))}loadTexturesAsync(e){return ot(this,null,function*(){let i=e.map(n=>this.textureLoader.loadAsync(n));return yield Promise.all(i)})}destroyMesh(e){var i;this.remove(e),e.clear(),e.geometry.dispose(),Array.isArray(e.material)?e.material.forEach(n=>{var s;(s=n.map)==null||s.dispose(),n.dispose()}):((i=e.material.map)==null||i.dispose(),e.material.dispose())}destroy(){this.clearFading(),this.images=[],this.mesh&&(this.mesh instanceof Je?this.destroyMesh(this.mesh):this.mesh.traverse(e=>{e instanceof Je&&this.destroyMesh(e)}),this.mesh=void 0)}};var C3=class extends cm{constructor(r,e,i=20){if(super(r,e,i),r.length!==6)throw new Error(`[VRCube] Wrong number of images! Expected 6, got ${r.length}`)}create(){return ot(this,null,function*(){yield this.createThumbnailMesh(this.size+.1),this.thumbnailMesh?this.createMesh():yield this.createMesh()})}createMesh(){return ot(this,null,function*(){let r=this.mesh;r.geometry=new Qa(this.size,this.size,this.size),r.geometry.scale(1,1,-1);let i=(yield this.loadTexturesAsync(this.images)).map(n=>new or({map:n,side:en,transparent:!0}));r.material=i,this.add(r),this.thumbnailMesh&&(this.destroyMesh(this.thumbnailMesh),this.thumbnailMesh=void 0,this.thumbnailImages=void 0)})}};var A3=class extends cm{constructor(e,i,n=20){super(e,i,n);if(e.length!==24)throw new Error(`[VRCube24Faces] Wrong number of images! Expected 24, got ${e.length}`);this.ratio=1/1,this.subPlaneWidth0=this.size*(this.ratio/(this.ratio+1)),this.subPlaneWidth1=this.size-this.subPlaneWidth0}create(){return ot(this,null,function*(){yield this.createThumbnailMesh(this.size+.1),this.thumbnailMesh?this.createMesh():yield this.createMesh()})}createMesh(){return ot(this,null,function*(){var h;this.mesh=new hr,this.mesh.scale.set(1,1,-1);let i=(yield this.loadTexturesAsync(this.images)).map(p=>new or({map:p,side:Gn,transparent:!0}));if(i.length!==24)throw new Error(`[VRCube24Faces] Wrong number of materials! Expected 24, got ${i.length}`);let n=4,s=this.createPlaneOfAFace(i.slice(0,n));s.rotateOnAxis(new A(0,1,0),-Math.PI/2),s.position.set(this.size/2,0,0);let a=this.createPlaneOfAFace(i.slice(n,n*2));a.rotateOnAxis(new A(0,1,0),Math.PI/2),a.position.set(-this.size/2,0,0);let o=this.createPlaneOfAFace(i.slice(n*2,n*3));o.rotateOnAxis(new A(1,0,0),-Math.PI/2),o.rotateOnAxis(new A(0,0,1),Math.PI),o.rotateOnAxis(new A(1,0,0),Math.PI),o.position.set(0,this.size/2,0);let l=this.createPlaneOfAFace(i.slice(n*3,n*4));l.rotateOnAxis(new A(1,0,0),Math.PI/2),l.rotateOnAxis(new A(0,0,1),Math.PI),l.rotateOnAxis(new A(1,0,0),Math.PI),l.position.set(0,-this.size/2,0);let c=this.createPlaneOfAFace(i.slice(n*4,n*5));c.rotateOnAxis(new A(0,1,0),Math.PI),c.position.set(0,0,this.size/2),this.createPlaneOfAFace(i.slice(n*5,n*6)).position.set(0,0,-this.size/2),this.add(this.mesh),this.thumbnailMesh&&(this.destroyMesh(this.thumbnailMesh),this.remove(this.thumbnailMesh),(h=this.thumbnailMesh)==null||h.clear(),this.thumbnailMesh=void 0)})}createPlaneOfAFace(e){var p;let i=new hr,n=new ts(this.subPlaneWidth0,this.subPlaneWidth0),s=new ts(this.subPlaneWidth1,this.subPlaneWidth0),a=new ts(this.subPlaneWidth0,this.subPlaneWidth1),o=new ts(this.subPlaneWidth1,this.subPlaneWidth1),l=new Je(n,e[0]),c=new Je(s,e[1]),u=new Je(a,e[2]),h=new Je(o,e[3]);return l.position.set(this.subPlaneWidth1/2,this.subPlaneWidth1/2,0),c.position.set(-this.subPlaneWidth0/2,this.subPlaneWidth1/2,0),u.position.set(this.subPlaneWidth1/2,-this.subPlaneWidth0/2,0),h.position.set(-this.subPlaneWidth0/2,-this.subPlaneWidth0/2,0),l.geometry.scale(-1,1,1),c.geometry.scale(-1,1,1),u.geometry.scale(-1,1,1),h.geometry.scale(-1,1,1),i.add(l,c,u,h),(p=this.mesh)==null||p.add(i),i}};var O3=class extends cm{constructor(r,e,i=10){if(super(r,e,i),r.length!==1)throw new Error(`[VRSphere] Wrong number of images! Expected 1, got ${r.length}`)}create(){return ot(this,null,function*(){yield this.createThumbnailMesh(this.size+.1),this.thumbnailMesh?this.createMesh():yield this.createMesh()})}createMesh(){return ot(this,null,function*(){var s;let r=this.mesh,e=100;r.geometry=new ro(this.size,e,e),r.geometry.scale(-1,1,1);let n=(yield this.loadTexturesAsync(this.images)).map(a=>new or({map:a,side:en,transparent:!0}));r.material=n[0],this.add(r),this.thumbnailMesh&&(this.destroyMesh(this.thumbnailMesh),this.remove(this.thumbnailMesh),(s=this.thumbnailMesh)==null||s.clear(),this.thumbnailMesh=void 0)})}};var zG=class extends Jf{constructor(e,i){super(e);this.name="BaseViewer";this.minFov=50;this.maxFov=95;this.raycaster=new Oc;this.autoRotate=!0;this.events=[];this.lastFrameExecuteTime=Date.now();this.maxFps=60;this.isMousePressing=!1;this.settings=sT;this.jobCount=0;this.viewpoints=[];this.previousViewpointId="";this.previousPanoramaId="";this.activeViewpointId="";this.activePanoramaId="";this.viewpointAssetsMap=new Map;this.loadingPanos=[];this.onResize=()=>{var i;let e=(i=this.renderer)==null?void 0:i.domElement;e&&e.parentElement&&this.resize(e.parentElement.clientWidth,e.parentElement.clientHeight)};this.onMouseWheel=e=>{let n=e.wheelDelta>0?-5:5;this.updateFov(n)};this.viewerCfg=e,this.cameraCfg=i||{eye:[0,0,0],look:[0,0,0]},this.settings=sT,this.cameraCfg.near&&(this.settings.camera.near=this.cameraCfg.near),this.cameraCfg.far&&(this.settings.camera.far=this.cameraCfg.far),this.setSpinnerVisibility(++this.jobCount>0),this.init(),this.animate(),this.setSpinnerVisibility(--this.jobCount>0)}init(){let e=this.viewerCfg;this.initSpinner(),this.initScene(),this.initRenderer(),this.initCamera(),this.initControls(),this.initLights(),this.initEvents(),this.initOthers(),e.enableAxisGizmo===!0&&(this.axes=this.initAxes()),e.enableToolbar&&(this.toolbar=this.initToolbar()),e.enableBottomBar&&(this.bottomBar=this.initBottomBar())}initScene(){let e=new On;e.background=new Ve(16777215),e.matrixAutoUpdate=!0,this.scene=e}initRenderer(){var e,i;this.renderer=new Pl({antialias:!1,preserveDrawingBuffer:!1}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),this.css2dRenderer=new xf,this.css2dRenderer.setSize(this.width,this.height),this.css2dRenderer.domElement.style.height="0",this.css2dRenderer.domElement.style.width="0",(e=this.viewerContainer)==null||e.appendChild(this.renderer.domElement),(i=this.viewerContainer)==null||i.appendChild(this.css2dRenderer.domElement)}initCamera(){this.scene&&(this.camera=new qr(75,this.width/this.height,this.settings.camera.near,this.settings.camera.far),this.scene.add(this.camera))}initControls(){if(!this.renderer||!this.camera)return;let e=this.camera,i=this.viewerCfg,n=new uO(e,this.renderer.domElement,!0);n.enabled=!0,n.autoRotate=this.autoRotate,n.autoRotateSpeed=i.autoRotateSpeed||-2,n.enablePan=!1,n.enableZoom=!1,n.enableRotate=!0,n.rotateSpeed=.3,n.minPolarAngle=Math.PI*.05,n.maxPolarAngle=Math.PI*.95,n.listenToKeyEvents(document.body),n.update(),this.controls=n,this.controlsHelper=new WC(e,n),this.controls.controlsHelper=this.controlsHelper,this.autoRotate&&this.controlsHelper.delayAutoRotate(),this.controlsHelper.automaticallyAdjustCameraPosition=!1,this.controls.addEventListener("end",()=>{this.handleDragEnd&&this.handleDragEnd()});let s=new A(0,0,0),a=new A(10,0,0);this.setCameraPositionAndDirection(s,a)}onKeyDown(e){return i=>{var a,o;let n=e.camera,s=e.controls;!n||!s||((i.code==="ArrowLeft"||i.code==="ArrowRight"||i.code==="ArrowUp"||i.code==="ArrowDown")&&((a=this.controlsHelper)==null||a.startToRotate(i)),(o=this.controlsHelper)==null||o.delayAutoRotate())}}initLights(){if(!this.scene)return;let e=new $s(16777215,.3);e.position.set(-2,2,4),this.scene.add(e)}initEvents(){let e=this.renderer,i=this.camera;if(!e||!i)return;let n=!1,s=-1,a=-1;this.addEvent(window,"keydown",this.onKeyDown(this)),this.addEvent(window,"resize",this.onResize),this.addEvent(window,"mousewheel",this.onMouseWheel),this.addEvent(window,"pointerdown",o=>{var l;s=o.x,a=o.y,n=!1,this.isMousePressing=!0,this.autoRotate&&((l=this.controlsHelper)==null||l.delayAutoRotate()),o.button===bi.LEFT&&o.target instanceof HTMLCanvasElement&&(e.domElement.style.cursor="move")}),this.addEvent(window,"pointermove",o=>{s>=0&&a>=0&&(Math.abs(o.x-s)>5||Math.abs(o.y-a)>5)&&(n=!0)}),this.addEvent(window,"pointerup",o=>{var l,c;if(this.isMousePressing=!1,this.autoRotate&&((l=this.controlsHelper)==null||l.delayAutoRotate()),e.domElement.style.cursor="auto",!(n||o.button!==bi.LEFT))if(o.target&&o.target instanceof HTMLDivElement){let u=Sf.tryFindObjectId(o.target);if(u){let h=(c=this.scene)==null?void 0:c.getObjectById(u);if(h){let p=h.userData.hotpoint;p&&(ne.info("[VRViewer] Clicked on hotpoint: ",p.hotpointId||p),this.onHotpointClicked&&this.onHotpointClicked(p))}}}else{let u=this.getIntersection(o);if(u){let h=f=>St.vectorToString(f),p=u.point,d=p.clone().sub(i.position).normalize();ne.info(`[VRViewer] Clicked at: ${h(p)}, - Camera position: ${h(i.position)}, - Target direction: ${h(d)}`)}}})}initSpinner(){var n;let e=document.createElement("div");e.classList.add("spinner");let i=document.createElement("div");i.classList.add(ho,"icon-loading"),e.append(i),(n=this.widgetContainer)==null||n.appendChild(e),this.spinner=e,this.setSpinnerVisibility(this.jobCount>0)}initOthers(){!this.controls||!this.renderer||!this.camera||(this.renderer.domElement.style.outlineWidth="0")}initAxes(){var n;let e=document.createElement("div");e.classList.add("axesRenderer");let i=new If(e,this.camera);return(n=this.widgetContainer)==null||n.append(e),i}initToolbar(){let e=this.viewerCfg;return new vh(this,Ur(Ur({},mDe),e.toolbarMenuConfig),[["SceneClear"]])}initBottomBar(){return new nm(this)}animate(){var e,i,n,s;if(requestAnimationFrame(this.animate.bind(this)),this.maxFps>0){let a=Date.now()-this.lastFrameExecuteTime;if(a<1e3/this.maxFps)return;if(this.lastFrameExecuteTime=Date.now(),this.autoRotate){let o=this.controlsHelper;o&&o.autoRotateRemainingTime>0&&!this.isMousePressing&&(o.autoRotateRemainingTime-=a,o.autoRotateRemainingTime<=0&&this.controls&&o.startAutoRotate())}}(e=this.controls)==null||e.update(),this.scene&&this.camera&&((i=this.renderer)==null||i.render(this.scene,this.camera),(n=this.css2dRenderer)==null||n.render(this.scene,this.camera),(s=this.css3dRenderer)==null||s.render(this.scene,this.camera))}clearAllCachedPanoramas(){this.handleCameraUpdateInterval(),this.loadingPanos.forEach(e=>{e.creationPromise&&(e.creationPromise.cancel(),e.creationPromise=void 0)}),this.viewpointAssetsMap.forEach(e=>{var n;let i=e.panoramas;for(let s=i.length-1;s>=0;--s){let a=i[s];a.box.destroy(),(n=this.scene)==null||n.remove(a.box)}}),this.loadingPanos=[],this.viewpointAssetsMap.clear(),this.activePanoramaId="",this.activePanoramaId="",this.previousViewpointId="",this.previousPanoramaId=""}destroy(){var e,i,n,s;this.events.forEach(a=>a.node.removeEventListener(a.type,a.func)),this.events=[],this.clearAllCachedPanoramas(),this.css2dRenderer&&((e=this.viewerContainer)==null||e.removeChild(this.css2dRenderer.domElement)),(i=this.spinner)==null||i.remove(),(n=this.axes)==null||n.dispose(),(s=this.toolbar)==null||s.destroy(),super.destroy()}updateFov(e){var u;let i=this.camera;if(!i)return;let n=this.minFov,s=this.maxFov,a=h=>{let p=i.fov+h;p=Math.min(p,s),p=Math.max(p,n),i.fov!==p&&(i.fov=p,i.updateProjectionMatrix())},o=20,l=5,c=e/o;for(let h=0;ha(c),h*l);this.autoRotate&&((u=this.controlsHelper)==null||u.delayAutoRotate())}setMinAndMaxFov(e,i){let n=this.controls;n&&(this.minFov=e,this.maxFov=i,n.minFov=e,n.maxFov=i)}resize(e,i){var s,a,o;let n=this.camera;n&&(this.width=e||window.innerWidth,this.height=i||window.innerHeight,n.aspect=this.width/this.height,n.updateProjectionMatrix(),(s=this.renderer)==null||s.setSize(this.width,this.height),(a=this.css2dRenderer)==null||a.setSize(this.width,this.height),(o=this.css3dRenderer)==null||o.setSize(this.width,this.height))}enableAutoRotate(e){this.controls&&(this.autoRotate=e,this.controls.autoRotate=e)}setAutoRotateSpeed(e=1){this.controls&&(this.controls.autoRotateSpeed=e)}setCameraFov(e=75){let i=this.camera;i&&(i.fov=e,i.updateProjectionMatrix())}setSpinnerVisibility(e){this.spinner&&(e?this.spinner.classList.remove("hidden"):this.spinner.classList.add("hidden"))}addEvent(e,i,n){e.addEventListener(i,n),this.events.push({node:e,type:i,func:n})}setCameraPositionAndDirection(e,i,n){let s=this.camera,a=this.controls;if(!s||!a)return;let o,l;i?Array.isArray(i)?o=new A(i[0],i[1],i[2]):o=new A(i.x,i.y,i.z):o=a.target.clone().sub(s.position),o.normalize(),Array.isArray(e)?l=new A(e[0],e[1],e[2]):l=new A(e.x,e.y,e.z);let c=l.clone().addScaledVector(o,.01);this.fianlCameraPosition=l,this.finalCameraTarget=c;let u=(m,g)=>{s.lookAt(g),s.position.set(m.x,m.y,m.z),a.target.set(g.x,g.y,g.z),a.update()};if(n===!1){this.cameraUpdateInterval&&clearInterval(this.cameraUpdateInterval),u(l,c);return}let h=s.position.clone(),p=a.target.clone(),d=500,f=Date.now();this.cameraUpdateInterval&&clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=setInterval(()=>{let m=Date.now()-f;m>d&&(m=d);let g=(b,x,S)=>{let D=b.x+(x.x-b.x)*S,P=b.y+(x.y-b.y)*S,_=b.z+(x.z-b.z)*S;return new A(D,P,_)},y=g(h,l,m/d),E=g(p,c,m/d);u(y,E),m>=d&&(clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=void 0)},10)}getCameraPositionAndDirection(){let e=this.camera;if(!e)return;let i=e.position,n=new A;return e.getWorldDirection(n),{position:{x:i.x,y:i.y,z:i.z},direction:{x:n.x,y:n.y,z:n.z}}}getCameraFov(){let e=this.camera;if(e)return e.fov}setViewpoints(e){this.handleCameraUpdateInterval(),this.viewpointAssetsMap.size>0&&(this.viewpointAssetsMap.forEach(i=>{let n=i.panoramas,s=i.css2dObjects;n.forEach(a=>{var o;a.box.destroy(),(o=this.scene)==null||o.remove(a.box)}),s.forEach(a=>{var o;(o=this.scene)==null||o.remove(a)})}),this.viewpointAssetsMap.clear()),this.loadingPanos.forEach(i=>{i.creationPromise&&(i.creationPromise.cancel(),i.creationPromise=void 0)}),this.loadingPanos=[],this.previousViewpointId="",this.previousPanoramaId="",this.activeViewpointId="",this.activePanoramaId="",this.viewpoints=e}addPanorama(e,i){let n=this.viewpoints.find(s=>s.id===e);if(!n)throw new Error(`[VRViewer] Failed to find viewpoint by id '${e}'`);n.panoramas||(n.panoramas=[]),n.panoramas.push(i)}findPanorama(e,i){let n=this.viewpoints.find(s=>s.id===e);if(n&&n.panoramas)return n.panoramas.find(s=>s.id===i)}setHotpointsVisibility(e,i="",n=[]){if(!this.viewpoints)return;let s=a=>{var c;let o=this.viewpointAssetsMap.get(a.id),l=(o==null?void 0:o.css2dObjects)||[];(c=a.hotpoints)==null||c.forEach(u=>{if(n&&n.length>0){if(n.findIndex(h=>h===u.hotpointId)===-1)return;if(u.visible=e,this.activeViewpointId===a.id){let h=l.find(p=>p.userData.hotpoint.hotpointId===u.hotpointId);h&&(h.visible=e)}}else u.visible=e,this.activeViewpointId===a.id&&l.forEach(h=>h.visible=e)})};if(i){let a=this.viewpoints.find(o=>o.id===i);a&&s(a)}else this.viewpoints.forEach(a=>s(a))}addHotpoints(e){if(!this.activeViewpointId||!e)return;let i=this.viewpoints.find(s=>s.id===this.activeViewpointId),n=this.viewpointAssetsMap.get(this.activeViewpointId);!i||!n||(i.hotpoints||(i.hotpoints=[]),e.forEach(s=>{var h,p;if(((h=i.hotpoints)==null?void 0:h.findIndex(d=>d.hotpointId===s.hotpointId))!==-1){ne.warn(`[VRViewer] Duplicated hotpointId: ${s.hotpointId}`);return}let a=i.position||[0,0,0],o=s.anchorPosition,l=Sf.createHotpoint(s.html),c=new A(o[0],o[1],o[2]),u=new A(a[0],a[1],a[2]);this.relocateAnchorIfTooCloseToCamera(l,c,u),l.visible=s.visible!==!1,l.userData.hotpoint=s,n.css2dObjects.push(l),(p=this.scene)==null||p.add(l),i.hotpoints.push(s)}))}removeHotpoints(e){if(!this.activeViewpointId||!e)return;let i=this.viewpoints.find(s=>s.id===this.activeViewpointId),n=this.viewpointAssetsMap.get(this.activeViewpointId);!i||!n||e.forEach(s=>{var a,o;if(i.hotpoints)for(let l=i.hotpoints.length-1;l>=0;--l)s===i.hotpoints[l].hotpointId&&i.hotpoints.splice(l,1);for(let l=n.css2dObjects.length-1;l>=0;--l){let c=n.css2dObjects[l];s===((a=c.userData.hotpoint)==null?void 0:a.hotpointId)&&(n.css2dObjects.splice(l,1),(o=this.scene)==null||o.remove(c))}})}activeViewpointById(e,i,n,s){this.activatePanoramaById(e,"",!0,i,n,s)}activatePanoramaById(e,i,n=!0,s,a,o){if(e===this.activeViewpointId&&i===this.activePanoramaId)return;let l=this.viewpoints.find(c=>c.id===e);l&&this.activatePanorama(l,i,n,s,a,o)}removeCachedPanoramas(){this.viewpointAssetsMap.forEach((e,i)=>{var s;let n=e.panoramas;for(let a=n.length-1;a>=0;--a){let o=n[a];if(i===this.activeViewpointId&&o.id===this.activePanoramaId||i===this.previousViewpointId&&o.id===this.previousPanoramaId)return;o.box.destroy(),(s=this.scene)==null||s.remove(o.box),n.splice(a,1)}})}unlimitControlsAndShowAssets(e=!1){this.controls&&(this.controls.enablePan=!0,this.controls.enableZoom=!0),this.viewpointAssetsMap.forEach(i=>{i.panoramas.forEach(n=>{n.box.visible=!0}),e&&i.css2dObjects.forEach(n=>{n.visible=!0})})}relocateAnchorIfTooCloseToCamera(e,i,n){let s=this.camera;if(!s){ne.error("[VRViewer] Camera is not initialized"),e.position.set(i.x,i.y,i.z);return}let a,o=Math.abs(i.distanceTo(n));if(o{let b=g.panoramas.find(S=>S.id===y),x=b==null?void 0:b.box;x&&(E?this.fadeIn(x):this.fadeOut(x))},c=(g,y)=>{g.css2dObjects.forEach(E=>{y?E.userData.hotpoint.visible!==!1&&(E.visible=y):E.visible=y})},u=()=>{var x;let g=new A(0,0,0),y=new A(1,0,0),E=(x=this.getCameraPositionAndDirection())==null?void 0:x.direction;E&&y.set(E.x,E.y,E.z);let b=e.position;if(b&&b.length===3&&g.set(b[0],b[1],b[2]),n){let S=e.initialDirection;S&&S.length===3&&y.set(S[0],S[1],S[2])}this.setCameraPositionAndDirection(g,y,s)};!i&&((d=e.panoramas)==null?void 0:d.length)>0&&(i=e.panoramas[0].id||""),this.handleCameraUpdateInterval();let h=this.viewpointAssetsMap.get(this.activeViewpointId),p=this.viewpointAssetsMap.get(e.id);if(this.activeViewpointId&&h&&(this.activeViewpointId!==e.id&&c(h,!1),l(h,this.activePanoramaId,!1)),p&&p.panoramas.find(y=>y.id===i)){l(p,i,!0),this.activeViewpointId!==e.id&&c(p,!0),this.activeViewpointId!==e.id&&u(),this.activeViewpointId=e.id,this.activePanoramaId=i,a&&a(e);return}this.previousViewpointId=this.activeViewpointId,this.previousPanoramaId=this.activePanoramaId,this.activeViewpointId=e.id,this.activePanoramaId=i;try{if(this.loadingPanos.some(S=>S.viewpointId===e.id&&S.panoramaId===i)){ne.warn(`[VRViewer] Panorama with viewpointId=${e.id} and panoramaId=${i} is being created`);return}let g=new EC(this.createBoxByImageOrImages(e,i));this.loadingPanos.push({viewpointId:e.id,panoramaId:i,creationPromise:g});let y=yield g.promise;this.loadingPanos=this.loadingPanos.filter(S=>S.viewpointId!==e.id||S.panoramaId!==i);let E=e.position;E&&E.length===3&&y.position.set(E[0],E[1],E[2]),this.activeViewpointId===e.id&&this.activePanoramaId===i?(this.fadeIn(y),(f=this.scene)==null||f.add(y),u()):(y.visible=!1,(m=this.scene)==null||m.add(y));let b={id:i,box:y},x=this.viewpointAssetsMap.get(e.id);if(x)x.panoramas.push(b),c(x,!0);else{let S=[];e.hotpoints&&e.hotpoints.forEach(P=>{let _=P.anchorPosition,w=Sf.createHotpoint(P.html);w.visible=P.visible!==!1,w.userData.hotpoint=P;let F=new A(_[0],_[1],_[2]);this.relocateAnchorIfTooCloseToCamera(w,F,y.position),(this.activeViewpointId!==e.id||this.activePanoramaId!==i)&&(w.visible=!1),S.push(w)});let D={panoramas:[b],css2dObjects:S};this.viewpointAssetsMap.set(e.id,D),S.forEach(P=>{var _;return(_=this.scene)==null?void 0:_.add(P)})}a&&a(e)}catch(g){g.type!=="cancel"&&o&&o(g)}})}createBoxByImageOrImages(e,i){var a;let n=e.imageOrImages,s=e.thumbnailImages;if(((a=e.panoramas)==null?void 0:a.length)>0){let o=this.findPanorama(e.id,i);o||(o=e.panoramas[0],ne.warn(`[VRViewer] Failed to find panorama by id '${i}', will use the first one`)),n=o.images,s=o.thumbnails}if(!n)throw new Error("[VRViewer] Invalid images!");if(Array.isArray(n)||(n=[n]),n.length===1)return this.createBoxByImage(n,s);if(n.length===6)return this.createBoxBy6Images(n,s);if(n.length===24)return this.createBoxBy24Images(n,s);throw new Error(`[VRViewer] Wrong number of images! Expected 1/6/24, got ${n.length}`)}createBoxByImage(e,i){return ot(this,null,function*(){let n=new O3(e,i);return yield n.create(),n})}createBoxBy6Images(e,i){return ot(this,null,function*(){if(e.length!==6)throw new Error(`[VRCube] Wrong number of images! Expected 6, got ${e.length}`);let n=new C3(e,i);return yield n.create(),n})}createBoxBy24Images(e,i){return ot(this,null,function*(){if(e.length!==24)throw new Error(`[VRCube] Wrong number of images! Expected 24, got ${e.length}`);let n=new A3(e,i);return yield n.create(),n})}getIntersection(e){if(!this.camera||!this.scene)return;let i=this.viewpointAssetsMap.get(this.activeViewpointId);if(!i)return;let n=i.panoramas.find(h=>h.id===this.activePanoramaId);if(!n)return;let s=n.box,a=this.viewerContainer,o=new le;e&&(o=Mr.getScreenPointByEvent(e,a));let l=Mr.screenPoint2NdcPoint(o,this.camera,a);this.raycaster.setFromCamera(l,this.camera);let c=[s],u=this.raycaster.intersectObjects(c,!0)||[];if(u.length>0)return u.find(p=>{let d=p.object;return d.visible&&d instanceof Je})}fadeIn(e,i=500){e.fadeIn(i)}fadeOut(e,i=1e3){e.fadeOut(i)}handleCameraUpdateInterval(){if(this.cameraUpdateInterval){clearInterval(this.cameraUpdateInterval);let e=this.fianlCameraPosition,i=this.finalCameraTarget;e&&i&&this.controls&&this.camera&&(this.camera.lookAt(i),this.camera.position.set(e.x,e.y,e.z),this.controls.target.set(i.x,i.y,i.z),this.controls.update()),this.cameraUpdateInterval=void 0}this.fianlCameraPosition=void 0,this.finalCameraTarget=void 0}getHitResult(e){let i={location:null};if(!this.camera)return i;let n=this.getIntersection(e);return i.location=n?{x:n.point.x,y:n.point.y,z:n.point.z}:null,i}lookToPosition(e){var s;if(!this.camera)return;this.handleCameraUpdateInterval();let n=new A(e[0],e[1],e[2]).clone().sub(this.camera.position);(s=this.controlsHelper)==null||s.lookTo(n)}};export{BG as BimViewer,ZA as DxfChangeType,GG as DxfViewer,iG as LocalDxfUploader,nG as LocalImageUploader,CS as LocalModelUploader,fo as MarkupType,nl as MeasurementType,zg as SectionType,VG as SimplifiedBimViewer,cE as ToolbarMenuId,zG as VRViewer,$g as ViewerEvent}; +var xNe=Object.create,s1=Object.defineProperty,INe=Object.defineProperties,_Ne=Object.getOwnPropertyDescriptor,SNe=Object.getOwnPropertyDescriptors,wNe=Object.getOwnPropertyNames,P7=Object.getOwnPropertySymbols,L7=Object.getPrototypeOf,F7=Object.prototype.hasOwnProperty,RNe=Object.prototype.propertyIsEnumerable,MNe=Reflect.get,jh=Math.pow,N7=(e,t,i)=>t in e?s1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Br=(e,t)=>{for(var i in t||(t={}))F7.call(t,i)&&N7(e,i,t[i]);if(P7)for(var i of P7(t))RNe.call(t,i)&&N7(e,i,t[i]);return e},Dn=(e,t)=>INe(e,SNe(t)),t2=(e=>"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(e,{get:(e,t)=>("undefined"!=typeof require?require:e)[t]}):e)((function(e){if("undefined"!=typeof require)return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')})),DNe=(e,t)=>()=>(e&&(t=e(e=0)),t),z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),QS=(e,t)=>{for(var i in t)s1(e,i,{get:t[i],enumerable:!0})},H7=(e,t,i,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of wNe(t))!F7.call(e,n)&&n!==i&&s1(e,n,{get:()=>t[n],enumerable:!(r=_Ne(t,n))||r.enumerable});return e},kn=(e,t,i)=>(i=null!=e?xNe(L7(e)):{},H7(!t&&e&&e.__esModule?i:s1(i,"default",{value:e,enumerable:!0}),e)),CNe=e=>H7(s1({},"__esModule",{value:!0}),e),U7=(e,t,i)=>MNe(L7(e),i,t),ht=(e,t,i)=>new Promise(((r,n)=>{var s=e=>{try{o(i.next(e))}catch(e){n(e)}},a=e=>{try{o(i.throw(e))}catch(e){n(e)}},o=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,a);o((i=i.apply(e,t)).next())})),G7={};function ew(e){return(ew="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ONe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B7(e,t){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{};ONe(this,s),this._locale=n(i),this._select=t(this._locale),this._type=FNe(r.type),this._nf=new e("en",r)}return PNe(s,[{key:"resolvedOptions",value:function(){var e=this._nf.resolvedOptions(),t=e.minimumIntegerDigits,r=e.minimumFractionDigits,n=e.maximumFractionDigits,s=e.minimumSignificantDigits,a=e.maximumSignificantDigits,o={locale:this._locale,minimumIntegerDigits:t,minimumFractionDigits:r,maximumFractionDigits:n,pluralCategories:i(this._locale,"ordinal"===this._type),type:this._type};return"number"==typeof s&&(o.minimumSignificantDigits=s,o.maximumSignificantDigits=a),o}},{key:"select",value:function(e){if(!(this instanceof s))throw new TypeError("select() called on incompatible ".concat(this));if("number"!=typeof e&&(e=Number(e)),!isFinite(e))return"other";var t=this._nf.format(Math.abs(e));return this._select(t,"ordinal"===this._type)}}],[{key:"supportedLocalesOf",value:function(e){return k7(e).filter(r)}}]),s}();return Object.defineProperty(s,"prototype",{writable:!1}),s}QS(G7,{default:()=>HNe});var NNe,k7,LNe,FNe,V7=DNe((()=>{NNe=function(e){return e.split("-").every((function(e){return/[a-z0-9]+/i.test(e)}))},k7=function(e){if(!e)return[];Array.isArray(e)||(e=[e]);for(var t={},i=0;i{"use strict";function i(e,t){for(var i=0;i="0"&&n<="9"&&++i}return ithis._maxSD?e.toPrecision(this._maxSD):t}return this._minFD>0?e.toFixed(this._minFD):0===this._maxFD?e.toFixed(0):String(e)}}]),e}();t.exports=r})),Q7=z(((e,t)=>{"use strict";var i=(V7(),CNe(G7)),r=W7();function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=n(i),a=n(r);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h,u,c,p,d,f,m,g,y={exports:{}};h=y,c=function(e,t){return t?"other":1==e?"one":"other"},p=function(e,t){return t?"other":0==e||1==e?"one":"other"},d=function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},f=function(e,t){var i=!String(e).split(".")[1];return t?"other":1==e&&i?"one":"other"},g=function(e,t){return t?"other":1==e?"one":2==e?"two":"other"},u={_in:m=function(e,t){return"other"},af:c,ak:p,am:d,an:c,ar:function(e,t){var i=String(e).split("."),r=Number(i[0])==e&&i[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ars:function(e,t){var i=String(e).split("."),r=Number(i[0])==e&&i[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},as:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},asa:c,ast:f,az:function(e,t){var i=String(e).split(".")[0],r=i.slice(-1),n=i.slice(-2),s=i.slice(-3);return t?1==r||2==r||5==r||7==r||8==r||20==n||50==n||70==n||80==n?"one":3==r||4==r||100==s||200==s||300==s||400==s||500==s||600==s||700==s||800==s||900==s?"few":0==i||6==r||40==n||60==n||90==n?"many":"other":1==e?"one":"other"},be:function(e,t){var i=String(e).split("."),r=Number(i[0])==e,n=r&&i[0].slice(-1),s=r&&i[0].slice(-2);return t?2!=n&&3!=n||12==s||13==s?"other":"few":1==n&&11!=s?"one":n>=2&&n<=4&&(s<12||s>14)?"few":r&&0==n||n>=5&&n<=9||s>=11&&s<=14?"many":"other"},bem:c,bez:c,bg:c,bho:p,bm:m,bn:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},bo:m,br:function(e,t){var i=String(e).split("."),r=Number(i[0])==e,n=r&&i[0].slice(-1),s=r&&i[0].slice(-2),a=r&&i[0].slice(-6);return t?"other":1==n&&11!=s&&71!=s&&91!=s?"one":2==n&&12!=s&&72!=s&&92!=s?"two":(3==n||4==n||9==n)&&(s<10||s>19)&&(s<70||s>79)&&(s<90||s>99)?"few":0!=e&&r&&0==a?"many":"other"},brx:c,bs:function(e,t){var i=String(e).split("."),r=i[0],n=i[1]||"",s=!i[1],a=r.slice(-1),o=r.slice(-2),l=n.slice(-1),h=n.slice(-2);return t?"other":s&&1==a&&11!=o||1==l&&11!=h?"one":s&&a>=2&&a<=4&&(o<12||o>14)||l>=2&&l<=4&&(h<12||h>14)?"few":"other"},ca:function(e,t){var i=!String(e).split(".")[1];return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&i?"one":"other"},ce:c,ceb:function(e,t){var i=String(e).split("."),r=i[0],n=i[1]||"",s=!i[1],a=r.slice(-1),o=n.slice(-1);return t?"other":s&&(1==r||2==r||3==r)||s&&4!=a&&6!=a&&9!=a||!s&&4!=o&&6!=o&&9!=o?"one":"other"},cgg:c,chr:c,ckb:c,cs:function(e,t){var i=String(e).split("."),r=i[0],n=!i[1];return t?"other":1==e&&n?"one":r>=2&&r<=4&&n?"few":n?"other":"many"},cy:function(e,t){return t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other"},da:function(e,t){var i=String(e).split("."),r=i[0],n=Number(i[0])==e;return t||1!=e&&(n||0!=r&&1!=r)?"other":"one"},de:f,doi:d,dsb:function(e,t){var i=String(e).split("."),r=i[0],n=i[1]||"",s=!i[1],a=r.slice(-2),o=n.slice(-2);return t?"other":s&&1==a||1==o?"one":s&&2==a||2==o?"two":s&&(3==a||4==a)||3==o||4==o?"few":"other"},dv:c,dz:m,ee:c,el:c,en:function(e,t){var i=String(e).split("."),r=!i[1],n=Number(i[0])==e,s=n&&i[0].slice(-1),a=n&&i[0].slice(-2);return t?1==s&&11!=a?"one":2==s&&12!=a?"two":3==s&&13!=a?"few":"other":1==e&&r?"one":"other"},eo:c,es:c,et:f,eu:c,fa:d,ff:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},fi:f,fil:function(e,t){var i=String(e).split("."),r=i[0],n=i[1]||"",s=!i[1],a=r.slice(-1),o=n.slice(-1);return t?1==e?"one":"other":s&&(1==r||2==r||3==r)||s&&4!=a&&6!=a&&9!=a||!s&&4!=o&&6!=o&&9!=o?"one":"other"},fo:c,fr:function(e,t){var i=String(e).split("."),r=i[0],n=!i[1],s=r.slice(-6);return t?1==e?"one":"other":e>=0&&e<2?"one":0!=r&&0==s&&n?"many":"other"},fur:c,fy:f,ga:function(e,t){var i=String(e).split("."),r=Number(i[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"},gd:function(e,t){var i=String(e).split("."),r=Number(i[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"},gl:f,gsw:c,gu:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},guw:p,gv:function(e,t){var i=String(e).split("."),r=i[0],n=!i[1],s=r.slice(-1),a=r.slice(-2);return t?"other":n&&1==s?"one":n&&2==s?"two":!n||0!=a&&20!=a&&40!=a&&60!=a&&80!=a?n?"other":"many":"few"},ha:c,haw:c,he:function(e,t){var i=String(e).split("."),r=i[0],n=!i[1],s=Number(i[0])==e,a=s&&i[0].slice(-1);return t?"other":1==e&&n?"one":2==r&&n?"two":n&&(e<0||e>10)&&s&&0==a?"many":"other"},hi:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},hr:function(e,t){var i=String(e).split("."),r=i[0],n=i[1]||"",s=!i[1],a=r.slice(-1),o=r.slice(-2),l=n.slice(-1),h=n.slice(-2);return t?"other":s&&1==a&&11!=o||1==l&&11!=h?"one":s&&a>=2&&a<=4&&(o<12||o>14)||l>=2&&l<=4&&(h<12||h>14)?"few":"other"},hsb:function(e,t){var i=String(e).split("."),r=i[0],n=i[1]||"",s=!i[1],a=r.slice(-2),o=n.slice(-2);return t?"other":s&&1==a||1==o?"one":s&&2==a||2==o?"two":s&&(3==a||4==a)||3==o||4==o?"few":"other"},hu:function(e,t){return t?1==e||5==e?"one":"other":1==e?"one":"other"},hy:function(e,t){return t?1==e?"one":"other":e>=0&&e<2?"one":"other"},ia:f,id:m,ig:m,ii:m,io:f,is:function(e,t){var i=String(e).split("."),r=i[0],n=Number(i[0])==e,s=r.slice(-1),a=r.slice(-2);return t?"other":n&&1==s&&11!=a||!n?"one":"other"},it:function(e,t){var i=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":"other"},iu:g,iw:function(e,t){var i=String(e).split("."),r=i[0],n=!i[1],s=Number(i[0])==e,a=s&&i[0].slice(-1);return t?"other":1==e&&n?"one":2==r&&n?"two":n&&(e<0||e>10)&&s&&0==a?"many":"other"},ja:m,jbo:m,jgo:c,ji:f,jmc:c,jv:m,jw:m,ka:function(e,t){var i=String(e).split(".")[0],r=i.slice(-2);return t?1==i?"one":0==i||r>=2&&r<=20||40==r||60==r||80==r?"many":"other":1==e?"one":"other"},kab:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},kaj:c,kcg:c,kde:m,kea:m,kk:function(e,t){var i=String(e).split("."),r=Number(i[0])==e,n=r&&i[0].slice(-1);return t?6==n||9==n||r&&0==n&&0!=e?"many":"other":1==e?"one":"other"},kkj:c,kl:c,km:m,kn:d,ko:m,ks:c,ksb:c,ksh:function(e,t){return t?"other":0==e?"zero":1==e?"one":"other"},ku:c,kw:function(e,t){var i=String(e).split("."),r=Number(i[0])==e,n=r&&i[0].slice(-2),s=r&&i[0].slice(-3),a=r&&i[0].slice(-5),o=r&&i[0].slice(-6);return t?r&&e>=1&&e<=4||n>=1&&n<=4||n>=21&&n<=24||n>=41&&n<=44||n>=61&&n<=64||n>=81&&n<=84?"one":5==e||5==n?"many":"other":0==e?"zero":1==e?"one":2==n||22==n||42==n||62==n||82==n||r&&0==s&&(a>=1e3&&a<=2e4||4e4==a||6e4==a||8e4==a)||0!=e&&1e5==o?"two":3==n||23==n||43==n||63==n||83==n?"few":1==e||1!=n&&21!=n&&41!=n&&61!=n&&81!=n?"other":"many"},ky:c,lag:function(e,t){var i=String(e).split(".")[0];return t?"other":0==e?"zero":0!=i&&1!=i||0==e?"other":"one"},lb:c,lg:c,lij:function(e,t){var i=String(e).split("."),r=!i[1],n=Number(i[0])==e;return t?11==e||8==e||n&&e>=80&&e<=89||n&&e>=800&&e<=899?"many":"other":1==e&&r?"one":"other"},lkt:m,ln:p,lo:function(e,t){return t&&1==e?"one":"other"},lt:function(e,t){var i=String(e).split("."),r=i[1]||"",n=Number(i[0])==e,s=n&&i[0].slice(-1),a=n&&i[0].slice(-2);return t?"other":1==s&&(a<11||a>19)?"one":s>=2&&s<=9&&(a<11||a>19)?"few":0!=r?"many":"other"},lv:function(e,t){var i=String(e).split("."),r=i[1]||"",n=r.length,s=Number(i[0])==e,a=s&&i[0].slice(-1),o=s&&i[0].slice(-2),l=r.slice(-2),h=r.slice(-1);return t?"other":s&&0==a||o>=11&&o<=19||2==n&&l>=11&&l<=19?"zero":1==a&&11!=o||2==n&&1==h&&11!=l||2!=n&&1==h?"one":"other"},mas:c,mg:p,mgo:c,mk:function(e,t){var i=String(e).split("."),r=i[0],n=i[1]||"",s=!i[1],a=r.slice(-1),o=r.slice(-2),l=n.slice(-1),h=n.slice(-2);return t?1==a&&11!=o?"one":2==a&&12!=o?"two":7!=a&&8!=a||17==o||18==o?"other":"many":s&&1==a&&11!=o||1==l&&11!=h?"one":"other"},ml:c,mn:c,mo:function(e,t){var i=String(e).split("."),r=!i[1],n=Number(i[0])==e&&i[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||n>=2&&n<=19?"few":"other"},mr:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":1==e?"one":"other"},ms:function(e,t){return t&&1==e?"one":"other"},mt:function(e,t){var i=String(e).split("."),r=Number(i[0])==e&&i[0].slice(-2);return t?"other":1==e?"one":0==e||r>=2&&r<=10?"few":r>=11&&r<=19?"many":"other"},my:m,nah:c,naq:g,nb:c,nd:c,ne:function(e,t){var i=String(e).split("."),r=Number(i[0])==e;return t?r&&e>=1&&e<=4?"one":"other":1==e?"one":"other"},nl:f,nn:c,nnh:c,no:c,nqo:m,nr:c,nso:p,ny:c,nyn:c,om:c,or:function(e,t){var i=String(e).split("."),r=Number(i[0])==e;return t?1==e||5==e||r&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"},os:c,osa:m,pa:p,pap:c,pcm:d,pl:function(e,t){var i=String(e).split("."),r=i[0],n=!i[1],s=r.slice(-1),a=r.slice(-2);return t?"other":1==e&&n?"one":n&&s>=2&&s<=4&&(a<12||a>14)?"few":n&&1!=r&&(0==s||1==s)||n&&s>=5&&s<=9||n&&a>=12&&a<=14?"many":"other"},prg:function(e,t){var i=String(e).split("."),r=i[1]||"",n=r.length,s=Number(i[0])==e,a=s&&i[0].slice(-1),o=s&&i[0].slice(-2),l=r.slice(-2),h=r.slice(-1);return t?"other":s&&0==a||o>=11&&o<=19||2==n&&l>=11&&l<=19?"zero":1==a&&11!=o||2==n&&1==h&&11!=l||2!=n&&1==h?"one":"other"},ps:c,pt:function(e,t){var i=String(e).split(".")[0];return t?"other":0==i||1==i?"one":"other"},pt_PT:f,rm:c,ro:function(e,t){var i=String(e).split("."),r=!i[1],n=Number(i[0])==e&&i[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||n>=2&&n<=19?"few":"other"},rof:c,root:m,ru:function(e,t){var i=String(e).split("."),r=i[0],n=!i[1],s=r.slice(-1),a=r.slice(-2);return t?"other":n&&1==s&&11!=a?"one":n&&s>=2&&s<=4&&(a<12||a>14)?"few":n&&0==s||n&&s>=5&&s<=9||n&&a>=11&&a<=14?"many":"other"},rwk:c,sah:m,saq:c,sat:g,sc:function(e,t){var i=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":"other"},scn:function(e,t){var i=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":"other"},sd:c,sdh:c,se:g,seh:c,ses:m,sg:m,sh:function(e,t){var i=String(e).split("."),r=i[0],n=i[1]||"",s=!i[1],a=r.slice(-1),o=r.slice(-2),l=n.slice(-1),h=n.slice(-2);return t?"other":s&&1==a&&11!=o||1==l&&11!=h?"one":s&&a>=2&&a<=4&&(o<12||o>14)||l>=2&&l<=4&&(h<12||h>14)?"few":"other"},shi:function(e,t){var i=String(e).split("."),r=Number(i[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"},si:function(e,t){var i=String(e).split("."),r=i[0],n=i[1]||"";return t?"other":0==e||1==e||0==r&&1==n?"one":"other"},sk:function(e,t){var i=String(e).split("."),r=i[0],n=!i[1];return t?"other":1==e&&n?"one":r>=2&&r<=4&&n?"few":n?"other":"many"},sl:function(e,t){var i=String(e).split("."),r=i[0],n=!i[1],s=r.slice(-2);return t?"other":n&&1==s?"one":n&&2==s?"two":n&&(3==s||4==s)||!n?"few":"other"},sma:g,smi:g,smj:g,smn:g,sms:g,sn:c,so:c,sq:function(e,t){var i=String(e).split("."),r=Number(i[0])==e,n=r&&i[0].slice(-1),s=r&&i[0].slice(-2);return t?1==e?"one":4==n&&14!=s?"many":"other":1==e?"one":"other"},sr:function(e,t){var i=String(e).split("."),r=i[0],n=i[1]||"",s=!i[1],a=r.slice(-1),o=r.slice(-2),l=n.slice(-1),h=n.slice(-2);return t?"other":s&&1==a&&11!=o||1==l&&11!=h?"one":s&&a>=2&&a<=4&&(o<12||o>14)||l>=2&&l<=4&&(h<12||h>14)?"few":"other"},ss:c,ssy:c,st:c,su:m,sv:function(e,t){var i=String(e).split("."),r=!i[1],n=Number(i[0])==e,s=n&&i[0].slice(-1),a=n&&i[0].slice(-2);return t?1!=s&&2!=s||11==a||12==a?"other":"one":1==e&&r?"one":"other"},sw:f,syr:c,ta:c,te:c,teo:c,th:m,ti:p,tig:c,tk:function(e,t){var i=String(e).split("."),r=Number(i[0])==e&&i[0].slice(-1);return t?6==r||9==r||10==e?"few":"other":1==e?"one":"other"},tl:function(e,t){var i=String(e).split("."),r=i[0],n=i[1]||"",s=!i[1],a=r.slice(-1),o=n.slice(-1);return t?1==e?"one":"other":s&&(1==r||2==r||3==r)||s&&4!=a&&6!=a&&9!=a||!s&&4!=o&&6!=o&&9!=o?"one":"other"},tn:c,to:m,tr:c,ts:c,tzm:function(e,t){var i=String(e).split("."),r=Number(i[0])==e;return t?"other":0==e||1==e||r&&e>=11&&e<=99?"one":"other"},ug:c,uk:function(e,t){var i=String(e).split("."),r=i[0],n=!i[1],s=Number(i[0])==e,a=s&&i[0].slice(-1),o=s&&i[0].slice(-2),l=r.slice(-1),h=r.slice(-2);return t?3==a&&13!=o?"few":"other":n&&1==l&&11!=h?"one":n&&l>=2&&l<=4&&(h<12||h>14)?"few":n&&0==l||n&&l>=5&&l<=9||n&&h>=11&&h<=14?"many":"other"},ur:f,uz:c,ve:c,vi:function(e,t){return t&&1==e?"one":"other"},vo:c,vun:c,wa:p,wae:c,wo:m,xh:c,xog:c,yi:f,yo:m,yue:m,zh:m,zu:d},Object.defineProperty(u,"__esModule",{value:!0}),h.exports=u;var v=l(y.exports),T=Object.freeze(Object.assign(Object.create(null),y.exports,{default:v})),x={exports:{}};!function(e,t){var i,r="zero",n="one",s="two",a="few",o="many",l="other",h={cardinal:[n,l],ordinal:[l]},u={cardinal:[l],ordinal:[l]},c={cardinal:[n,a,o,l],ordinal:[l]},p={cardinal:[n,l],ordinal:[n,l]},d={cardinal:[n,s,l],ordinal:[l]};i={_in:u,af:h,ak:h,am:h,an:h,ar:{cardinal:[r,n,s,a,o,l],ordinal:[l]},ars:{cardinal:[r,n,s,a,o,l],ordinal:[l]},as:{cardinal:[n,l],ordinal:[n,s,a,o,l]},asa:h,ast:h,az:{cardinal:[n,l],ordinal:[n,a,o,l]},be:{cardinal:[n,a,o,l],ordinal:[a,l]},bem:h,bez:h,bg:h,bho:h,bm:u,bn:{cardinal:[n,l],ordinal:[n,s,a,o,l]},bo:u,br:{cardinal:[n,s,a,o,l],ordinal:[l]},brx:h,bs:{cardinal:[n,a,l],ordinal:[l]},ca:{cardinal:[n,l],ordinal:[n,s,a,l]},ce:h,ceb:h,cgg:h,chr:h,ckb:h,cs:c,cy:{cardinal:[r,n,s,a,o,l],ordinal:[r,n,s,a,o,l]},da:h,de:h,doi:h,dsb:{cardinal:[n,s,a,l],ordinal:[l]},dv:h,dz:u,ee:h,el:h,en:{cardinal:[n,l],ordinal:[n,s,a,l]},eo:h,es:h,et:h,eu:h,fa:h,ff:h,fi:h,fil:p,fo:h,fr:{cardinal:[n,o,l],ordinal:[n,l]},fur:h,fy:h,ga:{cardinal:[n,s,a,o,l],ordinal:[n,l]},gd:{cardinal:[n,s,a,l],ordinal:[n,s,a,l]},gl:h,gsw:h,gu:{cardinal:[n,l],ordinal:[n,s,a,o,l]},guw:h,gv:{cardinal:[n,s,a,o,l],ordinal:[l]},ha:h,haw:h,he:{cardinal:[n,s,o,l],ordinal:[l]},hi:{cardinal:[n,l],ordinal:[n,s,a,o,l]},hr:{cardinal:[n,a,l],ordinal:[l]},hsb:{cardinal:[n,s,a,l],ordinal:[l]},hu:p,hy:p,ia:h,id:u,ig:u,ii:u,io:h,is:h,it:{cardinal:[n,l],ordinal:[o,l]},iu:d,iw:{cardinal:[n,s,o,l],ordinal:[l]},ja:u,jbo:u,jgo:h,ji:h,jmc:h,jv:u,jw:u,ka:{cardinal:[n,l],ordinal:[n,o,l]},kab:h,kaj:h,kcg:h,kde:u,kea:u,kk:{cardinal:[n,l],ordinal:[o,l]},kkj:h,kl:h,km:u,kn:h,ko:u,ks:h,ksb:h,ksh:{cardinal:[r,n,l],ordinal:[l]},ku:h,kw:{cardinal:[r,n,s,a,o,l],ordinal:[n,o,l]},ky:h,lag:{cardinal:[r,n,l],ordinal:[l]},lb:h,lg:h,lij:{cardinal:[n,l],ordinal:[o,l]},lkt:u,ln:h,lo:{cardinal:[l],ordinal:[n,l]},lt:c,lv:{cardinal:[r,n,l],ordinal:[l]},mas:h,mg:h,mgo:h,mk:{cardinal:[n,l],ordinal:[n,s,o,l]},ml:h,mn:h,mo:{cardinal:[n,a,l],ordinal:[n,l]},mr:{cardinal:[n,l],ordinal:[n,s,a,l]},ms:{cardinal:[l],ordinal:[n,l]},mt:c,my:u,nah:h,naq:d,nb:h,nd:h,ne:p,nl:h,nn:h,nnh:h,no:h,nqo:u,nr:h,nso:h,ny:h,nyn:h,om:h,or:{cardinal:[n,l],ordinal:[n,s,a,o,l]},os:h,osa:u,pa:h,pap:h,pcm:h,pl:c,prg:{cardinal:[r,n,l],ordinal:[l]},ps:h,pt:h,pt_PT:h,rm:h,ro:{cardinal:[n,a,l],ordinal:[n,l]},rof:h,root:u,ru:c,rwk:h,sah:u,saq:h,sat:d,sc:{cardinal:[n,l],ordinal:[o,l]},scn:{cardinal:[n,l],ordinal:[o,l]},sd:h,sdh:h,se:d,seh:h,ses:u,sg:u,sh:{cardinal:[n,a,l],ordinal:[l]},shi:{cardinal:[n,a,l],ordinal:[l]},si:h,sk:c,sl:{cardinal:[n,s,a,l],ordinal:[l]},sma:d,smi:d,smj:d,smn:d,sms:d,sn:h,so:h,sq:{cardinal:[n,l],ordinal:[n,o,l]},sr:{cardinal:[n,a,l],ordinal:[l]},ss:h,ssy:h,st:h,su:u,sv:p,sw:h,syr:h,ta:h,te:h,teo:h,th:u,ti:h,tig:h,tk:{cardinal:[n,l],ordinal:[a,l]},tl:p,tn:h,to:u,tr:h,ts:h,tzm:h,ug:h,uk:{cardinal:[n,a,o,l],ordinal:[a,l]},ur:h,uz:h,ve:h,vi:{cardinal:[l],ordinal:[n,l]},vo:h,vun:h,wa:h,wae:h,wo:u,xh:h,xog:h,yi:h,yo:u,yue:u,zh:u,zu:h},Object.defineProperty(i,"__esModule",{value:!0}),e.exports=i}(x);var b=l(x.exports),_=Object.freeze(Object.assign(Object.create(null),x.exports,{default:b})),E=v||T,w=b||_,S="object"===("undefined"==typeof Intl?"undefined":o(Intl))&&Intl.NumberFormat||a.default,I=function(e){return"in"===e?"_in":"pt-PT"===e?"pt_PT":e},M=s.default(S,(function(e){return E[I(e)]}),(function(e,t){return w[I(e)][t?"ordinal":"cardinal"]}));t.exports=M})),r9=z((e=>{"use strict";var t=Q7();var i,r,n=(i=t)&&"object"==typeof i&&"default"in i?i:{default:i};"undefined"==typeof Intl?("undefined"!=typeof global?global.Intl={PluralRules:n.default}:"undefined"!=typeof window?window.Intl={PluralRules:n.default}:e.Intl={PluralRules:n.default},n.default.polyfill=!0):Intl.PluralRules?(r=["en","es","ru","zh"],Intl.PluralRules.supportedLocalesOf(r).length{var i=function(e){return e&&e.Math==Math&&e};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof global&&global)||function(){return this}()||Function("return this")()})),Mt=z(((e,t)=>{t.exports=function(e){try{return!!e()}catch(e){return!0}}})),Ar=z(((e,t)=>{var i=Mt();t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))})),sv=z(((e,t)=>{var i=Mt();t.exports=!i((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))})),si=z(((e,t)=>{var i=sv(),r=Function.prototype.call;t.exports=i?r.bind(r):function(){return r.apply(r,arguments)}})),a1=z((e=>{"use strict";var t={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!t.call({1:2},1);e.f=r?function(e){var t=i(this,e);return!!t&&t.enumerable}:t})),Mo=z(((e,t)=>{t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}})),Bt=z(((e,t)=>{var i=sv(),r=Function.prototype,n=r.call,s=i&&r.bind.bind(n,n);t.exports=i?s:function(e){return function(){return n.apply(e,arguments)}}})),ma=z(((e,t)=>{var i=Bt(),r=i({}.toString),n=i("".slice);t.exports=function(e){return n(r(e),8,-1)}})),Sm=z(((e,t)=>{var i=Bt(),r=Mt(),n=ma(),s=Object,a=i("".split);t.exports=r((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==n(e)?a(e,""):s(e)}:s})),ga=z(((e,t)=>{t.exports=function(e){return null==e}})),cs=z(((e,t)=>{var i=ga(),r=TypeError;t.exports=function(e){if(i(e))throw r("Can't call method on "+e);return e}})),va=z(((e,t)=>{var i=Sm(),r=cs();t.exports=function(e){return i(r(e))}})),l2=z(((e,t)=>{var i="object"==typeof document&&document.all,r=void 0===i&&void 0!==i;t.exports={all:i,IS_HTMLDDA:r}})),Ei=z(((e,t)=>{var i=l2(),r=i.all;t.exports=i.IS_HTMLDDA?function(e){return"function"==typeof e||e===r}:function(e){return"function"==typeof e}})),ai=z(((e,t)=>{var i=Ei(),r=l2(),n=r.all;t.exports=r.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:i(e)||e===n}:function(e){return"object"==typeof e?null!==e:i(e)}})),In=z(((e,t)=>{var i=rr(),r=Ei(),n=function(e){return r(e)?e:void 0};t.exports=function(e,t){return arguments.length<2?n(i[e]):i[e]&&i[e][t]}})),Do=z(((e,t)=>{var i=Bt();t.exports=i({}.isPrototypeOf)})),bu=z(((e,t)=>{var i=In();t.exports=i("navigator","userAgent")||""})),xu=z(((e,t)=>{var i,r,n=rr(),s=bu(),a=n.process,o=n.Deno,l=a&&a.versions||o&&o.version,h=l&&l.v8;h&&(r=(i=h.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!r&&s&&((!(i=s.match(/Edge\/(\d+)/))||i[1]>=74)&&((i=s.match(/Chrome\/(\d+)/))&&(r=+i[1]))),t.exports=r})),wm=z(((e,t)=>{var i=xu(),r=Mt();t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41}))})),h2=z(((e,t)=>{var i=wm();t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator})),Dd=z(((e,t)=>{var i=In(),r=Ei(),n=Do(),s=h2(),a=Object;t.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return r(t)&&n(t.prototype,a(e))}})),Cd=z(((e,t)=>{var i=String;t.exports=function(e){try{return i(e)}catch(e){return"Object"}}})),ms=z(((e,t)=>{var i=Ei(),r=Cd(),n=TypeError;t.exports=function(e){if(i(e))return e;throw n(r(e)+" is not a function")}})),Iu=z(((e,t)=>{var i=ms(),r=ga();t.exports=function(e,t){var n=e[t];return r(n)?void 0:i(n)}})),m2=z(((e,t)=>{var i=si(),r=Ei(),n=ai(),s=TypeError;t.exports=function(e,t){var a,o;if("string"===t&&r(a=e.toString)&&!n(o=i(a,e))||r(a=e.valueOf)&&!n(o=i(a,e))||"string"!==t&&r(a=e.toString)&&!n(o=i(a,e)))return o;throw s("Can't convert object to primitive value")}})),Gn=z(((e,t)=>{t.exports=!1})),sw=z(((e,t)=>{var i=rr(),r=Object.defineProperty;t.exports=function(e,t){try{r(i,e,{value:t,configurable:!0,writable:!0})}catch(r){i[e]=t}return t}})),aw=z(((e,t)=>{var i=rr(),r=sw(),n="__core-js_shared__",s=i[n]||r(n,{});t.exports=s})),Rm=z(((e,t)=>{var i=Gn(),r=aw();(t.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.27.1",mode:i?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),Hi=z(((e,t)=>{var i=cs(),r=Object;t.exports=function(e){return r(i(e))}})),_i=z(((e,t)=>{var i=Bt(),r=Hi(),n=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return n(r(e),t)}})),Mm=z(((e,t)=>{var i=Bt(),r=0,n=Math.random(),s=i(1..toString);t.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++r+n,36)}})),fi=z(((e,t)=>{var i=rr(),r=Rm(),n=_i(),s=Mm(),a=wm(),o=h2(),l=r("wks"),h=i.Symbol,u=h&&h.for,c=o?h:h&&h.withoutSetter||s;t.exports=function(e){if(!n(l,e)||!a&&"string"!=typeof l[e]){var t="Symbol."+e;a&&n(h,e)?l[e]=h[e]:l[e]=o&&u?u(t):c(t)}return l[e]}})),o1=z(((e,t)=>{var i=si(),r=ai(),n=Dd(),s=Iu(),a=m2(),o=fi(),l=TypeError,h=o("toPrimitive");t.exports=function(e,t){if(!r(e)||n(e))return e;var o,u=s(e,h);if(u){if(void 0===t&&(t="default"),o=i(u,e,t),!r(o)||n(o))return o;throw l("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}})),Wh=z(((e,t)=>{var i=o1(),r=Dd();t.exports=function(e){var t=i(e,"string");return r(t)?t:t+""}})),l1=z(((e,t)=>{var i=rr(),r=ai(),n=i.document,s=r(n)&&r(n.createElement);t.exports=function(e){return s?n.createElement(e):{}}})),v2=z(((e,t)=>{var i=Ar(),r=Mt(),n=l1();t.exports=!i&&!r((function(){return 7!=Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))})),Hs=z((e=>{var t=Ar(),i=si(),r=a1(),n=Mo(),s=va(),a=Wh(),o=_i(),l=v2(),h=Object.getOwnPropertyDescriptor;e.f=t?h:function(e,t){if(e=s(e),t=a(t),l)try{return h(e,t)}catch(e){}if(o(e,t))return n(!i(r.f,e,t),e[t])}})),y2=z(((e,t)=>{var i=Ar(),r=Mt();t.exports=i&&r((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))})),qr=z(((e,t)=>{var i=ai(),r=String,n=TypeError;t.exports=function(e){if(i(e))return e;throw n(r(e)+" is not an object")}})),ji=z((e=>{var t=Ar(),i=v2(),r=y2(),n=qr(),s=Wh(),a=TypeError,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h="enumerable",u="configurable",c="writable";e.f=t?r?function(e,t,i){if(n(e),t=s(t),n(i),"function"==typeof e&&"prototype"===t&&"value"in i&&c in i&&!i[c]){var r=l(e,t);r&&r[c]&&(e[t]=i.value,i={configurable:u in i?i[u]:r[u],enumerable:h in i?i[h]:r[h],writable:!1})}return o(e,t,i)}:o:function(e,t,r){if(n(e),t=s(t),n(r),i)try{return o(e,t,r)}catch(e){}if("get"in r||"set"in r)throw a("Accessors not supported");return"value"in r&&(e[t]=r.value),e}})),ya=z(((e,t)=>{var i=Ar(),r=ji(),n=Mo();t.exports=i?function(e,t,i){return r.f(e,t,n(1,i))}:function(e,t,i){return e[t]=i,e}})),Cm=z(((e,t)=>{var i=Ar(),r=_i(),n=Function.prototype,s=i&&Object.getOwnPropertyDescriptor,a=r(n,"name"),o=a&&"something"===function(){}.name,l=a&&(!i||i&&s(n,"name").configurable);t.exports={EXISTS:a,PROPER:o,CONFIGURABLE:l}})),lw=z(((e,t)=>{var i=Bt(),r=Ei(),n=aw(),s=i(Function.toString);r(n.inspectSource)||(n.inspectSource=function(e){return s(e)}),t.exports=n.inspectSource})),w2=z(((e,t)=>{var i=rr(),r=Ei(),n=i.WeakMap;t.exports=r(n)&&/native code/.test(String(n))})),c1=z(((e,t)=>{var i=Rm(),r=Mm(),n=i("keys");t.exports=function(e){return n[e]||(n[e]=r(e))}})),ov=z(((e,t)=>{t.exports={}})),us=z(((e,t)=>{var i,r,n,s,a,o=w2(),l=rr(),h=ai(),u=ya(),c=_i(),p=aw(),d=c1(),f=ov(),m="Object already initialized",g=l.TypeError,y=l.WeakMap;o||p.state?((s=p.state||(p.state=new y)).get=s.get,s.has=s.has,s.set=s.set,i=function(e,t){if(s.has(e))throw g(m);return t.facade=e,s.set(e,t),t},r=function(e){return s.get(e)||{}},n=function(e){return s.has(e)}):(f[a=d("state")]=!0,i=function(e,t){if(c(e,a))throw g(m);return t.facade=e,u(e,a,t),t},r=function(e){return c(e,a)?e[a]:{}},n=function(e){return c(e,a)}),t.exports={set:i,get:r,has:n,enforce:function(e){return n(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var i;if(!h(t)||(i=r(t)).type!==e)throw g("Incompatible receiver, "+e+" required");return i}}}})),dw=z(((e,t)=>{var i=Mt(),r=Ei(),n=_i(),s=Ar(),a=Cm().CONFIGURABLE,o=lw(),l=us(),h=l.enforce,u=l.get,c=Object.defineProperty,p=s&&!i((function(){return 8!==c((function(){}),"length",{value:8}).length})),d=String(String).split("String"),f=t.exports=function(e,t,i){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!n(e,"name")||a&&e.name!==t)&&(s?c(e,"name",{value:t,configurable:!0}):e.name=t),p&&i&&n(i,"arity")&&e.length!==i.arity&&c(e,"length",{value:i.arity});try{i&&n(i,"constructor")&&i.constructor?s&&c(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=h(e);return n(r,"source")||(r.source=d.join("string"==typeof t?t:"")),e};Function.prototype.toString=f((function(){return r(this)&&u(this).source||o(this)}),"toString")})),Cn=z(((e,t)=>{var i=Ei(),r=ji(),n=dw(),s=sw();t.exports=function(e,t,a,o){o||(o={});var l=o.enumerable,h=void 0!==o.name?o.name:t;if(i(a)&&n(a,h,o),o.global)l?e[t]=a:s(t,a);else{try{o.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=a:r.f(e,t,{value:a,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}})),A2=z(((e,t)=>{var i=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?r:i)(t)}})),gs=z(((e,t)=>{var i=A2();t.exports=function(e){var t=+e;return t!=t||0===t?0:i(t)}})),_u=z(((e,t)=>{var i=gs(),r=Math.max,n=Math.min;t.exports=function(e,t){var s=i(e);return s<0?r(s+t,0):n(s,t)}})),qa=z(((e,t)=>{var i=gs(),r=Math.min;t.exports=function(e){return e>0?r(i(e),9007199254740991):0}})),cn=z(((e,t)=>{var i=qa();t.exports=function(e){return i(e.length)}})),lv=z(((e,t)=>{var i=va(),r=_u(),n=cn(),s=function(e){return function(t,s,a){var o,l=i(t),h=n(l),u=r(a,h);if(e&&s!=s){for(;h>u;)if((o=l[u++])!=o)return!0}else for(;h>u;u++)if((e||u in l)&&l[u]===s)return e||u||0;return!e&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}})),P2=z(((e,t)=>{var i=Bt(),r=_i(),n=va(),s=lv().indexOf,a=ov(),o=i([].push);t.exports=function(e,t){var i,l=n(e),h=0,u=[];for(i in l)!r(a,i)&&r(l,i)&&o(u,i);for(;t.length>h;)r(l,i=t[h++])&&(~s(u,i)||o(u,i));return u}})),fw=z(((e,t)=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]})),qh=z((e=>{var t=P2(),i=fw().concat("length","prototype");e.f=Object.getOwnPropertyNames||function(e){return t(e,i)}})),h1=z((e=>{e.f=Object.getOwnPropertySymbols})),mw=z(((e,t)=>{var i=In(),r=Bt(),n=qh(),s=h1(),a=qr(),o=r([].concat);t.exports=i("Reflect","ownKeys")||function(e){var t=n.f(a(e)),i=s.f;return i?o(t,i(e)):t}})),p1=z(((e,t)=>{var i=_i(),r=mw(),n=Hs(),s=ji();t.exports=function(e,t,a){for(var o=r(t),l=s.f,h=n.f,u=0;u{var i=Mt(),r=Ei(),n=/#|\.prototype\./,s=function(e,t){var n=o[a(e)];return n==h||n!=l&&(r(t)?i(t):!!t)},a=s.normalize=function(e){return String(e).replace(n,".").toLowerCase()},o=s.data={},l=s.NATIVE="N",h=s.POLYFILL="P";t.exports=s})),He=z(((e,t)=>{var i=rr(),r=Hs().f,n=ya(),s=Cn(),a=sw(),o=p1(),l=cv();t.exports=function(e,t){var h,u,c,p,d,f=e.target,m=e.global,g=e.stat;if(h=m?i:g?i[f]||a(f,{}):(i[f]||{}).prototype)for(u in t){if(p=t[u],e.dontCallGetSet?c=(d=r(h,u))&&d.value:c=h[u],!l(m?u:f+(g?".":"#")+u,e.forced)&&void 0!==c){if(typeof p==typeof c)continue;o(p,c)}(e.sham||c&&c.sham)&&n(p,"sham",!0),s(h,u,p,e)}}})),gw=z(((e,t)=>{var i={};i[fi()("toStringTag")]="z",t.exports="[object z]"===String(i)})),mc=z(((e,t)=>{var i=gw(),r=Ei(),n=ma(),s=fi()("toStringTag"),a=Object,o="Arguments"==n(function(){return arguments}());t.exports=i?n:function(e){var t,i,l;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=a(e),s))?i:o?n(t):"Object"==(l=n(t))&&r(t.callee)?"Arguments":l}})),mi=z(((e,t)=>{var i=mc(),r=String;t.exports=function(e){if("Symbol"===i(e))throw TypeError("Cannot convert a Symbol value to a string");return r(e)}})),uv=z(((e,t)=>{var i=P2(),r=fw();t.exports=Object.keys||function(e){return i(e,r)}})),yw=z((e=>{var t=Ar(),i=y2(),r=ji(),n=qr(),s=va(),a=uv();e.f=t&&!i?Object.defineProperties:function(e,t){n(e);for(var i,o=s(t),l=a(t),h=l.length,u=0;h>u;)r.f(e,i=l[u++],o[i]);return e}})),L2=z(((e,t)=>{var i=In();t.exports=i("document","documentElement")})),Ya=z(((e,t)=>{var i,r=qr(),n=yw(),s=fw(),a=ov(),o=L2(),l=l1(),h=c1(),u="prototype",c="script",p=h("IE_PROTO"),d=function(){},f=function(e){return"<"+c+">"+e+""},m=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}g="undefined"!=typeof document?document.domain&&i?m(i):function(){var e,t=l("iframe"),i="java"+c+":";return t.style.display="none",o.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F}():m(i);for(var e=s.length;e--;)delete g[u][s[e]];return g()};a[p]=!0,t.exports=Object.create||function(e,t){var i;return null!==e?(d[u]=r(e),i=new d,d[u]=null,i[p]=e):i=g(),void 0===t?i:n.f(i,t)}})),Su=z(((e,t)=>{"use strict";var i=Wh(),r=ji(),n=Mo();t.exports=function(e,t,s){var a=i(t);a in e?r.f(e,a,n(0,s)):e[a]=s}})),hv=z(((e,t)=>{var i=_u(),r=cn(),n=Su(),s=Array,a=Math.max;t.exports=function(e,t,o){for(var l=r(e),h=i(t,l),u=i(void 0===o?l:o,l),c=s(a(u-h,0)),p=0;h{var i=ma(),r=va(),n=qh().f,s=hv(),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(e){return a&&"Window"==i(e)?function(e){try{return n(e)}catch(e){return s(a)}}(e):n(r(e))}})),B2=z((e=>{var t=fi();e.f=t})),xw=z(((e,t)=>{var i=rr();t.exports=i})),Ta=z(((e,t)=>{var i=xw(),r=_i(),n=B2(),s=ji().f;t.exports=function(e){var t=i.Symbol||(i.Symbol={});r(t,e)||s(t,e,{value:n.f(e)})}})),k2=z(((e,t)=>{var i=si(),r=In(),n=fi(),s=Cn();t.exports=function(){var e=r("Symbol"),t=e&&e.prototype,a=t&&t.valueOf,o=n("toPrimitive");t&&!t[o]&&s(t,o,(function(e){return i(a,this)}),{arity:1})}})),Xa=z(((e,t)=>{var i=ji().f,r=_i(),n=fi()("toStringTag");t.exports=function(e,t,s){e&&!s&&(e=e.prototype),e&&!r(e,n)&&i(e,n,{configurable:!0,value:t})}})),Yh=z(((e,t)=>{var i=ma(),r=Bt();t.exports=function(e){if("Function"===i(e))return r(e)}})),pl=z(((e,t)=>{var i=Yh(),r=ms(),n=sv(),s=i(i.bind);t.exports=function(e,t){return r(e),void 0===t?e:n?s(e,t):function(){return e.apply(t,arguments)}}})),Xh=z(((e,t)=>{var i=ma();t.exports=Array.isArray||function(e){return"Array"==i(e)}})),Om=z(((e,t)=>{var i=Bt(),r=Mt(),n=Ei(),s=mc(),a=In(),o=lw(),l=function(){},h=[],u=a("Reflect","construct"),c=/^\s*(?:class|function)\b/,p=i(c.exec),d=!c.exec(l),f=function(e){if(!n(e))return!1;try{return u(l,h,e),!0}catch(e){return!1}},m=function(e){if(!n(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!p(c,o(e))}catch(e){return!0}};m.sham=!0,t.exports=!u||r((function(){var e;return f(f.call)||!f(Object)||!f((function(){e=!0}))||e}))?m:f})),Lj=z(((e,t)=>{var i=Xh(),r=Om(),n=ai(),s=fi()("species"),a=Array;t.exports=function(e){var t;return i(e)&&(t=e.constructor,r(t)&&(t===a||i(t.prototype))?t=void 0:n(t)&&(null===(t=t[s])&&(t=void 0))),void 0===t?a:t}})),pv=z(((e,t)=>{var i=Lj();t.exports=function(e,t){return new(i(e))(0===t?0:t)}})),Rs=z(((e,t)=>{var i=pl(),r=Bt(),n=Sm(),s=Hi(),a=cn(),o=pv(),l=r([].push),h=function(e){var t=1==e,r=2==e,h=3==e,u=4==e,c=6==e,p=7==e,d=5==e||c;return function(f,m,g,y){for(var v,T,x=s(f),b=n(x),_=i(m,g),E=a(b),w=0,S=y||o,I=t?S(f,E):r||p?S(f,0):void 0;E>w;w++)if((d||w in b)&&(T=_(v=b[w],w,x),e))if(t)I[w]=T;else if(T)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:l(I,v)}else switch(e){case 4:return!1;case 7:l(I,v)}return c?-1:h||u?u:I}};t.exports={forEach:h(0),map:h(1),filter:h(2),some:h(3),every:h(4),find:h(5),findIndex:h(6),filterReject:h(7)}})),eW=z((()=>{"use strict";var e=He(),t=rr(),i=si(),r=Bt(),n=Gn(),s=Ar(),a=wm(),o=Mt(),l=_i(),h=Do(),u=qr(),c=va(),p=Wh(),d=mi(),f=Mo(),m=Ya(),g=uv(),y=qh(),v=bw(),T=h1(),x=Hs(),b=ji(),_=yw(),E=a1(),w=Cn(),S=Rm(),I=c1(),M=ov(),A=Mm(),D=fi(),O=B2(),R=Ta(),C=k2(),N=Xa(),P=us(),L=Rs().forEach,F=I("hidden"),U="Symbol",k="prototype",B=P.set,H=P.getterFor(U),G=Object[k],z=t.Symbol,V=z&&z[k],j=t.TypeError,W=t.QObject,Y=x.f,X=b.f,q=v.f,Z=E.f,K=r([].push),J=S("symbols"),$=S("op-symbols"),Q=S("wks"),ee=!W||!W[k]||!W[k].findChild,te=s&&o((function(){return 7!=m(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?function(e,t,i){var r=Y(G,t);r&&delete G[t],X(e,t,i),r&&e!==G&&X(G,t,r)}:X,ie=function(e,t){var i=J[e]=m(V);return B(i,{type:U,tag:e,description:t}),s||(i.description=t),i},re=function(e,t,i){e===G&&re($,t,i),u(e);var r=p(t);return u(i),l(J,r)?(i.enumerable?(l(e,F)&&e[F][r]&&(e[F][r]=!1),i=m(i,{enumerable:f(0,!1)})):(l(e,F)||X(e,F,f(1,{})),e[F][r]=!0),te(e,r,i)):X(e,r,i)},ne=function(e,t){u(e);var r=c(t),n=g(r).concat(le(r));return L(n,(function(t){(!s||i(se,r,t))&&re(e,t,r[t])})),e},se=function(e){var t=p(e),r=i(Z,this,t);return!(this===G&&l(J,t)&&!l($,t))&&(!(r||!l(this,t)||!l(J,t)||l(this,F)&&this[F][t])||r)},ae=function(e,t){var i=c(e),r=p(t);if(i!==G||!l(J,r)||l($,r)){var n=Y(i,r);return n&&l(J,r)&&!(l(i,F)&&i[F][r])&&(n.enumerable=!0),n}},oe=function(e){var t=q(c(e)),i=[];return L(t,(function(e){!l(J,e)&&!l(M,e)&&K(i,e)})),i},le=function(e){var t=e===G,i=q(t?$:c(e)),r=[];return L(i,(function(e){l(J,e)&&(!t||l(G,e))&&K(r,J[e])})),r};a||(w(V=(z=function(){if(h(V,this))throw j("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?d(arguments[0]):void 0,t=A(e),r=function(e){this===G&&i(r,$,e),l(this,F)&&l(this[F],t)&&(this[F][t]=!1),te(this,t,f(1,e))};return s&&ee&&te(G,t,{configurable:!0,set:r}),ie(t,e)})[k],"toString",(function(){return H(this).tag})),w(z,"withoutSetter",(function(e){return ie(A(e),e)})),E.f=se,b.f=re,_.f=ne,x.f=ae,y.f=v.f=oe,T.f=le,O.f=function(e){return ie(D(e),e)},s&&(X(V,"description",{configurable:!0,get:function(){return H(this).description}}),n||w(G,"propertyIsEnumerable",se,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!a,sham:!a},{Symbol:z}),L(g(Q),(function(e){R(e)})),e({target:U,stat:!0,forced:!a},{useSetter:function(){ee=!0},useSimple:function(){ee=!1}}),e({target:"Object",stat:!0,forced:!a,sham:!s},{create:function(e,t){return void 0===t?m(e):ne(m(e),t)},defineProperty:re,defineProperties:ne,getOwnPropertyDescriptor:ae}),e({target:"Object",stat:!0,forced:!a},{getOwnPropertyNames:oe}),C(),N(z,U),M[F]=!0})),tN=z(((e,t)=>{var i=wm();t.exports=i&&!!Symbol.for&&!!Symbol.keyFor})),iW=z((()=>{var e=He(),t=In(),i=_i(),r=mi(),n=Rm(),s=tN(),a=n("string-to-symbol-registry"),o=n("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!s},{for:function(e){var n=r(e);if(i(a,n))return a[n];var s=t("Symbol")(n);return a[n]=s,o[s]=n,s}})})),sW=z((()=>{var e=He(),t=_i(),i=Dd(),r=Cd(),n=Rm(),s=tN(),a=n("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!s},{keyFor:function(e){if(!i(e))throw TypeError(r(e)+" is not a symbol");if(t(a,e))return a[e]}})})),Co=z(((e,t)=>{var i=sv(),r=Function.prototype,n=r.apply,s=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?s.bind(n):function(){return s.apply(n,arguments)})})),Pd=z(((e,t)=>{var i=Bt();t.exports=i([].slice)})),iN=z((()=>{var e=He(),t=In(),i=Co(),r=si(),n=Bt(),s=Mt(),a=Xh(),o=Ei(),l=ai(),h=Dd(),u=Pd(),c=wm(),p=t("JSON","stringify"),d=n(/./.exec),f=n("".charAt),m=n("".charCodeAt),g=n("".replace),y=n(1..toString),v=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,x=/^[\uDC00-\uDFFF]$/,b=!c||s((function(){var e=t("Symbol")();return"[null]"!=p([e])||"{}"!=p({a:e})||"{}"!=p(Object(e))})),_=s((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")})),E=function(e,t){var n=u(arguments),s=t;if((l(t)||void 0!==e)&&!h(e))return a(t)||(t=function(e,t){if(o(s)&&(t=r(s,this,e,t)),!h(t))return t}),n[1]=t,i(p,null,n)},w=function(e,t,i){var r=f(i,t-1),n=f(i,t+1);return d(T,e)&&!d(x,n)||d(x,e)&&!d(T,r)?"\\u"+y(m(e,0),16):e};p&&e({target:"JSON",stat:!0,arity:3,forced:b||_},{stringify:function(e,t,r){var n=u(arguments),s=i(b?E:p,null,n);return _&&"string"==typeof s?g(s,v,w):s}})})),xW=z((()=>{var e=He(),t=wm(),i=Mt(),r=h1(),n=Hi();e({target:"Object",stat:!0,forced:!t||i((function(){r.f(1)}))},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(n(e)):[]}})})),IW=z((()=>{eW(),iW(),sW(),iN(),xW()})),CW=z((()=>{"use strict";var e,t,i,r,n,s,a,o,l=He(),h=Ar(),u=rr(),c=Bt(),p=_i(),d=Ei(),f=Do(),m=mi(),g=ji().f,y=p1(),v=u.Symbol,T=v&&v.prototype;h&&d(v)&&(!("description"in T)||void 0!==v().description)&&(e={},y(t=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:m(arguments[0]),i=f(T,this)?new v(t):void 0===t?v():v(t);return""===t&&(e[i]=!0),i},v),t.prototype=T,T.constructor=t,i="Symbol(test)"==String(v("test")),r=c(T.valueOf),n=c(T.toString),s=/^Symbol\((.*)\)[^)]+$/,a=c("".replace),o=c("".slice),g(T,"description",{configurable:!0,get:function(){var t=r(this);if(p(e,t))return"";var l=n(t),h=i?o(l,7,-1):a(l,s,"$1");return""===h?void 0:h}}),l({global:!0,constructor:!0,forced:!0},{Symbol:t}))})),AW=z((()=>{Ta()("asyncIterator")})),OW=z((()=>{Ta()("hasInstance")})),PW=z((()=>{Ta()("isConcatSpreadable")})),NW=z((()=>{Ta()("iterator")})),LW=z((()=>{Ta()("match")})),FW=z((()=>{Ta()("matchAll")})),HW=z((()=>{Ta()("replace")})),UW=z((()=>{Ta()("search")})),BW=z((()=>{Ta()("species")})),kW=z((()=>{Ta()("split")})),GW=z((()=>{var e=Ta(),t=k2();e("toPrimitive"),t()})),VW=z((()=>{var e=In(),t=Ta(),i=Xa();t("toStringTag"),i(e("Symbol"),"Symbol")})),zW=z((()=>{Ta()("unscopables")})),sN=z(((e,t)=>{var i=Ei(),r=String,n=TypeError;t.exports=function(e){if("object"==typeof e||i(e))return e;throw n("Can't set "+r(e)+" as a prototype")}})),gc=z(((e,t)=>{var i=Bt(),r=qr(),n=sN();t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,s={};try{(e=i(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(s,[]),t=s instanceof Array}catch(e){}return function(i,s){return r(i),n(s),t?e(i,s):i.__proto__=s,i}}():void 0)})),aN=z(((e,t)=>{var i=ji().f;t.exports=function(e,t,r){r in e||i(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})}})),Lm=z(((e,t)=>{var i=Ei(),r=ai(),n=gc();t.exports=function(e,t,s){var a,o;return n&&i(a=t.constructor)&&a!==s&&r(o=a.prototype)&&o!==s.prototype&&n(e,o),e}})),mv=z(((e,t)=>{var i=mi();t.exports=function(e,t){return void 0===e?arguments.length<2?"":t:i(e)}})),oN=z(((e,t)=>{var i=ai(),r=ya();t.exports=function(e,t){i(t)&&"cause"in t&&r(e,"cause",t.cause)}})),b1=z(((e,t)=>{var i=Bt(),r=Error,n=i("".replace),s=String(r("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,o=a.test(s);t.exports=function(e,t){if(o&&"string"==typeof e&&!r.prepareStackTrace)for(;t--;)e=n(e,a,"");return e}})),Cw=z(((e,t)=>{var i=Mt(),r=Mo();t.exports=!i((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",r(1,7)),7!==e.stack)}))})),cN=z(((e,t)=>{"use strict";var i=In(),r=_i(),n=ya(),s=Do(),a=gc(),o=p1(),l=aN(),h=Lm(),u=mv(),c=oN(),p=b1(),d=Cw(),f=Ar(),m=Gn();t.exports=function(e,t,g,y){var v="stackTraceLimit",T=y?2:1,x=e.split("."),b=x[x.length-1],_=i.apply(null,x);if(_){var E=_.prototype;if(!m&&r(E,"cause")&&delete E.cause,!g)return _;var w=i("Error"),S=t((function(e,t){var i=u(y?t:e,void 0),r=y?new _(e):new _;return void 0!==i&&n(r,"message",i),d&&n(r,"stack",p(r.stack,2)),this&&s(E,this)&&h(r,this,S),arguments.length>T&&c(r,arguments[T]),r}));if(S.prototype=E,"Error"!==b?a?a(S,w):o(S,w,{name:!0}):f&&v in _&&(l(S,_,v),l(S,_,"prepareStackTrace")),o(S,_),!m)try{E.name!==b&&n(E,"name",b),E.constructor=S}catch(e){}return S}}})),uq=z((()=>{var e=He(),t=rr(),i=Co(),r=cN(),n="WebAssembly",s=t[n],a=7!==Error("e",{cause:7}).cause,o=function(t,i){var n={};n[t]=r(t,i,a),e({global:!0,constructor:!0,arity:1,forced:a},n)},l=function(t,i){if(s&&s[t]){var o={};o[t]=r(n+"."+t,i,a),e({target:n,stat:!0,constructor:!0,arity:1,forced:a},o)}};o("Error",(function(e){return function(t){return i(e,this,arguments)}})),o("EvalError",(function(e){return function(t){return i(e,this,arguments)}})),o("RangeError",(function(e){return function(t){return i(e,this,arguments)}})),o("ReferenceError",(function(e){return function(t){return i(e,this,arguments)}})),o("SyntaxError",(function(e){return function(t){return i(e,this,arguments)}})),o("TypeError",(function(e){return function(t){return i(e,this,arguments)}})),o("URIError",(function(e){return function(t){return i(e,this,arguments)}})),l("CompileError",(function(e){return function(t){return i(e,this,arguments)}})),l("LinkError",(function(e){return function(t){return i(e,this,arguments)}})),l("RuntimeError",(function(e){return function(t){return i(e,this,arguments)}}))})),pN=z(((e,t)=>{"use strict";var i=Ar(),r=Mt(),n=qr(),s=Ya(),a=mv(),o=Error.prototype.toString,l=r((function(){if(i){var e=s(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==o.call(e))return!0}return"2: 1"!==o.call({message:1,name:2})||"Error"!==o.call({})}));t.exports=l?function(){var e=n(this),t=a(e.name,"Error"),i=a(e.message);return t?i?t+": "+i:t:i}:o})),mq=z((()=>{var e=Cn(),t=pN(),i=Error.prototype;i.toString!==t&&e(i,"toString",t)})),Pw=z(((e,t)=>{var i=Mt();t.exports=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))})),Ao=z(((e,t)=>{var i=_i(),r=Ei(),n=Hi(),s=c1(),a=Pw(),o=s("IE_PROTO"),l=Object,h=l.prototype;t.exports=a?l.getPrototypeOf:function(e){var t=n(e);if(i(t,o))return t[o];var s=t.constructor;return r(s)&&t instanceof s?s.prototype:t instanceof l?h:null}})),gv=z(((e,t)=>{t.exports={}})),Nw=z(((e,t)=>{var i=fi(),r=gv(),n=i("iterator"),s=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||s[n]===e)}})),vv=z(((e,t)=>{var i=mc(),r=Iu(),n=ga(),s=gv(),a=fi()("iterator");t.exports=function(e){if(!n(e))return r(e,a)||r(e,"@@iterator")||s[i(e)]}})),x1=z(((e,t)=>{var i=si(),r=ms(),n=qr(),s=Cd(),a=vv(),o=TypeError;t.exports=function(e,t){var l=arguments.length<2?a(e):t;if(r(l))return n(i(l,e));throw o(s(e)+" is not iterable")}})),fN=z(((e,t)=>{var i=si(),r=qr(),n=Iu();t.exports=function(e,t,s){var a,o;r(e);try{if(!(a=n(e,"return"))){if("throw"===t)throw s;return s}a=i(a,e)}catch(e){o=!0,a=e}if("throw"===t)throw s;if(o)throw a;return r(a),s}})),vc=z(((e,t)=>{var i=pl(),r=si(),n=qr(),s=Cd(),a=Nw(),o=cn(),l=Do(),h=x1(),u=vv(),c=fN(),p=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;t.exports=function(e,t,m){var g,y,v,T,x,b,_,E=m&&m.that,w=!(!m||!m.AS_ENTRIES),S=!(!m||!m.IS_RECORD),I=!(!m||!m.IS_ITERATOR),M=!(!m||!m.INTERRUPTED),A=i(t,E),D=function(e){return g&&c(g,"normal",e),new d(!0,e)},O=function(e){return w?(n(e),M?A(e[0],e[1],D):A(e[0],e[1])):M?A(e,D):A(e)};if(S)g=e.iterator;else if(I)g=e;else{if(!(y=u(e)))throw p(s(e)+" is not iterable");if(a(y)){for(v=0,T=o(e);T>v;v++)if((x=O(e[v]))&&l(f,x))return x;return new d(!1)}g=h(e,y)}for(b=S?e.next:g.next;!(_=r(b,g)).done;){try{x=O(_.value)}catch(e){c(g,"throw",e)}if("object"==typeof x&&x&&l(f,x))return x}return new d(!1)}})),Aq=z((()=>{"use strict";var e=He(),t=Do(),i=Ao(),r=gc(),n=p1(),s=Ya(),a=ya(),o=Mo(),l=b1(),h=oN(),u=vc(),c=mv(),p=fi(),d=Cw(),f=p("toStringTag"),m=Error,g=[].push,y=function(e,n){var o,p=arguments.length>2?arguments[2]:void 0,y=t(v,this);r?o=r(m(),y?i(this):v):(o=y?this:s(v),a(o,f,"Error")),void 0!==n&&a(o,"message",c(n)),d&&a(o,"stack",l(o.stack,1)),h(o,p);var T=[];return u(e,g,{that:T}),a(o,"errors",T),o};r?r(y,m):n(y,m,{name:!0});var v=y.prototype=s(m.prototype,{constructor:o(1,y),message:o(1,""),name:o(1,"AggregateError")});e({global:!0,constructor:!0,arity:2},{AggregateError:y})})),Oq=z((()=>{Aq()})),Fq=z((()=>{var e=He(),t=In(),i=Co(),r=Mt(),n=cN(),s="AggregateError",a=t(s),o=!r((function(){return 1!==a([1]).errors[0]}))&&r((function(){return 7!==a([1],s,{cause:7}).cause}));e({global:!0,constructor:!0,arity:2,forced:o},{AggregateError:n(s,(function(e){return function(t,r){return i(e,this,arguments)}}),o,!0)})})),fl=z(((e,t)=>{var i=fi(),r=Ya(),n=ji().f,s=i("unscopables"),a=Array.prototype;null==a[s]&&n(a,s,{configurable:!0,value:r(null)}),t.exports=function(e){a[s][e]=!0}})),Uq=z((()=>{"use strict";var e=He(),t=Hi(),i=cn(),r=gs(),n=fl();e({target:"Array",proto:!0},{at:function(e){var n=t(this),s=i(n),a=r(e),o=a>=0?a:s+a;return o<0||o>=s?void 0:n[o]}}),n("at")})),yv=z(((e,t)=>{var i=TypeError;t.exports=function(e){if(e>9007199254740991)throw i("Maximum allowed index exceeded");return e}})),Tv=z(((e,t)=>{var i=Mt(),r=fi(),n=xu(),s=r("species");t.exports=function(e){return n>=51||!i((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}})),jq=z((()=>{"use strict";var e=He(),t=Mt(),i=Xh(),r=ai(),n=Hi(),s=cn(),a=yv(),o=Su(),l=pv(),h=Tv(),u=fi(),c=xu(),p=u("isConcatSpreadable"),d=c>=51||!t((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),f=h("concat"),m=function(e){if(!r(e))return!1;var t=e[p];return void 0!==t?!!t:i(e)};e({target:"Array",proto:!0,arity:1,forced:!d||!f},{concat:function(e){var t,i,r,h,u,c=n(this),p=l(c,0),d=0;for(t=-1,r=arguments.length;t{"use strict";var i=Cd(),r=TypeError;t.exports=function(e,t){if(!delete e[t])throw r("Cannot delete property "+i(t)+" of "+i(e))}})),bN=z(((e,t)=>{"use strict";var i=Hi(),r=_u(),n=cn(),s=_1(),a=Math.min;t.exports=[].copyWithin||function(e,t){var o=i(this),l=n(o),h=r(e,l),u=r(t,l),c=arguments.length>2?arguments[2]:void 0,p=a((void 0===c?l:r(c,l))-u,l-h),d=1;for(u0;)u in o?o[h]=o[u]:s(o,h),h+=d,u+=d;return o}})),Xq=z((()=>{var e=He(),t=bN(),i=fl();e({target:"Array",proto:!0},{copyWithin:t}),i("copyWithin")})),Ru=z(((e,t)=>{"use strict";var i=Mt();t.exports=function(e,t){var r=[][e];return!!r&&i((function(){r.call(null,t||function(){return 1},1)}))}})),Kq=z((()=>{"use strict";var e=He(),t=Rs().every;e({target:"Array",proto:!0,forced:!Ru()("every")},{every:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})})),Bw=z(((e,t)=>{"use strict";var i=Hi(),r=_u(),n=cn();t.exports=function(e){for(var t=i(this),s=n(t),a=arguments.length,o=r(a>1?arguments[1]:void 0,s),l=a>2?arguments[2]:void 0,h=void 0===l?s:r(l,s);h>o;)t[o++]=e;return t}})),Qq=z((()=>{var e=He(),t=Bw(),i=fl();e({target:"Array",proto:!0},{fill:t}),i("fill")})),eY=z((()=>{"use strict";var e=He(),t=Rs().filter;e({target:"Array",proto:!0,forced:!Tv()("filter")},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})})),rY=z((()=>{"use strict";var e=He(),t=Rs().find,i=fl(),r="find",n=!0;r in[]&&Array(1)[r]((function(){n=!1})),e({target:"Array",proto:!0,forced:n},{find:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),i(r)})),nY=z((()=>{"use strict";var e=He(),t=Rs().findIndex,i=fl(),r="findIndex",n=!0;r in[]&&Array(1)[r]((function(){n=!1})),e({target:"Array",proto:!0,forced:n},{findIndex:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),i(r)})),S1=z(((e,t)=>{var i=pl(),r=Sm(),n=Hi(),s=cn(),a=function(e){var t=1==e;return function(a,o,l){for(var h,u=n(a),c=r(u),p=i(o,l),d=s(c);d-- >0;)if(p(h=c[d],d,u))switch(e){case 0:return h;case 1:return d}return t?-1:void 0}};t.exports={findLast:a(0),findLastIndex:a(1)}})),oY=z((()=>{"use strict";var e=He(),t=S1().findLast,i=fl();e({target:"Array",proto:!0},{findLast:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),i("findLast")})),lY=z((()=>{"use strict";var e=He(),t=S1().findLastIndex,i=fl();e({target:"Array",proto:!0},{findLastIndex:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),i("findLastIndex")})),_N=z(((e,t)=>{"use strict";var i=Xh(),r=cn(),n=yv(),s=pl(),a=function(e,t,o,l,h,u,c,p){for(var d,f,m=h,g=0,y=!!c&&s(c,p);g0&&i(d)?(f=r(d),m=a(e,t,d,f,m,u-1)-1):(n(m+1),e[m]=d),m++),g++;return m};t.exports=a})),hY=z((()=>{"use strict";var e=He(),t=_N(),i=Hi(),r=cn(),n=gs(),s=pv();e({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,a=i(this),o=r(a),l=s(a,0);return l.length=t(l,a,a,o,0,void 0===e?1:n(e)),l}})})),pY=z((()=>{"use strict";var e=He(),t=_N(),i=ms(),r=Hi(),n=cn(),s=pv();e({target:"Array",proto:!0},{flatMap:function(e){var a,o=r(this),l=n(o);return i(e),(a=s(o,0)).length=t(a,o,o,l,0,1,e,arguments.length>1?arguments[1]:void 0),a}})})),SN=z(((e,t)=>{"use strict";var i=Rs().forEach,r=Ru()("forEach");t.exports=r?[].forEach:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})),mY=z((()=>{"use strict";var e=He(),t=SN();e({target:"Array",proto:!0,forced:[].forEach!=t},{forEach:t})})),vY=z(((e,t)=>{var i=qr(),r=fN();t.exports=function(e,t,n,s){try{return s?t(i(n)[0],n[1]):t(n)}catch(t){r(e,"throw",t)}}})),wN=z(((e,t)=>{"use strict";var i=pl(),r=si(),n=Hi(),s=vY(),a=Nw(),o=Om(),l=cn(),h=Su(),u=x1(),c=vv(),p=Array;t.exports=function(e){var t=n(e),d=o(this),f=arguments.length,m=f>1?arguments[1]:void 0,g=void 0!==m;g&&(m=i(m,f>2?arguments[2]:void 0));var y,v,T,x,b,_,E=c(t),w=0;if(!E||this===p&&a(E))for(y=l(t),v=d?new this(y):p(y);y>w;w++)_=g?m(t[w],w):t[w],h(v,w,_);else for(b=(x=u(t,E)).next,v=d?new this:[];!(T=r(b,x)).done;w++)_=g?s(x,m,[T.value,w],!0):T.value,h(v,w,_);return v.length=w,v}})),w1=z(((e,t)=>{var i,r,n=fi()("iterator"),s=!1;try{i=0,(r={next:function(){return{done:!!i++}},return:function(){s=!0}})[n]=function(){return this},Array.from(r,(function(){throw 2}))}catch(e){}t.exports=function(e,t){if(!t&&!s)return!1;var i=!1;try{var r={};r[n]=function(){return{next:function(){return{done:i=!0}}}},e(r)}catch(e){}return i}})),SY=z((()=>{var e=He(),t=wN();e({target:"Array",stat:!0,forced:!w1()((function(e){Array.from(e)}))},{from:t})})),wY=z((()=>{"use strict";var e=He(),t=lv().includes,i=Mt(),r=fl();e({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r("includes")})),MY=z((()=>{"use strict";var e=He(),t=Yh(),i=lv().indexOf,r=Ru(),n=t([].indexOf),s=!!n&&1/n([1],1,-0)<0,a=r("indexOf");e({target:"Array",proto:!0,forced:s||!a},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return s?n(this,e,t)||0:i(this,e,t)}})})),DY=z((()=>{He()({target:"Array",stat:!0},{isArray:Xh()})})),ON=z(((e,t)=>{"use strict";var i,r,n,s=Mt(),a=Ei(),o=ai(),l=Ya(),h=Ao(),u=Cn(),c=fi(),p=Gn(),d=c("iterator"),f=!1;[].keys&&("next"in(n=[].keys())?(r=h(h(n)))!==Object.prototype&&(i=r):f=!0),!o(i)||s((function(){var e={};return i[d].call(e)!==e}))?i={}:p&&(i=l(i)),a(i[d])||u(i,d,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:f}})),kw=z(((e,t)=>{"use strict";var i=ON().IteratorPrototype,r=Ya(),n=Mo(),s=Xa(),a=gv(),o=function(){return this};t.exports=function(e,t,l,h){var u=t+" Iterator";return e.prototype=r(i,{next:n(+!h,l)}),s(e,u,!1,!0),a[u]=o,e}})),zw=z(((e,t)=>{"use strict";var i=He(),r=si(),n=Gn(),s=Cm(),a=Ei(),o=kw(),l=Ao(),h=gc(),u=Xa(),c=ya(),p=Cn(),d=fi(),f=gv(),m=ON(),g=s.PROPER,y=s.CONFIGURABLE,v=m.IteratorPrototype,T=m.BUGGY_SAFARI_ITERATORS,x=d("iterator"),b="keys",_="values",E="entries",w=function(){return this};t.exports=function(e,t,s,d,m,S,I){o(s,t,d);var M,A,D,O=function(e){if(e===m&&L)return L;if(!T&&e in N)return N[e];switch(e){case b:case _:case E:return function(){return new s(this,e)}}return function(){return new s(this)}},R=t+" Iterator",C=!1,N=e.prototype,P=N[x]||N["@@iterator"]||m&&N[m],L=!T&&P||O(m),F="Array"==t&&N.entries||P;if(F&&((M=l(F.call(new e)))!==Object.prototype&&M.next&&(!n&&l(M)!==v&&(h?h(M,v):a(M[x])||p(M,x,w)),u(M,R,!0,!0),n&&(f[R]=w))),g&&m==_&&P&&P.name!==_&&(!n&&y?c(N,"name",_):(C=!0,L=function(){return r(P,this)})),m)if(A={values:O(_),keys:S?L:O(b),entries:O(E)},I)for(D in A)(T||C||!(D in N))&&p(N,D,A[D]);else i({target:t,proto:!0,forced:T||C},A);return(!n||I)&&N[x]!==L&&p(N,x,L,{name:m}),f[t]=L,A}})),D1=z(((e,t)=>{t.exports=function(e,t){return{value:e,done:t}}})),C1=z(((e,t)=>{"use strict";var i=va(),r=fl(),n=gv(),s=us(),a=ji().f,o=zw(),l=D1(),h=Gn(),u=Ar(),c="Array Iterator",p=s.set,d=s.getterFor(c);t.exports=o(Array,"Array",(function(e,t){p(this,{type:c,target:i(e),index:0,kind:t})}),(function(){var e=d(this),t=e.target,i=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,l(void 0,!0)):l("keys"==i?r:"values"==i?t[r]:[r,t[r]],!1)}),"values");var f=n.Arguments=n.Array;if(r("keys"),r("values"),r("entries"),!h&&u&&"values"!==f.name)try{a(f,"name",{value:"values"})}catch(e){}})),KY=z((()=>{"use strict";var e=He(),t=Bt(),i=Sm(),r=va(),n=Ru(),s=t([].join),a=i!=Object,o=n("join",",");e({target:"Array",proto:!0,forced:a||!o},{join:function(e){return s(r(this),void 0===e?",":e)}})})),FN=z(((e,t)=>{"use strict";var i=Co(),r=va(),n=gs(),s=cn(),a=Ru(),o=Math.min,l=[].lastIndexOf,h=!!l&&1/[1].lastIndexOf(1,-0)<0,u=a("lastIndexOf"),c=h||!u;t.exports=c?function(e){if(h)return i(l,this,arguments)||0;var t=r(this),a=s(t),u=a-1;for(arguments.length>1&&(u=o(u,n(arguments[1]))),u<0&&(u=a+u);u>=0;u--)if(u in t&&t[u]===e)return u||0;return-1}:l})),eX=z((()=>{var e=He(),t=FN();e({target:"Array",proto:!0,forced:t!==[].lastIndexOf},{lastIndexOf:t})})),tX=z((()=>{"use strict";var e=He(),t=Rs().map;e({target:"Array",proto:!0,forced:!Tv()("map")},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})})),iX=z((()=>{"use strict";var e=He(),t=Mt(),i=Om(),r=Su(),n=Array;e({target:"Array",stat:!0,forced:t((function(){function e(){}return!(n.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,s=new(i(this)?this:n)(t);t>e;)r(s,e,arguments[e++]);return s.length=t,s}})})),Ww=z(((e,t)=>{"use strict";var i=Ar(),r=Xh(),n=TypeError,s=Object.getOwnPropertyDescriptor,a=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();t.exports=a?function(e,t){if(r(e)&&!s(e,"length").writable)throw n("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}})),sX=z((()=>{"use strict";var e=He(),t=Hi(),i=cn(),r=Ww(),n=yv(),s=Mt()((function(){return 4294967297!==[].push.call({length:4294967296},1)})),a=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}();e({target:"Array",proto:!0,arity:1,forced:s||a},{push:function(e){var s=t(this),a=i(s),o=arguments.length;n(a+o);for(var l=0;l{var i=ms(),r=Hi(),n=Sm(),s=cn(),a=TypeError,o=function(e){return function(t,o,l,h){i(o);var u=r(t),c=n(u),p=s(u),d=e?p-1:0,f=e?-1:1;if(l<2)for(;;){if(d in c){h=c[d],d+=f;break}if(d+=f,e?d<0:p<=d)throw a("Reduce of empty array with no initial value")}for(;e?d>=0:p>d;d+=f)d in c&&(h=o(h,c[d],d,u));return h}};t.exports={left:o(!1),right:o(!0)}})),Mu=z(((e,t)=>{var i=ma(),r=rr();t.exports="process"==i(r.process)})),uX=z((()=>{"use strict";var e=He(),t=A1().left,i=Ru(),r=xu(),n=Mu();e({target:"Array",proto:!0,forced:!i("reduce")||!n&&r>79&&r<83},{reduce:function(e){var i=arguments.length;return t(this,e,i,i>1?arguments[1]:void 0)}})})),pX=z((()=>{"use strict";var e=He(),t=A1().right,i=Ru(),r=xu(),n=Mu();e({target:"Array",proto:!0,forced:!i("reduceRight")||!n&&r>79&&r<83},{reduceRight:function(e){return t(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})})),fX=z((()=>{"use strict";var e=He(),t=Bt(),i=Xh(),r=t([].reverse),n=[1,2];e({target:"Array",proto:!0,forced:String(n)===String(n.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),r(this)}})})),vX=z((()=>{"use strict";var e=He(),t=Xh(),i=Om(),r=ai(),n=_u(),s=cn(),a=va(),o=Su(),l=fi(),h=Tv(),u=Pd(),c=h("slice"),p=l("species"),d=Array,f=Math.max;e({target:"Array",proto:!0,forced:!c},{slice:function(e,l){var h,c,m,g=a(this),y=s(g),v=n(e,y),T=n(void 0===l?y:l,y);if(t(g)&&(h=g.constructor,i(h)&&(h===d||t(h.prototype))?h=void 0:r(h)&&(null===(h=h[p])&&(h=void 0)),h===d||void 0===h))return u(g,v,T);for(c=new(void 0===h?d:h)(f(T-v,0)),m=0;v{"use strict";var e=He(),t=Rs().some;e({target:"Array",proto:!0,forced:!Ru()("some")},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})})),qw=z(((e,t)=>{var i=hv(),r=Math.floor,n=function(e,t){var o=e.length,l=r(o/2);return o<8?s(e,t):a(e,n(i(e,0,l),t),n(i(e,l),t),t)},s=function(e,t){for(var i,r,n=e.length,s=1;s0;)e[r]=e[--r];r!==s++&&(e[r]=i)}return e},a=function(e,t,i,r){for(var n=t.length,s=i.length,a=0,o=0;a{var i=bu().match(/firefox\/(\d+)/i);t.exports=!!i&&+i[1]})),kN=z(((e,t)=>{var i=bu();t.exports=/MSIE|Trident/.test(i)})),Yw=z(((e,t)=>{var i=bu().match(/AppleWebKit\/(\d+)\./);t.exports=!!i&&+i[1]})),NX=z((()=>{"use strict";var e=He(),t=Bt(),i=ms(),r=Hi(),n=cn(),s=_1(),a=mi(),o=Mt(),l=qw(),h=Ru(),u=BN(),c=kN(),p=xu(),d=Yw(),f=[],m=t(f.sort),g=t(f.push),y=o((function(){f.sort(void 0)})),v=o((function(){f.sort(null)})),T=h("sort"),x=!o((function(){if(p)return p<70;if(!(u&&u>3)){if(c)return!0;if(d)return d<603;var e,t,i,r,n="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(r=0;r<47;r++)f.push({k:t+r,v:i})}for(f.sort((function(e,t){return t.v-e.v})),r=0;ra(i)?1:-1}}(e)),o=n(u),h=0;h{"use strict";var i=In(),r=ji(),n=fi(),s=Ar(),a=n("species");t.exports=function(e){var t=i(e),n=r.f;s&&t&&!t[a]&&n(t,a,{configurable:!0,get:function(){return this}})}})),HX=z((()=>{Hm()("Array")})),UX=z((()=>{"use strict";var e=He(),t=Hi(),i=_u(),r=gs(),n=cn(),s=Ww(),a=yv(),o=pv(),l=Su(),h=_1(),u=Tv()("splice"),c=Math.max,p=Math.min;e({target:"Array",proto:!0,forced:!u},{splice:function(e,u){var d,f,m,g,y,v,T=t(this),x=n(T),b=i(e,x),_=arguments.length;for(0===_?d=f=0:1===_?(d=0,f=x-b):(d=_-2,f=p(c(r(u),0),x-b)),a(x+d-f),m=o(T,f),g=0;gx-f+d;g--)h(T,g-1)}else if(d>f)for(g=x-f;g>b;g--)v=g+d-1,(y=g+f-1)in T?T[v]=T[y]:h(T,v);for(g=0;g{fl()("flat")})),kX=z((()=>{fl()("flatMap")})),GX=z((()=>{"use strict";var e=He(),t=Hi(),i=cn(),r=Ww(),n=_1(),s=yv(),a=1!==[].unshift(0),o=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();e({target:"Array",proto:!0,arity:1,forced:a||o},{unshift:function(e){var a=t(this),o=i(a),l=arguments.length;if(l){s(o+l);for(var h=o;h--;){var u=h+l;h in a?a[u]=a[h]:n(a,u)}for(var c=0;c{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView})),Ev=z(((e,t)=>{var i=Cn();t.exports=function(e,t,r){for(var n in t)i(e,n,t[n],r);return e}})),yc=z(((e,t)=>{var i=Do(),r=TypeError;t.exports=function(e,t){if(i(t,e))return e;throw r("Incorrect invocation")}})),zN=z(((e,t)=>{var i=gs(),r=qa(),n=RangeError;t.exports=function(e){if(void 0===e)return 0;var t=i(e),s=r(t);if(t!==s)throw n("Wrong length or index");return s}})),YX=z(((e,t)=>{var i=Array,r=Math.abs,n=Math.pow,s=Math.floor,a=Math.log,o=Math.LN2;t.exports={pack:function(e,t,l){var h,u,c,p=i(l),d=8*l-t-1,f=(1<>1,g=23===t?n(2,-24)-n(2,-77):0,y=e<0||0===e&&1/e<0?1:0,v=0;for((e=r(e))!=e||e===1/0?(u=e!=e?1:0,h=f):(h=s(a(e)/o),e*(c=n(2,-h))<1&&(h--,c*=2),(e+=h+m>=1?g/c:g*n(2,1-m))*c>=2&&(h++,c/=2),h+m>=f?(u=0,h=f):h+m>=1?(u=(e*c-1)*n(2,t),h+=m):(u=e*n(2,m-1)*n(2,t),h=0));t>=8;)p[v++]=255&u,u/=256,t-=8;for(h=h<0;)p[v++]=255&h,h/=256,d-=8;return p[--v]|=128*y,p},unpack:function(e,t){var i,r=e.length,s=8*r-t-1,a=(1<>1,l=s-7,h=r-1,u=e[h--],c=127&u;for(u>>=7;l>0;)c=256*c+e[h--],l-=8;for(i=c&(1<<-l)-1,c>>=-l,l+=t;l>0;)i=256*i+e[h--],l-=8;if(0===c)c=1-o;else{if(c===a)return i?NaN:u?-1/0:1/0;i+=n(2,t),c-=o}return(u?-1:1)*i*n(2,c-t)}}})),P1=z(((e,t)=>{"use strict";var i,r,n,s,a,o,l=rr(),h=Bt(),u=Ar(),c=Xw(),p=Cm(),d=ya(),f=Ev(),m=Mt(),g=yc(),y=gs(),v=qa(),T=zN(),x=YX(),b=Ao(),_=gc(),E=qh().f,w=ji().f,S=Bw(),I=hv(),M=Xa(),A=us(),D=p.PROPER,O=p.CONFIGURABLE,R=A.get,C=A.set,N="ArrayBuffer",P="DataView",L="prototype",F="Wrong index",U=l[N],k=U,B=k&&k[L],H=l[P],G=H&&H[L],z=Object.prototype,V=l.Array,j=l.RangeError,W=h(S),Y=h([].reverse),X=x.pack,q=x.unpack,Z=function(e){return[255&e]},K=function(e){return[255&e,e>>8&255]},J=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},$=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Q=function(e){return X(e,23,4)},ee=function(e){return X(e,52,8)},te=function(e,t){w(e[L],t,{get:function(){return R(this)[t]}})},ie=function(e,t,i,r){var n=T(i),s=R(e);if(n+t>s.byteLength)throw j(F);var a=R(s.buffer).bytes,o=n+s.byteOffset,l=I(a,o,o+t);return r?l:Y(l)},re=function(e,t,i,r,n,s){var a=T(i),o=R(e);if(a+t>o.byteLength)throw j(F);for(var l=R(o.buffer).bytes,h=a+o.byteOffset,u=r(+n),c=0;cn;)(s=r[n++])in k||d(k,s,U[s]);B.constructor=k}_&&b(G)!==z&&_(G,z),a=new H(new k(2)),o=h(G.setInt8),a.setInt8(0,2147483648),a.setInt8(1,2147483649),(a.getInt8(0)||!a.getInt8(1))&&f(G,{setInt8:function(e,t){o(this,e,t<<24>>24)},setUint8:function(e,t){o(this,e,t<<24>>24)}},{unsafe:!0})}else B=(k=function(e){g(this,B);var t=T(e);C(this,{bytes:W(V(t),0),byteLength:t}),u||(this.byteLength=t)})[L],G=(H=function(e,t,i){g(this,G),g(e,B);var r=R(e).byteLength,n=y(t);if(n<0||n>r)throw j("Wrong offset");if(n+(i=void 0===i?r-n:v(i))>r)throw j("Wrong length");C(this,{buffer:e,byteLength:i,byteOffset:n}),u||(this.buffer=e,this.byteLength=i,this.byteOffset=n)})[L],u&&(te(k,"byteLength"),te(H,"buffer"),te(H,"byteLength"),te(H,"byteOffset")),f(G,{getInt8:function(e){return ie(this,1,e)[0]<<24>>24},getUint8:function(e){return ie(this,1,e)[0]},getInt16:function(e){var t=ie(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ie(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return $(ie(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return $(ie(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return q(ie(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return q(ie(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){re(this,1,e,Z,t)},setUint8:function(e,t){re(this,1,e,Z,t)},setInt16:function(e,t){re(this,2,e,K,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){re(this,2,e,K,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){re(this,4,e,J,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){re(this,4,e,J,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){re(this,4,e,Q,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){re(this,8,e,ee,t,arguments.length>2?arguments[2]:void 0)}});M(k,N),M(H,P),t.exports={ArrayBuffer:k,DataView:H}})),f$=z((()=>{"use strict";var e=He(),t=rr(),i=P1(),r=Hm(),n="ArrayBuffer",s=i[n];e({global:!0,constructor:!0,forced:t[n]!==s},{ArrayBuffer:s}),r(n)})),Si=z(((e,t)=>{"use strict";var i,r,n,s=Xw(),a=Ar(),o=rr(),l=Ei(),h=ai(),u=_i(),c=mc(),p=Cd(),d=ya(),f=Cn(),m=ji().f,g=Do(),y=Ao(),v=gc(),T=fi(),x=Mm(),b=us(),_=b.enforce,E=b.get,w=o.Int8Array,S=w&&w.prototype,I=o.Uint8ClampedArray,M=I&&I.prototype,A=w&&y(w),D=S&&y(S),O=Object.prototype,R=o.TypeError,C=T("toStringTag"),N=x("TYPED_ARRAY_TAG"),P="TypedArrayConstructor",L=s&&!!v&&"Opera"!==c(o.opera),F=!1,U={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},k={BigInt64Array:8,BigUint64Array:8},B=function(e){var t=y(e);if(h(t)){var i=E(t);return i&&u(i,P)?i[P]:B(t)}},H=function(e){if(!h(e))return!1;var t=c(e);return u(U,t)||u(k,t)};for(i in U)(n=(r=o[i])&&r.prototype)?_(n)[P]=r:L=!1;for(i in k)(n=(r=o[i])&&r.prototype)&&(_(n)[P]=r);if((!L||!l(A)||A===Function.prototype)&&(A=function(){throw R("Incorrect invocation")},L))for(i in U)o[i]&&v(o[i],A);if((!L||!D||D===O)&&(D=A.prototype,L))for(i in U)o[i]&&v(o[i].prototype,D);if(L&&y(M)!==D&&v(M,D),a&&!u(D,C))for(i in F=!0,m(D,C,{get:function(){return h(this)?this[N]:void 0}}),U)o[i]&&d(o[i],N,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:L,TYPED_ARRAY_TAG:F&&N,aTypedArray:function(e){if(H(e))return e;throw R("Target is not a typed array")},aTypedArrayConstructor:function(e){if(l(e)&&(!v||g(A,e)))return e;throw R(p(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,i,r){if(a){if(i)for(var n in U){var s=o[n];if(s&&u(s.prototype,e))try{delete s.prototype[e]}catch(i){try{s.prototype[e]=t}catch(e){}}}(!D[e]||i)&&f(D,e,i?t:L&&S[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,i){var r,n;if(a){if(v){if(i)for(r in U)if((n=o[r])&&u(n,e))try{delete n[e]}catch(e){}if(A[e]&&!i)return;try{return f(A,e,i?t:L&&A[e]||t)}catch(e){}}for(r in U)(n=o[r])&&(!n[e]||i)&&f(n,e,t)}},getTypedArrayConstructor:B,isView:function(e){if(!h(e))return!1;var t=c(e);return"DataView"===t||u(U,t)||u(k,t)},isTypedArray:H,TypedArray:A,TypedArrayPrototype:D}})),w$=z((()=>{var e=He(),t=Si();e({target:"ArrayBuffer",stat:!0,forced:!t.NATIVE_ARRAY_BUFFER_VIEWS},{isView:t.isView})})),aR=z(((e,t)=>{var i=Om(),r=Cd(),n=TypeError;t.exports=function(e){if(i(e))return e;throw n(r(e)+" is not a constructor")}})),Bm=z(((e,t)=>{var i=qr(),r=aR(),n=ga(),s=fi()("species");t.exports=function(e,t){var a,o=i(e).constructor;return void 0===o||n(a=i(o)[s])?t:r(a)}})),L$=z((()=>{"use strict";var e=He(),t=Yh(),i=Mt(),r=P1(),n=qr(),s=_u(),a=qa(),o=Bm(),l=r.ArrayBuffer,h=r.DataView,u=h.prototype,c=t(l.prototype.slice),p=t(u.getUint8),d=t(u.setUint8);e({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i((function(){return!new l(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(c&&void 0===t)return c(n(this),e);for(var i=n(this).byteLength,r=s(e,i),u=s(void 0===t?i:t,i),f=new(o(this,l))(a(u-r)),m=new h(this),g=new h(f),y=0;r{var e=He(),t=P1();e({global:!0,constructor:!0,forced:!Xw()},{DataView:t.DataView})})),H$=z((()=>{F$()})),U$=z((()=>{"use strict";var e=He(),t=Bt(),i=Mt()((function(){return 120!==new Date(16e11).getYear()})),r=t(Date.prototype.getFullYear);e({target:"Date",proto:!0,forced:i},{getYear:function(){return r(this)-1900}})})),k$=z((()=>{var e=He(),t=Bt(),i=Date,r=t(i.prototype.getTime);e({target:"Date",stat:!0},{now:function(){return r(new i)}})})),z$=z((()=>{"use strict";var e=He(),t=Bt(),i=gs(),r=Date.prototype,n=t(r.getTime),s=t(r.setFullYear);e({target:"Date",proto:!0},{setYear:function(e){n(this);var t=i(e);return s(this,0<=t&&t<=99?t+1900:t)}})})),j$=z((()=>{He()({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})})),N1=z(((e,t)=>{"use strict";var i=gs(),r=mi(),n=cs(),s=RangeError;t.exports=function(e){var t=r(n(this)),a="",o=i(e);if(o<0||o==1/0)throw s("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(a+=t);return a}})),oR=z(((e,t)=>{var i=Bt(),r=qa(),n=mi(),s=N1(),a=cs(),o=i(s),l=i("".slice),h=Math.ceil,u=function(e){return function(t,i,s){var u,c,p=n(a(t)),d=r(i),f=p.length,m=void 0===s?" ":n(s);return d<=f||""==m?p:((c=o(m,h((u=d-f)/m.length))).length>u&&(c=l(c,0,u)),e?p+c:c+p)}};t.exports={start:u(!1),end:u(!0)}})),J$=z(((e,t)=>{"use strict";var i=Bt(),r=Mt(),n=oR().start,s=RangeError,a=isFinite,o=Math.abs,l=Date.prototype,h=l.toISOString,u=i(l.getTime),c=i(l.getUTCDate),p=i(l.getUTCFullYear),d=i(l.getUTCHours),f=i(l.getUTCMilliseconds),m=i(l.getUTCMinutes),g=i(l.getUTCMonth),y=i(l.getUTCSeconds);t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=h.call(new Date(-50000000000001))}))||!r((function(){h.call(new Date(NaN))}))?function(){if(!a(u(this)))throw s("Invalid time value");var e=this,t=p(e),i=f(e),r=t<0?"-":t>9999?"+":"";return r+n(o(t),r?6:4,0)+"-"+n(g(e)+1,2,0)+"-"+n(c(e),2,0)+"T"+n(d(e),2,0)+":"+n(m(e),2,0)+":"+n(y(e),2,0)+"."+n(i,3,0)+"Z"}:h})),eK=z((()=>{var e=He(),t=J$();e({target:"Date",proto:!0,forced:Date.prototype.toISOString!==t},{toISOString:t})})),tK=z((()=>{"use strict";var e=He(),t=Mt(),i=Hi(),r=o1();e({target:"Date",proto:!0,arity:1,forced:t((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=i(this),n=r(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}})})),iK=z(((e,t)=>{"use strict";var i=qr(),r=m2(),n=TypeError;t.exports=function(e){if(i(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw n("Incorrect hint");return r(this,e)}})),aK=z((()=>{var e=_i(),t=Cn(),i=iK(),r=fi()("toPrimitive"),n=Date.prototype;e(n,r)||t(n,r,i)})),uK=z((()=>{var e=Bt(),t=Cn(),i=Date.prototype,r="Invalid Date",n="toString",s=e(i[n]),a=e(i.getTime);String(new Date(NaN))!=r&&t(i,n,(function(){var e=a(this);return e==e?s(this):r}))})),pK=z((()=>{"use strict";var e=He(),t=Bt(),i=mi(),r=t("".charAt),n=t("".charCodeAt),s=t(/./.exec),a=t(1..toString),o=t("".toUpperCase),l=/[\w*+\-./@]/,h=function(e,t){for(var i=a(e,16);i.length{"use strict";var i=Bt(),r=ms(),n=ai(),s=_i(),a=Pd(),o=sv(),l=Function,h=i([].concat),u=i([].join),c={},p=function(e,t,i){if(!s(c,t)){for(var r=[],n=0;n{var e=He(),t=hL();e({target:"Function",proto:!0,forced:Function.bind!==t},{bind:t})})),bK=z((()=>{"use strict";var e=Ei(),t=ai(),i=ji(),r=Ao(),n=fi(),s=dw(),a=n("hasInstance"),o=Function.prototype;a in o||i.f(o,a,{value:s((function(i){if(!e(this)||!t(i))return!1;var n=this.prototype;if(!t(n))return i instanceof this;for(;i=r(i);)if(n===i)return!0;return!1}),a)})})),SK=z((()=>{var e=Ar(),t=Cm().EXISTS,i=Bt(),r=ji().f,n=Function.prototype,s=i(n.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,o=i(a.exec);e&&!t&&r(n,"name",{configurable:!0,get:function(){try{return o(a,s(this))[1]}catch(e){return""}}})})),wK=z((()=>{var e=He(),t=rr();e({global:!0,forced:t.globalThis!==t},{globalThis:t})})),RK=z((()=>{var e=rr();Xa()(e.JSON,"JSON",!0)})),lR=z(((e,t)=>{var i=Mt();t.exports=i((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))})),uR=z(((e,t)=>{var i=Mt(),r=ai(),n=ma(),s=lR(),a=Object.isExtensible,o=i((function(){a(1)}));t.exports=o||s?function(e){return!(!r(e)||s&&"ArrayBuffer"==n(e))&&(!a||a(e))}:a})),Gm=z(((e,t)=>{var i=Mt();t.exports=!i((function(){return Object.isExtensible(Object.preventExtensions({}))}))})),Gd=z(((e,t)=>{var i=He(),r=Bt(),n=ov(),s=ai(),a=_i(),o=ji().f,l=qh(),h=bw(),u=uR(),c=Mm(),p=Gm(),d=!1,f=c("meta"),m=0,g=function(e){o(e,f,{value:{objectID:"O"+m++,weakData:{}}})},y=t.exports={enable:function(){y.enable=function(){},d=!0;var e=l.f,t=r([].splice),n={};n[f]=1,e(n).length&&(l.f=function(i){for(var r=e(i),n=0,s=r.length;n{"use strict";var i=He(),r=rr(),n=Bt(),s=cv(),a=Cn(),o=Gd(),l=vc(),h=yc(),u=Ei(),c=ga(),p=ai(),d=Mt(),f=w1(),m=Xa(),g=Lm();t.exports=function(e,t,y){var v=-1!==e.indexOf("Map"),T=-1!==e.indexOf("Weak"),x=v?"set":"add",b=r[e],_=b&&b.prototype,E=b,w={},S=function(e){var t=n(_[e]);a(_,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(T&&!p(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return T&&!p(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(T&&!p(e))&&t(this,0===e?0:e)}:function(e,i){return t(this,0===e?0:e,i),this})};if(s(e,!u(b)||!(T||_.forEach&&!d((function(){(new b).entries().next()})))))E=y.getConstructor(t,e,v,x),o.enable();else if(s(e,!0)){var I=new E,M=I[x](T?{}:-0,1)!=I,A=d((function(){I.has(1)})),D=f((function(e){new b(e)})),O=!T&&d((function(){for(var e=new b,t=5;t--;)e[x](t,t);return!e.has(-0)}));D||((E=t((function(e,t){h(e,_);var i=g(new b,e,E);return c(t)||l(t,i[x],{that:i,AS_ENTRIES:v}),i}))).prototype=_,_.constructor=E),(A||O)&&(S("delete"),S("has"),v&&S("get")),(O||M)&&S(x),T&&_.clear&&delete _.clear}return w[e]=E,i({global:!0,constructor:!0,forced:E!=b},w),m(E,e),T||y.setStrong(E,e,v),E}})),EL=z(((e,t)=>{"use strict";var i=ji().f,r=Ya(),n=Ev(),s=pl(),a=yc(),o=ga(),l=vc(),h=zw(),u=D1(),c=Hm(),p=Ar(),d=Gd().fastKey,f=us(),m=f.set,g=f.getterFor;t.exports={getConstructor:function(e,t,h,u){var c=e((function(e,i){a(e,f),m(e,{type:t,index:r(null),first:void 0,last:void 0,size:0}),p||(e.size=0),o(i)||l(i,e[u],{that:e,AS_ENTRIES:h})})),f=c.prototype,y=g(t),v=function(e,t,i){var r,n,s=y(e),a=T(e,t);return a?a.value=i:(s.last=a={index:n=d(t,!0),key:t,value:i,previous:r=s.last,next:void 0,removed:!1},s.first||(s.first=a),r&&(r.next=a),p?s.size++:e.size++,"F"!==n&&(s.index[n]=a)),e},T=function(e,t){var i,r=y(e),n=d(t);if("F"!==n)return r.index[n];for(i=r.first;i;i=i.next)if(i.key==t)return i};return n(f,{clear:function(){for(var e=y(this),t=e.index,i=e.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=void 0),delete t[i.index],i=i.next;e.first=e.last=void 0,p?e.size=0:this.size=0},delete:function(e){var t=this,i=y(t),r=T(t,e);if(r){var n=r.next,s=r.previous;delete i.index[r.index],r.removed=!0,s&&(s.next=n),n&&(n.previous=s),i.first==r&&(i.first=n),i.last==r&&(i.last=s),p?i.size--:t.size--}return!!r},forEach:function(e){for(var t,i=y(this),r=s(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:i.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!T(this,e)}}),n(f,h?{get:function(e){var t=T(this,e);return t&&t.value},set:function(e,t){return v(this,0===e?0:e,t)}}:{add:function(e){return v(this,e=0===e?0:e,e)}}),p&&i(f,"size",{get:function(){return y(this).size}}),c},setStrong:function(e,t,i){var r=t+" Iterator",n=g(t),s=g(r);h(e,t,(function(e,t){m(this,{type:r,target:e,state:n(e),kind:t,last:void 0})}),(function(){for(var e=s(this),t=e.kind,i=e.last;i&&i.removed;)i=i.previous;return e.target&&(e.last=i=i?i.next:e.state.first)?u("keys"==t?i.key:"values"==t?i.value:[i.key,i.value],!1):(e.target=void 0,u(void 0,!0))}),i?"entries":"values",!i,!0),c(t)}}})),VK=z((()=>{"use strict";F1()("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),EL())})),zK=z((()=>{VK()})),bL=z(((e,t)=>{var i=Math.log;t.exports=Math.log1p||function(e){var t=+e;return t>-1e-8&&t<1e-8?t-t*t/2:i(1+t)}})),qK=z((()=>{var e=He(),t=bL(),i=Math.acosh,r=Math.log,n=Math.sqrt,s=Math.LN2;e({target:"Math",stat:!0,forced:!i||710!=Math.floor(i(Number.MAX_VALUE))||i(1/0)!=1/0},{acosh:function(e){var i=+e;return i<1?NaN:i>94906265.62425156?r(i)+s:t(i-1+n(i-1)*n(i+1))}})})),$K=z((()=>{var e=He(),t=Math.asinh,i=Math.log,r=Math.sqrt;e({target:"Math",stat:!0,forced:!(t&&1/t(0)>0)},{asinh:function e(t){var n=+t;return isFinite(n)&&0!=n?n<0?-e(-n):i(n+r(n*n+1)):n}})})),ZK=z((()=>{var e=He(),t=Math.atanh,i=Math.log;e({target:"Math",stat:!0,forced:!(t&&1/t(-0)<0)},{atanh:function(e){var t=+e;return 0==t?t:i((1+t)/(1-t))/2}})})),pR=z(((e,t)=>{t.exports=Math.sign||function(e){var t=+e;return 0==t||t!=t?t:t<0?-1:1}})),QK=z((()=>{var e=He(),t=pR(),i=Math.abs,r=Math.pow;e({target:"Math",stat:!0},{cbrt:function(e){var n=+e;return t(n)*r(i(n),1/3)}})})),eZ=z((()=>{var e=He(),t=Math.floor,i=Math.log,r=Math.LOG2E;e({target:"Math",stat:!0},{clz32:function(e){var n=e>>>0;return n?31-t(i(n+.5)*r):32}})})),B1=z(((e,t)=>{var i=Math.expm1,r=Math.exp;t.exports=!i||i(10)>22025.465794806718||i(10)<22025.465794806718||-2e-17!=i(-2e-17)?function(e){var t=+e;return 0==t?t:t>-1e-6&&t<1e-6?t+t*t/2:r(t)-1}:i})),iZ=z((()=>{var e=He(),t=B1(),i=Math.cosh,r=Math.abs,n=Math.E;e({target:"Math",stat:!0,forced:!i||i(710)===1/0},{cosh:function(e){var i=t(r(e)-1)+1;return(i+1/(i*n*n))*(n/2)}})})),sZ=z((()=>{var e=He(),t=B1();e({target:"Math",stat:!0,forced:t!=Math.expm1},{expm1:t})})),oZ=z(((e,t)=>{var i=pR(),r=Math.abs,n=Math.pow,s=n(2,-52),a=n(2,-23),o=n(2,127)*(2-a),l=n(2,-126);t.exports=Math.fround||function(e){var t,n,h=+e,u=r(h),c=i(h);return uo||n!=n?c*(1/0):c*n}})),lZ=z((()=>{He()({target:"Math",stat:!0},{fround:oZ()})})),uZ=z((()=>{var e=He(),t=Math.hypot,i=Math.abs,r=Math.sqrt;e({target:"Math",stat:!0,arity:2,forced:!!t&&t(1/0,NaN)!==1/0},{hypot:function(e,t){for(var n,s,a=0,o=0,l=arguments.length,h=0;o0?a+=(s=n/h)*s:a+=n;return h===1/0?1/0:h*r(a)}})})),pZ=z((()=>{var e=He(),t=Mt(),i=Math.imul;e({target:"Math",stat:!0,forced:t((function(){return-5!=i(4294967295,5)||2!=i.length}))},{imul:function(e,t){var i=65535,r=+e,n=+t,s=i&r,a=i&n;return 0|s*a+((i&r>>>16)*a+s*(i&n>>>16)<<16>>>0)}})})),wL=z(((e,t)=>{var i=Math.log,r=Math.LOG10E;t.exports=Math.log10||function(e){return i(e)*r}})),fZ=z((()=>{He()({target:"Math",stat:!0},{log10:wL()})})),mZ=z((()=>{He()({target:"Math",stat:!0},{log1p:bL()})})),gZ=z((()=>{var e=He(),t=Math.log,i=Math.LN2;e({target:"Math",stat:!0},{log2:function(e){return t(e)/i}})})),vZ=z((()=>{He()({target:"Math",stat:!0},{sign:pR()})})),EZ=z((()=>{var e=He(),t=Mt(),i=B1(),r=Math.abs,n=Math.exp,s=Math.E;e({target:"Math",stat:!0,forced:t((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){var t=+e;return r(t)<1?(i(t)-i(-t))/2:(n(t-1)-n(-t-1))*(s/2)}})})),IZ=z((()=>{var e=He(),t=B1(),i=Math.exp;e({target:"Math",stat:!0},{tanh:function(e){var r=+e,n=t(r),s=t(-r);return n==1/0?1:s==1/0?-1:(n-s)/(i(r)+i(-r))}})})),_Z=z((()=>{Xa()(Math,"Math",!0)})),SZ=z((()=>{He()({target:"Math",stat:!0},{trunc:A2()})})),k1=z(((e,t)=>{var i=Bt();t.exports=i(1..valueOf)})),G1=z(((e,t)=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"})),Vm=z(((e,t)=>{var i=Bt(),r=cs(),n=mi(),s=G1(),a=i("".replace),o="["+s+"]",l=RegExp("^"+o+o+"*"),h=RegExp(o+o+"*$"),u=function(e){return function(t){var i=n(r(t));return 1&e&&(i=a(i,l,"")),2&e&&(i=a(i,h,"")),i}};t.exports={start:u(1),end:u(2),trim:u(3)}})),FZ=z((()=>{"use strict";var e=He(),t=Gn(),i=Ar(),r=rr(),n=xw(),s=Bt(),a=cv(),o=_i(),l=Lm(),h=Do(),u=Dd(),c=o1(),p=Mt(),d=qh().f,f=Hs().f,m=ji().f,g=k1(),y=Vm().trim,v="Number",T=r[v],x=n[v],b=T.prototype,_=r.TypeError,E=s("".slice),w=s("".charCodeAt),S=function(e){var t=c(e,"number");return"bigint"==typeof t?t:I(t)},I=function(e){var t,i,r,n,s,a,o,l,h=c(e,"number");if(u(h))throw _("Cannot convert a Symbol value to a number");if("string"==typeof h&&h.length>2)if(h=y(h),43===(t=w(h,0))||45===t){if(88===(i=w(h,2))||120===i)return NaN}else if(48===t){switch(w(h,1)){case 66:case 98:r=2,n=49;break;case 79:case 111:r=8,n=55;break;default:return+h}for(a=(s=E(h,2)).length,o=0;on)return NaN;return parseInt(s,r)}return+h},M=a(v,!T(" 0o1")||!T("0b1")||T("+0x1")),A=function(e){return h(b,e)&&p((function(){g(e)}))},D=function(e){var t=arguments.length<1?0:T(S(e));return A(this)?l(Object(t),this,D):t};D.prototype=b,M&&!t&&(b.constructor=D),e({global:!0,constructor:!0,wrap:!0,forced:M},{Number:D});var O=function(e,t){for(var r,n=i?d(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),s=0;n.length>s;s++)o(t,r=n[s])&&!o(e,r)&&m(e,r,f(t,r))};t&&x&&O(n[v],x),(M||t)&&O(n[v],T)})),HZ=z((()=>{He()({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})})),BZ=z(((e,t)=>{var i=rr().isFinite;t.exports=Number.isFinite||function(e){return"number"==typeof e&&i(e)}})),kZ=z((()=>{He()({target:"Number",stat:!0},{isFinite:BZ()})})),yR=z(((e,t)=>{var i=ai(),r=Math.floor;t.exports=Number.isInteger||function(e){return!i(e)&&isFinite(e)&&r(e)===e}})),VZ=z((()=>{He()({target:"Number",stat:!0},{isInteger:yR()})})),zZ=z((()=>{He()({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})})),jZ=z((()=>{var e=He(),t=yR(),i=Math.abs;e({target:"Number",stat:!0},{isSafeInteger:function(e){return t(e)&&i(e)<=9007199254740991}})})),WZ=z((()=>{He()({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})})),qZ=z((()=>{He()({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})})),OL=z(((e,t)=>{var i=rr(),r=Mt(),n=Bt(),s=mi(),a=Vm().trim,o=G1(),l=n("".charAt),h=i.parseFloat,u=i.Symbol,c=u&&u.iterator,p=1/h(o+"-0")!=-1/0||c&&!r((function(){h(Object(c))}));t.exports=p?function(e){var t=a(s(e)),i=h(t);return 0===i&&"-"==l(t,0)?-0:i}:h})),JZ=z((()=>{var e=He(),t=OL();e({target:"Number",stat:!0,forced:Number.parseFloat!=t},{parseFloat:t})})),PL=z(((e,t)=>{var i=rr(),r=Mt(),n=Bt(),s=mi(),a=Vm().trim,o=G1(),l=i.parseInt,h=i.Symbol,u=h&&h.iterator,c=/^[+-]?0x/i,p=n(c.exec),d=8!==l(o+"08")||22!==l(o+"0x16")||u&&!r((function(){l(Object(u))}));t.exports=d?function(e,t){var i=a(s(e));return l(i,t>>>0||(p(c,i)?16:10))}:l})),aJ=z((()=>{var e=He(),t=PL();e({target:"Number",stat:!0,forced:Number.parseInt!=t},{parseInt:t})})),hJ=z((()=>{"use strict";var e=He(),t=Bt(),i=gs(),r=k1(),n=N1(),s=wL(),a=Mt(),o=RangeError,l=String,h=isFinite,u=Math.abs,c=Math.floor,p=Math.pow,d=Math.round,f=t(1..toExponential),m=t(n),g=t("".slice),y="-6.9000e-11"===f(-69e-12,4)&&"1.25e+0"===f(1.255,2)&&"1.235e+4"===f(12345,3)&&"3e+1"===f(25,0),v=a((function(){f(1,1/0)}))&&a((function(){f(1,-1/0)})),T=!a((function(){f(1/0,1/0)}))&&!a((function(){f(NaN,1/0)}));e({target:"Number",proto:!0,forced:!y||!v||!T},{toExponential:function(e){var t=r(this);if(void 0===e)return f(t);var n=i(e);if(!h(t))return String(t);if(n<0||n>20)throw o("Incorrect fraction digits");if(y)return f(t,n);var a="",v="",T=0,x="",b="";if(t<0&&(a="-",t=-t),0===t)T=0,v=m("0",n+1);else{var _=s(t);T=c(_);var E=0,w=p(10,T-n);2*t>=(2*(E=d(t/w))+1)*w&&(E+=1),E>=p(10,n+1)&&(E/=10,T+=1),v=l(E)}return 0!==n&&(v=g(v,0,1)+"."+g(v,1)),0===T?(x="+",b="0"):(x=T>0?"+":"-",b=l(u(T))),a+(v+="e"+x+b)}})})),vJ=z((()=>{"use strict";var e=He(),t=Bt(),i=gs(),r=k1(),n=N1(),s=Mt(),a=RangeError,o=String,l=Math.floor,h=t(n),u=t("".slice),c=t(1..toFixed),p=function(e,t,i){return 0===t?i:t%2==1?p(e,t-1,i*e):p(e*e,t/2,i)},d=function(e,t,i){for(var r=-1,n=i;++r<6;)n+=t*e[r],e[r]=n%1e7,n=l(n/1e7)},f=function(e,t){for(var i=6,r=0;--i>=0;)r+=e[i],e[i]=l(r/t),r=r%t*1e7},m=function(e){for(var t=6,i="";--t>=0;)if(""!==i||0===t||0!==e[t]){var r=o(e[t]);i=""===i?r:i+h("0",7-r.length)+r}return i};e({target:"Number",proto:!0,forced:s((function(){return"0.000"!==c(8e-5,3)||"1"!==c(.9,0)||"1.25"!==c(1.255,2)||"1000000000000000128"!==c(0xde0b6b3a7640080,0)}))||!s((function(){c({})}))},{toFixed:function(e){var t,n,s,l,c=r(this),g=i(e),y=[0,0,0,0,0,0],v="",T="0";if(g<0||g>20)throw a("Incorrect fraction digits");if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return o(c);if(c<0&&(v="-",c=-c),c>1e-21)if(t=function(e){for(var t=0,i=e;i>=4096;)t+=12,i/=4096;for(;i>=2;)t+=1,i/=2;return t}(c*p(2,69,1))-69,n=t<0?c*p(2,-t,1):c/p(2,t,1),n*=4503599627370496,(t=52-t)>0){for(d(y,0,n),s=g;s>=7;)d(y,1e7,0),s-=7;for(d(y,p(10,s,1),0),s=t-1;s>=23;)f(y,1<<23),s-=23;f(y,1<0?T=v+((l=T.length)<=g?"0."+h("0",g-l)+T:u(T,0,l-g)+"."+u(T,l-g)):T=v+T,T}})})),EJ=z((()=>{"use strict";var e=He(),t=Bt(),i=Mt(),r=k1(),n=t(1..toPrecision);e({target:"Number",proto:!0,forced:i((function(){return"1"!==n(1,void 0)}))||!i((function(){n({})}))},{toPrecision:function(e){return void 0===e?n(r(this)):n(r(this),e)}})})),BL=z(((e,t)=>{"use strict";var i=Ar(),r=Bt(),n=si(),s=Mt(),a=uv(),o=h1(),l=a1(),h=Hi(),u=Sm(),c=Object.assign,p=Object.defineProperty,d=r([].concat);t.exports=!c||s((function(){if(i&&1!==c({b:1},c(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=c({},e)[r]||a(c({},t)).join("")!=n}))?function(e,t){for(var r=h(e),s=arguments.length,c=1,p=o.f,f=l.f;s>c;)for(var m,g=u(arguments[c++]),y=p?d(a(g),p(g)):a(g),v=y.length,T=0;v>T;)m=y[T++],(!i||n(f,g,m))&&(r[m]=g[m]);return r}:c})),SJ=z((()=>{var e=He(),t=BL();e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t})})),wJ=z((()=>{He()({target:"Object",stat:!0,sham:!Ar()},{create:Ya()})})),W1=z(((e,t)=>{"use strict";var i=Gn(),r=rr(),n=Mt(),s=Yw();t.exports=i||!n((function(){if(!(s&&s<535)){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete r[e]}}))})),DJ=z((()=>{"use strict";var e=He(),t=Ar(),i=W1(),r=ms(),n=Hi(),s=ji();t&&e({target:"Object",proto:!0,forced:i},{__defineGetter__:function(e,t){s.f(n(this),e,{get:r(t),enumerable:!0,configurable:!0})}})})),AJ=z((()=>{var e=He(),t=Ar(),i=yw().f;e({target:"Object",stat:!0,forced:Object.defineProperties!==i,sham:!t},{defineProperties:i})})),PJ=z((()=>{var e=He(),t=Ar(),i=ji().f;e({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!t},{defineProperty:i})})),NJ=z((()=>{"use strict";var e=He(),t=Ar(),i=W1(),r=ms(),n=Hi(),s=ji();t&&e({target:"Object",proto:!0,forced:i},{__defineSetter__:function(e,t){s.f(n(this),e,{set:r(t),enumerable:!0,configurable:!0})}})})),kL=z(((e,t)=>{var i=Ar(),r=Bt(),n=uv(),s=va(),a=r(a1().f),o=r([].push),l=function(e){return function(t){for(var r,l=s(t),h=n(l),u=h.length,c=0,p=[];u>c;)r=h[c++],(!i||a(l,r))&&o(p,e?[r,l[r]]:l[r]);return p}};t.exports={entries:l(!0),values:l(!1)}})),UJ=z((()=>{var e=He(),t=kL().entries;e({target:"Object",stat:!0},{entries:function(e){return t(e)}})})),BJ=z((()=>{var e=He(),t=Gm(),i=Mt(),r=ai(),n=Gd().onFreeze,s=Object.freeze;e({target:"Object",stat:!0,forced:i((function(){s(1)})),sham:!t},{freeze:function(e){return s&&r(e)?s(n(e)):e}})})),kJ=z((()=>{var e=He(),t=vc(),i=Su();e({target:"Object",stat:!0},{fromEntries:function(e){var r={};return t(e,(function(e,t){i(r,e,t)}),{AS_ENTRIES:!0}),r}})})),zJ=z((()=>{var e=He(),t=Mt(),i=va(),r=Hs().f,n=Ar(),s=t((function(){r(1)}));e({target:"Object",stat:!0,forced:!n||s,sham:!n},{getOwnPropertyDescriptor:function(e,t){return r(i(e),t)}})})),jJ=z((()=>{var e=He(),t=Ar(),i=mw(),r=va(),n=Hs(),s=Su();e({target:"Object",stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t,a,o=r(e),l=n.f,h=i(o),u={},c=0;h.length>c;)void 0!==(a=l(o,t=h[c++]))&&s(u,t,a);return u}})})),WJ=z((()=>{var e=He(),t=Mt(),i=bw().f;e({target:"Object",stat:!0,forced:t((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})})),YJ=z((()=>{var e=He(),t=Mt(),i=Hi(),r=Ao(),n=Pw();e({target:"Object",stat:!0,forced:t((function(){r(1)})),sham:!n},{getPrototypeOf:function(e){return r(i(e))}})})),XJ=z((()=>{He()({target:"Object",stat:!0},{hasOwn:_i()})})),VL=z(((e,t)=>{t.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),KJ=z((()=>{He()({target:"Object",stat:!0},{is:VL()})})),JJ=z((()=>{var e=He(),t=uR();e({target:"Object",stat:!0,forced:Object.isExtensible!==t},{isExtensible:t})})),eQ=z((()=>{var e=He(),t=Mt(),i=ai(),r=ma(),n=lR(),s=Object.isFrozen;e({target:"Object",stat:!0,forced:t((function(){s(1)}))||n},{isFrozen:function(e){return!(i(e)&&(!n||"ArrayBuffer"!=r(e)))||!!s&&s(e)}})})),rQ=z((()=>{var e=He(),t=Mt(),i=ai(),r=ma(),n=lR(),s=Object.isSealed;e({target:"Object",stat:!0,forced:t((function(){s(1)}))||n},{isSealed:function(e){return!(i(e)&&(!n||"ArrayBuffer"!=r(e)))||!!s&&s(e)}})})),nQ=z((()=>{var e=He(),t=Hi(),i=uv();e({target:"Object",stat:!0,forced:Mt()((function(){i(1)}))},{keys:function(e){return i(t(e))}})})),sQ=z((()=>{"use strict";var e=He(),t=Ar(),i=W1(),r=Hi(),n=Wh(),s=Ao(),a=Hs().f;t&&e({target:"Object",proto:!0,forced:i},{__lookupGetter__:function(e){var t,i=r(this),o=n(e);do{if(t=a(i,o))return t.get}while(i=s(i))}})})),aQ=z((()=>{"use strict";var e=He(),t=Ar(),i=W1(),r=Hi(),n=Wh(),s=Ao(),a=Hs().f;t&&e({target:"Object",proto:!0,forced:i},{__lookupSetter__:function(e){var t,i=r(this),o=n(e);do{if(t=a(i,o))return t.set}while(i=s(i))}})})),oQ=z((()=>{var e=He(),t=ai(),i=Gd().onFreeze,r=Gm(),n=Mt(),s=Object.preventExtensions;e({target:"Object",stat:!0,forced:n((function(){s(1)})),sham:!r},{preventExtensions:function(e){return s&&t(e)?s(i(e)):e}})})),Vd=z(((e,t)=>{var i=dw(),r=ji();t.exports=function(e,t,n){return n.get&&i(n.get,t,{getter:!0}),n.set&&i(n.set,t,{setter:!0}),r.f(e,t,n)}})),mQ=z((()=>{"use strict";var e=Ar(),t=Vd(),i=ai(),r=Hi(),n=cs(),s=Object.getPrototypeOf,a=Object.setPrototypeOf,o=Object.prototype,l="__proto__";if(e&&s&&a&&!(l in o))try{t(o,l,{configurable:!0,get:function(){return s(r(this))},set:function(e){var t=n(this);!i(e)&&null!==e||!i(t)||a(t,e)}})}catch(e){}})),gQ=z((()=>{var e=He(),t=ai(),i=Gd().onFreeze,r=Gm(),n=Mt(),s=Object.seal;e({target:"Object",stat:!0,forced:n((function(){s(1)})),sham:!r},{seal:function(e){return s&&t(e)?s(i(e)):e}})})),vQ=z((()=>{He()({target:"Object",stat:!0},{setPrototypeOf:gc()})})),TQ=z(((e,t)=>{"use strict";var i=gw(),r=mc();t.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}})),EQ=z((()=>{var e=gw(),t=Cn(),i=TQ();e||t(Object.prototype,"toString",i,{unsafe:!0})})),bQ=z((()=>{var e=He(),t=kL().values;e({target:"Object",stat:!0},{values:function(e){return t(e)}})})),IQ=z((()=>{var e=He(),t=OL();e({global:!0,forced:parseFloat!=t},{parseFloat:t})})),SQ=z((()=>{var e=He(),t=PL();e({global:!0,forced:parseInt!=t},{parseInt:t})})),ip=z(((e,t)=>{var i=TypeError;t.exports=function(e,t){if(e{var i=bu();t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)})),X1=z(((e,t)=>{var i,r,n,s,a=rr(),o=Co(),l=pl(),h=Ei(),u=_i(),c=Mt(),p=L2(),d=Pd(),f=l1(),m=ip(),g=YL(),y=Mu(),v=a.setImmediate,T=a.clearImmediate,x=a.process,b=a.Dispatch,_=a.Function,E=a.MessageChannel,w=a.String,S=0,I={},M="onreadystatechange";try{i=a.location}catch(e){}var A=function(e){if(u(I,e)){var t=I[e];delete I[e],t()}},D=function(e){return function(){A(e)}},O=function(e){A(e.data)},R=function(e){a.postMessage(w(e),i.protocol+"//"+i.host)};(!v||!T)&&(v=function(e){m(arguments.length,1);var t=h(e)?e:_(e),i=d(arguments,1);return I[++S]=function(){o(t,void 0,i)},r(S),S},T=function(e){delete I[e]},y?r=function(e){x.nextTick(D(e))}:b&&b.now?r=function(e){b.now(D(e))}:E&&!g?(s=(n=new E).port2,n.port1.onmessage=O,r=l(s.postMessage,s)):a.addEventListener&&h(a.postMessage)&&!a.importScripts&&i&&"file:"!==i.protocol&&!c(R)?(r=R,a.addEventListener("message",O,!1)):r=M in f("script")?function(e){p.appendChild(f("script"))[M]=function(){p.removeChild(this),A(e)}}:function(e){setTimeout(D(e),0)}),t.exports={set:v,clear:T}})),HQ=z(((e,t)=>{var i=bu(),r=rr();t.exports=/ipad|iphone|ipod/i.test(i)&&void 0!==r.Pebble})),BQ=z(((e,t)=>{var i=bu();t.exports=/web0s(?!.*chrome)/i.test(i)})),aF=z(((e,t)=>{var i,r,n,s,a,o,l,h,u=rr(),c=pl(),p=Hs().f,d=X1().set,f=YL(),m=HQ(),g=BQ(),y=Mu(),v=u.MutationObserver||u.WebKitMutationObserver,T=u.document,x=u.process,b=u.Promise,_=p(u,"queueMicrotask"),E=_&&_.value;E||(i=function(){var e,t;for(y&&(e=x.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(e){throw r?s():n=void 0,e}}n=void 0,e&&e.enter()},f||y||g||!v||!T?!m&&b&&b.resolve?((l=b.resolve(void 0)).constructor=b,h=c(l.then,l),s=function(){h(i)}):y?s=function(){x.nextTick(i)}:(d=c(d,u),s=function(){d(i)}):(a=!0,o=T.createTextNode(""),new v(i).observe(o,{characterData:!0}),s=function(){o.data=a=!a})),t.exports=E||function(e){var t={fn:e,next:void 0};n&&(n.next=t),r||(r=t,s()),n=t}})),$Q=z(((e,t)=>{var i=rr();t.exports=function(e,t){var r=i.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}})),Av=z(((e,t)=>{t.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}})),QQ=z(((e,t)=>{var i=function(){this.head=null,this.tail=null};i.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},t.exports=i})),qm=z(((e,t)=>{var i=rr();t.exports=i.Promise})),_R=z(((e,t)=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version})),oF=z(((e,t)=>{var i=_R(),r=Mu();t.exports=!i&&!r&&"object"==typeof window&&"object"==typeof document})),Ov=z(((e,t)=>{var i=rr(),r=qm(),n=Ei(),s=cv(),a=lw(),o=fi(),l=oF(),h=_R(),u=Gn(),c=xu(),p=r&&r.prototype,d=o("species"),f=!1,m=n(i.PromiseRejectionEvent),g=s("Promise",(function(){var e=a(r),t=e!==String(r);if(!t&&66===c||u&&(!p.catch||!p.finally))return!0;if(!c||c<51||!/native code/.test(e)){var i=new r((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((i.constructor={})[d]=n,!(f=i.then((function(){}))instanceof n))return!0}return!t&&(l||h)&&!m}));t.exports={CONSTRUCTOR:g,REJECTION_EVENT:m,SUBCLASSING:f}})),zd=z(((e,t)=>{"use strict";var i=ms(),r=TypeError,n=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw r("Bad Promise constructor");t=e,n=i})),this.resolve=i(t),this.reject=i(n)};t.exports.f=function(e){return new n(e)}})),wee=z((()=>{"use strict";var e,t,i,r=He(),n=Gn(),s=Mu(),a=rr(),o=si(),l=Cn(),h=gc(),u=Xa(),c=Hm(),p=ms(),d=Ei(),f=ai(),m=yc(),g=Bm(),y=X1().set,v=aF(),T=$Q(),x=Av(),b=QQ(),_=us(),E=qm(),w=Ov(),S=zd(),I="Promise",M=w.CONSTRUCTOR,A=w.REJECTION_EVENT,D=w.SUBCLASSING,O=_.getterFor(I),R=_.set,C=E&&E.prototype,N=E,P=C,L=a.TypeError,F=a.document,U=a.process,k=S.f,B=k,H=!!(F&&F.createEvent&&a.dispatchEvent),G="unhandledrejection",z=function(e){var t;return!(!f(e)||!d(t=e.then))&&t},V=function(e,t){var i,r,n,s=t.value,a=1==t.state,l=a?e.ok:e.fail,h=e.resolve,u=e.reject,c=e.domain;try{l?(a||(2===t.rejection&&q(t),t.rejection=1),!0===l?i=s:(c&&c.enter(),i=l(s),c&&(c.exit(),n=!0)),i===e.promise?u(L("Promise-chain cycle")):(r=z(i))?o(r,i,h,u):h(i)):u(s)}catch(e){c&&!n&&c.exit(),u(e)}},j=function(e,t){e.notified||(e.notified=!0,v((function(){for(var i,r=e.reactions;i=r.get();)V(i,e);e.notified=!1,t&&!e.rejection&&Y(e)})))},W=function(e,t,i){var r,n;H?((r=F.createEvent("Event")).promise=t,r.reason=i,r.initEvent(e,!1,!0),a.dispatchEvent(r)):r={promise:t,reason:i},!A&&(n=a["on"+e])?n(r):e===G&&T("Unhandled promise rejection",i)},Y=function(e){o(y,a,(function(){var t,i=e.facade,r=e.value;if(X(e)&&(t=x((function(){s?U.emit("unhandledRejection",r,i):W(G,i,r)})),e.rejection=s||X(e)?2:1,t.error))throw t.value}))},X=function(e){return 1!==e.rejection&&!e.parent},q=function(e){o(y,a,(function(){var t=e.facade;s?U.emit("rejectionHandled",t):W("rejectionhandled",t,e.value)}))},Z=function(e,t,i){return function(r){e(t,r,i)}},K=function(e,t,i){e.done||(e.done=!0,i&&(e=i),e.value=t,e.state=2,j(e,!0))},J=function(e,t,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===t)throw L("Promise can't be resolved itself");var r=z(t);r?v((function(){var i={done:!1};try{o(r,t,Z(J,i,e),Z(K,i,e))}catch(t){K(i,t,e)}})):(e.value=t,e.state=1,j(e,!1))}catch(t){K({done:!1},t,e)}}};if(M&&(P=(N=function(t){m(this,P),p(t),o(e,this);var i=O(this);try{t(Z(J,i),Z(K,i))}catch(e){K(i,e)}}).prototype,(e=function(e){R(this,{type:I,done:!1,notified:!1,parent:!1,reactions:new b,rejection:!1,state:0,value:void 0})}).prototype=l(P,"then",(function(e,t){var i=O(this),r=k(g(this,N));return i.parent=!0,r.ok=!d(e)||e,r.fail=d(t)&&t,r.domain=s?U.domain:void 0,0==i.state?i.reactions.add(r):v((function(){V(r,i)})),r.promise})),t=function(){var t=new e,i=O(t);this.promise=t,this.resolve=Z(J,i),this.reject=Z(K,i)},S.f=k=function(e){return e===N||undefined===e?new t(e):B(e)},!n&&d(E)&&C!==Object.prototype)){i=C.then,D||l(C,"then",(function(e,t){var r=this;return new N((function(e,t){o(i,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete C.constructor}catch(e){}h&&h(C,P)}r({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:N}),u(N,I,!1,!0),c(I)})),yF=z(((e,t)=>{var i=qm(),r=w1(),n=Ov().CONSTRUCTOR;t.exports=n||!r((function(e){i.all(e).then(void 0,(function(){}))}))})),Mee=z((()=>{"use strict";var e=He(),t=si(),i=ms(),r=zd(),n=Av(),s=vc();e({target:"Promise",stat:!0,forced:yF()},{all:function(e){var a=this,o=r.f(a),l=o.resolve,h=o.reject,u=n((function(){var r=i(a.resolve),n=[],o=0,u=1;s(e,(function(e){var i=o++,s=!1;u++,t(r,a,e).then((function(e){s||(s=!0,n[i]=e,--u||l(n))}),h)})),--u||l(n)}));return u.error&&h(u.value),o.promise}})})),Cee=z((()=>{"use strict";var e,t=He(),i=Gn(),r=Ov().CONSTRUCTOR,n=qm(),s=In(),a=Ei(),o=Cn(),l=n&&n.prototype;t({target:"Promise",proto:!0,forced:r,real:!0},{catch:function(e){return this.then(void 0,e)}}),!i&&a(n)&&(e=s("Promise").prototype.catch,l.catch!==e&&o(l,"catch",e,{unsafe:!0}))})),Aee=z((()=>{"use strict";var e=He(),t=si(),i=ms(),r=zd(),n=Av(),s=vc();e({target:"Promise",stat:!0,forced:yF()},{race:function(e){var a=this,o=r.f(a),l=o.reject,h=n((function(){var r=i(a.resolve);s(e,(function(e){t(r,a,e).then(o.resolve,l)}))}));return h.error&&l(h.value),o.promise}})})),Oee=z((()=>{"use strict";var e=He(),t=si(),i=zd();e({target:"Promise",stat:!0,forced:Ov().CONSTRUCTOR},{reject:function(e){var r=i.f(this);return t(r.reject,void 0,e),r.promise}})})),bF=z(((e,t)=>{var i=qr(),r=ai(),n=zd();t.exports=function(e,t){if(i(e),r(t)&&t.constructor===e)return t;var s=n.f(e);return(0,s.resolve)(t),s.promise}})),Fee=z((()=>{"use strict";var e=He(),t=In(),i=Gn(),r=qm(),n=Ov().CONSTRUCTOR,s=bF(),a=t("Promise"),o=i&&!n;e({target:"Promise",stat:!0,forced:i||n},{resolve:function(e){return s(o&&this===a?r:this,e)}})})),Hee=z((()=>{wee(),Mee(),Cee(),Aee(),Oee(),Fee()})),Uee=z((()=>{"use strict";var e=He(),t=si(),i=ms(),r=zd(),n=Av(),s=vc();e({target:"Promise",stat:!0},{allSettled:function(e){var a=this,o=r.f(a),l=o.resolve,h=o.reject,u=n((function(){var r=i(a.resolve),n=[],o=0,h=1;s(e,(function(e){var i=o++,s=!1;h++,t(r,a,e).then((function(e){s||(s=!0,n[i]={status:"fulfilled",value:e},--h||l(n))}),(function(e){s||(s=!0,n[i]={status:"rejected",reason:e},--h||l(n))}))})),--h||l(n)}));return u.error&&h(u.value),o.promise}})})),kee=z((()=>{"use strict";var e=He(),t=si(),i=ms(),r=In(),n=zd(),s=Av(),a=vc(),o="No one promise resolved";e({target:"Promise",stat:!0},{any:function(e){var l=this,h=r("AggregateError"),u=n.f(l),c=u.resolve,p=u.reject,d=s((function(){var r=i(l.resolve),n=[],s=0,u=1,d=!1;a(e,(function(e){var i=s++,a=!1;u++,t(r,l,e).then((function(e){a||d||(d=!0,c(e))}),(function(e){a||d||(a=!0,n[i]=e,--u||p(new h(n,o)))}))})),--u||p(new h(n,o))}));return d.error&&p(d.value),u.promise}})})),jee=z((()=>{"use strict";var e,t=He(),i=Gn(),r=qm(),n=Mt(),s=In(),a=Ei(),o=Bm(),l=bF(),h=Cn(),u=r&&r.prototype;t({target:"Promise",proto:!0,real:!0,forced:!!r&&n((function(){u.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=o(this,s("Promise")),i=a(e);return this.then(i?function(i){return l(t,e()).then((function(){return i}))}:e,i?function(i){return l(t,e()).then((function(){throw i}))}:e)}}),!i&&a(r)&&(e=s("Promise").prototype.finally,u.finally!==e&&h(u,"finally",e,{unsafe:!0}))})),Wee=z((()=>{var e=He(),t=Co(),i=ms(),r=qr();e({target:"Reflect",stat:!0,forced:!Mt()((function(){Reflect.apply((function(){}))}))},{apply:function(e,n,s){return t(i(e),n,r(s))}})})),Jee=z((()=>{var e=He(),t=In(),i=Co(),r=hL(),n=aR(),s=qr(),a=ai(),o=Ya(),l=Mt(),h=t("Reflect","construct"),u=Object.prototype,c=[].push,p=l((function(){function e(){}return!(h((function(){}),[],e)instanceof e)})),d=!l((function(){h((function(){}))})),f=p||d;e({target:"Reflect",stat:!0,forced:f,sham:f},{construct:function(e,t){n(e),s(t);var l=arguments.length<3?e:n(arguments[2]);if(d&&!p)return h(e,t,l);if(e==l){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var f=[null];return i(c,f,t),new(i(r,e,f))}var m=l.prototype,g=o(a(m)?m:u),y=i(e,g,t);return a(y)?y:g}})})),tte=z((()=>{var e=He(),t=Ar(),i=qr(),r=Wh(),n=ji();e({target:"Reflect",stat:!0,forced:Mt()((function(){Reflect.defineProperty(n.f({},1,{value:1}),1,{value:2})})),sham:!t},{defineProperty:function(e,t,s){i(e);var a=r(t);i(s);try{return n.f(e,a,s),!0}catch(e){return!1}}})})),rte=z((()=>{var e=He(),t=qr(),i=Hs().f;e({target:"Reflect",stat:!0},{deleteProperty:function(e,r){var n=i(t(e),r);return!(n&&!n.configurable)&&delete e[r]}})})),wF=z(((e,t)=>{var i=_i();t.exports=function(e){return void 0!==e&&(i(e,"value")||i(e,"writable"))}})),ate=z((()=>{var e=He(),t=si(),i=ai(),r=qr(),n=wF(),s=Hs(),a=Ao();e({target:"Reflect",stat:!0},{get:function e(o,l){var h,u,c=arguments.length<3?o:arguments[2];return r(o)===c?o[l]:(h=s.f(o,l))?n(h)?h.value:void 0===h.get?void 0:t(h.get,c):i(u=a(o))?e(u,l,c):void 0}})})),ote=z((()=>{var e=He(),t=Ar(),i=qr(),r=Hs();e({target:"Reflect",stat:!0,sham:!t},{getOwnPropertyDescriptor:function(e,t){return r.f(i(e),t)}})})),lte=z((()=>{var e=He(),t=qr(),i=Ao();e({target:"Reflect",stat:!0,sham:!Pw()},{getPrototypeOf:function(e){return i(t(e))}})})),cte=z((()=>{He()({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})})),ute=z((()=>{var e=He(),t=qr(),i=uR();e({target:"Reflect",stat:!0},{isExtensible:function(e){return t(e),i(e)}})})),hte=z((()=>{He()({target:"Reflect",stat:!0},{ownKeys:mw()})})),pte=z((()=>{var e=He(),t=In(),i=qr();e({target:"Reflect",stat:!0,sham:!Gm()},{preventExtensions:function(e){i(e);try{var r=t("Object","preventExtensions");return r&&r(e),!0}catch(e){return!1}}})})),vte=z((()=>{var e=He(),t=si(),i=qr(),r=ai(),n=wF(),s=Mt(),a=ji(),o=Hs(),l=Ao(),h=Mo();e({target:"Reflect",stat:!0,forced:s((function(){var e=function(){},t=a.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)}))},{set:function e(s,u,c){var p,d,f,m=arguments.length<4?s:arguments[3],g=o.f(i(s),u);if(!g){if(r(d=l(s)))return e(d,u,c,m);g=h(0)}if(n(g)){if(!1===g.writable||!r(m))return!1;if(p=o.f(m,u)){if(p.get||p.set||!1===p.writable)return!1;p.value=c,a.f(m,u,p)}else a.f(m,u,h(0,c))}else{if(void 0===(f=g.set))return!1;t(f,m,c)}return!0}})})),Tte=z((()=>{var e=He(),t=qr(),i=sN(),r=gc();r&&e({target:"Reflect",stat:!0},{setPrototypeOf:function(e,n){t(e),i(n);try{return r(e,n),!0}catch(e){return!1}}})})),Ete=z((()=>{var e=He(),t=rr(),i=Xa();e({global:!0},{Reflect:{}}),i(t.Reflect,"Reflect",!0)})),Hv=z(((e,t)=>{var i=ai(),r=ma(),n=fi()("match");t.exports=function(e){var t;return i(e)&&(void 0!==(t=e[n])?!!t:"RegExp"==r(e))}})),OR=z(((e,t)=>{"use strict";var i=qr();t.exports=function(){var e=i(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}})),Uv=z(((e,t)=>{var i=si(),r=_i(),n=Do(),s=OR(),a=RegExp.prototype;t.exports=function(e){var t=e.flags;return void 0!==t||"flags"in a||r(e,"flags")||!n(a,e)?t:i(s,e)}})),J1=z(((e,t)=>{var i=Mt(),r=rr().RegExp,n=i((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),s=n||i((function(){return!r("a","y").sticky})),a=n||i((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:n}})),PR=z(((e,t)=>{var i=Mt(),r=rr().RegExp;t.exports=i((function(){var e=r(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))})),AF=z(((e,t)=>{var i=Mt(),r=rr().RegExp;t.exports=i((function(){var e=r("(?
b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")}))})),Fte=z((()=>{var e,t,i,r=Ar(),n=rr(),s=Bt(),a=cv(),o=Lm(),l=ya(),h=qh().f,u=Do(),c=Hv(),p=mi(),d=Uv(),f=J1(),m=aN(),g=Cn(),y=Mt(),v=_i(),T=us().enforce,x=Hm(),b=fi(),_=PR(),E=AF(),w=b("match"),S=n.RegExp,I=S.prototype,M=n.SyntaxError,A=s(I.exec),D=s("".charAt),O=s("".replace),R=s("".indexOf),C=s("".slice),N=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,P=/a/g,L=/a/g,F=new S(P)!==P,U=f.MISSED_STICKY,k=f.UNSUPPORTED_Y,B=r&&(!F||U||_||E||y((function(){return L[w]=!1,S(P)!=P||S(L)==L||"/a/i"!=S(P,"i")})));if(a("RegExp",B)){for(e=function(t,i){var r,n,s,a,h,f,m=u(I,this),g=c(t),y=void 0===i,x=[],b=t;if(!m&&g&&y&&t.constructor===e)return t;if((g||u(I,t))&&(t=t.source,y&&(i=d(b))),t=void 0===t?"":p(t),i=void 0===i?"":p(i),b=t,_&&"dotAll"in P&&((n=!!i&&R(i,"s")>-1)&&(i=O(i,/s/g,""))),r=i,U&&"sticky"in P&&((s=!!i&&R(i,"y")>-1)&&k&&(i=O(i,/y/g,""))),E&&(a=function(e){for(var t,i=e.length,r=0,n="",s=[],a={},o=!1,l=!1,h=0,u="";r<=i;r++){if("\\"===(t=D(e,r)))t+=D(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:A(N,C(e,r+1))&&(r+=2,l=!0),n+=t,h++;continue;case">"===t&&l:if(""===u||v(a,u))throw new M("Invalid capture group name");a[u]=!0,s[s.length]=[u,h],l=!1,u="";continue}l?u+=t:n+=t}return[n,s]}(t),t=a[0],x=a[1]),h=o(S(t,i),m?this:I,e),(n||s||x.length)&&(f=T(h),n&&(f.dotAll=!0,f.raw=e(function(e){for(var t,i=e.length,r=0,n="",s=!1;r<=i;r++)"\\"!==(t=D(e,r))?s||"."!==t?("["===t?s=!0:"]"===t&&(s=!1),n+=t):n+="[\\s\\S]":n+=t+D(e,++r);return n}(t),r)),s&&(f.sticky=!0),x.length&&(f.groups=x)),t!==b)try{l(h,"source",""===b?"(?:)":b)}catch(e){}return h},t=h(S),i=0;t.length>i;)m(e,S,t[i++]);I.constructor=e,e.prototype=I,g(n,"RegExp",e,{constructor:!0})}x("RegExp")})),Ute=z((()=>{var e=Ar(),t=PR(),i=ma(),r=Vd(),n=us().get,s=RegExp.prototype,a=TypeError;e&&t&&r(s,"dotAll",{configurable:!0,get:function(){if(this!==s){if("RegExp"===i(this))return!!n(this).dotAll;throw a("Incompatible receiver, RegExp required")}}})})),eb=z(((e,t)=>{"use strict";var i,r,n=si(),s=Bt(),a=mi(),o=OR(),l=J1(),h=Rm(),u=Ya(),c=us().get,p=PR(),d=AF(),f=h("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,g=m,y=s("".charAt),v=s("".indexOf),T=s("".replace),x=s("".slice),b=(r=/b*/g,n(m,i=/a/,"a"),n(m,r,"a"),0!==i.lastIndex||0!==r.lastIndex),_=l.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];(b||E||_||p||d)&&(g=function(e){var t,i,r,s,l,h,p,d=this,w=c(d),S=a(e),I=w.raw;if(I)return I.lastIndex=d.lastIndex,t=n(g,I,S),d.lastIndex=I.lastIndex,t;var M=w.groups,A=_&&d.sticky,D=n(o,d),O=d.source,R=0,C=S;if(A&&(D=T(D,"y",""),-1===v(D,"g")&&(D+="g"),C=x(S,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==y(S,d.lastIndex-1))&&(O="(?: "+O+")",C=" "+C,R++),i=new RegExp("^(?:"+O+")",D)),E&&(i=new RegExp("^"+O+"$(?!\\s)",D)),b&&(r=d.lastIndex),s=n(m,A?i:d,C),A?s?(s.input=x(s.input,R),s[0]=x(s[0],R),s.index=d.lastIndex,d.lastIndex+=s[0].length):d.lastIndex=0:b&&s&&(d.lastIndex=d.global?s.index+s[0].length:r),E&&s&&s.length>1&&n(f,s[0],i,(function(){for(l=1;l{"use strict";var e=He(),t=eb();e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t})})),jte=z((()=>{var e=rr(),t=Ar(),i=Vd(),r=OR(),n=Mt(),s=e.RegExp,a=s.prototype;t&&n((function(){var e=!0;try{s(".","d")}catch(t){e=!1}var t={},i="",r=e?"dgimsy":"gimsy",n=function(e,r){Object.defineProperty(t,e,{get:function(){return i+=r,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var l in e&&(o.hasIndices="d"),o)n(l,o[l]);return Object.getOwnPropertyDescriptor(a,"flags").get.call(t)!==r||i!==r}))&&i(a,"flags",{configurable:!0,get:r})})),qte=z((()=>{var e=Ar(),t=J1().MISSED_STICKY,i=ma(),r=Vd(),n=us().get,s=RegExp.prototype,a=TypeError;e&&t&&r(s,"sticky",{configurable:!0,get:function(){if(this!==s){if("RegExp"===i(this))return!!n(this).sticky;throw a("Incompatible receiver, RegExp required")}}})})),$te=z((()=>{"use strict";HR();var e,t,i=He(),r=si(),n=Ei(),s=qr(),a=mi(),o=(e=!1,(t=/[ac]/).exec=function(){return e=!0,/./.exec.apply(this,arguments)},!0===t.test("abc")&&e),l=/./.test;i({target:"RegExp",proto:!0,forced:!o},{test:function(e){var t=s(this),i=a(e),o=t.exec;if(!n(o))return r(l,t,i);var h=r(o,t,i);return null!==h&&(s(h),!0)}})})),Jte=z((()=>{"use strict";var e=Cm().PROPER,t=Cn(),i=qr(),r=mi(),n=Mt(),s=Uv(),a="toString",o=RegExp.prototype[a],l=n((function(){return"/a/b"!=o.call({source:"a",flags:"b"})})),h=e&&o.name!=a;(l||h)&&t(RegExp.prototype,a,(function(){var e=i(this);return"/"+r(e.source)+"/"+r(s(e))}),{unsafe:!0})})),Qte=z((()=>{"use strict";F1()("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),EL())})),ere=z((()=>{Qte()})),tre=z((()=>{"use strict";var e=He(),t=Bt(),i=cs(),r=gs(),n=mi(),s=Mt(),a=t("".charAt);e({target:"String",proto:!0,forced:s((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(e){var t=n(i(this)),s=t.length,o=r(e),l=o>=0?o:s+o;return l<0||l>=s?void 0:a(t,l)}})})),tb=z(((e,t)=>{var i=Bt(),r=gs(),n=mi(),s=cs(),a=i("".charAt),o=i("".charCodeAt),l=i("".slice),h=function(e){return function(t,i){var h,u,c=n(s(t)),p=r(i),d=c.length;return p<0||p>=d?e?"":void 0:(h=o(c,p))<55296||h>56319||p+1===d||(u=o(c,p+1))<56320||u>57343?e?a(c,p):h:e?l(c,p,p+2):u-56320+(h-55296<<10)+65536}};t.exports={codeAt:h(!1),charAt:h(!0)}})),sre=z((()=>{"use strict";var e=He(),t=tb().codeAt;e({target:"String",proto:!0},{codePointAt:function(e){return t(this,e)}})})),UR=z(((e,t)=>{var i=Hv(),r=TypeError;t.exports=function(e){if(i(e))throw r("The method doesn't accept regular expressions");return e}})),BR=z(((e,t)=>{var i=fi()("match");t.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[i]=!1,"/./"[e](t)}catch(e){}}return!1}})),pre=z((()=>{"use strict";var e,t=He(),i=Yh(),r=Hs().f,n=qa(),s=mi(),a=UR(),o=cs(),l=BR(),h=Gn(),u=i("".endsWith),c=i("".slice),p=Math.min,d=l("endsWith");t({target:"String",proto:!0,forced:!!(h||d||(e=r(String.prototype,"endsWith"),!e||e.writable))&&!d},{endsWith:function(e){var t=s(o(this));a(e);var i=arguments.length>1?arguments[1]:void 0,r=t.length,l=void 0===i?r:p(n(i),r),h=s(e);return u?u(t,h,l):c(t,l-h.length,l)===h}})})),mre=z((()=>{var e=He(),t=Bt(),i=_u(),r=RangeError,n=String.fromCharCode,s=String.fromCodePoint,a=t([].join);e({target:"String",stat:!0,arity:1,forced:!!s&&1!=s.length},{fromCodePoint:function(e){for(var t,s=[],o=arguments.length,l=0;o>l;){if(t=+arguments[l++],i(t,1114111)!==t)throw r(t+" is not a valid code point");s[l]=t<65536?n(t):n(55296+((t-=65536)>>10),t%1024+56320)}return a(s,"")}})})),vre=z((()=>{"use strict";var e=He(),t=Bt(),i=UR(),r=cs(),n=mi(),s=BR(),a=t("".indexOf);e({target:"String",proto:!0,forced:!s("includes")},{includes:function(e){return!!~a(n(r(this)),n(i(e)),arguments.length>1?arguments[1]:void 0)}})})),VF=z((()=>{"use strict";var e=tb().charAt,t=mi(),i=us(),r=zw(),n=D1(),s="String Iterator",a=i.set,o=i.getterFor(s);r(String,"String",(function(e){a(this,{type:s,string:t(e),index:0})}),(function(){var t,i=o(this),r=i.string,s=i.index;return s>=r.length?n(void 0,!0):(t=e(r,s),i.index+=t.length,n(t,!1))}))})),rb=z(((e,t)=>{"use strict";HR();var i=Yh(),r=Cn(),n=eb(),s=Mt(),a=fi(),o=ya(),l=a("species"),h=RegExp.prototype;t.exports=function(e,t,u,c){var p=a(e),d=!s((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),f=d&&!s((function(){var t=!1,i=/a/;return"split"===e&&((i={}).constructor={},i.constructor[l]=function(){return i},i.flags="",i[p]=/./[p]),i.exec=function(){return t=!0,null},i[p](""),!t}));if(!d||!f||u){var m=i(/./[p]),g=t(p,""[e],(function(e,t,r,s,a){var o=i(e),l=t.exec;return l===n||l===h.exec?d&&!a?{done:!0,value:m(t,r,s)}:{done:!0,value:o(r,t,s)}:{done:!1}}));r(String.prototype,e,g[0]),r(h,p,g[1])}c&&o(h[p],"sham",!0)}})),ib=z(((e,t)=>{"use strict";var i=tb().charAt;t.exports=function(e,t,r){return t+(r?i(e,t).length:1)}})),Gv=z(((e,t)=>{var i=si(),r=qr(),n=Ei(),s=ma(),a=eb(),o=TypeError;t.exports=function(e,t){var l=e.exec;if(n(l)){var h=i(l,e,t);return null!==h&&r(h),h}if("RegExp"===s(e))return i(a,e,t);throw o("RegExp#exec called on incompatible receiver")}})),Cre=z((()=>{"use strict";var e=si(),t=rb(),i=qr(),r=ga(),n=qa(),s=mi(),a=cs(),o=Iu(),l=ib(),h=Gv();t("match",(function(t,u,c){return[function(i){var n=a(this),l=r(i)?void 0:o(i,t);return l?e(l,i,n):new RegExp(i)[t](s(n))},function(e){var t=i(this),r=s(e),a=c(u,t,r);if(a.done)return a.value;if(!t.global)return h(t,r);var o=t.unicode;t.lastIndex=0;for(var p,d=[],f=0;null!==(p=h(t,r));){var m=s(p[0]);d[f]=m,""===m&&(t.lastIndex=l(r,n(t.lastIndex),o)),f++}return 0===f?null:d}]}))})),kre=z((()=>{"use strict";var e=He(),t=si(),i=Yh(),r=kw(),n=D1(),s=cs(),a=qa(),o=mi(),l=qr(),h=ga(),u=ma(),c=Hv(),p=Uv(),d=Iu(),f=Cn(),m=Mt(),g=fi(),y=Bm(),v=ib(),T=Gv(),x=us(),b=Gn(),_=g("matchAll"),E="RegExp String",w=E+" Iterator",S=x.set,I=x.getterFor(w),M=RegExp.prototype,A=TypeError,D=i("".indexOf),O=i("".matchAll),R=!!O&&!m((function(){O("a",/./)})),C=r((function(e,t,i,r){S(this,{type:w,regexp:e,string:t,global:i,unicode:r,done:!1})}),E,(function(){var e=I(this);if(e.done)return n(void 0,!0);var t=e.regexp,i=e.string,r=T(t,i);return null===r?(e.done=!0,n(void 0,!0)):e.global?(""===o(r[0])&&(t.lastIndex=v(i,a(t.lastIndex),e.unicode)),n(r,!1)):(e.done=!0,n(r,!1))})),N=function(e){var t,i,r,n=l(this),s=o(e),h=y(n,RegExp),u=o(p(n));return t=new h(h===RegExp?n.source:n,u),i=!!~D(u,"g"),r=!!~D(u,"u"),t.lastIndex=a(n.lastIndex),new C(t,s,i,r)};e({target:"String",proto:!0,forced:R},{matchAll:function(e){var i,r,n,a,l=s(this);if(h(e)){if(R)return O(l,e)}else{if(c(e)&&(i=o(s(p(e))),!~D(i,"g")))throw A("`.matchAll` does not allow non-global regexes");if(R)return O(l,e);if(void 0===(n=d(e,_))&&b&&"RegExp"==u(e)&&(n=N),n)return t(n,e,l)}return r=o(l),a=new RegExp(e,"g"),b?t(N,a,r):a[_](r)}}),b||_ in M||f(M,_,N)})),$F=z(((e,t)=>{var i=bu();t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(i)})),Vre=z((()=>{"use strict";var e=He(),t=oR().end;e({target:"String",proto:!0,forced:$F()},{padEnd:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})})),zre=z((()=>{"use strict";var e=He(),t=oR().start;e({target:"String",proto:!0,forced:$F()},{padStart:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})})),Yre=z((()=>{var e=He(),t=Bt(),i=va(),r=Hi(),n=mi(),s=cn(),a=t([].push),o=t([].join);e({target:"String",stat:!0},{raw:function(e){for(var t=i(r(e).raw),l=s(t),h=arguments.length,u=[],c=0;l>c;){if(a(u,n(t[c++])),c===l)return o(u,"");c{He()({target:"String",proto:!0},{repeat:N1()})})),QF=z(((e,t)=>{var i=Bt(),r=Hi(),n=Math.floor,s=i("".charAt),a=i("".replace),o=i("".slice),l=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,h=/\$([$&'`]|\d{1,2})/g;t.exports=function(e,t,i,u,c,p){var d=i+e.length,f=u.length,m=h;return void 0!==c&&(c=r(c),m=l),a(p,m,(function(r,a){var l;switch(s(a,0)){case"$":return"$";case"&":return e;case"`":return o(t,0,i);case"'":return o(t,d);case"<":l=c[o(a,1,-1)];break;default:var h=+a;if(0===h)return r;if(h>f){var p=n(h/10);return 0===p?r:p<=f?void 0===u[p-1]?s(a,1):u[p-1]+s(a,1):r}l=u[h-1]}return void 0===l?"":l}))}})),eie=z((()=>{"use strict";var e=Co(),t=si(),i=Bt(),r=rb(),n=Mt(),s=qr(),a=Ei(),o=ga(),l=gs(),h=qa(),u=mi(),c=cs(),p=ib(),d=Iu(),f=QF(),m=Gv(),g=fi()("replace"),y=Math.max,v=Math.min,T=i([].concat),x=i([].push),b=i("".indexOf),_=i("".slice),E=function(e){return void 0===e?e:String(e)},w="$0"==="a".replace(/./,"$0"),S=!!/./[g]&&""===/./[g]("a","$0");r("replace",(function(i,r,n){var w=S?"$":"$0";return[function(e,i){var n=c(this),s=o(e)?void 0:d(e,g);return s?t(s,e,n,i):t(r,u(n),e,i)},function(t,i){var o=s(this),c=u(t);if("string"==typeof i&&-1===b(i,w)&&-1===b(i,"$<")){var d=n(r,o,c,i);if(d.done)return d.value}var g=a(i);g||(i=u(i));var S=o.global;if(S){var I=o.unicode;o.lastIndex=0}for(var M=[];;){var A=m(o,c);if(null===A||(x(M,A),!S))break;""===u(A[0])&&(o.lastIndex=p(c,h(o.lastIndex),I))}for(var D="",O=0,R=0;R=O&&(D+=_(c,O,N)+k,O=N+C.length)}return D+_(c,O)}]}),!!n((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}))||!w||S)})),sie=z((()=>{"use strict";var e=He(),t=si(),i=Bt(),r=cs(),n=Ei(),s=ga(),a=Hv(),o=mi(),l=Iu(),h=Uv(),u=QF(),c=fi(),p=Gn(),d=c("replace"),f=TypeError,m=i("".indexOf),g=i("".replace),y=i("".slice),v=Math.max,T=function(e,t,i){return i>e.length?-1:""===t?i:m(e,t,i)};e({target:"String",proto:!0},{replaceAll:function(e,i){var c,x,b,_,E,w,S,I,M,A=r(this),D=0,O=0,R="";if(!s(e)){if((c=a(e))&&(x=o(r(h(e))),!~m(x,"g")))throw f("`.replaceAll` does not allow non-global regexes");if(b=l(e,d))return t(b,e,A,i);if(p&&c)return g(o(A),e,i)}for(_=o(A),E=o(e),(w=n(i))||(i=o(i)),S=E.length,I=v(1,S),D=T(_,E,0);-1!==D;)M=w?o(i(E,D,_)):u(E,_,D,[],void 0,i),R+=y(_,O,D)+M,O=D+S,D=T(_,E,D+I);return O<_.length&&(R+=y(_,O)),R}})})),lie=z((()=>{"use strict";var e=si(),t=rb(),i=qr(),r=ga(),n=cs(),s=VL(),a=mi(),o=Iu(),l=Gv();t("search",(function(t,h,u){return[function(i){var s=n(this),l=r(i)?void 0:o(i,t);return l?e(l,i,s):new RegExp(i)[t](a(s))},function(e){var t=i(this),r=a(e),n=u(h,t,r);if(n.done)return n.value;var o=t.lastIndex;s(o,0)||(t.lastIndex=0);var c=l(t,r);return s(t.lastIndex,o)||(t.lastIndex=o),null===c?-1:c.index}]}))})),fie=z((()=>{"use strict";var e=Co(),t=si(),i=Bt(),r=rb(),n=qr(),s=ga(),a=Hv(),o=cs(),l=Bm(),h=ib(),u=qa(),c=mi(),p=Iu(),d=hv(),f=Gv(),m=eb(),g=J1(),y=Mt(),v=g.UNSUPPORTED_Y,T=4294967295,x=Math.min,b=[].push,_=i(/./.exec),E=i(b),w=i("".slice);r("split",(function(i,r,g){var y;return y="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(i,n){var s=c(o(this)),l=void 0===n?T:n>>>0;if(0===l)return[];if(void 0===i)return[s];if(!a(i))return t(r,s,i,l);for(var h,u,p,f=[],g=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),y=0,v=new RegExp(i.source,g+"g");(h=t(m,v,s))&&!((u=v.lastIndex)>y&&(E(f,w(s,y,h.index)),h.length>1&&h.index=l));)v.lastIndex===h.index&&v.lastIndex++;return y===s.length?(p||!_(v,""))&&E(f,""):E(f,w(s,y)),f.length>l?d(f,0,l):f}:"0".split(void 0,0).length?function(e,i){return void 0===e&&0===i?[]:t(r,this,e,i)}:r,[function(e,r){var n=o(this),a=s(e)?void 0:p(e,i);return a?t(a,e,n,r):t(y,c(n),e,r)},function(e,t){var i=n(this),s=c(e),a=g(y,i,s,t,y!==r);if(a.done)return a.value;var o=l(i,RegExp),p=i.unicode,d=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(v?"g":"y"),m=new o(v?"^(?:"+i.source+")":i,d),b=void 0===t?T:t>>>0;if(0===b)return[];if(0===s.length)return null===f(m,s)?[s]:[];for(var _=0,S=0,I=[];S{"use strict";var e,t=He(),i=Yh(),r=Hs().f,n=qa(),s=mi(),a=UR(),o=cs(),l=BR(),h=Gn(),u=i("".startsWith),c=i("".slice),p=Math.min,d=l("startsWith");t({target:"String",proto:!0,forced:!!(h||d||(e=r(String.prototype,"startsWith"),!e||e.writable))&&!d},{startsWith:function(e){var t=s(o(this));a(e);var i=n(p(arguments.length>1?arguments[1]:void 0,t.length)),r=s(e);return u?u(t,r,i):c(t,i,i+r.length)===r}})})),bie=z((()=>{"use strict";var e=He(),t=Bt(),i=cs(),r=gs(),n=mi(),s=t("".slice),a=Math.max,o=Math.min;e({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(e,t){var l,h,u=n(i(this)),c=u.length,p=r(e);return p===1/0&&(p=0),p<0&&(p=a(c+p,0)),(l=void 0===t?c:r(t))<=0||l===1/0?"":p>=(h=o(p+l,c))?"":s(u,p,h)}})})),jR=z(((e,t)=>{var i=Cm().PROPER,r=Mt(),n=G1();t.exports=function(e){return r((function(){return!!n[e]()||"​…᠎"!=="​…᠎"[e]()||i&&n[e].name!==e}))}})),Sie=z((()=>{"use strict";var e=He(),t=Vm().trim;e({target:"String",proto:!0,forced:jR()("trim")},{trim:function(){return t(this)}})})),s5=z(((e,t)=>{"use strict";var i=Vm().end,r=jR();t.exports=r("trimEnd")?function(){return i(this)}:"".trimEnd})),Mie=z((()=>{var e=He(),t=s5();e({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==t},{trimRight:t})})),Cie=z((()=>{Mie();var e=He(),t=s5();e({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==t},{trimEnd:t})})),a5=z(((e,t)=>{"use strict";var i=Vm().start,r=jR();t.exports=r("trimStart")?function(){return i(this)}:"".trimStart})),Pie=z((()=>{var e=He(),t=a5();e({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==t},{trimLeft:t})})),Lie=z((()=>{Pie();var e=He(),t=a5();e({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==t},{trimStart:t})})),Za=z(((e,t)=>{var i=Bt(),r=cs(),n=mi(),s=/"/g,a=i("".replace);t.exports=function(e,t,i,o){var l=n(r(e)),h="<"+t;return""!==i&&(h+=" "+i+'="'+a(n(o),s,""")+'"'),h+">"+l+""}})),Ja=z(((e,t)=>{var i=Mt();t.exports=function(e){return i((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}})),Bie=z((()=>{"use strict";var e=He(),t=Za();e({target:"String",proto:!0,forced:Ja()("anchor")},{anchor:function(e){return t(this,"a","name",e)}})})),kie=z((()=>{"use strict";var e=He(),t=Za();e({target:"String",proto:!0,forced:Ja()("big")},{big:function(){return t(this,"big","","")}})})),Gie=z((()=>{"use strict";var e=He(),t=Za();e({target:"String",proto:!0,forced:Ja()("blink")},{blink:function(){return t(this,"blink","","")}})})),Vie=z((()=>{"use strict";var e=He(),t=Za();e({target:"String",proto:!0,forced:Ja()("bold")},{bold:function(){return t(this,"b","","")}})})),zie=z((()=>{"use strict";var e=He(),t=Za();e({target:"String",proto:!0,forced:Ja()("fixed")},{fixed:function(){return t(this,"tt","","")}})})),jie=z((()=>{"use strict";var e=He(),t=Za();e({target:"String",proto:!0,forced:Ja()("fontcolor")},{fontcolor:function(e){return t(this,"font","color",e)}})})),Wie=z((()=>{"use strict";var e=He(),t=Za();e({target:"String",proto:!0,forced:Ja()("fontsize")},{fontsize:function(e){return t(this,"font","size",e)}})})),qie=z((()=>{"use strict";var e=He(),t=Za();e({target:"String",proto:!0,forced:Ja()("italics")},{italics:function(){return t(this,"i","","")}})})),Yie=z((()=>{"use strict";var e=He(),t=Za();e({target:"String",proto:!0,forced:Ja()("link")},{link:function(e){return t(this,"a","href",e)}})})),Xie=z((()=>{"use strict";var e=He(),t=Za();e({target:"String",proto:!0,forced:Ja()("small")},{small:function(){return t(this,"small","","")}})})),$ie=z((()=>{"use strict";var e=He(),t=Za();e({target:"String",proto:!0,forced:Ja()("strike")},{strike:function(){return t(this,"strike","","")}})})),Kie=z((()=>{"use strict";var e=He(),t=Za();e({target:"String",proto:!0,forced:Ja()("sub")},{sub:function(){return t(this,"sub","","")}})})),Zie=z((()=>{"use strict";var e=He(),t=Za();e({target:"String",proto:!0,forced:Ja()("sup")},{sup:function(){return t(this,"sup","","")}})})),WR=z(((e,t)=>{var i=rr(),r=Mt(),n=w1(),s=Si().NATIVE_ARRAY_BUFFER_VIEWS,a=i.ArrayBuffer,o=i.Int8Array;t.exports=!s||!r((function(){o(1)}))||!r((function(){new o(-1)}))||!n((function(e){new o,new o(null),new o(1.5),new o(e)}),!0)||r((function(){return 1!==new o(new a(2),1,void 0).length}))})),tne=z(((e,t)=>{var i=gs(),r=RangeError;t.exports=function(e){var t=i(e);if(t<0)throw r("The argument can't be less than 0");return t}})),l5=z(((e,t)=>{var i=tne(),r=RangeError;t.exports=function(e,t){var n=i(e);if(n%t)throw r("Wrong offset");return n}})),nne=z(((e,t)=>{var i=mc(),r=Bt()("".slice);t.exports=function(e){return"Big"===r(i(e),0,3)}})),c5=z(((e,t)=>{var i=o1(),r=TypeError;t.exports=function(e){var t=i(e,"number");if("number"==typeof t)throw r("Can't convert number to bigint");return BigInt(t)}})),u5=z(((e,t)=>{var i=pl(),r=si(),n=aR(),s=Hi(),a=cn(),o=x1(),l=vv(),h=Nw(),u=nne(),c=Si().aTypedArrayConstructor,p=c5();t.exports=function(e){var t,d,f,m,g,y,v,T,x=n(this),b=s(e),_=arguments.length,E=_>1?arguments[1]:void 0,w=void 0!==E,S=l(b);if(S&&!h(S))for(T=(v=o(b,S)).next,b=[];!(y=r(T,v)).done;)b.push(y.value);for(w&&_>2&&(E=i(E,arguments[2])),d=a(b),f=new(c(x))(d),m=u(f),t=0;d>t;t++)g=w?E(b[t],t):b[t],f[t]=m?p(g):+g;return f}})),Ou=z(((e,t)=>{"use strict";var i=He(),r=rr(),n=si(),s=Ar(),a=WR(),o=Si(),l=P1(),h=yc(),u=Mo(),c=ya(),p=yR(),d=qa(),f=zN(),m=l5(),g=Wh(),y=_i(),v=mc(),T=ai(),x=Dd(),b=Ya(),_=Do(),E=gc(),w=qh().f,S=u5(),I=Rs().forEach,M=Hm(),A=ji(),D=Hs(),O=us(),R=Lm(),C=O.get,N=O.set,P=O.enforce,L=A.f,F=D.f,U=Math.round,k=r.RangeError,B=l.ArrayBuffer,H=B.prototype,G=l.DataView,z=o.NATIVE_ARRAY_BUFFER_VIEWS,V=o.TYPED_ARRAY_TAG,j=o.TypedArray,W=o.TypedArrayPrototype,Y=o.aTypedArrayConstructor,X=o.isTypedArray,q="BYTES_PER_ELEMENT",Z="Wrong length",K=function(e,t){Y(e);for(var i=0,r=t.length,n=new e(r);r>i;)n[i]=t[i++];return n},J=function(e,t){L(e,t,{get:function(){return C(this)[t]}})},$=function(e){var t;return _(H,e)||"ArrayBuffer"==(t=v(e))||"SharedArrayBuffer"==t},Q=function(e,t){return X(e)&&!x(t)&&t in e&&p(+t)&&t>=0},ee=function(e,t){return t=g(t),Q(e,t)?u(2,e[t]):F(e,t)},te=function(e,t,i){return t=g(t),!(Q(e,t)&&T(i)&&y(i,"value"))||y(i,"get")||y(i,"set")||i.configurable||y(i,"writable")&&!i.writable||y(i,"enumerable")&&!i.enumerable?L(e,t,i):(e[t]=i.value,e)};s?(z||(D.f=ee,A.f=te,J(W,"buffer"),J(W,"byteOffset"),J(W,"byteLength"),J(W,"length")),i({target:"Object",stat:!0,forced:!z},{getOwnPropertyDescriptor:ee,defineProperty:te}),t.exports=function(e,t,s){var o=e.match(/\d+$/)[0]/8,l=e+(s?"Clamped":"")+"Array",u="get"+e,p="set"+e,g=r[l],y=g,v=y&&y.prototype,x={},_=function(e,t){L(e,t,{get:function(){return function(e,t){var i=C(e);return i.view[u](t*o+i.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,i){var r=C(e);s&&(i=(i=U(i))<0?0:i>255?255:255&i),r.view[p](t*o+r.byteOffset,i,!0)}(this,t,e)},enumerable:!0})};z?a&&(y=t((function(e,t,i,r){return h(e,v),R(T(t)?$(t)?void 0!==r?new g(t,m(i,o),r):void 0!==i?new g(t,m(i,o)):new g(t):X(t)?K(y,t):n(S,y,t):new g(f(t)),e,y)})),E&&E(y,j),I(w(g),(function(e){e in y||c(y,e,g[e])})),y.prototype=v):(y=t((function(e,t,i,r){h(e,v);var s,a,l,u=0,c=0;if(T(t)){if(!$(t))return X(t)?K(y,t):n(S,y,t);s=t,c=m(i,o);var p=t.byteLength;if(void 0===r){if(p%o||(a=p-c)<0)throw k(Z)}else if((a=d(r)*o)+c>p)throw k(Z);l=a/o}else l=f(t),s=new B(a=l*o);for(N(e,{buffer:s,byteOffset:c,byteLength:a,length:l,view:new G(s)});u{Ou()("Float32",(function(e){return function(t,i,r){return e(this,t,i,r)}}))})),wne=z((()=>{Ou()("Float64",(function(e){return function(t,i,r){return e(this,t,i,r)}}))})),Rne=z((()=>{Ou()("Int8",(function(e){return function(t,i,r){return e(this,t,i,r)}}))})),Mne=z((()=>{Ou()("Int16",(function(e){return function(t,i,r){return e(this,t,i,r)}}))})),Dne=z((()=>{Ou()("Int32",(function(e){return function(t,i,r){return e(this,t,i,r)}}))})),Cne=z((()=>{Ou()("Uint8",(function(e){return function(t,i,r){return e(this,t,i,r)}}))})),Ane=z((()=>{Ou()("Uint8",(function(e){return function(t,i,r){return e(this,t,i,r)}}),!0)})),One=z((()=>{Ou()("Uint16",(function(e){return function(t,i,r){return e(this,t,i,r)}}))})),Pne=z((()=>{Ou()("Uint32",(function(e){return function(t,i,r){return e(this,t,i,r)}}))})),Lne=z((()=>{"use strict";var e=Si(),t=cn(),i=gs(),r=e.aTypedArray;(0,e.exportTypedArrayMethod)("at",(function(e){var n=r(this),s=t(n),a=i(e),o=a>=0?a:s+a;return o<0||o>=s?void 0:n[o]}))})),Hne=z((()=>{"use strict";var e=Bt(),t=Si(),i=e(bN()),r=t.aTypedArray;(0,t.exportTypedArrayMethod)("copyWithin",(function(e,t){return i(r(this),e,t,arguments.length>2?arguments[2]:void 0)}))})),Bne=z((()=>{"use strict";var e=Si(),t=Rs().every,i=e.aTypedArray;(0,e.exportTypedArrayMethod)("every",(function(e){return t(i(this),e,arguments.length>1?arguments[1]:void 0)}))})),Gne=z((()=>{"use strict";var e=Si(),t=Bw(),i=c5(),r=mc(),n=si(),s=Bt(),a=Mt(),o=e.aTypedArray,l=e.exportTypedArrayMethod,h=s("".slice);l("fill",(function(e){var s=arguments.length;o(this);var a="Big"===h(r(this),0,3)?i(e):+e;return n(t,this,a,s>1?arguments[1]:void 0,s>2?arguments[2]:void 0)}),a((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))})),zne=z(((e,t)=>{var i=cn();t.exports=function(e,t){for(var r=0,n=i(t),s=new e(n);n>r;)s[r]=t[r++];return s}})),ub=z(((e,t)=>{var i=Si(),r=Bm(),n=i.aTypedArrayConstructor,s=i.getTypedArrayConstructor;t.exports=function(e){return n(r(e,s(e)))}})),Yne=z(((e,t)=>{var i=zne(),r=ub();t.exports=function(e,t){return i(r(e),t)}})),$ne=z((()=>{"use strict";var e=Si(),t=Rs().filter,i=Yne(),r=e.aTypedArray;(0,e.exportTypedArrayMethod)("filter",(function(e){var n=t(r(this),e,arguments.length>1?arguments[1]:void 0);return i(this,n)}))})),Zne=z((()=>{"use strict";var e=Si(),t=Rs().find,i=e.aTypedArray;(0,e.exportTypedArrayMethod)("find",(function(e){return t(i(this),e,arguments.length>1?arguments[1]:void 0)}))})),Qne=z((()=>{"use strict";var e=Si(),t=Rs().findIndex,i=e.aTypedArray;(0,e.exportTypedArrayMethod)("findIndex",(function(e){return t(i(this),e,arguments.length>1?arguments[1]:void 0)}))})),tse=z((()=>{"use strict";var e=Si(),t=S1().findLast,i=e.aTypedArray;(0,e.exportTypedArrayMethod)("findLast",(function(e){return t(i(this),e,arguments.length>1?arguments[1]:void 0)}))})),ise=z((()=>{"use strict";var e=Si(),t=S1().findLastIndex,i=e.aTypedArray;(0,e.exportTypedArrayMethod)("findLastIndex",(function(e){return t(i(this),e,arguments.length>1?arguments[1]:void 0)}))})),sse=z((()=>{"use strict";var e=Si(),t=Rs().forEach,i=e.aTypedArray;(0,e.exportTypedArrayMethod)("forEach",(function(e){t(i(this),e,arguments.length>1?arguments[1]:void 0)}))})),ase=z((()=>{"use strict";var e=WR();(0,Si().exportTypedArrayStaticMethod)("from",u5(),e)})),lse=z((()=>{"use strict";var e=Si(),t=lv().includes,i=e.aTypedArray;(0,e.exportTypedArrayMethod)("includes",(function(e){return t(i(this),e,arguments.length>1?arguments[1]:void 0)}))})),use=z((()=>{"use strict";var e=Si(),t=lv().indexOf,i=e.aTypedArray;(0,e.exportTypedArrayMethod)("indexOf",(function(e){return t(i(this),e,arguments.length>1?arguments[1]:void 0)}))})),mse=z((()=>{"use strict";var e=rr(),t=Mt(),i=Bt(),r=Si(),n=C1(),s=fi()("iterator"),a=e.Uint8Array,o=i(n.values),l=i(n.keys),h=i(n.entries),u=r.aTypedArray,c=r.exportTypedArrayMethod,p=a&&a.prototype,d=!t((function(){p[s].call([1])})),f=!!p&&p.values&&p[s]===p.values&&"values"===p.values.name,m=function(){return o(u(this))};c("entries",(function(){return h(u(this))}),d),c("keys",(function(){return l(u(this))}),d),c("values",m,d||!f,{name:"values"}),c(s,m,d||!f,{name:"values"})})),vse=z((()=>{"use strict";var e=Si(),t=Bt(),i=e.aTypedArray,r=e.exportTypedArrayMethod,n=t([].join);r("join",(function(e){return n(i(this),e)}))})),Tse=z((()=>{"use strict";var e=Si(),t=Co(),i=FN(),r=e.aTypedArray;(0,e.exportTypedArrayMethod)("lastIndexOf",(function(e){var n=arguments.length;return t(i,r(this),n>1?[e,arguments[1]]:[e])}))})),bse=z((()=>{"use strict";var e=Si(),t=Rs().map,i=ub(),r=e.aTypedArray;(0,e.exportTypedArrayMethod)("map",(function(e){return t(r(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(i(e))(t)}))}))})),Ise=z((()=>{"use strict";var e=Si(),t=WR(),i=e.aTypedArrayConstructor;(0,e.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,r=new(i(this))(t);t>e;)r[e]=arguments[e++];return r}),t)})),Sse=z((()=>{"use strict";var e=Si(),t=A1().left,i=e.aTypedArray;(0,e.exportTypedArrayMethod)("reduce",(function(e){var r=arguments.length;return t(i(this),e,r,r>1?arguments[1]:void 0)}))})),Rse=z((()=>{"use strict";var e=Si(),t=A1().right,i=e.aTypedArray;(0,e.exportTypedArrayMethod)("reduceRight",(function(e){var r=arguments.length;return t(i(this),e,r,r>1?arguments[1]:void 0)}))})),Dse=z((()=>{"use strict";var e=Si(),t=e.aTypedArray,i=e.exportTypedArrayMethod,r=Math.floor;i("reverse",(function(){for(var e,i=this,n=t(i).length,s=r(n/2),a=0;a{"use strict";var e=rr(),t=si(),i=Si(),r=cn(),n=l5(),s=Hi(),a=Mt(),o=e.RangeError,l=e.Int8Array,h=l&&l.prototype,u=h&&h.set,c=i.aTypedArray,p=i.exportTypedArrayMethod,d=!a((function(){var e=new Uint8ClampedArray(2);return t(u,e,{length:1,0:3},1),3!==e[1]})),f=d&&i.NATIVE_ARRAY_BUFFER_VIEWS&&a((function(){var e=new l(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));p("set",(function(e){c(this);var i=n(arguments.length>1?arguments[1]:void 0,1),a=s(e);if(d)return t(u,this,a,i);var l=this.length,h=r(a),p=0;if(h+i>l)throw o("Wrong length");for(;p{"use strict";var e=Si(),t=ub(),i=Mt(),r=Pd(),n=e.aTypedArray;(0,e.exportTypedArrayMethod)("slice",(function(e,i){for(var s=r(n(this),e,i),a=t(this),o=0,l=s.length,h=new a(l);l>o;)h[o]=s[o++];return h}),i((function(){new Int8Array(1).slice()})))})),Bse=z((()=>{"use strict";var e=Si(),t=Rs().some,i=e.aTypedArray;(0,e.exportTypedArrayMethod)("some",(function(e){return t(i(this),e,arguments.length>1?arguments[1]:void 0)}))})),Wse=z((()=>{"use strict";var e=rr(),t=Yh(),i=Mt(),r=ms(),n=qw(),s=Si(),a=BN(),o=kN(),l=xu(),h=Yw(),u=s.aTypedArray,c=s.exportTypedArrayMethod,p=e.Uint16Array,d=p&&t(p.prototype.sort),f=!(!d||i((function(){d(new p(2),null)}))&&i((function(){d(new p(2),{})}))),m=!!d&&!i((function(){if(l)return l<74;if(a)return a<67;if(o)return!0;if(h)return h<602;var e,t,i=new p(516),r=Array(516);for(e=0;e<516;e++)t=e%4,i[e]=515-e,r[e]=e-2*t+3;for(d(i,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(i[e]!==r[e])return!0}));c("sort",(function(e){return void 0!==e&&r(e),m?d(this,e):n(u(this),(t=e,function(e,i){return void 0!==t?+t(e,i)||0:i!=i?-1:e!=e?1:0===e&&0===i?1/e>0&&1/i<0?1:-1:e>i}));var t}),!m||f)})),Xse=z((()=>{"use strict";var e=Si(),t=qa(),i=_u(),r=ub(),n=e.aTypedArray;(0,e.exportTypedArrayMethod)("subarray",(function(e,s){var a=n(this),o=a.length,l=i(e,o);return new(r(a))(a.buffer,a.byteOffset+l*a.BYTES_PER_ELEMENT,t((void 0===s?o:i(s,o))-l))}))})),Qse=z((()=>{"use strict";var e=rr(),t=Co(),i=Si(),r=Mt(),n=Pd(),s=e.Int8Array,a=i.aTypedArray,o=i.exportTypedArrayMethod,l=[].toLocaleString,h=!!s&&r((function(){l.call(new s(1))}));o("toLocaleString",(function(){return t(l,h?n(a(this)):a(this),n(arguments))}),r((function(){return[1,2].toLocaleString()!=new s([1,2]).toLocaleString()}))||!r((function(){s.prototype.toLocaleString.call([1,2])})))})),tae=z((()=>{"use strict";var e=Si().exportTypedArrayMethod,t=Mt(),i=rr(),r=Bt(),n=i.Uint8Array,s=n&&n.prototype||{},a=[].toString,o=r([].join);t((function(){a.call({})}))&&(a=function(){return o(this)});var l=s.toString!=a;e("toString",a,l)})),aae=z((()=>{"use strict";var e=He(),t=Bt(),i=mi(),r=String.fromCharCode,n=t("".charAt),s=t(/./.exec),a=t("".slice),o=/^[\da-f]{2}$/i,l=/^[\da-f]{4}$/i;e({global:!0},{unescape:function(e){for(var t,h,u=i(e),c="",p=u.length,d=0;d{"use strict";var i=Bt(),r=Ev(),n=Gd().getWeakData,s=yc(),a=qr(),o=ga(),l=ai(),h=vc(),u=Rs(),c=_i(),p=us(),d=p.set,f=p.getterFor,m=u.find,g=u.findIndex,y=i([].splice),v=0,T=function(e){return e.frozen||(e.frozen=new x)},x=function(){this.entries=[]},b=function(e,t){return m(e.entries,(function(e){return e[0]===t}))};x.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var i=b(this,e);i?i[1]=t:this.entries.push([e,t])},delete:function(e){var t=g(this.entries,(function(t){return t[0]===e}));return~t&&y(this.entries,t,1),!!~t}},t.exports={getConstructor:function(e,t,i,u){var p=e((function(e,r){s(e,m),d(e,{type:t,id:v++,frozen:void 0}),o(r)||h(r,e[u],{that:e,AS_ENTRIES:i})})),m=p.prototype,g=f(t),y=function(e,t,i){var r=g(e),s=n(a(t),!0);return!0===s?T(r).set(t,i):s[r.id]=i,e};return r(m,{delete:function(e){var t=g(this);if(!l(e))return!1;var i=n(e);return!0===i?T(t).delete(e):i&&c(i,t.id)&&delete i[t.id]},has:function(e){var t=g(this);if(!l(e))return!1;var i=n(e);return!0===i?T(t).has(e):i&&c(i,t.id)}}),r(m,i?{get:function(e){var t=g(this);if(l(e)){var i=n(e);return!0===i?T(t).get(e):i?i[t.id]:void 0}},set:function(e,t){return y(this,e,t)}}:{add:function(e){return y(this,e,!0)}}),p}}})),xae=z((()=>{"use strict";var e,t,i,r,n=Gm(),s=rr(),a=Bt(),o=Ev(),l=Gd(),h=F1(),u=O5(),c=ai(),p=us().enforce,d=Mt(),f=w2(),m=Object,g=Array.isArray,y=m.isExtensible,v=m.isFrozen,T=m.isSealed,x=m.freeze,b=m.seal,_={},E={},w=!s.ActiveXObject&&"ActiveXObject"in s,S=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},I=h("WeakMap",S,u),M=I.prototype,A=a(M.set);f&&(w?(e=u.getConstructor(S,"WeakMap",!0),l.enable(),t=a(M.delete),i=a(M.has),r=a(M.get),o(M,{delete:function(i){if(c(i)&&!y(i)){var r=p(this);return r.frozen||(r.frozen=new e),t(this,i)||r.frozen.delete(i)}return t(this,i)},has:function(t){if(c(t)&&!y(t)){var r=p(this);return r.frozen||(r.frozen=new e),i(this,t)||r.frozen.has(t)}return i(this,t)},get:function(t){if(c(t)&&!y(t)){var n=p(this);return n.frozen||(n.frozen=new e),i(this,t)?r(this,t):n.frozen.get(t)}return r(this,t)},set:function(t,r){if(c(t)&&!y(t)){var n=p(this);n.frozen||(n.frozen=new e),i(this,t)?A(this,t,r):n.frozen.set(t,r)}else A(this,t,r);return this}})):n&&d((function(){var e=x([]);return A(new I,e,1),!v(e)}))&&o(M,{set:function(e,t){var i;return g(e)&&(v(e)?i=_:T(e)&&(i=E)),A(this,e,t),i==_&&x(e),i==E&&b(e),this}}))})),Iae=z((()=>{xae()})),_ae=z((()=>{"use strict";F1()("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),O5())})),Sae=z((()=>{_ae()})),L5=z(((e,t)=>{var i,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n={};for(i=0;i<66;i++)n[r.charAt(i)]=i;t.exports={itoc:r,ctoi:n}})),Nae=z((()=>{var e=He(),t=In(),i=Bt(),r=Mt(),n=mi(),s=_i(),a=ip(),o=L5().ctoi,l=/[^\d+/a-z]/i,h=/[\t\n\f\r ]+/g,u=/[=]+$/,c=t("atob"),p=String.fromCharCode,d=i("".charAt),f=i("".replace),m=i(l.exec),g=r((function(){return""!==c(" ")})),y=!r((function(){c("a")})),v=!g&&!y&&!r((function(){c()})),T=!g&&!y&&1!==c.length;e({global:!0,enumerable:!0,forced:g||y||v||T},{atob:function(e){if(a(arguments.length,1),v||T)return c(e);var i,r,g=f(n(e),h,""),y="",x=0,b=0;if(g.length%4==0&&(g=f(g,u,"")),g.length%4==1||m(l,g))throw new(t("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;i=d(g,x++);)s(o,i)&&(r=b%4?64*r+o[i]:o[i],b++%4&&(y+=p(255&r>>(-2*b&6))));return y}})})),zae=z((()=>{var e=He(),t=In(),i=Bt(),r=Mt(),n=mi(),s=ip(),a=L5().itoc,o=t("btoa"),l=i("".charAt),h=i("".charCodeAt),u=!!o&&!r((function(){o()})),c=!!o&&r((function(){return"bnVsbA=="!==o(null)})),p=!!o&&1!==o.length;e({global:!0,enumerable:!0,forced:u||c||p},{btoa:function(e){if(s(arguments.length,1),u||c||p)return o(n(e));for(var i,r,d=n(e),f="",m=0,g=a;l(d,m)||(g="=",m%1);){if((r=h(d,m+=3/4))>255)throw new(t("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");f+=l(g,63&(i=i<<8|r)>>8-m%1*8)}return f}})})),G5=z(((e,t)=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}})),z5=z(((e,t)=>{var i=l1()("span").classList,r=i&&i.constructor&&i.constructor.prototype;t.exports=r===Object.prototype?void 0:r})),Kae=z((()=>{var e,t=rr(),i=G5(),r=z5(),n=SN(),s=ya(),a=function(e){if(e&&e.forEach!==n)try{s(e,"forEach",n)}catch(t){e.forEach=n}};for(e in i)i[e]&&a(t[e]&&t[e].prototype);a(r)})),roe=z((()=>{var e,t=rr(),i=G5(),r=z5(),n=C1(),s=ya(),a=fi(),o=a("iterator"),l=a("toStringTag"),h=n.values,u=function(e,t){if(e){if(e[o]!==h)try{s(e,o,h)}catch(t){e[o]=h}if(e[l]||s(e,l,t),i[t])for(var r in n)if(e[r]!==n[r])try{s(e,r,n[r])}catch(t){e[r]=n[r]}}};for(e in i)u(t[e]&&t[e].prototype,e);u(r,"DOMTokenList")})),noe=z(((e,t)=>{var i=Mu();t.exports=function(e){try{if(i)return Function('return require("'+e+'")')()}catch(e){}}})),X5=z(((e,t)=>{t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}})),goe=z((()=>{"use strict";var e=He(),t=noe(),i=In(),r=Mt(),n=Ya(),s=Mo(),a=ji().f,o=Cn(),l=Vd(),h=_i(),u=yc(),c=qr(),p=pN(),d=mv(),f=X5(),m=b1(),g=us(),y=Ar(),v=Gn(),T="DOMException",x="DATA_CLONE_ERR",b=i("Error"),_=i(T)||function(){try{(new(i("MessageChannel")||t("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(e){if(e.name==x&&25==e.code)return e.constructor}}(),E=_&&_.prototype,w=b.prototype,S=g.set,I=g.getterFor(T),M="stack"in b(T),A=function(e){return h(f,e)&&f[e].m?f[e].c:0},D=function(){u(this,O);var e=arguments.length,t=d(e<1?void 0:arguments[0]),i=d(e<2?void 0:arguments[1],"Error"),r=A(i);if(S(this,{type:T,name:i,message:t,code:r}),y||(this.name=i,this.message=t,this.code=r),M){var n=b(t);n.name=T,a(this,"stack",s(1,m(n.stack,1)))}},O=D.prototype=n(w),R=function(e){return{enumerable:!0,configurable:!0,get:e}},C=function(e){return R((function(){return I(this)[e]}))};y&&(l(O,"code",C("code")),l(O,"message",C("message")),l(O,"name",C("name"))),a(O,"constructor",s(1,D));var N=r((function(){return!(new _ instanceof b)})),P=N||r((function(){return w.toString!==p||"2: 1"!==String(new _(1,2))})),L=N||r((function(){return 25!==new _(1,"DataCloneError").code})),F=N||25!==_[x]||25!==E[x],U=v?P||L||F:N;e({global:!0,constructor:!0,forced:U},{DOMException:U?D:_});var k,B,H,G,z=i(T),V=z.prototype;for(G in P&&(v||_===z)&&o(V,"toString",p),L&&y&&_===z&&l(V,"code",R((function(){return A(c(this).name)}))),f)h(f,G)&&(B=(k=f[G]).s,H=s(6,k.c),h(z,B)||a(z,B,H),h(V,B)||a(V,B,H))})),Ioe=z((()=>{"use strict";var e=He(),t=rr(),i=In(),r=Mo(),n=ji().f,s=_i(),a=yc(),o=Lm(),l=mv(),h=X5(),u=b1(),c=Ar(),p=Gn(),d="DOMException",f=i("Error"),m=i(d),g=function(){a(this,y);var e=arguments.length,t=l(e<1?void 0:arguments[0]),i=l(e<2?void 0:arguments[1],"Error"),s=new m(t,i),h=f(t);return h.name=d,n(s,"stack",r(1,u(h.stack,1))),o(s,this,g),s},y=g.prototype=m.prototype,v="stack"in f(d),T="stack"in new m(1,2),x=m&&c&&Object.getOwnPropertyDescriptor(t,d),b=!(!x||x.writable&&x.configurable),_=v&&!b&&!T;e({global:!0,constructor:!0,forced:p||_},{DOMException:_?g:m});var E,w,S,I=i(d),M=I.prototype;if(M.constructor!==I)for(S in p||n(M,"constructor",r(1,I)),h)s(h,S)&&(s(I,w=(E=h[S]).s)||n(I,w,r(6,E.c)))})),Soe=z((()=>{var e=In(),t="DOMException";Xa()(e(t),t)})),Roe=z((()=>{var e=He(),t=rr(),i=X1().clear;e({global:!0,bind:!0,enumerable:!0,forced:t.clearImmediate!==i},{clearImmediate:i})})),Doe=z(((e,t)=>{t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version})),gM=z(((e,t)=>{"use strict";var i,r=rr(),n=Co(),s=Ei(),a=Doe(),o=bu(),l=Pd(),h=ip(),u=r.Function,c=/MSIE .\./.test(o)||a&&((i=r.Bun.version.split(".")).length<3||0==i[0]&&(i[1]<3||3==i[1]&&0==i[2]));t.exports=function(e,t){var i=t?2:1;return c?function(r,a){var o=h(arguments.length,1)>i,c=s(r)?r:u(r),p=o?l(arguments,i):[],d=o?function(){n(c,this,p)}:c;return t?e(d,a):e(d)}:e}})),Loe=z((()=>{var e=He(),t=rr(),i=X1().set,r=gM(),n=t.setImmediate?r(i,!1):i;e({global:!0,bind:!0,enumerable:!0,forced:t.setImmediate!==n},{setImmediate:n})})),Foe=z((()=>{Roe(),Loe()})),Hoe=z((()=>{var e=He(),t=rr(),i=aF(),r=ms(),n=ip(),s=Mu(),a=t.process;e({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(e){n(arguments.length,1),r(e);var t=s&&a.domain;i(t?t.bind(e):e)}})})),Boe=z((()=>{"use strict";var e,t=He(),i=rr(),r=Vd(),n=Ar(),s=TypeError,a=Object.defineProperty,o=i.self!==i;try{n?(e=Object.getOwnPropertyDescriptor(i,"self"),(o||!e||!e.get||!e.enumerable)&&r(i,"self",{get:function(){return i},set:function(e){if(this!==i)throw s("Illegal invocation");a(i,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})):t({global:!0,simple:!0,forced:o},{self:i})}catch(e){}})),Goe=z(((e,t)=>{var i=Bt(),r=Map.prototype;t.exports={Map:Map,set:i(r.set),get:i(r.get),has:i(r.has),remove:i(r.delete),proto:r}})),zoe=z(((e,t)=>{var i=Bt(),r=Set.prototype;t.exports={Set:Set,add:i(r.add),has:i(r.has),remove:i(r.delete),proto:r,$has:r.has,$keys:r.keys}})),Qoe=z((()=>{var e,t=Gn(),i=He(),r=rr(),n=In(),s=Bt(),a=Mt(),o=Mm(),l=Ei(),h=Om(),u=ga(),c=ai(),p=Dd(),d=vc(),f=qr(),m=mc(),g=_i(),y=Su(),v=ya(),T=cn(),x=ip(),b=Uv(),_=Goe(),E=zoe(),w=Cw(),S=xu(),I=oF(),M=_R(),A=Mu(),D=r.Object,O=r.Array,R=r.Date,C=r.Error,N=r.EvalError,P=r.RangeError,L=r.ReferenceError,F=r.SyntaxError,U=r.TypeError,k=r.URIError,B=r.PerformanceMark,H=r.WebAssembly,G=H&&H.CompileError||C,z=H&&H.LinkError||C,V=H&&H.RuntimeError||C,j=n("DOMException"),W=_.Map,Y=_.has,X=_.get,q=_.set,Z=E.Set,K=E.add,J=n("Object","keys"),$=s([].push),Q=s((!0).valueOf),ee=s(1..valueOf),te=s("".valueOf),ie=s(R.prototype.getTime),re=o("structuredClone"),ne="DataCloneError",se="Transferring",ae=function(e){return!a((function(){var t=new r.Set([7]),i=e(t),n=e(D(7));return i==t||!i.has(7)||"object"!=typeof n||7!=n}))&&e},oe=function(e,t){return!a((function(){var i=new t,r=e({a:i,b:i});return!(r&&r.a===r.b&&r.a instanceof t&&r.a.stack===i.stack)}))},le=r.structuredClone,he=t||!oe(le,C)||!oe(le,j)||(e=le,!!a((function(){var t=e(new r.AggregateError([1],re,{cause:3}));return"AggregateError"!=t.name||1!=t.errors[0]||t.message!=re||3!=t.cause}))),ue=!le&&ae((function(e){return new B(re,{detail:e}).detail})),ce=ae(le)||ue,pe=function(e){throw new j("Uncloneable type: "+e,ne)},de=function(e,t){throw new j((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",ne)},fe=function(e,t){if(p(e)&&pe("Symbol"),!c(e))return e;if(t){if(Y(t,e))return X(t,e)}else t=new W;var i,s,a,o,h,u,d,f,x,_,E=m(e),S=!1;switch(E){case"Array":a=O(T(e)),S=!0;break;case"Object":a={},S=!0;break;case"Map":a=new W,S=!0;break;case"Set":a=new Z,S=!0;break;case"RegExp":a=new RegExp(e.source,b(e));break;case"Error":switch(s=e.name){case"AggregateError":a=n("AggregateError")([]);break;case"EvalError":a=N();break;case"RangeError":a=P();break;case"ReferenceError":a=L();break;case"SyntaxError":a=F();break;case"TypeError":a=U();break;case"URIError":a=k();break;case"CompileError":a=G();break;case"LinkError":a=z();break;case"RuntimeError":a=V();break;default:a=C()}S=!0;break;case"DOMException":a=new j(e.message,e.name),S=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":i=r[E],c(i)||de(E),a=new i(fe(e.buffer,t),e.byteOffset,"DataView"===E?e.byteLength:e.length);break;case"DOMQuad":try{a=new DOMQuad(fe(e.p1,t),fe(e.p2,t),fe(e.p3,t),fe(e.p4,t))}catch(t){ce?a=ce(e):de(E)}break;case"FileList":if(o=function(){var e;try{e=new r.DataTransfer}catch(t){try{e=new r.ClipboardEvent("").clipboardData}catch(e){}}return e&&e.items&&e.files?e:null}(),o){for(h=0,u=T(e);h92||A&&S>94||I&&S>97)return!1;var e=new ArrayBuffer(8),t=le(e,{transfer:[e]});return 0!=e.byteLength||8!=t.byteLength})),ge=function(e,t){if(!c(e))throw U("Transfer option cannot be converted to a sequence");var i=[];d(e,(function(e){$(i,f(e))}));var n,s,a,o,u,p,g=0,y=T(i);if(me)for(o=le(i,{transfer:i});g1&&!u(arguments[1])?f(arguments[1]):void 0,r=i?i.transfer:void 0;return void 0!==r&&(t=new W,ge(r,t)),fe(e,t)}})})),rle=z((()=>{var e=He(),t=rr(),i=gM()(t.setInterval,!0);e({global:!0,bind:!0,forced:t.setInterval!==i},{setInterval:i})})),sle=z((()=>{var e=He(),t=rr(),i=gM()(t.setTimeout,!0);e({global:!0,bind:!0,forced:t.setTimeout!==i},{setTimeout:i})})),ale=z((()=>{rle(),sle()})),I6=z(((e,t)=>{var i=Mt(),r=fi(),n=Gn(),s=r("iterator");t.exports=!i((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,i="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),i+=r+e})),n&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host}))})),gle=z(((e,t)=>{"use strict";var i=Bt(),r=2147483647,n=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",o=RangeError,l=i(s.exec),h=Math.floor,u=String.fromCharCode,c=i("".charCodeAt),p=i([].join),d=i([].push),f=i("".replace),m=i("".split),g=i("".toLowerCase),y=function(e){return e+22+75*(e<26)},v=function(e,t,i){var r=0;for(e=i?h(e/700):e>>1,e+=h(e/t);e>455;)e=h(e/35),r+=36;return h(r+36*e/(e+38))},T=function(e){var t=[];e=function(e){for(var t=[],i=0,r=e.length;i=55296&&n<=56319&&i=l&&nh((r-f)/b))throw o(a);for(f+=(x-l)*b,l=x,i=0;ir)throw o(a);if(n==l){for(var _=f,E=36;;){var w=E<=m?1:E>=m+26?26:E-m;if(_{"use strict";C1();var i=He(),r=rr(),n=si(),s=Bt(),a=Ar(),o=I6(),l=Cn(),h=Ev(),u=Xa(),c=kw(),p=us(),d=yc(),f=Ei(),m=_i(),g=pl(),y=mc(),v=qr(),T=ai(),x=mi(),b=Ya(),_=Mo(),E=x1(),w=vv(),S=ip(),I=fi(),M=qw(),A=I("iterator"),D="URLSearchParams",O=D+"Iterator",R=p.set,C=p.getterFor(D),N=p.getterFor(O),P=Object.getOwnPropertyDescriptor,L=function(e){if(!a)return r[e];var t=P(r,e);return t&&t.value},F=L("fetch"),U=L("Request"),k=L("Headers"),B=U&&U.prototype,H=k&&k.prototype,G=r.RegExp,z=r.TypeError,V=r.decodeURIComponent,j=r.encodeURIComponent,W=s("".charAt),Y=s([].join),X=s([].push),q=s("".replace),Z=s([].shift),K=s([].splice),J=s("".split),$=s("".slice),Q=/\+/g,ee=Array(4),te=function(e){return ee[e-1]||(ee[e-1]=G("((?:%[\\da-f]{2}){"+e+"})","gi"))},ie=function(e){try{return V(e)}catch(t){return e}},re=function(e){var t=q(e,Q," "),i=4;try{return V(t)}catch(e){for(;i;)t=q(t,te(i--),ie);return t}},ne=/[!'()~]|%20/g,se={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ae=function(e){return se[e]},oe=function(e){return q(j(e),ne,ae)},le=c((function(e,t){R(this,{type:O,iterator:E(C(e).entries),kind:t})}),"Iterator",(function(){var e=N(this),t=e.kind,i=e.iterator.next(),r=i.value;return i.done||(i.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),i}),!0),he=function(e){this.entries=[],this.url=null,void 0!==e&&(T(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===W(e,0)?$(e,1):e:x(e)))};he.prototype={type:D,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,i,r,s,a,o,l,h=w(e);if(h)for(i=(t=E(e,h)).next;!(r=n(i,t)).done;){if(a=(s=E(v(r.value))).next,(o=n(a,s)).done||(l=n(a,s)).done||!n(a,s).done)throw z("Expected sequence with length 2");X(this.entries,{key:x(o.value),value:x(l.value)})}else for(var u in e)m(e,u)&&X(this.entries,{key:u,value:x(e[u])})},parseQuery:function(e){if(e)for(var t,i,r=J(e,"&"),n=0;n0?arguments[0]:void 0;R(this,new he(e))},me=fe.prototype;h(me,{append:function(e,t){S(arguments.length,2);var i=C(this);X(i.entries,{key:x(e),value:x(t)}),i.updateURL()},delete:function(e){S(arguments.length,1);for(var t=C(this),i=t.entries,r=x(e),n=0;nt.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,i=C(this).entries,r=g(e,arguments.length>1?arguments[1]:void 0),n=0;n1?pe(arguments[1]):{})}}),f(U)&&(de=function(e){return d(this,B),new U(e,arguments.length>1?pe(arguments[1]):{})},B.constructor=de,de.prototype=B,i({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:de}))),t.exports={URLSearchParams:fe,getState:C}})),tce=z((()=>{"use strict";VF();var e,t=He(),i=Ar(),r=I6(),n=rr(),s=pl(),a=Bt(),o=Cn(),l=Vd(),h=yc(),u=_i(),c=BL(),p=wN(),d=hv(),f=tb().codeAt,m=gle(),g=mi(),y=Xa(),v=ip(),T=H6(),x=us(),b=x.set,_=x.getterFor("URL"),E=T.URLSearchParams,w=T.getState,S=n.URL,I=n.TypeError,M=n.parseInt,A=Math.floor,D=Math.pow,O=a("".charAt),R=a(/./.exec),C=a([].join),N=a(1..toString),P=a([].pop),L=a([].push),F=a("".replace),U=a([].shift),k=a("".split),B=a("".slice),H=a("".toLowerCase),G=a([].unshift),z="Invalid scheme",V="Invalid host",j="Invalid port",W=/[a-z]/i,Y=/[\d+-.a-z]/i,X=/\d/,q=/^0x/i,Z=/^[0-7]+$/,K=/^\d+$/,J=/^[\da-f]+$/i,$=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Q=/[\0\t\n\r #/:<>?@[\\\]^|]/,ee=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,te=/[\t\n\r]/g,ie=function(e){var t,i,r,n;if("number"==typeof e){for(t=[],i=0;i<4;i++)G(t,e%256),e=A(e/256);return C(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,i=1,r=null,n=0,s=0;s<8;s++)0!==e[s]?(n>i&&(t=r,i=n),r=null,n=0):(null===r&&(r=s),++n);return n>i&&(t=r,i=n),t}(e),i=0;i<8;i++)n&&0===e[i]||(n&&(n=!1),r===i?(t+=i?":":"::",n=!0):(t+=N(e[i],16),i<7&&(t+=":")));return"["+t+"]"}return e},re={},ne=c({},re,{" ":1,'"':1,"<":1,">":1,"`":1}),se=c({},ne,{"#":1,"?":1,"{":1,"}":1}),ae=c({},se,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),oe=function(e,t){var i=f(e,0);return i>32&&i<127&&!u(t,e)?e:encodeURIComponent(e)},le={ftp:21,file:null,http:80,https:443,ws:80,wss:443},he=function(e,t){var i;return 2==e.length&&R(W,O(e,0))&&(":"==(i=O(e,1))||!t&&"|"==i)},ue=function(e){var t;return e.length>1&&he(B(e,0,2))&&(2==e.length||"/"===(t=O(e,2))||"\\"===t||"?"===t||"#"===t)},ce=function(e){return"."===e||"%2e"===H(e)},pe=function(e){return".."===(e=H(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},de={},fe={},me={},ge={},ye={},ve={},Te={},xe={},be={},_e={},Ee={},we={},Se={},Ie={},Me={},Ae={},De={},Oe={},Re={},Ce={},Ne={},Pe=function(e,t,i){var r,n,s,a=g(e);if(t){if(n=this.parse(a))throw I(n);this.searchParams=null}else{if(void 0!==i&&(r=new Pe(i,!0)),n=this.parse(a,null,r))throw I(n);(s=w(new E)).bindURL(this),this.searchParams=s}};Pe.prototype={type:"URL",parse:function(t,i,r){var n,s,a,o,l=this,h=i||de,c=0,f="",m=!1,y=!1,v=!1;for(t=g(t),i||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,t=F(t,ee,"")),t=F(t,te,""),n=p(t);c<=n.length;){switch(s=n[c],h){case de:if(!s||!R(W,s)){if(i)return z;h=me;continue}f+=H(s),h=fe;break;case fe:if(s&&(R(Y,s)||"+"==s||"-"==s||"."==s))f+=H(s);else{if(":"!=s){if(i)return z;f="",h=me,c=0;continue}if(i&&(l.isSpecial()!=u(le,f)||"file"==f&&(l.includesCredentials()||null!==l.port)||"file"==l.scheme&&!l.host))return;if(l.scheme=f,i)return void(l.isSpecial()&&le[l.scheme]==l.port&&(l.port=null));f="","file"==l.scheme?h=Ie:l.isSpecial()&&r&&r.scheme==l.scheme?h=ge:l.isSpecial()?h=xe:"/"==n[c+1]?(h=ye,c++):(l.cannotBeABaseURL=!0,L(l.path,""),h=Re)}break;case me:if(!r||r.cannotBeABaseURL&&"#"!=s)return z;if(r.cannotBeABaseURL&&"#"==s){l.scheme=r.scheme,l.path=d(r.path),l.query=r.query,l.fragment="",l.cannotBeABaseURL=!0,h=Ne;break}h="file"==r.scheme?Ie:ve;continue;case ge:if("/"!=s||"/"!=n[c+1]){h=ve;continue}h=be,c++;break;case ye:if("/"==s){h=_e;break}h=Oe;continue;case ve:if(l.scheme=r.scheme,s==e)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=d(r.path),l.query=r.query;else if("/"==s||"\\"==s&&l.isSpecial())h=Te;else if("?"==s)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=d(r.path),l.query="",h=Ce;else{if("#"!=s){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=d(r.path),l.path.length--,h=Oe;continue}l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=d(r.path),l.query=r.query,l.fragment="",h=Ne}break;case Te:if(!l.isSpecial()||"/"!=s&&"\\"!=s){if("/"!=s){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,h=Oe;continue}h=_e}else h=be;break;case xe:if(h=be,"/"!=s||"/"!=O(f,c+1))continue;c++;break;case be:if("/"!=s&&"\\"!=s){h=_e;continue}break;case _e:if("@"==s){m&&(f="%40"+f),m=!0,a=p(f);for(var T=0;T65535)return j;l.port=l.isSpecial()&&_===le[l.scheme]?null:_,f=""}if(i)return;h=De;continue}return j}f+=s;break;case Ie:if(l.scheme="file","/"==s||"\\"==s)h=Me;else{if(!r||"file"!=r.scheme){h=Oe;continue}if(s==e)l.host=r.host,l.path=d(r.path),l.query=r.query;else if("?"==s)l.host=r.host,l.path=d(r.path),l.query="",h=Ce;else{if("#"!=s){ue(C(d(n,c),""))||(l.host=r.host,l.path=d(r.path),l.shortenPath()),h=Oe;continue}l.host=r.host,l.path=d(r.path),l.query=r.query,l.fragment="",h=Ne}}break;case Me:if("/"==s||"\\"==s){h=Ae;break}r&&"file"==r.scheme&&!ue(C(d(n,c),""))&&(he(r.path[0],!0)?L(l.path,r.path[0]):l.host=r.host),h=Oe;continue;case Ae:if(s==e||"/"==s||"\\"==s||"?"==s||"#"==s){if(!i&&he(f))h=Oe;else if(""==f){if(l.host="",i)return;h=De}else{if(o=l.parseHost(f))return o;if("localhost"==l.host&&(l.host=""),i)return;f="",h=De}continue}f+=s;break;case De:if(l.isSpecial()){if(h=Oe,"/"!=s&&"\\"!=s)continue}else if(i||"?"!=s)if(i||"#"!=s){if(s!=e&&(h=Oe,"/"!=s))continue}else l.fragment="",h=Ne;else l.query="",h=Ce;break;case Oe:if(s==e||"/"==s||"\\"==s&&l.isSpecial()||!i&&("?"==s||"#"==s)){if(pe(f)?(l.shortenPath(),"/"!=s&&!("\\"==s&&l.isSpecial())&&L(l.path,"")):ce(f)?"/"!=s&&!("\\"==s&&l.isSpecial())&&L(l.path,""):("file"==l.scheme&&!l.path.length&&he(f)&&(l.host&&(l.host=""),f=O(f,0)+":"),L(l.path,f)),f="","file"==l.scheme&&(s==e||"?"==s||"#"==s))for(;l.path.length>1&&""===l.path[0];)U(l.path);"?"==s?(l.query="",h=Ce):"#"==s&&(l.fragment="",h=Ne)}else f+=oe(s,se);break;case Re:"?"==s?(l.query="",h=Ce):"#"==s?(l.fragment="",h=Ne):s!=e&&(l.path[0]+=oe(s,re));break;case Ce:i||"#"!=s?s!=e&&("'"==s&&l.isSpecial()?l.query+="%27":l.query+="#"==s?"%23":oe(s,re)):(l.fragment="",h=Ne);break;case Ne:s!=e&&(l.fragment+=oe(s,ne))}c++}},parseHost:function(e){var t,i,r;if("["==O(e,0)){if("]"!=O(e,e.length-1)||(t=function(e){var t,i,r,n,s,a,o,l=[0,0,0,0,0,0,0,0],h=0,u=null,c=0,p=function(){return O(e,c)};if(":"==p()){if(":"!=O(e,1))return;c+=2,u=++h}for(;p();){if(8==h)return;if(":"!=p()){for(t=i=0;i<4&&R(J,p());)t=16*t+M(p(),16),c++,i++;if("."==p()){if(0==i||(c-=i,h>6))return;for(r=0;p();){if(n=null,r>0){if(!("."==p()&&r<4))return;c++}if(!R(X,p()))return;for(;R(X,p());){if(s=M(p(),10),null===n)n=s;else{if(0==n)return;n=10*n+s}if(n>255)return;c++}l[h]=256*l[h]+n,(2==++r||4==r)&&h++}if(4!=r)return;break}if(":"==p()){if(c++,!p())return}else if(p())return;l[h++]=t}else{if(null!==u)return;c++,u=++h}}if(null!==u)for(a=h-u,h=7;0!=h&&a>0;)o=l[h],l[h--]=l[u+a-1],l[u+--a]=o;else if(8!=h)return;return l}(B(e,1,-1)),!t))return V;this.host=t}else if(this.isSpecial()){if(e=m(e),R($,e)||(t=function(e){var t,i,r,n,s,a,o,l=k(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(i=[],r=0;r1&&"0"==O(n,0)&&(s=R(q,n)?16:8,n=B(n,8==s?1:2)),""===n)a=0;else{if(!R(10==s?K:8==s?Z:J,n))return e;a=M(n,s)}L(i,a)}for(r=0;r=D(256,5-t))return null}else if(a>255)return null;for(o=P(i),r=0;r1?arguments[1]:void 0,n=b(t,new Pe(e,!1,r));i||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},ke=Ue.prototype,Be=function(e,t){return{get:function(){return _(this)[e]()},set:t&&function(e){return _(this)[t](e)},configurable:!0,enumerable:!0}};i&&(l(ke,"href",Be("serialize","setHref")),l(ke,"origin",Be("getOrigin")),l(ke,"protocol",Be("getProtocol","setProtocol")),l(ke,"username",Be("getUsername","setUsername")),l(ke,"password",Be("getPassword","setPassword")),l(ke,"host",Be("getHost","setHost")),l(ke,"hostname",Be("getHostname","setHostname")),l(ke,"port",Be("getPort","setPort")),l(ke,"pathname",Be("getPathname","setPathname")),l(ke,"search",Be("getSearch","setSearch")),l(ke,"searchParams",Be("getSearchParams")),l(ke,"hash",Be("getHash","setHash"))),o(ke,"toJSON",(function(){return _(this).serialize()}),{enumerable:!0}),o(ke,"toString",(function(){return _(this).serialize()}),{enumerable:!0}),S&&(Le=S.createObjectURL,Fe=S.revokeObjectURL,Le&&o(Ue,"createObjectURL",s(Le,S)),Fe&&o(Ue,"revokeObjectURL",s(Fe,S))),y(Ue,"URL"),t({global:!0,constructor:!0,forced:!r,sham:!i},{URL:Ue})})),rce=z((()=>{tce()})),ice=z((()=>{"use strict";var e=He(),t=si();e({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return t(URL.prototype.toString,this)}})})),nce=z((()=>{H6()})),ace=z(((e,t)=>{IW(),CW(),AW(),OW(),PW(),NW(),LW(),FW(),HW(),UW(),BW(),kW(),GW(),VW(),zW(),uq(),mq(),Oq(),Fq(),Uq(),jq(),Xq(),Kq(),Qq(),eY(),rY(),nY(),oY(),lY(),hY(),pY(),mY(),SY(),wY(),MY(),DY(),C1(),KY(),eX(),tX(),iX(),sX(),uX(),pX(),fX(),vX(),yX(),NX(),HX(),UX(),BX(),kX(),GX(),f$(),w$(),L$(),H$(),U$(),k$(),z$(),j$(),eK(),tK(),aK(),uK(),pK(),yK(),bK(),SK(),wK(),iN(),RK(),zK(),qK(),$K(),ZK(),QK(),eZ(),iZ(),sZ(),lZ(),uZ(),pZ(),fZ(),mZ(),gZ(),vZ(),EZ(),IZ(),_Z(),SZ(),FZ(),HZ(),kZ(),VZ(),zZ(),jZ(),WZ(),qZ(),JZ(),aJ(),hJ(),vJ(),EJ(),SJ(),wJ(),DJ(),AJ(),PJ(),NJ(),UJ(),BJ(),kJ(),zJ(),jJ(),WJ(),YJ(),XJ(),KJ(),JJ(),eQ(),rQ(),nQ(),sQ(),aQ(),oQ(),mQ(),gQ(),vQ(),EQ(),bQ(),IQ(),SQ(),Hee(),Uee(),kee(),jee(),Wee(),Jee(),tte(),rte(),ate(),ote(),lte(),cte(),ute(),hte(),pte(),vte(),Tte(),Ete(),Fte(),Ute(),HR(),jte(),qte(),$te(),Jte(),ere(),tre(),sre(),pre(),mre(),vre(),VF(),Cre(),kre(),Vre(),zre(),Yre(),Xre(),eie(),sie(),lie(),fie(),Tie(),bie(),Sie(),Cie(),Lie(),Bie(),kie(),Gie(),Vie(),zie(),jie(),Wie(),qie(),Yie(),Xie(),$ie(),Kie(),Zie(),Sne(),wne(),Rne(),Mne(),Dne(),Cne(),Ane(),One(),Pne(),Lne(),Hne(),Bne(),Gne(),$ne(),Zne(),Qne(),tse(),ise(),sse(),ase(),lse(),use(),mse(),vse(),Tse(),bse(),Ise(),Sse(),Rse(),Dse(),Lse(),Hse(),Bse(),Wse(),Xse(),Qse(),tae(),aae(),Iae(),Sae(),Nae(),zae(),Kae(),roe(),goe(),Ioe(),Soe(),Foe(),Hoe(),Boe(),Qoe(),ale(),rce(),ice(),nce(),t.exports=xw()})),oce=z(((e,t)=>{var i=function(e){"use strict";var t,i=Object.prototype,r=i.hasOwnProperty,n=Object.defineProperty||function(e,t,i){e[t]=i.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",o=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function h(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(e){h=function(e,t,i){return e[t]=i}}function u(e,t,i,r){var s=t&&t.prototype instanceof g?t:g,a=Object.create(s.prototype),o=new D(r||[]);return n(a,"_invoke",{value:S(e,i,o)}),a}function c(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var p="suspendedStart",d="executing",f="completed",m={};function g(){}function y(){}function v(){}var T={};h(T,a,(function(){return this}));var x=Object.getPrototypeOf,b=x&&x(x(O([])));b&&b!==i&&r.call(b,a)&&(T=b);var _=v.prototype=g.prototype=Object.create(T);function E(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function i(n,s,a,o){var l=c(e[n],e,s);if("throw"!==l.type){var h=l.arg,u=h.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){i("next",e,a,o)}),(function(e){i("throw",e,a,o)})):t.resolve(u).then((function(e){h.value=e,a(h)}),(function(e){return i("throw",e,a,o)}))}o(l.arg)}var s;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return s=s?s.then(n,n):n()}})}function S(e,t,i){var r=p;return function(n,s){if(r===d)throw new Error("Generator is already running");if(r===f){if("throw"===n)throw s;return R()}for(i.method=n,i.arg=s;;){var a=i.delegate;if(a){var o=I(a,i);if(o){if(o===m)continue;return o}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===p)throw r=f,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=d;var l=c(e,t,i);if("normal"===l.type){if(r=i.done?f:"suspendedYield",l.arg===m)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(r=f,i.method="throw",i.arg=l.arg)}}}function I(e,i){var r=i.method,n=e.iterator[r];if(n===t)return i.delegate=null,"throw"===r&&e.iterator.return&&(i.method="return",i.arg=t,I(e,i),"throw"===i.method)||"return"!==r&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var s=c(n,e.iterator,i.arg);if("throw"===s.type)return i.method="throw",i.arg=s.arg,i.delegate=null,m;var a=s.arg;return a?a.done?(i[e.resultName]=a.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,m):a:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,m)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function O(e){if(e){var i=e[a];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,s=function i(){for(;++n=0;--s){var a=this.tryEntries[s],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),h=r.call(a,"finallyLoc");if(l&&h){if(this.prev=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),A(i),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var r=i.completion;if("throw"===r.type){var n=r.arg;A(i)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,i,r){return this.delegate={iterator:O(e),resultName:i,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}("object"==typeof t?t.exports:{});try{regeneratorRuntime=i}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}})),ope=z(((e,t)=>{!function(e,i){"use strict";"function"==typeof define&&define.amd?define(i):"object"==typeof t&&t.exports?t.exports=i():e.log=i()}(e,(function(){"use strict";var e=function(){},t="undefined",i=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function n(e,t){var i=e[t];if("function"==typeof i.bind)return i.bind(e);try{return Function.prototype.bind.call(i,e)}catch(t){return function(){return Function.prototype.apply.apply(i,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(r){return"debug"===r&&(r="log"),typeof console!==t&&("trace"===r&&i?s:void 0!==console[r]?n(console,r):void 0!==console.log?n(console,"log"):e)}function o(t,i){for(var n=0;n=0&&i<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+i;if(s=i,!1!==n&&function(e){var i=(r[e]||"silent").toUpperCase();if(typeof window!==t&&l){try{return void(window.localStorage[l]=i)}catch(e){}try{window.document.cookie=encodeURIComponent(l)+"="+i+";"}catch(e){}}}(i),o.call(a,i,e),typeof console===t&&i{var i,r;i=e,r=function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var i=0;it?1:e0))break;if(null===t.right)break;if(i(e,t.right.key)>0&&(l=t.right,t.right=l.left,l.left=t,null===(t=l).right))break;s.right=t,s=t,t=t.right}}return s.right=t.left,a.left=t.right,t.left=n.right,t.right=n.left,t}function a(e,t,i,n){var a=new r(e,t);if(null===i)return a.left=a.right=null,a;var o=n(e,(i=s(e,i,n)).key);return o<0?(a.left=i.left,a.right=i,i.left=null):o>=0&&(a.right=i.right,a.left=i,i.right=null),a}function o(e,t,i){var r=null,n=null;if(t){var a=i((t=s(e,t,i)).key,e);0===a?(r=t.left,n=t.right):a<0?(n=t.right,t.right=null,r=t):(r=t.left,t.left=null,n=t)}return{left:r,right:n}}function l(e,t,i,r,n){if(e){r(t+(i?"└── ":"├── ")+n(e)+"\n");var s=t+(i?" ":"│ ");e.left&&l(e.left,s,!1,r,n),e.right&&l(e.right,s,!0,r,n)}}var h=function(){function e(e){void 0===e&&(e=n),this._root=null,this._size=0,this._comparator=e}return e.prototype.insert=function(e,t){return this._size++,this._root=a(e,t,this._root,this._comparator)},e.prototype.add=function(e,t){var i=new r(e,t);null===this._root&&(i.left=i.right=null,this._size++,this._root=i);var n=this._comparator,a=s(e,this._root,n),o=n(e,a.key);return 0===o?this._root=a:(o<0?(i.left=a.left,i.right=a,a.left=null):o>0&&(i.right=a.right,i.left=a,a.right=null),this._size++,this._root=i),this._root},e.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},e.prototype._remove=function(e,t,i){var r;return null===t?null:0===i(e,(t=s(e,t,i)).key)?(null===t.left?r=t.right:(r=s(e,t.left,i)).right=t.right,this._size--,r):t},e.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=s(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},e.prototype.findStatic=function(e){for(var t=this._root,i=this._comparator;t;){var r=i(e,t.key);if(0===r)return t;t=r<0?t.left:t.right}return null},e.prototype.find=function(e){return this._root&&(this._root=s(e,this._root,this._comparator),0!==this._comparator(e,this._root.key))?null:this._root},e.prototype.contains=function(e){for(var t=this._root,i=this._comparator;t;){var r=i(e,t.key);if(0===r)return!0;t=r<0?t.left:t.right}return!1},e.prototype.forEach=function(e,t){for(var i=this._root,r=[],n=!1;!n;)null!==i?(r.push(i),i=i.left):0!==r.length?(i=r.pop(),e.call(t,i),i=i.right):n=!0;return this},e.prototype.range=function(e,t,i,r){for(var n=[],s=this._comparator,a=this._root;0!==n.length||a;)if(a)n.push(a),a=a.left;else{if(s((a=n.pop()).key,t)>0)break;if(s(a.key,e)>=0&&i.call(r,a))return this;a=a.right}return this},e.prototype.keys=function(){var e=[];return this.forEach((function(t){var i=t.key;return e.push(i)})),e},e.prototype.values=function(){var e=[];return this.forEach((function(t){var i=t.data;return e.push(i)})),e},e.prototype.min=function(){return this._root?this.minNode(this._root).key:null},e.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},e.prototype.minNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.left;)e=e.left;return e},e.prototype.maxNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.right;)e=e.right;return e},e.prototype.at=function(e){for(var t=this._root,i=!1,r=0,n=[];!i;)if(t)n.push(t),t=t.left;else if(n.length>0){if(t=n.pop(),r===e)return t;r++,t=t.right}else i=!0;return null},e.prototype.next=function(e){var t=this._root,i=null;if(e.right){for(i=e.right;i.left;)i=i.left;return i}for(var r=this._comparator;t;){var n=r(e.key,t.key);if(0===n)break;n<0?(i=t,t=t.left):t=t.right}return i},e.prototype.prev=function(e){var t=this._root,i=null;if(null!==e.left){for(i=e.left;i.right;)i=i.right;return i}for(var r=this._comparator;t;){var n=r(e.key,t.key);if(0===n)break;n<0?t=t.left:(i=t,t=t.right)}return i},e.prototype.clear=function(){return this._root=null,this._size=0,this},e.prototype.toList=function(){return function(e){for(var t=e,i=[],n=!1,s=new r(null,null),a=s;!n;)t?(i.push(t),t=t.left):i.length>0?t=(t=a=a.next=i.pop()).right:n=!0;return a.next=null,s.next}(this._root)},e.prototype.load=function(e,t,i){void 0===t&&(t=[]),void 0===i&&(i=!1);var n=e.length,s=this._comparator;if(i&&p(e,t,0,n-1,s),null===this._root)this._root=u(e,t,0,n),this._size=n;else{var a=function(e,t,i){for(var n=new r(null,null),s=n,a=e,o=t;null!==a&&null!==o;)i(a.key,o.key)<0?(s.next=a,a=a.next):(s.next=o,o=o.next),s=s.next;return null!==a?s.next=a:null!==o&&(s.next=o),n.next}(this.toList(),function(e,t){for(var i=new r(null,null),n=i,s=0;s0){var a=i+Math.floor(s/2),o=e[a],l=t[a],h=new r(o,l);return h.left=u(e,t,i,a),h.right=u(e,t,a+1,n),h}return null}function c(e,t,i){var r=i-t;if(r>0){var n=t+Math.floor(r/2),s=c(e,t,n),a=e.head;return a.left=s,e.head=e.head.next,a.right=c(e,n+1,i),a}return null}function p(e,t,i,r,n){if(!(i>=r)){for(var s=e[i+r>>1],a=i-1,o=r+1;;){do{a++}while(n(e[a],s)<0);do{o--}while(n(e[o],s)>0);if(a>=o)break;var l=e[a];e[a]=e[o],e[o]=l,l=t[a],t[a]=t[o],t[o]=l}p(e,t,i,o,n),p(e,t,o+1,r,n)}}var d=function(e,t){return e.ll.x<=t.x&&t.x<=e.ur.x&&e.ll.y<=t.y&&t.y<=e.ur.y},f=function(e,t){if(t.ur.xt.x?1:e.yt.y?1:0}}]),i(t,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var t=e.point.events,i=0,r=t.length;i=0&&l>=0?ah?-1:0:s<0&&l<0?ah?1:0:ls?1:0}}}]),t}(),O=0,R=function(){function t(i,r,n,s){e(this,t),this.id=++O,this.leftSE=i,i.segment=this,i.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=i,this.rings=n,this.windings=s}return i(t,null,[{key:"compare",value:function(e,t){var i=e.leftSE.point.x,r=t.leftSE.point.x,n=e.rightSE.point.x,s=t.rightSE.point.x;if(sa&&o>l)return-1;var u=e.comparePoint(t.leftSE.point);if(u<0)return 1;if(u>0)return-1;var c=t.comparePoint(e.rightSE.point);return 0!==c?c:-1}if(i>r){if(ao&&a>h)return 1;var p=t.comparePoint(e.leftSE.point);if(0!==p)return p;var d=e.comparePoint(t.rightSE.point);return d<0?1:d>0?-1:1}if(ao)return 1;if(ns){var m=e.comparePoint(t.rightSE.point);if(m<0)return 1;if(m>0)return-1}if(n!==s){var g=l-a,y=n-i,v=h-o,T=s-r;if(g>y&&vT)return-1}return n>s?1:nh?1:e.idt.id?1:0}}]),i(t,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:et?e:t}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var t=this.leftSE.point,i=this.rightSE.point,r=this.vector();if(t.x===i.x)return e.x===t.x?0:e.x0&&o.swapEvents(),D.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(n.checkForConsuming(),s.checkForConsuming()),i}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var t=0,i=this.windings.length;t0){var s=i;i=r,r=s}if(i.prev===r){var a=i;i=r,r=a}for(var o=0,l=r.rings.length;o0))throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));n=i,s=e,a=-1}return new t(new D(n,!0),new D(s,!1),[r],[a])}}]),t}(),C=function(){function t(i,r,n){if(e(this,t),!Array.isArray(i)||0===i.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=n,this.segments=[],"number"!=typeof i[0][0]||"number"!=typeof i[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var s=x.round(i[0][0],i[0][1]);this.bbox={ll:{x:s.x,y:s.y},ur:{x:s.x,y:s.y}};for(var a=s,o=1,l=i.length;othis.bbox.ur.x&&(this.bbox.ur.x=h.x),h.y>this.bbox.ur.y&&(this.bbox.ur.y=h.y),a=h)}(s.x!==a.x||s.y!==a.y)&&this.segments.push(R.fromRing(a,s,this))}return i(t,[{key:"getSweepEvents",value:function(){for(var e=[],t=0,i=this.segments.length;tthis.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.interiorRings.push(a)}this.multiPoly=r}return i(t,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),t=0,i=this.interiorRings.length;tthis.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.polys.push(a)}this.isSubject=r}return i(t,[{key:"getSweepEvents",value:function(){for(var e=[],t=0,i=this.polys.length;t0&&(e=r)}for(var n=e.segment.prevInResult(),s=n?n.prevInResult():null;;){if(!n)return null;if(!s)return n.ringOut;if(s.ringOut!==n.ringOut)return s.ringOut.enclosingRing()!==n.ringOut?n.ringOut:n.ringOut.enclosingRing();n=s.prevInResult(),s=n?n.prevInResult():null}}}]),t}(),F=function(){function t(i){e(this,t),this.exteriorRing=i,i.poly=this,this.interiorRings=[]}return i(t,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(null===e[0])return null;for(var t=0,i=this.interiorRings.length;t1&&void 0!==arguments[1]?arguments[1]:R.compare;e(this,t),this.queue=i,this.tree=new h(r),this.segments=[]}return i(t,[{key:"process",value:function(e){var t=e.segment,i=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),i;var r=e.isLeft?this.tree.insert(t):this.tree.find(t);if(!r)throw new Error("Unable to find segment #".concat(t.id," ")+"[".concat(t.leftSE.point.x,", ").concat(t.leftSE.point.y,"] -> ")+"[".concat(t.rightSE.point.x,", ").concat(t.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var n=r,s=r,a=void 0,o=void 0;void 0===a;)null===(n=this.tree.prev(n))?a=null:void 0===n.key.consumedBy&&(a=n.key);for(;void 0===o;)null===(s=this.tree.next(s))?o=null:void 0===s.key.consumedBy&&(o=s.key);if(e.isLeft){var l=null;if(a){var h=a.getIntersection(t);if(null!==h&&(t.isAnEndpoint(h)||(l=h),!a.isAnEndpoint(h)))for(var u=this._splitSafely(a,h),c=0,p=u.length;c0?(this.tree.remove(t),i.push(e)):(this.segments.push(t),t.prev=a)}else{if(a&&o){var _=a.getIntersection(o);if(null!==_){if(!a.isAnEndpoint(_))for(var E=this._splitSafely(a,_),w=0,S=E.length;wB)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var _=new k(m),E=m.size,w=m.pop();w;){var S=w.key;if(m.size===E){var I=S.segment;throw new Error("Unable to pop() ".concat(S.isLeft?"left":"right"," SweepEvent ")+"[".concat(S.point.x,", ").concat(S.point.y,"] from segment #").concat(I.id," ")+"[".concat(I.leftSE.point.x,", ").concat(I.leftSE.point.y,"] -> ")+"[".concat(I.rightSE.point.x,", ").concat(I.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(m.size>B)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(_.segments.length>H)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var M=_.process(S),A=0,O=M.length;A1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r{"use strict";t.exports=function(e,t,r){var n=e*t,s=i*e,a=s-(s-e),o=e-a,l=i*t,h=l-(l-t),u=t-h,c=o*u-(n-a*h-o*h-a*u);return r?(r[0]=c,r[1]=n,r):[c,n]};var i=+(Math.pow(2,27)+1)})),FB=z(((e,t)=>{"use strict";t.exports=function(e,t){var i=0|e.length,r=0|t.length;if(1===i&&1===r)return function(e,t){var i=e+t,r=i-e,n=i-r,s=t-r,a=e-n,o=a+s;return o?[o,i]:[i]}(e[0],t[0]);var n,s,a=new Array(i+r),o=0,l=0,h=0,u=Math.abs,c=e[l],p=u(c),d=t[h],f=u(d);p=r?(n=c,(l+=1){"use strict";t.exports=function(e,t,i){var r=e+t,n=r-e,s=t-n,a=e-(r-n);return i?(i[0]=a+s,i[1]=r,i):[a+s,r]}})),UB=z(((e,t)=>{"use strict";var i=VC(),r=Hpe();t.exports=function(e,t){var n=e.length;if(1===n){var s=i(e[0],t);return s[0]?s:[s[1]]}var a=new Array(2*n),o=[.1,.1],l=[.1,.1],h=0;i(e[0],t,o),o[0]&&(a[h++]=o[0]);for(var u=1;u{"use strict";t.exports=function(e){for(var t=e.length,i=e[e.length-1],r=t,n=t-2;n>=0;--n){var s=i;(l=(o=e[n])-((i=s+o)-s))&&(e[--r]=i,i=l)}var a=0;for(n=r;n{"use strict";t.exports=function(e,t){var i=0|e.length,r=0|t.length;if(1===i&&1===r)return function(e,t){var i=e+t,r=i-e,n=i-r,s=t-r,a=e-n,o=a+s;return o?[o,i]:[i]}(e[0],-t[0]);var n,s,a=new Array(i+r),o=0,l=0,h=0,u=Math.abs,c=e[l],p=u(c),d=-t[h],f=u(d);p=r?(n=c,(l+=1){"use strict";var i=VC(),r=FB(),n=UB(),s=Vpe();function a(e,t,i,r){return function(i,n,s){var a=e(e(t(n[1],s[0]),t(-s[1],n[0])),e(t(i[1],n[0]),t(-n[1],i[0]))),o=e(t(i[1],s[0]),t(-s[1],i[0])),l=r(a,o);return l[l.length-1]}}function o(e,t,i,r){return function(n,s,a,o){var l=e(e(i(e(t(a[1],o[0]),t(-o[1],a[0])),s[2]),e(i(e(t(s[1],o[0]),t(-o[1],s[0])),-a[2]),i(e(t(s[1],a[0]),t(-a[1],s[0])),o[2]))),e(i(e(t(s[1],o[0]),t(-o[1],s[0])),n[2]),e(i(e(t(n[1],o[0]),t(-o[1],n[0])),-s[2]),i(e(t(n[1],s[0]),t(-s[1],n[0])),o[2])))),h=e(e(i(e(t(a[1],o[0]),t(-o[1],a[0])),n[2]),e(i(e(t(n[1],o[0]),t(-o[1],n[0])),-a[2]),i(e(t(n[1],a[0]),t(-a[1],n[0])),o[2]))),e(i(e(t(s[1],a[0]),t(-a[1],s[0])),n[2]),e(i(e(t(n[1],a[0]),t(-a[1],n[0])),-s[2]),i(e(t(n[1],s[0]),t(-s[1],n[0])),a[2])))),u=r(l,h);return u[u.length-1]}}function l(e,t,i,r){return function(n,s,a,o,l){var h=e(e(e(i(e(i(e(t(o[1],l[0]),t(-l[1],o[0])),a[2]),e(i(e(t(a[1],l[0]),t(-l[1],a[0])),-o[2]),i(e(t(a[1],o[0]),t(-o[1],a[0])),l[2]))),s[3]),e(i(e(i(e(t(o[1],l[0]),t(-l[1],o[0])),s[2]),e(i(e(t(s[1],l[0]),t(-l[1],s[0])),-o[2]),i(e(t(s[1],o[0]),t(-o[1],s[0])),l[2]))),-a[3]),i(e(i(e(t(a[1],l[0]),t(-l[1],a[0])),s[2]),e(i(e(t(s[1],l[0]),t(-l[1],s[0])),-a[2]),i(e(t(s[1],a[0]),t(-a[1],s[0])),l[2]))),o[3]))),e(i(e(i(e(t(a[1],o[0]),t(-o[1],a[0])),s[2]),e(i(e(t(s[1],o[0]),t(-o[1],s[0])),-a[2]),i(e(t(s[1],a[0]),t(-a[1],s[0])),o[2]))),-l[3]),e(i(e(i(e(t(o[1],l[0]),t(-l[1],o[0])),s[2]),e(i(e(t(s[1],l[0]),t(-l[1],s[0])),-o[2]),i(e(t(s[1],o[0]),t(-o[1],s[0])),l[2]))),n[3]),i(e(i(e(t(o[1],l[0]),t(-l[1],o[0])),n[2]),e(i(e(t(n[1],l[0]),t(-l[1],n[0])),-o[2]),i(e(t(n[1],o[0]),t(-o[1],n[0])),l[2]))),-s[3])))),e(e(i(e(i(e(t(s[1],l[0]),t(-l[1],s[0])),n[2]),e(i(e(t(n[1],l[0]),t(-l[1],n[0])),-s[2]),i(e(t(n[1],s[0]),t(-s[1],n[0])),l[2]))),o[3]),e(i(e(i(e(t(s[1],o[0]),t(-o[1],s[0])),n[2]),e(i(e(t(n[1],o[0]),t(-o[1],n[0])),-s[2]),i(e(t(n[1],s[0]),t(-s[1],n[0])),o[2]))),-l[3]),i(e(i(e(t(a[1],o[0]),t(-o[1],a[0])),s[2]),e(i(e(t(s[1],o[0]),t(-o[1],s[0])),-a[2]),i(e(t(s[1],a[0]),t(-a[1],s[0])),o[2]))),n[3]))),e(i(e(i(e(t(a[1],o[0]),t(-o[1],a[0])),n[2]),e(i(e(t(n[1],o[0]),t(-o[1],n[0])),-a[2]),i(e(t(n[1],a[0]),t(-a[1],n[0])),o[2]))),-s[3]),e(i(e(i(e(t(s[1],o[0]),t(-o[1],s[0])),n[2]),e(i(e(t(n[1],o[0]),t(-o[1],n[0])),-s[2]),i(e(t(n[1],s[0]),t(-s[1],n[0])),o[2]))),a[3]),i(e(i(e(t(s[1],a[0]),t(-a[1],s[0])),n[2]),e(i(e(t(n[1],a[0]),t(-a[1],n[0])),-s[2]),i(e(t(n[1],s[0]),t(-s[1],n[0])),a[2]))),-o[3]))))),u=e(e(e(i(e(i(e(t(o[1],l[0]),t(-l[1],o[0])),a[2]),e(i(e(t(a[1],l[0]),t(-l[1],a[0])),-o[2]),i(e(t(a[1],o[0]),t(-o[1],a[0])),l[2]))),n[3]),i(e(i(e(t(o[1],l[0]),t(-l[1],o[0])),n[2]),e(i(e(t(n[1],l[0]),t(-l[1],n[0])),-o[2]),i(e(t(n[1],o[0]),t(-o[1],n[0])),l[2]))),-a[3])),e(i(e(i(e(t(a[1],l[0]),t(-l[1],a[0])),n[2]),e(i(e(t(n[1],l[0]),t(-l[1],n[0])),-a[2]),i(e(t(n[1],a[0]),t(-a[1],n[0])),l[2]))),o[3]),i(e(i(e(t(a[1],o[0]),t(-o[1],a[0])),n[2]),e(i(e(t(n[1],o[0]),t(-o[1],n[0])),-a[2]),i(e(t(n[1],a[0]),t(-a[1],n[0])),o[2]))),-l[3]))),e(e(i(e(i(e(t(a[1],l[0]),t(-l[1],a[0])),s[2]),e(i(e(t(s[1],l[0]),t(-l[1],s[0])),-a[2]),i(e(t(s[1],a[0]),t(-a[1],s[0])),l[2]))),n[3]),i(e(i(e(t(a[1],l[0]),t(-l[1],a[0])),n[2]),e(i(e(t(n[1],l[0]),t(-l[1],n[0])),-a[2]),i(e(t(n[1],a[0]),t(-a[1],n[0])),l[2]))),-s[3])),e(i(e(i(e(t(s[1],l[0]),t(-l[1],s[0])),n[2]),e(i(e(t(n[1],l[0]),t(-l[1],n[0])),-s[2]),i(e(t(n[1],s[0]),t(-s[1],n[0])),l[2]))),a[3]),i(e(i(e(t(s[1],a[0]),t(-a[1],s[0])),n[2]),e(i(e(t(n[1],a[0]),t(-a[1],n[0])),-s[2]),i(e(t(n[1],s[0]),t(-s[1],n[0])),a[2]))),-l[3])))),c=r(h,u);return c[c.length-1]}}function h(e){return(3===e?a:4===e?o:l)(r,i,n,s)}var u=h(3),c=h(4),p=[function(){return 0},function(){return 0},function(e,t){return t[0]-e[0]},function(e,t,i){var r,n=(e[1]-i[1])*(t[0]-i[0]),s=(e[0]-i[0])*(t[1]-i[1]),a=n-s;if(n>0){if(s<=0)return a;r=n+s}else{if(!(n<0))return a;if(s>=0)return a;r=-(n+s)}var o=33306690738754716e-32*r;return a>=o||a<=-o?a:u(e,t,i)},function(e,t,i,r){var n=e[0]-r[0],s=t[0]-r[0],a=i[0]-r[0],o=e[1]-r[1],l=t[1]-r[1],h=i[1]-r[1],u=e[2]-r[2],p=t[2]-r[2],d=i[2]-r[2],f=s*h,m=a*l,g=a*o,y=n*h,v=n*l,T=s*o,x=u*(f-m)+p*(g-y)+d*(v-T),b=7771561172376103e-31*((Math.abs(f)+Math.abs(m))*Math.abs(u)+(Math.abs(g)+Math.abs(y))*Math.abs(p)+(Math.abs(v)+Math.abs(T))*Math.abs(d));return x>b||-x>b?x:c(e,t,i,r)}];function d(e){var t=p[e.length];return t||(t=p[e.length]=h(e.length)),t.apply(void 0,e)}function f(e,t,i,r,n,s,a){return function(t,i,o,l,h){switch(arguments.length){case 0:case 1:return 0;case 2:return r(t,i);case 3:return n(t,i,o);case 4:return s(t,i,o,l);case 5:return a(t,i,o,l,h)}for(var u=new Array(arguments.length),c=0;c{"use strict";t.exports=function(e,t,r,n){var s=i(e,r,n),a=i(t,r,n);if(s>0&&a>0||s<0&&a<0)return!1;var o=i(r,e,t),l=i(n,e,t);return!(o>0&&l>0||o<0&&l<0)&&(0!==s||0!==a||0!==o||0!==l||function(e,t,i,r){for(var n=0;n<2;++n){var s=e[n],a=t[n],o=Math.min(s,a),l=Math.max(s,a),h=i[n],u=r[n],c=Math.min(h,u);if(Math.max(h,u){"use strict";t.exports=function(e,t,o,l){if(!a(e,t,o,l))return[[0],[0],[0]];var h=r([o[1]],[-l[1]]),u=r([-o[0]],[l[0]]),c=r(r(n(u,e[1]),n(u,-t[1])),r(n(h,e[0]),n(h,-t[0]))),p=r(i(-e[0],t[1]),i(e[1],t[0])),d=r(i(-o[0],l[1]),i(o[1],l[0])),f=r(r(n(d,e[0]),n(d,-t[0])),r(n(p,-o[0]),n(p,l[0]))),m=r(r(n(d,e[1]),n(d,-t[1])),r(n(p,-o[1]),n(p,l[1])));return[s(f),s(m),s(c)]};var i=VC(),r=FB(),n=UB(),s=kpe(),a=qpe()})),Kpe=z(((e,t)=>{t.exports=function(e){var t=0,i=e.length;switch(i){case 1:t=e[0];break;case 2:t=e[0]+e[1];break;case 3:t=e[0]+e[1]+e[2];break;case 4:t=e[0]+e[1]+e[2]+e[3];break;default:for(var r=0;r{var i=Xpe(),r=Kpe();function n(e,t){return e[0]===t[0]&&e[1]===t[1]}t.exports=function(e,t){for(var u={},c=e.length,p=[],d=0;d{!function(){"use strict";function e(e,t){var i=e.x-t.x,r=e.y-t.y;return i*i+r*r}function i(e,t,i){var r=t.x,n=t.y,s=i.x-r,a=i.y-n;if(0!==s||0!==a){var o=((e.x-r)*s+(e.y-n)*a)/(s*s+a*a);o>1?(r=i.x,n=i.y):o>0&&(r+=s*o,n+=a*o)}return(s=e.x-r)*s+(a=e.y-n)*a}function r(e,t,n,s,a){for(var o,l=s,h=t+1;hl&&(o=h,l=u)}l>s&&(o-t>1&&r(e,t,o,s,a),a.push(e[o]),n-o>1&&r(e,o,n,s,a))}function n(e,t){var i=e.length-1,n=[e[0]];return r(e,0,i,t,n),n.push(e[i]),n}function s(t,i,r){if(t.length<=2)return t;var s=void 0!==i?i*i:1;return t=r?t:function(t,i){for(var r,n=t[0],s=[n],a=1,o=t.length;ai&&(s.push(r),n=r);return n!==r&&s.push(r),s}(t,s),t=n(t,s)}"function"==typeof define&&define.amd?define((function(){return s})):void 0!==t?(t.exports=s,t.exports.default=s):"undefined"!=typeof self?self.simplify=s:window.simplify=s}()})),dde=z(((e,t)=>{var i,r;i=e,r=function(){"use strict";var e=Math.imul,t=Math.clz32;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){for(var i,r=0;re.length)&&(t=e.length);for(var i=0,r=Array(t);id.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return i}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(d,e);var f=function(e){var t=a();return function(){var i,r=n(e);if(t){var s=n(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return u(this,i)}}(d);return function(e,t,i){t&&r(e.prototype,t),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1})}(d,[{key:"toDebugString",value:function(){var e,t=["BigInt["],i=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=p(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,o=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw s}}}}(this);try{for(i.s();!(e=i.n()).done;){var r=e.value;t.push((r&&(r>>>0).toString(16))+", ")}}catch(e){i.e(e)}finally{i.f()}return t.push("]"),t.join("")}},{key:"toString",value:function(){var e=0e||36this.length&&(i=this.length);for(var r=32767&e,n=e>>>15,s=0,a=t,o=0;o>>15,c=d.__imul(h,r),p=d.__imul(h,n),f=d.__imul(u,r),m=a+c+s;s=m>>>30,m&=1073741823,s+=(m+=((32767&p)<<15)+((32767&f)<<15))>>>30,a=d.__imul(u,n)+(p>>>15)+(f>>>15),this.__setDigit(o,1073741823&m)}if(0!==s||0!==a)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(e,t,i){for(var r,n=0,s=0;s>>15,this.__setHalfDigit(t+s,32767&r);return n}},{key:"__inplaceSub",value:function(e,t,i){var r=0;if(1&t){t>>=1;for(var n=this.__digit(t),s=32767&n,a=0;a>>1;a++){var o=e.__digit(a),l=(n>>>15)-(32767&o)-r;r=1&l>>>15,this.__setDigit(t+a,(32767&l)<<15|32767&s),r=1&(s=(32767&(n=this.__digit(t+a+1)))-(o>>>15)-r)>>>15}var h=e.__digit(a),u=(n>>>15)-(32767&h)-r;if(r=1&u>>>15,this.__setDigit(t+a,(32767&u)<<15|32767&s),t+a+1>=this.length)throw new RangeError("out of bounds");!(1&i)&&(r=1&(s=(32767&(n=this.__digit(t+a+1)))-(h>>>15)-r)>>>15,this.__setDigit(t+e.length,1073709056&n|32767&s))}else{t>>=1;for(var c=0;c>>15)-(d>>>15)-(r=1&f>>>15);r=1&m>>>15,this.__setDigit(t+c,(32767&m)<<15|32767&f)}var g=this.__digit(t+c),y=e.__digit(c),v=(32767&g)-(32767&y)-r;r=1&v>>>15;var T=0;!(1&i)&&(r=1&(T=(g>>>15)-(y>>>15)-r)>>>15),this.__setDigit(t+c,(32767&T)<<15|32767&v)}return r}},{key:"__inplaceRightShift",value:function(e){if(0!==e){for(var t,i=this.__digit(0)>>>e,r=this.length-1,n=0;n>>e;this.__setDigit(r,i)}}},{key:"__digit",value:function(e){return this[e]}},{key:"__unsignedDigit",value:function(e){return this[e]>>>0}},{key:"__setDigit",value:function(e,t){this[e]=0|t}},{key:"__setDigitGrow",value:function(e,t){this[e]=0|t}},{key:"__halfDigitLength",value:function(){var e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}},{key:"__halfDigit",value:function(e){return 32767&this[e>>>1]>>>15*(1&e)}},{key:"__setHalfDigit",value:function(e,t){var i=e>>>1,r=this.__digit(i),n=1&e?32767&r|t<<15:1073709056&r|32767&t;this.__setDigit(i,n)}}],[{key:"BigInt",value:function(e){var t=Number.isFinite;if("number"==typeof e){if(0===e)return d.__zero();if(d.__isOneDigitInt(e))return 0>e?d.__oneDigit(-e,!0):d.__oneDigit(e,!1);if(!t(e)||l(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return d.__fromDouble(e)}if("string"==typeof e){var r=d.__fromString(e);if(null===r)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return r}if("boolean"==typeof e)return!0===e?d.__oneDigit(1,!1):d.__zero();if("object"===i(e)){if(e.constructor===d)return e;var n=d.__toPrimitive(e);return d.BigInt(n)}throw new TypeError("Cannot convert "+e+" to a BigInt")}},{key:"toNumber",value:function(e){var t=e.length;if(0===t)return 0;if(1===t){var i=e.__unsignedDigit(0);return e.sign?-i:i}var r=e.__digit(t-1),n=d.__clz30(r),s=30*t-n;if(1024>>=12;var c=h-12,p=12<=h?0:o<<20+h,f=20+h;for(0>>30-c,p=o<>>30-f,f-=30;var m=d.__decideRounding(e,f,l,o);if((1===m||0===m&&1==(1&p))&&0==(p=p+1>>>0)&&++u>>>20!=0&&(u=0,1023<++a))return e.sign?-1/0:1/0;var g=e.sign?-2147483648:0;return a=a+1023<<20,d.__kBitConversionInts[1]=g|a|u,d.__kBitConversionInts[0]=p,d.__kBitConversionDouble[0]}},{key:"unaryMinus",value:function(e){if(0===e.length)return e;var t=e.__copy();return t.sign=!e.sign,t}},{key:"bitwiseNot",value:function(e){return e.sign?d.__absoluteSubOne(e).__trim():d.__absoluteAddOne(e,!0)}},{key:"exponentiate",value:function(e,t){if(t.sign)throw new RangeError("Exponent must be positive");if(0===t.length)return d.__oneDigit(1,!1);if(0===e.length)return e;if(1===e.length&&1===e.__digit(0))return!e.sign||1&t.__digit(0)?e:d.unaryMinus(e);if(1=d.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===e.length&&2===e.__digit(0)){var r=1+(0|i/30),n=new d(r,e.sign&&0!=(1&i));n.__initializeDigits();var s=1<>=1;0!==i;i>>=1)o=d.multiply(o,o),1&i&&(a=null===a?o:d.multiply(a,o));return a}},{key:"multiply",value:function(e,t){if(0===e.length)return e;if(0===t.length)return t;var i=e.length+t.length;30<=e.__clzmsd()+t.__clzmsd()&&i--;var r=new d(i,e.sign!==t.sign);r.__initializeDigits();for(var n=0;nd.__absoluteCompare(e,t))return d.__zero();var i,r=e.sign!==t.sign,n=t.__unsignedDigit(0);if(1===t.length&&32767>=n){if(1===n)return r===e.sign?e:d.unaryMinus(e);i=d.__absoluteDivSmall(e,n,null)}else i=d.__absoluteDivLarge(e,t,!0,!1);return i.sign=r,i.__trim()}},{key:"remainder",value:function(e,t){if(0===t.length)throw new RangeError("Division by zero");if(0>d.__absoluteCompare(e,t))return e;var i=t.__unsignedDigit(0);if(1===t.length&&32767>=i){if(1===i)return d.__zero();var r=d.__absoluteModSmall(e,i);return 0===r?d.__zero():d.__oneDigit(r,e.sign)}var n=d.__absoluteDivLarge(e,t,!1,!0);return n.sign=e.sign,n.__trim()}},{key:"add",value:function(e,t){var i=e.sign;return i===t.sign?d.__absoluteAdd(e,t,i):0<=d.__absoluteCompare(e,t)?d.__absoluteSub(e,t,i):d.__absoluteSub(t,e,!i)}},{key:"subtract",value:function(e,t){var i=e.sign;return i===t.sign?0<=d.__absoluteCompare(e,t)?d.__absoluteSub(e,t,i):d.__absoluteSub(t,e,!i):d.__absoluteAdd(e,t,i)}},{key:"leftShift",value:function(e,t){return 0===t.length||0===e.length?e:t.sign?d.__rightShiftByAbsolute(e,t):d.__leftShiftByAbsolute(e,t)}},{key:"signedRightShift",value:function(e,t){return 0===t.length||0===e.length?e:t.sign?d.__leftShiftByAbsolute(e,t):d.__rightShiftByAbsolute(e,t)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(e,t){return 0>d.__compareToBigInt(e,t)}},{key:"lessThanOrEqual",value:function(e,t){return 0>=d.__compareToBigInt(e,t)}},{key:"greaterThan",value:function(e,t){return 0(e=l(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return d.__zero();if(e>=d.__kMaxLengthBits)return t;var i=0|(e+29)/30;if(t.length(e=l(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return d.__zero();if(t.sign){if(e>d.__kMaxLengthBits)throw new RangeError("BigInt too big");return d.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=d.__kMaxLengthBits)return t;var i=0|(e+29)/30;if(t.length>>r))return t}return d.__truncateToNBits(e,t)}},{key:"ADD",value:function(e,t){if(e=d.__toPrimitive(e),t=d.__toPrimitive(t),"string"==typeof e)return"string"!=typeof t&&(t=t.toString()),e+t;if("string"==typeof t)return e.toString()+t;if(e=d.__toNumeric(e),t=d.__toNumeric(t),d.__isBigInt(e)&&d.__isBigInt(t))return d.add(e,t);if("number"==typeof e&&"number"==typeof t)return e+t;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(e,t){return d.__compare(e,t,0)}},{key:"LE",value:function(e,t){return d.__compare(e,t,1)}},{key:"GT",value:function(e,t){return d.__compare(e,t,2)}},{key:"GE",value:function(e,t){return d.__compare(e,t,3)}},{key:"EQ",value:function(e,t){for(;;){if(d.__isBigInt(e))return d.__isBigInt(t)?d.equal(e,t):d.EQ(t,e);if("number"==typeof e){if(d.__isBigInt(t))return d.__equalToNumber(t,e);if("object"!==i(t))return e==t;t=d.__toPrimitive(t)}else if("string"==typeof e){if(d.__isBigInt(t))return null!==(e=d.__fromString(e))&&d.equal(e,t);if("object"!==i(t))return e==t;t=d.__toPrimitive(t)}else if("boolean"==typeof e){if(d.__isBigInt(t))return d.__equalToNumber(t,+e);if("object"!==i(t))return e==t;t=d.__toPrimitive(t)}else if("symbol"===i(e)){if(d.__isBigInt(t))return!1;if("object"!==i(t))return e==t;t=d.__toPrimitive(t)}else{if("object"!==i(e))return e==t;if("object"===i(t)&&t.constructor!==d)return e==t;e=d.__toPrimitive(e)}}}},{key:"NE",value:function(e,t){return!d.EQ(e,t)}},{key:"DataViewGetBigInt64",value:function(e,t){var i=2>>30),h.__setDigit(2,o>>>28),h.__trim()}},{key:"DataViewSetBigInt64",value:function(e,t,i){var r=3>>2,2t)n=-t-1;else{if(0===i)return-1;i--,r=e.__digit(i),n=29}var s=1<>>20)-1023,r=1+(0|i/30),n=new d(r,0>e),s=1048575&d.__kBitConversionInts[1]|1048576,a=d.__kBitConversionInts[0],o=i%30,l=0;if(o<20){var h=20-o;l=h+32,t=s>>>h,s=s<<32-h|a>>>h,a<<=32-h}else if(20===o)l=32,t=s,s=a,a=0;else{var u=o-20;l=32-u,t=s<>>32-u,s=a<>>2,s=s<<30|a>>>2,a<<=30):t=0,n.__setDigit(c,t);return n.__trim()}},{key:"__isWhitespace",value:function(e){return 13>=e&&9<=e||(159>=e?32==e:131071>=e?160==e||5760==e:196607>=e?10>=(e&=131071)||40==e||41==e||47==e||95==e||4096==e:65279==e)}},{key:"__fromString",value:function(e){var t=11073741824/o)return null;var h=o*a+l>>>d.__kBitsPerCharTableShift,u=new d(0|(h+29)/30,!1),c=10>t?t:10,p=10>>0>>0>>d.__kBitsPerCharTableShift)/30;u.__inplaceMultiplyAdd(v,y,x)}while(!f)}else{o>>=d.__kBitsPerCharTableShift;var b=[],_=[],E=!1;do{for(var w,S=0,I=0;;){if(w=void 0,s-48>>>0>>0>>l-(s-=30))}if(0!==n){if(r>=e.length)throw new Error("implementation bug");e.__setDigit(r++,n)}for(;r>>1)+(85&r))>>>2)+(51&r))>>>4)+(15&r),s=t-1,a=e.__digit(i-1),o=0|(30*i-d.__clz30(a)+n-1)/n;if(e.sign&&o++,268435456>>g,c=30-g;c>=n;)l[h--]=d.__kConversionChars[u&s],u>>>=n,c-=n}var y=(u|a<>>n-c;0!==u;)l[h--]=d.__kConversionChars[u&s],u>>>=n;if(e.sign&&(l[h--]="-"),-1!==h)throw new Error("implementation bug");return l.join("")}},{key:"__toStringGeneric",value:function(e,t,i){var r=e.length;if(0===r)return"";if(1===r){var n=e.__unsignedDigit(0).toString(t);return!1===i&&e.sign&&(n="-"+n),n}var s,a,o=30*r-d.__clz30(e.__digit(r-1)),l=d.__kMaxBitsPerChar[t]-1,h=o*d.__kBitsPerCharTableMultiplier,u=1+(h=0|(h+=l-1)/l)>>1,c=d.exponentiate(d.__oneDigit(t,!1),d.__oneDigit(u,!1)),p=c.__unsignedDigit(0);if(1===c.length&&32767>=p){(s=new d(e.length,!1)).__initializeDigits();for(var f,m=0,g=2*e.length-1;0<=g;g--)f=m<<15|e.__halfDigit(g),s.__setHalfDigit(g,0|f/p),m=0|f%p;a=m.toString(t)}else{var y=d.__absoluteDivLarge(e,c,!0,!0);s=y.quotient;var v=y.remainder.__trim();a=d.__toStringGeneric(v,t,!0)}s.__trim();for(var T=d.__toStringGeneric(s,t,!0);a.lengthr?d.__absoluteLess(i):0}},{key:"__compareToNumber",value:function(e,i){if(d.__isOneDigitInt(i)){var r=e.sign,n=0>i;if(r!==n)return d.__unequalSign(r);if(0===e.length){if(n)throw new Error("implementation bug");return 0===i?0:-1}if(1s?d.__absoluteGreater(r):at)return d.__unequalSign(i);if(0===t)throw new Error("implementation bug: should be handled elsewhere");if(0===e.length)return-1;d.__kBitConversionDouble[0]=t;var r=2047&d.__kBitConversionInts[1]>>>20;if(2047==r)throw new Error("implementation bug: handled elsewhere");var n=r-1023;if(0>n)return d.__absoluteGreater(i);var s=e.length,a=e.__digit(s-1),o=d.__clz30(a),l=30*s-o,h=n+1;if(lh)return d.__absoluteGreater(i);var u=1048576|1048575&d.__kBitConversionInts[1],c=d.__kBitConversionInts[0],p=29-o;if(p!==(0|(l-1)%30))throw new Error("implementation bug");var f,m=0;if(p<20){var g=20-p;m=g+32,f=u>>>g,u=u<<32-g|c>>>g,c<<=32-g}else if(20===p)m=32,f=u,u=c,c=0;else{var y=p-20;m=32-y,f=u<>>32-y,u=c<>>=0)>(f>>>=0))return d.__absoluteGreater(i);if(a>>2,u=u<<30|c>>>2,c<<=30):f=0;var T=e.__unsignedDigit(v);if(T>f)return d.__absoluteGreater(i);if(Ti&&e.__unsignedDigit(0)===t(i):0===d.__compareToDouble(e,i)}},{key:"__comparisonResultToBool",value:function(e,t){return 0===t?0>e:1===t?0>=e:2===t?0t;case 3:return e>=t}if(d.__isBigInt(e)&&"string"==typeof t)return null!==(t=d.__fromString(t))&&d.__comparisonResultToBool(d.__compareToBigInt(e,t),i);if("string"==typeof e&&d.__isBigInt(t))return null!==(e=d.__fromString(e))&&d.__comparisonResultToBool(d.__compareToBigInt(e,t),i);if(e=d.__toNumeric(e),t=d.__toNumeric(t),d.__isBigInt(e)){if(d.__isBigInt(t))return d.__comparisonResultToBool(d.__compareToBigInt(e,t),i);if("number"!=typeof t)throw new Error("implementation bug");return d.__comparisonResultToBool(d.__compareToNumber(e,t),i)}if("number"!=typeof e)throw new Error("implementation bug");if(d.__isBigInt(t))return d.__comparisonResultToBool(d.__compareToNumber(t,e),2^i);if("number"!=typeof t)throw new Error("implementation bug");return 0===i?et:3===i?e>=t:void 0}},{key:"__absoluteAdd",value:function(e,t,i){if(e.length>>30,s.__setDigit(o,1073741823&n);for(;o>>30,s.__setDigit(o,1073741823&l)}return o>>30,n.__setDigit(a,1073741823&r);for(;a>>30,n.__setDigit(a,1073741823&o)}return n.__trim()}},{key:"__absoluteAddOne",value:function(e,t){var i=2>>30,i.__setDigit(a,1073741823&n);return 0!==s&&i.__setDigitGrow(r,1),i}},{key:"__absoluteSubOne",value:function(e,t){for(var i,r=e.length,n=new d(t=t||r,!1),s=1,a=0;a>>30,n.__setDigit(a,1073741823&i);if(0!==s)throw new Error("implementation bug");for(var o=r;or?0:e.__unsignedDigit(r)>t.__unsignedDigit(r)?1:-1}},{key:"__multiplyAccumulate",value:function(e,t,i,r){if(0!==t){for(var n=32767&t,s=t>>>15,a=0,o=0,l=0;l>>15,f=d.__imul(c,n),m=d.__imul(c,s),g=d.__imul(p,n);a=(h+=o+f+a)>>>30,h&=1073741823,a+=(h+=((32767&m)<<15)+((32767&g)<<15))>>>30,o=d.__imul(p,s)+(m>>>15)+(g>>>15),i.__setDigit(r,1073741823&h)}for(;0!==a||0!==o;r++){var y=i.__digit(r);y+=a+o,o=0,a=y>>>30,i.__setDigit(r,1073741823&y)}}}},{key:"__internalMultiplyAdd",value:function(e,t,i,r,n){for(var s=i,a=0,o=0;o>>15,t),c=h+((32767&u)<<15)+a+s;s=c>>>30,a=u>>>15,n.__setDigit(o,1073741823&c)}if(n.length>r)for(n.__setDigit(r++,s+a);r>>0,a=0|s/t,o=0|(s=((r=0|s%t)<<15|e.__halfDigit(n-1))>>>0)/t;r=0|s%t,i.__setDigit(n>>>1,a<<15|o)}return i}},{key:"__absoluteModSmall",value:function(e,t){for(var i=0,r=2*e.length-1;0<=r;r--)i=0|((i<<15|e.__halfDigit(r))>>>0)%t;return i}},{key:"__absoluteDivLarge",value:function(e,t,i,r){var n=t.__halfDigitLength(),s=t.length,a=e.__halfDigitLength()-n,o=null;i&&(o=new d(a+2>>>1,!1)).__initializeDigits();var l=new d(n+2>>>1,!1);l.__initializeDigits();var h=d.__clz15(t.__halfDigit(n-1));0>>0;m=0|y/c;for(var v=0|y%c,T=t.__halfDigit(n-2),x=u.__halfDigit(f+n-2);d.__imul(m,T)>>>0>(v<<16|x)>>>0&&(m--,!(32767<(v+=c))););}d.__internalMultiplyAdd(t,m,0,s,l);var b=u.__inplaceSub(l,f,n+1);0!==b&&(b=u.__inplaceAdd(t,f,n),u.__setHalfDigit(f+n,32767&u.__halfDigit(f+n)+b),m--),i&&(1&f?p=m<<15:o.__setDigit(f>>>1,p|m))}if(r)return u.__inplaceRightShift(h),i?{quotient:o,remainder:u}:u;if(i)return o;throw new Error("unreachable")}},{key:"__clz15",value:function(e){return d.__clz30(e)-15}},{key:"__specialLeftShift",value:function(e,t,i){var r=e.length,n=new d(r+i,!1);if(0===t){for(var s=0;s>>30-t;return 0i)throw new RangeError("BigInt too big");var r=0|i/30,n=i%30,s=e.length,a=0!==n&&e.__digit(s-1)>>>30-n!=0,o=s+r+(a?1:0),l=new d(o,e.sign);if(0===n){for(var h=0;h>>30-n;if(a)l.__setDigit(s+r,u);else if(0!==u)throw new Error("implementation bug")}return l.__trim()}},{key:"__rightShiftByAbsolute",value:function(e,t){var i=e.length,r=e.sign,n=d.__toShiftAmount(t);if(0>n)return d.__rightShiftByMaximum(r);var s=0|n/30,a=n%30,o=i-s;if(0>=o)return d.__rightShiftByMaximum(r);var l=!1;if(r)if(e.__digit(s)&(1<>>a,m=i-s-1,g=0;g>>a;u.__setDigit(m,f)}return l&&(u=d.__absoluteAddOne(u,!0,u)),u.__trim()}},{key:"__rightShiftByMaximum",value:function(e){return e?d.__oneDigit(1,!0):d.__zero()}},{key:"__toShiftAmount",value:function(e){if(1d.__kMaxLengthBits?-1:t}},{key:"__toPrimitive",value:function(e){var t=1>>o}return r.__setDigit(n,a),r.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(e,t,i){for(var r,n=Math.min,s=0|(e+29)/30,a=new d(s,i),o=0,l=s-1,h=0,u=n(l,t.length);o>>30,a.__setDigit(o,1073741823&r);for(;o>>m)-h,c&=g-1}return a.__setDigit(l,c),a.__trim()}},{key:"__digitPow",value:function(e,t){for(var i=1;0>>=1,e*=e;return i}},{key:"__isOneDigitInt",value:function(e){return(1073741823&e)===e}}]),d}(l(Array));return f.__kMaxLength=33554432,f.__kMaxLengthBits=f.__kMaxLength<<5,f.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],f.__kBitsPerCharTableShift=5,f.__kBitsPerCharTableMultiplier=1<>>0)/t)},f.__imul=e||function(e,t){return 0|e*t},f},"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(i=i||self).JSBI=r()})),mRe=z(((e,t)=>{var i,r;i=e,r=function(){"use strict";function e(e,r,n,s,a){!function e(i,r,n,s,a){for(;s>n;){if(s-n>600){var o=s-n+1,l=r-n+1,h=Math.log(o),u=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*u*(o-u)/o)*(l-o/2<0?-1:1);e(i,r,Math.max(n,Math.floor(r-l*u/o+c)),Math.min(s,Math.floor(r+(o-l)*u/o+c)),a)}var p=i[r],d=n,f=s;for(t(i,n,r),a(i[s],p)>0&&t(i,n,s);d0;)f--}0===a(i[n],p)?t(i,n,f):t(i,++f,s),f<=r&&(n=f+1),r<=f&&(s=f-1)}}(e,r,n||0,s||e.length-1,a||i)}function t(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function i(e,t){return et?1:0}var r=function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function n(e,t,i){if(!i)return t.indexOf(e);for(var r=0;r=e.minX&&t.maxY>=e.minY}function f(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(t,i,r,n,s){for(var a=[i,r];a.length;)if(!((r=a.pop())-(i=a.pop())<=n)){var o=i+Math.ceil((r-i)/n/2)*n;e(t,o,i,r,s),a.push(i,o,o,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,i=[];if(!d(e,t))return i;for(var r=this.toBBox,n=[];t;){for(var s=0;s=0&&n[t].children.length>this._maxEntries;)this._split(n,t),t--;this._adjustParentBBoxes(r,n,t)},r.prototype._split=function(e,t){var i=e[t],r=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,r);var a=this._chooseSplitIndex(i,n,r),o=f(i.children.splice(a,i.children.length-a));o.height=i.height,o.leaf=i.leaf,s(i,this.toBBox),s(o,this.toBBox),t?e[t-1].children.push(o):this._splitRoot(i,o)},r.prototype._splitRoot=function(e,t){this.data=f([e,t]),this.data.height=e.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,i){for(var r,n,s,o,l,h,c,p=1/0,d=1/0,f=t;f<=i-t;f++){var m=a(e,0,f,this.toBBox),g=a(e,f,i,this.toBBox),y=(n=m,s=g,o=Math.max(n.minX,s.minX),l=Math.max(n.minY,s.minY),h=Math.min(n.maxX,s.maxX),c=Math.min(n.maxY,s.maxY),Math.max(0,h-o)*Math.max(0,c-l)),v=u(m)+u(g);y=t;d--){var f=e.children[d];o(l,e.leaf?n(f):f),h+=c(l)}return h},r.prototype._adjustParentBBoxes=function(e,t,i){for(var r=i;r>=0;r--)o(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,i=void 0;t>=0;t--)0===e[t].children.length?t>0?(i=e[t-1].children).splice(i.indexOf(e[t]),1):this.clear():s(e[t],this.toBBox)},r},"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(i=i||self).RBush=r()})),gRe=z(((e,t)=>{var i,r;i=e,r=function(){"use strict";var e=function(e,i){if(void 0===e&&(e=[]),void 0===i&&(i=t),this.data=e,this.length=this.data.length,this.compare=i,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function t(e,t){return et?1:0}return e.prototype.push=function(e){this.data.push(e),this.length++,this._up(this.length-1)},e.prototype.pop=function(){if(0!==this.length){var e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}},e.prototype.peek=function(){return this.data[0]},e.prototype._up=function(e){for(var t=this.data,i=this.compare,r=t[e];e>0;){var n=e-1>>1,s=t[n];if(i(r,s)>=0)break;t[e]=s,e=n}t[e]=r},e.prototype._down=function(e){for(var t=this.data,i=this.compare,r=this.length>>1,n=t[e];e=0)break;t[e]=a,e=s}t[e]=n},e},"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define(r):(i=i||self).TinyQueue=r()})),yRe=z(((e,t)=>{t.exports=function(e,t,i,r){var n=e[0],s=e[1],a=!1;void 0===i&&(i=0),void 0===r&&(r=t.length);for(var o=(r-i)/2,l=0,h=o-1;ls!=d>s&&n<(p-u)*(s-c)/(d-c)+u&&(a=!a)}return a}})),ERe=z(((e,t)=>{t.exports=function(e,t,i,r){var n=e[0],s=e[1],a=!1;void 0===i&&(i=0),void 0===r&&(r=t.length);for(var o=r-i,l=0,h=o-1;ls!=d>s&&n<(p-u)*(s-c)/(d-c)+u&&(a=!a)}return a}})),IRe=z(((e,t)=>{var i=yRe(),r=ERe();t.exports=function(e,t,n,s){return t.length>0&&Array.isArray(t[0])?r(e,t,n,s):i(e,t,n,s)},t.exports.nested=r,t.exports.flat=i})),SRe=z(((e,t)=>{var i,r;i=e,r=function(e){"use strict";function t(e,t,i,r,n){let s,a,o,l,h=t[0],u=r[0],c=0,p=0;u>h==u>-h?(s=h,h=t[++c]):(s=u,u=r[++p]);let d=0;if(ch==u>-h?(o=s-((a=h+s)-h),h=t[++c]):(o=s-((a=u+s)-u),u=r[++p]),s=a,0!==o&&(n[d++]=o);ch==u>-h?(o=s-((a=s+h)-(l=a-s))+(h-l),h=t[++c]):(o=s-((a=s+u)-(l=a-s))+(u-l),u=r[++p]),s=a,0!==o&&(n[d++]=o);for(;c0!=d>0)return f;let m=Math.abs(p+d);return Math.abs(f)>=33306690738754716e-32*m?f:-function(e,i,l,h,u,c,p){let d,f,m,g,y,v,T,x,b,_,E,w,S,I,M,A,D,O,R=e-u,C=l-u,N=i-c,P=h-c;y=(M=(x=R-(T=(v=134217729*R)-(v-R)))*(_=P-(b=(v=134217729*P)-(v-P)))-((I=R*P)-T*b-x*b-T*_))-(E=M-(D=(x=N-(T=(v=134217729*N)-(v-N)))*(_=C-(b=(v=134217729*C)-(v-C)))-((A=N*C)-T*b-x*b-T*_))),r[0]=M-(E+y)+(y-D),y=(S=I-((w=I+E)-(y=w-I))+(E-y))-(E=S-A),r[1]=S-(E+y)+(y-A),y=(O=w+E)-w,r[2]=w-(O-y)+(E-y),r[3]=O;let L=function(e,t){let i=t[0];for(let e=1;e<4;e++)i+=t[e];return i}(0,r),F=22204460492503146e-32*p;if(L>=F||-L>=F||(d=e-(R+(y=e-R))+(y-u),m=l-(C+(y=l-C))+(y-u),f=i-(N+(y=i-N))+(y-c),g=h-(P+(y=h-P))+(y-c),0===d&&0===f&&0===m&&0===g)||(F=11093356479670487e-47*p+33306690738754706e-32*Math.abs(L),(L+=R*g+P*d-(N*m+C*f))>=F||-L>=F))return L;y=(M=(x=d-(T=(v=134217729*d)-(v-d)))*(_=P-(b=(v=134217729*P)-(v-P)))-((I=d*P)-T*b-x*b-T*_))-(E=M-(D=(x=f-(T=(v=134217729*f)-(v-f)))*(_=C-(b=(v=134217729*C)-(v-C)))-((A=f*C)-T*b-x*b-T*_))),o[0]=M-(E+y)+(y-D),y=(S=I-((w=I+E)-(y=w-I))+(E-y))-(E=S-A),o[1]=S-(E+y)+(y-A),y=(O=w+E)-w,o[2]=w-(O-y)+(E-y),o[3]=O;let U=t(4,r,4,o,n);y=(M=(x=R-(T=(v=134217729*R)-(v-R)))*(_=g-(b=(v=134217729*g)-(v-g)))-((I=R*g)-T*b-x*b-T*_))-(E=M-(D=(x=N-(T=(v=134217729*N)-(v-N)))*(_=m-(b=(v=134217729*m)-(v-m)))-((A=N*m)-T*b-x*b-T*_))),o[0]=M-(E+y)+(y-D),y=(S=I-((w=I+E)-(y=w-I))+(E-y))-(E=S-A),o[1]=S-(E+y)+(y-A),y=(O=w+E)-w,o[2]=w-(O-y)+(E-y),o[3]=O;let k=t(U,n,4,o,s);y=(M=(x=d-(T=(v=134217729*d)-(v-d)))*(_=g-(b=(v=134217729*g)-(v-g)))-((I=d*g)-T*b-x*b-T*_))-(E=M-(D=(x=f-(T=(v=134217729*f)-(v-f)))*(_=m-(b=(v=134217729*m)-(v-m)))-((A=f*m)-T*b-x*b-T*_))),o[0]=M-(E+y)+(y-D),y=(S=I-((w=I+E)-(y=w-I))+(E-y))-(E=S-A),o[1]=S-(E+y)+(y-A),y=(O=w+E)-w,o[2]=w-(O-y)+(E-y),o[3]=O;let B=t(k,s,4,o,a);return a[B-1]}(e,i,l,h,u,c,m)},e.orient2dfast=function(e,t,i,r,n,s){return(t-s)*(i-n)-(e-n)*(r-s)},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&void 0!==t?r(e):"function"==typeof define&&define.amd?define(["exports"],r):r((i=i||self).predicates={})})),ARe=z(((e,t)=>{"use strict";var i=mRe(),r=gRe(),n=IRe(),s=SRe().orient2d;function a(e,t,r){t=Math.max(0,void 0===t?2:t),r=r||0;var s=function(e){for(var t=e[0],i=e[0],r=e[0],s=e[0],a=0;ar[0]&&(r=o),o[1]s[1]&&(s=o)}var l=[t,i,r,s],h=l.slice();for(a=0;a=2&&p(t[t.length-2],t[t.length-1],e[i])<=0;)t.pop();t.push(e[i])}for(var r=[],n=e.length-1;n>=0;n--){for(;r.length>=2&&p(r[r.length-2],r[r.length-1],e[n])<=0;)r.pop();r.push(e[n])}return r.pop(),t.pop(),t.concat(r)}(h)}(e),a=new i(16);a.toBBox=function(e){return{minX:e[0],minY:e[1],maxX:e[0],maxY:e[1]}},a.compareMinX=function(e,t){return e[0]-t[0]},a.compareMinY=function(e,t){return e[1]-t[1]},a.load(e);for(var l,h=[],u=0;ua||u.push({node:f,dist:m})}for(;u.length&&!u.peek().node.children;){var g=u.pop(),v=g.node,T=y(v,t,i),x=y(v,n,s);if(g.dist=t.minX&&e[0]<=t.maxX&&e[1]>=t.minY&&e[1]<=t.maxY}function c(e,t,i){for(var r=Math.min(e[0],t[0]),n=Math.min(e[1],t[1]),s=Math.max(e[0],t[0]),a=Math.max(e[1],t[1]),o=i.search({minX:r,minY:n,maxX:s,maxY:a}),l=0;l0!=p(e,t,r)>0&&p(i,r,e)>0!=p(i,r,t)>0}function f(e){var t=e.p,i=e.next.p;return e.minX=Math.min(t[0],i[0]),e.minY=Math.min(t[1],i[1]),e.maxX=Math.max(t[0],i[0]),e.maxY=Math.max(t[1],i[1]),e}function m(e,t){var i={p:e,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return t?(i.next=t.next,i.prev=t,t.next.prev=i,t.next=i):(i.prev=i,i.next=i),i}function g(e,t){var i=e[0]-t[0],r=e[1]-t[1];return i*i+r*r}function y(e,t,i){var r=t[0],n=t[1],s=i[0]-r,a=i[1]-n;if(0!==s||0!==a){var o=((e[0]-r)*s+(e[1]-n)*a)/(s*s+a*a);o>1?(r=i[0],n=i[1]):o>0&&(r+=s*o,n+=a*o)}return(s=e[0]-r)*s+(a=e[1]-n)*a}function v(e,t,i,r,n,s,a,o){var l,h,u,c,p=i-e,d=r-t,f=a-n,m=o-s,g=e-n,y=t-s,v=p*p+d*d,T=p*f+d*m,x=f*f+m*m,b=p*g+d*y,_=f*g+m*y,E=v*x-T*T,w=E,S=E;0===E?(h=0,w=1,c=_,S=x):(c=v*_-T*b,(h=T*_-x*b)<0?(h=0,c=_,S=x):h>w&&(h=w,c=_+T,S=x)),c<0?(c=0,-b<0?h=0:-b>v?h=w:(h=-b,w=v)):c>S&&(c=S,-b+T<0?h=0:-b+T>v?h=w:(h=-b+T,w=v));var I=(1-(u=0===c?0:c/S))*n+u*a-((1-(l=0===h?0:h/w))*e+l*i),M=(1-u)*s+u*o-((1-l)*t+l*r);return I*I+M*M}function T(e,t){return e[0]===t[0]?e[1]-t[1]:e[0]-t[0]}r.default&&(r=r.default),t.exports=a,t.exports.default=a})),JRe=z(((e,t)=>{t.exports=function(){var e,t=0,i=!1;function r(t,i){return e.list.push({type:t,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return r("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return r("div_seg",{seg:e,pt:t}),r("chop",{seg:e,pt:t})},statusRemove:function(e){return r("pop_seg",{seg:e})},segmentUpdate:function(e){return r("seg_update",{seg:e})},segmentNew:function(e,t){return r("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return r("rem_seg",{seg:e})},tempStatus:function(e,t,i){return r("temp_status",{seg:e,above:t,below:i})},rewind:function(e){return r("rewind",{seg:e})},status:function(e,t,i){return r("status",{seg:e,above:t,below:i})},vert:function(t){return t===i?e:(i=t,r("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),r("log",{txt:e})},reset:function(){return r("reset")},selected:function(e){return r("selected",{segs:e})},chainStart:function(e){return r("chain_start",{seg:e})},chainRemoveHead:function(e,t){return r("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return r("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return r("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return r("chain_match",{index:e})},chainClose:function(e){return r("chain_close",{index:e})},chainAddHead:function(e,t){return r("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return r("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return r("chain_con",{index1:e,index2:t})},chainReverse:function(e){return r("chain_rev",{index:e})},chainJoin:function(e,t){return r("chain_join",{index1:e,index2:t})},done:function(){return r("done")}}}})),eMe=z(((e,t)=>{t.exports=function(e){"number"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,i,r){var n=i[0],s=i[1],a=r[0],o=r[1],l=t[0];return(a-n)*(t[1]-s)-(o-s)*(l-n)>=-e},pointBetween:function(t,i,r){var n=t[1]-i[1],s=r[0]-i[0],a=t[0]-i[0],o=r[1]-i[1],l=a*s+n*o;return!(l-e)},pointsSameX:function(t,i){return Math.abs(t[0]-i[0])e!=a-n>e&&(s-h)*(n-u)/(a-u)+h-r>e&&(o=!o),s=h,a=u}return o}};return t}})),rMe=z(((e,t)=>{t.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(null===t||t===e.root)},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,i){for(var r=e.root,n=e.root.next;null!==n;){if(i(n))return t.prev=n.prev,t.next=n,n.prev.next=t,void(n.prev=t);r=n,n=n.next}r.next=t,t.prev=r,t.next=null},findTransition:function(t){for(var i=e.root,r=e.root.next;null!==r&&!t(r);)i=r,r=r.next;return{before:i===e.root?null:i,after:r,insert:function(e){return e.prev=i,e.next=r,i.next=e,null!==r&&(r.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}})),nMe=z(((e,t)=>{var i=rMe();t.exports=function(e,t,r){function n(e,t){return{id:r?r.segmentId():-1,start:e,end:t,myFill:{above:null,below:null},otherFill:null}}function s(e,t,i){return{id:r?r.segmentId():-1,start:e,end:t,myFill:{above:i.myFill.above,below:i.myFill.below},otherFill:null}}var a=i.create();function o(e,i){a.insertBefore(e,(function(r){var n=function(e,i,r,n,s,a){var o=t.pointsCompare(i,s);return 0!==o?o:t.pointsSame(r,a)?0:e!==n?e?1:-1:t.pointAboveOrOnLine(r,n?s:a,n?a:s)?1:-1}(e.isStart,e.pt,i,r.isStart,r.pt,r.other.pt);return n<0}))}function l(e,t){var r=function(e,t){var r=i.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return o(r,e.end),r}(e,t);return function(e,t,r){var n=i.node({isStart:!1,pt:t.end,seg:t,primary:r,other:e,status:null});e.other=n,o(n,e.pt)}(r,e,t),r}function h(e,t){var i=s(t,e.seg.end,e.seg);return function(e,t){r&&r.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,o(e.other,e.pt)}(e,t),l(i,e.primary)}function u(n,s){var o=i.create();function l(e){return o.findTransition((function(i){var r=function(e,i){var r=e.seg.start,n=e.seg.end,s=i.seg.start,a=i.seg.end;return t.pointsCollinear(r,s,a)?t.pointsCollinear(n,s,a)||t.pointAboveOrOnLine(n,s,a)?1:-1:t.pointAboveOrOnLine(r,s,a)?1:-1}(e,i.ev);return r>0}))}function u(e,i){var n=e.seg,s=i.seg,a=n.start,o=n.end,l=s.start,u=s.end;r&&r.checkIntersection(n,s);var c=t.linesIntersect(a,o,l,u);if(!1===c){if(!t.pointsCollinear(a,o,l)||t.pointsSame(a,u)||t.pointsSame(o,l))return!1;var p=t.pointsSame(a,l),d=t.pointsSame(o,u);if(p&&d)return i;var f=!p&&t.pointBetween(a,l,u),m=!d&&t.pointBetween(o,l,u);if(p)return m?h(i,o):h(e,u),i;f&&(d||(m?h(i,o):h(e,u)),h(i,a))}else 0===c.alongA&&(-1===c.alongB?h(e,l):0===c.alongB?h(e,c.pt):1===c.alongB&&h(e,u)),0===c.alongB&&(-1===c.alongA?h(i,a):0===c.alongA?h(i,c.pt):1===c.alongA&&h(i,o));return!1}for(var c=[];!a.isEmpty();){var p=a.getHead();if(r&&r.vert(p.pt[0]),p.isStart){let t=function(){if(f){var e=u(p,f);if(e)return e}return!!m&&u(p,m)};r&&r.segmentNew(p.seg,p.primary);var d=l(p),f=d.before?d.before.ev:null,m=d.after?d.after.ev:null;r&&r.tempStatus(p.seg,!!f&&f.seg,!!m&&m.seg);var g=t();if(g){var y;if(e)(y=null===p.seg.myFill.below||p.seg.myFill.above!==p.seg.myFill.below)&&(g.seg.myFill.above=!g.seg.myFill.above);else g.seg.otherFill=p.seg.myFill;r&&r.segmentUpdate(g.seg),p.other.remove(),p.remove()}if(a.getHead()!==p){r&&r.rewind(p.seg);continue}if(e)y=null===p.seg.myFill.below||p.seg.myFill.above!==p.seg.myFill.below,p.seg.myFill.below=m?m.seg.myFill.above:n,p.seg.myFill.above=y?!p.seg.myFill.below:p.seg.myFill.below;else if(null===p.seg.otherFill){var v;v=m?p.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:p.primary?s:n,p.seg.otherFill={above:v,below:v}}r&&r.status(p.seg,!!f&&f.seg,!!m&&m.seg),p.other.status=d.insert(i.node({ev:p}))}else{var T=p.status;if(null===T)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(o.exists(T.prev)&&o.exists(T.next)&&u(T.prev.ev,T.next.ev),r&&r.statusRemove(T.ev.seg),T.remove(),!p.primary){var x=p.seg.myFill;p.seg.myFill=p.seg.otherFill,p.seg.otherFill=x}c.push(p.seg)}a.getHead().remove()}return r&&r.done(),c}return e?{addRegion:function(e){for(var i,r=e[e.length-1],s=0;s{t.exports=function(e,t,i){var r=[],n=[];return e.forEach((function(e){var s=e.start,a=e.end;if(t.pointsSame(s,a))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{i&&i.chainStart(e);for(var o={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},h=o,u=0;u{function i(e,t,i){var r=[];return e.forEach((function(e){var n=(e.myFill.above?8:0)+(e.myFill.below?4:0)+(e.otherFill&&e.otherFill.above?2:0)+(e.otherFill&&e.otherFill.below?1:0);0!==t[n]&&r.push({id:i?i.segmentId():-1,start:e.start,end:e.end,myFill:{above:1===t[n],below:2===t[n]},otherFill:null})})),i&&i.selected(r),r}var r={union:function(e,t){return i(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return i(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return i(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return i(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return i(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};t.exports=r})),uMe=z(((e,t)=>{var i={toPolygon:function(e,t){function i(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function i(t){var i=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[i]})}for(var r=i(t[0]),n=1;n{var i,r=JRe(),n=eMe(),s=nMe(),a=aMe(),o=lMe(),l=uMe(),h=!1,u=n();function c(e,t,r){var n=i.segments(e),s=i.segments(t),a=r(i.combine(n,s));return i.polygon(a)}i={buildLog:function(e){return!0===e?h=r():!1===e&&(h=!1),!1!==h&&h.list},epsilon:function(e){return u.epsilon(e)},segments:function(e){var t=s(!0,u,h);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:s(!1,u,h).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:o.union(e.combined,h),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:o.intersect(e.combined,h),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:o.difference(e.combined,h),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:o.differenceRev(e.combined,h),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:o.xor(e.combined,h),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:a(e.segments,u,h),inverted:e.inverted}},polygonFromGeoJSON:function(e){return l.toPolygon(i,e)},polygonToGeoJSON:function(e){return l.fromPolygon(i,u,e)},union:function(e,t){return c(e,t,i.selectUnion)},intersect:function(e,t){return c(e,t,i.selectIntersect)},difference:function(e,t){return c(e,t,i.selectDifference)},differenceRev:function(e,t){return c(e,t,i.selectDifferenceRev)},xor:function(e,t){return c(e,t,i.selectXor)}},"object"==typeof window&&(window.PolyBool=i),t.exports=i})),vMe=z(((e,t)=>{function i(e){if(e)return function(e){for(var t in i.prototype)e[t]=i.prototype[t];return e}(e)}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},i.prototype.once=function(e,t){var i=this;function r(){i.off(e,r),t.apply(this,arguments)}return this._callbacks=this._callbacks||{},r.fn=t,this.on(e,r),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[e];if(!i)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var r,n=0;n{var i=vMe();function r(){i.call(this)}r.prototype=new i,t.exports=r,r.Stream=r,r.prototype.pipe=function(e,t){var i=this;function r(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function n(){i.readable&&i.resume&&i.resume()}i.on("data",r),e.on("drain",n),!e._isStdio&&(!t||!1!==t.end)&&(i.on("end",a),i.on("close",o));var s=!1;function a(){s||(s=!0,e.end())}function o(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(h(),!this.hasListeners("error"))throw e}function h(){i.off("data",r),e.off("drain",n),i.off("end",a),i.off("close",o),i.off("error",l),e.off("error",l),i.off("end",h),i.off("close",h),e.off("end",h),e.off("close",h)}return i.on("error",l),e.on("error",l),i.on("end",h),i.on("close",h),e.on("end",h),e.on("close",h),e.emit("pipe",i),e}})),ql=z(((e,t)=>{(function(){var i,r="Expected a function",n="__lodash_hash_undefined__",s="__lodash_placeholder__",a=16,o=32,l=64,h=128,u=256,c=1/0,p=9007199254740991,d=NaN,f=4294967295,m=[["ary",h],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",o],["partialRight",l],["rearg",u]],g="[object Arguments]",y="[object Array]",v="[object Boolean]",T="[object Date]",x="[object Error]",b="[object Function]",_="[object GeneratorFunction]",E="[object Map]",w="[object Number]",S="[object Object]",I="[object Promise]",M="[object RegExp]",A="[object Set]",D="[object String]",O="[object Symbol]",R="[object WeakMap]",C="[object ArrayBuffer]",N="[object DataView]",P="[object Float32Array]",L="[object Float64Array]",F="[object Int8Array]",U="[object Int16Array]",k="[object Int32Array]",B="[object Uint8Array]",H="[object Uint8ClampedArray]",G="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,j=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,X=/[&<>"']/g,q=RegExp(Y.source),Z=RegExp(X.source),K=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ee=/^\w*$/,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,re=RegExp(ie.source),ne=/^\s+/,se=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,he=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,Te=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,be=/['\n\r\u2028\u2029\\]/g,_e="\\ud800-\\udfff",Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",we="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Ie="A-Z\\xc0-\\xd6\\xd8-\\xde",Me="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",De="['’]",Oe="["+_e+"]",Re="["+Ae+"]",Ce="["+Ee+"]",Ne="\\d+",Pe="["+we+"]",Le="["+Se+"]",Fe="[^"+_e+Ae+Ne+we+Se+Ie+"]",Ue="\\ud83c[\\udffb-\\udfff]",ke="[^"+_e+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",Ge="["+Ie+"]",ze="\\u200d",Ve="(?:"+Le+"|"+Fe+")",je="(?:"+Ge+"|"+Fe+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Ye="(?:['’](?:D|LL|M|RE|S|T|VE))?",Xe="(?:"+Ce+"|"+Ue+")"+"?",qe="["+Me+"]?",Ze=qe+Xe+("(?:"+ze+"(?:"+[ke,Be,He].join("|")+")"+qe+Xe+")*"),Ke="(?:"+[Pe,Be,He].join("|")+")"+Ze,Je="(?:"+[ke+Ce+"?",Ce,Be,He,Oe].join("|")+")",$e=RegExp(De,"g"),Qe=RegExp(Ce,"g"),et=RegExp(Ue+"(?="+Ue+")|"+Je+Ze,"g"),tt=RegExp([Ge+"?"+Le+"+"+We+"(?="+[Re,Ge,"$"].join("|")+")",je+"+"+Ye+"(?="+[Re,Ge+Ve,"$"].join("|")+")",Ge+"?"+Ve+"+"+We,Ge+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,Ke].join("|"),"g"),it=RegExp("["+ze+_e+Ee+Me+"]"),rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,at={};at[P]=at[L]=at[F]=at[U]=at[k]=at[B]=at[H]=at[G]=at[z]=!0,at[g]=at[y]=at[C]=at[v]=at[N]=at[T]=at[x]=at[b]=at[E]=at[w]=at[S]=at[M]=at[A]=at[D]=at[R]=!1;var ot={};ot[g]=ot[y]=ot[C]=ot[N]=ot[v]=ot[T]=ot[P]=ot[L]=ot[F]=ot[U]=ot[k]=ot[E]=ot[w]=ot[S]=ot[M]=ot[A]=ot[D]=ot[O]=ot[B]=ot[H]=ot[G]=ot[z]=!0,ot[x]=ot[b]=ot[R]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ht=parseFloat,ut=parseInt,ct="object"==typeof global&&global&&global.Object===Object&&global,pt="object"==typeof self&&self&&self.Object===Object&&self,dt=ct||pt||Function("return this")(),ft="object"==typeof e&&e&&!e.nodeType&&e,mt=ft&&"object"==typeof t&&t&&!t.nodeType&&t,gt=mt&&mt.exports===ft,yt=gt&&ct.process,vt=function(){try{return mt&&mt.require&&mt.require("util").types||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),Tt=vt&&vt.isArrayBuffer,xt=vt&&vt.isDate,bt=vt&&vt.isMap,_t=vt&&vt.isRegExp,Et=vt&&vt.isSet,wt=vt&&vt.isTypedArray;function St(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function It(e,t,i,r){for(var n=-1,s=null==e?0:e.length;++n-1}function Ct(e,t,i){for(var r=-1,n=null==e?0:e.length;++r-1;);return i}function ti(e,t){for(var i=e.length;i--&&Gt(t,e[i],0)>-1;);return i}function ii(e,t){for(var i=e.length,r=0;i--;)e[i]===t&&++r;return r}var ri=Yt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ni=Yt({"&":"&","<":"<",">":">",'"':""","'":"'"});function si(e){return"\\"+lt[e]}function ai(e){return it.test(e)}function oi(e){var t=-1,i=Array(e.size);return e.forEach((function(e,r){i[++t]=[r,e]})),i}function li(e,t){return function(i){return e(t(i))}}function hi(e,t){for(var i=-1,r=e.length,n=0,a=[];++i",""":'"',"'":"'"});var mi=function e(t){var se,_e=(t=null==t?dt:mi.defaults(dt.Object(),t,mi.pick(dt,nt))).Array,Ee=t.Date,we=t.Error,Se=t.Function,Ie=t.Math,Me=t.Object,Ae=t.RegExp,De=t.String,Oe=t.TypeError,Re=_e.prototype,Ce=Se.prototype,Ne=Me.prototype,Pe=t["__core-js_shared__"],Le=Ce.toString,Fe=Ne.hasOwnProperty,Ue=0,ke=(se=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||""))?"Symbol(src)_1."+se:"",Be=Ne.toString,He=Le.call(Me),Ge=dt._,ze=Ae("^"+Le.call(Fe).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=gt?t.Buffer:i,je=t.Symbol,We=t.Uint8Array,Ye=Ve?Ve.allocUnsafe:i,Xe=li(Me.getPrototypeOf,Me),qe=Me.create,Ze=Ne.propertyIsEnumerable,Ke=Re.splice,Je=je?je.isConcatSpreadable:i,et=je?je.iterator:i,it=je?je.toStringTag:i,lt=function(){try{var e=ps(Me,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==dt.clearTimeout&&t.clearTimeout,pt=Ee&&Ee.now!==dt.Date.now&&Ee.now,ft=t.setTimeout!==dt.setTimeout&&t.setTimeout,mt=Ie.ceil,yt=Ie.floor,vt=Me.getOwnPropertySymbols,kt=Ve?Ve.isBuffer:i,Yt=t.isFinite,gi=Re.join,yi=li(Me.keys,Me),vi=Ie.max,Ti=Ie.min,xi=Ee.now,bi=t.parseInt,_i=Ie.random,Ei=Re.reverse,wi=ps(t,"DataView"),Si=ps(t,"Map"),Ii=ps(t,"Promise"),Mi=ps(t,"Set"),Ai=ps(t,"WeakMap"),Di=ps(Me,"create"),Oi=Ai&&new Ai,Ri={},Ci=Bs(wi),Ni=Bs(Si),Pi=Bs(Ii),Li=Bs(Mi),Fi=Bs(Ai),Ui=je?je.prototype:i,ki=Ui?Ui.valueOf:i,Bi=Ui?Ui.toString:i;function Hi(e){if(io(e)&&!Wa(e)&&!(e instanceof ji)){if(e instanceof Vi)return e;if(Fe.call(e,"__wrapped__"))return Hs(e)}return new Vi(e)}var Gi=function(){function e(){}return function(t){if(!to(t))return{};if(qe)return qe(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function zi(){}function Vi(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function ji(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Wi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function lr(e,t,r,n,s,a){var o,l=1&t,h=2&t,u=4&t;if(r&&(o=s?r(e,n,s,a):r(e)),o!==i)return o;if(!to(e))return e;var c=Wa(e);if(c){if(o=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&Fe.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e),!l)return On(e,o)}else{var p=ms(e),d=p==b||p==_;if(Za(e))return wn(e,l);if(p==S||p==g||d&&!s){if(o=h||d?{}:ys(e),!l)return h?function(e,t){return Rn(e,fs(e),t)}(e,function(e,t){return e&&Rn(t,Po(t),e)}(o,e)):function(e,t){return Rn(e,ds(e),t)}(e,nr(o,e))}else{if(!ot[p])return s?e:{};o=function(e,t,i){var r=e.constructor;switch(t){case C:return Sn(e);case v:case T:return new r(+e);case N:return function(e,t){var i=t?Sn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case P:case L:case F:case U:case k:case B:case H:case G:case z:return In(e,i);case E:return new r;case w:case D:return new r(e);case M:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new r;case O:return function(e){return ki?Me(ki.call(e)):{}}(e)}}(e,p,l)}}a||(a=new Zi);var f=a.get(e);if(f)return f;a.set(e,o),oo(e)?e.forEach((function(i){o.add(lr(i,t,r,i,e,a))})):ro(e)&&e.forEach((function(i,n){o.set(n,lr(i,t,r,n,e,a))}));var m=c?i:(u?h?ss:ns:h?Po:No)(e);return Mt(m||e,(function(i,n){m&&(i=e[n=i]),tr(o,n,lr(i,t,r,n,e,a))})),o}function hr(e,t,r){var n=r.length;if(null==e)return!n;for(e=Me(e);n--;){var s=r[n],a=t[s],o=e[s];if(o===i&&!(s in e)||!a(o))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Oe(r);return Cs((function(){e.apply(i,n)}),t)}function cr(e,t,i,r){var n=-1,s=Rt,a=!0,o=e.length,l=[],h=t.length;if(!o)return l;i&&(t=Nt(t,Jt(i))),r?(s=Ct,a=!1):t.length>=200&&(s=Qt,a=!1,t=new qi(t));e:for(;++n-1},Yi.prototype.set=function(e,t){var i=this.__data__,r=ir(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this},Xi.prototype.clear=function(){this.size=0,this.__data__={hash:new Wi,map:new(Si||Yi),string:new Wi}},Xi.prototype.delete=function(e){var t=us(this,e).delete(e);return this.size-=t?1:0,t},Xi.prototype.get=function(e){return us(this,e).get(e)},Xi.prototype.has=function(e){return us(this,e).has(e)},Xi.prototype.set=function(e,t){var i=us(this,e),r=i.size;return i.set(e,t),this.size+=i.size==r?0:1,this},qi.prototype.add=qi.prototype.push=function(e){return this.__data__.set(e,n),this},qi.prototype.has=function(e){return this.__data__.has(e)},Zi.prototype.clear=function(){this.__data__=new Yi,this.size=0},Zi.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Zi.prototype.get=function(e){return this.__data__.get(e)},Zi.prototype.has=function(e){return this.__data__.has(e)},Zi.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Yi){var r=i.__data__;if(!Si||r.length<199)return r.push([e,t]),this.size=++i.size,this;i=this.__data__=new Xi(r)}return i.set(e,t),this.size=i.size,this};var pr=Pn(xr),dr=Pn(br,!0);function fr(e,t){var i=!0;return pr(e,(function(e,r,n){return i=!!t(e,r,n)})),i}function mr(e,t,r){for(var n=-1,s=e.length;++n0&&i(o)?t>1?yr(o,t-1,i,r,n):Pt(n,o):r||(n[n.length]=o)}return n}var vr=Ln(),Tr=Ln(!0);function xr(e,t){return e&&vr(e,t,No)}function br(e,t){return e&&Tr(e,t,No)}function _r(e,t){return Ot(t,(function(t){return $a(e[t])}))}function Er(e,t){for(var r=0,n=(t=xn(t,e)).length;null!=e&&rt}function Mr(e,t){return null!=e&&Fe.call(e,t)}function Ar(e,t){return null!=e&&t in Me(e)}function Dr(e,t,r){for(var n=r?Ct:Rt,s=e[0].length,a=e.length,o=a,l=_e(a),h=1/0,u=[];o--;){var c=e[o];o&&t&&(c=Nt(c,Jt(t))),h=Ti(c.length,h),l[o]=!r&&(t||s>=120&&c.length>=120)?new qi(o&&c):i}c=e[0];var p=-1,d=l[0];e:for(;++p=o?l:l*("desc"==i[r]?-1:1)}return e.index-t.index}(e,t,i)}))}function Wr(e,t,i){for(var r=-1,n=t.length,s={};++r-1;)o!==e&&Ke.call(o,l,1),Ke.call(e,l,1);return e}function Xr(e,t){for(var i=e?t.length:0,r=i-1;i--;){var n=t[i];if(i==r||n!==s){var s=n;Ts(n)?Ke.call(e,n,1):pn(e,n)}}return e}function qr(e,t){return e+yt(_i()*(t-e+1))}function Zr(e,t){var i="";if(!e||t<1||t>p)return i;do{t%2&&(i+=e),(t=yt(t/2))&&(e+=e)}while(t);return i}function Kr(e,t){return Ns(Ms(e,t,sl),e+"")}function Jr(e){return Ji(zo(e))}function $r(e,t){var i=zo(e);return Fs(i,or(t,0,i.length))}function Qr(e,t,r,n){if(!to(e))return e;for(var s=-1,a=(t=xn(t,e)).length,o=a-1,l=e;null!=l&&++sn?0:n+t),(i=i>n?n:i)<0&&(i+=n),n=t>i?0:i-t>>>0,t>>>=0;for(var s=_e(n);++r>>1,a=e[s];null!==a&&!ho(a)&&(i?a<=t:a=200){var h=t?null:Kn(e);if(h)return ui(h);a=!1,n=Qt,l=new qi}else l=t?[]:o;e:for(;++r=n?e:nn(e,t,r)}var En=ct||function(e){return dt.clearTimeout(e)};function wn(e,t){if(t)return e.slice();var i=e.length,r=Ye?Ye(i):new e.constructor(i);return e.copy(r),r}function Sn(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function In(e,t){var i=t?Sn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Mn(e,t){if(e!==t){var r=e!==i,n=null===e,s=e==e,a=ho(e),o=t!==i,l=null===t,h=t==t,u=ho(t);if(!l&&!u&&!a&&e>t||a&&o&&h&&!l&&!u||n&&o&&h||!r&&h||!s)return 1;if(!n&&!a&&!u&&e1?r[s-1]:i,o=s>2?r[2]:i;for(a=e.length>3&&"function"==typeof a?(s--,a):i,o&&xs(r[0],r[1],o)&&(a=s<3?i:a,s=1),t=Me(t);++n-1?s[a?t[o]:o]:i}}function Hn(e){return rs((function(t){var n=t.length,s=n,a=Vi.prototype.thru;for(e&&t.reverse();s--;){var o=t[s];if("function"!=typeof o)throw new Oe(r);if(a&&!l&&"wrapper"==os(o))var l=new Vi([],!0)}for(s=l?s:n;++s1&&v.reverse(),p&&ul))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var p=-1,d=!0,f=2&r?new qi:i;for(a.set(e,t),a.set(t,e);++p-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(i>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Mt(m,(function(i){var r="_."+i[0];t&i[1]&&!Rt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(le):[]}(r),i)))}function Ls(e){var t=0,r=0;return function(){var n=xi(),s=16-(n-r);if(r=n,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Fs(e,t){var r=-1,n=e.length,s=n-1;for(t=t===i?n:t;++r1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,aa(e,r)}));function da(e){var t=Hi(e);return t.__chain__=!0,t}function fa(e,t){return t(e)}var ma=rs((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,s=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&n instanceof ji&&Ts(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:fa,args:[s],thisArg:i}),new Vi(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(s)}));var ga=Cn((function(e,t,i){Fe.call(e,i)?++e[i]:sr(e,i,1)}));var ya=Bn(js),va=Bn(Ws);function Ta(e,t){return(Wa(e)?Mt:pr)(e,hs(t,3))}function xa(e,t){return(Wa(e)?At:dr)(e,hs(t,3))}var ba=Cn((function(e,t,i){Fe.call(e,i)?e[i].push(t):sr(e,i,[t])}));var _a=Kr((function(e,t,i){var r=-1,n="function"==typeof t,s=Xa(e)?_e(e.length):[];return pr(e,(function(e){s[++r]=n?St(t,e,i):Or(e,t,i)})),s})),Ea=Cn((function(e,t,i){sr(e,i,t)}));function wa(e,t){return(Wa(e)?Nt:Br)(e,hs(t,3))}var Sa=Cn((function(e,t,i){e[i?0:1].push(t)}),(function(){return[[],[]]}));var Ia=Kr((function(e,t){if(null==e)return[];var i=t.length;return i>1&&xs(e,t[0],t[1])?t=[]:i>2&&xs(t[0],t[1],t[2])&&(t=[t[0]]),jr(e,yr(t,1),[])})),Ma=pt||function(){return dt.Date.now()};function Aa(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,$n(e,h,i,i,i,i,t)}function Da(e,t){var n;if("function"!=typeof t)throw new Oe(r);return e=go(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Oa=Kr((function(e,t,i){var r=1;if(i.length){var n=hi(i,ls(Oa));r|=o}return $n(e,r,t,i,n)})),Ra=Kr((function(e,t,i){var r=3;if(i.length){var n=hi(i,ls(Ra));r|=o}return $n(t,r,e,i,n)}));function Ca(e,t,n){var s,a,o,l,h,u,c=0,p=!1,d=!1,f=!0;if("function"!=typeof e)throw new Oe(r);function m(t){var r=s,n=a;return s=a=i,c=t,l=e.apply(n,r)}function g(e){return c=e,h=Cs(v,t),p?m(e):l}function y(e){var r=e-u;return u===i||r>=t||r<0||d&&e-c>=o}function v(){var e=Ma();if(y(e))return T(e);h=Cs(v,function(e){var i=t-(e-u);return d?Ti(i,o-(e-c)):i}(e))}function T(e){return h=i,f&&s?m(e):(s=a=i,l)}function x(){var e=Ma(),r=y(e);if(s=arguments,a=this,u=e,r){if(h===i)return g(u);if(d)return En(h),h=Cs(v,t),m(u)}return h===i&&(h=Cs(v,t)),l}return t=vo(t)||0,to(n)&&(p=!!n.leading,o=(d="maxWait"in n)?vi(vo(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),x.cancel=function(){h!==i&&En(h),c=0,s=u=a=h=i},x.flush=function(){return h===i?l:T(Ma())},x}var Na=Kr((function(e,t){return ur(e,1,t)})),Pa=Kr((function(e,t,i){return ur(e,vo(t)||0,i)}));function La(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(r);var i=function(){var r=arguments,n=t?t.apply(this,r):r[0],s=i.cache;if(s.has(n))return s.get(n);var a=e.apply(this,r);return i.cache=s.set(n,a)||s,a};return i.cache=new(La.Cache||Xi),i}function Fa(e){if("function"!=typeof e)throw new Oe(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}La.Cache=Xi;var Ua=bn((function(e,t){var i=(t=1==t.length&&Wa(t[0])?Nt(t[0],Jt(hs())):Nt(yr(t,1),Jt(hs()))).length;return Kr((function(r){for(var n=-1,s=Ti(r.length,i);++n=t})),ja=Rr(function(){return arguments}())?Rr:function(e){return io(e)&&Fe.call(e,"callee")&&!Ze.call(e,"callee")},Wa=_e.isArray,Ya=Tt?Jt(Tt):function(e){return io(e)&&Sr(e)==C};function Xa(e){return null!=e&&eo(e.length)&&!$a(e)}function qa(e){return io(e)&&Xa(e)}var Za=kt||vl,Ka=xt?Jt(xt):function(e){return io(e)&&Sr(e)==T};function Ja(e){if(!io(e))return!1;var t=Sr(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!so(e)}function $a(e){if(!to(e))return!1;var t=Sr(e);return t==b||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qa(e){return"number"==typeof e&&e==go(e)}function eo(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function to(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function io(e){return null!=e&&"object"==typeof e}var ro=bt?Jt(bt):function(e){return io(e)&&ms(e)==E};function no(e){return"number"==typeof e||io(e)&&Sr(e)==w}function so(e){if(!io(e)||Sr(e)!=S)return!1;var t=Xe(e);if(null===t)return!0;var i=Fe.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Le.call(i)==He}var ao=_t?Jt(_t):function(e){return io(e)&&Sr(e)==M};var oo=Et?Jt(Et):function(e){return io(e)&&ms(e)==A};function lo(e){return"string"==typeof e||!Wa(e)&&io(e)&&Sr(e)==D}function ho(e){return"symbol"==typeof e||io(e)&&Sr(e)==O}var uo=wt?Jt(wt):function(e){return io(e)&&eo(e.length)&&!!at[Sr(e)]};var co=Xn(kr),po=Xn((function(e,t){return e<=t}));function fo(e){if(!e)return[];if(Xa(e))return lo(e)?pi(e):On(e);if(et&&e[et])return function(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[et]());var t=ms(e);return(t==E?oi:t==A?ui:zo)(e)}function mo(e){return e?(e=vo(e))===c||e===-c?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function go(e){var t=mo(e),i=t%1;return t==t?i?t-i:t:0}function yo(e){return e?or(go(e),0,f):0}function vo(e){if("number"==typeof e)return e;if(ho(e))return d;if(to(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=to(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var i=me.test(e);return i||ye.test(e)?ut(e.slice(2),i?2:8):fe.test(e)?d:+e}function To(e){return Rn(e,Po(e))}function xo(e){return null==e?"":un(e)}var bo=Nn((function(e,t){if(ws(t)||Xa(t))Rn(t,No(t),e);else for(var i in t)Fe.call(t,i)&&tr(e,i,t[i])})),_o=Nn((function(e,t){Rn(t,Po(t),e)})),Eo=Nn((function(e,t,i,r){Rn(t,Po(t),e,r)})),wo=Nn((function(e,t,i,r){Rn(t,No(t),e,r)})),So=rs(ar);var Io=Kr((function(e,t){e=Me(e);var r=-1,n=t.length,s=n>2?t[2]:i;for(s&&xs(t[0],t[1],s)&&(n=1);++r1),t})),Rn(e,ss(e),i),r&&(i=lr(i,7,ts));for(var n=t.length;n--;)pn(i,t[n]);return i}));var ko=rs((function(e,t){return null==e?{}:function(e,t){return Wr(e,t,(function(t,i){return Do(e,i)}))}(e,t)}));function Bo(e,t){if(null==e)return{};var i=Nt(ss(e),(function(e){return[e]}));return t=hs(t),Wr(e,i,(function(e,i){return t(e,i[0])}))}var Ho=Jn(No),Go=Jn(Po);function zo(e){return null==e?[]:$t(e,No(e))}var Vo=Un((function(e,t,i){return t=t.toLowerCase(),e+(i?jo(t):t)}));function jo(e){return $o(xo(e).toLowerCase())}function Wo(e){return(e=xo(e))&&e.replace(Te,ri).replace(Qe,"")}var Yo=Un((function(e,t,i){return e+(i?"-":"")+t.toLowerCase()})),Xo=Un((function(e,t,i){return e+(i?" ":"")+t.toLowerCase()})),qo=Fn("toLowerCase");var Zo=Un((function(e,t,i){return e+(i?"_":"")+t.toLowerCase()}));var Ko=Un((function(e,t,i){return e+(i?" ":"")+$o(t)}));var Jo=Un((function(e,t,i){return e+(i?" ":"")+t.toUpperCase()})),$o=Fn("toUpperCase");function Qo(e,t,r){return e=xo(e),(t=r?i:t)===i?function(e){return rt.test(e)}(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.match(he)||[]}(e):e.match(t)||[]}var el=Kr((function(e,t){try{return St(e,i,t)}catch(e){return Ja(e)?e:new we(e)}})),tl=rs((function(e,t){return Mt(t,(function(t){t=ks(t),sr(e,t,Oa(e[t],e))})),e}));function il(e){return function(){return e}}var rl=Hn(),nl=Hn(!0);function sl(e){return e}function al(e){return Lr("function"==typeof e?e:lr(e,1))}var ol=Kr((function(e,t){return function(i){return Or(i,e,t)}})),ll=Kr((function(e,t){return function(i){return Or(e,i,t)}}));function hl(e,t,i){var r=No(t),n=_r(t,r);null==i&&(!to(t)||!n.length&&r.length)&&(i=t,t=e,e=this,n=_r(t,No(t)));var s=!(to(i)&&"chain"in i&&!i.chain),a=$a(e);return Mt(n,(function(i){var r=t[i];e[i]=r,a&&(e.prototype[i]=function(){var t=this.__chain__;if(s||t){var i=e(this.__wrapped__),n=i.__actions__=On(this.__actions__);return n.push({func:r,args:arguments,thisArg:e}),i.__chain__=t,i}return r.apply(e,Pt([this.value()],arguments))})})),e}function ul(){}var cl=jn(Nt),pl=jn(Dt),dl=jn(Ut);function fl(e){return bs(e)?Wt(ks(e)):function(e){return function(t){return Er(t,e)}}(e)}var ml=Yn(),gl=Yn(!0);function yl(){return[]}function vl(){return!1}var Tl=Vn((function(e,t){return e+t}),0),xl=Zn("ceil"),bl=Vn((function(e,t){return e/t}),1),_l=Zn("floor");var El=Vn((function(e,t){return e*t}),1),wl=Zn("round"),Sl=Vn((function(e,t){return e-t}),0);return Hi.after=function(e,t){if("function"!=typeof t)throw new Oe(r);return e=go(e),function(){if(--e<1)return t.apply(this,arguments)}},Hi.ary=Aa,Hi.assign=bo,Hi.assignIn=_o,Hi.assignInWith=Eo,Hi.assignWith=wo,Hi.at=So,Hi.before=Da,Hi.bind=Oa,Hi.bindAll=tl,Hi.bindKey=Ra,Hi.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Hi.chain=da,Hi.chunk=function(e,t,r){t=(r?xs(e,t,r):t===i)?1:vi(go(t),0);var n=null==e?0:e.length;if(!n||t<1)return[];for(var s=0,a=0,o=_e(mt(n/t));ss?0:s+r),(n=n===i||n>s?s:go(n))<0&&(n+=s),n=r>n?0:yo(n);r>>0)?(e=xo(e))&&("string"==typeof t||null!=t&&!ao(t))&&(!(t=un(t))&&ai(e))?_n(pi(e),0,r):e.split(t,r):[]},Hi.spread=function(e,t){if("function"!=typeof e)throw new Oe(r);return t=null==t?0:vi(go(t),0),Kr((function(i){var r=i[t],n=_n(i,0,t);return r&&Pt(n,r),St(e,this,n)}))},Hi.tail=function(e){var t=null==e?0:e.length;return t?nn(e,1,t):[]},Hi.take=function(e,t,r){return e&&e.length?nn(e,0,(t=r||t===i?1:go(t))<0?0:t):[]},Hi.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?nn(e,(t=n-(t=r||t===i?1:go(t)))<0?0:t,n):[]},Hi.takeRightWhile=function(e,t){return e&&e.length?fn(e,hs(t,3),!1,!0):[]},Hi.takeWhile=function(e,t){return e&&e.length?fn(e,hs(t,3)):[]},Hi.tap=function(e,t){return t(e),e},Hi.throttle=function(e,t,i){var n=!0,s=!0;if("function"!=typeof e)throw new Oe(r);return to(i)&&(n="leading"in i?!!i.leading:n,s="trailing"in i?!!i.trailing:s),Ca(e,t,{leading:n,maxWait:t,trailing:s})},Hi.thru=fa,Hi.toArray=fo,Hi.toPairs=Ho,Hi.toPairsIn=Go,Hi.toPath=function(e){return Wa(e)?Nt(e,ks):ho(e)?[e]:On(Us(xo(e)))},Hi.toPlainObject=To,Hi.transform=function(e,t,i){var r=Wa(e),n=r||Za(e)||uo(e);if(t=hs(t,4),null==i){var s=e&&e.constructor;i=n?r?new s:[]:to(e)&&$a(s)?Gi(Xe(e)):{}}return(n?Mt:xr)(e,(function(e,r,n){return t(i,e,r,n)})),i},Hi.unary=function(e){return Aa(e,1)},Hi.union=ia,Hi.unionBy=ra,Hi.unionWith=na,Hi.uniq=function(e){return e&&e.length?cn(e):[]},Hi.uniqBy=function(e,t){return e&&e.length?cn(e,hs(t,2)):[]},Hi.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?cn(e,i,t):[]},Hi.unset=function(e,t){return null==e||pn(e,t)},Hi.unzip=sa,Hi.unzipWith=aa,Hi.update=function(e,t,i){return null==e?e:dn(e,t,Tn(i))},Hi.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:dn(e,t,Tn(r),n)},Hi.values=zo,Hi.valuesIn=function(e){return null==e?[]:$t(e,Po(e))},Hi.without=oa,Hi.words=Qo,Hi.wrap=function(e,t){return ka(Tn(t),e)},Hi.xor=la,Hi.xorBy=ha,Hi.xorWith=ua,Hi.zip=ca,Hi.zipObject=function(e,t){return yn(e||[],t||[],tr)},Hi.zipObjectDeep=function(e,t){return yn(e||[],t||[],Qr)},Hi.zipWith=pa,Hi.entries=Ho,Hi.entriesIn=Go,Hi.extend=_o,Hi.extendWith=Eo,hl(Hi,Hi),Hi.add=Tl,Hi.attempt=el,Hi.camelCase=Vo,Hi.capitalize=jo,Hi.ceil=xl,Hi.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=vo(r))==r?r:0),t!==i&&(t=(t=vo(t))==t?t:0),or(vo(e),t,r)},Hi.clone=function(e){return lr(e,4)},Hi.cloneDeep=function(e){return lr(e,5)},Hi.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:i)},Hi.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:i)},Hi.conformsTo=function(e,t){return null==t||hr(e,t,No(t))},Hi.deburr=Wo,Hi.defaultTo=function(e,t){return null==e||e!=e?t:e},Hi.divide=bl,Hi.endsWith=function(e,t,r){e=xo(e),t=un(t);var n=e.length,s=r=r===i?n:or(go(r),0,n);return(r-=t.length)>=0&&e.slice(r,s)==t},Hi.eq=Ga,Hi.escape=function(e){return(e=xo(e))&&Z.test(e)?e.replace(X,ni):e},Hi.escapeRegExp=function(e){return(e=xo(e))&&re.test(e)?e.replace(ie,"\\$&"):e},Hi.every=function(e,t,r){var n=Wa(e)?Dt:fr;return r&&xs(e,t,r)&&(t=i),n(e,hs(t,3))},Hi.find=ya,Hi.findIndex=js,Hi.findKey=function(e,t){return Bt(e,hs(t,3),xr)},Hi.findLast=va,Hi.findLastIndex=Ws,Hi.findLastKey=function(e,t){return Bt(e,hs(t,3),br)},Hi.floor=_l,Hi.forEach=Ta,Hi.forEachRight=xa,Hi.forIn=function(e,t){return null==e?e:vr(e,hs(t,3),Po)},Hi.forInRight=function(e,t){return null==e?e:Tr(e,hs(t,3),Po)},Hi.forOwn=function(e,t){return e&&xr(e,hs(t,3))},Hi.forOwnRight=function(e,t){return e&&br(e,hs(t,3))},Hi.get=Ao,Hi.gt=za,Hi.gte=Va,Hi.has=function(e,t){return null!=e&&gs(e,t,Mr)},Hi.hasIn=Do,Hi.head=Xs,Hi.identity=sl,Hi.includes=function(e,t,i,r){e=Xa(e)?e:zo(e),i=i&&!r?go(i):0;var n=e.length;return i<0&&(i=vi(n+i,0)),lo(e)?i<=n&&e.indexOf(t,i)>-1:!!n&&Gt(e,t,i)>-1},Hi.indexOf=function(e,t,i){var r=null==e?0:e.length;if(!r)return-1;var n=null==i?0:go(i);return n<0&&(n=vi(r+n,0)),Gt(e,t,n)},Hi.inRange=function(e,t,r){return t=mo(t),r===i?(r=t,t=0):r=mo(r),function(e,t,i){return e>=Ti(t,i)&&e=-p&&e<=p},Hi.isSet=oo,Hi.isString=lo,Hi.isSymbol=ho,Hi.isTypedArray=uo,Hi.isUndefined=function(e){return e===i},Hi.isWeakMap=function(e){return io(e)&&ms(e)==R},Hi.isWeakSet=function(e){return io(e)&&"[object WeakSet]"==Sr(e)},Hi.join=function(e,t){return null==e?"":gi.call(e,t)},Hi.kebabCase=Yo,Hi.last=Js,Hi.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var s=n;return r!==i&&(s=(s=go(r))<0?vi(n+s,0):Ti(s,n-1)),t==t?function(e,t,i){for(var r=i+1;r--;)if(e[r]===t)return r;return r}(e,t,s):Ht(e,Vt,s,!0)},Hi.lowerCase=Xo,Hi.lowerFirst=qo,Hi.lt=co,Hi.lte=po,Hi.max=function(e){return e&&e.length?mr(e,sl,Ir):i},Hi.maxBy=function(e,t){return e&&e.length?mr(e,hs(t,2),Ir):i},Hi.mean=function(e){return jt(e,sl)},Hi.meanBy=function(e,t){return jt(e,hs(t,2))},Hi.min=function(e){return e&&e.length?mr(e,sl,kr):i},Hi.minBy=function(e,t){return e&&e.length?mr(e,hs(t,2),kr):i},Hi.stubArray=yl,Hi.stubFalse=vl,Hi.stubObject=function(){return{}},Hi.stubString=function(){return""},Hi.stubTrue=function(){return!0},Hi.multiply=El,Hi.nth=function(e,t){return e&&e.length?Vr(e,go(t)):i},Hi.noConflict=function(){return dt._===this&&(dt._=Ge),this},Hi.noop=ul,Hi.now=Ma,Hi.pad=function(e,t,i){e=xo(e);var r=(t=go(t))?ci(e):0;if(!t||r>=t)return e;var n=(t-r)/2;return Wn(yt(n),i)+e+Wn(mt(n),i)},Hi.padEnd=function(e,t,i){e=xo(e);var r=(t=go(t))?ci(e):0;return t&&rt){var n=e;e=t,t=n}if(r||e%1||t%1){var s=_i();return Ti(e+s*(t-e+ht("1e-"+((s+"").length-1))),t)}return qr(e,t)},Hi.reduce=function(e,t,i){var r=Wa(e)?Lt:Xt,n=arguments.length<3;return r(e,hs(t,4),i,n,pr)},Hi.reduceRight=function(e,t,i){var r=Wa(e)?Ft:Xt,n=arguments.length<3;return r(e,hs(t,4),i,n,dr)},Hi.repeat=function(e,t,r){return t=(r?xs(e,t,r):t===i)?1:go(t),Zr(xo(e),t)},Hi.replace=function(){var e=arguments,t=xo(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Hi.result=function(e,t,r){var n=-1,s=(t=xn(t,e)).length;for(s||(s=1,e=i);++np)return[];var i=f,r=Ti(e,f);t=hs(t),e-=f;for(var n=Zt(r,t);++i=a)return e;var l=r-ci(n);if(l<1)return n;var h=o?_n(o,0,l).join(""):e.slice(0,l);if(s===i)return h+n;if(o&&(l+=h.length-l),ao(s)){if(e.slice(l).search(s)){var u,c=h;for(s.global||(s=Ae(s.source,xo(de.exec(s))+"g")),s.lastIndex=0;u=s.exec(c);)var p=u.index;h=h.slice(0,p===i?l:p)}}else if(e.indexOf(un(s),l)!=l){var d=h.lastIndexOf(s);d>-1&&(h=h.slice(0,d))}return h+n},Hi.unescape=function(e){return(e=xo(e))&&q.test(e)?e.replace(Y,fi):e},Hi.uniqueId=function(e){var t=++Ue;return xo(e)+t},Hi.upperCase=Jo,Hi.upperFirst=$o,Hi.each=Ta,Hi.eachRight=xa,Hi.first=Xs,hl(Hi,function(){var e={};return xr(Hi,(function(t,i){Fe.call(Hi.prototype,i)||(e[i]=t)})),e}(),{chain:!1}),Hi.VERSION="4.17.21",Mt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Hi[e].placeholder=Hi})),Mt(["drop","take"],(function(e,t){ji.prototype[e]=function(r){r=r===i?1:vi(go(r),0);var n=this.__filtered__&&!t?new ji(this):this.clone();return n.__filtered__?n.__takeCount__=Ti(r,n.__takeCount__):n.__views__.push({size:Ti(r,f),type:e+(n.__dir__<0?"Right":"")}),n},ji.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Mt(["filter","map","takeWhile"],(function(e,t){var i=t+1,r=1==i||3==i;ji.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:hs(e,3),type:i}),t.__filtered__=t.__filtered__||r,t}})),Mt(["head","last"],(function(e,t){var i="take"+(t?"Right":"");ji.prototype[e]=function(){return this[i](1).value()[0]}})),Mt(["initial","tail"],(function(e,t){var i="drop"+(t?"":"Right");ji.prototype[e]=function(){return this.__filtered__?new ji(this):this[i](1)}})),ji.prototype.compact=function(){return this.filter(sl)},ji.prototype.find=function(e){return this.filter(e).head()},ji.prototype.findLast=function(e){return this.reverse().find(e)},ji.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new ji(this):this.map((function(i){return Or(i,e,t)}))})),ji.prototype.reject=function(e){return this.filter(Fa(hs(e)))},ji.prototype.slice=function(e,t){e=go(e);var r=this;return r.__filtered__&&(e>0||t<0)?new ji(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=go(t))<0?r.dropRight(-t):r.take(t-e)),r)},ji.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ji.prototype.toArray=function(){return this.take(f)},xr(ji.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),s=Hi[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);s&&(Hi.prototype[t]=function(){var t=this.__wrapped__,o=n?[1]:arguments,l=t instanceof ji,h=o[0],u=l||Wa(t),c=function(e){var t=s.apply(Hi,Pt([e],o));return n&&p?t[0]:t};u&&r&&"function"==typeof h&&1!=h.length&&(l=u=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=l&&!d;if(!a&&u){t=m?t:new ji(this);var g=e.apply(t,o);return g.__actions__.push({func:fa,args:[c],thisArg:i}),new Vi(g,p)}return f&&m?e.apply(this,o):(g=this.thru(c),f?n?g.value()[0]:g.value():g)})})),Mt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Re[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Hi.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var n=this.value();return t.apply(Wa(n)?n:[],e)}return this[i]((function(i){return t.apply(Wa(i)?i:[],e)}))}})),xr(ji.prototype,(function(e,t){var i=Hi[t];if(i){var r=i.name+"";Fe.call(Ri,r)||(Ri[r]=[]),Ri[r].push({name:t,func:i})}})),Ri[Gn(i,2).name]=[{name:"wrapper",func:i}],ji.prototype.clone=function(){var e=new ji(this.__wrapped__);return e.__actions__=On(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=On(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=On(this.__views__),e},ji.prototype.reverse=function(){if(this.__filtered__){var e=new ji(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},ji.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=Wa(e),r=t<0,n=i?e.length:0,s=function(e,t,i){for(var r=-1,n=i.length;++r=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Hi.prototype.plant=function(e){for(var t,r=this;r instanceof zi;){var n=Hs(r);n.__index__=0,n.__values__=i,t?s.__wrapped__=n:t=n;var s=n;r=r.__wrapped__}return s.__wrapped__=e,t},Hi.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof ji){var t=e;return this.__actions__.length&&(t=new ji(this)),(t=t.reverse()).__actions__.push({func:fa,args:[ta],thisArg:i}),new Vi(t,this.__chain__)}return this.thru(ta)},Hi.prototype.toJSON=Hi.prototype.valueOf=Hi.prototype.value=function(){return mn(this.__wrapped__,this.__actions__)},Hi.prototype.first=Hi.prototype.head,et&&(Hi.prototype[et]=function(){return this}),Hi}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(dt._=mi,define((function(){return mi}))):mt?((mt.exports=mi)._=mi,ft._=mi):dt._=mi}).call(e)}));!function(){if("undefined"!=typeof document&&!document.getElementById("fc9e2da07139cefaa9ac130a040be6afc71db71f412dd9abe895a85128468a55")){var e=document.createElement("style");e.id="fc9e2da07139cefaa9ac130a040be6afc71db71f412dd9abe895a85128468a55",e.textContent='@import"https://at.alicdn.com/t/font_2809422_tyv73h24h8.css";@import"https://at.alicdn.com/t/c/font_2802048_la37g7yevws.css";.axesRenderer{width:100px;height:100px;position:absolute;display:block;bottom:1px;left:10px;background:#ffffff00}.overview-map{width:200px;height:200px;top:10px;left:10px;position:absolute;z-index:1;border:1px #50505090 solid;background-color:#80808030}.statsOutput{position:absolute;opacity:.6;top:1px;left:1px}#navCube{position:absolute;bottom:10px;right:10px;z-index:1;pointer-events:none;cursor:pointer}#navCube:hover{opacity:1}.css3d-navcube .navcube-plane{backface-visibility:hidden;z-index:1;transition:all .2s}.css3d-navcube .navcube-plane.outer{opacity:.7;background:linear-gradient(-45deg,transparent 15px,#efefef 0) bottom right,linear-gradient(-135deg,transparent 15px,#efefef 0) top right,linear-gradient(135deg,transparent 15px,#efefef 0) top left,linear-gradient(45deg,transparent 15px,#efefef 0) bottom left;background-size:70% 70%;background-repeat:no-repeat}.css3d-navcube .navcube-plane.inner{margin:2px;font-size:30px;text-align:center;line-height:100px;background:linear-gradient(-45deg,transparent 14px,#2c7be5 0) bottom right,linear-gradient(-135deg,transparent 14px,#2c7be5 0) top right,linear-gradient(135deg,transparent 14px,#2c7be5 0) top left,linear-gradient(45deg,transparent 14px,#2c7be5 0) bottom left;background-size:70% 70%;background-repeat:no-repeat}.css3d-navcube .navcube-plane:hover{opacity:1!important}.css3d-navcube .navcube-edge{opacity:0;z-index:2;transition:all .2s}.css3d-navcube .navcube-edge:hover{opacity:1!important}.css3d-navcube .navcube-corner{opacity:.7;backface-visibility:hidden;box-sizing:content-box;transform-origin:50% 33%;top:4px;z-index:3;transition:all .2s}.css3d-navcube .navcube-corner-plane{opacity:0;backface-visibility:hidden;transform-origin:bottom;top:-6.5px;z-index:3;transition:all .2s}.css3d-navcube .highlight{opacity:1}.progress-bar{z-index:3;bottom:20%;left:25%;position:absolute;color:#ffffffa0;width:50%;user-select:none}.progress-bar.hidden{display:none}.progress-bar .progress-bar-item{width:100%;text-align:center;padding:2px}.pop-panel{z-index:99999999;top:calc(70% - 100px);left:calc(90% - 160px);position:absolute;background:#ffffff;color:#333;border-radius:4px;width:160px;box-shadow:0 12px 48px 16px #00000008,0 9px 28px #0000000d,0 6px 16px -8px #00000014}.pop-panel .pop-panel-header{font-size:16px;font-weight:bolder;padding:16px 24px 8px;color:#333;border-bottom:1px solid #EFEFEF;cursor:move;user-select:none}.pop-panel .pop-panel-body{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px 24px}.pop-panel .pop-panel-body .pop-panel-item{display:inline-block;cursor:pointer;margin-right:16px;font-size:16px}.pop-panel .pop-panel-body .pop-panel-item .gemini-viewer-icon{font-size:24px}.pop-panel .pop-panel-body .pop-panel-item:last-child{margin-right:0}.pop-panel .pop-panel-body .pop-panel-item:hover,.pop-panel .pop-panel-body .pop-panel-item.active{color:#2c7be5}.pop-panel .pop-panel-body .pop-panel-item.disable{color:#999;cursor:not-allowed}.model-layout-switch-bar{position:absolute;bottom:0;width:100%;height:24px;background:#ffffff;opacity:.7;display:flex;font-size:14px;line-height:1;overflow-x:scroll;z-index:1}.model-layout-switch-bar .model-layout-switch-bar-content{white-space:nowrap}.model-layout-switch-bar .model-layout-switch-bar-content .model-layout-switch-item{position:relative;display:inline-block;padding:3px 10px 0;color:#000;height:22px;cursor:pointer;transform:translate(0)}.model-layout-switch-bar .model-layout-switch-bar-content .model-layout-switch-item:before{content:"";position:absolute;inset:0;z-index:-1;background:#fff;border:1px solid #000;border-top:0px}.model-layout-switch-bar .model-layout-switch-bar-content .model-layout-switch-item:hover{color:#8080f0}.model-layout-switch-bar .model-layout-switch-bar-content .model-layout-switch-item:nth-child(n+2){margin-left:-1px}.model-layout-switch-bar .model-layout-switch-bar-content .model-layout-switch-item.activate{color:#fff!important}.model-layout-switch-bar .model-layout-switch-bar-content .model-layout-switch-item.activate:before{background:#212830!important}.model-layout-switch-bar.hidden{display:none}.follow-tooltip{z-index:99999999;position:absolute;left:-500px;padding:6px;background:rgba(25,25,25,.3);color:#fffc;font-size:12px;border-radius:2px}.context-menu{position:absolute;box-sizing:border-box;background-color:#fff;width:200px;padding:2px;border-radius:2px;box-shadow:0 4px 8px #0003,0 6px 20px #00000030;cursor:pointer;z-index:2}.context-menu ul{list-style:none;padding:0}.context-menu ul:last-child li{border-bottom:0px}.context-menu li{height:2rem;padding:.5rem;box-sizing:border-box}.context-menu li:hover{background-color:#d3d3d3}.context-menu li.disabled{color:#ccc;cursor:not-allowed}.context-menu li:last-child{border-bottom:1px solid #000}.toolbar{position:absolute;display:flex;box-sizing:border-box;height:68px;left:50%;bottom:40px;padding:8px 20px;border:rgba(153,153,153,.8) 1px solid;border-radius:4px;background:rgba(255,255,255,.8);transform:translate(-50%);align-items:center;z-index:10;user-select:none}.toolbar .toolbar-group{display:flex;padding:0 2px;box-sizing:border-box}.toolbar .toolbar-group-division{width:1px;background-color:#999c;height:60%}.toolbar .toolbar-menu{display:flex;box-sizing:border-box;flex-direction:column;width:50px;height:50px;padding:3px 0;margin:0 2px;transition:all .3s;cursor:pointer;color:#666;border-radius:4px}.toolbar .toolbar-menu.active{color:#2c7be5}.toolbar .toolbar-menu .icon{width:24px;height:24px;margin:auto;font-size:24px;line-height:normal}.toolbar .toolbar-menu span{display:block;width:100%;margin:auto;font-size:.75em;text-align:center;user-select:none}.toolbar .toolbar-menu:hover{color:#2c7be5;background-color:#fffc}.toolbar .toolbar-parent-menu{position:relative}.toolbar .toolbar-parent-menu:hover .toolbar-sub-menu{display:block}.toolbar .toolbar-parent-menu:hover .toolbar-sub-menu-list{background:rgba(255,255,255,.8)}.toolbar .toolbar-parent-menu:after{content:"";position:absolute;box-sizing:border-box;width:0;height:0;right:2px;top:2px;border-width:4px;border-style:solid;border-top-color:#666;border-right-color:#666;border-bottom-color:transparent;border-left-color:transparent;border-radius:1px}.toolbar .toolbar-sub-menu{display:none;position:absolute;width:50px;bottom:100%}.toolbar .toolbar-sub-menu .toolbar-sub-menu-list{margin-bottom:2px;border-radius:4px}.toolbar .toolbar-sub-menu .toolbar-sub-menu-list .toolbar-menu{margin:0}.bottom-bar{position:absolute;bottom:0;right:0;display:flex;color:#666;z-index:3;overflow:hidden;user-select:none}.bottom-bar i{font-size:18px;padding:3px;align-self:center;opacity:.4;cursor:pointer;line-height:1}.bottom-bar i:hover,.bottom-bar i.active{color:#2c7be5;opacity:1}.bottom-bar .fps{width:4rem}.bottom-bar span{align-self:center;padding:4px;font-size:14px}#statistics-tooltip,#tips-tooltip,#cameraInfo-tooltip{position:absolute;right:5px;bottom:30px;background:#666666;color:#fff;padding:8px 8px 5px;font-size:.8rem;border-radius:4px;z-index:3;opacity:.9;user-select:none}#statistics-tooltip p,#tips-tooltip p,#cameraInfo-tooltip p{padding-bottom:3px;margin:3px}#statistics-tooltip p span,#tips-tooltip p span,#cameraInfo-tooltip p span{float:left;margin-right:10px}.hide{display:none}.bim-viewer-spinner{position:absolute;display:flex;top:calc(50% - 20px);left:calc(50% - 20px);opacity:.8;justify-content:center;align-items:center;z-index:10}.bim-viewer-spinner>div{font-size:3rem;animation:spin 1s infinite linear;color:#2c7be5}.bim-viewer-spinner.hidden{display:none}.svg-renderer{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}.spinner{position:absolute;display:flex;width:100%;height:100%;opacity:.8;background-color:#fff;justify-content:center;align-items:center;z-index:10}.spinner>div{font-size:3rem;animation:spin 1s infinite linear;color:#2c7be5}.spinner.hidden{display:none}.compare-markups-canvas{position:absolute;top:0;left:0;pointer-events:none;user-select:none}.anchor{position:absolute;top:0;left:0;opacity:0;width:20px;height:20px;transform:translate(-50%,-50%);pointer-events:none;user-select:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAADjRJREFUeF7tXQnQttUYvq4Zxr5MqBgaihRlKakUU7SYSBQljUhaxijtso2MTCrRn8YoldKIUlIIJRplSyKyqzGyJDSDLGHmMtfvvOb19n7fe7Zn+/7nnnnn+/7/O8t9zrne+5xzn3sh1hCS9GUA20UO9xqS20eWHXQxDpr7BOZHAMyfrBEA8+dllAAJX65BFB0lwCgBxjPAHAyMW8C4BQxCghczOW4B4xYwbgHjFjDqAWYxMJ4BxjNA8fY6iAbGM8B4BhjPAGvKGUDSYwA8FcAmAJ4EYOPw8/6R4upvAH4I4Efh580AbiJ5W2T9wRRbEWcASTuFBX/a1KLfq/Iq/HsKDN8NgLiych+tNzdYAEh6JoAXAdgtLHrrkwfAkuEyAJeTvL4LBkr7HBQAJK0fFtwLH/u0WzpHsfWvMRAMCJK3xlbqutwgACDplVMLf++uJ21B//+aAsL5PecVvQaApB0BHA3AP4dIVwE4maR/9pJ6CYBwij8GwOt7OWvpTJ0O4KQ+3iJ6BwBJXnQvvq9yK4l8hTQIDIbeUG8AsALEfeyi9mpb6AUAJL0bwBtjZ3CFlDuR5LFdj6VzAEi6EMCeXU9ER/1fRHKvjvpe3W1nAJC0NoDPAnhGwxNwF4DbZz6/m/q3u183fNaZ+n3yfw9smL8bALyA5B0N9zO3+U4AIMmL/gUAazU0aKtor/CH5M9K+pD0BAC7hI9Vzk3QnQB2JmkwtEqtA0DS7gAuqTxKn7C96F8EcBXJP1Zuf3Vzkh4WdBI7ADAYat9U9iD5ySZ4X6rNVgEg6TAA76s4wKsBnBa+6X6saY0k+bHJkuFQAM+r2PHhJE+t2N6yTbUGAEkHADiz0sBu8sKTPKdSe0XNSHpNAIKfoGvQgSQ/VKOhRW20AoDwcvfNRcxE/P034Rvvxf97RPnWiki6XwCBJcKjKnS8ZRsvjI0DILzg3VI4IX5gsahf1Ud16vTYghr7DQEMpQ9XGzT9stgoACQ9BMD3Cw9LlhyvI3ljIYharS5pMwAfALBlQcc+3G5K8k8FbXR3BpDkE+1LCpj3+/o+JH2XHxxJsg7ho8FwJZf/S0n65tQINSYBJH0QwEEFXJ9F0gfHwZMkH+heWzCQM0geXFB/yaqNAEDS8QDeUsDwsSRPLKjfu6qS/NbhN49cehfJt+ZWXqpedQCEV70SY8ltSX619kD70J6kbQBcV8DLTrWNS5oAgBc/y4KHZHV+Cia7saqSlNm4tZxV1dFVJzwYc7w/c3BPJPnTzLqDqiZpQwA/yWT6kJpGJdUAEO6/Ft05+vFdSX4mc0IGWU3SCwF8OoN5Xw23qaUPqQkAf/NzbPiOJPnejIkYfBVJRwA4JWMgp5M8JKPePapUAUDBwa+x602NyWmjjYLrcpUDYS0A5Bz87Ky5C8l/tDHRs31IesTUdnUbyd93xMd9g+1CalzCKgfCYgAEp42PJE6edftbtaXeDWrZ59ryJiz6owHcZ4bnuwH8CoD3WFsqfall/r4BIPXtYF+SRc4nNQBwMYA9EgFwCsmjEuskFZe0c7A1tAuZXcpyyC5edvmy7Z4tmBojSe8BcGRiB5eQfGlinf8rXgSA8NL340Tk+knX3/5GXK0l+U3ehievLpmYOXXPBXAqSdsiVKdwi7IUSHlKtiTdqOTFsBQAhwNIPcE3ouaVZN9/q0q9+H6bb4Jsg2BrneNJOoZAVcpUFx9BMtvKqhQAKVE3PFn+9mxd25hD0tMB+PHJLuNtkF3BDyb5nZqdBaOSr4dYB7FNF4W1zQZAppXP/rXNuCS9HMDHYmercrm9SX68ZpvBvOzsxDazrYdKAJD64nc1SVvTViNJbwdwXLUG8xo6juQ78qrOryXJ1s0phqbZL4UlALClj2PwxNJuJG3gUYXCKf/zVRorb+RZJC26q5AkB8Bw5JFYupnkprGFp8tlASBD8/dbAOuRrGK6XeFZNWeuFtV5HMlfLCoU8/dgcv5LAI+MKR/KZGkGcwHg+6rvrbF0Acl9YgsvVy5c8+z1k3JdqtH1ojasDfWj1j8XFYz5uySbkr0ipmwocxTJ5HeFXAD4TvyqBOaq2blL8jaya0LfbRY9geSba3SY4UdxHslk3UcuAL4NwFavsbRODefHgifUWD5Ly1lP4GtusbIoOM/aiTWWbiS5eWzhSblkAEiy6PVeF6u3vpbkc1IZm1e+59/+Ccvnktyv0ni/AuDZkW1ZK/hYkta0RlMOAGySlKIXr6L5G8C3f3rSn1/j7SBDM2gP4yR7zBwApKp/Nybp94IiknQBgL2LGmmvctZ+PMuepI1CuNpYzpPVwjkAsJbKzpAxdBfJB8UUXK6MJLfxawDFbZXyElnf9gXrRZZdtpikvwCIDVJxDsn9U/rNAYBdtWJ17j8n6QALRSRpXwDnFTXSfuUqyiFJDnDx+Ej2ryeZ5IrGEEc/sv3VxbYA8IDICteRjD3ELNlkBRezSHarFnsbSavLi0jStQC2jWzkrwC+FVl2dTEDINdGPaafi0m+LKbggi2gSR5L2VuqftEr3aRRSZ8AUGT0sdwAmwZAsfWqpAcDaMw7tqnVB3ALyVjRvZz0y7W2jhpa0wAoFoOSbL/XiPVQ1AzlF7qbpA0+i0iSjVzeWdTIMpWbBsABJM8qYV6SM378oKSNDuuuXWptLMlexY2Fi2kaAMUeP5K2BvC1DhexpOvNSy2Lm1aAjQAoWd7Fddd4AIxbQKHDydC3gPEQuFhKLFti6IfA8RpYDoBBXwNHRVA5ABpXBNm2P4X8DhCbgLGWKjjVPCplPE2VPZpkitncXD4SVcF2VklKX5fzGGRdc2yI91qPQQ4112oQ5QqoKL4BmIfEx6AbSPqtJppyAGBPYKdxi6Faz8F+DrXnrgNPDoFuJblBDUYTn4PPJ+mX02jKAYDTnJwQ3QOwYWnM/vBNSAFeAnuNFE1+l5/HRchVkBI36U0kk0LR5QAgNbbNYSRXlU5z0xqxUv5m6tcyCXPM4ZTQ8cma1xwAOAiU/eZjkzNfSdK++sW0BhqF2vYyNiycnW7WT3W7TwZAEMc2e35Kwoo+vEYWjwFIgZpm4c5O8oeEOf4eyeR8BbkASL2WVfOi7bkUqOkYkur1nOV9lQsA5/M9KQGdZ5MsCZb8v64kbQXgcwAemtB/G0V9/96+VuAISX5GTzHwPIbkyakDzQVAqm+ADTq8P9VyDrXPnKVQn2izWgEjgnOoz1kpQTeTfQI8eVkACOeArt3DHSjRWUT6QNW2uDC3/XYPD0yOASL+C701NkCE3wRSE0E1ESLGV8yuAkVUue9Pi7DBhIgJUqAvQaIch/+iFmMG2AFzz9p5DQYVJCoAINVP0NWqOIvObvwhcIStZ5uOHeAI3zZ0KXYBnzOGnKwiyf6A0/1mHwIDAByBs2+BIq2qPrABIHjhz2wqrP0gA0UGEPQ1VKyB4Ouif+Y6ldox03kMrGRpNJ/BIEPFBgD4abi3waKDZ7HtCV6ckMLuUgCfAuCUbQZBoxSCWQ8zWHQAQU64eN8gdmg7J2BwNbO7mT8T+wK7nv3ZH5L+2RqF3IKOC5jk1RuypMc+FC05nqIzwKTVjLBxk6qXk9yttdnuYUeSHA/Qip9UygoLN9tJFQAEKZBrvbpiEkSmrmBBQslia+sJrzUBYL11btKoRq6GqQvSZvmM+D8T9vqZNCpIASeNyk0bt2ITRs6575ckkOxn2rip80DOgXB19TFx5EIZVCVP0HQv1baACgfCSRMrNoFkYcJIz0+Vg1+jAAhbgS1TrdbMpWTjxtyO2qpXwZztRJK2yK5K1SXAlCS4MCRtymV4xSSULEgQOZk7J63aK3cil6vXGACCJEjxIprH5xnOAdRVbsHSCZfkEDE26z6ooK1kb5+UvpoGwNoh0uVaKUzNlPWTs0Oh31jQRutVg3rXvoGpCSGneb0TgCOt3tHUABoFQJAC9iNMil03Z7AOhGzzr1Wpdu9NTdxS7YZXPTt0HJoQUHup5rYgeUOTY2gcAAEEuwO4pMJAbIhhIJxWO/NYKW/BmMOL7k+NZBZ7kGzcIbYVAAQQOJ9fdn67mQWyMYZBcE7pwtWoH8y4vPDJjhlL9H84yRSXsOxhtAaAAIIDbFSRze09K14dJMIVtUzOY3kLptu7hG98SoavRV1Uy66yqCP/vVUABBDkGJMuGouTUvmw6Dy/lzV1aApZPPx66XzEPtylJHVaNAb/PTv/X0zj88q0DoAAApuSebFSHB9SxugAy84AbjAU5SoIMfu96M48Xhz4eolB+IFnu5IcwCmTM122EwAEENgY48MJVjq5Y7wLwO0zH+fimfyf2103fNaZ+n3yf7Gx+nP5s/XRfiQ7iYfcGQAmsyXJOX9LFCW5E9+HemeQPLhLRjoHQJAGqV5GXc5Zrb6z073WYqCTQ+BSzAezMnsd71hzgD1s6yoAJ5P0z86pFxJgehYk2ajkmAYPiF1Nug96J5E8vSsGenMLWDQBQZ1qEBgMK4G86F783uU96J0EmJEG3g6GvC30StwPRgLMMirJzie+i9t8OjZjaVeSww9Xzm9sHcT5XTER22+vJcAcIFiBNAGCtXF9Iiu2Jgvv6B6DoEEBYGZ7sErZEsGA2KSj2b7Z33QvPMmkGL0d8XuPbgcLgDlnBYet23TqU3ursGh3WJzJx2HZenGVKwHTigDAnK3C7/GWCk8OPye/xya8dAJGJ6ryN9yf1b+nZuYuWZi26q5IAMybvJAhNfbcUCXpY1uLWNLPCID5szcCoARVfaw7SoD5qzJKgFEC9PH7Wp+nUQKMEiAlpN14Bqj/Hey2xVECjBJglABzMDAeAsdDYLeiua3exy1g3ALGLWDcAlY7dMTQGnML+A8qtnUcTFYqYAAAAABJRU5ErkJggg==) no-repeat center center;background-size:100% 100%;background-blend-mode:lighten;filter:invert(61%) sepia(87%) saturate(845%) hue-rotate(120deg) brightness(94%) contrast(101%);transition:opacity .5s ease-in-out}.anchor.active{opacity:1}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}\n',document.head.appendChild(e)}}();var ANe=fetch;window.fetch=(...e)=>Promise.resolve(ANe(...e));var _5r=kn(r9(),1),S5r=kn(ace(),1),w5r=kn(oce(),1),Lt={};QS(Lt,{ACESFilmicToneMapping:()=>$ue,AddEquation:()=>Sa,AddOperation:()=>Wue,AdditiveAnimationBlendMode:()=>HU,AdditiveBlending:()=>vp,AlphaFormat:()=>rhe,AlwaysDepth:()=>Uue,AlwaysStencilFunc:()=>mhe,AmbientLight:()=>Cl,AmbientLightProbe:()=>X4,AnimationClip:()=>so,AnimationLoader:()=>k4,AnimationMixer:()=>rU,AnimationObjectGroup:()=>eU,AnimationUtils:()=>lvt,ArcCurve:()=>xg,ArrayCamera:()=>PD,ArrowHelper:()=>Ug,Audio:()=>QD,AudioAnalyser:()=>J4,AudioContext:()=>xx,AudioListener:()=>K4,AudioLoader:()=>q4,AxesHelper:()=>mU,BackSide:()=>zn,BasicDepthPacking:()=>dhe,BasicShadowMap:()=>ipt,Bone:()=>Sl,BooleanKeyframeTrack:()=>Pp,Box2:()=>rs,Box3:()=>Dt,Box3Helper:()=>dU,BoxBufferGeometry:()=>gU,BoxGeometry:()=>eo,BoxHelper:()=>Hg,BufferAttribute:()=>Wt,BufferGeometry:()=>lt,BufferGeometryLoader:()=>JD,ByteType:()=>Zue,Cache:()=>Ng,Camera:()=>bp,CameraHelper:()=>wx,CanvasTexture:()=>L4,CapsuleBufferGeometry:()=>vU,CapsuleGeometry:()=>_g,CatmullRomCurve3:()=>HD,CineonToneMapping:()=>Xue,CircleBufferGeometry:()=>yU,CircleGeometry:()=>Sg,ClampToEdgeWrapping:()=>gn,Clock:()=>Al,Color:()=>je,ColorKeyframeTrack:()=>yx,ColorManagement:()=>Ys,CompressedArrayTexture:()=>N4,CompressedTexture:()=>ux,CompressedTextureLoader:()=>G4,ConeBufferGeometry:()=>TU,ConeGeometry:()=>wg,CubeCamera:()=>AD,CubeReflectionMapping:()=>af,CubeRefractionMapping:()=>of,CubeTexture:()=>Eg,CubeTextureLoader:()=>Tx,CubeUVReflectionMapping:()=>zy,CubicBezierCurve:()=>hx,CubicBezierCurve3:()=>UD,CubicInterpolant:()=>qD,CullFaceBack:()=>UH,CullFaceFront:()=>Due,CullFaceFrontBack:()=>rpt,CullFaceNone:()=>Mue,Curve:()=>Ma,CurvePath:()=>kD,CustomBlending:()=>Fp,CustomToneMapping:()=>Kue,CylinderBufferGeometry:()=>EU,CylinderGeometry:()=>Rl,Cylindrical:()=>oU,Data3DTexture:()=>ox,DataArrayTexture:()=>Ay,DataTexture:()=>Il,DataTextureLoader:()=>Fg,DataUtils:()=>Yy,DecrementStencilOp:()=>dpt,DecrementWrapStencilOp:()=>mpt,DefaultLoadingManager:()=>ao,DepthFormat:()=>sf,DepthStencilFormat:()=>Tp,DepthTexture:()=>cf,DirectionalLight:()=>$s,DirectionalLightHelper:()=>Sx,DiscreteInterpolant:()=>YD,DodecahedronBufferGeometry:()=>bU,DodecahedronGeometry:()=>Rg,DoubleSide:()=>gi,DstAlphaFactor:()=>Gy,DstColorFactor:()=>Vy,DynamicCopyUsage:()=>Cpt,DynamicDrawUsage:()=>_pt,DynamicReadUsage:()=>Rpt,EdgesGeometry:()=>Rp,EllipseCurve:()=>wp,EqualDepth:()=>kue,EqualStencilFunc:()=>Tpt,EquirectangularReflectionMapping:()=>yg,EquirectangularRefractionMapping:()=>tx,Euler:()=>xr,EventDispatcher:()=>Bo,ExtrudeBufferGeometry:()=>xU,ExtrudeGeometry:()=>Mp,FileLoader:()=>ui,Float16BufferAttribute:()=>x4,Float32BufferAttribute:()=>dt,Float64BufferAttribute:()=>I4,FloatType:()=>wa,Fog:()=>Uu,FogExp2:()=>Ny,FramebufferTexture:()=>P4,FrontSide:()=>tn,Frustum:()=>Xs,GLBufferAttribute:()=>sU,GLSL1:()=>Opt,GLSL3:()=>p4,GreaterDepth:()=>Vue,GreaterEqualDepth:()=>Gue,GreaterEqualStencilFunc:()=>Ipt,GreaterStencilFunc:()=>bpt,GridHelper:()=>_x,Group:()=>ur,HalfFloatType:()=>Uo,HemisphereLight:()=>df,HemisphereLightHelper:()=>hU,HemisphereLightProbe:()=>Y4,IcosahedronBufferGeometry:()=>IU,IcosahedronGeometry:()=>Dg,ImageBitmapLoader:()=>bx,ImageLoader:()=>Lg,ImageUtils:()=>ax,IncrementStencilOp:()=>ppt,IncrementWrapStencilOp:()=>fpt,InstancedBufferAttribute:()=>Sp,InstancedBufferGeometry:()=>ZD,InstancedInterleavedBuffer:()=>nU,InstancedMesh:()=>rn,Int16BufferAttribute:()=>E4,Int32BufferAttribute:()=>b4,Int8BufferAttribute:()=>v4,IntType:()=>Que,InterleavedBuffer:()=>_p,InterleavedBufferAttribute:()=>to,Interpolant:()=>Op,InterpolateDiscrete:()=>Ep,InterpolateLinear:()=>Hu,InterpolateSmooth:()=>SD,InvertStencilOp:()=>gpt,KeepStencilOp:()=>wD,KeyframeTrack:()=>Go,LOD:()=>FD,LatheBufferGeometry:()=>_U,LatheGeometry:()=>uf,Layers:()=>Oy,LessDepth:()=>Bue,LessEqualDepth:()=>MD,LessEqualStencilFunc:()=>Ept,LessStencilFunc:()=>ypt,Light:()=>Dl,LightProbe:()=>Hy,Line:()=>Ir,Line3:()=>Ca,LineBasicMaterial:()=>vr,LineCurve:()=>Fy,LineCurve3:()=>BD,LineDashedMaterial:()=>Ap,LineLoop:()=>Ly,LineSegments:()=>li,LinearEncoding:()=>_l,LinearFilter:()=>oi,LinearInterpolant:()=>vx,LinearMipMapLinearFilter:()=>lpt,LinearMipMapNearestFilter:()=>opt,LinearMipmapLinearFilter:()=>Ra,LinearMipmapNearestFilter:()=>Bg,LinearSRGBColorSpace:()=>Cy,LinearToneMapping:()=>que,Loader:()=>ci,LoaderUtils:()=>Bs,LoadingManager:()=>Lp,LoopOnce:()=>uhe,LoopPingPong:()=>phe,LoopRepeat:()=>hhe,LuminanceAlphaFormat:()=>ihe,LuminanceFormat:()=>nC,MOUSE:()=>rC,Material:()=>zr,MaterialLoader:()=>Uy,MathUtils:()=>_r,Matrix3:()=>Pi,Matrix4:()=>Be,MaxEquation:()=>VH,Mesh:()=>rt,MeshBasicMaterial:()=>or,MeshDepthMaterial:()=>Ip,MeshDistanceMaterial:()=>cx,MeshLambertMaterial:()=>io,MeshMatcapMaterial:()=>WD,MeshNormalMaterial:()=>pf,MeshPhongMaterial:()=>Es,MeshPhysicalMaterial:()=>Ml,MeshStandardMaterial:()=>Gu,MeshToonMaterial:()=>jD,MinEquation:()=>GH,MirroredRepeatWrapping:()=>yp,MixOperation:()=>jue,MultiplyBlending:()=>kH,MultiplyOperation:()=>Dx,NearestFilter:()=>Di,NearestMipMapLinearFilter:()=>apt,NearestMipMapNearestFilter:()=>spt,NearestMipmapLinearFilter:()=>mp,NearestMipmapNearestFilter:()=>lf,NeverDepth:()=>Hue,NeverStencilFunc:()=>vpt,NoBlending:()=>Ui,NoColorSpace:()=>cpt,NoToneMapping:()=>Lu,NormalAnimationBlendMode:()=>aC,NormalBlending:()=>mg,NotEqualDepth:()=>zue,NotEqualStencilFunc:()=>xpt,NumberKeyframeTrack:()=>Cc,Object3D:()=>cr,ObjectLoader:()=>W4,ObjectSpaceNormalMap:()=>fhe,OctahedronBufferGeometry:()=>SU,OctahedronGeometry:()=>hf,OneFactor:()=>ky,OneMinusDstAlphaFactor:()=>Nue,OneMinusDstColorFactor:()=>Lue,OneMinusSrcAlphaFactor:()=>FU,OneMinusSrcColorFactor:()=>Pue,OrthographicCamera:()=>Ji,PCFShadowMap:()=>LU,PCFSoftShadowMap:()=>By,PMREMGenerator:()=>xp,Path:()=>ku,PerspectiveCamera:()=>Xr,Plane:()=>bi,PlaneBufferGeometry:()=>wU,PlaneGeometry:()=>ts,PlaneHelper:()=>fU,PointLight:()=>Ac,PointLightHelper:()=>uU,Points:()=>nn,PointsMaterial:()=>jn,PolarGridHelper:()=>pU,PolyhedronBufferGeometry:()=>RU,PolyhedronGeometry:()=>Dc,PositionalAudio:()=>Z4,PropertyBinding:()=>Rr,PropertyMixer:()=>eC,QuadraticBezierCurve:()=>px,QuadraticBezierCurve3:()=>dx,Quaternion:()=>Hr,QuaternionKeyframeTrack:()=>Da,QuaternionLinearInterpolant:()=>XD,RED_GREEN_RGTC2_Format:()=>u4,RED_RGTC1_Format:()=>che,REVISION:()=>tC,RGBADepthPacking:()=>Wy,RGBAFormat:()=>Us,RGBAIntegerFormat:()=>ohe,RGBA_ASTC_10x10_Format:()=>a4,RGBA_ASTC_10x5_Format:()=>i4,RGBA_ASTC_10x6_Format:()=>n4,RGBA_ASTC_10x8_Format:()=>s4,RGBA_ASTC_12x10_Format:()=>o4,RGBA_ASTC_12x12_Format:()=>l4,RGBA_ASTC_4x4_Format:()=>$H,RGBA_ASTC_5x4_Format:()=>KH,RGBA_ASTC_5x5_Format:()=>ZH,RGBA_ASTC_6x5_Format:()=>JH,RGBA_ASTC_6x6_Format:()=>QH,RGBA_ASTC_8x5_Format:()=>e4,RGBA_ASTC_8x6_Format:()=>t4,RGBA_ASTC_8x8_Format:()=>r4,RGBA_BPTC_Format:()=>_D,RGBA_ETC2_EAC_Format:()=>XH,RGBA_PVRTC_2BPPV1_Format:()=>qH,RGBA_PVRTC_4BPPV1_Format:()=>WH,RGBA_S3TC_DXT1_Format:()=>bD,RGBA_S3TC_DXT3_Format:()=>xD,RGBA_S3TC_DXT5_Format:()=>ID,RGB_ETC1_Format:()=>lhe,RGB_ETC2_Format:()=>YH,RGB_PVRTC_2BPPV1_Format:()=>jH,RGB_PVRTC_4BPPV1_Format:()=>zH,RGB_S3TC_DXT1_Format:()=>ED,RGFormat:()=>she,RGIntegerFormat:()=>ahe,RawShaderMaterial:()=>zD,Ray:()=>ko,Raycaster:()=>Oc,RectAreaLight:()=>$D,RedFormat:()=>sC,RedIntegerFormat:()=>nhe,ReinhardToneMapping:()=>Yue,RepeatWrapping:()=>vn,ReplaceStencilOp:()=>hpt,ReverseSubtractEquation:()=>Aue,RingBufferGeometry:()=>MU,RingGeometry:()=>Cg,SIGNED_RED_GREEN_RGTC2_Format:()=>h4,SIGNED_RED_RGTC1_Format:()=>c4,SRGBColorSpace:()=>wc,Scene:()=>Pn,ShaderChunk:()=>Yr,ShaderLib:()=>Rc,ShaderMaterial:()=>Yt,ShadowMaterial:()=>VD,Shape:()=>Qa,ShapeBufferGeometry:()=>DU,ShapeGeometry:()=>Dp,ShapePath:()=>Rx,ShapeUtils:()=>es,ShortType:()=>Jue,Skeleton:()=>wl,SkeletonHelper:()=>cU,SkinnedMesh:()=>Bu,Source:()=>Mc,Sphere:()=>Wi,SphereBufferGeometry:()=>CU,SphereGeometry:()=>ro,Spherical:()=>ff,SphericalHarmonics3:()=>KD,SplineCurve:()=>Ig,SpotLight:()=>Vu,SpotLightHelper:()=>lU,Sprite:()=>LD,SpriteMaterial:()=>bg,SrcAlphaFactor:()=>Mx,SrcAlphaSaturateFactor:()=>Fue,SrcColorFactor:()=>Oue,StaticCopyUsage:()=>Dpt,StaticDrawUsage:()=>ix,StaticReadUsage:()=>wpt,StereoCamera:()=>$4,StreamCopyUsage:()=>Apt,StreamDrawUsage:()=>Spt,StreamReadUsage:()=>Mpt,StringKeyframeTrack:()=>Np,SubtractEquation:()=>Cue,SubtractiveBlending:()=>BH,TOUCH:()=>tpt,TangentSpaceNormalMap:()=>gf,TetrahedronBufferGeometry:()=>AU,TetrahedronGeometry:()=>Ag,Texture:()=>Bi,TextureLoader:()=>bs,TorusBufferGeometry:()=>OU,TorusGeometry:()=>Cp,TorusKnotBufferGeometry:()=>PU,TorusKnotGeometry:()=>Og,Triangle:()=>hn,TriangleFanDrawMode:()=>jy,TriangleStripDrawMode:()=>Ax,TrianglesDrawMode:()=>UU,TubeBufferGeometry:()=>NU,TubeGeometry:()=>Pg,TwoPassDoubleSide:()=>npt,UVMapping:()=>iC,Uint16BufferAttribute:()=>Tg,Uint32BufferAttribute:()=>lx,Uint8BufferAttribute:()=>y4,Uint8ClampedBufferAttribute:()=>T4,Uniform:()=>Ix,UniformsGroup:()=>iU,UniformsLib:()=>At,UniformsUtils:()=>pn,UnsignedByteType:()=>Fu,UnsignedInt248Type:()=>gp,UnsignedIntType:()=>nf,UnsignedShort4444Type:()=>ehe,UnsignedShort5551Type:()=>the,UnsignedShortType:()=>Cx,VSMShadowMap:()=>Sy,Vector2:()=>le,Vector3:()=>A,Vector4:()=>Gr,VectorKeyframeTrack:()=>no,VideoTexture:()=>O4,WebGL1Renderer:()=>ND,WebGL3DRenderTarget:()=>m4,WebGLArrayRenderTarget:()=>f4,WebGLCubeRenderTarget:()=>OD,WebGLMultipleRenderTargets:()=>g4,WebGLRenderTarget:()=>Vr,WebGLRenderer:()=>Ol,WebGLUtils:()=>She,WireframeGeometry:()=>GD,WrapAroundEnding:()=>rx,ZeroCurvatureEnding:()=>pg,ZeroFactor:()=>mf,ZeroSlopeEnding:()=>dg,ZeroStencilOp:()=>upt,_SRGBAFormat:()=>DD,sRGBEncoding:()=>gr});var tC="149",rC={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},tpt={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Mue=0,UH=1,Due=2,rpt=3,ipt=0,LU=1,By=2,Sy=3,tn=0,zn=1,gi=2,npt=2,Ui=0,mg=1,vp=2,BH=3,kH=4,Fp=5,Sa=100,Cue=101,Aue=102,GH=103,VH=104,mf=200,ky=201,Oue=202,Pue=203,Mx=204,FU=205,Gy=206,Nue=207,Vy=208,Lue=209,Fue=210,Hue=0,Uue=1,Bue=2,MD=3,kue=4,Gue=5,Vue=6,zue=7,Dx=0,jue=1,Wue=2,Lu=0,que=1,Yue=2,Xue=3,$ue=4,Kue=5,iC=300,af=301,of=302,yg=303,tx=304,zy=306,vn=1e3,gn=1001,yp=1002,Di=1003,lf=1004,spt=1004,mp=1005,apt=1005,oi=1006,Bg=1007,opt=1007,Ra=1008,lpt=1008,Fu=1009,Zue=1010,Jue=1011,Cx=1012,Que=1013,nf=1014,wa=1015,Uo=1016,ehe=1017,the=1018,gp=1020,rhe=1021,Us=1023,nC=1024,ihe=1025,sf=1026,Tp=1027,sC=1028,nhe=1029,she=1030,ahe=1031,ohe=1033,ED=33776,bD=33777,xD=33778,ID=33779,zH=35840,jH=35841,WH=35842,qH=35843,lhe=36196,YH=37492,XH=37496,$H=37808,KH=37809,ZH=37810,JH=37811,QH=37812,e4=37813,t4=37814,r4=37815,i4=37816,n4=37817,s4=37818,a4=37819,o4=37820,l4=37821,_D=36492,che=36283,c4=36284,u4=36285,h4=36286,uhe=2200,hhe=2201,phe=2202,Ep=2300,Hu=2301,SD=2302,pg=2400,dg=2401,rx=2402,aC=2500,HU=2501,UU=0,Ax=1,jy=2,_l=3e3,gr=3001,dhe=3200,Wy=3201,gf=0,fhe=1,cpt="",wc="srgb",Cy="srgb-linear",upt=0,wD=7680,hpt=7681,ppt=7682,dpt=7683,fpt=34055,mpt=34056,gpt=5386,vpt=512,ypt=513,Tpt=514,Ept=515,bpt=516,xpt=517,Ipt=518,mhe=519,ix=35044,_pt=35048,Spt=35040,wpt=35045,Rpt=35049,Mpt=35041,Dpt=35046,Cpt=35050,Apt=35042,Opt="100",p4="300 es",DD=1035,Bo=class{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});let i=this._listeners;void 0===i[e]&&(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;let i=this._listeners;return void 0!==i[e]&&-1!==i[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;let i=this._listeners[e];if(void 0!==i){let e=i.indexOf(t);-1!==e&&i.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;let t=this._listeners[e.type];if(void 0!==t){e.target=this;let i=t.slice(0);for(let t=0,r=i.length;t>8&255]+qs[e>>16&255]+qs[e>>24&255]+"-"+qs[255&t]+qs[t>>8&255]+"-"+qs[t>>16&15|64]+qs[t>>24&255]+"-"+qs[63&i|128]+qs[i>>8&255]+"-"+qs[i>>16&255]+qs[i>>24&255]+qs[255&r]+qs[r>>8&255]+qs[r>>16&255]+qs[r>>24&255]).toLowerCase()}function Qn(e,t,i){return Math.max(t,Math.min(i,e))}function BU(e,t){return(e%t+t)%t}function Ppt(e,t,i,r,n){return r+(e-t)*(n-r)/(i-t)}function Npt(e,t,i){return e!==t?(i-e)/(t-e):0}function Zb(e,t,i){return(1-i)*e+i*t}function Lpt(e,t,i,r){return Zb(e,t,1-Math.exp(-i*r))}function Fpt(e,t=1){return t-Math.abs(BU(e,2*t)-t)}function Hpt(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t))*e*(3-2*e)}function Upt(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t))*e*e*(e*(6*e-15)+10)}function Bpt(e,t){return e+Math.floor(Math.random()*(t-e+1))}function kpt(e,t){return e+Math.random()*(t-e)}function Gpt(e){return e*(.5-Math.random())}function Vpt(e){void 0!==e&&(lce=e);let t=lce+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}function zpt(e){return e*gg}function jpt(e){return e*nx}function d4(e){return 0==(e&e-1)&&0!==e}function ghe(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function CD(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function Wpt(e,t,i,r,n){let s=Math.cos,a=Math.sin,o=s(i/2),l=a(i/2),h=s((t+r)/2),u=a((t+r)/2),c=s((t-r)/2),p=a((t-r)/2),d=s((r-t)/2),f=a((r-t)/2);switch(n){case"XYX":e.set(o*u,l*c,l*p,o*h);break;case"YZY":e.set(l*p,o*u,l*c,o*h);break;case"ZXZ":e.set(l*c,l*p,o*u,o*h);break;case"XZX":e.set(o*u,l*f,l*d,o*h);break;case"YXY":e.set(l*d,o*u,l*f,o*h);break;case"ZYZ":e.set(l*f,l*d,o*u,o*h);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+n)}}function fp(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function un(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}var _r=Object.freeze({__proto__:null,DEG2RAD:gg,RAD2DEG:nx,ceilPowerOfTwo:ghe,clamp:Qn,damp:Lpt,degToRad:zpt,denormalize:fp,euclideanModulo:BU,floorPowerOfTwo:CD,generateUUID:Ho,inverseLerp:Npt,isPowerOfTwo:d4,lerp:Zb,mapLinear:Ppt,normalize:un,pingpong:Fpt,radToDeg:jpt,randFloat:kpt,randFloatSpread:Gpt,randInt:Bpt,seededRandom:Vpt,setQuaternionFromProperEuler:Wpt,smootherstep:Upt,smoothstep:Hpt}),le=class{constructor(e=0,t=0){le.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let i=Math.cos(t),r=Math.sin(t),n=this.x-e.x,s=this.y-e.y;return this.x=n*i-s*r+e.x,this.y=n*r+s*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Pi=class{constructor(){Pi.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,i,r,n,s,a,o,l){let h=this.elements;return h[0]=e,h[1]=r,h[2]=a,h[3]=t,h[4]=n,h[5]=o,h[6]=i,h[7]=s,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,r=t.elements,n=this.elements,s=i[0],a=i[3],o=i[6],l=i[1],h=i[4],u=i[7],c=i[2],p=i[5],d=i[8],f=r[0],m=r[3],g=r[6],y=r[1],v=r[4],T=r[7],x=r[2],b=r[5],_=r[8];return n[0]=s*f+a*y+o*x,n[3]=s*m+a*v+o*b,n[6]=s*g+a*T+o*_,n[1]=l*f+h*y+u*x,n[4]=l*m+h*v+u*b,n[7]=l*g+h*T+u*_,n[2]=c*f+p*y+d*x,n[5]=c*m+p*v+d*b,n[8]=c*g+p*T+d*_,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[1],r=e[2],n=e[3],s=e[4],a=e[5],o=e[6],l=e[7],h=e[8];return t*s*h-t*a*l-i*n*h+i*a*o+r*n*l-r*s*o}invert(){let e=this.elements,t=e[0],i=e[1],r=e[2],n=e[3],s=e[4],a=e[5],o=e[6],l=e[7],h=e[8],u=h*s-a*l,c=a*o-h*n,p=l*n-s*o,d=t*u+i*c+r*p;if(0===d)return this.set(0,0,0,0,0,0,0,0,0);let f=1/d;return e[0]=u*f,e[1]=(r*l-h*i)*f,e[2]=(a*i-r*s)*f,e[3]=c*f,e[4]=(h*t-r*o)*f,e[5]=(r*n-a*t)*f,e[6]=p*f,e[7]=(i*o-l*t)*f,e[8]=(s*t-i*n)*f,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,n,s,a){let o=Math.cos(n),l=Math.sin(n);return this.set(i*o,i*l,-i*(o*s+l*a)+s+e,-r*l,r*o,-r*(-l*s+o*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(sH.makeScale(e,t)),this}rotate(e){return this.premultiply(sH.makeRotation(-e)),this}translate(e,t){return this.premultiply(sH.makeTranslation(e,t)),this}makeTranslation(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,i=e.elements;for(let e=0;e<9;e++)if(t[e]!==i[e])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return(new this.constructor).fromArray(this.elements)}},sH=new Pi;function vhe(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}var qpt={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function wy(e,t){return new qpt[e](t)}function sx(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function vg(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function RD(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}var aH={[wc]:{[Cy]:vg},[Cy]:{[wc]:RD}},Ys={legacyMode:!0,get workingColorSpace(){return Cy},set workingColorSpace(e){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(e,t,i){if(this.legacyMode||t===i||!t||!i)return e;if(aH[t]&&void 0!==aH[t][i]){let r=aH[t][i];return e.r=r(e.r),e.g=r(e.g),e.b=r(e.b),e}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}},yhe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},vs={r:0,g:0,b:0},Ic={h:0,s:0,l:0},LM={h:0,s:0,l:0};function oH(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+6*(t-e)*(2/3-i):e}function FM(e,t){return t.r=e.r,t.g=e.g,t.b=e.b,t}var je=class{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,void 0===t&&void 0===i?this.set(e):this.setRGB(e,t,i)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=wc){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,Ys.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=Ys.workingColorSpace){return this.r=e,this.g=t,this.b=i,Ys.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=Ys.workingColorSpace){if(e=BU(e,1),t=Qn(t,0,1),i=Qn(i,0,1),0===t)this.r=this.g=this.b=i;else{let r=i<=.5?i*(1+t):i+t-i*t,n=2*i-r;this.r=oH(n,r,e+1/3),this.g=oH(n,r,e),this.b=oH(n,r,e-1/3)}return Ys.toWorkingColorSpace(this,r),this}setStyle(e,t=wc){function i(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e,n=r[1],s=r[2];switch(n){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,Ys.toWorkingColorSpace(this,t),i(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,Ys.toWorkingColorSpace(this,t),i(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s)){let r=parseFloat(e[1])/360,n=parseFloat(e[2])/100,s=parseFloat(e[3])/100;return i(e[4]),this.setHSL(r,n,s,t)}}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let e=r[1],i=e.length;if(3===i)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,Ys.toWorkingColorSpace(this,t),this;if(6===i)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,Ys.toWorkingColorSpace(this,t),this}return e&&e.length>0?this.setColorName(e,t):this}setColorName(e,t=wc){let i=yhe[e.toLowerCase()];return void 0!==i?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=vg(e.r),this.g=vg(e.g),this.b=vg(e.b),this}copyLinearToSRGB(e){return this.r=RD(e.r),this.g=RD(e.g),this.b=RD(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=wc){return Ys.fromWorkingColorSpace(FM(this,vs),e),Qn(255*vs.r,0,255)<<16^Qn(255*vs.g,0,255)<<8^Qn(255*vs.b,0,255)<<0}getHexString(e=wc){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Ys.workingColorSpace){Ys.fromWorkingColorSpace(FM(this,vs),t);let i,r,n=vs.r,s=vs.g,a=vs.b,o=Math.max(n,s,a),l=Math.min(n,s,a),h=(l+o)/2;if(l===o)i=0,r=0;else{let e=o-l;switch(r=h<=.5?e/(o+l):e/(2-o-l),o){case n:i=(s-a)/e+(s2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){let t=sx("canvas");t.width=e.width,t.height=e.height;let i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);let r=i.getImageData(0,0,e.width,e.height),n=r.data;for(let e=0;e0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==iC)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case vn:e.x=e.x-Math.floor(e.x);break;case gn:e.x=e.x<0?0:1;break;case yp:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case vn:e.y=e.y-Math.floor(e.y);break;case gn:e.y=e.y<0?0:1;break;case yp:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}};Bi.DEFAULT_IMAGE=null,Bi.DEFAULT_MAPPING=iC,Bi.DEFAULT_ANISOTROPY=1;var Gr=class{constructor(e=0,t=0,i=0,r=1){Gr.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,i=this.y,r=this.z,n=this.w,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r+s[12]*n,this.y=s[1]*t+s[5]*i+s[9]*r+s[13]*n,this.z=s[2]*t+s[6]*i+s[10]*r+s[14]*n,this.w=s[3]*t+s[7]*i+s[11]*r+s[15]*n,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,n,s=e.elements,a=s[0],o=s[4],l=s[8],h=s[1],u=s[5],c=s[9],p=s[2],d=s[6],f=s[10];if(Math.abs(o-h)<.01&&Math.abs(l-p)<.01&&Math.abs(c-d)<.01){if(Math.abs(o+h)<.1&&Math.abs(l+p)<.1&&Math.abs(c+d)<.1&&Math.abs(a+u+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let e=(a+1)/2,s=(u+1)/2,m=(f+1)/2,g=(o+h)/4,y=(l+p)/4,v=(c+d)/4;return e>s&&e>m?e<.01?(i=0,r=.707106781,n=.707106781):(i=Math.sqrt(e),r=g/i,n=y/i):s>m?s<.01?(i=.707106781,r=0,n=.707106781):(r=Math.sqrt(s),i=g/r,n=v/r):m<.01?(i=.707106781,r=.707106781,n=0):(n=Math.sqrt(m),i=y/n,r=v/n),this.set(i,r,n,t),this}let m=Math.sqrt((d-c)*(d-c)+(l-p)*(l-p)+(h-o)*(h-o));return Math.abs(m)<.001&&(m=1),this.x=(d-c)/m,this.y=(l-p)/m,this.z=(h-o)/m,this.w=Math.acos((a+u+f-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},Vr=class extends Bo{constructor(e=1,t=1,i={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Gr(0,0,e,t),this.scissorTest=!1,this.viewport=new Gr(0,0,e,t);let r={width:e,height:t,depth:1};this.texture=new Bi(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=void 0!==i.generateMipmaps&&i.generateMipmaps,this.texture.internalFormat=void 0!==i.internalFormat?i.internalFormat:null,this.texture.minFilter=void 0!==i.minFilter?i.minFilter:oi,this.depthBuffer=void 0===i.depthBuffer||i.depthBuffer,this.stencilBuffer=void 0!==i.stencilBuffer&&i.stencilBuffer,this.depthTexture=void 0!==i.depthTexture?i.depthTexture:null,this.samples=void 0!==i.samples?i.samples:0}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;let t=Object.assign({},e.texture.image);return this.texture.source=new Mc(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},Ay=class extends Bi{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=Di,this.minFilter=Di,this.wrapR=gn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},f4=class extends Vr{constructor(e=1,t=1,i=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new Ay(null,e,t,i),this.texture.isRenderTargetTexture=!0}},ox=class extends Bi{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=Di,this.minFilter=Di,this.wrapR=gn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},m4=class extends Vr{constructor(e=1,t=1,i=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new ox(null,e,t,i),this.texture.isRenderTargetTexture=!0}},g4=class extends Vr{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGLMultipleRenderTargets=!0;let n=this.texture;this.texture=[];for(let e=0;e=0?1:-1,r=1-t*t;if(r>Number.EPSILON){let n=Math.sqrt(r),s=Math.atan2(n,t*i);e=Math.sin(e*s)/n,a=Math.sin(a*s)/n}let n=a*i;if(o=o*e+c*n,l=l*e+p*n,h=h*e+d*n,u=u*e+f*n,e===1-a){let e=1/Math.sqrt(o*o+l*l+h*h+u*u);o*=e,l*=e,h*=e,u*=e}}e[t]=o,e[t+1]=l,e[t+2]=h,e[t+3]=u}static multiplyQuaternionsFlat(e,t,i,r,n,s){let a=i[r],o=i[r+1],l=i[r+2],h=i[r+3],u=n[s],c=n[s+1],p=n[s+2],d=n[s+3];return e[t]=a*d+h*u+o*p-l*c,e[t+1]=o*d+h*c+l*u-a*p,e[t+2]=l*d+h*p+a*c-o*u,e[t+3]=h*d-a*u-o*c-l*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){let i=e._x,r=e._y,n=e._z,s=e._order,a=Math.cos,o=Math.sin,l=a(i/2),h=a(r/2),u=a(n/2),c=o(i/2),p=o(r/2),d=o(n/2);switch(s){case"XYZ":this._x=c*h*u+l*p*d,this._y=l*p*u-c*h*d,this._z=l*h*d+c*p*u,this._w=l*h*u-c*p*d;break;case"YXZ":this._x=c*h*u+l*p*d,this._y=l*p*u-c*h*d,this._z=l*h*d-c*p*u,this._w=l*h*u+c*p*d;break;case"ZXY":this._x=c*h*u-l*p*d,this._y=l*p*u+c*h*d,this._z=l*h*d+c*p*u,this._w=l*h*u-c*p*d;break;case"ZYX":this._x=c*h*u-l*p*d,this._y=l*p*u+c*h*d,this._z=l*h*d-c*p*u,this._w=l*h*u+c*p*d;break;case"YZX":this._x=c*h*u+l*p*d,this._y=l*p*u+c*h*d,this._z=l*h*d-c*p*u,this._w=l*h*u-c*p*d;break;case"XZY":this._x=c*h*u-l*p*d,this._y=l*p*u-c*h*d,this._z=l*h*d+c*p*u,this._w=l*h*u+c*p*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,i=t[0],r=t[4],n=t[8],s=t[1],a=t[5],o=t[9],l=t[2],h=t[6],u=t[10],c=i+a+u;if(c>0){let e=.5/Math.sqrt(c+1);this._w=.25/e,this._x=(h-o)*e,this._y=(n-l)*e,this._z=(s-r)*e}else if(i>a&&i>u){let e=2*Math.sqrt(1+i-a-u);this._w=(h-o)/e,this._x=.25*e,this._y=(r+s)/e,this._z=(n+l)/e}else if(a>u){let e=2*Math.sqrt(1+a-i-u);this._w=(n-l)/e,this._x=(r+s)/e,this._y=.25*e,this._z=(o+h)/e}else{let e=2*Math.sqrt(1+u-i-a);this._w=(s-r)/e,this._x=(n+l)/e,this._y=(o+h)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Qn(this.dot(e),-1,1)))}rotateTowards(e,t){let i=this.angleTo(e);if(0===i)return this;let r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let i=e._x,r=e._y,n=e._z,s=e._w,a=t._x,o=t._y,l=t._z,h=t._w;return this._x=i*h+s*a+r*l-n*o,this._y=r*h+s*o+n*a-i*l,this._z=n*h+s*l+i*o-r*a,this._w=s*h-i*a-r*o-n*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);let i=this._x,r=this._y,n=this._z,s=this._w,a=s*e._w+i*e._x+r*e._y+n*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=i,this._y=r,this._z=n,this;let o=1-a*a;if(o<=Number.EPSILON){let e=1-t;return this._w=e*s+t*this._w,this._x=e*i+t*this._x,this._y=e*r+t*this._y,this._z=e*n+t*this._z,this.normalize(),this._onChangeCallback(),this}let l=Math.sqrt(o),h=Math.atan2(l,a),u=Math.sin((1-t)*h)/l,c=Math.sin(t*h)/l;return this._w=s*u+this._w*c,this._x=i*u+this._x*c,this._y=r*u+this._y*c,this._z=n*u+this._z*c,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){let e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),n=2*Math.PI*Math.random();return this.set(t*Math.cos(r),i*Math.sin(n),i*Math.cos(n),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},A=class{constructor(e=0,t=0,i=0){A.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return void 0===i&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(cce.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(cce.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,i=this.y,r=this.z,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6]*r,this.y=n[1]*t+n[4]*i+n[7]*r,this.z=n[2]*t+n[5]*i+n[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,i=this.y,r=this.z,n=e.elements,s=1/(n[3]*t+n[7]*i+n[11]*r+n[15]);return this.x=(n[0]*t+n[4]*i+n[8]*r+n[12])*s,this.y=(n[1]*t+n[5]*i+n[9]*r+n[13])*s,this.z=(n[2]*t+n[6]*i+n[10]*r+n[14])*s,this}applyQuaternion(e){let t=this.x,i=this.y,r=this.z,n=e.x,s=e.y,a=e.z,o=e.w,l=o*t+s*r-a*i,h=o*i+a*t-n*r,u=o*r+n*i-s*t,c=-n*t-s*i-a*r;return this.x=l*o+c*-n+h*-a-u*-s,this.y=h*o+c*-s+u*-n-l*-a,this.z=u*o+c*-a+l*-s-h*-n,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,i=this.y,r=this.z,n=e.elements;return this.x=n[0]*t+n[4]*i+n[8]*r,this.y=n[1]*t+n[5]*i+n[9]*r,this.z=n[2]*t+n[6]*i+n[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let i=e.x,r=e.y,n=e.z,s=t.x,a=t.y,o=t.z;return this.x=r*o-n*a,this.y=n*s-i*o,this.z=i*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(0===t)return this.set(0,0,0);let i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return cH.copy(this).projectOnVector(e),this.sub(cH)}reflect(e){return this.sub(cH.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(Qn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){let r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,i=Math.sqrt(1-jh(e,2));return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},cH=new A,cce=new Hr,Dt=class{constructor(e=new A(1/0,1/0,1/0),t=new A(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,i=1/0,r=1/0,n=-1/0,s=-1/0,a=-1/0;for(let o=0,l=e.length;on&&(n=l),h>s&&(s=h),u>a&&(a=u)}return this.min.set(t,i,r),this.max.set(n,s,a),this}setFromBufferAttribute(e){let t=1/0,i=1/0,r=1/0,n=-1/0,s=-1/0,a=-1/0;for(let o=0,l=e.count;on&&(n=l),h>s&&(s=h),u>a&&(a=u)}return this.min.set(t,i,r),this.max.set(n,s,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,rg),rg.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ub),HM.subVectors(this.max,Ub),ly.subVectors(e.a,Ub),cy.subVectors(e.b,Ub),uy.subVectors(e.c,Ub),Jd.subVectors(cy,ly),Qd.subVectors(uy,cy),ig.subVectors(ly,uy);let t=[0,-Jd.z,Jd.y,0,-Qd.z,Qd.y,0,-ig.z,ig.y,Jd.z,0,-Jd.x,Qd.z,0,-Qd.x,ig.z,0,-ig.x,-Jd.y,Jd.x,0,-Qd.y,Qd.x,0,-ig.y,ig.x,0];return!(!hH(t,ly,cy,uy,HM)||(t=[1,0,0,0,1,0,0,0,1],!hH(t,ly,cy,uy,HM)))&&(UM.crossVectors(Jd,Qd),t=[UM.x,UM.y,UM.z],hH(t,ly,cy,uy,HM))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return rg.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(rg).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(op[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),op[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),op[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),op[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),op[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),op[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),op[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),op[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(op)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}},op=[new A,new A,new A,new A,new A,new A,new A,new A],rg=new A,uH=new Dt,ly=new A,cy=new A,uy=new A,Jd=new A,Qd=new A,ig=new A,Ub=new A,HM=new A,UM=new A,ng=new A;function hH(e,t,i,r,n){for(let s=0,a=e.length-3;s<=a;s+=3){ng.fromArray(e,s);let a=n.x*Math.abs(ng.x)+n.y*Math.abs(ng.y)+n.z*Math.abs(ng.z),o=t.dot(ng),l=i.dot(ng),h=r.dot(ng);if(Math.max(-Math.max(o,l,h),Math.min(o,l,h))>a)return!1}return!0}var Xpt=new Dt,Bb=new A,pH=new A,Wi=class{constructor(e=new A,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let i=this.center;void 0!==t?i.copy(t):Xpt.setFromPoints(e).getCenter(i);let r=0;for(let t=0,n=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Bb.subVectors(e,this.center);let t=Bb.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),i=.5*(e-this.radius);this.center.addScaledVector(Bb,i/e),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(pH.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Bb.copy(e.center).add(pH)),this.expandByPoint(Bb.copy(e.center).sub(pH))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}},lp=new A,dH=new A,BM=new A,ef=new A,fH=new A,kM=new A,mH=new A,ko=class{constructor(e=new A,t=new A(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,lp)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(i).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=lp.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(lp.copy(this.direction).multiplyScalar(t).add(this.origin),lp.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){dH.copy(e).add(t).multiplyScalar(.5),BM.copy(t).sub(e).normalize(),ef.copy(this.origin).sub(dH);let n,s,a,o,l=.5*e.distanceTo(t),h=-this.direction.dot(BM),u=ef.dot(this.direction),c=-ef.dot(BM),p=ef.lengthSq(),d=Math.abs(1-h*h);if(d>0)if(n=h*c-u,s=h*u-c,o=l*d,n>=0)if(s>=-o)if(s<=o){let e=1/d;n*=e,s*=e,a=n*(n+h*s+2*u)+s*(h*n+s+2*c)+p}else s=l,n=Math.max(0,-(h*s+u)),a=-n*n+s*(s+2*c)+p;else s=-l,n=Math.max(0,-(h*s+u)),a=-n*n+s*(s+2*c)+p;else s<=-o?(n=Math.max(0,-(-h*l+u)),s=n>0?-l:Math.min(Math.max(-l,-c),l),a=-n*n+s*(s+2*c)+p):s<=o?(n=0,s=Math.min(Math.max(-l,-c),l),a=s*(s+2*c)+p):(n=Math.max(0,-(h*l+u)),s=n>0?l:Math.min(Math.max(-l,-c),l),a=-n*n+s*(s+2*c)+p);else s=h>0?-l:l,n=Math.max(0,-(h*s+u)),a=-n*n+s*(s+2*c)+p;return i&&i.copy(this.direction).multiplyScalar(n).add(this.origin),r&&r.copy(BM).multiplyScalar(s).add(dH),a}intersectSphere(e,t){lp.subVectors(e.center,this.origin);let i=lp.dot(this.direction),r=lp.dot(lp)-i*i,n=e.radius*e.radius;if(r>n)return null;let s=Math.sqrt(n-r),a=i-s,o=i+s;return a<0&&o<0?null:a<0?this.at(o,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;let i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){let i=this.distanceToPlane(e);return null===i?null:this.at(i,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,n,s,a,o,l=1/this.direction.x,h=1/this.direction.y,u=1/this.direction.z,c=this.origin;return l>=0?(i=(e.min.x-c.x)*l,r=(e.max.x-c.x)*l):(i=(e.max.x-c.x)*l,r=(e.min.x-c.x)*l),h>=0?(n=(e.min.y-c.y)*h,s=(e.max.y-c.y)*h):(n=(e.max.y-c.y)*h,s=(e.min.y-c.y)*h),i>s||n>r||((n>i||isNaN(i))&&(i=n),(s=0?(a=(e.min.z-c.z)*u,o=(e.max.z-c.z)*u):(a=(e.max.z-c.z)*u,o=(e.min.z-c.z)*u),i>o||a>r)||((a>i||i!=i)&&(i=a),(o=0?i:r,t)}intersectsBox(e){return null!==this.intersectBox(e,lp)}intersectTriangle(e,t,i,r,n){fH.subVectors(t,e),kM.subVectors(i,e),mH.crossVectors(fH,kM);let s,a=this.direction.dot(mH);if(a>0){if(r)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}ef.subVectors(this.origin,e);let o=s*this.direction.dot(kM.crossVectors(ef,kM));if(o<0)return null;let l=s*this.direction.dot(fH.cross(ef));if(l<0||o+l>a)return null;let h=-s*ef.dot(mH);return h<0?null:this.at(h/a,n)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}},Be=class{constructor(){Be.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m){let g=this.elements;return g[0]=e,g[4]=t,g[8]=i,g[12]=r,g[1]=n,g[5]=s,g[9]=a,g[13]=o,g[2]=l,g[6]=h,g[10]=u,g[14]=c,g[3]=p,g[7]=d,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Be).fromArray(this.elements)}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){let t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,i=e.elements,r=1/hy.setFromMatrixColumn(e,0).length(),n=1/hy.setFromMatrixColumn(e,1).length(),s=1/hy.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*n,t[5]=i[5]*n,t[6]=i[6]*n,t[7]=0,t[8]=i[8]*s,t[9]=i[9]*s,t[10]=i[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,i=e.x,r=e.y,n=e.z,s=Math.cos(i),a=Math.sin(i),o=Math.cos(r),l=Math.sin(r),h=Math.cos(n),u=Math.sin(n);if("XYZ"===e.order){let e=s*h,i=s*u,r=a*h,n=a*u;t[0]=o*h,t[4]=-o*u,t[8]=l,t[1]=i+r*l,t[5]=e-n*l,t[9]=-a*o,t[2]=n-e*l,t[6]=r+i*l,t[10]=s*o}else if("YXZ"===e.order){let e=o*h,i=o*u,r=l*h,n=l*u;t[0]=e+n*a,t[4]=r*a-i,t[8]=s*l,t[1]=s*u,t[5]=s*h,t[9]=-a,t[2]=i*a-r,t[6]=n+e*a,t[10]=s*o}else if("ZXY"===e.order){let e=o*h,i=o*u,r=l*h,n=l*u;t[0]=e-n*a,t[4]=-s*u,t[8]=r+i*a,t[1]=i+r*a,t[5]=s*h,t[9]=n-e*a,t[2]=-s*l,t[6]=a,t[10]=s*o}else if("ZYX"===e.order){let e=s*h,i=s*u,r=a*h,n=a*u;t[0]=o*h,t[4]=r*l-i,t[8]=e*l+n,t[1]=o*u,t[5]=n*l+e,t[9]=i*l-r,t[2]=-l,t[6]=a*o,t[10]=s*o}else if("YZX"===e.order){let e=s*o,i=s*l,r=a*o,n=a*l;t[0]=o*h,t[4]=n-e*u,t[8]=r*u+i,t[1]=u,t[5]=s*h,t[9]=-a*h,t[2]=-l*h,t[6]=i*u+r,t[10]=e-n*u}else if("XZY"===e.order){let e=s*o,i=s*l,r=a*o,n=a*l;t[0]=o*h,t[4]=-u,t[8]=l*h,t[1]=e*u+n,t[5]=s*h,t[9]=i*u-r,t[2]=r*u-i,t[6]=a*h,t[10]=n*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose($pt,e,Kpt)}lookAt(e,t,i){let r=this.elements;return Lo.subVectors(e,t),0===Lo.lengthSq()&&(Lo.z=1),Lo.normalize(),tf.crossVectors(i,Lo),0===tf.lengthSq()&&(1===Math.abs(i.z)?Lo.x+=1e-4:Lo.z+=1e-4,Lo.normalize(),tf.crossVectors(i,Lo)),tf.normalize(),GM.crossVectors(Lo,tf),r[0]=tf.x,r[4]=GM.x,r[8]=Lo.x,r[1]=tf.y,r[5]=GM.y,r[9]=Lo.y,r[2]=tf.z,r[6]=GM.z,r[10]=Lo.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,r=t.elements,n=this.elements,s=i[0],a=i[4],o=i[8],l=i[12],h=i[1],u=i[5],c=i[9],p=i[13],d=i[2],f=i[6],m=i[10],g=i[14],y=i[3],v=i[7],T=i[11],x=i[15],b=r[0],_=r[4],E=r[8],w=r[12],S=r[1],I=r[5],M=r[9],A=r[13],D=r[2],O=r[6],R=r[10],C=r[14],N=r[3],P=r[7],L=r[11],F=r[15];return n[0]=s*b+a*S+o*D+l*N,n[4]=s*_+a*I+o*O+l*P,n[8]=s*E+a*M+o*R+l*L,n[12]=s*w+a*A+o*C+l*F,n[1]=h*b+u*S+c*D+p*N,n[5]=h*_+u*I+c*O+p*P,n[9]=h*E+u*M+c*R+p*L,n[13]=h*w+u*A+c*C+p*F,n[2]=d*b+f*S+m*D+g*N,n[6]=d*_+f*I+m*O+g*P,n[10]=d*E+f*M+m*R+g*L,n[14]=d*w+f*A+m*C+g*F,n[3]=y*b+v*S+T*D+x*N,n[7]=y*_+v*I+T*O+x*P,n[11]=y*E+v*M+T*R+x*L,n[15]=y*w+v*A+T*C+x*F,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[4],r=e[8],n=e[12],s=e[1],a=e[5],o=e[9],l=e[13],h=e[2],u=e[6],c=e[10],p=e[14];return e[3]*(+n*o*u-r*l*u-n*a*c+i*l*c+r*a*p-i*o*p)+e[7]*(+t*o*p-t*l*c+n*s*c-r*s*p+r*l*h-n*o*h)+e[11]*(+t*l*u-t*a*p-n*s*u+i*s*p+n*a*h-i*l*h)+e[15]*(-r*a*h-t*o*u+t*a*c+r*s*u-i*s*c+i*o*h)}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(e,t,i){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){let e=this.elements,t=e[0],i=e[1],r=e[2],n=e[3],s=e[4],a=e[5],o=e[6],l=e[7],h=e[8],u=e[9],c=e[10],p=e[11],d=e[12],f=e[13],m=e[14],g=e[15],y=u*m*l-f*c*l+f*o*p-a*m*p-u*o*g+a*c*g,v=d*c*l-h*m*l-d*o*p+s*m*p+h*o*g-s*c*g,T=h*f*l-d*u*l+d*a*p-s*f*p-h*a*g+s*u*g,x=d*u*o-h*f*o-d*a*c+s*f*c+h*a*m-s*u*m,b=t*y+i*v+r*T+n*x;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let _=1/b;return e[0]=y*_,e[1]=(f*c*n-u*m*n-f*r*p+i*m*p+u*r*g-i*c*g)*_,e[2]=(a*m*n-f*o*n+f*r*l-i*m*l-a*r*g+i*o*g)*_,e[3]=(u*o*n-a*c*n-u*r*l+i*c*l+a*r*p-i*o*p)*_,e[4]=v*_,e[5]=(h*m*n-d*c*n+d*r*p-t*m*p-h*r*g+t*c*g)*_,e[6]=(d*o*n-s*m*n-d*r*l+t*m*l+s*r*g-t*o*g)*_,e[7]=(s*c*n-h*o*n+h*r*l-t*c*l-s*r*p+t*o*p)*_,e[8]=T*_,e[9]=(d*u*n-h*f*n-d*i*p+t*f*p+h*i*g-t*u*g)*_,e[10]=(s*f*n-d*a*n+d*i*l-t*f*l-s*i*g+t*a*g)*_,e[11]=(h*a*n-s*u*n-h*i*l+t*u*l+s*i*p-t*a*p)*_,e[12]=x*_,e[13]=(h*f*r-d*u*r+d*i*c-t*f*c-h*i*m+t*u*m)*_,e[14]=(d*a*r-s*f*r-d*i*o+t*f*o+s*i*m-t*a*m)*_,e[15]=(s*u*r-h*a*r+h*i*o-t*u*o-s*i*c+t*a*c)*_,this}scale(e){let t=this.elements,i=e.x,r=e.y,n=e.z;return t[0]*=i,t[4]*=r,t[8]*=n,t[1]*=i,t[5]*=r,t[9]*=n,t[2]*=i,t[6]*=r,t[10]*=n,t[3]*=i,t[7]*=r,t[11]*=n,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let i=Math.cos(t),r=Math.sin(t),n=1-i,s=e.x,a=e.y,o=e.z,l=n*s,h=n*a;return this.set(l*s+i,l*a-r*o,l*o+r*a,0,l*a+r*o,h*a+i,h*o-r*s,0,l*o-r*a,h*o+r*s,n*o*o+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,n,s){return this.set(1,i,n,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){let r=this.elements,n=t._x,s=t._y,a=t._z,o=t._w,l=n+n,h=s+s,u=a+a,c=n*l,p=n*h,d=n*u,f=s*h,m=s*u,g=a*u,y=o*l,v=o*h,T=o*u,x=i.x,b=i.y,_=i.z;return r[0]=(1-(f+g))*x,r[1]=(p+T)*x,r[2]=(d-v)*x,r[3]=0,r[4]=(p-T)*b,r[5]=(1-(c+g))*b,r[6]=(m+y)*b,r[7]=0,r[8]=(d+v)*_,r[9]=(m-y)*_,r[10]=(1-(c+f))*_,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){let r=this.elements,n=hy.set(r[0],r[1],r[2]).length(),s=hy.set(r[4],r[5],r[6]).length(),a=hy.set(r[8],r[9],r[10]).length();this.determinant()<0&&(n=-n),e.x=r[12],e.y=r[13],e.z=r[14],_c.copy(this);let o=1/n,l=1/s,h=1/a;return _c.elements[0]*=o,_c.elements[1]*=o,_c.elements[2]*=o,_c.elements[4]*=l,_c.elements[5]*=l,_c.elements[6]*=l,_c.elements[8]*=h,_c.elements[9]*=h,_c.elements[10]*=h,t.setFromRotationMatrix(_c),i.x=n,i.y=s,i.z=a,this}makePerspective(e,t,i,r,n,s){let a=this.elements,o=2*n/(t-e),l=2*n/(i-r),h=(t+e)/(t-e),u=(i+r)/(i-r),c=-(s+n)/(s-n),p=-2*s*n/(s-n);return a[0]=o,a[4]=0,a[8]=h,a[12]=0,a[1]=0,a[5]=l,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=c,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,i,r,n,s){let a=this.elements,o=1/(t-e),l=1/(i-r),h=1/(s-n),u=(t+e)*o,c=(i+r)*l,p=(s+n)*h;return a[0]=2*o,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-c,a[2]=0,a[6]=0,a[10]=-2*h,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){let t=this.elements,i=e.elements;for(let e=0;e<16;e++)if(t[e]!==i[e])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}},hy=new A,_c=new Be,$pt=new A(0,0,0),Kpt=new A(1,1,1),tf=new A,GM=new A,Lo=new A,uce=new Be,hce=new Hr,xr=class{constructor(e=0,t=0,i=0,r=xr.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){let r=e.elements,n=r[0],s=r[4],a=r[8],o=r[1],l=r[5],h=r[9],u=r[2],c=r[6],p=r[10];switch(t){case"XYZ":this._y=Math.asin(Qn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,p),this._z=Math.atan2(-s,n)):(this._x=Math.atan2(c,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Qn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,p),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-u,n),this._z=0);break;case"ZXY":this._x=Math.asin(Qn(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(-u,p),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(o,n));break;case"ZYX":this._y=Math.asin(-Qn(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(c,p),this._z=Math.atan2(o,n)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(Qn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-u,n)):(this._x=0,this._y=Math.atan2(a,p));break;case"XZY":this._z=Math.asin(-Qn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(c,l),this._y=Math.atan2(a,n)):(this._x=Math.atan2(-h,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===i&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return uce.makeRotationFromQuaternion(e),this.setFromRotationMatrix(uce,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return hce.setFromEuler(this),this.setFromQuaternion(hce,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};xr.DEFAULT_ORDER="XYZ";var Oy=class{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(i=i.concat(n))}return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(kb,e,Jpt),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(kb,Qpt,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);let t=this.children;for(let i=0,r=t.length;i0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=n(e.geometries,this.geometry);let t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){let i=t.shapes;if(Array.isArray(i))for(let t=0,r=i.length;t0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(i.geometries=t),r.length>0&&(i.materials=r),n.length>0&&(i.textures=n),a.length>0&&(i.images=a),o.length>0&&(i.shapes=o),l.length>0&&(i.skeletons=l),h.length>0&&(i.animations=h),u.length>0&&(i.nodes=u)}return i.object=r,i;function s(e){let t=[];for(let i in e){let r=e[i];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t0?r.multiplyScalar(1/Math.sqrt(n)):r.set(0,0,0)}static getBarycoord(e,t,i,r,n){Sc.subVectors(r,t),up.subVectors(i,t),gH.subVectors(e,t);let s=Sc.dot(Sc),a=Sc.dot(up),o=Sc.dot(gH),l=up.dot(up),h=up.dot(gH),u=s*l-a*a;if(0===u)return n.set(-2,-1,-1);let c=1/u,p=(l*o-a*h)*c,d=(s*h-a*o)*c;return n.set(1-p-d,d,p)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,hp),hp.x>=0&&hp.y>=0&&hp.x+hp.y<=1}static getUV(e,t,i,r,n,s,a,o){return this.getBarycoord(e,t,i,r,hp),o.set(0,0),o.addScaledVector(n,hp.x),o.addScaledVector(s,hp.y),o.addScaledVector(a,hp.z),o}static isFrontFacing(e,t,i,r){return Sc.subVectors(i,t),up.subVectors(e,t),Sc.cross(up).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Sc.subVectors(this.c,this.b),up.subVectors(this.a,this.b),.5*Sc.cross(up).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return hn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return hn.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,r,n){return hn.getUV(e,this.a,this.b,this.c,t,i,r,n)}containsPoint(e){return hn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return hn.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let i,r,n=this.a,s=this.b,a=this.c;dy.subVectors(s,n),fy.subVectors(a,n),vH.subVectors(e,n);let o=dy.dot(vH),l=fy.dot(vH);if(o<=0&&l<=0)return t.copy(n);yH.subVectors(e,s);let h=dy.dot(yH),u=fy.dot(yH);if(h>=0&&u<=h)return t.copy(s);let c=o*u-h*l;if(c<=0&&o>=0&&h<=0)return i=o/(o-h),t.copy(n).addScaledVector(dy,i);TH.subVectors(e,a);let p=dy.dot(TH),d=fy.dot(TH);if(d>=0&&p<=d)return t.copy(a);let f=p*l-o*d;if(f<=0&&l>=0&&d<=0)return r=l/(l-d),t.copy(n).addScaledVector(fy,r);let m=h*d-p*u;if(m<=0&&u-h>=0&&p-d>=0)return vce.subVectors(a,s),r=(u-h)/(u-h+(p-d)),t.copy(s).addScaledVector(vce,r);let g=1/(m+f+c);return i=f*g,r=c*g,t.copy(n).addScaledVector(dy,i).addScaledVector(fy,r)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},tdt=0,zr=class extends Bo{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:tdt++}),this.uuid=Ho(),this.name="",this.type="Material",this.blending=mg,this.side=tn,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=Mx,this.blendDst=FU,this.blendEquation=Sa,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=MD,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=mhe,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=wD,this.stencilZFail=wD,this.stencilZPass=wD,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(let t in e){let i=e[t];if(void 0===i){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}let r=this[t];void 0!==r?r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){let t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});let i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){let t=[];for(let i in e){let r=e[i];delete r.metadata,t.push(r)}return t}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(i.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(i.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==mg&&(i.blending=this.blending),this.side!==tn&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(i.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=this.premultipliedAlpha),!0===this.forceSinglePass&&(i.forceSinglePass=this.forceSinglePass),!0===this.wireframe&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=this.flatShading),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),!1===this.fog&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData),t){let t=r(e.textures),n=r(e.images);t.length>0&&(i.textures=t),n.length>0&&(i.images=n)}return i}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,i=null;if(null!==t){let e=t.length;i=new Array(e);for(let r=0;r!==e;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}},or=class extends zr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new je(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Dx,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},hs=new A,zM=new le,Wt=class{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=i,this.usage=ix,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,n=this.itemSize;r0&&(e.userData=this.userData),void 0!==this.parameters){let t=this.parameters;for(let i in t)void 0!==t[i]&&(e[i]=t[i]);return e}e.data={attributes:{}};let t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let i=this.attributes;for(let t in i){let r=i[t];e.data.attributes[t]=r.toJSON(e.data)}let r={},n=!1;for(let t in this.morphAttributes){let i=this.morphAttributes[t],s=[];for(let t=0,r=i.length;t0&&(r[t]=s,n=!0)}n&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));let a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let i=e.index;null!==i&&this.setIndex(i.clone(t));let r=e.attributes;for(let e in r){let i=r[e];this.setAttribute(e,i.clone(t))}let n=e.morphAttributes;for(let e in n){let i=[],r=n[e];for(let e=0,n=r.length;e0){let i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;ei.far?null:{distance:h,point:XM.clone(),object:e}}function $M(e,t,i,r,n,s,a,o,l){e.getVertexPosition(a,Vb),e.getVertexPosition(o,zb),e.getVertexPosition(l,jb);let h=idt(e,t,i,r,Vb,zb,jb,IH);if(h){n&&(WM.fromBufferAttribute(n,a),qM.fromBufferAttribute(n,o),YM.fromBufferAttribute(n,l),h.uv=hn.getUV(IH,Vb,zb,jb,WM,qM,YM,new le)),s&&(WM.fromBufferAttribute(s,a),qM.fromBufferAttribute(s,o),YM.fromBufferAttribute(s,l),h.uv2=hn.getUV(IH,Vb,zb,jb,WM,qM,YM,new le));let e={a:a,b:o,c:l,normal:new A,materialIndex:0};hn.getNormal(Vb,zb,jb,e.normal),h.face=e}return h}var eo=class extends lt{constructor(e=1,t=1,i=1,r=1,n=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:n,depthSegments:s};let a=this;r=Math.floor(r),n=Math.floor(n),s=Math.floor(s);let o=[],l=[],h=[],u=[],c=0,p=0;function d(e,t,i,r,n,s,d,f,m,g,y){let v=s/m,T=d/g,x=s/2,b=d/2,_=f/2,E=m+1,w=g+1,S=0,I=0,M=new A;for(let s=0;s0?1:-1,h.push(M.x,M.y,M.z),u.push(o/m),u.push(1-s/g),S+=1}}for(let e=0;e0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;let i={};for(let e in this.extensions)!0===this.extensions[e]&&(i[e]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}},bp=class extends cr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Be,this.projectionMatrix=new Be,this.projectionMatrixInverse=new Be}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}},Xr=class extends bp{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=2*nx*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(.5*gg*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*nx*Math.atan(Math.tan(.5*gg*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,r,n,s){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=n,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(.5*gg*this.fov)/this.zoom,i=2*t,r=this.aspect*i,n=-.5*r,s=this.view;if(null!==this.view&&this.view.enabled){let e=s.fullWidth,a=s.fullHeight;n+=s.offsetX*r/e,t-=s.offsetY*i/a,r*=s.width/e,i*=s.height/a}let a=this.filmOffset;0!==a&&(n+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(n,n+r,t,t-i,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}},vy=-90,yy=1,AD=class extends cr{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i;let r=new Xr(vy,yy,e,t);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(1,0,0),this.add(r);let n=new Xr(vy,yy,e,t);n.layers=this.layers,n.up.set(0,1,0),n.lookAt(-1,0,0),this.add(n);let s=new Xr(vy,yy,e,t);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(0,1,0),this.add(s);let a=new Xr(vy,yy,e,t);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);let o=new Xr(vy,yy,e,t);o.layers=this.layers,o.up.set(0,1,0),o.lookAt(0,0,1),this.add(o);let l=new Xr(vy,yy,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,-1),this.add(l)}update(e,t){null===this.parent&&this.updateMatrixWorld();let i=this.renderTarget,[r,n,s,a,o,l]=this.children,h=e.getRenderTarget(),u=e.toneMapping,c=e.xr.enabled;e.toneMapping=Lu,e.xr.enabled=!1;let p=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0),e.render(t,r),e.setRenderTarget(i,1),e.render(t,n),e.setRenderTarget(i,2),e.render(t,s),e.setRenderTarget(i,3),e.render(t,a),e.setRenderTarget(i,4),e.render(t,o),i.texture.generateMipmaps=p,e.setRenderTarget(i,5),e.render(t,l),e.setRenderTarget(h),e.toneMapping=u,e.xr.enabled=c,i.texture.needsPMREMUpdate=!0}},Eg=class extends Bi{constructor(e,t,i,r,n,s,a,o,l,h){super(e=void 0!==e?e:[],t=void 0!==t?t:af,i,r,n,s,a,o,l,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}},OD=class extends Vr{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];this.texture=new Eg(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:oi}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let i={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new eo(5,5,5),n=new Yt({name:"CubemapFromEquirect",uniforms:Py(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:zn,blending:Ui});n.uniforms.tEquirect.value=t;let s=new rt(r,n),a=t.minFilter;return t.minFilter===Ra&&(t.minFilter=oi),new AD(1,10,this).update(e,s),t.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(e,t,i,r){let n=e.getRenderTarget();for(let n=0;n<6;n++)e.setRenderTarget(this,n),e.clear(t,i,r);e.setRenderTarget(n)}},_H=new A,odt=new A,ldt=new Pi,bi=class{constructor(e=new A(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,r){return this.normal.set(e,t,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){let r=_H.subVectors(i,t).cross(odt.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){let i=e.delta(_H),r=this.normal.dot(i);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;let n=-(e.start.dot(this.normal)+this.constant)/r;return n<0||n>1?null:t.copy(i).multiplyScalar(n).add(e.start)}intersectsLine(e){let t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let i=t||ldt.getNormalMatrix(e),r=this.coplanarPoint(_H).applyMatrix4(e),n=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(n),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}},Ty=new Wi,KM=new A,Xs=class{constructor(e=new bi,t=new bi,i=new bi,r=new bi,n=new bi,s=new bi){this.planes=[e,t,i,r,n,s]}set(e,t,i,r,n,s){let a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(n),a[5].copy(s),this}copy(e){let t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e){let t=this.planes,i=e.elements,r=i[0],n=i[1],s=i[2],a=i[3],o=i[4],l=i[5],h=i[6],u=i[7],c=i[8],p=i[9],d=i[10],f=i[11],m=i[12],g=i[13],y=i[14],v=i[15];return t[0].setComponents(a-r,u-o,f-c,v-m).normalize(),t[1].setComponents(a+r,u+o,f+c,v+m).normalize(),t[2].setComponents(a+n,u+l,f+p,v+g).normalize(),t[3].setComponents(a-n,u-l,f-p,v-g).normalize(),t[4].setComponents(a-s,u-h,f-d,v-y).normalize(),t[5].setComponents(a+s,u+h,f+d,v+y).normalize(),this}intersectsObject(e){let t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Ty.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Ty)}intersectsSprite(e){return Ty.center.set(0,0,0),Ty.radius=.7071067811865476,Ty.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ty)}intersectsSphere(e){let t=this.planes,i=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(i)0?e.max.x:e.min.x,KM.y=r.normal.y>0?e.max.y:e.min.y,KM.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(KM)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}};function Ehe(){let e=null,t=!1,i=null,r=null;function n(t,s){i(t,s),r=e.requestAnimationFrame(n)}return{start:function(){!0!==t&&null!==i&&(r=e.requestAnimationFrame(n),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){i=e},setContext:function(t){e=t}}}function cdt(e,t){let i=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);let i=r.get(t);i&&(e.deleteBuffer(i.buffer),r.delete(t))},update:function(t,n){if(t.isGLBufferAttribute){let e=r.get(t);return void((!e||e.version0?i:t).get(m));let g=e.xr,y=g.getSession&&g.getSession();y&&"additive"===y.environmentBlendMode&&(m=null),null===m?f(h,u):m&&m.isColor&&(f(m,1),a=!0),(e.autoClear||a)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),m&&(m.isCubeTexture||m.mapping===zy)?(void 0===l&&(l=new rt(new eo(1,1,1),new Yt({name:"BackgroundCubeMaterial",uniforms:Py(Rc.backgroundCube.uniforms),vertexShader:Rc.backgroundCube.vertexShader,fragmentShader:Rc.backgroundCube.fragmentShader,side:zn,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,i){this.matrixWorld.copyPosition(i.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(l)),l.material.uniforms.envMap.value=m,l.material.uniforms.flipEnvMap.value=m.isCubeTexture&&!1===m.isRenderTargetTexture?-1:1,l.material.uniforms.backgroundBlurriness.value=s.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=s.backgroundIntensity,l.material.toneMapped=m.encoding!==gr,(c!==m||p!==m.version||d!==e.toneMapping)&&(l.material.needsUpdate=!0,c=m,p=m.version,d=e.toneMapping),l.layers.enableAll(),r.unshift(l,l.geometry,l.material,0,0,null)):m&&m.isTexture&&(void 0===o&&(o=new rt(new ts(2,2),new Yt({name:"BackgroundMaterial",uniforms:Py(Rc.background.uniforms),vertexShader:Rc.background.vertexShader,fragmentShader:Rc.background.fragmentShader,side:tn,depthTest:!1,depthWrite:!1,fog:!1})),o.geometry.deleteAttribute("normal"),Object.defineProperty(o.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(o)),o.material.uniforms.t2D.value=m,o.material.uniforms.backgroundIntensity.value=s.backgroundIntensity,o.material.toneMapped=m.encoding!==gr,!0===m.matrixAutoUpdate&&m.updateMatrix(),o.material.uniforms.uvTransform.value.copy(m.matrix),(c!==m||p!==m.version||d!==e.toneMapping)&&(o.material.needsUpdate=!0,c=m,p=m.version,d=e.toneMapping),o.layers.enableAll(),r.unshift(o,o.geometry,o.material,0,0,null))}}}function zmt(e,t,i,r){let n=e.getParameter(34921),s=r.isWebGL2?null:t.get("OES_vertex_array_object"),a=r.isWebGL2||null!==s,o={},l=d(null),h=l,u=!1;function c(t){return r.isWebGL2?e.bindVertexArray(t):s.bindVertexArrayOES(t)}function p(t){return r.isWebGL2?e.deleteVertexArray(t):s.deleteVertexArrayOES(t)}function d(e){let t=[],i=[],r=[];for(let e=0;e=0){let i=n[t],r=s[t];if(void 0===r&&("instanceMatrix"===t&&e.instanceMatrix&&(r=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(r=e.instanceColor)),void 0===i||i.attribute!==r||r&&i.data!==r.data)return!0;a++}return h.attributesNum!==a||h.index!==r}(n,T,p,x),b&&function(e,t,i,r){let n={},s=t.attributes,a=0,o=i.getAttributes();for(let t in o)if(o[t].location>=0){let i=s[t];void 0===i&&("instanceMatrix"===t&&e.instanceMatrix&&(i=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(i=e.instanceColor));let r={};r.attribute=i,i&&i.data&&(r.data=i.data),n[t]=r,a++}h.attributes=n,h.attributesNum=a,h.index=r}(n,T,p,x)}else{let e=!0===l.wireframe;(h.geometry!==T.id||h.program!==p.id||h.wireframe!==e)&&(h.geometry=T.id,h.program=p.id,h.wireframe=e,b=!0)}null!==x&&i.update(x,34963),(b||u)&&(u=!1,function(n,s,a,o){if(!1===r.isWebGL2&&(n.isInstancedMesh||o.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();let l=o.attributes,h=a.getAttributes(),u=s.defaultAttributeValues;for(let t in h){let r=h[t];if(r.location>=0){let s=l[t];if(void 0===s&&("instanceMatrix"===t&&n.instanceMatrix&&(s=n.instanceMatrix),"instanceColor"===t&&n.instanceColor&&(s=n.instanceColor)),void 0!==s){let t=s.normalized,a=s.itemSize,l=i.get(s);if(void 0===l)continue;let h=l.buffer,u=l.type,c=l.bytesPerElement;if(s.isInterleavedBufferAttribute){let i=s.data,l=i.stride,p=s.offset;if(i.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let s="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext,a=void 0!==i.precision?i.precision:"highp",o=n(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);let l=s||t.has("WEBGL_draw_buffers"),h=!0===i.logarithmicDepthBuffer,u=e.getParameter(34930),c=e.getParameter(35660),p=e.getParameter(3379),d=e.getParameter(34076),f=e.getParameter(34921),m=e.getParameter(36347),g=e.getParameter(36348),y=e.getParameter(36349),v=c>0,T=s||t.has("OES_texture_float");return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){let i=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:n,precision:a,logarithmicDepthBuffer:h,maxTextures:u,maxVertexTextures:c,maxTextureSize:p,maxCubemapSize:d,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:y,vertexTextures:v,floatFragmentTextures:T,floatVertexTextures:v&&T,maxSamples:s?e.getParameter(36183):0}}function qmt(e){let t=this,i=null,r=0,n=!1,s=!1,a=new bi,o=new Pi,l={value:null,needsUpdate:!1};function h(e,i,r,n){let s=null!==e?e.length:0,h=null;if(0!==s){if(h=l.value,!0!==n||null===h){let t=r+4*s,n=i.matrixWorldInverse;o.getNormalMatrix(n),(null===h||h.length0),t.numPlanes=r,t.numIntersection=0);else{let e=s?0:r,t=4*e,n=f.clippingState||null;l.value=n,n=h(c,o,t,u);for(let e=0;e!==t;++e)n[e]=i[e];f.clippingState=n,this.numIntersection=p?this.numPlanes:0,this.numPlanes+=e}}}function Ymt(e){let t=new WeakMap;function i(e,t){return t===yg?e.mapping=af:t===tx&&(e.mapping=of),e}function r(e){let i=e.target;i.removeEventListener("dispose",r);let n=t.get(i);void 0!==n&&(t.delete(i),n.dispose())}return{get:function(n){if(n&&n.isTexture&&!1===n.isRenderTargetTexture){let s=n.mapping;if(s===yg||s===tx){if(t.has(n)){return i(t.get(n).texture,n.mapping)}{let s=n.image;if(s&&s.height>0){let a=new OD(s.height/2);return a.fromEquirectangularTexture(e,n),t.set(n,a),n.addEventListener("dispose",r),i(a.texture,n.mapping)}return null}}}return n},dispose:function(){t=new WeakMap}}}var Ji=class extends bp{constructor(e=-1,t=1,i=1,r=-1,n=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=n,this.far=s,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=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,n,s){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=n,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2,n=i-e,s=i+e,a=r+t,o=r-t;if(null!==this.view&&this.view.enabled){let e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;n+=e*this.view.offsetX,s=n+e*this.view.width,a-=t*this.view.offsetY,o=a-t*this.view.height}this.projectionMatrix.makeOrthographic(n,s,a,o,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let 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,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}},Ry=4,Tce=[.125,.215,.35,.446,.526,.582],hg=20,SH=new Ji,Ece=new je,wH=null,ug=(1+Math.sqrt(5))/2,Ey=1/ug,bce=[new A(1,1,1),new A(-1,1,1),new A(1,1,-1),new A(-1,1,-1),new A(0,ug,Ey),new A(0,ug,-Ey),new A(Ey,0,ug),new A(-Ey,0,ug),new A(ug,Ey,0),new A(-ug,Ey,0)],xp=class{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,i=.1,r=100){wH=this._renderer.getRenderTarget(),this._setSize(256);let n=this._allocateTargets();return n.depthBuffer=!0,this._sceneToCubeUV(e,i,r,n),t>0&&this._blur(n,0,0,t),this._applyPMREM(n),this._cleanup(n),n}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=_ce(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=Ice(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e2?l:0,l,l),o.setRenderTarget(r),p&&o.render(c,n),o.render(e,n)}c.geometry.dispose(),c.material.dispose(),o.toneMapping=h,o.autoClear=l,e.background=d}_textureToCubeUV(e,t){let i=this._renderer,r=e.mapping===af||e.mapping===of;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=_ce()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=Ice());let n=r?this._cubemapMaterial:this._equirectMaterial,s=new rt(this._lodPlanes[0],n);n.uniforms.envMap.value=e;let a=this._cubeSize;JM(t,0,0,3*a,2*a),i.setRenderTarget(t),i.render(s,SH)}_applyPMREM(e){let t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let t=1;thg&&console.warn(`sigmaRadians, ${n}, is too large and will clip, as it requested ${f} samples when the maximum is set to ${hg}`);let m=[],g=0;for(let e=0;ey-Ry?r-y+Ry:0),4*(this._cubeSize-v),3*v,2*v),o.setRenderTarget(t),o.render(h,SH)}};function Xmt(e){let t=[],i=[],r=[],n=e,s=e-Ry+1+Tce.length;for(let a=0;ae-Ry?o=Tce[a-e+Ry-1]:0===a&&(o=0),r.push(o);let l=1/(s-2),h=-l,u=1+l,c=[h,h,u,h,u,u,h,h,u,u,h,u],p=6,d=6,f=3,m=2,g=1,y=new Float32Array(f*d*p),v=new Float32Array(m*d*p),T=new Float32Array(g*d*p);for(let e=0;e2?0:-1,r=[t,i,0,t+2/3,i,0,t+2/3,i+1,0,t,i,0,t+2/3,i+1,0,t,i+1,0];y.set(r,f*d*e),v.set(c,m*d*e);let n=[e,e,e,e,e,e];T.set(n,g*d*e)}let x=new lt;x.setAttribute("position",new Wt(y,f)),x.setAttribute("uv",new Wt(v,m)),x.setAttribute("faceIndex",new Wt(T,g)),t.push(x),n>Ry&&n--}return{lodPlanes:t,sizeLods:i,sigmas:r}}function xce(e,t,i){let r=new Vr(e,t,i);return r.texture.mapping=zy,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function JM(e,t,i,r,n){e.viewport.set(t,i,r,n),e.scissor.set(t,i,r,n)}function $mt(e,t,i){let r=new Float32Array(hg),n=new A(0,1,0);return new Yt({name:"SphericalGaussianBlur",defines:{n:hg,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/i,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n}},vertexShader:kU(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:Ui,depthTest:!1,depthWrite:!1})}function Ice(){return new Yt({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:kU(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:Ui,depthTest:!1,depthWrite:!1})}function _ce(){return new Yt({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:kU(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:Ui,depthTest:!1,depthWrite:!1})}function kU(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function Kmt(e){let t=new WeakMap,i=null;function r(e){let i=e.target;i.removeEventListener("dispose",r);let n=t.get(i);void 0!==n&&(t.delete(i),n.dispose())}return{get:function(n){if(n&&n.isTexture){let s=n.mapping,a=s===yg||s===tx,o=s===af||s===of;if(a||o){if(n.isRenderTargetTexture&&!0===n.needsPMREMUpdate){n.needsPMREMUpdate=!1;let r=t.get(n);return null===i&&(i=new xp(e)),r=a?i.fromEquirectangular(n,r):i.fromCubemap(n,r),t.set(n,r),r.texture}if(t.has(n))return t.get(n).texture;{let s=n.image;if(a&&s&&s.height>0||o&&s&&function(e){let t=0,i=6;for(let r=0;rt.maxTextureSize&&(m=Math.ceil(f/t.maxTextureSize),f=t.maxTextureSize);let g=new Float32Array(f*m*4*n),y=new Ay(g,f,m,n);y.type=wa,y.needsUpdate=!0;let v=4*d;for(let e=0;e0)return e;let n=t*i,s=Sce[n];if(void 0===s&&(s=new Float32Array(n),Sce[n]=s),0!==t){r.toArray(s,0);for(let r=1,n=0;r!==t;++r)n+=i,e[r].toArray(s,n)}return s}function ys(e,t){if(e.length!==t.length)return!1;for(let i=0,r=e.length;i":" "} ${n}: ${i[e]}`)}return r.join("\n")}function Xgt(e){switch(e){case _l:return["Linear","( value )"];case gr:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function Oce(e,t,i){let r=e.getShaderParameter(t,35713),n=e.getShaderInfoLog(t).trim();if(r&&""===n)return"";let s=/ERROR: 0:(\d+)/.exec(n);if(s){let r=parseInt(s[1]);return i.toUpperCase()+"\n\n"+n+"\n\n"+Ygt(e.getShaderSource(t),r)}return n}function $gt(e,t){let i=Xgt(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+i[0]+i[1]+"; }"}function Kgt(e,t){let i;switch(t){case que:i="Linear";break;case Yue:i="Reinhard";break;case Xue:i="OptimizedCineon";break;case $ue:i="ACESFilmic";break;case Kue:i="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),i="Linear"}return"vec3 "+e+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function Zgt(e){return[e.extensionDerivatives||e.envMapCubeUVHeight||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Kb).join("\n")}function Jgt(e){let t=[];for(let i in e){let r=e[i];!1!==r&&t.push("#define "+i+" "+r)}return t.join("\n")}function Qgt(e,t){let i={},r=e.getProgramParameter(t,35721);for(let n=0;n/gm;function R4(e){return e.replace(e0t,t0t)}function t0t(e,t){let i=Yr[t];if(void 0===i)throw new Error("Can not resolve #include <"+t+">");return R4(i)}var r0t=/#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 Lce(e){return e.replace(r0t,i0t)}function i0t(e,t,i,r){let n="";for(let e=parseInt(t);e0&&(n+="\n"),s=[m,g].filter(Kb).join("\n"),s.length>0&&(s+="\n")):(n=[Fce(i),"#define SHADER_NAME "+i.shaderName,g,i.instancing?"#define USE_INSTANCING":"",i.instancingColor?"#define USE_INSTANCING_COLOR":"",i.supportsVertexTextures?"#define VERTEX_TEXTURES":"",i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+p:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMap&&i.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",i.normalMap&&i.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.displacementMap&&i.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",i.specularColorMap?"#define USE_SPECULARCOLORMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.sheenColorMap?"#define USE_SHEENCOLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",i.vertexTangents?"#define USE_TANGENT":"",i.vertexColors?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUvs?"#define USE_UV":"",i.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",i.flatShading?"#define FLAT_SHADED":"",i.skinning?"#define USE_SKINNING":"",i.morphTargets?"#define USE_MORPHTARGETS":"",i.morphNormals&&!1===i.flatShading?"#define USE_MORPHNORMALS":"",i.morphColors&&i.isWebGL2?"#define USE_MORPHCOLORS":"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+i.morphTextureStride:"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_COUNT "+i.morphTargetsCount:"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+u:"",i.sizeAttenuation?"#define USE_SIZEATTENUATION":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.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","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Kb).join("\n"),s=[m,Fce(i),"#define SHADER_NAME "+i.shaderName,g,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.matcap?"#define USE_MATCAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+c:"",i.envMap?"#define "+p:"",i.envMap?"#define "+d:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMap&&i.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",i.normalMap&&i.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",i.clearcoat?"#define USE_CLEARCOAT":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescence?"#define USE_IRIDESCENCE":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",i.specularColorMap?"#define USE_SPECULARCOLORMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaTest?"#define USE_ALPHATEST":"",i.sheen?"#define USE_SHEEN":"",i.sheenColorMap?"#define USE_SHEENCOLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",i.vertexTangents?"#define USE_TANGENT":"",i.vertexColors||i.instancingColor?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUvs?"#define USE_UV":"",i.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",i.gradientMap?"#define USE_GRADIENTMAP":"",i.flatShading?"#define FLAT_SHADED":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+u:"",i.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",i.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",i.toneMapping!==Lu?"#define TONE_MAPPING":"",i.toneMapping!==Lu?Yr.tonemapping_pars_fragment:"",i.toneMapping!==Lu?Kgt("toneMapping",i.toneMapping):"",i.dithering?"#define DITHERING":"",i.opaque?"#define OPAQUE":"",Yr.encodings_pars_fragment,$gt("linearToOutputTexel",i.outputEncoding),i.useDepthPacking?"#define DEPTH_PACKING "+i.depthPacking:"","\n"].filter(Kb).join("\n")),l=R4(l),l=Pce(l,i),l=Nce(l,i),h=R4(h),h=Pce(h,i),h=Nce(h,i),l=Lce(l),h=Lce(h),i.isWebGL2&&!0!==i.isRawShaderMaterial&&(v="#version 300 es\n",n=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+n,s=["#define varying in",i.glslVersion===p4?"":"layout(location = 0) out highp vec4 pc_fragColor;",i.glslVersion===p4?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+s);let T,x,b=v+s+h,_=Ace(a,35633,v+n+l),E=Ace(a,35632,b);if(a.attachShader(y,_),a.attachShader(y,E),void 0!==i.index0AttributeName?a.bindAttribLocation(y,0,i.index0AttributeName):!0===i.morphTargets&&a.bindAttribLocation(y,0,"position"),a.linkProgram(y),e.debug.checkShaderErrors){let e=a.getProgramInfoLog(y).trim(),t=a.getShaderInfoLog(_).trim(),i=a.getShaderInfoLog(E).trim(),r=!0,o=!0;if(!1===a.getProgramParameter(y,35714)){r=!1;let t=Oce(a,_,"vertex"),i=Oce(a,E,"fragment");console.error("THREE.WebGLProgram: Shader Error "+a.getError()+" - VALIDATE_STATUS "+a.getProgramParameter(y,35715)+"\n\nProgram Info Log: "+e+"\n"+t+"\n"+i)}else""!==e?console.warn("THREE.WebGLProgram: Program Info Log:",e):(""===t||""===i)&&(o=!1);o&&(this.diagnostics={runnable:r,programLog:e,vertexShader:{log:t,prefix:n},fragmentShader:{log:i,prefix:s}})}return a.deleteShader(_),a.deleteShader(E),this.getUniforms=function(){return void 0===T&&(T=new Dy(a,y)),T},this.getAttributes=function(){return void 0===x&&(x=Qgt(a,y)),x},this.destroy=function(){r.releaseStatesOfProgram(this),a.deleteProgram(y),this.program=void 0},this.name=i.shaderName,this.id=qgt++,this.cacheKey=t,this.usedTimes=1,this.program=y,this.vertexShader=_,this.fragmentShader=E,this}var u0t=0,M4=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),n=this._getShaderStage(i),s=this._getShaderCacheForMaterial(e);return!1===s.has(r)&&(s.add(r),r.usedTimes++),!1===s.has(n)&&(s.add(n),n.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let e of t)e.usedTimes--,0===e.usedTimes&&this.shaderCache.delete(e.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){let t=this.materialCache,i=t.get(e);return void 0===i&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){let t=this.shaderCache,i=t.get(e);return void 0===i&&(i=new D4(e),t.set(e,i)),i}},D4=class{constructor(e){this.id=u0t++,this.code=e,this.usedTimes=0}};function h0t(e,t,i,r,n,s,a){let o=new Oy,l=new M4,h=[],u=n.isWebGL2,c=n.logarithmicDepthBuffer,p=n.vertexTextures,d=n.precision,f={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"};return{getParameters:function(s,o,h,m,g){let y=m.fog,v=g.geometry,T=s.isMeshStandardMaterial?m.environment:null,x=(s.isMeshStandardMaterial?i:t).get(s.envMap||T),b=x&&x.mapping===zy?x.image.height:null,_=f[s.type];null!==s.precision&&(d=n.getMaxPrecision(s.precision),d!==s.precision&&console.warn("THREE.WebGLProgram.getParameters:",s.precision,"not supported, using",d,"instead."));let E,w,S,I,M=v.morphAttributes.position||v.morphAttributes.normal||v.morphAttributes.color,A=void 0!==M?M.length:0,D=0;if(void 0!==v.morphAttributes.position&&(D=1),void 0!==v.morphAttributes.normal&&(D=2),void 0!==v.morphAttributes.color&&(D=3),_){let e=Rc[_];E=e.vertexShader,w=e.fragmentShader}else E=s.vertexShader,w=s.fragmentShader,l.update(s),S=l.getVertexShaderID(s),I=l.getFragmentShaderID(s);let O=e.getRenderTarget(),R=s.alphaTest>0,C=s.clearcoat>0,N=s.iridescence>0;return{isWebGL2:u,shaderID:_,shaderName:s.type,vertexShader:E,fragmentShader:w,defines:s.defines,customVertexShaderID:S,customFragmentShaderID:I,isRawShaderMaterial:!0===s.isRawShaderMaterial,glslVersion:s.glslVersion,precision:d,instancing:!0===g.isInstancedMesh,instancingColor:!0===g.isInstancedMesh&&null!==g.instanceColor,supportsVertexTextures:p,outputEncoding:null===O?e.outputEncoding:!0===O.isXRRenderTarget?O.texture.encoding:_l,map:!!s.map,matcap:!!s.matcap,envMap:!!x,envMapMode:x&&x.mapping,envMapCubeUVHeight:b,lightMap:!!s.lightMap,aoMap:!!s.aoMap,emissiveMap:!!s.emissiveMap,bumpMap:!!s.bumpMap,normalMap:!!s.normalMap,objectSpaceNormalMap:s.normalMapType===fhe,tangentSpaceNormalMap:s.normalMapType===gf,decodeVideoTexture:!!s.map&&!0===s.map.isVideoTexture&&s.map.encoding===gr,clearcoat:C,clearcoatMap:C&&!!s.clearcoatMap,clearcoatRoughnessMap:C&&!!s.clearcoatRoughnessMap,clearcoatNormalMap:C&&!!s.clearcoatNormalMap,iridescence:N,iridescenceMap:N&&!!s.iridescenceMap,iridescenceThicknessMap:N&&!!s.iridescenceThicknessMap,displacementMap:!!s.displacementMap,roughnessMap:!!s.roughnessMap,metalnessMap:!!s.metalnessMap,specularMap:!!s.specularMap,specularIntensityMap:!!s.specularIntensityMap,specularColorMap:!!s.specularColorMap,opaque:!1===s.transparent&&s.blending===mg,alphaMap:!!s.alphaMap,alphaTest:R,gradientMap:!!s.gradientMap,sheen:s.sheen>0,sheenColorMap:!!s.sheenColorMap,sheenRoughnessMap:!!s.sheenRoughnessMap,transmission:s.transmission>0,transmissionMap:!!s.transmissionMap,thicknessMap:!!s.thicknessMap,combine:s.combine,vertexTangents:!!s.normalMap&&!!v.attributes.tangent,vertexColors:s.vertexColors,vertexAlphas:!0===s.vertexColors&&!!v.attributes.color&&4===v.attributes.color.itemSize,vertexUvs:!!(s.map||s.bumpMap||s.normalMap||s.specularMap||s.alphaMap||s.emissiveMap||s.roughnessMap||s.metalnessMap||s.clearcoatMap||s.clearcoatRoughnessMap||s.clearcoatNormalMap||s.iridescenceMap||s.iridescenceThicknessMap||s.displacementMap||s.transmissionMap||s.thicknessMap||s.specularIntensityMap||s.specularColorMap||s.sheenColorMap||s.sheenRoughnessMap),uvsVertexOnly:!(s.map||s.bumpMap||s.normalMap||s.specularMap||s.alphaMap||s.emissiveMap||s.roughnessMap||s.metalnessMap||s.clearcoatNormalMap||s.iridescenceMap||s.iridescenceThicknessMap||s.transmission>0||s.transmissionMap||s.thicknessMap||s.specularIntensityMap||s.specularColorMap||s.sheen>0||s.sheenColorMap||s.sheenRoughnessMap||!s.displacementMap),fog:!!y,useFog:!0===s.fog,fogExp2:y&&y.isFogExp2,flatShading:!!s.flatShading,sizeAttenuation:s.sizeAttenuation,logarithmicDepthBuffer:c,skinning:!0===g.isSkinnedMesh,morphTargets:void 0!==v.morphAttributes.position,morphNormals:void 0!==v.morphAttributes.normal,morphColors:void 0!==v.morphAttributes.color,morphTargetsCount:A,morphTextureStride:D,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:s.dithering,shadowMapEnabled:e.shadowMap.enabled&&h.length>0,shadowMapType:e.shadowMap.type,toneMapping:s.toneMapped?e.toneMapping:Lu,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:s.premultipliedAlpha,doubleSided:s.side===gi,flipSided:s.side===zn,useDepthPacking:!!s.depthPacking,depthPacking:s.depthPacking||0,index0AttributeName:s.index0AttributeName,extensionDerivatives:s.extensions&&s.extensions.derivatives,extensionFragDepth:s.extensions&&s.extensions.fragDepth,extensionDrawBuffers:s.extensions&&s.extensions.drawBuffers,extensionShaderTextureLOD:s.extensions&&s.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),customProgramCacheKey:s.customProgramCacheKey()}},getProgramCacheKey:function(t){let i=[];if(t.shaderID?i.push(t.shaderID):(i.push(t.customVertexShaderID),i.push(t.customFragmentShaderID)),void 0!==t.defines)for(let e in t.defines)i.push(e),i.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(function(e,t){e.push(t.precision),e.push(t.outputEncoding),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.combine),e.push(t.vertexUvs),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(i,t),function(e,t){o.disableAll(),t.isWebGL2&&o.enable(0),t.supportsVertexTextures&&o.enable(1),t.instancing&&o.enable(2),t.instancingColor&&o.enable(3),t.map&&o.enable(4),t.matcap&&o.enable(5),t.envMap&&o.enable(6),t.lightMap&&o.enable(7),t.aoMap&&o.enable(8),t.emissiveMap&&o.enable(9),t.bumpMap&&o.enable(10),t.normalMap&&o.enable(11),t.objectSpaceNormalMap&&o.enable(12),t.tangentSpaceNormalMap&&o.enable(13),t.clearcoat&&o.enable(14),t.clearcoatMap&&o.enable(15),t.clearcoatRoughnessMap&&o.enable(16),t.clearcoatNormalMap&&o.enable(17),t.iridescence&&o.enable(18),t.iridescenceMap&&o.enable(19),t.iridescenceThicknessMap&&o.enable(20),t.displacementMap&&o.enable(21),t.specularMap&&o.enable(22),t.roughnessMap&&o.enable(23),t.metalnessMap&&o.enable(24),t.gradientMap&&o.enable(25),t.alphaMap&&o.enable(26),t.alphaTest&&o.enable(27),t.vertexColors&&o.enable(28),t.vertexAlphas&&o.enable(29),t.vertexUvs&&o.enable(30),t.vertexTangents&&o.enable(31),t.uvsVertexOnly&&o.enable(32),e.push(o.mask),o.disableAll(),t.fog&&o.enable(0),t.useFog&&o.enable(1),t.flatShading&&o.enable(2),t.logarithmicDepthBuffer&&o.enable(3),t.skinning&&o.enable(4),t.morphTargets&&o.enable(5),t.morphNormals&&o.enable(6),t.morphColors&&o.enable(7),t.premultipliedAlpha&&o.enable(8),t.shadowMapEnabled&&o.enable(9),t.physicallyCorrectLights&&o.enable(10),t.doubleSided&&o.enable(11),t.flipSided&&o.enable(12),t.useDepthPacking&&o.enable(13),t.dithering&&o.enable(14),t.specularIntensityMap&&o.enable(15),t.specularColorMap&&o.enable(16),t.transmission&&o.enable(17),t.transmissionMap&&o.enable(18),t.thicknessMap&&o.enable(19),t.sheen&&o.enable(20),t.sheenColorMap&&o.enable(21),t.sheenRoughnessMap&&o.enable(22),t.decodeVideoTexture&&o.enable(23),t.opaque&&o.enable(24),e.push(o.mask)}(i,t),i.push(e.outputEncoding)),i.push(t.customProgramCacheKey),i.join()},getUniforms:function(e){let t,i=f[e.type];if(i){let e=Rc[i];t=pn.clone(e.uniforms)}else t=e.uniforms;return t},acquireProgram:function(t,i){let r;for(let e=0,t=h.length;e0?r.push(u):!0===a.transparent?n.push(u):i.push(u)},unshift:function(e,t,a,o,l,h){let u=s(e,t,a,o,l,h);a.transmission>0?r.unshift(u):!0===a.transparent?n.unshift(u):i.unshift(u)},finish:function(){for(let i=t,r=e.length;i1&&i.sort(e||d0t),r.length>1&&r.sort(t||Hce),n.length>1&&n.sort(t||Hce)}}}function f0t(){let e=new WeakMap;return{get:function(t,i){let r,n=e.get(t);return void 0===n?(r=new Uce,e.set(t,[r])):i>=n.length?(r=new Uce,n.push(r)):r=n[i],r},dispose:function(){e=new WeakMap}}}function m0t(){let e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let i;switch(t.type){case"DirectionalLight":i={direction:new A,color:new je};break;case"SpotLight":i={position:new A,direction:new A,color:new je,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":i={position:new A,color:new je,distance:0,decay:0};break;case"HemisphereLight":i={direction:new A,skyColor:new je,groundColor:new je};break;case"RectAreaLight":i={color:new je,position:new A,halfWidth:new A,halfHeight:new A}}return e[t.id]=i,i}}}function g0t(){let e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let i;switch(t.type){case"DirectionalLight":case"SpotLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new le};break;case"PointLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new le,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=i,i}}}var v0t=0;function y0t(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function T0t(e,t){let i=new m0t,r=g0t(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-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};for(let e=0;e<9;e++)n.probe.push(new A);let s=new A,a=new Be,o=new Be;return{setup:function(s,a){let o=0,l=0,h=0;for(let e=0;e<9;e++)n.probe[e].set(0,0,0);let u=0,c=0,p=0,d=0,f=0,m=0,g=0,y=0,v=0,T=0;s.sort(y0t);let x=!0!==a?Math.PI:1;for(let e=0,t=s.length;e0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(n.rectAreaLTC1=At.LTC_FLOAT_1,n.rectAreaLTC2=At.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(n.rectAreaLTC1=At.LTC_HALF_1,n.rectAreaLTC2=At.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),n.ambient[0]=o,n.ambient[1]=l,n.ambient[2]=h;let b=n.hash;(b.directionalLength!==u||b.pointLength!==c||b.spotLength!==p||b.rectAreaLength!==d||b.hemiLength!==f||b.numDirectionalShadows!==m||b.numPointShadows!==g||b.numSpotShadows!==y||b.numSpotMaps!==v)&&(n.directional.length=u,n.spot.length=p,n.rectArea.length=d,n.point.length=c,n.hemi.length=f,n.directionalShadow.length=m,n.directionalShadowMap.length=m,n.pointShadow.length=g,n.pointShadowMap.length=g,n.spotShadow.length=y,n.spotShadowMap.length=y,n.directionalShadowMatrix.length=m,n.pointShadowMatrix.length=g,n.spotLightMatrix.length=y+v-T,n.spotLightMap.length=v,n.numSpotLightShadowsWithMaps=T,b.directionalLength=u,b.pointLength=c,b.spotLength=p,b.rectAreaLength=d,b.hemiLength=f,b.numDirectionalShadows=m,b.numPointShadows=g,b.numSpotShadows=y,b.numSpotMaps=v,n.version=v0t++)},setupView:function(e,t){let i=0,r=0,l=0,h=0,u=0,c=t.matrixWorldInverse;for(let t=0,p=e.length;t=a.length?(s=new Bce(e,t),a.push(s)):s=a[n],s},dispose:function(){i=new WeakMap}}}var Ip=class extends zr{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=dhe,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}},cx=class extends zr{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.referencePosition=new A,this.nearDistance=1,this.farDistance=1e3,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.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}},b0t="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",x0t="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";function I0t(e,t,i){let r=new Xs,n=new le,s=new le,a=new Gr,o=new Ip({depthPacking:Wy}),l=new cx,h={},u=i.maxTextureSize,c={[tn]:zn,[zn]:tn,[gi]:gi},p=new Yt({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new le},radius:{value:4}},vertexShader:b0t,fragmentShader:x0t}),d=p.clone();d.defines.HORIZONTAL_PASS=1;let f=new lt;f.setAttribute("position",new Wt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let m=new rt(f,p),g=this;function y(i,r){let s=t.update(m);p.defines.VSM_SAMPLES!==i.blurSamples&&(p.defines.VSM_SAMPLES=i.blurSamples,d.defines.VSM_SAMPLES=i.blurSamples,p.needsUpdate=!0,d.needsUpdate=!0),null===i.mapPass&&(i.mapPass=new Vr(n.x,n.y)),p.uniforms.shadow_pass.value=i.map.texture,p.uniforms.resolution.value=i.mapSize,p.uniforms.radius.value=i.radius,e.setRenderTarget(i.mapPass),e.clear(),e.renderBufferDirect(r,null,s,p,m,null),d.uniforms.shadow_pass.value=i.mapPass.texture,d.uniforms.resolution.value=i.mapSize,d.uniforms.radius.value=i.radius,e.setRenderTarget(i.map),e.clear(),e.renderBufferDirect(r,null,s,d,m,null)}function v(t,i,r,n,s,a){let u=null,p=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==p)u=p;else if(u=!0===r.isPointLight?l:o,e.localClippingEnabled&&!0===i.clipShadows&&Array.isArray(i.clippingPlanes)&&0!==i.clippingPlanes.length||i.displacementMap&&0!==i.displacementScale||i.alphaMap&&i.alphaTest>0||i.map&&i.alphaTest>0){let e=u.uuid,t=i.uuid,r=h[e];void 0===r&&(r={},h[e]=r);let n=r[t];void 0===n&&(n=u.clone(),r[t]=n),u=n}return u.visible=i.visible,u.wireframe=i.wireframe,u.side=a===Sy?null!==i.shadowSide?i.shadowSide:i.side:null!==i.shadowSide?i.shadowSide:c[i.side],u.alphaMap=i.alphaMap,u.alphaTest=i.alphaTest,u.map=i.map,u.clipShadows=i.clipShadows,u.clippingPlanes=i.clippingPlanes,u.clipIntersection=i.clipIntersection,u.displacementMap=i.displacementMap,u.displacementScale=i.displacementScale,u.displacementBias=i.displacementBias,u.wireframeLinewidth=i.wireframeLinewidth,u.linewidth=i.linewidth,!0===r.isPointLight&&!0===u.isMeshDistanceMaterial&&(u.referencePosition.setFromMatrixPosition(r.matrixWorld),u.nearDistance=n,u.farDistance=s),u}function T(i,n,s,a,o){if(!1===i.visible)return;if(i.layers.test(n.layers)&&(i.isMesh||i.isLine||i.isPoints)&&(i.castShadow||i.receiveShadow&&o===Sy)&&(!i.frustumCulled||r.intersectsObject(i))){i.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,i.matrixWorld);let r=t.update(i),n=i.material;if(Array.isArray(n)){let t=r.groups;for(let l=0,h=t.length;lu||n.y>u)&&(n.x>u&&(s.x=Math.floor(u/d.x),n.x=s.x*d.x,c.mapSize.x=s.x),n.y>u&&(s.y=Math.floor(u/d.y),n.y=s.y*d.y,c.mapSize.y=s.y)),null===c.map){let e=this.type!==Sy?{minFilter:Di,magFilter:Di}:{};c.map=new Vr(n.x,n.y,e),c.map.texture.name=h.name+".shadowMap",c.camera.updateProjectionMatrix()}e.setRenderTarget(c.map),e.clear();let f=c.getViewportCount();for(let e=0;e=1):-1!==R.indexOf("OpenGL ES")&&(O=parseFloat(/^OpenGL ES (\d)/.exec(R)[1]),D=O>=2);let C=null,N={},P=e.getParameter(3088),L=e.getParameter(2978),F=(new Gr).fromArray(P),U=(new Gr).fromArray(L);function k(t,i,r){let n=new Uint8Array(4),s=e.createTexture();e.bindTexture(t,s),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let t=0;tr||e.height>r)&&(n=r/Math.max(e.width,e.height)),n<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){let r=t?CD:Math.floor,s=r(n*e.width),a=r(n*e.height);void 0===o&&(o=v(s,a));let l=i?v(s,a):o;return l.width=s,l.height=a,l.getContext("2d").drawImage(e,0,0,s,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+s+"x"+a+")."),l}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function x(e){return d4(e.width)&&d4(e.height)}function b(e,t){return e.generateMipmaps&&t&&e.minFilter!==Di&&e.minFilter!==oi}function _(t){e.generateMipmap(t)}function E(i,r,n,s,a=!1){if(!1===l)return r;if(null!==i){if(void 0!==e[i])return e[i];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+i+"'")}let o=r;return 6403===r&&(5126===n&&(o=33326),5131===n&&(o=33325),5121===n&&(o=33321)),33319===r&&(5126===n&&(o=33328),5131===n&&(o=33327),5121===n&&(o=33323)),6408===r&&(5126===n&&(o=34836),5131===n&&(o=34842),5121===n&&(o=s===gr&&!1===a?35907:32856),32819===n&&(o=32854),32820===n&&(o=32855)),(33325===o||33326===o||33327===o||33328===o||34842===o||34836===o)&&t.get("EXT_color_buffer_float"),o}function w(e,t,i){return!0===b(e,i)||e.isFramebufferTexture&&e.minFilter!==Di&&e.minFilter!==oi?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function S(e){return e===Di||e===lf||e===mp?9728:9729}function I(e){let t=e.target;t.removeEventListener("dispose",I),function(e){let t=r.get(e);if(void 0===t.__webglInit)return;let i=e.source,n=g.get(i);if(n){let r=n[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&A(e),0===Object.keys(n).length&&g.delete(i)}r.remove(e)}(t),t.isVideoTexture&&m.delete(t)}function M(t){let i=t.target;i.removeEventListener("dispose",M),function(t){let i=t.texture,n=r.get(t),s=r.get(i);if(void 0!==s.__webglTexture&&(e.deleteTexture(s.__webglTexture),a.memory.textures--),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++)e.deleteFramebuffer(n.__webglFramebuffer[t]),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[t]);else{if(e.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer),n.__webglMultisampledFramebuffer&&e.deleteFramebuffer(n.__webglMultisampledFramebuffer),n.__webglColorRenderbuffer)for(let t=0;t0&&n.__version!==e.version){let i=e.image;if(null===i)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==i.complete)return void L(n,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}i.bindTexture(3553,n.__webglTexture,33984+t)}let R={[vn]:10497,[gn]:33071,[yp]:33648},C={[Di]:9728,[lf]:9984,[mp]:9986,[oi]:9729,[Bg]:9985,[Ra]:9987};function N(i,s,a){if(a?(e.texParameteri(i,10242,R[s.wrapS]),e.texParameteri(i,10243,R[s.wrapT]),(32879===i||35866===i)&&e.texParameteri(i,32882,R[s.wrapR]),e.texParameteri(i,10240,C[s.magFilter]),e.texParameteri(i,10241,C[s.minFilter])):(e.texParameteri(i,10242,33071),e.texParameteri(i,10243,33071),(32879===i||35866===i)&&e.texParameteri(i,32882,33071),(s.wrapS!==gn||s.wrapT!==gn)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(i,10240,S(s.magFilter)),e.texParameteri(i,10241,S(s.minFilter)),s.minFilter!==Di&&s.minFilter!==oi&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){let a=t.get("EXT_texture_filter_anisotropic");if(s.magFilter===Di||s.minFilter!==mp&&s.minFilter!==Ra||s.type===wa&&!1===t.has("OES_texture_float_linear")||!1===l&&s.type===Uo&&!1===t.has("OES_texture_half_float_linear"))return;(s.anisotropy>1||r.get(s).__currentAnisotropy)&&(e.texParameterf(i,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,n.getMaxAnisotropy())),r.get(s).__currentAnisotropy=s.anisotropy)}}function P(t,i){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,i.addEventListener("dispose",I));let n=i.source,s=g.get(n);void 0===s&&(s={},g.set(n,s));let o=function(e){let t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.encoding),t.join()}(i);if(o!==t.__cacheKey){void 0===s[o]&&(s[o]={texture:e.createTexture(),usedTimes:0},a.memory.textures++,r=!0),s[o].usedTimes++;let n=s[t.__cacheKey];void 0!==n&&(s[t.__cacheKey].usedTimes--,0===n.usedTimes&&A(i)),t.__cacheKey=o,t.__webglTexture=s[o].texture}return r}function L(t,n,a){let o=3553;(n.isDataArrayTexture||n.isCompressedArrayTexture)&&(o=35866),n.isData3DTexture&&(o=32879);let h=P(t,n),u=n.source;i.bindTexture(o,t.__webglTexture,33984+a);let p=r.get(u);if(u.version!==p.__version||!0===h){i.activeTexture(33984+a),e.pixelStorei(37440,n.flipY),e.pixelStorei(37441,n.premultiplyAlpha),e.pixelStorei(3317,n.unpackAlignment),e.pixelStorei(37443,0);let t=function(e){return!l&&(e.wrapS!==gn||e.wrapT!==gn||e.minFilter!==Di&&e.minFilter!==oi)}(n)&&!1===x(n.image),r=T(n.image,t,!1,c);r=G(n,r);let d=x(r)||l,f=s.convert(n.format,n.encoding),m=s.convert(n.type),g=E(n.internalFormat,f,m,n.encoding,n.isVideoTexture);N(o,n,d);let y,v=n.mipmaps,S=l&&!0!==n.isVideoTexture,I=void 0===p.__version||!0===h,M=w(n,r,d);if(n.isDepthTexture)g=6402,l?g=n.type===wa?36012:n.type===nf?33190:n.type===gp?35056:33189:n.type===wa&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),n.format===sf&&6402===g&&n.type!==Cx&&n.type!==nf&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),n.type=nf,m=s.convert(n.type)),n.format===Tp&&6402===g&&(g=34041,n.type!==gp&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),n.type=gp,m=s.convert(n.type))),I&&(S?i.texStorage2D(3553,1,g,r.width,r.height):i.texImage2D(3553,0,g,r.width,r.height,0,f,m,null));else if(n.isDataTexture)if(v.length>0&&d){S&&I&&i.texStorage2D(3553,M,g,v[0].width,v[0].height);for(let e=0,t=v.length;e>=1,t>>=1}}else if(v.length>0&&d){S&&I&&i.texStorage2D(3553,M,g,v[0].width,v[0].height);for(let e=0,t=v.length;e=34069&&l<=34074)&&e.framebufferTexture2D(36160,o,l,r.get(a).__webglTexture,0),i.bindFramebuffer(36160,null)}function U(t,i,r){if(e.bindRenderbuffer(36161,t),i.depthBuffer&&!i.stencilBuffer){let n=33189;if(r||H(i)){let t=i.depthTexture;t&&t.isDepthTexture&&(t.type===wa?n=36012:t.type===nf&&(n=33190));let r=B(i);H(i)?d.renderbufferStorageMultisampleEXT(36161,r,n,i.width,i.height):e.renderbufferStorageMultisample(36161,r,n,i.width,i.height)}else e.renderbufferStorage(36161,n,i.width,i.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(i.depthBuffer&&i.stencilBuffer){let n=B(i);r&&!1===H(i)?e.renderbufferStorageMultisample(36161,n,35056,i.width,i.height):H(i)?d.renderbufferStorageMultisampleEXT(36161,n,35056,i.width,i.height):e.renderbufferStorage(36161,34041,i.width,i.height),e.framebufferRenderbuffer(36160,33306,36161,t)}else{let t=!0===i.isWebGLMultipleRenderTargets?i.texture:[i.texture];for(let n=0;n0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==i.__useRenderToTexture}function G(e,i){let r=e.encoding,n=e.format,s=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===DD||r!==_l&&(r===gr?!1===l?!0===t.has("EXT_sRGB")&&n===Us?(e.format=DD,e.minFilter=oi,e.generateMipmaps=!1):i=ax.sRGBToLinear(i):(n!==Us||s!==Fu)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",r)),i}this.allocateTextureUnit=function(){let e=D;return e>=h&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+h),D+=1,e},this.resetTextureUnits=function(){D=0},this.setTexture2D=O,this.setTexture2DArray=function(e,t){let n=r.get(e);e.version>0&&n.__version!==e.version?L(n,e,t):i.bindTexture(35866,n.__webglTexture,33984+t)},this.setTexture3D=function(e,t){let n=r.get(e);e.version>0&&n.__version!==e.version?L(n,e,t):i.bindTexture(32879,n.__webglTexture,33984+t)},this.setTextureCube=function(t,n){let a=r.get(t);t.version>0&&a.__version!==t.version?function(t,n,a){if(6!==n.image.length)return;let o=P(t,n),h=n.source;i.bindTexture(34067,t.__webglTexture,33984+a);let c=r.get(h);if(h.version!==c.__version||!0===o){i.activeTexture(33984+a),e.pixelStorei(37440,n.flipY),e.pixelStorei(37441,n.premultiplyAlpha),e.pixelStorei(3317,n.unpackAlignment),e.pixelStorei(37443,0);let t=n.isCompressedTexture||n.image[0].isCompressedTexture,r=n.image[0]&&n.image[0].isDataTexture,p=[];for(let e=0;e<6;e++)p[e]=t||r?r?n.image[e].image:n.image[e]:T(n.image[e],!1,!0,u),p[e]=G(n,p[e]);let d,f=p[0],m=x(f)||l,g=s.convert(n.format,n.encoding),y=s.convert(n.type),v=E(n.internalFormat,g,y,n.encoding),S=l&&!0!==n.isVideoTexture,I=void 0===c.__version||!0===o,M=w(n,f,m);if(N(34067,n,m),t){S&&I&&i.texStorage2D(34067,M,v,f.width,f.height);for(let e=0;e<6;e++){d=p[e].mipmaps;for(let t=0;t0&&M++,i.texStorage2D(34067,M,v,p[0].width,p[0].height));for(let e=0;e<6;e++)if(r){S?i.texSubImage2D(34069+e,0,0,0,p[e].width,p[e].height,g,y,p[e].data):i.texImage2D(34069+e,0,v,p[e].width,p[e].height,0,g,y,p[e].data);for(let t=0;t0&&!1===H(t)){let r=p?o:[o];h.__webglMultisampledFramebuffer=e.createFramebuffer(),h.__webglColorRenderbuffer=[],i.bindFramebuffer(36160,h.__webglMultisampledFramebuffer);for(let i=0;i0&&!1===H(t)){let n=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],s=t.width,a=t.height,o=16384,l=[],h=t.stencilBuffer?33306:36096,u=r.get(t),c=!0===t.isWebGLMultipleRenderTargets;if(c)for(let t=0;to+h?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&a<=o-h&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&(n=t.getPose(e.gripSpace,i),null!==n&&(o.matrix.fromArray(n.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),n.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(n.linearVelocity)):o.hasLinearVelocity=!1,n.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(n.angularVelocity)):o.hasAngularVelocity=!1));null!==a&&(r=t.getPose(e.targetRaySpace,i),null===r&&null!==n&&(r=n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(w0t)))}return null!==a&&(a.visible=null!==r),null!==o&&(o.visible=null!==n),null!==l&&(l.visible=null!==s),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){let i=new ur;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}},cf=class extends Bi{constructor(e,t,i,r,n,s,a,o,l,h){if((h=void 0!==h?h:sf)!==sf&&h!==Tp)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===i&&h===sf&&(i=nf),void 0===i&&h===Tp&&(i=gp),super(null,r,n,s,a,o,h,i,l),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==a?a:Di,this.minFilter=void 0!==o?o:Di,this.flipY=!1,this.generateMipmaps=!1}},C4=class extends Bo{constructor(e,t){super();let i=this,r=null,n=1,s=null,a="local-floor",o=1,l=null,h=null,u=null,c=null,p=null,d=null,f=t.getContextAttributes(),m=null,g=null,y=[],v=[],T=new Set,x=new Map,b=new Xr;b.layers.enable(1),b.viewport=new Gr;let _=new Xr;_.layers.enable(2),_.viewport=new Gr;let E=[b,_],w=new PD;w.layers.enable(1),w.layers.enable(2);let S=null,I=null;function M(e){let t=v.indexOf(e.inputSource);if(-1===t)return;let i=y[t];void 0!==i&&i.dispatchEvent({type:e.type,data:e.inputSource})}function D(){r.removeEventListener("select",M),r.removeEventListener("selectstart",M),r.removeEventListener("selectend",M),r.removeEventListener("squeeze",M),r.removeEventListener("squeezestart",M),r.removeEventListener("squeezeend",M),r.removeEventListener("end",D),r.removeEventListener("inputsourceschange",O);for(let e=0;e=0&&(v[r]=null,y[r].disconnect(i))}for(let t=0;t=v.length){v.push(i),r=e;break}if(null===v[e]){v[e]=i,r=e;break}}if(-1===r)break}let n=y[r];n&&n.connect(i)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=y[e];return void 0===t&&(t=new Jb,y[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=y[e];return void 0===t&&(t=new Jb,y[e]=t),t.getGripSpace()},this.getHand=function(e){let t=y[e];return void 0===t&&(t=new Jb,y[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){n=e,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){a=e,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||s},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==c?c:p},this.getBinding=function(){return u},this.getFrame=function(){return d},this.getSession=function(){return r},this.setSession=function(h){return ht(this,null,(function*(){if(r=h,null!==r){if(m=e.getRenderTarget(),r.addEventListener("select",M),r.addEventListener("selectstart",M),r.addEventListener("selectend",M),r.addEventListener("squeeze",M),r.addEventListener("squeezestart",M),r.addEventListener("squeezeend",M),r.addEventListener("end",D),r.addEventListener("inputsourceschange",O),!0!==f.xrCompatible&&(yield t.makeXRCompatible()),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2){let i={antialias:void 0!==r.renderState.layers||f.antialias,alpha:f.alpha,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:n};p=new XRWebGLLayer(r,t,i),r.updateRenderState({baseLayer:p}),g=new Vr(p.framebufferWidth,p.framebufferHeight,{format:Us,type:Fu,encoding:e.outputEncoding,stencilBuffer:f.stencil})}else{let i=null,s=null,a=null;f.depth&&(a=f.stencil?35056:33190,i=f.stencil?Tp:sf,s=f.stencil?gp:nf);let o={colorFormat:32856,depthFormat:a,scaleFactor:n};u=new XRWebGLBinding(r,t),c=u.createProjectionLayer(o),r.updateRenderState({layers:[c]}),g=new Vr(c.textureWidth,c.textureHeight,{format:Us,type:Fu,depthTexture:new cf(c.textureWidth,c.textureHeight,s,void 0,void 0,void 0,void 0,void 0,void 0,i),stencilBuffer:f.stencil,encoding:e.outputEncoding,samples:f.antialias?4:0}),e.properties.get(g).__ignoreDepthValues=c.ignoreDepthValues}g.isXRRenderTarget=!0,this.setFoveation(o),l=null,s=yield r.requestReferenceSpace(a),L.setContext(r),L.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}}))};let R=new A,C=new A;function N(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;w.near=_.near=b.near=e.near,w.far=_.far=b.far=e.far,(S!==w.near||I!==w.far)&&(r.updateRenderState({depthNear:w.near,depthFar:w.far}),S=w.near,I=w.far);let t=e.parent,i=w.cameras;N(w,t);for(let e=0;et&&(x.set(e,e.lastChangedTime),i.dispatchEvent({type:"planechanged",data:e}))}else T.add(e),x.set(e,r.lastChangedTime),i.dispatchEvent({type:"planeadded",data:e})}d=null})),this.setAnimationLoop=function(e){P=e},this.dispose=function(){}}};function R0t(e,t){function i(i,r){i.opacity.value=r.opacity,r.color&&i.diffuse.value.copy(r.color),r.emissive&&i.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),r.map&&(i.map.value=r.map),r.alphaMap&&(i.alphaMap.value=r.alphaMap),r.bumpMap&&(i.bumpMap.value=r.bumpMap,i.bumpScale.value=r.bumpScale,r.side===zn&&(i.bumpScale.value*=-1)),r.displacementMap&&(i.displacementMap.value=r.displacementMap,i.displacementScale.value=r.displacementScale,i.displacementBias.value=r.displacementBias),r.emissiveMap&&(i.emissiveMap.value=r.emissiveMap),r.normalMap&&(i.normalMap.value=r.normalMap,i.normalScale.value.copy(r.normalScale),r.side===zn&&i.normalScale.value.negate()),r.specularMap&&(i.specularMap.value=r.specularMap),r.alphaTest>0&&(i.alphaTest.value=r.alphaTest);let n,s,a=t.get(r).envMap;if(a&&(i.envMap.value=a,i.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,i.reflectivity.value=r.reflectivity,i.ior.value=r.ior,i.refractionRatio.value=r.refractionRatio),r.lightMap){i.lightMap.value=r.lightMap;let t=!0!==e.physicallyCorrectLights?Math.PI:1;i.lightMapIntensity.value=r.lightMapIntensity*t}r.aoMap&&(i.aoMap.value=r.aoMap,i.aoMapIntensity.value=r.aoMapIntensity),r.map?n=r.map:r.specularMap?n=r.specularMap:r.displacementMap?n=r.displacementMap:r.normalMap?n=r.normalMap:r.bumpMap?n=r.bumpMap:r.roughnessMap?n=r.roughnessMap:r.metalnessMap?n=r.metalnessMap:r.alphaMap?n=r.alphaMap:r.emissiveMap?n=r.emissiveMap:r.clearcoatMap?n=r.clearcoatMap:r.clearcoatNormalMap?n=r.clearcoatNormalMap:r.clearcoatRoughnessMap?n=r.clearcoatRoughnessMap:r.iridescenceMap?n=r.iridescenceMap:r.iridescenceThicknessMap?n=r.iridescenceThicknessMap:r.specularIntensityMap?n=r.specularIntensityMap:r.specularColorMap?n=r.specularColorMap:r.transmissionMap?n=r.transmissionMap:r.thicknessMap?n=r.thicknessMap:r.sheenColorMap?n=r.sheenColorMap:r.sheenRoughnessMap&&(n=r.sheenRoughnessMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),i.uvTransform.value.copy(n.matrix)),r.aoMap?s=r.aoMap:r.lightMap&&(s=r.lightMap),void 0!==s&&(s.isWebGLRenderTarget&&(s=s.texture),!0===s.matrixAutoUpdate&&s.updateMatrix(),i.uv2Transform.value.copy(s.matrix))}return{refreshFogUniforms:function(t,i){i.color.getRGB(t.fogColor.value,The(e)),i.isFog?(t.fogNear.value=i.near,t.fogFar.value=i.far):i.isFogExp2&&(t.fogDensity.value=i.density)},refreshMaterialUniforms:function(e,r,n,s,a){r.isMeshBasicMaterial||r.isMeshLambertMaterial?i(e,r):r.isMeshToonMaterial?(i(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,r)):r.isMeshPhongMaterial?(i(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,r)):r.isMeshStandardMaterial?(i(e,r),function(e,i){e.roughness.value=i.roughness,e.metalness.value=i.metalness,i.roughnessMap&&(e.roughnessMap.value=i.roughnessMap),i.metalnessMap&&(e.metalnessMap.value=i.metalnessMap),t.get(i).envMap&&(e.envMapIntensity.value=i.envMapIntensity)}(e,r),r.isMeshPhysicalMaterial&&function(e,t,i){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap)),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===zn&&e.clearcoatNormalScale.value.negate())),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap)),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=i.texture,e.transmissionSamplerSize.value.set(i.width,i.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap)}(e,r,a)):r.isMeshMatcapMaterial?(i(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,r)):r.isMeshDepthMaterial?i(e,r):r.isMeshDistanceMaterial?(i(e,r),function(e,t){e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?i(e,r):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,i,r){let n;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*i,e.scale.value=.5*r,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?n=t.map:t.alphaMap&&(n=t.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r,n,s):r.isSpriteMaterial?function(e,t){let i;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?i=t.map:t.alphaMap&&(i=t.alphaMap),void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function M0t(e,t,i,r){let n={},s={},a=[],o=i.isWebGL2?e.getParameter(35375):0;function l(e,t,i){let r=e.value;if(void 0===i[t]){if("number"==typeof r)i[t]=r;else{let e=Array.isArray(r)?r:[r],n=[];for(let t=0;t0){n=i%r,0!==n&&r-n-a.boundary<0&&(i+=r-n,s.__offset=i)}i+=a.storage}n=i%r,n>0&&(i+=r-n),e.__size=i,e.__cache={}}(i),p=function(t){let i=function(){for(let e=0;e0&&function(e,t,i){let r=j.isWebGL2;null===U&&(U=new Vr(1,1,{generateMipmaps:!0,type:V.has("EXT_color_buffer_half_float")?Uo:Fu,minFilter:Ra,samples:r&&!0===a?4:0})),m.getDrawingBufferSize(B),r?U.setSize(B.x,B.y):U.setSize(CD(B.x),CD(B.y));let n=m.getRenderTarget();m.setRenderTarget(U),m.clear();let s=m.toneMapping;m.toneMapping=Lu,Ae(e,t,i),m.toneMapping=s,q.updateMultisampleRenderTarget(U),q.updateRenderTargetMipmap(U),m.setRenderTarget(n)}(n,t,i),r&&W.viewport(_.copy(r)),n.length>0&&Ae(n,t,i),s.length>0&&Ae(s,t,i),o.length>0&&Ae(o,t,i),W.buffers.depth.setTest(!0),W.buffers.depth.setMask(!0),W.buffers.color.setMask(!0),W.setPolygonOffset(!1)}function Ae(e,t,i){let r=!0===t.isScene?t.overrideMaterial:null;for(let n=0,s=e.length;n0?f[f.length-1]:null,d.pop(),c=d.length>0?d[d.length-1]:null},this.getActiveCubeFace=function(){return y},this.getActiveMipmapLevel=function(){return v},this.getRenderTarget=function(){return T},this.setRenderTargetTextures=function(e,t,i){X.get(e.texture).__webglTexture=t,X.get(e.depthTexture).__webglTexture=i;let r=X.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===i,r.__autoAllocateDepthBuffer||!0===V.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){let i=X.get(e);i.__webglFramebuffer=t,i.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,i=0){T=e,y=t,v=i;let r=!0,n=null,s=!1,a=!1;if(e){let i=X.get(e);void 0!==i.__useDefaultFramebuffer?(W.bindFramebuffer(36160,null),r=!1):void 0===i.__webglFramebuffer?q.setupRenderTarget(e):i.__hasExternalTextures&&q.rebindTextures(e,X.get(e.texture).__webglTexture,X.get(e.depthTexture).__webglTexture);let o=e.texture;(o.isData3DTexture||o.isDataArrayTexture||o.isCompressedArrayTexture)&&(a=!0);let l=X.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(n=l[t],s=!0):n=j.isWebGL2&&e.samples>0&&!1===q.useMultisampledRTT(e)?X.get(e).__webglMultisampledFramebuffer:l,_.copy(e.viewport),E.copy(e.scissor),w=e.scissorTest}else _.copy(R).multiplyScalar(M).floor(),E.copy(C).multiplyScalar(M).floor(),w=N;if(W.bindFramebuffer(36160,n)&&j.drawBuffers&&r&&W.drawBuffers(e,n),W.viewport(_),W.scissor(E),W.setScissorTest(w),s){let r=X.get(e.texture);fe.framebufferTexture2D(36160,36064,34069+t,r.__webglTexture,i)}else if(a){let r=X.get(e.texture),n=t||0;fe.framebufferTextureLayer(36160,36064,r.__webglTexture,i||0,n)}x=-1},this.readRenderTargetPixels=function(e,t,i,r,n,s,a){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let o=X.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==a&&(o=o[a]),o){W.bindFramebuffer(36160,o);try{let a=e.texture,o=a.format,l=a.type;if(o!==Us&&ce.convert(o)!==fe.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");let h=l===Uo&&(V.has("EXT_color_buffer_half_float")||j.isWebGL2&&V.has("EXT_color_buffer_float"));if(!(l===Fu||ce.convert(l)===fe.getParameter(35738)||l===wa&&(j.isWebGL2||V.has("OES_texture_float")||V.has("WEBGL_color_buffer_float"))||h))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-r&&i>=0&&i<=e.height-n&&fe.readPixels(t,i,r,n,ce.convert(o),ce.convert(l),s)}finally{let e=null!==T?X.get(T).__webglFramebuffer:null;W.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,i=0){let r=Math.pow(2,-i),n=Math.floor(t.image.width*r),s=Math.floor(t.image.height*r);q.setTexture2D(t,0),fe.copyTexSubImage2D(3553,i,0,0,e.x,e.y,n,s),W.unbindTexture()},this.copyTextureToTexture=function(e,t,i,r=0){let n=t.image.width,s=t.image.height,a=ce.convert(i.format),o=ce.convert(i.type);q.setTexture2D(i,0),fe.pixelStorei(37440,i.flipY),fe.pixelStorei(37441,i.premultiplyAlpha),fe.pixelStorei(3317,i.unpackAlignment),t.isDataTexture?fe.texSubImage2D(3553,r,e.x,e.y,n,s,a,o,t.image.data):t.isCompressedTexture?fe.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):fe.texSubImage2D(3553,r,e.x,e.y,a,o,t.image),0===r&&i.generateMipmaps&&fe.generateMipmap(3553),W.unbindTexture()},this.copyTextureToTexture3D=function(e,t,i,r,n=0){if(m.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");let s,a=e.max.x-e.min.x+1,o=e.max.y-e.min.y+1,l=e.max.z-e.min.z+1,h=ce.convert(r.format),u=ce.convert(r.type);if(r.isData3DTexture)q.setTexture3D(r,0),s=32879;else{if(!r.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");q.setTexture2DArray(r,0),s=35866}fe.pixelStorei(37440,r.flipY),fe.pixelStorei(37441,r.premultiplyAlpha),fe.pixelStorei(3317,r.unpackAlignment);let c=fe.getParameter(3314),p=fe.getParameter(32878),d=fe.getParameter(3316),f=fe.getParameter(3315),g=fe.getParameter(32877),y=i.isCompressedTexture?i.mipmaps[0]:i.image;fe.pixelStorei(3314,y.width),fe.pixelStorei(32878,y.height),fe.pixelStorei(3316,e.min.x),fe.pixelStorei(3315,e.min.y),fe.pixelStorei(32877,e.min.z),i.isDataTexture||i.isData3DTexture?fe.texSubImage3D(s,n,t.x,t.y,t.z,a,o,l,h,u,y.data):i.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),fe.compressedTexSubImage3D(s,n,t.x,t.y,t.z,a,o,l,h,y.data)):fe.texSubImage3D(s,n,t.x,t.y,t.z,a,o,l,h,u,y),fe.pixelStorei(3314,c),fe.pixelStorei(32878,p),fe.pixelStorei(3316,d),fe.pixelStorei(3315,f),fe.pixelStorei(32877,g),0===n&&r.generateMipmaps&&fe.generateMipmap(s),W.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?q.setTextureCube(e,0):e.isData3DTexture?q.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?q.setTexture2DArray(e,0):q.setTexture2D(e,0),W.unbindTexture()},this.resetState=function(){y=0,v=0,T=null,W.reset(),pe.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}var ND=class extends Ol{};ND.prototype.isWebGL1Renderer=!0;var by,Ny=class{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new je(e),this.density=t}clone(){return new Ny(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}},Uu=class{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new je(e),this.near=t,this.far=i}clone(){return new Uu(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}},Pn=class extends cr{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,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}},_p=class{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=ix,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Ho()}onUploadCallback(){}set needsUpdate(e){!0===e&&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,i){e*=this.stride,i*=t.stride;for(let r=0,n=this.stride;re.far||t.push({distance:o,point:Wb.clone(),uv:hn.getUV(Wb,QM,Yb,eD,kce,MH,Gce,new le),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}};function tD(e,t,i,r,n,s){_y.subVectors(e,i).addScalar(.5).multiply(r),void 0!==n?(qb.x=s*_y.x-n*_y.y,qb.y=n*_y.x+s*_y.y):qb.copy(_y),e.copy(t),e.x+=qb.x,e.y+=qb.y,e.applyMatrix4(whe)}var rD=new A,Vce=new A,FD=class extends cr{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);let t=e.levels;for(let e=0,i=t.length;e0){let i,r;for(i=1,r=t.length;i0){rD.setFromMatrixPosition(this.matrixWorld);let i=e.ray.origin.distanceTo(rD);this.getObjectForDistance(i).raycast(e,t)}}update(e){let t=this.levels;if(t.length>1){rD.setFromMatrixPosition(e.matrixWorld),Vce.setFromMatrixPosition(this.matrixWorld);let i,r,n=rD.distanceTo(Vce)/e.zoom;for(t[0].object.visible=!0,i=1,r=t.length;i=e))break;t[i-1].object.visible=!1,t[i].object.visible=!0}for(this._currentLevel=i-1;io)continue;c.applyMatrix4(this.matrixWorld);let s=e.ray.origin.distanceTo(c);se.far||t.push({distance:s,point:u.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}else{for(let i=Math.max(0,s.start),r=Math.min(f.count,s.start+s.count)-1;io)continue;c.applyMatrix4(this.matrixWorld);let r=e.ray.origin.distanceTo(c);re.far||t.push({distance:r,point:u.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;e0){let i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;en.far)return;s.push({distance:l,distanceToRay:Math.sqrt(o),point:i,index:t,face:null,object:a})}}var O4=class extends Bi{constructor(e,t,i,r,n,s,a,o,l){super(e,t,i,r,n,s,a,o,l),this.isVideoTexture=!0,this.minFilter=void 0!==s?s:oi,this.magFilter=void 0!==n?n:oi,this.generateMipmaps=!1;let h=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){h.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){let e=this.image;"requestVideoFrameCallback"in e==!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}},P4=class extends Bi{constructor(e,t,i){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=i,this.magFilter=Di,this.minFilter=Di,this.generateMipmaps=!1,this.needsUpdate=!0}},ux=class extends Bi{constructor(e,t,i,r,n,s,a,o,l,h,u,c){super(null,s,a,o,l,h,r,n,u,c),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}},N4=class extends ux{constructor(e,t,i,r,n,s){super(e,t,i,n,s),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=gn}},L4=class extends Bi{constructor(e,t,i,r,n,s,a,o,l){super(e,t,i,r,n,s,a,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}},Ma=class{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){let i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){let t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){let t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){let e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let t,i=[],r=this.getPoint(0),n=0;i.push(0);for(let s=1;s<=e;s++)t=this.getPoint(s/e),n+=t.distanceTo(r),i.push(n),r=t;return this.cacheArcLengths=i,i}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){let i,r=this.getLengths(),n=0,s=r.length;i=t||e*r[s-1];let a,o=0,l=s-1;for(;o<=l;)if(n=Math.floor(o+(l-o)/2),a=r[n]-i,a<0)o=n+1;else{if(!(a>0)){l=n;break}l=n-1}if(n=l,r[n]===i)return n/(s-1);let h=r[n];return(n+(i-h)/(r[n+1]-h))/(s-1)}getTangent(e,t){let i=e-1e-4,r=e+1e-4;i<0&&(i=0),r>1&&(r=1);let n=this.getPoint(i),s=this.getPoint(r),a=t||(n.isVector2?new le:new A);return a.copy(s).sub(n).normalize(),a}getTangentAt(e,t){let i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){let i=new A,r=[],n=[],s=[],a=new A,o=new Be;for(let t=0;t<=e;t++){let i=t/e;r[t]=this.getTangentAt(i,new A)}n[0]=new A,s[0]=new A;let l=Number.MAX_VALUE,h=Math.abs(r[0].x),u=Math.abs(r[0].y),c=Math.abs(r[0].z);h<=l&&(l=h,i.set(1,0,0)),u<=l&&(l=u,i.set(0,1,0)),c<=l&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),n[0].crossVectors(r[0],a),s[0].crossVectors(r[0],n[0]);for(let t=1;t<=e;t++){if(n[t]=n[t-1].clone(),s[t]=s[t-1].clone(),a.crossVectors(r[t-1],r[t]),a.length()>Number.EPSILON){a.normalize();let e=Math.acos(Qn(r[t-1].dot(r[t]),-1,1));n[t].applyMatrix4(o.makeRotationAxis(a,e))}s[t].crossVectors(r[t],n[t])}if(!0===t){let t=Math.acos(Qn(n[0].dot(n[e]),-1,1));t/=e,r[0].dot(a.crossVectors(n[0],n[e]))>0&&(t=-t);for(let i=1;i<=e;i++)n[i].applyMatrix4(o.makeRotationAxis(r[i],t*i)),s[i].crossVectors(r[i],n[i])}return{tangents:r,normals:n,binormals:s}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}},wp=class extends Ma{constructor(e=0,t=0,i=1,r=1,n=0,s=2*Math.PI,a=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=n,this.aEndAngle=s,this.aClockwise=a,this.aRotation=o}getPoint(e,t){let i=t||new le,r=2*Math.PI,n=this.aEndAngle-this.aStartAngle,s=Math.abs(n)r;)n-=r;n0?0:(Math.floor(Math.abs(l)/a)+1)*a:0===h&&l===a-1&&(l=a-2,h=1),this.closed||l>0?i=s[(l-1)%a]:(oD.subVectors(s[0],s[1]).add(s[0]),i=oD);let u=s[l%a],c=s[(l+1)%a];if(this.closed||l+2r.length-2?r.length-1:s+1],u=r[s>r.length-3?r.length-1:s+2];return i.set(iue(a,o.x,l.x,h.x,u.x),iue(a,o.y,l.y,h.y,u.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){let e=r[n]-i,s=this.curves[n],a=s.getLength(),o=0===a?0:1-e/a;return s.getPointAt(o,t)}n++}return null}getLength(){let e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let e=[],t=0;for(let i=0,r=this.curves.length;i1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){let e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);let h=l.getPoint(1);return this.currentPoint.copy(h),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}},uf=class extends lt{constructor(e=[new le(0,-.5),new le(.5,0),new le(0,.5)],t=12,i=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=Qn(r,0,2*Math.PI);let n=[],s=[],a=[],o=[],l=[],h=1/t,u=new A,c=new le,p=new A,d=new A,f=new A,m=0,g=0;for(let t=0;t<=e.length-1;t++)switch(t){case 0:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,p.x=1*g,p.y=-m,p.z=0*g,f.copy(p),p.normalize(),o.push(p.x,p.y,p.z);break;case e.length-1:o.push(f.x,f.y,f.z);break;default:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,p.x=1*g,p.y=-m,p.z=0*g,d.copy(p),p.x+=f.x,p.y+=f.y,p.z+=f.z,p.normalize(),o.push(p.x,p.y,p.z),f.copy(d)}for(let n=0;n<=t;n++){let p=i+n*h*r,d=Math.sin(p),f=Math.cos(p);for(let i=0;i<=e.length-1;i++){u.x=e[i].x*d,u.y=e[i].y,u.z=e[i].x*f,s.push(u.x,u.y,u.z),c.x=n/t,c.y=i/(e.length-1),a.push(c.x,c.y);let r=o[3*i+0]*d,h=o[3*i+1],p=o[3*i+0]*f;l.push(r,h,p)}}for(let i=0;i0&&y(!0),t>0&&y(!1)),this.setIndex(h),this.setAttribute("position",new dt(u,3)),this.setAttribute("normal",new dt(c,3)),this.setAttribute("uv",new dt(p,2))}static fromJSON(e){return new Rl(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}},wg=class extends Rl{constructor(e=1,t=1,i=32,r=1,n=!1,s=0,a=2*Math.PI){super(0,e,t,i,r,n,s,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:i,heightSegments:r,openEnded:n,thetaStart:s,thetaLength:a}}static fromJSON(e){return new wg(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}},Dc=class extends lt{constructor(e=[],t=[],i=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:i,detail:r};let n=[],s=[];function a(e,t,i,r){let n=r+1,s=[];for(let r=0;r<=n;r++){s[r]=[];let a=e.clone().lerp(i,r/n),o=t.clone().lerp(i,r/n),l=n-r;for(let e=0;e<=l;e++)s[r][e]=0===e&&r===n?a:a.clone().lerp(o,e/l)}for(let e=0;e.9&&a<.1&&(t<.2&&(s[e+0]+=1),i<.2&&(s[e+2]+=1),r<.2&&(s[e+4]+=1))}}()}(),this.setAttribute("position",new dt(n,3)),this.setAttribute("normal",new dt(n.slice(),3)),this.setAttribute("uv",new dt(s,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}static fromJSON(e){return new Dc(e.vertices,e.indices,e.radius,e.details)}},Rg=class extends Dc{constructor(e=1,t=0){let i=(1+Math.sqrt(5))/2,r=1/i;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-i,0,-r,i,0,r,-i,0,r,i,-r,-i,0,-r,i,0,r,-i,0,r,i,0,-i,0,-r,i,0,-r,-i,0,r,i,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Rg(e.radius,e.detail)}},lD=new A,cD=new A,PH=new A,uD=new hn,Rp=class extends lt{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){let i=Math.pow(10,4),r=Math.cos(gg*t),n=e.getIndex(),s=e.getAttribute("position"),a=n?n.count:s.count,o=[0,0,0],l=["a","b","c"],h=new Array(3),u={},c=[];for(let e=0;e80*i){r=s=e[0],n=a=e[1];for(let t=i;ts&&(s=o),l>a&&(a=l);h=Math.max(s-r,a-n),h=0!==h?32767/h:0}return fx(p,d,i,r,n,h,0),d}};function Rhe(e,t,i,r,n){let s,a;if(n===rvt(e,t,i,r)>0)for(s=t;s=t;s-=r)a=nue(s,e[s],e[s+1],a);return a&&lC(a,a.next)&&(gx(a),a=a.next),a}function Mg(e,t){if(!e)return e;t||(t=e);let i,r=e;do{if(i=!1,r.steiner||!lC(r,r.next)&&0!==On(r.prev,r,r.next))r=r.next;else{if(gx(r),r=t=r.prev,r===r.next)break;i=!0}}while(i||r!==t);return t}function fx(e,t,i,r,n,s,a){if(!e)return;!a&&s&&K0t(e,r,n,s);let o,l,h=e;for(;e.prev!==e.next;)if(o=e.prev,l=e.next,s?V0t(e,r,n,s):G0t(e))t.push(o.i/i|0),t.push(e.i/i|0),t.push(l.i/i|0),gx(e),e=l.next,h=l.next;else if((e=l)===h){a?1===a?fx(e=z0t(Mg(e),t,i),t,i,r,n,s,2):2===a&&j0t(e,t,i,r,n,s):fx(Mg(e),t,i,r,n,s,1);break}}function G0t(e){let t=e.prev,i=e,r=e.next;if(On(t,i,r)>=0)return!1;let n=t.x,s=i.x,a=r.x,o=t.y,l=i.y,h=r.y,u=ns?n>a?n:a:s>a?s:a,d=o>l?o>h?o:h:l>h?l:h,f=r.next;for(;f!==t;){if(f.x>=u&&f.x<=p&&f.y>=c&&f.y<=d&&My(n,o,s,l,a,h,f.x,f.y)&&On(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function V0t(e,t,i,r){let n=e.prev,s=e,a=e.next;if(On(n,s,a)>=0)return!1;let o=n.x,l=s.x,h=a.x,u=n.y,c=s.y,p=a.y,d=ol?o>h?o:h:l>h?l:h,g=u>c?u>p?u:p:c>p?c:p,y=F4(d,f,t,i,r),v=F4(m,g,t,i,r),T=e.prevZ,x=e.nextZ;for(;T&&T.z>=y&&x&&x.z<=v;){if(T.x>=d&&T.x<=m&&T.y>=f&&T.y<=g&&T!==n&&T!==a&&My(o,u,l,c,h,p,T.x,T.y)&&On(T.prev,T,T.next)>=0||(T=T.prevZ,x.x>=d&&x.x<=m&&x.y>=f&&x.y<=g&&x!==n&&x!==a&&My(o,u,l,c,h,p,x.x,x.y)&&On(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;T&&T.z>=y;){if(T.x>=d&&T.x<=m&&T.y>=f&&T.y<=g&&T!==n&&T!==a&&My(o,u,l,c,h,p,T.x,T.y)&&On(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;x&&x.z<=v;){if(x.x>=d&&x.x<=m&&x.y>=f&&x.y<=g&&x!==n&&x!==a&&My(o,u,l,c,h,p,x.x,x.y)&&On(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function z0t(e,t,i){let r=e;do{let n=r.prev,s=r.next.next;!lC(n,s)&&Mhe(n,r,r.next,s)&&mx(n,s)&&mx(s,n)&&(t.push(n.i/i|0),t.push(r.i/i|0),t.push(s.i/i|0),gx(r),gx(r.next),r=e=s),r=r.next}while(r!==e);return Mg(r)}function j0t(e,t,i,r,n,s){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&Q0t(a,e)){let o=Dhe(a,e);return a=Mg(a,a.next),o=Mg(o,o.next),fx(a,t,i,r,n,s,0),void fx(o,t,i,r,n,s,0)}e=e.next}a=a.next}while(a!==e)}function W0t(e,t,i,r){let n,s,a,o,l,h=[];for(n=0,s=t.length;n=r.next.y&&r.next.y!==r.y){let e=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=s&&e>n&&(n=e,i=r.x=r.x&&r.x>=h&&s!==r.x&&My(ai.x||r.x===i.x&&$0t(i,r)))&&(i=r,c=o)),r=r.next}while(r!==l);return i}function $0t(e,t){return On(e.prev,e,t.prev)<0&&On(t.next,e,e.next)<0}function K0t(e,t,i,r){let n=e;do{0===n.z&&(n.z=F4(n.x,n.y,t,i,r)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,Z0t(n)}function Z0t(e){let t,i,r,n,s,a,o,l,h=1;do{for(i=e,e=null,s=null,a=0;i;){for(a++,r=i,o=0,t=0;t0||l>0&&r;)0!==o&&(0===l||!r||i.z<=r.z)?(n=i,i=i.nextZ,o--):(n=r,r=r.nextZ,l--),s?s.nextZ=n:e=n,n.prevZ=s,s=n;i=r}s.nextZ=null,h*=2}while(a>1);return e}function F4(e,t,i,r,n){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-i)*n|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*n|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function J0t(e){let t=e,i=e;do{(t.x=(e-a)*(s-o)&&(e-a)*(r-o)>=(i-a)*(t-o)&&(i-a)*(s-o)>=(n-a)*(r-o)}function Q0t(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!evt(e,t)&&(mx(e,t)&&mx(t,e)&&tvt(e,t)&&(On(e.prev,e,t.prev)||On(e,t.prev,t))||lC(e,t)&&On(e.prev,e,e.next)>0&&On(t.prev,t,t.next)>0)}function On(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function lC(e,t){return e.x===t.x&&e.y===t.y}function Mhe(e,t,i,r){let n=pD(On(e,t,i)),s=pD(On(e,t,r)),a=pD(On(i,r,e)),o=pD(On(i,r,t));return!!(n!==s&&a!==o||0===n&&hD(e,i,t)||0===s&&hD(e,r,t)||0===a&&hD(i,e,r)||0===o&&hD(i,t,r))}function hD(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function pD(e){return e>0?1:e<0?-1:0}function evt(e,t){let i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&Mhe(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function mx(e,t){return On(e.prev,e,e.next)<0?On(e,t,e.next)>=0&&On(e,e.prev,t)>=0:On(e,t,e.prev)<0||On(e,e.next,t)<0}function tvt(e,t){let i=e,r=!1,n=(e.x+t.x)/2,s=(e.y+t.y)/2;do{i.y>s!=i.next.y>s&&i.next.y!==i.y&&n<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next}while(i!==e);return r}function Dhe(e,t){let i=new H4(e.i,e.x,e.y),r=new H4(t.i,t.x,t.y),n=e.next,s=t.prev;return e.next=t,t.prev=e,i.next=n,n.prev=i,r.next=i,i.prev=r,s.next=r,r.prev=s,r}function nue(e,t,i,r){let n=new H4(e,t,i);return r?(n.next=r.next,n.prev=r,r.next.prev=n,r.next=n):(n.prev=n,n.next=n),n}function gx(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function H4(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function rvt(e,t,i,r){let n=0;for(let s=t,a=i-r;s2&&e[t-1].equals(e[0])&&e.pop()}function aue(e,t){for(let i=0;iNumber.EPSILON){let c=Math.sqrt(u),p=Math.sqrt(l*l+h*h),d=t.x-o/c,f=t.y+a/c,m=((i.x-h/p-d)*h-(i.y+l/p-f)*l)/(a*h-o*l);r=d+a*m-e.x,n=f+o*m-e.y;let g=r*r+n*n;if(g<=2)return new le(r,n);s=Math.sqrt(g/2)}else{let e=!1;a>Number.EPSILON?l>Number.EPSILON&&(e=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(o)===Math.sign(h)&&(e=!0),e?(r=-o,n=a,s=Math.sqrt(u)):(r=a,n=o,s=Math.sqrt(u/2))}return new le(r/s,n/s)}let C=[];for(let e=0,t=I.length,i=t-1,r=e+1;e=0;e--){let t=e/v,i=m*Math.cos(t*Math.PI/2),r=g*Math.sin(t*Math.PI/2)+y;for(let e=0,t=I.length;e=0;){let r=i,n=i-1;n<0&&(n=e.length-1);for(let e=0,i=p+2*v;e0)&&p.push(t,n,l),(e!==i-1||o0!=e>0&&this.version++,this._sheen=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 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.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}},Es=class extends zr{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new je(16777215),this.specular=new je(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=gf,this.normalScale=new le(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Dx,this.reflectivity=1,this.refractionRatio=.98,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.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},jD=class extends zr{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new je(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=gf,this.normalScale=new le(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,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.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},pf=class extends zr{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=gf,this.normalScale=new le(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}},io=class extends zr{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new je(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=gf,this.normalScale=new le(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Dx,this.reflectivity=1,this.refractionRatio=.98,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.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},WD=class extends zr{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new je(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=gf,this.normalScale=new le(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}},Ap=class extends vr{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}};function xl(e,t,i){return zU(e)?new e.constructor(e.subarray(t,void 0!==i?i:e.length)):e.slice(t,i)}function fg(e,t,i){return!e||!i&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)}function zU(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Che(e){let t=e.length,i=new Array(t);for(let e=0;e!==t;++e)i[e]=e;return i.sort((function(t,i){return e[t]-e[i]})),i}function U4(e,t,i){let r=e.length,n=new e.constructor(r);for(let s=0,a=0;a!==r;++s){let r=i[s]*t;for(let i=0;i!==t;++i)n[a++]=e[r+i]}return n}function jU(e,t,i,r){let n=1,s=e[0];for(;void 0!==s&&void 0===s[r];)s=e[n++];if(void 0===s)return;let a=s[r];if(void 0!==a)if(Array.isArray(a))do{a=s[r],void 0!==a&&(t.push(s.time),i.push.apply(i,a)),s=e[n++]}while(void 0!==s);else if(void 0!==a.toArray)do{a=s[r],void 0!==a&&(t.push(s.time),a.toArray(i,i.length)),s=e[n++]}while(void 0!==s);else do{a=s[r],void 0!==a&&(t.push(s.time),i.push(a)),s=e[n++]}while(void 0!==s)}function avt(e,t,i,r,n=30){let s=e.clone();s.name=t;let a=[];for(let e=0;e=r)){l.push(t.times[e]);for(let i=0;is.tracks[e].times[0]&&(o=s.tracks[e].times[0]);for(let e=0;e=r.times[p]){let e=p*l+o,t=e+l-o;c=xl(r.values,e,t)}else{let e=r.createInterpolant(),t=o,i=l-o;e.evaluate(s),c=xl(e.resultBuffer,t,i)}"quaternion"===n&&(new Hr).fromArray(c).normalize().conjugate().toArray(c);let d=a.times.length;for(let e=0;e=n)break e;{let a=t[1];e=n)break t}s=i,i=0}}for(;i>>1;et;)--s;if(++s,0!==n||s!==r){n>=s&&(s=Math.max(s,1),n=s-1);let e=this.getValueSize();this.times=xl(i,n,s),this.values=xl(this.values,n*e,s*e)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);let i=this.times,r=this.values,n=i.length;0===n&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let t=0;t!==n;t++){let r=i[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==s&&s>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,s),e=!1;break}s=r}if(void 0!==r&&zU(r))for(let t=0,i=r.length;t!==i;++t){let i=r[t];if(isNaN(i)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,i),e=!1;break}}return e}optimize(){let e=xl(this.times),t=xl(this.values),i=this.getValueSize(),r=this.getInterpolation()===SD,n=e.length-1,s=1;for(let a=1;a0){e[s]=e[n];for(let e=n*i,r=s*i,a=0;a!==i;++a)t[r+a]=t[e+a];++s}return s!==e.length?(this.times=xl(e,0,s),this.values=xl(t,0,s*i)):(this.times=e,this.values=t),this}clone(){let e=xl(this.times,0),t=xl(this.values,0),i=new(0,this.constructor)(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}};Go.prototype.TimeBufferType=Float32Array,Go.prototype.ValueBufferType=Float32Array,Go.prototype.DefaultInterpolation=Hu;var Pp=class extends Go{};Pp.prototype.ValueTypeName="bool",Pp.prototype.ValueBufferType=Array,Pp.prototype.DefaultInterpolation=Ep,Pp.prototype.InterpolantFactoryMethodLinear=void 0,Pp.prototype.InterpolantFactoryMethodSmooth=void 0;var yx=class extends Go{};yx.prototype.ValueTypeName="color";var Cc=class extends Go{};Cc.prototype.ValueTypeName="number";var XD=class extends Op{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){let n=this.resultBuffer,s=this.sampleValues,a=this.valueSize,o=(i-t)/(r-t),l=e*a;for(let e=l+a;l!==e;l+=4)Hr.slerpFlat(n,0,s,l-a,s,l,o);return n}},Da=class extends Go{InterpolantFactoryMethodLinear(e){return new XD(this.times,this.values,this.getValueSize(),e)}};Da.prototype.ValueTypeName="quaternion",Da.prototype.DefaultInterpolation=Hu,Da.prototype.InterpolantFactoryMethodSmooth=void 0;var Np=class extends Go{};Np.prototype.ValueTypeName="string",Np.prototype.ValueBufferType=Array,Np.prototype.DefaultInterpolation=Ep,Np.prototype.InterpolantFactoryMethodLinear=void 0,Np.prototype.InterpolantFactoryMethodSmooth=void 0;var no=class extends Go{};no.prototype.ValueTypeName="vector";var so=class{constructor(e,t=-1,i,r=aC){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=Ho(),this.duration<0&&this.resetDuration()}static parse(e){let t=[],i=e.tracks,r=1/(e.fps||1);for(let e=0,n=i.length;e!==n;++e)t.push(uvt(i[e]).scale(r));let n=new this(e.name,e.duration,t,e.blendMode);return n.uuid=e.uuid,n}static toJSON(e){let t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,r=i.length;e!==r;++e)t.push(Go.toJSON(i[e]));return r}static CreateFromMorphTargetSequence(e,t,i,r){let n=t.length,s=[];for(let e=0;e1){let e=s[1],t=r[e];t||(r[e]=t=[]),t.push(i)}}let s=[];for(let e in r)s.push(this.CreateFromMorphTargetSequence(e,r[e],t,i));return s}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let i=function(e,t,i,r,n){if(0!==i.length){let s=[],a=[];jU(i,s,a,r),0!==s.length&&n.push(new e(t,s,a))}},r=[],n=e.name||"default",s=e.fps||30,a=e.blendMode,o=e.length||-1,l=e.hierarchy||[];for(let e=0;e{t&&t(n),this.manager.itemEnd(e)}),0),n;if(void 0!==pp[e])return void pp[e].push({onLoad:t,onProgress:i,onError:r});pp[e]=[],pp[e].push({onLoad:t,onProgress:i,onError:r});let s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,o=this.responseType;fetch(s).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;let i=pp[e],r=t.body.getReader(),n=t.headers.get("Content-Length")||t.headers.get("X-File-Size"),s=n?parseInt(n):0,a=0!==s,o=0,l=new ReadableStream({start(e){!function t(){r.read().then((({done:r,value:n})=>{if(r)e.close();else{o+=n.byteLength;let r=new ProgressEvent("progress",{lengthComputable:a,loaded:o,total:s});for(let e=0,t=i.length;e{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,a)));case"json":return e.json();default:if(void 0===a)return e.text();{let t=/charset="?([^;"\s]*)"?/i.exec(a),i=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(i);return e.arrayBuffer().then((e=>r.decode(e)))}}})).then((t=>{Ng.add(e,t);let i=pp[e];delete pp[e];for(let e=0,r=i.length;e{let i=pp[e];if(void 0===i)throw this.manager.itemError(e),t;delete pp[e];for(let e=0,r=i.length;e{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}},k4=class extends ci{constructor(e){super(e)}load(e,t,i,r){let n=this,s=new ui(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,(function(i){try{t(n.parse(JSON.parse(i)))}catch(t){r?r(t):console.error(t),n.manager.itemError(e)}}),i,r)}parse(e){let t=[];for(let i=0;i0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(let t in e.uniforms){let n=e.uniforms[t];switch(r.uniforms[t]={},n.type){case"t":r.uniforms[t].value=i(n.value);break;case"c":r.uniforms[t].value=(new je).setHex(n.value);break;case"v2":r.uniforms[t].value=(new le).fromArray(n.value);break;case"v3":r.uniforms[t].value=(new A).fromArray(n.value);break;case"v4":r.uniforms[t].value=(new Gr).fromArray(n.value);break;case"m3":r.uniforms[t].value=(new Pi).fromArray(n.value);break;case"m4":r.uniforms[t].value=(new Be).fromArray(n.value);break;default:r.uniforms[t].value=n.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(r.glslVersion=e.glslVersion),void 0!==e.extensions)for(let t in e.extensions)r.extensions[t]=e.extensions[t];if(void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=i(e.map)),void 0!==e.matcap&&(r.matcap=i(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=i(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=i(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=i(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=(new le).fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=i(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=i(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=i(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=i(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=i(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=i(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=i(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=i(e.envMap)),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=i(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=i(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=i(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=i(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new le).fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(r.iridescenceMap=i(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(r.transmissionMap=i(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=i(e.thicknessMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=i(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){return new{ShadowMaterial:VD,SpriteMaterial:bg,RawShaderMaterial:zD,ShaderMaterial:Yt,PointsMaterial:jn,MeshPhysicalMaterial:Ml,MeshStandardMaterial:Gu,MeshPhongMaterial:Es,MeshToonMaterial:jD,MeshNormalMaterial:pf,MeshLambertMaterial:io,MeshDepthMaterial:Ip,MeshDistanceMaterial:cx,MeshBasicMaterial:or,MeshMatcapMaterial:WD,LineDashedMaterial:Ap,LineBasicMaterial:vr,Material:zr}[e]}},Bs=class{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let i=0,r=e.length;i0){let r=new Lp(t);i=new Lg(r),i.setCrossOrigin(this.crossOrigin);for(let t=0,i=e.length;t0){t=new Lg(this.manager),t.setCrossOrigin(this.crossOrigin);for(let t=0,i=e.length;t0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,r,this._addIndex*t,1,t);for(let e=t,n=t+t;e!==n;++e)if(i[e]!==i[e+t]){a.setValue(i,r);break}}saveOriginalState(){let e=this.binding,t=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(t,r);for(let e=i,n=r;e!==n;++e)t[e]=t[r+e%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let r=0;r!==n;++r)e[t+r]=e[i+r]}_slerp(e,t,i,r){Hr.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,n){let s=this._workIndex*n;Hr.multiplyQuaternionsFlat(e,s,e,t,e,i),Hr.slerpFlat(e,t,e,t,e,s,r)}_lerp(e,t,i,r,n){let s=1-r;for(let a=0;a!==n;++a){let n=t+a;e[n]=e[n]*s+e[i+a]*r}}_lerpAdditive(e,t,i,r,n){for(let s=0;s!==n;++s){let n=t+s;e[n]=e[n]+e[i+s]*r}}},WU="\\[\\]\\.:\\/",fvt=new RegExp("["+WU+"]","g"),qU="[^"+WU+"]",mvt="[^"+WU.replace("\\.","")+"]",gvt=/((?:WC+[\/:])*)/.source.replace("WC",qU),vvt=/(WCOD+)?/.source.replace("WCOD",mvt),yvt=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",qU),Tvt=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",qU),Evt=new RegExp("^"+gvt+vvt+yvt+Tvt+"$"),bvt=["material","materials","bones","map"],Q4=class{constructor(e,t,i){let r=i||Rr.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();let i=this._targetGroup.nCachedObjects_,r=this._bindings[i];void 0!==r&&r.getValue(e,t)}setValue(e,t){let i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,n=i.length;r!==n;++r)i[r].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}},Rr=class{constructor(e,t,i){this.path=t,this.parsedPath=i||Rr.parseTrackName(t),this.node=Rr.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new Rr.Composite(e,t,i):new Rr(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(fvt,"")}static parseTrackName(e){let t=Evt.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);let i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){let e=i.nodeName.substring(r+1);-1!==bvt.indexOf(e)&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=e)}if(null===i.propertyName||0===i.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){let i=e.skeleton.getBoneByName(t);if(void 0!==i)return i}if(e.children){let i=function(e){for(let r=0;r=n){let s=n++,h=e[s];t[h.uuid]=l,e[l]=h,t[o]=s,e[s]=a;for(let e=0,t=r;e!==t;++e){let t=i[e],r=t[s],n=t[l];t[l]=r,t[s]=n}}}this.nCachedObjects_=n}uncache(){let e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length,n=this.nCachedObjects_,s=e.length;for(let a=0,o=arguments.length;a!==o;++a){let o=arguments[a].uuid,l=t[o];if(void 0!==l)if(delete t[o],l0&&(t[a.uuid]=l),e[l]=a,e.pop();for(let e=0,t=r;e!==t;++e){let t=i[e];t[l]=t[n],t.pop()}}}this.nCachedObjects_=n}subscribe_(e,t){let i=this._bindingsIndicesByPath,r=i[e],n=this._bindings;if(void 0!==r)return n[r];let s=this._paths,a=this._parsedPaths,o=this._objects,l=o.length,h=this.nCachedObjects_,u=new Array(l);r=n.length,i[e]=r,s.push(e),a.push(t),n.push(u);for(let i=h,r=o.length;i!==r;++i){let r=o[i];u[i]=new Rr(r,e,t)}return u}unsubscribe_(e){let t=this._bindingsIndicesByPath,i=t[e];if(void 0!==i){let r=this._paths,n=this._parsedPaths,s=this._bindings,a=s.length-1,o=s[a];t[e[a]]=i,s[i]=o,s.pop(),n[i]=n[a],n.pop(),r[i]=r[a],r.pop()}}},tU=class{constructor(e,t,i=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=r;let n=t.tracks,s=n.length,a=new Array(s),o={endingStart:pg,endingEnd:pg};for(let e=0;e!==s;++e){let t=n[e].createInterpolant(null);a[e]=t,t.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=hhe,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){let i=this._clip.duration,r=e._clip.duration,n=r/i,s=i/r;e.warp(1,n,t),this.warp(s,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}stopFading(){let e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){let r=this._mixer,n=r.time,s=this.timeScale,a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);let o=a.parameterPositions,l=a.sampleValues;return o[0]=n,o[1]=n+i,l[0]=e/s,l[1]=t/s,this}stopWarping(){let e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,r){if(!this.enabled)return void this._updateWeight(e);let n=this._startTime;if(null!==n){let r=(e-n)*i;r<0||0===i?t=0:(this._startTime=null,t=i*r)}t*=this._updateTimeScale(e);let s=this._updateTime(t),a=this._updateWeight(e);if(a>0){let e=this._interpolants,t=this._propertyBindings;if(this.blendMode===HU)for(let i=0,r=e.length;i!==r;++i)e[i].evaluate(s),t[i].accumulateAdditive(a);else for(let i=0,n=e.length;i!==n;++i)e[i].evaluate(s),t[i].accumulate(r,a)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let i=this._weightInterpolant;if(null!==i){let r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let i=this._timeScaleInterpolant;if(null!==i){t*=i.evaluate(e)[0],e>i.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,i=this.loop,r=this.time+e,n=this._loopCount,s=i===phe;if(0===e)return-1===n?r:s&&1==(1&n)?t-r:r;if(i===uhe){-1===n&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===n&&(e>=0?(n=0,this._setEndings(!0,0===this.repetitions,s)):this._setEndings(0===this.repetitions,!0,s)),r>=t||r<0){let i=Math.floor(r/t);r-=t*i,n+=Math.abs(i);let a=this.repetitions-n;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===a){let t=e<0;this._setEndings(t,!t,s)}else this._setEndings(!1,!1,s);this._loopCount=n,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:i})}}else this.time=r;if(s&&1==(1&n))return t-r}return r}_setEndings(e,t,i){let r=this._interpolantSettings;i?(r.endingStart=dg,r.endingEnd=dg):(r.endingStart=e?this.zeroSlopeAtStart?dg:pg:rx,r.endingEnd=t?this.zeroSlopeAtEnd?dg:pg:rx)}_scheduleFading(e,t,i){let r=this._mixer,n=r.time,s=this._weightInterpolant;null===s&&(s=r._lendControlInterpolant(),this._weightInterpolant=s);let a=s.parameterPositions,o=s.sampleValues;return a[0]=n,o[0]=t,a[1]=n+e,o[1]=i,this}},xvt=new Float32Array(1),rU=class extends Bo{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){let i=e._localRoot||this._root,r=e._clip.tracks,n=r.length,s=e._propertyBindings,a=e._interpolants,o=i.uuid,l=this._bindingsByRootAndName,h=l[o];void 0===h&&(h={},l[o]=h);for(let e=0;e!==n;++e){let n=r[e],l=n.name,u=h[l];if(void 0!==u)++u.referenceCount,s[e]=u;else{if(u=s[e],void 0!==u){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,o,l));continue}let r=t&&t._propertyBindings[e].binding.parsedPath;u=new eC(Rr.create(i,l,r),n.ValueTypeName,n.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,o,l),s[e]=u}a[e].resultBuffer=u.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){let t=(e._localRoot||this._root).uuid,i=e._clip.uuid,r=this._actionsByClip[i];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,i,t)}let t=e._propertyBindings;for(let e=0,i=t.length;e!==i;++e){let i=t[e];0==i.useCount++&&(this._lendBinding(i),i.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let e=0,i=t.length;e!==i;++e){let i=t[e];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return null!==t&&t=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;let t=this._actions,i=this._nActiveActions,r=this.time+=e,n=Math.sign(e),s=this._accuIndex^=1;for(let a=0;a!==i;++a)t[a]._update(r,e,n,s);let a=this._bindings,o=this._nActiveBindings;for(let e=0;e!==o;++e)a[e].apply(s);return this}setTime(e){this.time=0;for(let e=0;ethis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Eue.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}},bue=new A,fD=new A,Ca=class{constructor(e=new A,t=new A){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){bue.subVectors(e,this.start),fD.subVectors(this.end,this.start);let i=fD.dot(fD),r=fD.dot(bue)/i;return t&&(r=Qn(r,0,1)),r}closestPointToPoint(e,t,i){let r=this.closestPointToPointParameter(e,t);return this.delta(i).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)}},xue=new A,lU=class extends cr{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";let i=new lt,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1,i=32;e1)for(let i=0;i.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{Rue.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Rue,t)}}setLength(e,t=.2*e,i=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},mU=class extends li{constructor(e=1){let t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=new lt;i.setAttribute("position",new dt(t,3)),i.setAttribute("color",new dt([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(i,new vr({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,i){let r=new je,n=this.geometry.attributes.color.array;return r.set(e),r.toArray(n,0),r.toArray(n,3),r.set(t),r.toArray(n,6),r.toArray(n,9),r.set(i),r.toArray(n,12),r.toArray(n,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},Rx=class{constructor(){this.type="ShapePath",this.color=new je,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new ku,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,r){return this.currentPath.quadraticCurveTo(e,t,i,r),this}bezierCurveTo(e,t,i,r,n,s){return this.currentPath.bezierCurveTo(e,t,i,r,n,s),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(e,t){let i=t.length,r=!1;for(let n=i-1,s=0;sNumber.EPSILON){if(l<0&&(i=t[s],o=-o,a=t[n],l=-l),e.ya.y)continue;if(e.y===i.y){if(e.x===i.x)return!0}else{let t=l*(e.x-i.x)-o*(e.y-i.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==i.y)continue;if(a.x<=e.x&&e.x<=i.x||i.x<=e.x&&e.x<=a.x)return!0}}return r}let i=es.isClockWise,r=this.subPaths;if(0===r.length)return[];let n,s,a,o=[];if(1===r.length)return s=r[0],a=new Qa,a.curves=s.curves,o.push(a),o;let l=!i(r[0].getPoints());l=e?!l:l;let h,u,c=[],p=[],d=[],f=0;p[f]=void 0,d[f]=[];for(let t=0,a=r.length;t1){let e=!1,i=0;for(let e=0,t=p.length;e0&&!1===e&&(d=c)}for(let e=0,t=p.length;e>-t-14,r[256|e]=1024>>-t-14|32768,n[e]=-t-1,n[256|e]=-t-1):t<=15?(r[e]=t+15<<10,r[256|e]=t+15<<10|32768,n[e]=13,n[256|e]=13):t<128?(r[e]=31744,r[256|e]=64512,n[e]=24,n[256|e]=24):(r[e]=31744,r[256|e]=64512,n[e]=13,n[256|e]=13)}let s=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,i=0;for(;!(8388608&t);)t<<=1,i-=8388608;t&=-8388609,i+=947912704,s[e]=t|i}for(let e=1024;e<2048;++e)s[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)a[e]=e<<23;a[31]=1199570944,a[32]=2147483648;for(let e=33;e<63;++e)a[e]=2147483648+(e-32<<23);a[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(o[e]=1024);return{floatView:t,uint32View:i,baseTable:r,shiftTable:n,mantissaTable:s,exponentTable:a,offsetTable:o}}function wvt(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=Qn(e,-65504,65504),dp.floatView[0]=e;let t=dp.uint32View[0],i=t>>23&511;return dp.baseTable[i]+((8388607&t)>>dp.shiftTable[i])}function Rvt(e){let t=e>>10;return dp.uint32View[0]=dp.mantissaTable[dp.offsetTable[t]+(1023&e)]+dp.exponentTable[t],dp.floatView[0]}var Yy=Object.freeze({__proto__:null,fromHalfFloat:Rvt,toHalfFloat:wvt}),gU=class extends eo{constructor(e,t,i,r,n,s){console.warn("THREE.BoxBufferGeometry has been renamed to THREE.BoxGeometry."),super(e,t,i,r,n,s)}},vU=class extends _g{constructor(e,t,i,r){console.warn("THREE.CapsuleBufferGeometry has been renamed to THREE.CapsuleGeometry."),super(e,t,i,r)}},yU=class extends Sg{constructor(e,t,i,r){console.warn("THREE.CircleBufferGeometry has been renamed to THREE.CircleGeometry."),super(e,t,i,r)}},TU=class extends wg{constructor(e,t,i,r,n,s,a){console.warn("THREE.ConeBufferGeometry has been renamed to THREE.ConeGeometry."),super(e,t,i,r,n,s,a)}},EU=class extends Rl{constructor(e,t,i,r,n,s,a,o){console.warn("THREE.CylinderBufferGeometry has been renamed to THREE.CylinderGeometry."),super(e,t,i,r,n,s,a,o)}},bU=class extends Rg{constructor(e,t){console.warn("THREE.DodecahedronBufferGeometry has been renamed to THREE.DodecahedronGeometry."),super(e,t)}},xU=class extends Mp{constructor(e,t){console.warn("THREE.ExtrudeBufferGeometry has been renamed to THREE.ExtrudeGeometry."),super(e,t)}},IU=class extends Dg{constructor(e,t){console.warn("THREE.IcosahedronBufferGeometry has been renamed to THREE.IcosahedronGeometry."),super(e,t)}},_U=class extends uf{constructor(e,t,i,r){console.warn("THREE.LatheBufferGeometry has been renamed to THREE.LatheGeometry."),super(e,t,i,r)}},SU=class extends hf{constructor(e,t){console.warn("THREE.OctahedronBufferGeometry has been renamed to THREE.OctahedronGeometry."),super(e,t)}},wU=class extends ts{constructor(e,t,i,r){console.warn("THREE.PlaneBufferGeometry has been renamed to THREE.PlaneGeometry."),super(e,t,i,r)}},RU=class extends Dc{constructor(e,t,i,r){console.warn("THREE.PolyhedronBufferGeometry has been renamed to THREE.PolyhedronGeometry."),super(e,t,i,r)}},MU=class extends Cg{constructor(e,t,i,r,n,s){console.warn("THREE.RingBufferGeometry has been renamed to THREE.RingGeometry."),super(e,t,i,r,n,s)}},DU=class extends Dp{constructor(e,t){console.warn("THREE.ShapeBufferGeometry has been renamed to THREE.ShapeGeometry."),super(e,t)}},CU=class extends ro{constructor(e,t,i,r,n,s,a){console.warn("THREE.SphereBufferGeometry has been renamed to THREE.SphereGeometry."),super(e,t,i,r,n,s,a)}},AU=class extends Ag{constructor(e,t){console.warn("THREE.TetrahedronBufferGeometry has been renamed to THREE.TetrahedronGeometry."),super(e,t)}},OU=class extends Cp{constructor(e,t,i,r,n){console.warn("THREE.TorusBufferGeometry has been renamed to THREE.TorusGeometry."),super(e,t,i,r,n)}},PU=class extends Og{constructor(e,t,i,r,n,s){console.warn("THREE.TorusKnotBufferGeometry has been renamed to THREE.TorusKnotGeometry."),super(e,t,i,r,n,s)}},NU=class extends Pg{constructor(e,t,i,r,n){console.warn("THREE.TubeBufferGeometry has been renamed to THREE.TubeGeometry."),super(e,t,i,r,n)}};"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:tC}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=tC);var zu=new Wi,Ohe=new A,Phe=new A,Nhe=new A,Lhe=new A;function cC(e,t,i,r,n,s,a){if(Ohe.fromBufferAttribute(t,r).applyMatrix4(e.matrixWorld),Phe.fromBufferAttribute(t,n).applyMatrix4(e.matrixWorld),i.ray.distanceSqToSegment(Ohe,Phe,Lhe,Nhe)>s)return!1;let o=i.ray.origin.distanceTo(Lhe);return!(oi.far)&&(a.push({distance:o,point:Nhe.clone(),index:r,object:e}),!0)}Ir.prototype.raycast=function(e,t){let i=this.geometry,r=this.matrixWorld,n=e.params.Line.threshold,s=i.drawRange;if(null===i.boundingSphere&&i.computeBoundingSphere(),zu.copy(i.boundingSphere),zu.applyMatrix4(r),zu.radius+=n,!1===e.ray.intersectsSphere(zu))return;let a=n*n,o=this.isLineSegments?2:1,l=i.index,h=i.attributes.position,u=t.length;if(null!==l){let i=this.userData.batches;if(i&&i.length>0&&i[0].boundingSphere)for(let n=0;n=1))return}}else{for(let i=Math.max(0,s.start),r=Math.min(l.count,s.start+s.count)-1;i=1))return}}}else{let i=this.userData.batches;if(i&&i.length>0&&i[0].boundingSphere)for(let n=0;n=1)return}else{for(let i=Math.max(0,s.start),r=Math.min(h.count,s.start+s.count)-1;i=1)return}}};var Fhe=Math.pow(2,-24),kg=class{constructor(){}};function Nl(e,t,i){return i.min.x=t[e],i.min.y=t[e+1],i.min.z=t[e+2],i.max.x=t[e+3],i.max.y=t[e+4],i.max.z=t[e+5],i}function YU(e){let t=-1,i=-1/0;for(let r=0;r<3;r++){let n=e[r+3]-e[r];n>i&&(i=n,t=r)}return t}function XU(e,t){t.set(e)}function $U(e,t,i){let r,n;for(let s=0;s<3;s++){let a=s+3;r=e[s],n=t[s],i[s]=rn?r:n}}function Ox(e,t,i){for(let r=0;r<3;r++){let n=t[e+2*r],s=t[e+2*r+1],a=n-s,o=n+s;ai[r+3]&&(i[r+3]=o)}}function Xy(e){let t=e[3]-e[0],i=e[4]-e[1],r=e[5]-e[2];return 2*(t*i+i*r+r*t)}function Cvt(e,t){if(!e.index){let i,r=e.attributes.position.count,n=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;i=r>65535?new Uint32Array(new n(4*r)):new Uint16Array(new n(2*r)),e.setIndex(new Wt(i,1));for(let e=0;ee-t));for(let e=0;el&&(l=v),y&&tf&&(f=t);let T=e[r+2],x=e[r+3],b=T-x,_=T+x;bh&&(h=_),y&&Tm&&(m=T);let E=e[r+4],w=e[r+5],S=E-w,I=E+w;Su&&(u=I),y&&Eg&&(g=E)}r[0]=s,r[1]=a,r[2]=o,r[3]=l,r[4]=h,r[5]=u,y&&(n[0]=c,n[1]=p,n[2]=d,n[3]=f,n[4]=m,n[5]=g)}function Ovt(e,t,i,r){let n=1/0,s=1/0,a=1/0,o=-1/0,l=-1/0,h=-1/0;for(let r=6*t,u=6*(t+i);ro&&(o=t);let i=e[r+2];il&&(l=i);let u=e[r+4];uh&&(h=u)}r[0]=n,r[1]=s,r[2]=a,r[3]=o,r[4]=l,r[5]=h}function Pvt(e,t,i,r,n){let s=i,a=i+r-1,o=n.pos,l=2*n.axis;for(;;){for(;s<=a&&t[6*s+l]=o;)a--;if(!(se.candidate-t.candidate,vf=new Array(Hp).fill().map((()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0}))),uC=new Float32Array(6);function Lvt(e,t,i,r,n,s){let a=-1,o=0;if(0===s)a=YU(t),-1!==a&&(o=(t[a]+t[a+3])/2);else if(1===s)a=YU(e),-1!==a&&(o=Fvt(i,r,n,a));else if(2===s){let s=Xy(e),l=1.25*n,h=6*r,u=6*(r+n);for(let e=0;e<3;e++){let r=t[e],c=(t[e+3]-r)/Hp;if(n=s.candidate?Ox(r,i,s.rightCacheBounds):(Ox(r,i,s.leftCacheBounds),s.count++)}}for(let i=0;i=Hp&&(n=Hp-1);let s=vf[n];s.count++,Ox(t,i,s.bounds)}let t=vf[Hp-1];XU(t.bounds,t.rightCacheBounds);for(let e=Hp-2;e>=0;e--){let t=vf[e],i=vf[e+1];$U(t.bounds,i.rightCacheBounds,t.rightCacheBounds)}let p=0;for(let t=0;tm&&(m=l),h>m&&(m=h);let g=(m-d)/2,y=2*e;s[f+y+0]=d+g,s[f+y+1]=g+(Math.abs(d)+g)*Fhe,dt[e+3]&&(t[e+3]=m)}}return s}function Uvt(e,t){function i(e){p&&p(e/d)}function r(t,n,p,d=null,m=0){if(!f&&m>=l&&(f=!0,h&&(console.warn(`MeshBVH: Max depth of ${l} reached when generating BVH. Consider increasing maxDepth.`),console.warn(e))),p<=u||m>=l)return i(n+p),t.offset=n,t.count=p,t;let g=Lvt(t.boundingData,d,a,n,p,c);if(-1===g.axis)return i(n+p),t.offset=n,t.count=p,t;let y=Pvt(o,a,n,p,g);if(y===n||y===n+p)i(n+p),t.offset=n,t.count=p;else{t.splitAxis=g.axis;let e=new kg,i=n,o=y-n;t.left=e,e.boundingData=new Float32Array(6),ZU(a,i,o,e.boundingData,s),r(e,i,o,s,m+1);let l=new kg,h=y,u=p-o;t.right=l,l.boundingData=new Float32Array(6),ZU(a,h,u,l.boundingData,s),r(l,h,u,s,m+1)}return t}Cvt(e,t);let n=new Float32Array(6),s=new Float32Array(6),a=Hvt(e,n),o=e.index.array,l=t.maxDepth,h=t.verbose,u=t.maxLeafTris,c=t.strategy,p=t.onProgress,d=e.index.count/3,f=!1,m=[],g=Avt(e);if(1===g.length){let e=g[0],t=new kg;t.boundingData=n,Ovt(a,e.offset,e.count,s),r(t,e.offset,e.count,s),m.push(t)}else for(let e of g){let t=new kg;t.boundingData=new Float32Array(6),ZU(a,e.offset,e.count,t.boundingData,s),r(t,e.offset,e.count,s),m.push(t)}return m}function Bhe(e,t){let i,r,n,s=Uvt(e,t),a=[],o=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let e=0;eMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return r[s+6]=i/4,i=h(i,a),r[s+7]=o,i}}}var oo=class{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,t){let i=1/0,r=-1/0;for(let n=0,s=e.length;nr?s:r}this.min=i,this.max=r}setFromPoints(e,t){let i=1/0,r=-1/0;for(let n=0,s=t.length;nr?a:r}this.min=i,this.max=r}isSeparated(e){return this.min>e.max||e.min>this.max}};oo.prototype.setFromBox=function(){let e=new A;return function(t,i){let r=i.min,n=i.max,s=1/0,a=-1/0;for(let i=0;i<=1;i++)for(let o=0;o<=1;o++)for(let l=0;l<=1;l++){e.x=r.x*i+n.x*(1-i),e.y=r.y*o+n.y*(1-o),e.z=r.z*l+n.z*(1-l);let h=t.dot(e);s=Math.min(h,s),a=Math.max(h,a)}this.min=s,this.max=a}}();var sjt=function(){let e=new oo;return function(t,i){let r=t.points,n=t.satAxes,s=t.satBounds,a=i.points,o=i.satAxes,l=i.satBounds;for(let t=0;t<3;t++){let i=s[t],r=n[t];if(e.setFromPoints(r,a),i.isSeparated(e))return!1}for(let t=0;t<3;t++){let i=l[t],n=o[t];if(e.setFromPoints(n,r),i.isSeparated(e))return!1}}}(),Bvt=function(){let e=new A,t=new A,i=new A;return function(r,n,s){let a=r.start,o=e,l=n.start,h=t;i.subVectors(a,l),e.subVectors(r.end,r.start),t.subVectors(n.end,n.start);let u,c,p=i.dot(h),d=h.dot(o),f=h.dot(h),m=i.dot(o),g=o.dot(o)*f-d*d;u=0!==g?(p*d-m*f)/g:0,c=(p+u*d)/f,s.x=u,s.y=c}}(),Px=function(){let e=new le,t=new A,i=new A;return function(r,n,s,a){Bvt(r,n,e);let o=e.x,l=e.y;if(o>=0&&o<=1&&l>=0&&l<=1)return r.at(o,s),void n.at(l,a);if(o>=0&&o<=1)return l<0?n.at(0,a):n.at(1,a),void r.closestPointToPoint(a,!0,s);if(l>=0&&l<=1)return o<0?r.at(0,s):r.at(1,s),void n.closestPointToPoint(s,!0,a);{let e,h;e=o<0?r.start:r.end,h=l<0?n.start:n.end;let u=t,c=i;return r.closestPointToPoint(h,!0,t),n.closestPointToPoint(e,!0,i),u.distanceToSquared(h)<=c.distanceToSquared(e)?(s.copy(u),void a.copy(h)):(s.copy(e),void a.copy(c))}}}(),khe=function(){let e=new A,t=new A,i=new bi,r=new Ca;return function(n,s){let{radius:a,center:o}=n,{a:l,b:h,c:u}=s;if(r.start=l,r.end=h,r.closestPointToPoint(o,!0,e).distanceTo(o)<=a||(r.start=l,r.end=u,r.closestPointToPoint(o,!0,e).distanceTo(o)<=a)||(r.start=h,r.end=u,r.closestPointToPoint(o,!0,e).distanceTo(o)<=a))return!0;let c=s.getPlane(i);if(Math.abs(c.distanceToPoint(o))<=a){let e=c.projectPoint(o,t);if(s.containsPoint(e))return!0}return!1}}(),kvt=1e-15;function $y(e){return Math.abs(e)new A)),this.satBounds=new Array(4).fill().map((()=>new oo)),this.points=[this.a,this.b,this.c],this.sphere=new Wi,this.plane=new bi,this.needsUpdate=!0}intersectsSphere(e){return khe(e,this)}update(){let e=this.a,t=this.b,i=this.c,r=this.points,n=this.satAxes,s=this.satBounds,a=n[0],o=s[0];this.getNormal(a),o.setFromPoints(a,r);let l=n[1],h=s[1];l.subVectors(e,t),h.setFromPoints(l,r);let u=n[2],c=s[2];u.subVectors(t,i),c.setFromPoints(u,r);let p=n[3],d=s[3];p.subVectors(i,e),d.setFromPoints(p,r),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(a,e),this.needsUpdate=!1}};lo.prototype.closestPointToSegment=function(){let e=new A,t=new A,i=new Ca;return function(r,n=null,s=null){let a,{start:o,end:l}=r,h=this.points,u=1/0;for(let o=0;o<3;o++){let l=(o+1)%3;i.start.copy(h[o]),i.end.copy(h[l]),Px(i,r,e,t),a=e.distanceToSquared(t),a1-1e-10){let e=this.satBounds,a=this.satAxes;i[0]=p.a,i[1]=p.b,i[2]=p.c;for(let t=0;t<4;t++){let n=e[t],s=a[t];if(r.setFromPoints(s,i),n.isSeparated(r))return!1}let o=p.satBounds,l=p.satAxes;t[0]=this.a,t[1]=this.b,t[2]=this.c;for(let e=0;e<4;e++){let i=o[e],n=l[e];if(r.setFromPoints(n,t),i.isSeparated(r))return!1}for(let e=0;e<4;e++){let o=a[e];for(let e=0;e<4;e++){let a=l[e];if(s.crossVectors(o,a),r.setFromPoints(s,t),n.setFromPoints(s,i),r.isSeparated(n))return!1}}return d&&(f||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),d.start.set(0,0,0),d.end.set(0,0,0)),!0}{let e=this.points,t=!1,i=0;for(let r=0;r<3;r++){let n=e[r],s=e[(r+1)%3];h.start.copy(n),h.end.copy(s),h.delta(a);let o=t?u.start:u.end,l=$y(g.distanceToPoint(n));if($y(g.normal.dot(a))&&l){u.copy(h),i=2;break}if((g.intersectLine(h,o)||l)&&!$y(o.distanceTo(s))){if(i++,t)break;t=!0}}if(1===i&&p.containsPoint(u.end))return d&&(d.start.copy(u.end),d.end.copy(u.end)),!0;if(2!==i)return!1;let r=p.points,n=!1,s=0;for(let e=0;e<3;e++){let t=r[e],i=r[(e+1)%3];h.start.copy(t),h.end.copy(i),h.delta(o);let a=n?c.start:c.end,l=$y(m.distanceToPoint(t));if($y(m.normal.dot(o))&&l){c.copy(h),s=2;break}if((m.intersectLine(h,a)||l)&&!$y(a.distanceTo(i))){if(s++,n)break;n=!0}}if(1===s&&this.containsPoint(c.end))return d&&(d.start.copy(c.end),d.end.copy(c.end)),!0;if(2!==s)return!1;if(u.delta(a),c.delta(o),a.dot(o)<0){let e=c.start;c.start=c.end,c.end=e}let f=u.start.dot(a),y=u.end.dot(a),v=c.start.dot(a),T=c.end.dot(a);return(f===T||v===y||y0?d.start.copy(u.start):d.start.copy(c.start),l.subVectors(u.end,c.end),l.dot(a)<0?d.end.copy(u.end):d.end.copy(c.end)),!0)}}}(),lo.prototype.distanceToPoint=function(){let e=new A;return function(t){return this.closestPointToPoint(t,e),t.distanceTo(e)}}(),lo.prototype.distanceToTriangle=function(){let e=new A,t=new A,i=["a","b","c"],r=new Ca,n=new Ca;return function(s,a=null,o=null){let l=a||o?r:null;if(this.intersectsTriangle(s,l))return(a||o)&&(a&&l.getCenter(a),o&&l.getCenter(o)),0;let h=1/0;for(let t=0;t<3;t++){let r,n=i[t],l=s[n];this.closestPointToPoint(l,e),r=l.distanceToSquared(e),rnew A)),this.satAxes=new Array(3).fill().map((()=>new A)),this.satBounds=new Array(3).fill().map((()=>new oo)),this.alignedSatBounds=new Array(3).fill().map((()=>new oo)),this.needsUpdate=!1,e&&this.min.copy(e),t&&this.max.copy(t),i&&this.matrix.copy(i)}set(e,t,i){this.min.copy(e),this.max.copy(t),this.matrix.copy(i),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}};co.prototype.update=function(){let e=this.matrix,t=this.min,i=this.max,r=this.points;for(let n=0;n<=1;n++)for(let s=0;s<=1;s++)for(let a=0;a<=1;a++){let o=r[1*n|2*s|4*a];o.x=n?i.x:t.x,o.y=s?i.y:t.y,o.z=a?i.z:t.z,o.applyMatrix4(e)}let n=this.satBounds,s=this.satAxes,a=r[0];for(let e=0;e<3;e++){let t=s[e],i=n[e],o=r[1<new Ca)),i=new Array(12).fill().map((()=>new Ca)),r=new A,n=new A;return function(s,a=0,o=null,l=null){if(this.needsUpdate&&this.update(),this.intersectsBox(s))return(o||l)&&(s.getCenter(n),this.closestPointToPoint(n,r),s.closestPointToPoint(r,n),o&&o.copy(r),l&&l.copy(n)),0;let h=a*a,u=s.min,c=s.max,p=this.points,d=1/0;for(let e=0;e<8;e++){let t=p[e];n.copy(t).clamp(u,c);let i=t.distanceToSquared(n);if(ii.far)?null:e}function Ll(e,t,i,r){let n=e.a,s=e.b,a=e.c,o=t,l=t+1,h=t+2;i&&(o=i.getX(t),l=i.getX(t+1),h=i.getX(t+2)),n.x=r.getX(o),n.y=r.getY(o),n.z=r.getZ(o),s.x=r.getX(l),s.y=r.getY(l),s.z=r.getZ(l),a.x=r.getX(h),a.y=r.getY(h),a.z=r.getZ(h)}function tB(e,t,i,r,n,s,a){let o=i.index,l=i.attributes.position;for(let i=e,h=t+e;i=0;u?(n=Jy(e),a=Qy(e,o)):(n=Qy(e,o),a=Jy(e));let c=TC(n,s,r,gC)?yC(n,t,i,r):null;if(c){let e=c.point[h];if(u?e<=s[a+l]:e>=s[a+l+3])return c}let p=TC(a,s,r,gC)?yC(a,t,i,r):null;return c&&p?c.distance<=p.distance?c:p:c||p||null}}var Xhe=function(){let e,t,i=[],r=new Ky((()=>new Dt));return function(...s){e=r.getPrimitive(),t=r.getPrimitive(),i.push(e,t);let a=n(...s);r.releasePrimitive(e),r.releasePrimitive(t),i.pop(),i.pop();let o=i.length;return o>0&&(t=i[o-1],e=i[o-2]),a};function n(i,r,s,a,o=null,l=0,h=0){function u(e){let t=2*e,i=yf,r=Tf;for(;!Up(t,i);)t=2*(e=Jy(e));return Gg(e,r)}function c(e){let t=2*e,i=yf,r=Tf;for(;!Up(t,i);)t=2*(e=Qy(e,r));return Gg(e,r)+Zy(t,i)}let p=2*i,d=tT,f=yf,m=Tf;if(Up(p,f)){let t=Gg(i,m),r=Zy(p,f);return Nl(i,d,e),a(t,r,!1,h,l+i,e)}{let p,g,y,v,T=Jy(i),x=Qy(i,m),b=T,_=x;if(o&&(y=e,v=t,Nl(b,d,y),Nl(_,d,v),p=o(y),g=o(v),gn.intersectsBox(e),intersectsTriangle:e=>{e.a.applyMatrix4(h),e.b.applyMatrix4(h),e.c.applyMatrix4(h),e.needsUpdate=!0;for(let i=3*y,r=3*(v+y);inew lo)),Pc=class{static serialize(e,t={}){if(t.isBufferGeometry)return console.warn("MeshBVH.serialize: The arguments for the function have changed. See documentation for new signature."),Pc.serialize(arguments[0],{cloneBuffers:void 0===arguments[2]||arguments[2]});t=Br({cloneBuffers:!0},t);let i,r=e.geometry,n=e._roots,s=r.getIndex();return i=t.cloneBuffers?{roots:n.map((e=>e.slice())),index:s.array.slice()}:{roots:n,index:s.array},i}static deserialize(e,t,i={}){if("boolean"==typeof i)return console.warn("MeshBVH.deserialize: The arguments for the function have changed. See documentation for new signature."),Pc.deserialize(arguments[0],arguments[1],{setIndex:void 0===arguments[2]||arguments[2]});i=Br({setIndex:!0},i);let{index:r,roots:n}=e,s=new Pc(t,Dn(Br({},i),{[iB]:!0}));if(s._roots=n,i.setIndex){let i=t.getIndex();if(null===i){let i=new Wt(e.index,1,!1);t.setIndex(i)}else i.array!==r&&(i.array.set(r),i.needsUpdate=!0)}return s}constructor(e,t={}){if(!e.isBufferGeometry)throw new Error("MeshBVH: Only BufferGeometries are supported.");if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.");if((t=Object.assign({strategy:0,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,[iB]:!1},t)).useSharedArrayBuffer&&"undefined"==typeof SharedArrayBuffer)throw new Error("MeshBVH: SharedArrayBuffer is not available.");this._roots=null,t[iB]||(this._roots=Bhe(e,t),!e.boundingBox&&t.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new Dt))),this.geometry=e}refit(e=null){e&&Array.isArray(e)&&(e=new Set(e));let t,i,r,n,s=this.geometry,a=s.index.array,o=s.attributes.position,l=0,h=this._roots;for(let e=0,s=h.length;ec&&(c=i),rp&&(p=r),nd&&(d=n)}return(n[t+0]!==s||n[t+1]!==l||n[t+2]!==u||n[t+3]!==c||n[t+4]!==p||n[t+5]!==d)&&(n[t+0]=s,n[t+1]=l,n[t+2]=u,n[t+3]=c,n[t+4]=p,n[t+5]=d,!0)}{let r=t+8,a=i[t+6],o=r+s,h=a+s,c=l,p=!1,d=!1;e?c||(p=e.has(o),d=e.has(h),c=!p&&!d):(p=!0,d=!0);let f=c||d,m=!1;(c||p)&&(m=u(r,s,c));let g=!1;f&&(g=u(a,s,c));let y=m||g;if(y)for(let e=0;e<3;e++){let i=r+e,s=a+e,o=n[i],l=n[i+3],h=n[s],u=n[s+3];n[t+e]=ou?l:u}return y}}}traverse(e,t=0){let i=this._roots[t],r=new Uint32Array(i),n=new Uint16Array(i);!function t(s,a=0){let o=2*s,l=65535===n[o+15];if(l){let t=r[s+6],h=n[o+14];e(a,l,new Float32Array(i,4*s,6),t,h)}else{let n=s+8,o=r[s+6],h=r[s+7];e(a,l,new Float32Array(i,4*s,6),h)||(t(n,a+1),t(o,a+1))}}(0)}raycast(e,t=tn){let i=this._roots,r=this.geometry,n=[],s=t.isMaterial,a=Array.isArray(t),o=r.groups,l=s?t.side:t;for(let s=0,h=i.length;s{let s=3*i;return e(t,s,s+1,s+2,r,n)}}e={boundsTraverseOrder:i,intersectsBounds:e,intersectsTriangle:t,intersectsRange:null},console.warn("MeshBVH: Shapecast function signature has changed and now takes an object of callbacks as a second argument. See docs for new signature.")}let n=ju.getPrimitive(),{boundsTraverseOrder:s,intersectsBounds:a,intersectsRange:o,intersectsTriangle:l}=e;if(o&&l){let e=o;o=(t,i,s,a,o)=>!!e(t,i,s,a,o)||tB(t,i,r,l,s,a,n)}else o||(o=l?(e,t,i,s)=>tB(e,t,r,l,i,s,n):(e,t,i)=>i);let h=!1,u=0;for(let e of this._roots){if(rT(e),h=Xhe(0,r,a,o,s,u),Nx(),h)break;u+=e.byteLength}return ju.releasePrimitive(n),h}bvhcast(e,t,i){let{intersectsRanges:r,intersectsTriangles:n}=i,s=this.geometry.index,a=this.geometry.attributes.position,o=e.geometry.index,l=e.geometry.attributes.position;iT.copy(t).invert();let h=ju.getPrimitive(),u=ju.getPrimitive();if(n){let e=function(e,i,r,c,p,d,f,m){for(let g=r,y=r+c;gsB.intersectsBox(e),intersectsRange:(t,i,n,s,a,o)=>(nB.copy(o),nB.applyMatrix4(iT),e.shapecast({intersectsBounds:e=>nB.intersectsBox(e),intersectsRange:(e,n,o,l,h)=>r(t,i,e,n,s,a,l,h)}))});return ju.releasePrimitive(h),ju.releasePrimitive(u),c}intersectsBox(e,t){return Vg.set(e.min,e.max,t),Vg.needsUpdate=!0,this.shapecast({intersectsBounds:e=>Vg.intersectsBox(e),intersectsTriangle:e=>Vg.intersectsTriangle(e)})}intersectsSphere(e){return this.shapecast({intersectsBounds:t=>e.intersectsBox(t),intersectsTriangle:t=>t.intersectsSphere(e)})}closestPointToGeometry(e,t,i={},r={},n=0,s=1/0){e.boundingBox||e.computeBoundingBox(),Vg.set(e.boundingBox.min,e.boundingBox.max,t),Vg.needsUpdate=!0;let a=this.geometry,o=a.attributes.position,l=a.index,h=e.attributes.position,u=e.index,c=ju.getPrimitive(),p=ju.getPrimitive(),d=EC,f=Wvt,m=null,g=null;r&&(m=qvt,g=Yvt);let y=1/0,v=null,T=null;return iT.copy(t).invert(),Lx.matrix.copy(iT),this.shapecast({boundsTraverseOrder:e=>Vg.distanceToBox(e),intersectsBounds:(e,t,i)=>i{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:e=>Lx.distanceToBox(e),intersectsBounds:(e,t,i)=>i{for(let a=3*e,x=3*(e+s);a(Fx.copy(e).clamp(t.min,t.max),Fx.distanceToSquared(e)),intersectsBounds:(e,t,i)=>i{t.closestPointToPoint(e,Fx);let r=e.distanceToSquared(Fx);return r{Nl(0,new Float32Array(t),Khe),e.union(Khe)})),e}},aB=new ko,Zhe=new Be,Xvt=rt.prototype.raycast;function oB(e,t){if(this.geometry.boundsTree){if(void 0===this.material)return;Zhe.copy(this.matrixWorld).invert(),aB.copy(e.ray).applyMatrix4(Zhe);let i=this.geometry.boundsTree;if(!0===e.firstHitOnly){let r=eB(i.raycastFirst(aB,this.material),this,e);r&&t.push(r)}else{let r=i.raycast(aB,this.material);for(let i=0,n=r.length;ii.far?null:{distance:h,point:RC.clone(),object:e}}function MC(e,t,i,r,n,s,a,o,l,h,u,c){Ef.fromBufferAttribute(n,h),bf.fromBufferAttribute(n,u),xf.fromBufferAttribute(n,c);let p=e.morphTargetInfluences;if(s&&p){bC.set(0,0,0),xC.set(0,0,0),IC.set(0,0,0);for(let e=0,t=s.length;e=1)return}}else{for(let i=Math.max(0,d.start),n=Math.min(a.count,d.start+d.count);i=1)return}}else if(void 0!==o)if(Array.isArray(r))for(let i=0,n=p.length;i=1)return}}else{for(let i=Math.max(0,d.start),n=Math.min(o.count,d.start+d.count);i=1)return}}},rt.prototype.raycast=oB;var DC=new Wi,CC=new A;function Qhe(e,t,i,r,n,s){let a=r.ray.distanceSqToPoint(e);if(ar.far)return;n.push({distance:o,distanceToRay:Math.sqrt(a),point:i,index:t,face:null,object:s})}}nn.prototype.raycast=function(e,t){let i=this.geometry,r=this.matrixWorld,n=e.params.Points.threshold,s=i.drawRange;if(null===i.boundingSphere&&i.computeBoundingSphere(),DC.copy(i.boundingSphere),DC.applyMatrix4(r),DC.radius+=n,!1===e.ray.intersectsSphere(DC))return;let a=n*n,o=i.index,l=i.attributes.position,h=t.length;if(null!==o){for(let i=Math.max(0,s.start),n=Math.min(o.count,s.start+s.count);i=1)return}}else{for(let i=Math.max(0,s.start),n=Math.min(l.count,s.start+s.count);i=1)return}};var dB=class{constructor(){this.id=0,this.object=null,this.z=0,this.renderOrder=0}},Hx=class{constructor(){this.id=0,this.v1=new If,this.v2=new If,this.v3=new If,this.normalModel=new A,this.vertexNormalsModel=[new A,new A,new A],this.vertexNormalsLength=0,this.color=new je,this.material=null,this.uvs=[new le,new le,new le],this.z=0,this.renderOrder=0}},If=class{constructor(){this.position=new A,this.positionWorld=new A,this.positionScreen=new Gr,this.visible=!0}copy(e){this.positionWorld.copy(e.positionWorld),this.positionScreen.copy(e.positionScreen)}},Ux=class{constructor(){this.id=0,this.v1=new If,this.v2=new If,this.vertexColors=[new je,new je],this.material=null,this.z=0,this.renderOrder=0}},Bx=class{constructor(){this.id=0,this.object=null,this.x=0,this.y=0,this.z=0,this.rotation=0,this.scale=new le,this.material=null,this.renderOrder=0}},AC=class{constructor(){let e,t,i,r,n,s,a,o,l,h,u,c=0,p=0,d=0,f=0,m=0,g={objects:[],lights:[],elements:[]},y=new A,v=new Gr,T=new Dt(new A(-1,-1,-1),new A(1,1,1)),x=new Dt,b=new Array(3),_=new Be,E=new Be,w=new Be,S=new Xs,I=[],M=[],D=[],O=[],R=[];let C=new function(){let e=[],t=[],s=[],l=null,h=new Pi;function c(e){let t=e.position,i=e.positionWorld,r=e.positionScreen;i.copy(t).applyMatrix4(u),r.copy(i).applyMatrix4(E);let n=1/r.w;r.x*=n,r.y*=n,r.z*=n,e.visible=r.x>=-1&&r.x<=1&&r.y>=-1&&r.y<=1&&r.z>=-1&&r.z<=1}function d(e,t,i){return!0===e.visible||!0===t.visible||!0===i.visible||(b[0]=e.positionScreen,b[1]=t.positionScreen,b[2]=i.positionScreen,T.intersectsBox(x.setFromPoints(b)))}function m(e,t,i){return(i.positionScreen.x-e.positionScreen.x)*(t.positionScreen.y-e.positionScreen.y)-(i.positionScreen.y-e.positionScreen.y)*(t.positionScreen.x-e.positionScreen.x)<0}return{setObject:function(i){l=i,h.getNormalMatrix(l.matrixWorld),e.length=0,t.length=0,s.length=0},projectVertex:c,checkTriangleVisibility:d,checkBackfaceCulling:m,pushVertex:function(e,t,n){i=function(){if(r===p){let e=new If;return M.push(e),p++,r++,e}return M[r++]}(),i.position.set(e,t,n),c(i)},pushNormal:function(t,i,r){e.push(t,i,r)},pushColor:function(e,i,r){t.push(e,i,r)},pushUv:function(e,t){s.push(e,t)},pushLine:function(e,i){let r=M[e],n=M[i];r.positionScreen.copy(r.position).applyMatrix4(w),n.positionScreen.copy(n.position).applyMatrix4(w),!0===function(e,t){let i=0,r=1,n=e.z+e.w,s=t.z+t.w,a=-e.z+e.w,o=-t.z+t.w;return n>=0&&s>=0&&a>=0&&o>=0||!(n<0&&s<0||a<0&&o<0)&&(n<0?i=Math.max(i,n/(n-s)):s<0&&(r=Math.min(r,n/(n-s))),a<0?i=Math.max(i,a/(a-o)):o<0&&(r=Math.min(r,a/(a-o))),!(r=-1&&e.z<=1&&(l=function(){if(h===m){let e=new Bx;return R.push(e),m++,h++,e}return R[h++]}(),l.id=t.id,l.x=e.x*r,l.y=e.y*r,l.z=e.z,l.renderOrder=t.renderOrder,l.object=t,l.rotation=t.rotation,l.scale.x=t.scale.x*Math.abs(l.x-(e.x+i.projectionMatrix.elements[0])/(e.w+i.projectionMatrix.elements[12])),l.scale.y=t.scale.y*Math.abs(l.y-(e.y+i.projectionMatrix.elements[5])/(e.w+i.projectionMatrix.elements[13])),l.material=t.material,g.elements.push(l))}function F(){if(s===d){let e=new Hx;return D.push(e),d++,s++,e}return D[s++]}function U(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id!==t.id?e.id-t.id:0}this.projectScene=function(e,i,n,a){s=0,o=0,h=0,g.elements.length=0,!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===i.parent&&!0===i.matrixWorldAutoUpdate&&i.updateMatrixWorld(),_.copy(i.matrixWorldInverse),E.multiplyMatrices(i.projectionMatrix,_),S.setFromProjectionMatrix(E),t=0,g.objects.length=0,g.lights.length=0,N(e),!0===n&&g.objects.sort(U);let l=g.objects;for(let e=0,t=l.length;e0)for(let n=0;n0)for(let r=0;r0;)L.removeChild(L.childNodes[0])}function U(e){return null!==g?e.toFixed(g):e}function k(e,t,i){let r=t.scale.x*s,n=t.scale.y*a;i.isPointsMaterial&&(r*=i.size,n*=i.size);let o="M"+U(e.x-.5*r)+","+U(e.y-.5*n)+"h"+U(r)+"v"+U(n)+"h"+U(-r)+"z",l="";(i.isSpriteMaterial||i.isPointsMaterial)&&(l="fill:"+i.color.getStyle()+";fill-opacity:"+i.opacity),z(l,o)}function B(e,t,i){let r="M"+U(e.positionScreen.x)+","+U(e.positionScreen.y)+"L"+U(t.positionScreen.x)+","+U(t.positionScreen.y);if(i.isLineBasicMaterial){let e="fill:none;stroke:"+i.color.getStyle()+";stroke-opacity:"+i.opacity+";stroke-width:"+i.linewidth+";stroke-linecap:"+i.linecap;i.isLineDashedMaterial&&(e=e+";stroke-dasharray:"+i.dashSize+","+i.gapSize),z(e,r)}}function H(e,t,r,n,s){v.info.render.vertices+=3,v.info.render.faces++;let a="M"+U(e.positionScreen.x)+","+U(e.positionScreen.y)+"L"+U(t.positionScreen.x)+","+U(t.positionScreen.y)+"L"+U(r.positionScreen.x)+","+U(r.positionScreen.y)+"z",o="";s.isMeshBasicMaterial?(b.copy(s.color),s.vertexColors&&b.multiply(n.color)):s.isMeshLambertMaterial||s.isMeshPhongMaterial||s.isMeshStandardMaterial?(_.copy(s.color),s.vertexColors&&_.multiply(n.color),b.copy(E),M.copy(e.positionWorld).add(t.positionWorld).add(r.positionWorld).divideScalar(3),function(e,t,i,r){for(let n=0,s=e.length;n1||l.positionScreen.z<-1||l.positionScreen.z>1||h.positionScreen.z<-1||h.positionScreen.z>1)continue;o.positionScreen.x*=s,o.positionScreen.y*=-a,l.positionScreen.x*=s,l.positionScreen.y*=-a,h.positionScreen.x*=s,h.positionScreen.y*=-a,this.overdraw>0&&(G(o.positionScreen,l.positionScreen,this.overdraw),G(l.positionScreen,h.positionScreen,this.overdraw),G(h.positionScreen,o.positionScreen,this.overdraw)),x.setFromPoints([o.positionScreen,l.positionScreen,h.positionScreen]),!0===T.intersectsBox(x)&&H(o,l,h,i,r)}}V(),r.traverseVisible((function(e){if(e.isSVGObject){if(I.setFromMatrixPosition(e.matrixWorld),I.applyMatrix4(C),I.z<-1||I.z>1)return;let t=I.x*s,i=-I.y*a,r=e.node;r.setAttribute("transform",`translate(${t}, ${i}) rotate(${e.rotation.z})`),L.appendChild(r)}}))}}};function Kvt(e){let t={};return t.r=(e>>16&255)/255,t.g=(e>>8&255)/255,t.b=(255&e)/255,t}var aT=class extends cr{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.addEventListener("removed",(function(){this.traverse((function(e){e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}},sT=new A,rpe=new Be,ipe=new Be,npe=new A,spe=new A,_f=class{constructor(e={}){let t,i,r,n,s=this,a={objects:new WeakMap},o=void 0!==e.element?e.element:document.createElement("div");function l(e,t,i){if(e.isCSS2DObject){sT.setFromMatrixPosition(e.matrixWorld),sT.applyMatrix4(ipe);let l=!0===e.visible&&sT.z>=-1&&sT.z<=1&&!0===e.layers.test(i.layers);if(e.element.style.display=!0===l?"":"none",!0===l){e.onBeforeRender(s,t,i);let a=e.element;a.style.transform="translate(-50%,-50%) translate("+(sT.x*r+r)+"px,"+(-sT.y*n+n)+"px)",a.parentNode!==o&&o.appendChild(a),e.onAfterRender(s,t,i)}let u={distanceToCameraSquared:h(i,e)};a.objects.set(e,u)}for(let r=0,n=e.children.length;r{this.cancelReject=t}));this.promise=Promise.race([t,e])}cancel(){this.cancelReject&&this.cancelReject({type:"cancel"})}},Zvt=kn(ope(),1),ne=Zvt;ne.setLevel("warn");var lpe=e=>{let t=null==e?void 0:e.toLowerCase();!t||"info"!==t&&"warn"!==t&&"error"!==t?ne.error(`[LogUtils] Invalid log level: ${e}, use "info", "warn" or "error" please!`):ne.setLevel(t)},fB=class{static isTouchScreenDevice(){return"ontouchstart"in window}static printDeviceInfo(){let e=navigator.userAgent,t=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),r=/(?:Chrome|CriOS)/.test(e),n=/(?:iPad|PlayBook)/.test(e)||t&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!n,a=!s&&!t,o=fB.isTouchScreenDevice();t&&ne.debug("[DI] is android"),i&&ne.debug("[DI] is fireFox"),r&&ne.debug("[DI] is chrome"),n&&ne.debug("[DI] is tablet"),s&&ne.debug("[DI] is iPhone"),a&&ne.debug("[DI] is PC"),o&&ne.debug("[DI] is touch device")}static creatReactNativeCanvas(e){let t=e.drawingBufferWidth||e.width||0,i=e.drawingBufferHeight||e.height||0;return{style:{},width:t,height:i,clientWidth:Math.ceil(t/(window.devicePixelRatio||1)),clientHeight:Math.ceil(i/(window.devicePixelRatio||1)),addEventListener:()=>{},removeEventListener:()=>{}}}},wi=fB;wi.isBrowser="undefined"!=typeof document,wi.isNode="undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process);var NC=class extends cr{constructor(e){super(),this.isSVGObject=!0,this.node=e}},cpe="#7fffbf",upe=10,hpe=14,Jvt=2.5,ppe=(e=>(e.Dot="Dot",e.Square="Square",e.Triangle="Triangle",e.Cross="Cross",e.Perpendicular="Perpendicular",e))(ppe||{}),lT=class{static createSVGObject(e){return new NC(e)}static createPointMarker(e=upe){return lT.createSnapIcon("Dot",cpe,e,"#ffffff","2")}static createSnapIcon(e,t="none",i=upe,r=cpe,n="2"){let s=document.createElementNS("http://www.w3.org/2000/svg","path"),a=i,o="";switch(e){case"Dot":a=i/3,o=`\n M ${-a}, 0\n a ${a}, ${a} 0 1, 0 ${2*a}, 0\n a ${a}, ${a} 0 1, 0 -${2*a}, 0\n `;break;case"Square":a=i/1.2,o=`\n M ${-a/2}, ${-a/2}\n h ${a}\n v ${a}\n h ${-a}\n z\n `;break;case"Triangle":a=i/2,o=`\n M 0, ${-a}\n L ${-.87*a}, ${a/2}\n L ${.87*a}, ${a/2}\n z\n `;break;case"Cross":a=i/1.2,o=`\n M ${-a/2}, ${-a/2}\n L ${a/2}, ${a/2}\n M ${a/2}, ${-a/2}\n L ${-a/2}, ${a/2}\n `;break;case"Perpendicular":a=i,o=`\n M 0, 0\n L ${-a/2}, 0\n M 0, 0\n L 0, ${a/2}\n M ${a/2}, ${a/2}\n L ${-a/2}, ${a/2}\n M ${-a/2}, ${a/2}\n L ${-a/2}, ${-a/2}\n `}s.setAttribute("d",o);let l=`fill: ${t}; stroke: ${r}; stroke-width: ${n};`;return s.setAttribute("style",l),this.createSVGObject(s)}static createLine(e=6,t="#fff000",i=Jvt){let r=document.createElementNS("http://www.w3.org/2000/svg","line");r.setAttribute("x1",""+-e),r.setAttribute("y1","0"),r.setAttribute("x2",`${e}`),r.setAttribute("y2","0");let n=`stroke: ${t}; stroke-width: ${i};`;return r.setAttribute("style",n),this.createSVGObject(r)}static createLabel(e,t="#ffffff",i=hpe,r=hpe/2){let n=document.createElementNS("http://www.w3.org/2000/svg","text");n.innerHTML=e,n.setAttribute("x","0"),n.setAttribute("y",`${r}`);let s=`font-size: ${i}; text-anchor: middle; fill: ${t};`;return n.setAttribute("style",s),this.createSVGObject(n)}},_t=class{static isFullScreen(){return!(!document.fullscreenElement&&!document.mozFullScreenElement)}static fullScreen(e=document.documentElement){(e.requestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen||e.msRequestFullscreen).call(e)}static exitFullscreen(){(document.exitFullscreen||document.mozCancelFullscreen||document.webkitExitFullscreen||document.msExitFullscreen).call(document)}static displayPointMarker(e,t,i=1e3,r=10){let n=lT.createPointMarker(r);return n.position.set(t.x,t.y,t.z),e.add(n),i&&setTimeout((()=>{e.remove(n)}),i),n}static joinStrings(...e){return e.join("")}static numberToString(e){let t=2;return Math.abs(e)<1e-6?t=2:Math.abs(e)<1e-5?t=7:Math.abs(e)<1e-4?t=6:Math.abs(e)<.001?t=5:Math.abs(e)<.01?t=4:Math.abs(e)<.1&&(t=3),e.toFixed(t)}static hexToBase64(e){return btoa((e.match(/\w{2}/g)||[]).map((function(e){return String.fromCharCode(parseInt(e,16))})).join(""))}static vectorToString(e){return e instanceof A?`(${this.numberToString(e.x)}, ${this.numberToString(e.y)}, ${this.numberToString(e.z)})`:`(${this.numberToString(e.x)}, ${this.numberToString(e.y)})`}static arrayToVector2(e){return e?e instanceof le?e:Array.isArray(e)&&e.length>=2?new le(e[0],e[1]):void 0:e}static arrayToVector3(e){return e?e instanceof A?e:Array.isArray(e)&&e.length>=2?new A(e[0],e[1],e.length>2?e[2]:0):void 0:e}static arrayToEuler(e){return e?e instanceof xr?e:Array.isArray(e)&&e.length>=3?new xr(e[0],e[1],e[2]):void 0:e}static arrayOrObjectToVector3(e){if(!e)return e;if(e instanceof A)return e;if(e instanceof le)return new A(e.x,e.y,0);if(Array.isArray(e)&&e.length>=2)return new A(e[0],e[1],e[2]||0);let t=e;return null!=t.x&&null!=t.y?new A(t.x,t.y,t.z||0):void 0}static isVectorValid(e){let t=e&&!isNaN(e.x)&&!isNaN(e.y)&&isFinite(e.x)&&isFinite(e.y);return t&&e instanceof A&&(t=!isNaN(e.z)&&isFinite(e.z)),t}static isBoxValid(e){return e&&!e.isEmpty()&&this.isVectorValid(e.min)&&this.isVectorValid(e.max)}static isMatrixValid(e){let t=e&&e.elements;if(!t||t.length<16)return!1;for(let e=0;e<16;++e){let i=t[e];if(Number.isNaN(i))return!1}return!0}static guid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}static expandBoxByScale(e,t){let i=new A;e.getCenter(i);let r=(e.max.x-e.min.x)*t,n=(e.max.y-e.min.y)*t,s=(e.max.z-e.min.z)*t,a=new A(i.x-r/2,i.y-n/2,i.z-s/2),o=new A(i.x+r/2,i.y+n/2,i.z+s/2);e.set(a,o)}static expandBoxByMinSize(e,t){let i=new A;e.getCenter(i);let r=e.max.x-e.min.x,n=e.max.y-e.min.y,s=e.max.z-e.min.z;r{i.onload=function(){e(i)}}))}static renderingContextToImage(e,t,i="image/png",r=.8){if(t){let n=Math.max(t.min.x,0),s=Math.max(t.min.y,0),a=Math.max(t.max.x-n,0),o=Math.max(t.max.y-s,0),l=e.getImageData(n,s,a,o),h=document.createElement("canvas");return h.width=a,h.height=o,h.getContext("2d").putImageData(l,0,0),h.toDataURL(i,r)}return e.canvas.toDataURL(i,r)}static printMemory(e){if(wi.isBrowser){let t=performance.memory;if(!t)return void ne.warn("[CommonUtils] performance.memory is not available in this browser");let i=(t.jsHeapSizeLimit/1048576).toFixed(2),r=(t.totalJSHeapSize/1048576).toFixed(2),n=(t.usedJSHeapSize/1048576).toFixed(2);ne.info(`[CommonUtils] ${e}. jsHeapSizeLimit: ${i}M , totalJSHeapSize: ${r}M , usedJSHeapSize: ${n}M `)}}static printGpuInfo(e){if(wi.isBrowser){let t=e.getExtension("webgl_debug_renderer_info"),i=e.getParameter(t.UNMASKED_RENDERER_WEBGL);ne.info("[CommonUtils] gpu:",i)}}},LC=(e,t,i)=>{let{default:r,active:n}=t;i?(e.remove(r),e.add(n||r)):(n&&e.remove(n),e.add(r))},Ci=class{static getScreenPointByEvent(e,t){let i=new le,{left:r,top:n}=t.getBoundingClientRect();return i.x=e.clientX-r,i.y=e.clientY-n,i}static getScreenPointByTouchEvent(e,t){let i=new le,{left:r,top:n}=t.getBoundingClientRect();return i.x=e.touches[0].clientX-r,i.y=e.touches[0].clientY-n,i}static worldPosition2ScreenPoint(e,t,i){let{clientWidth:r,clientHeight:n}=i,s=e.clone(),a=new le;return s.project(t),a.x=Math.round((.5+s.x/2)*r),a.y=Math.round((.5-s.y/2)*n),a}static screenPoint2worldPosition(e,t,i){let r=Ci.screenPoint2NdcPoint(e,t,i);return new A(r.x,r.y,1).unproject(t)}static screenPoint2NdcPoint(e,t,i){let{clientWidth:r,clientHeight:n}=i,s=new le;return s.x=e.x/r*2-1,s.y=-e.y/n*2+1,s}},wf=class{static createCSS2DObject(e){let t=new aT(e);return e.dataset.objectId=t.id.toString(),t}static createDefaultHotpoint(e=12){let t=document.createElement("div"),i=t.style;return i.width=`${e}px`,i.height=`${e}px`,i.opacity="0.8",i.cursor="pointer",i.top=-e/2+"px",i.left=-e/2+"px",i.backgroundColor="#ffffff",i.border="2px solid #00DAB7",i.borderRadius="50%",this.createCSS2DObject(t)}static createHotpoint(e){if(e){let t=document.createElement("div"),i=t.style;return i.top="0px",i.left="0px",t.innerHTML=e,this.createCSS2DObject(t)}return this.createDefaultHotpoint()}static createLabel(e,t=""){let i=document.createElement("div");if(i.innerHTML=e,t)i.classList.add(t);else{let e=i.style;e.padding="5px 9px",e.color="#ffffffdd",e.fontSize="12px",e.position="absolute",e.backgroundColor="rgba(0, 0, 0, 0.3)",e.borderRadius="12px",e.cursor="pointer",e.top="0px",e.left="0px"}return this.createCSS2DObject(i)}static tryFindObjectId(e){if(null!=e.dataset.objectId)return parseInt(e.dataset.objectId);let t=e.parentElement;return!t||t instanceof HTMLBodyElement?void 0:this.tryFindObjectId(t)}},cT={unit:"file",decimalPrecision:99,camera:{near:.1,far:3e4},mouse:{sensitivity:3},keyboard:{sensitivity:3}},dpe={"Precision from file":99,"0(1)":0,"0.1(1/2)":1,"0.01(1/4)":2,"0.001(1/8)":3,"0.0001(1/16)":4,"0.00001(1/32)":5,"0.000001(1/64)":6},Wu=(e,t)=>e.toFixed(t===dpe["Precision from file"]?2:t),Ks=class{constructor(){this.map=new Map}addEventListener(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}dispatchEvent(e,t={}){let i=this.map.get(e);i&&[...i].forEach((e=>e(t)))}removeEventListener(e,t){if(!e)return void this.map.clear();if(!t)return void this.map.delete(e);let i=this.map.get(e);i&&i.delete(t)}clearEventListeners(e){this.map.delete(e)}clearAllEventListener(){this.map.clear()}},Zs=class{parse(e,t={}){if(t=Object.assign({decodeSpeed:5,encodeSpeed:5,encoderMethod:Zs.MESH_EDGEBREAKER_ENCODING,quantization:[16,8,8,8,8],exportUvs:!0,exportNormals:!0,exportColor:!1},t),void 0===DracoEncoderModule)throw new Error("THREE.DRACOExporter: required the draco_encoder to work.");let i,r,n=e.geometry,s=DracoEncoderModule(),a=new s.Encoder;if(!0===e.isMesh){i=new s.MeshBuilder,r=new s.Mesh;let e=n.getAttribute("position");i.AddFloatAttributeToMesh(r,s.POSITION,e.count,e.itemSize,e.array);let a=n.getIndex();if(null!==a)i.AddFacesToMesh(r,a.count/3,a.array);else{let t=new(e.count>65535?Uint32Array:Uint16Array)(e.count);for(let e=0;e4?i=e.array[n*e.itemSize+t]:(0===t?i=e.getX(n):1===t?i=e.getY(n):2===t?i=e.getZ(n):3===t&&(i=e.getW(n)),!0===e.normalized&&(i=_r.normalize(i,e.array))),r.min[t]=Math.min(r.min[t],i),r.max[t]=Math.max(r.max[t],i)}return r}function Tpe(e){return 4*Math.ceil(e/4)}function mB(e,t=0){let i=Tpe(e.byteLength);if(i!==e.byteLength){let r=new Uint8Array(i);if(r.set(new Uint8Array(e)),0!==t)for(let n=e.byteLength;ne.toBlob(i,t)));let i;return"image/jpeg"===t?i=.92:"image/webp"===t&&(i=.8),e.convertToBlob({type:t,quality:i})}var gB=class{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}write(e,t){return ht(this,arguments,(function*(e,t,i={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},i),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(e),yield Promise.all(this.pending);let r=this,n=r.buffers,s=r.json;i=r.options;let a=r.extensionsUsed,o=new Blob(n,{type:"application/octet-stream"}),l=Object.keys(a);if(l.length>0&&(s.extensionsUsed=l),s.buffers&&s.buffers.length>0&&(s.buffers[0].byteLength=o.size),!0===i.binary){let e=new FileReader;e.readAsArrayBuffer(o),e.onloadend=function(){let i=mB(e.result),r=new DataView(new ArrayBuffer(gpe));r.setUint32(0,i.byteLength,!0),r.setUint32(4,iyt,!0);let n=mB(nyt(JSON.stringify(s)),32),a=new DataView(new ArrayBuffer(gpe));a.setUint32(0,n.byteLength,!0),a.setUint32(4,ryt,!0);let o=new ArrayBuffer(mpe),l=new DataView(o);l.setUint32(0,eyt,!0),l.setUint32(4,tyt,!0);let h=mpe+a.byteLength+n.byteLength+r.byteLength+i.byteLength;l.setUint32(8,h,!0);let u=new Blob([o,a,n,r,i],{type:"application/octet-stream"}),c=new FileReader;c.readAsArrayBuffer(u),c.onloadend=function(){t(c.result)}}}else if(s.buffers&&s.buffers.length>0){let e=new FileReader;e.readAsDataURL(o),e.onloadend=function(){let i=e.result;s.buffers[0].uri=i,t(s)}}else t(s)}))}serializeUserData(e,t){if(0===Object.keys(e.userData).length)return;let i=this.options,r=this.extensionsUsed;try{let n=JSON.parse(JSON.stringify(e.userData));if(i.includeCustomExtensions&&n.gltfExtensions){void 0===t.extensions&&(t.extensions={});for(let e in n.gltfExtensions)t.extensions[e]=n.gltfExtensions[e],r[e]=!0;delete n.gltfExtensions}Object.keys(n).length>0&&(t.extras=n)}catch(t){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+t.message)}}getUID(e,t=!1){if(!1===this.uids.has(e)){let t=new Map;t.set(!0,this.uid++),t.set(!1,this.uid++),this.uids.set(e,t)}return this.uids.get(e).get(t)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;let t=new A;for(let i=0,r=e.count;i5e-4)return!1;return!0}createNormalizedNormalAttribute(e){let t=this.cache;if(t.attributesNormalized.has(e))return t.attributesNormalized.get(e);let i=e.clone(),r=new A;for(let e=0,t=i.count;e4?r=e.array[n*e.itemSize+i]:(0===i?r=e.getX(n):1===i?r=e.getY(n):2===i?r=e.getZ(n):3===i&&(r=e.getW(n)),!0===e.normalized&&(r=_r.normalize(r,e.array))),t===sn.FLOAT?l.setFloat32(h,r,!0):t===sn.UNSIGNED_INT?l.setUint32(h,r,!0):t===sn.UNSIGNED_SHORT?l.setUint16(h,r,!0):t===sn.UNSIGNED_BYTE&&l.setUint8(h,r),h+=s}let u={buffer:this.processBuffer(l.buffer),byteOffset:this.byteOffset,byteLength:o};return void 0!==n&&(u.target=n),n===sn.ARRAY_BUFFER&&(u.byteStride=e.itemSize*s),this.byteOffset+=o,a.bufferViews.push(u),{id:a.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){let t=this,i=t.json;return i.bufferViews||(i.bufferViews=[]),new Promise((function(r){let n=new FileReader;n.readAsArrayBuffer(e),n.onloadend=function(){let e=mB(n.result),s={buffer:t.processBuffer(e),byteOffset:t.byteOffset,byteLength:e.byteLength};t.byteOffset+=e.byteLength,r(i.bufferViews.push(s)-1)}}))}processAccessor(e,t,i,r){let n,s=this.json;if(e.array.constructor===Float32Array)n=sn.FLOAT;else if(e.array.constructor===Uint32Array)n=sn.UNSIGNED_INT;else if(e.array.constructor===Uint16Array)n=sn.UNSIGNED_SHORT;else{if(e.array.constructor!==Uint8Array)throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type.");n=sn.UNSIGNED_BYTE}if(void 0===i&&(i=0),void 0===r&&(r=e.count),0===r)return null;let a,o=ayt(e,i,r);void 0!==t&&(a=e===t.index?sn.ELEMENT_ARRAY_BUFFER:sn.ARRAY_BUFFER);let l=this.processBufferView(e,n,i,r,a),h={bufferView:l.id,byteOffset:l.byteOffset,componentType:n,count:r,max:o.max,min:o.min,type:{1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",16:"MAT4"}[e.itemSize]};return!0===e.normalized&&(h.normalized=!0),s.accessors||(s.accessors=[]),s.accessors.push(h)-1}processImage(e,t,i,r="image/png"){if(null!==e){let n=this,s=n.cache,a=n.json,o=n.options,l=n.pending;s.images.has(e)||s.images.set(e,{});let h=s.images.get(e),u=r+":flipY/"+i.toString();if(void 0!==h[u])return h[u];a.images||(a.images=[]);let c={mimeType:r},p=vpe();p.width=Math.min(e.width,o.maxTextureSize),p.height=Math.min(e.height,o.maxTextureSize);let d=p.getContext("2d");if(!0===i&&(d.translate(0,p.height),d.scale(1,-1)),void 0!==e.data){t!==Us&&console.error("GLTFExporter: Only RGBAFormat is supported."),(e.width>o.maxTextureSize||e.height>o.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);let i=new Uint8ClampedArray(e.height*e.width*4);for(let t=0;tn.processBufferViewImage(e))).then((e=>{c.bufferView=e}))):void 0!==p.toDataURL?c.uri=p.toDataURL(r):l.push(ype(p,r).then((e=>(new FileReader).readAsDataURL(e))).then((e=>{c.uri=e})));let f=a.images.push(c)-1;return h[u]=f,f}throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){let t=this.json;t.samplers||(t.samplers=[]);let i={magFilter:Vo[e.magFilter],minFilter:Vo[e.minFilter],wrapS:Vo[e.wrapS],wrapT:Vo[e.wrapT]};return t.samplers.push(i)-1}processTexture(e){let t=this.cache,i=this.json;if(t.textures.has(e))return t.textures.get(e);i.textures||(i.textures=[]);let r=e.userData.mimeType;"image/webp"===r&&(r="image/png");let n={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,r)};e.name&&(n.name=e.name),this._invokeAll((function(t){t.writeTexture&&t.writeTexture(e,n)}));let s=i.textures.push(n)-1;return t.textures.set(e,s),s}processMaterial(e){let t=this.cache,i=this.json;if(t.materials.has(e))return t.materials.get(e);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;i.materials||(i.materials=[]);let r={pbrMetallicRoughness:{}};!0!==e.isMeshStandardMaterial&&!0!==e.isMeshBasicMaterial&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");let n=e.color.toArray().concat([e.opacity]);if(kx(n,[1,1,1,1])||(r.pbrMetallicRoughness.baseColorFactor=n),e.isMeshStandardMaterial?(r.pbrMetallicRoughness.metallicFactor=e.metalness,r.pbrMetallicRoughness.roughnessFactor=e.roughness):(r.pbrMetallicRoughness.metallicFactor=.5,r.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){let t=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),i={index:this.processTexture(t)};this.applyTextureTransform(i,t),r.pbrMetallicRoughness.metallicRoughnessTexture=i}if(e.map){let t={index:this.processTexture(e.map)};this.applyTextureTransform(t,e.map),r.pbrMetallicRoughness.baseColorTexture=t}if(e.emissive){let t=e.emissive.clone().multiplyScalar(e.emissiveIntensity),i=Math.max(t.r,t.g,t.b);if(i>1&&(t.multiplyScalar(1/i),console.warn("THREE.GLTFExporter: Some emissive components exceed 1; emissive has been limited")),i>0&&(r.emissiveFactor=t.toArray()),e.emissiveMap){let t={index:this.processTexture(e.emissiveMap)};this.applyTextureTransform(t,e.emissiveMap),r.emissiveTexture=t}}if(e.normalMap){let t={index:this.processTexture(e.normalMap)};e.normalScale&&1!==e.normalScale.x&&(t.scale=e.normalScale.x),this.applyTextureTransform(t,e.normalMap),r.normalTexture=t}if(e.aoMap){let t={index:this.processTexture(e.aoMap),texCoord:1};1!==e.aoMapIntensity&&(t.strength=e.aoMapIntensity),this.applyTextureTransform(t,e.aoMap),r.occlusionTexture=t}e.transparent?r.alphaMode="BLEND":e.alphaTest>0&&(r.alphaMode="MASK",r.alphaCutoff=e.alphaTest),e.side===gi&&(r.doubleSided=!0),""!==e.name&&(r.name=e.name),this.serializeUserData(e,r),this._invokeAll((function(t){t.writeMaterial&&t.writeMaterial(e,r)}));let s=i.materials.push(r)-1;return t.materials.set(e,s),s}processMesh(e){let t=this.cache,i=this.json,r=[e.geometry.uuid];if(Array.isArray(e.material))for(let t=0,i=e.material.length;t0){let i=[],r=[],n={};if(void 0!==e.morphTargetDictionary)for(let t in e.morphTargetDictionary)n[e.morphTargetDictionary[t]]=t;for(let s=0;s0&&(o.extras={},o.extras.targetNames=r)}let f=Array.isArray(e.material);if(f&&0===a.groups.length)return null;let m=f?e.material:[e.material],g=f?a.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let e=0,i=g.length;e0&&(i.targets=u),null!==a.index){let r=this.getUID(a.index);(void 0!==g[e].start||void 0!==g[e].count)&&(r+=":"+g[e].start+":"+g[e].count),t.attributes.has(r)?i.indices=t.attributes.get(r):(i.indices=this.processAccessor(a.index,a,g[e].start,g[e].count),t.attributes.set(r,i.indices)),null===i.indices&&delete i.indices}let r=this.processMaterial(m[g[e].materialIndex]);null!==r&&(i.material=r),h.push(i)}o.primitives=h,i.meshes||(i.meshes=[]),this._invokeAll((function(t){t.writeMesh&&t.writeMesh(e,o)}));let y=i.meshes.push(o)-1;return t.meshes.set(n,y),y}processCamera(e){let t=this.json;t.cameras||(t.cameras=[]);let i=e.isOrthographicCamera,r={type:i?"orthographic":"perspective"};return i?r.orthographic={xmag:2*e.right,ymag:2*e.top,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:r.perspective={aspectRatio:e.aspect,yfov:_r.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},""!==e.name&&(r.name=e.type),t.cameras.push(r)-1}processAnimation(e,t){let i=this.json,r=this.nodeMap;i.animations||(i.animations=[]);let n=(e=uT.Utils.mergeMorphTargetTracks(e.clone(),t)).tracks,s=[],a=[];for(let e=0;e0){let t=[];for(let r=0,n=e.children.length;r0&&(n.children=t)}this._invokeAll((function(t){t.writeNode&&t.writeNode(e,n)}));let s=t.nodes.push(n)-1;return r.set(e,s),s}processScene(e){let t=this.json,i=this.options;t.scenes||(t.scenes=[],t.scene=0);let r={};""!==e.name&&(r.name=e.name),t.scenes.push(r);let n=[];for(let t=0,r=e.children.length;t0&&(r.nodes=n),this.serializeUserData(e,r)}processObjects(e){let t=new Pn;t.name="AuxScene";for(let i=0;i0&&this.processObjects(i);for(let e=0;e0&&(s.range=e.distance)):e.isSpotLight&&(s.type="spot",e.distance>0&&(s.range=e.distance),s.spot={},s.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,s.spot.outerConeAngle=e.angle),void 0!==e.decay&&2!==e.decay&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),e.target&&(e.target.parent!==e||0!==e.target.position.x||0!==e.target.position.y||-1!==e.target.position.z)&&console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),n[this.name]||(r.extensions=r.extensions||{},r.extensions[this.name]={lights:[]},n[this.name]=!0);let a=r.extensions[this.name].lights;a.push(s),t.extensions=t.extensions||{},t.extensions[this.name]={light:a.length-1}}},yB=class{constructor(e){this.writer=e,this.name="KHR_materials_unlit"}writeMaterial(e,t){if(!e.isMeshBasicMaterial)return;let i=this.writer.extensionsUsed;t.extensions=t.extensions||{},t.extensions[this.name]={},i[this.name]=!0,t.pbrMetallicRoughness.metallicFactor=0,t.pbrMetallicRoughness.roughnessFactor=.9}},TB=class{constructor(e){this.writer=e,this.name="KHR_materials_clearcoat"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.clearcoat)return;let i=this.writer,r=i.extensionsUsed,n={};if(n.clearcoatFactor=e.clearcoat,e.clearcoatMap){let t={index:i.processTexture(e.clearcoatMap)};i.applyTextureTransform(t,e.clearcoatMap),n.clearcoatTexture=t}if(n.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){let t={index:i.processTexture(e.clearcoatRoughnessMap)};i.applyTextureTransform(t,e.clearcoatRoughnessMap),n.clearcoatRoughnessTexture=t}if(e.clearcoatNormalMap){let t={index:i.processTexture(e.clearcoatNormalMap)};i.applyTextureTransform(t,e.clearcoatNormalMap),n.clearcoatNormalTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=n,r[this.name]=!0}},EB=class{constructor(e){this.writer=e,this.name="KHR_materials_iridescence"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.iridescence)return;let i=this.writer,r=i.extensionsUsed,n={};if(n.iridescenceFactor=e.iridescence,e.iridescenceMap){let t={index:i.processTexture(e.iridescenceMap)};i.applyTextureTransform(t,e.iridescenceMap),n.iridescenceTexture=t}if(n.iridescenceIor=e.iridescenceIOR,n.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],n.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){let t={index:i.processTexture(e.iridescenceThicknessMap)};i.applyTextureTransform(t,e.iridescenceThicknessMap),n.iridescenceThicknessTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=n,r[this.name]=!0}},bB=class{constructor(e){this.writer=e,this.name="KHR_materials_transmission"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;let i=this.writer,r=i.extensionsUsed,n={};if(n.transmissionFactor=e.transmission,e.transmissionMap){let t={index:i.processTexture(e.transmissionMap)};i.applyTextureTransform(t,e.transmissionMap),n.transmissionTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=n,r[this.name]=!0}},xB=class{constructor(e){this.writer=e,this.name="KHR_materials_volume"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;let i=this.writer,r=i.extensionsUsed,n={};if(n.thicknessFactor=e.thickness,e.thicknessMap){let t={index:i.processTexture(e.thicknessMap)};i.applyTextureTransform(t,e.thicknessMap),n.thicknessTexture=t}n.attenuationDistance=e.attenuationDistance,n.attenuationColor=e.attenuationColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=n,r[this.name]=!0}},IB=class{constructor(e){this.writer=e,this.name="KHR_materials_ior"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||1.5===e.ior)return;let i=this.writer.extensionsUsed,r={};r.ior=e.ior,t.extensions=t.extensions||{},t.extensions[this.name]=r,i[this.name]=!0}},_B=class{constructor(e){this.writer=e,this.name="KHR_materials_specular"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||1===e.specularIntensity&&e.specularColor.equals(Qvt)&&!e.specularIntensityMap&&!e.specularColorTexture)return;let i=this.writer,r=i.extensionsUsed,n={};if(e.specularIntensityMap){let t={index:i.processTexture(e.specularIntensityMap)};i.applyTextureTransform(t,e.specularIntensityMap),n.specularTexture=t}if(e.specularColorMap){let t={index:i.processTexture(e.specularColorMap)};i.applyTextureTransform(t,e.specularColorMap),n.specularColorTexture=t}n.specularFactor=e.specularIntensity,n.specularColorFactor=e.specularColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=n,r[this.name]=!0}};uT.Utils={insertKeyframe:function(e,t){let i,r=e.getValueSize(),n=new e.TimeBufferType(e.times.length+1),s=new e.ValueBufferType(e.values.length+r),a=e.createInterpolant(new e.ValueBufferType(r));if(0===e.times.length){n[0]=t;for(let e=0;ee.times[e.times.length-1]){if(Math.abs(e.times[e.times.length-1]-t)<.001)return e.times.length-1;n[n.length-1]=t,n.set(e.times,0),s.set(e.values,0),s.set(a.evaluate(t),e.values.length),i=n.length-1}else for(let o=0;ot){n.set(e.times.slice(0,o+1),0),n[o+1]=t,n.set(e.times.slice(o+1),o+2),s.set(e.values.slice(0,(o+1)*r),0),s.set(a.evaluate(t),(o+1)*r),s.set(e.values.slice((o+1)*r),(o+2)*r),i=o+1;break}}return e.times=n,e.values=s,i},mergeMorphTargetTracks:function(e,t){let i=[],r={},n=e.tracks;for(let e=0;e{if(i.binary){t=_n.addExtention(t,_n.EXTENSION_GLB);let i=e;_n.saveArrayBuffer(i,t)}else t=_n.addExtention(t,_n.EXTENSION_GLTF),_n.saveJson(e,t)}),(e=>console.log(e)),i)}static exportToObj(e,t){if(!e||!t)throw new Error("Invalid input or filename!");t=_n.addExtention(t,_n.EXTENSION_OBJ);let i=(new FC).parse(e);_n.saveString(i,t)}static exportToDraco(e,t,i={}){if(!e||!t)throw new Error("Invalid input or filename!");t=_n.addExtention(t,_n.EXTENSION_DRACO);let r=new Zs;i=Object.assign({},{encodeSpeed:5},i);let n=r.parse(e,i);_n.saveArrayBuffer(n,t)}static exportToThreeJsJson(e,t){let i=e.toJSON();t.toLowerCase().endsWith(_n.EXTENSION_JSON)||(t+=_n.EXTENSION_JSON),_n.saveJson(i,t)}static save(e,t){let i=_n.downloadLink;i||(i=document.createElement("a"),i.style.display="none",document.body.appendChild(i),_n.downloadLink=i),i.href=URL.createObjectURL(e),i.download=t,i.click()}static saveArrayBuffer(e,t){_n.save(new Blob([e],{type:"application/octet-stream"}),t)}static saveJson(e,t){_n.saveJsonString(JSON.stringify(e),t)}static saveJsonString(e,t){_n.save(new Blob([e],{type:"application/json"}),t)}static saveString(e,t){_n.save(new Blob([e],{type:"text/csv"}),t)}static addExtention(e,t){return e.toLowerCase().endsWith(t.toLowerCase())||(e+=t),e}},zg=_n;zg.EXTENSION_GLTF=".gltf",zg.EXTENSION_GLB=".glb",zg.EXTENSION_OBJ=".obj",zg.EXTENSION_DRACO=".drc",zg.EXTENSION_JSON=".json";var HC=class{constructor(){this.prevTime=(performance||Date).now(),this.beginTime=(performance||Date).now(),this.frames=0,this.fps=Number.NaN}begin(){this.beginTime=(performance||Date).now()}end(){this.frames++;let e=(performance||Date).now();return e>=this.prevTime+1e3&&(this.fps=Math.round(1e3*this.frames/(e-this.prevTime)),this.frames=0,this.prevTime=e),e}update(){this.beginTime=this.end()}},SB=1e-15,sr=class{static roundNumber(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}static floorNumber(e,t){return Math.floor(e*Math.pow(10,t))/Math.pow(10,t)}static areNumbersEqual(e,t,i=1e-7){return Math.abs(e-t)e[0]===t[0]&&e[1]===t[1],MB=e=>Array.isArray(e)&&e.length,xpe=(e,t=0,i=!1)=>{let r,n;if(MB(e)&&"number"==typeof e[0][0]){let t=0,s=e;for(r=0,n=s.length;r0||i&&t<0)&&s.reverse()}else for(r=0,n=e.length;r0);if(0===t&&MB(e)&&MB(e[0])&&"number"==typeof e[0][0][0]){let t=e[0].slice(0,1)[0];e[0].pop(),e[0].push([t[0],t[1]])}return e},UC=class{constructor(e,t=5){if(this.distance=0,this.arcSegments=t,!Gx(e))throw new Error("Offset requires at least one coodinate to work with");this.edges=[],Gx(e)&&"number"==typeof e[0]?this.vertices=e:(this.vertices=xpe(e),this.processContour(this.vertices,this.edges))}processContour(e,t){let i,r;if(Gx(e[0])&&"number"==typeof e[0][0])for(r=e.length,bpe(e[0],e[r-1])&&(r-=1),i=0;ih?l-h:l+o-h,c=(a?-u:o-u)/s;e.push(r);for(let r=1;r0?this.margin(this.distance):this.padding(-this.distance)}offsetSegment(e,t,i,r){let n=[i.offset(i.inNormal[0]*r,i.inNormal[1]*r),i.inverseOffset(i.outNormal[0]*r,i.outNormal[1]*r)],s=[];for(let i=0,a=2;i0&&e.push(i)}e.length>0&&(t=1===e.length?e[0]:(0,jg.union)(e[0],...e.slice(1)))}else t=1===this.vertices.length?this.offsetPoint(e):this.offsetContour(this.vertices,this.edges);return t}offsetContour(e,t){let i=[],r=0,n=0;if(Gx(e[0])&&"number"==typeof e[0][0]){for(r=0,n=e.length-1;r0&&(i=1===i.length?[i[0]]:(0,jg.union)(i[0],i.slice(1)))}else{let s=[];for(r=0,n=t.length;r0&&s.push(i)}s.length>0&&(i=1===s.length?s[0]:(0,jg.union)(s[0],...s.slice(1)))}return i}offsetPoint(e){this.setDistance(e);let t=2*this.arcSegments,i=[],r=this.vertices,n=this.distance,s=0;t%2==0&&t++;for(let e=0;e{let i=e.attributes[t];if(i instanceof to){let r=i.clone();e.attributes[t]=r}}))}static isPointInPolygon(e,t,i=!1){let r=e.x,n=e.y,s=!1,a=t.length;for(let e=0,o=a-1;en!=u>n;i&&(c=l>=n!=u>=n),c&&r<(h-a)*(n-l)/(u-l)+a&&(s=!s)}return s}static caculateGeometryCenter(e){if(!e.hasAttribute("position"))return null;let t=e.getAttribute("position");if(0===t.count)return null;let i=new A,r=t.itemSize,n=t.array,s=[0,0,0];for(let e=0;e0&&i<0||r<0&&i>0)return!1;i=r}}return!0}static areLineSegmentsIntersecting(e,t){let{start:i,end:r}=e,{start:n,end:s}=t,a=n.clone().sub(i),o=r.clone().sub(i),l=s.clone().sub(i),h=a.cross(o).dot(l.cross(o)),u=i.clone().sub(n),c=s.clone().sub(n),p=r.clone().sub(n),d=u.cross(c).dot(p.cross(c));return h<0&&d<0}static getLineSegmentsIntersectingPoint(e,t){let{start:i,end:r}=e,{start:n,end:s}=t,a=Spe.subVectors(r,i).normalize(),o=wpe.subVectors(s,n).normalize();if(1===a.dot(o))return null;let l=Rpe.subVectors(n,i),h=a.clone().cross(o),u=l.clone().cross(o),c=l.clone().dot(h);if(c>=1e-5||c<=-1e-5)return null;let p=h.lengthSq();if(sr.areNumbersEqual(0,p))return;let d=u.clone().dot(h)/p,f=i.clone().add(a.multiplyScalar(d));return f.equals(i)||f.equals(r)?null:f}static isPointOnLineSegment(e,t,i=.001){let{start:r,end:n}=t,s=Spe.subVectors(r,n).length(),a=wpe.subVectors(e,r).length(),o=Rpe.subVectors(e,n).length();return Math.abs(s-(a+o))<=i}static isPointOnLineSegments(e,t,i=.001){let r=!1;for(let n=0;n{i?t.add(e):(t.x+=e.x,t.y+=e.y)})),t.divideScalar(e.length);let r=!1;if(kt.shouldRebasePositionOnRTC(t)){r=!0;for(let r=0;rDB||Math.abs(e.y)>DB||e instanceof A&&Math.abs(e.z)>DB}static calculateSurfaceArea(e){let t=0,i=e.getAttribute("position"),r=e.index;if(r)for(let e=0;e2&&(s=t?2*n:2*n-2);let a=new r(s),o=0;for(let e=0;e0&&e{let i=e.geometry.attributes.position.array;return e.localToWorld(new A(i[3*t],i[3*t+1],i[3*t+2]))};e.updateWorldMatrix(!0,!1);let a=(null==(i=e.geometry.getIndex())?void 0:i.array)||[],o=null!=(r=a[t])?r:t,l=null!=(n=a[t+1])?n:t+1;return[s(o),s(l)]}static arePolygonsIntersect(e,t){if(0===e.length||0===t.length||(Ipe.setFromPoints(e),_pe.setFromPoints(t),!Ipe.intersectsBox(_pe)))return!1;for(let i=0;i1-n)return;let o=t.y-e.y,l=e.x-t.x,h=o*e.x+l*e.y,u=r.y-i.y,c=i.x-r.x,p=u*i.x+c*i.y,d=o*c-u*l;return Math.abs(d){r.push([e.x,e.y])}));try{i=new UC(r).setArcSegments(2).offsetLine(t/2)}catch(e){return}if(!i||0===i.length)return;i=i[0];let n=[],s=[];for(let e=0;e{n.push(new le(e[0],e[1]))})),es.isClockWise(n)||n.reverse();else{let t=[];i[e].forEach((e=>{t.push(new le(e[0],e[1]))})),es.isClockWise(t)&&t.reverse(),s.push(t)}let a=es.triangulateShape(n,s),o=[];for(let e=0;en.push(...e)));let l=(new lt).setFromPoints(n);return l.setIndex(o),l}static releaseGeometryManually(e){e.index=null,e.attributes={}}static getAdjacentNonRepeatPoints(e,t=1e-7){let i=[],r=e.length;for(let n=0;n(e.ObjectsBoxSection="ObjectsBoxSection",e.PickPlaneSection="PickPlaneSection",e.AxisPlaneSection="AxisPlaneSection",e))(hT||{}),Js=class{static createGroundGrid(e,t,i){e=e||this.DEFAULT_WIDTH,t=t||this.DEFAULT_WIDTH_SEGS;let r=new _x(e,t);i?r.position.set(i.x,i.y,i.z):r.position.y=0;let n=r.material;return Array.isArray(n)||(n.opacity=this.DEFAULT_MAT_PARAMS.opacity,n.transparent=this.DEFAULT_MAT_PARAMS.transparent),r.name=this.GROUND_GRID_NAME,r.layers.set(11),r.matrixAutoUpdate=!1,r.updateMatrix(),r}static createGrassGround(e,t,i,r,n){return ht(this,null,(function*(){return t=t||this.DEFAULT_WIDTH,i=i||this.DEFAULT_HEIGHT,new Promise((s=>{(new bs).load(e||"images/terrain/grass.jpg",(e=>{e.wrapS=e.wrapT=vn,e.repeat.set(r||this.DEFAULT_WIDTH_SEGS/5,n||this.DEFAULT_HEIGHT_SETS/5),e.anisotropy=16,e.encoding=gr;let a=new io({map:e});a.side=tn;let o=new rt(new ts(t,i),a);return o.rotation.x=-Math.PI/2,o.position.y=0,o.receiveShadow=!0,o.name=this.GRASS_GROUND_NAME,o.layers.set(11),o.matrixAutoUpdate=!1,o.updateMatrix(),s(o)}))}))}))}};Js.GROUND_GRID_NAME="GROUND_GRID",Js.GRASS_GROUND_NAME="GRASS_GROUND",Js.DEFAULT_WIDTH=1e3,Js.DEFAULT_HEIGHT=1e3,Js.DEFAULT_WIDTH_SEGS=100,Js.DEFAULT_HEIGHT_SETS=100,Js.DEFAULT_MAT_PARAMS={color:12829635,transparent:!0,opacity:.5,wireframeLinewidth:.5};var Dpe={NavCube:{front:"Front",back:"Back",top:"Top",bottom:"Bottom",left:"Left",right:"Right"},ContextMenu:{viewFitAll:"View Fit All",hideAll:"Hide All",showAll:"Show All",xRayAll:"X-Ray",xRayNone:"X-Ray None",selectNone:"Select None",resetView:"Reset View",viewFitEntity:"View Fit",hideEntity:"Hide",hideOthers:"Hide Others",xRayEntity:"X-Ray",xRayOthers:"X-Ray Others",select:"Select",deselect:"Undo Select",showSectionPlane:"Show Section Plane",showSectionBox:"Show Section Box",showAxisSection:"Show Axis Section",hideSectionPlane:"Hide Section Plane",hideSectionBox:"Hide Section Box",hideAxisSection:"Hide Axis Section",undoSection:"Undo Section"},ProgressBar:{Loading:"Loading",Comparing:"Comparing"},Toolbar:{homeView:"Home",orthoView:"Ortho View",measurement:"Measure",distanceMeasurement:"Distance",areaMeasurement:"Area",angleMeasurement:"Angle",coordinateMeasurement:"Coordinate",clearMeasurement:"Clear",markup:"Markup",markupArrow:"Arrow",markupRect:"Rect",markupCloudRect:"CloudRect",markupPolyLine:"PolyLine",markupCloudLine:"CloudLine",markupEllipse:"Ellipse",markupCircle:"Circle",markupDot:"Dot",markupText:"Text",markupX:"X",markupStroke:"Stroke Style",markupLineWidth:"Line Width",markupLineWidth2:"Line Width 2",markupLineWidth5:"Line Width 5",markupLineWidth10:"Line Width 10",markupFontSize:"Font Size",markupFontSize14:"14",markupFontSize18:"18",markupFontSize24:"24",clearMarkup:"Clear Markup",quitMarkup:"Quit markup",section:"Section",axisSection:"Axis Section",pickSectionPlane:"Pick Section Plane",sectionBox:"Section Box",bimTree:"BIM Tree",viewpoint:"Viewpoint",annotation:"Annotation",property:"Property",settings:"Settings",compared:"Compared",quitCompare:"Quit compare",fullscreen:"Full Screen",layers:"Layers",zoomToRectangle:"Zoom",screenshot:"Screenshot"},Tooltip:{measure:"Pick a point to continue, pressing ESC to exit",areaMeasurement:"Pick a point to continue, pressing ESC to exit, right click to finish",section:"Click to pick a section plane",boxSelect:"Box select an area"},PopPanel:{reset:"Reset"}},Cpe={NavCube:{front:"前",back:"后",top:"上",bottom:"下",left:"左",right:"右"},ContextMenu:{viewFitAll:"缩放视口到所有模型",hideAll:"全部隐藏",showAll:"全部显示",xRayAll:"全部应用 X 光模式",xRayNone:"清除 X 光模式",selectNone:"清空选择",resetView:"重置视图",viewFitEntity:"缩放视口到实体",hideEntity:"隐藏",hideOthers:"隐藏其他 (隔离)",xRayEntity:"应用 X 光模式",xRayOthers:"对其他实体应用 X 光模式",select:"选择",deselect:"取消选择",showSectionPlane:"显示剖切面",showSectionBox:"显示剖切盒",showAxisSection:"显示轴向剖切",hideSectionPlane:"隐藏剖切面",hideSectionBox:"隐藏剖切盒",hideAxisSection:"隐藏轴向剖切",undoSection:"取消剖切"},ProgressBar:{Loading:"正在加载",Comparing:"正在对比"},Toolbar:{homeView:"主视图",orthoView:"正交视图",measurement:"测量",distanceMeasurement:"距离测量",areaMeasurement:"面积测量",angleMeasurement:"角度测量",coordinateMeasurement:"坐标测量",clearMeasurement:"清除测量",markup:"批注",markupArrow:"箭头",markupRect:"矩形框",markupCloudRect:"云线框",markupPolyLine:"多段线",markupCloudLine:"云线",markupEllipse:"椭圆",markupCircle:"圆",markupDot:"点",markupText:"文字",markupX:"叉号",markupStroke:"画笔颜色",markupLineWidth:"线宽",markupLineWidth2:"线宽 2",markupLineWidth5:"线宽 5",markupLineWidth10:"线宽 10",markupFontSize:"字号",markupFontSize14:"14",markupFontSize18:"18",markupFontSize24:"24",clearMarkup:"清除批注",quitMarkup:"退出批注",section:"剖切",axisSection:"轴向剖切",pickSectionPlane:"面剖切",sectionBox:"剖切盒",bimTree:"BIM树",viewpoint:"视点",annotation:"批注",property:"属性",settings:"设置",compared:"图纸对比",quitCompare:"退出图纸对比",fullscreen:"全屏",layers:"图层",zoomToRectangle:"框选放大",screenshot:"截屏"},Tooltip:{measure:"点击继续测量, ESC 取消测量",areaMeasurement:"点击继续测量, ESC 取消测量,右键完成测量",section:"点击确定剖切面",boxSelect:"框选一个区域"},PopPanel:{reset:"重置"}},Cs=class{static materialEquals(e,t){if(e===t)return!0;if(e.type!==t.type)return!1;if(e instanceof zr&&t instanceof zr){let i=e,r=t;return e.alphaTest===t.alphaTest&&e.opacity===t.opacity&&e.side===t.side&&e.visible===t.visible&&e.name===t.name&&e.transparent===t.transparent&&this.colorEquals(i.color,r.color)&&this.colorEquals(i.emissive,r.emissive)&&i.roughness===r.roughness&&i.metalness===r.metalness&&i.alphaMap===r.alphaMap&&i.uniforms===r.uniforms&&i.defines===r.defines&&i.vertexShader===r.vertexShader&&i.fragmentShader===r.fragmentShader&&i.clippingPlanes===r.clippingPlanes&&i.map===r.map&&i.clipIntersection===r.clipIntersection}return!1}static materialsEquals(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)&&e.length===t.length){for(let i=0;i0){let e=[];return i.forEach((i=>{e.push(this.clonedHighlightMaterial(i,t))})),e}if(i instanceof zr)return this.clonedHighlightMaterial(i,t);console.warn(`[MaterialUtils] Invalid material: ${i}`)}static clonedHighlightMaterial(e,t={}){var i;let{depthTest:r,highlightColor:n=new je(583902),opacity:s=.7}=t,a=e.clone();return a instanceof Gu||a instanceof Es?(a.emissive.set(n),a.color.set(n)):a instanceof or||a instanceof io||a instanceof vr||a instanceof Ap?a.color.set(n):a instanceof Yt?null==(i=a.uniforms.u_color)||i.value.set(n):a instanceof bg?a.color.set(n):console.warn("[MaterialUtils] Unsupported Material:",a.type),a.opacity=s,a.transparent=!0,void 0!==r&&(a.depthTest=!1,a.side=gi),a}static cloneMaterial(e){if(!e)return e;if(Array.isArray(e)){let t=[];return e.forEach((e=>{t.push(e.clone())})),t}return e.clone()}static getMaterialColor(e){let t=new je(16777215);return e instanceof jn||e instanceof vr||e instanceof or?t=e.color:e instanceof Yt&&e.uniforms.u_color&&(t=e.uniforms.u_color.value),t}static setMaterialColor(e,t){e instanceof jn||e instanceof vr||e instanceof or?e.color=t:e instanceof Yt&&e.uniforms.u_color&&(e.uniforms.u_color.value=t)}static cloneMaterials(e){let t=new Map;e.traverse((e=>{e.material&&(e.material=(e=>{let i;return Array.isArray(e)?(i=[],e.forEach((e=>{if(t.has(e))i.push(t.get(e));else{let r=e.clone();t.set(e,r),i.push(r)}}))):e&&(t.has(e)?i=t.get(e):(i=e.clone(),t.set(e,i))),i})(e.material))}))}};function zo(e,t=!1){let i=null!==e[0].index,r=new Set(Object.keys(e[0].attributes)),n=new Set(Object.keys(e[0].morphAttributes)),s={},a={},o=e[0].morphTargetsRelative,l=new lt,h=0;for(let u=0;ut in r?Sc(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Zi=(r,t)=>{for(var e in t||(t={}))Ec.call(t,e)&&Eo(r,e,t[e]);if(Ao)for(var e of Ao(t))Cc.call(t,e)&&Eo(r,e,t[e]);return r},Co=(r,t)=>Tc(r,Ac(t));var ro="149";var Pc=0,Po=1,Rc=2;var Wa=1,Lc=2,Ni=3,Ue=0,he=1,We=2;var pn=0,ri=1,Ro=2,Lo=3,Io=4,Ic=5,ni=100,Dc=101,Nc=102,Do=103,No=104,Fc=200,zc=201,Oc=202,Bc=203,qa=204,Xa=205,Uc=206,kc=207,Vc=208,Gc=209,Hc=210,Wc=0,qc=1,Xc=2,Er=3,Yc=4,Zc=5,Jc=6,$c=7,Ya=0,Kc=1,jc=2,nn=0,Qc=1,tl=2,el=3,nl=4,il=5,Za=300,ci=301,li=302,Cr=303,Pr=304,Ls=306,Rr=1e3,Oe=1001,Lr=1002,ce=1003,Fo=1004;var Zs=1005;var Re=1006,sl=1007;var Oi=1008;var Dn=1009,rl=1010,ol=1011,Ja=1012,al=1013,Pn=1014,Rn=1015,Bi=1016,cl=1017,ll=1018,oi=1020,hl=1021,Be=1023,ul=1024,fl=1025,Ln=1026,hi=1027,dl=1028,pl=1029,ml=1030,gl=1031,xl=1033,Js=33776,$s=33777,Ks=33778,js=33779,zo=35840,Oo=35841,Bo=35842,Uo=35843,_l=36196,ko=37492,Vo=37496,Go=37808,Ho=37809,Wo=37810,qo=37811,Xo=37812,Yo=37813,Zo=37814,Jo=37815,$o=37816,Ko=37817,jo=37818,Qo=37819,ta=37820,ea=37821,Qs=36492,yl=36283,na=36284,ia=36285,sa=36286;var xs=2300,_s=2301,tr=2302,ra=2400,oa=2401,aa=2402;var Nn=3e3,Ot=3001,vl=3200,Ml=3201,bl=0,wl=1;var Ge="srgb",Ui="srgb-linear";var er=7680;var Sl=519,ca=35044;var la="300 es",Ir=1035,mn=class{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[t]===void 0&&(n[t]=[]),n[t].indexOf(e)===-1&&n[t].push(e)}hasEventListener(t,e){if(this._listeners===void 0)return!1;let n=this._listeners;return n[t]!==void 0&&n[t].indexOf(e)!==-1}removeEventListener(t,e){if(this._listeners===void 0)return;let i=this._listeners[t];if(i!==void 0){let s=i.indexOf(e);s!==-1&&i.splice(s,1)}}dispatchEvent(t){if(this._listeners===void 0)return;let n=this._listeners[t.type];if(n!==void 0){t.target=this;let i=n.slice(0);for(let s=0,a=i.length;s>8&255]+ne[r>>16&255]+ne[r>>24&255]+"-"+ne[t&255]+ne[t>>8&255]+"-"+ne[t>>16&15|64]+ne[t>>24&255]+"-"+ne[e&63|128]+ne[e>>8&255]+"-"+ne[e>>16&255]+ne[e>>24&255]+ne[n&255]+ne[n>>8&255]+ne[n>>16&255]+ne[n>>24&255]).toLowerCase()}function de(r,t,e){return Math.max(t,Math.min(e,r))}function Tl(r,t){return(r%t+t)%t}function ir(r,t,e){return(1-e)*r+e*t}function ua(r){return(r&r-1)===0&&r!==0}function Dr(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}function Ji(r,t){switch(t.constructor){case Float32Array:return r;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function Me(r,t){switch(t.constructor){case Float32Array:return r;case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}var At=class{constructor(t=0,e=0){At.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){let n=Math.cos(e),i=Math.sin(e),s=this.x-t.x,a=this.y-t.y;return this.x=s*n-a*i+t.x,this.y=s*i+a*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},le=class{constructor(){le.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(t,e,n,i,s,a,o,c,l){let h=this.elements;return h[0]=t,h[1]=i,h[2]=o,h[3]=e,h[4]=s,h[5]=c,h[6]=n,h[7]=a,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,a=n[0],o=n[3],c=n[6],l=n[1],h=n[4],f=n[7],u=n[2],m=n[5],x=n[8],p=i[0],d=i[3],g=i[6],M=i[1],_=i[4],v=i[7],b=i[2],A=i[5],C=i[8];return s[0]=a*p+o*M+c*b,s[3]=a*d+o*_+c*A,s[6]=a*g+o*v+c*C,s[1]=l*p+h*M+f*b,s[4]=l*d+h*_+f*A,s[7]=l*g+h*v+f*C,s[2]=u*p+m*M+x*b,s[5]=u*d+m*_+x*A,s[8]=u*g+m*v+x*C,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],a=t[4],o=t[5],c=t[6],l=t[7],h=t[8];return e*a*h-e*o*l-n*s*h+n*o*c+i*s*l-i*a*c}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],a=t[4],o=t[5],c=t[6],l=t[7],h=t[8],f=h*a-o*l,u=o*c-h*s,m=l*s-a*c,x=e*f+n*u+i*m;if(x===0)return this.set(0,0,0,0,0,0,0,0,0);let p=1/x;return t[0]=f*p,t[1]=(i*l-h*n)*p,t[2]=(o*n-i*a)*p,t[3]=u*p,t[4]=(h*e-i*c)*p,t[5]=(i*s-o*e)*p,t[6]=m*p,t[7]=(n*c-l*e)*p,t[8]=(a*e-n*s)*p,this}transpose(){let t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,s,a,o){let c=Math.cos(s),l=Math.sin(s);return this.set(n*c,n*l,-n*(c*a+l*o)+a+t,-i*l,i*c,-i*(-l*a+c*o)+o+e,0,0,1),this}scale(t,e){return this.premultiply(sr.makeScale(t,e)),this}rotate(t){return this.premultiply(sr.makeRotation(-t)),this}translate(t,e){return this.premultiply(sr.makeTranslation(t,e)),this}makeTranslation(t,e){return this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<9;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return new this.constructor().fromArray(this.elements)}},sr=new le;function $a(r){for(let t=r.length-1;t>=0;--t)if(r[t]>=65535)return!0;return!1}function ys(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function In(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function gs(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}var rr={[Ge]:{[Ui]:In},[Ui]:{[Ge]:gs}},oe={legacyMode:!0,get workingColorSpace(){return Ui},set workingColorSpace(r){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(r,t,e){if(this.legacyMode||t===e||!t||!e)return r;if(rr[t]&&rr[t][e]!==void 0){let n=rr[t][e];return r.r=n(r.r),r.g=n(r.g),r.b=n(r.b),r}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(r,t){return this.convert(r,this.workingColorSpace,t)},toWorkingColorSpace:function(r,t){return this.convert(r,t,this.workingColorSpace)}},Ka={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},qt={r:0,g:0,b:0},Ne={h:0,s:0,l:0},$i={h:0,s:0,l:0};function or(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*6*(2/3-e):r}function Ki(r,t){return t.r=r.r,t.g=r.g,t.b=r.b,t}var Bt=class{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,e===void 0&&n===void 0?this.set(t):this.setRGB(t,e,n)}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Ge){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,oe.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=oe.workingColorSpace){return this.r=t,this.g=e,this.b=n,oe.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=oe.workingColorSpace){if(t=Tl(t,1),e=de(e,0,1),n=de(n,0,1),e===0)this.r=this.g=this.b=n;else{let s=n<=.5?n*(1+e):n+e-n*e,a=2*n-s;this.r=or(a,s,t+1/3),this.g=or(a,s,t),this.b=or(a,s,t-1/3)}return oe.toWorkingColorSpace(this,i),this}setStyle(t,e=Ge){function n(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^((?:rgb|hsl)a?)\\(([^\\)]*)\\)/.exec(t)){let s,a=i[1],o=i[2];switch(a){case"rgb":case"rgba":if(s=/^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(s[1],10))/255,this.g=Math.min(255,parseInt(s[2],10))/255,this.b=Math.min(255,parseInt(s[3],10))/255,oe.toWorkingColorSpace(this,e),n(s[4]),this;if(s=/^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(s[1],10))/100,this.g=Math.min(100,parseInt(s[2],10))/100,this.b=Math.min(100,parseInt(s[3],10))/100,oe.toWorkingColorSpace(this,e),n(s[4]),this;break;case"hsl":case"hsla":if(s=/^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(o)){let c=parseFloat(s[1])/360,l=parseFloat(s[2])/100,h=parseFloat(s[3])/100;return n(s[4]),this.setHSL(c,l,h,e)}break}}else if(i=/^\\#([A-Fa-f\\d]+)$/.exec(t)){let s=i[1],a=s.length;if(a===3)return this.r=parseInt(s.charAt(0)+s.charAt(0),16)/255,this.g=parseInt(s.charAt(1)+s.charAt(1),16)/255,this.b=parseInt(s.charAt(2)+s.charAt(2),16)/255,oe.toWorkingColorSpace(this,e),this;if(a===6)return this.r=parseInt(s.charAt(0)+s.charAt(1),16)/255,this.g=parseInt(s.charAt(2)+s.charAt(3),16)/255,this.b=parseInt(s.charAt(4)+s.charAt(5),16)/255,oe.toWorkingColorSpace(this,e),this}return t&&t.length>0?this.setColorName(t,e):this}setColorName(t,e=Ge){let n=Ka[t.toLowerCase()];return n!==void 0?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=In(t.r),this.g=In(t.g),this.b=In(t.b),this}copyLinearToSRGB(t){return this.r=gs(t.r),this.g=gs(t.g),this.b=gs(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Ge){return oe.fromWorkingColorSpace(Ki(this,qt),t),de(qt.r*255,0,255)<<16^de(qt.g*255,0,255)<<8^de(qt.b*255,0,255)<<0}getHexString(t=Ge){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=oe.workingColorSpace){oe.fromWorkingColorSpace(Ki(this,qt),e);let n=qt.r,i=qt.g,s=qt.b,a=Math.max(n,i,s),o=Math.min(n,i,s),c,l,h=(o+a)/2;if(o===a)c=0,l=0;else{let f=a-o;switch(l=h<=.5?f/(a+o):f/(2-a-o),a){case n:c=(i-s)/f+(i2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement!="undefined"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&t instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&t instanceof ImageBitmap){let e=ys("canvas");e.width=t.width,e.height=t.height;let n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);let i=n.getImageData(0,0,t.width,t.height),s=i.data;for(let a=0;a0&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==Za)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Rr:t.x=t.x-Math.floor(t.x);break;case Oe:t.x=t.x<0?0:1;break;case Lr:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Rr:t.y=t.y-Math.floor(t.y);break;case Oe:t.y=t.y<0?0:1;break;case Lr:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}};ue.DEFAULT_IMAGE=null;ue.DEFAULT_MAPPING=Za;ue.DEFAULT_ANISOTROPY=1;var Xt=class{constructor(t=0,e=0,n=0,i=1){Xt.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=this.w,a=t.elements;return this.x=a[0]*e+a[4]*n+a[8]*i+a[12]*s,this.y=a[1]*e+a[5]*n+a[9]*i+a[13]*s,this.z=a[2]*e+a[6]*n+a[10]*i+a[14]*s,this.w=a[3]*e+a[7]*n+a[11]*i+a[15]*s,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,s,c=t.elements,l=c[0],h=c[4],f=c[8],u=c[1],m=c[5],x=c[9],p=c[2],d=c[6],g=c[10];if(Math.abs(h-u)<.01&&Math.abs(f-p)<.01&&Math.abs(x-d)<.01){if(Math.abs(h+u)<.1&&Math.abs(f+p)<.1&&Math.abs(x+d)<.1&&Math.abs(l+m+g-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let _=(l+1)/2,v=(m+1)/2,b=(g+1)/2,A=(h+u)/4,C=(f+p)/4,y=(x+d)/4;return _>v&&_>b?_<.01?(n=0,i=.707106781,s=.707106781):(n=Math.sqrt(_),i=A/n,s=C/n):v>b?v<.01?(n=.707106781,i=0,s=.707106781):(i=Math.sqrt(v),n=A/i,s=y/i):b<.01?(n=.707106781,i=.707106781,s=0):(s=Math.sqrt(b),n=C/s,i=y/s),this.set(n,i,s,e),this}let M=Math.sqrt((d-x)*(d-x)+(f-p)*(f-p)+(u-h)*(u-h));return Math.abs(M)<.001&&(M=1),this.x=(d-x)/M,this.y=(f-p)/M,this.z=(u-h)/M,this.w=Math.acos((l+m+g-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},rn=class extends mn{constructor(t=1,e=1,n={}){super(),this.isWebGLRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new Xt(0,0,t,e),this.scissorTest=!1,this.viewport=new Xt(0,0,t,e);let i={width:t,height:e,depth:1};this.texture=new ue(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.internalFormat=n.internalFormat!==void 0?n.internalFormat:null,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Re,this.depthBuffer=n.depthBuffer!==void 0?n.depthBuffer:!0,this.stencilBuffer=n.stencilBuffer!==void 0?n.stencilBuffer:!1,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null,this.samples=n.samples!==void 0?n.samples:0}setSize(t,e,n=1){(this.width!==t||this.height!==e||this.depth!==n)&&(this.width=t,this.height=e,this.depth=n,this.texture.image.width=t,this.texture.image.height=e,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.isRenderTargetTexture=!0;let e=Object.assign({},t.texture.image);return this.texture.source=new Ms(e),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},bs=class extends ue{constructor(t=null,e=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=ce,this.minFilter=ce,this.wrapR=Oe,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Nr=class extends ue{constructor(t=null,e=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=ce,this.minFilter=ce,this.wrapR=Oe,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var gn=class{constructor(t=0,e=0,n=0,i=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,s,a,o){let c=n[i+0],l=n[i+1],h=n[i+2],f=n[i+3],u=s[a+0],m=s[a+1],x=s[a+2],p=s[a+3];if(o===0){t[e+0]=c,t[e+1]=l,t[e+2]=h,t[e+3]=f;return}if(o===1){t[e+0]=u,t[e+1]=m,t[e+2]=x,t[e+3]=p;return}if(f!==p||c!==u||l!==m||h!==x){let d=1-o,g=c*u+l*m+h*x+f*p,M=g>=0?1:-1,_=1-g*g;if(_>Number.EPSILON){let b=Math.sqrt(_),A=Math.atan2(b,g*M);d=Math.sin(d*A)/b,o=Math.sin(o*A)/b}let v=o*M;if(c=c*d+u*v,l=l*d+m*v,h=h*d+x*v,f=f*d+p*v,d===1-o){let b=1/Math.sqrt(c*c+l*l+h*h+f*f);c*=b,l*=b,h*=b,f*=b}}t[e]=c,t[e+1]=l,t[e+2]=h,t[e+3]=f}static multiplyQuaternionsFlat(t,e,n,i,s,a){let o=n[i],c=n[i+1],l=n[i+2],h=n[i+3],f=s[a],u=s[a+1],m=s[a+2],x=s[a+3];return t[e]=o*x+h*f+c*m-l*u,t[e+1]=c*x+h*u+l*f-o*m,t[e+2]=l*x+h*m+o*u-c*f,t[e+3]=h*x-o*f-c*u-l*m,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){let n=t._x,i=t._y,s=t._z,a=t._order,o=Math.cos,c=Math.sin,l=o(n/2),h=o(i/2),f=o(s/2),u=c(n/2),m=c(i/2),x=c(s/2);switch(a){case"XYZ":this._x=u*h*f+l*m*x,this._y=l*m*f-u*h*x,this._z=l*h*x+u*m*f,this._w=l*h*f-u*m*x;break;case"YXZ":this._x=u*h*f+l*m*x,this._y=l*m*f-u*h*x,this._z=l*h*x-u*m*f,this._w=l*h*f+u*m*x;break;case"ZXY":this._x=u*h*f-l*m*x,this._y=l*m*f+u*h*x,this._z=l*h*x+u*m*f,this._w=l*h*f-u*m*x;break;case"ZYX":this._x=u*h*f-l*m*x,this._y=l*m*f+u*h*x,this._z=l*h*x-u*m*f,this._w=l*h*f+u*m*x;break;case"YZX":this._x=u*h*f+l*m*x,this._y=l*m*f+u*h*x,this._z=l*h*x-u*m*f,this._w=l*h*f-u*m*x;break;case"XZY":this._x=u*h*f-l*m*x,this._y=l*m*f-u*h*x,this._z=l*h*x+u*m*f,this._w=l*h*f+u*m*x;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return e!==!1&&this._onChangeCallback(),this}setFromAxisAngle(t,e){let n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){let e=t.elements,n=e[0],i=e[4],s=e[8],a=e[1],o=e[5],c=e[9],l=e[2],h=e[6],f=e[10],u=n+o+f;if(u>0){let m=.5/Math.sqrt(u+1);this._w=.25/m,this._x=(h-c)*m,this._y=(s-l)*m,this._z=(a-i)*m}else if(n>o&&n>f){let m=2*Math.sqrt(1+n-o-f);this._w=(h-c)/m,this._x=.25*m,this._y=(i+a)/m,this._z=(s+l)/m}else if(o>f){let m=2*Math.sqrt(1+o-n-f);this._w=(s-l)/m,this._x=(i+a)/m,this._y=.25*m,this._z=(c+h)/m}else{let m=2*Math.sqrt(1+f-n-o);this._w=(a-i)/m,this._x=(s+l)/m,this._y=(c+h)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return nMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(de(this.dot(t),-1,1)))}rotateTowards(t,e){let n=this.angleTo(t);if(n===0)return this;let i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let n=t._x,i=t._y,s=t._z,a=t._w,o=e._x,c=e._y,l=e._z,h=e._w;return this._x=n*h+a*o+i*l-s*c,this._y=i*h+a*c+s*o-n*l,this._z=s*h+a*l+n*c-i*o,this._w=a*h-n*o-i*c-s*l,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);let n=this._x,i=this._y,s=this._z,a=this._w,o=a*t._w+n*t._x+i*t._y+s*t._z;if(o<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),o>=1)return this._w=a,this._x=n,this._y=i,this._z=s,this;let c=1-o*o;if(c<=Number.EPSILON){let m=1-e;return this._w=m*a+e*this._w,this._x=m*n+e*this._x,this._y=m*i+e*this._y,this._z=m*s+e*this._z,this.normalize(),this._onChangeCallback(),this}let l=Math.sqrt(c),h=Math.atan2(l,o),f=Math.sin((1-e)*h)/l,u=Math.sin(e*h)/l;return this._w=a*f+this._w*u,this._x=n*f+this._x*u,this._y=i*f+this._y*u,this._z=s*f+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){let t=Math.random(),e=Math.sqrt(1-t),n=Math.sqrt(t),i=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(e*Math.cos(i),n*Math.sin(s),n*Math.cos(s),e*Math.sin(i))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},R=class{constructor(t=0,e=0,n=0){R.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return n===void 0&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(fa.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(fa.setFromAxisAngle(t,e))}applyMatrix3(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[3]*n+s[6]*i,this.y=s[1]*e+s[4]*n+s[7]*i,this.z=s[2]*e+s[5]*n+s[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=t.elements,a=1/(s[3]*e+s[7]*n+s[11]*i+s[15]);return this.x=(s[0]*e+s[4]*n+s[8]*i+s[12])*a,this.y=(s[1]*e+s[5]*n+s[9]*i+s[13])*a,this.z=(s[2]*e+s[6]*n+s[10]*i+s[14])*a,this}applyQuaternion(t){let e=this.x,n=this.y,i=this.z,s=t.x,a=t.y,o=t.z,c=t.w,l=c*e+a*i-o*n,h=c*n+o*e-s*i,f=c*i+s*n-a*e,u=-s*e-a*n-o*i;return this.x=l*c+u*-s+h*-o-f*-a,this.y=h*c+u*-a+f*-s-l*-o,this.z=f*c+u*-o+l*-a-h*-s,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i,this.y=s[1]*e+s[5]*n+s[9]*i,this.z=s[2]*e+s[6]*n+s[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){let n=t.x,i=t.y,s=t.z,a=e.x,o=e.y,c=e.z;return this.x=i*c-s*o,this.y=s*a-n*c,this.z=n*o-i*a,this}projectOnVector(t){let e=t.lengthSq();if(e===0)return this.set(0,0,0);let n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return cr.copy(this).projectOnVector(t),this.sub(cr)}reflect(t){return this.sub(cr.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;let n=this.dot(t)/e;return Math.acos(de(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){let i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){let e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=(Math.random()-.5)*2,e=Math.random()*Math.PI*2,n=Math.sqrt(1-t**2);return this.x=n*Math.cos(e),this.y=n*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},cr=new R,fa=new gn,fe=class{constructor(t=new R(1/0,1/0,1/0),e=new R(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){let e=1/0,n=1/0,i=1/0,s=-1/0,a=-1/0,o=-1/0;for(let c=0,l=t.length;cs&&(s=h),f>a&&(a=f),u>o&&(o=u)}return this.min.set(e,n,i),this.max.set(s,a,o),this}setFromBufferAttribute(t){let e=1/0,n=1/0,i=1/0,s=-1/0,a=-1/0,o=-1/0;for(let c=0,l=t.count;cs&&(s=h),f>a&&(a=f),u>o&&(o=u)}return this.min.set(e,n,i),this.max.set(s,a,o),this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,Sn),Sn.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Ei),ji.subVectors(this.max,Ei),Hn.subVectors(t.a,Ei),Wn.subVectors(t.b,Ei),qn.subVectors(t.c,Ei),ln.subVectors(Wn,Hn),hn.subVectors(qn,Wn),Tn.subVectors(Hn,qn);let e=[0,-ln.z,ln.y,0,-hn.z,hn.y,0,-Tn.z,Tn.y,ln.z,0,-ln.x,hn.z,0,-hn.x,Tn.z,0,-Tn.x,-ln.y,ln.x,0,-hn.y,hn.x,0,-Tn.y,Tn.x,0];return!hr(e,Hn,Wn,qn,ji)||(e=[1,0,0,0,1,0,0,0,1],!hr(e,Hn,Wn,qn,ji))?!1:(Qi.crossVectors(ln,hn),e=[Qi.x,Qi.y,Qi.z],hr(e,Hn,Wn,qn,ji))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return Sn.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=this.getSize(Sn).length()*.5,t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(Ke[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Ke[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Ke[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Ke[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Ke[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Ke[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Ke[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Ke[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Ke),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},Ke=[new R,new R,new R,new R,new R,new R,new R,new R],Sn=new R,lr=new fe,Hn=new R,Wn=new R,qn=new R,ln=new R,hn=new R,Tn=new R,Ei=new R,ji=new R,Qi=new R,An=new R;function hr(r,t,e,n,i){for(let s=0,a=r.length-3;s<=a;s+=3){An.fromArray(r,s);let o=i.x*Math.abs(An.x)+i.y*Math.abs(An.y)+i.z*Math.abs(An.z),c=t.dot(An),l=e.dot(An),h=n.dot(An);if(Math.max(-Math.max(c,l,h),Math.min(c,l,h))>o)return!1}return!0}var El=new fe,Ci=new R,ur=new R,Fn=class{constructor(t=new R,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){let n=this.center;e!==void 0?n.copy(e):El.setFromPoints(t).getCenter(n);let i=0;for(let s=0,a=t.length;sthis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Ci.subVectors(t,this.center);let e=Ci.lengthSq();if(e>this.radius*this.radius){let n=Math.sqrt(e),i=(n-this.radius)*.5;this.center.addScaledVector(Ci,i/n),this.radius+=i}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(ur.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Ci.copy(t.center).add(ur)),this.expandByPoint(Ci.copy(t.center).sub(ur))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},je=new R,fr=new R,ts=new R,un=new R,dr=new R,es=new R,pr=new R,Fr=class{constructor(t=new R,e=new R(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,je)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);let n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=je.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(je.copy(this.direction).multiplyScalar(e).add(this.origin),je.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){fr.copy(t).add(e).multiplyScalar(.5),ts.copy(e).sub(t).normalize(),un.copy(this.origin).sub(fr);let s=t.distanceTo(e)*.5,a=-this.direction.dot(ts),o=un.dot(this.direction),c=-un.dot(ts),l=un.lengthSq(),h=Math.abs(1-a*a),f,u,m,x;if(h>0)if(f=a*c-o,u=a*o-c,x=s*h,f>=0)if(u>=-x)if(u<=x){let p=1/h;f*=p,u*=p,m=f*(f+a*u+2*o)+u*(a*f+u+2*c)+l}else u=s,f=Math.max(0,-(a*u+o)),m=-f*f+u*(u+2*c)+l;else u=-s,f=Math.max(0,-(a*u+o)),m=-f*f+u*(u+2*c)+l;else u<=-x?(f=Math.max(0,-(-a*s+o)),u=f>0?-s:Math.min(Math.max(-s,-c),s),m=-f*f+u*(u+2*c)+l):u<=x?(f=0,u=Math.min(Math.max(-s,-c),s),m=u*(u+2*c)+l):(f=Math.max(0,-(a*s+o)),u=f>0?s:Math.min(Math.max(-s,-c),s),m=-f*f+u*(u+2*c)+l);else u=a>0?-s:s,f=Math.max(0,-(a*u+o)),m=-f*f+u*(u+2*c)+l;return n&&n.copy(this.direction).multiplyScalar(f).add(this.origin),i&&i.copy(ts).multiplyScalar(u).add(fr),m}intersectSphere(t,e){je.subVectors(t.center,this.origin);let n=je.dot(this.direction),i=je.dot(je)-n*n,s=t.radius*t.radius;if(i>s)return null;let a=Math.sqrt(s-i),o=n-a,c=n+a;return o<0&&c<0?null:o<0?this.at(c,e):this.at(o,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){let n=this.distanceToPlane(t);return n===null?null:this.at(n,e)}intersectsPlane(t){let e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,s,a,o,c,l=1/this.direction.x,h=1/this.direction.y,f=1/this.direction.z,u=this.origin;return l>=0?(n=(t.min.x-u.x)*l,i=(t.max.x-u.x)*l):(n=(t.max.x-u.x)*l,i=(t.min.x-u.x)*l),h>=0?(s=(t.min.y-u.y)*h,a=(t.max.y-u.y)*h):(s=(t.max.y-u.y)*h,a=(t.min.y-u.y)*h),n>a||s>i||((s>n||isNaN(n))&&(n=s),(a=0?(o=(t.min.z-u.z)*f,c=(t.max.z-u.z)*f):(o=(t.max.z-u.z)*f,c=(t.min.z-u.z)*f),n>c||o>i)||((o>n||n!==n)&&(n=o),(c=0?n:i,e)}intersectsBox(t){return this.intersectBox(t,je)!==null}intersectTriangle(t,e,n,i,s){dr.subVectors(e,t),es.subVectors(n,t),pr.crossVectors(dr,es);let a=this.direction.dot(pr),o;if(a>0){if(i)return null;o=1}else if(a<0)o=-1,a=-a;else return null;un.subVectors(this.origin,t);let c=o*this.direction.dot(es.crossVectors(un,es));if(c<0)return null;let l=o*this.direction.dot(dr.cross(un));if(l<0||c+l>a)return null;let h=-o*un.dot(pr);return h<0?null:this.at(h/a,s)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},zt=class{constructor(){zt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(t,e,n,i,s,a,o,c,l,h,f,u,m,x,p,d){let g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=i,g[1]=s,g[5]=a,g[9]=o,g[13]=c,g[2]=l,g[6]=h,g[10]=f,g[14]=u,g[3]=m,g[7]=x,g[11]=p,g[15]=d,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new zt().fromArray(this.elements)}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){let e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){let e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){let e=this.elements,n=t.elements,i=1/Xn.setFromMatrixColumn(t,0).length(),s=1/Xn.setFromMatrixColumn(t,1).length(),a=1/Xn.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*s,e[5]=n[5]*s,e[6]=n[6]*s,e[7]=0,e[8]=n[8]*a,e[9]=n[9]*a,e[10]=n[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){let e=this.elements,n=t.x,i=t.y,s=t.z,a=Math.cos(n),o=Math.sin(n),c=Math.cos(i),l=Math.sin(i),h=Math.cos(s),f=Math.sin(s);if(t.order==="XYZ"){let u=a*h,m=a*f,x=o*h,p=o*f;e[0]=c*h,e[4]=-c*f,e[8]=l,e[1]=m+x*l,e[5]=u-p*l,e[9]=-o*c,e[2]=p-u*l,e[6]=x+m*l,e[10]=a*c}else if(t.order==="YXZ"){let u=c*h,m=c*f,x=l*h,p=l*f;e[0]=u+p*o,e[4]=x*o-m,e[8]=a*l,e[1]=a*f,e[5]=a*h,e[9]=-o,e[2]=m*o-x,e[6]=p+u*o,e[10]=a*c}else if(t.order==="ZXY"){let u=c*h,m=c*f,x=l*h,p=l*f;e[0]=u-p*o,e[4]=-a*f,e[8]=x+m*o,e[1]=m+x*o,e[5]=a*h,e[9]=p-u*o,e[2]=-a*l,e[6]=o,e[10]=a*c}else if(t.order==="ZYX"){let u=a*h,m=a*f,x=o*h,p=o*f;e[0]=c*h,e[4]=x*l-m,e[8]=u*l+p,e[1]=c*f,e[5]=p*l+u,e[9]=m*l-x,e[2]=-l,e[6]=o*c,e[10]=a*c}else if(t.order==="YZX"){let u=a*c,m=a*l,x=o*c,p=o*l;e[0]=c*h,e[4]=p-u*f,e[8]=x*f+m,e[1]=f,e[5]=a*h,e[9]=-o*h,e[2]=-l*h,e[6]=m*f+x,e[10]=u-p*f}else if(t.order==="XZY"){let u=a*c,m=a*l,x=o*c,p=o*l;e[0]=c*h,e[4]=-f,e[8]=l*h,e[1]=u*f+p,e[5]=a*h,e[9]=m*f-x,e[2]=x*f-m,e[6]=o*h,e[10]=p*f+u}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Cl,t,Pl)}lookAt(t,e,n){let i=this.elements;return be.subVectors(t,e),be.lengthSq()===0&&(be.z=1),be.normalize(),fn.crossVectors(n,be),fn.lengthSq()===0&&(Math.abs(n.z)===1?be.x+=1e-4:be.z+=1e-4,be.normalize(),fn.crossVectors(n,be)),fn.normalize(),ns.crossVectors(be,fn),i[0]=fn.x,i[4]=ns.x,i[8]=be.x,i[1]=fn.y,i[5]=ns.y,i[9]=be.y,i[2]=fn.z,i[6]=ns.z,i[10]=be.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,a=n[0],o=n[4],c=n[8],l=n[12],h=n[1],f=n[5],u=n[9],m=n[13],x=n[2],p=n[6],d=n[10],g=n[14],M=n[3],_=n[7],v=n[11],b=n[15],A=i[0],C=i[4],y=i[8],S=i[12],P=i[1],O=i[5],B=i[9],D=i[13],I=i[2],k=i[6],Y=i[10],Z=i[14],H=i[3],$=i[7],J=i[11],dt=i[15];return s[0]=a*A+o*P+c*I+l*H,s[4]=a*C+o*O+c*k+l*$,s[8]=a*y+o*B+c*Y+l*J,s[12]=a*S+o*D+c*Z+l*dt,s[1]=h*A+f*P+u*I+m*H,s[5]=h*C+f*O+u*k+m*$,s[9]=h*y+f*B+u*Y+m*J,s[13]=h*S+f*D+u*Z+m*dt,s[2]=x*A+p*P+d*I+g*H,s[6]=x*C+p*O+d*k+g*$,s[10]=x*y+p*B+d*Y+g*J,s[14]=x*S+p*D+d*Z+g*dt,s[3]=M*A+_*P+v*I+b*H,s[7]=M*C+_*O+v*k+b*$,s[11]=M*y+_*B+v*Y+b*J,s[15]=M*S+_*D+v*Z+b*dt,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[4],i=t[8],s=t[12],a=t[1],o=t[5],c=t[9],l=t[13],h=t[2],f=t[6],u=t[10],m=t[14],x=t[3],p=t[7],d=t[11],g=t[15];return x*(+s*c*f-i*l*f-s*o*u+n*l*u+i*o*m-n*c*m)+p*(+e*c*m-e*l*u+s*a*u-i*a*m+i*l*h-s*c*h)+d*(+e*l*f-e*o*m-s*a*f+n*a*m+s*o*h-n*l*h)+g*(-i*o*h-e*c*f+e*o*u+i*a*f-n*a*u+n*c*h)}transpose(){let t=this.elements,e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){let i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],a=t[4],o=t[5],c=t[6],l=t[7],h=t[8],f=t[9],u=t[10],m=t[11],x=t[12],p=t[13],d=t[14],g=t[15],M=f*d*l-p*u*l+p*c*m-o*d*m-f*c*g+o*u*g,_=x*u*l-h*d*l-x*c*m+a*d*m+h*c*g-a*u*g,v=h*p*l-x*f*l+x*o*m-a*p*m-h*o*g+a*f*g,b=x*f*c-h*p*c-x*o*u+a*p*u+h*o*d-a*f*d,A=e*M+n*_+i*v+s*b;if(A===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let C=1/A;return t[0]=M*C,t[1]=(p*u*s-f*d*s-p*i*m+n*d*m+f*i*g-n*u*g)*C,t[2]=(o*d*s-p*c*s+p*i*l-n*d*l-o*i*g+n*c*g)*C,t[3]=(f*c*s-o*u*s-f*i*l+n*u*l+o*i*m-n*c*m)*C,t[4]=_*C,t[5]=(h*d*s-x*u*s+x*i*m-e*d*m-h*i*g+e*u*g)*C,t[6]=(x*c*s-a*d*s-x*i*l+e*d*l+a*i*g-e*c*g)*C,t[7]=(a*u*s-h*c*s+h*i*l-e*u*l-a*i*m+e*c*m)*C,t[8]=v*C,t[9]=(x*f*s-h*p*s-x*n*m+e*p*m+h*n*g-e*f*g)*C,t[10]=(a*p*s-x*o*s+x*n*l-e*p*l-a*n*g+e*o*g)*C,t[11]=(h*o*s-a*f*s-h*n*l+e*f*l+a*n*m-e*o*m)*C,t[12]=b*C,t[13]=(h*p*i-x*f*i+x*n*u-e*p*u-h*n*d+e*f*d)*C,t[14]=(x*o*i-a*p*i-x*n*c+e*p*c+a*n*d-e*o*d)*C,t[15]=(a*f*i-h*o*i+h*n*c-e*f*c-a*n*u+e*o*u)*C,this}scale(t){let e=this.elements,n=t.x,i=t.y,s=t.z;return e[0]*=n,e[4]*=i,e[8]*=s,e[1]*=n,e[5]*=i,e[9]*=s,e[2]*=n,e[6]*=i,e[10]*=s,e[3]*=n,e[7]*=i,e[11]*=s,this}getMaxScaleOnAxis(){let t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){let e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){let n=Math.cos(e),i=Math.sin(e),s=1-n,a=t.x,o=t.y,c=t.z,l=s*a,h=s*o;return this.set(l*a+n,l*o-i*c,l*c+i*o,0,l*o+i*c,h*o+n,h*c-i*a,0,l*c-i*o,h*c+i*a,s*c*c+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,s,a){return this.set(1,n,s,0,t,1,a,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){let i=this.elements,s=e._x,a=e._y,o=e._z,c=e._w,l=s+s,h=a+a,f=o+o,u=s*l,m=s*h,x=s*f,p=a*h,d=a*f,g=o*f,M=c*l,_=c*h,v=c*f,b=n.x,A=n.y,C=n.z;return i[0]=(1-(p+g))*b,i[1]=(m+v)*b,i[2]=(x-_)*b,i[3]=0,i[4]=(m-v)*A,i[5]=(1-(u+g))*A,i[6]=(d+M)*A,i[7]=0,i[8]=(x+_)*C,i[9]=(d-M)*C,i[10]=(1-(u+p))*C,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){let i=this.elements,s=Xn.set(i[0],i[1],i[2]).length(),a=Xn.set(i[4],i[5],i[6]).length(),o=Xn.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),t.x=i[12],t.y=i[13],t.z=i[14],Fe.copy(this);let l=1/s,h=1/a,f=1/o;return Fe.elements[0]*=l,Fe.elements[1]*=l,Fe.elements[2]*=l,Fe.elements[4]*=h,Fe.elements[5]*=h,Fe.elements[6]*=h,Fe.elements[8]*=f,Fe.elements[9]*=f,Fe.elements[10]*=f,e.setFromRotationMatrix(Fe),n.x=s,n.y=a,n.z=o,this}makePerspective(t,e,n,i,s,a){let o=this.elements,c=2*s/(e-t),l=2*s/(n-i),h=(e+t)/(e-t),f=(n+i)/(n-i),u=-(a+s)/(a-s),m=-2*a*s/(a-s);return o[0]=c,o[4]=0,o[8]=h,o[12]=0,o[1]=0,o[5]=l,o[9]=f,o[13]=0,o[2]=0,o[6]=0,o[10]=u,o[14]=m,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(t,e,n,i,s,a){let o=this.elements,c=1/(e-t),l=1/(n-i),h=1/(a-s),f=(e+t)*c,u=(n+i)*l,m=(a+s)*h;return o[0]=2*c,o[4]=0,o[8]=0,o[12]=-f,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-u,o[2]=0,o[6]=0,o[10]=-2*h,o[14]=-m,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<16;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}},Xn=new R,Fe=new zt,Cl=new R(0,0,0),Pl=new R(1,1,1),fn=new R,ns=new R,be=new R,da=new zt,pa=new gn,ui=class{constructor(t=0,e=0,n=0,i=ui.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){let i=t.elements,s=i[0],a=i[4],o=i[8],c=i[1],l=i[5],h=i[9],f=i[2],u=i[6],m=i[10];switch(e){case"XYZ":this._y=Math.asin(de(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-h,m),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-de(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(o,m),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(de(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-de(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(u,m),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(de(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(o,m));break;case"XZY":this._z=Math.asin(-de(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(o,s)):(this._x=Math.atan2(-h,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return da.makeRotationFromQuaternion(t),this.setFromRotationMatrix(da,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return pa.setFromEuler(this),this.setFromQuaternion(pa,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};ui.DEFAULT_ORDER="XYZ";var ws=class{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let e=0;e1){for(let n=0;n0&&(n=n.concat(a))}return n}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Pi,t,Ll),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Pi,Il,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);let e=this.children;for(let n=0,i=e.length;n0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON()));function s(o,c){return o[c.uuid]===void 0&&(o[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(t.geometries,this.geometry);let o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){let c=o.shapes;if(Array.isArray(c))for(let l=0,h=c.length;l0){i.children=[];for(let o=0;o0){i.animations=[];for(let o=0;o0&&(n.geometries=o),c.length>0&&(n.materials=c),l.length>0&&(n.textures=l),h.length>0&&(n.images=h),f.length>0&&(n.shapes=f),u.length>0&&(n.skeletons=u),m.length>0&&(n.animations=m),x.length>0&&(n.nodes=x)}return n.object=i,n;function a(o){let c=[];for(let l in o){let h=o[l];delete h.metadata,c.push(h)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let n=0;n0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(t,e,n,i,s){ze.subVectors(i,e),tn.subVectors(n,e),mr.subVectors(t,e);let a=ze.dot(ze),o=ze.dot(tn),c=ze.dot(mr),l=tn.dot(tn),h=tn.dot(mr),f=a*l-o*o;if(f===0)return s.set(-2,-1,-1);let u=1/f,m=(l*c-o*h)*u,x=(a*h-o*c)*u;return s.set(1-m-x,x,m)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,en),en.x>=0&&en.y>=0&&en.x+en.y<=1}static getUV(t,e,n,i,s,a,o,c){return this.getBarycoord(t,e,n,i,en),c.set(0,0),c.addScaledVector(s,en.x),c.addScaledVector(a,en.y),c.addScaledVector(o,en.z),c}static isFrontFacing(t,e,n,i){return ze.subVectors(n,e),tn.subVectors(t,e),ze.cross(tn).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return ze.subVectors(this.c,this.b),tn.subVectors(this.a,this.b),ze.cross(tn).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return ie.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return ie.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,n,i,s){return ie.getUV(t,this.a,this.b,this.c,e,n,i,s)}containsPoint(t){return ie.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return ie.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){let n=this.a,i=this.b,s=this.c,a,o;Zn.subVectors(i,n),Jn.subVectors(s,n),gr.subVectors(t,n);let c=Zn.dot(gr),l=Jn.dot(gr);if(c<=0&&l<=0)return e.copy(n);xr.subVectors(t,i);let h=Zn.dot(xr),f=Jn.dot(xr);if(h>=0&&f<=h)return e.copy(i);let u=c*f-h*l;if(u<=0&&c>=0&&h<=0)return a=c/(c-h),e.copy(n).addScaledVector(Zn,a);_r.subVectors(t,s);let m=Zn.dot(_r),x=Jn.dot(_r);if(x>=0&&m<=x)return e.copy(s);let p=m*l-c*x;if(p<=0&&l>=0&&x<=0)return o=l/(l-x),e.copy(n).addScaledVector(Jn,o);let d=h*x-m*f;if(d<=0&&f-h>=0&&m-x>=0)return va.subVectors(s,i),o=(f-h)/(f-h+(m-x)),e.copy(i).addScaledVector(va,o);let g=1/(d+p+u);return a=p*g,o=u*g,e.copy(n).addScaledVector(Zn,a).addScaledVector(Jn,o)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},Nl=0,fi=class extends mn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Nl++}),this.uuid=Gi(),this.name="",this.type="Material",this.blending=ri,this.side=Ue,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=qa,this.blendDst=Xa,this.blendEquation=ni,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Er,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Sl,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=er,this.stencilZFail=er,this.stencilZPass=er,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(let e in t){let n=t[e];if(n===void 0){console.warn("THREE.Material: \'"+e+"\' parameter is undefined.");continue}let i=this[e];if(i===void 0){console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.");continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n}}toJSON(t){let e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});let n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==ri&&(n.blending=this.blending),this.side!==Ue&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(n.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(s){let a=[];for(let o in s){let c=s[o];delete c.metadata,a.push(c)}return a}if(e){let s=i(t.textures),a=i(t.images);s.length>0&&(n.textures=s),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;let e=t.clippingPlanes,n=null;if(e!==null){let i=e.length;n=new Array(i);for(let s=0;s!==i;++s)n[s]=e[s].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}},Ss=class extends fi{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Bt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Ya,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}},Ht=new R,ss=new At,Yt=class{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=n,this.usage=ca,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,s=this.itemSize;i0&&(t.userData=this.userData),this.parameters!==void 0){let c=this.parameters;for(let l in c)c[l]!==void 0&&(t[l]=c[l]);return t}t.data={attributes:{}};let e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});let n=this.attributes;for(let c in n){let l=n[c];t.data.attributes[c]=l.toJSON(t.data)}let i={},s=!1;for(let c in this.morphAttributes){let l=this.morphAttributes[c],h=[];for(let f=0,u=l.length;f0&&(i[c]=h,s=!0)}s&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(t.data.groups=JSON.parse(JSON.stringify(a)));let o=this.boundingSphere;return o!==null&&(t.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=t.name;let n=t.index;n!==null&&this.setIndex(n.clone(e));let i=t.attributes;for(let l in i){let h=i[l];this.setAttribute(l,h.clone(e))}let s=t.morphAttributes;for(let l in s){let h=[],f=s[l];for(let u=0,m=f.length;u0){let i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=i.length;se.far?null:{distance:l,point:ls.clone(),object:r}}function hs(r,t,e,n,i,s,a,o,c){r.getVertexPosition(a,Li),r.getVertexPosition(o,Ii),r.getVertexPosition(c,Di);let l=zl(r,t,e,n,Li,Ii,Di,br);if(l){i&&(os.fromBufferAttribute(i,a),as.fromBufferAttribute(i,o),cs.fromBufferAttribute(i,c),l.uv=ie.getUV(br,Li,Ii,Di,os,as,cs,new At)),s&&(os.fromBufferAttribute(s,a),as.fromBufferAttribute(s,o),cs.fromBufferAttribute(s,c),l.uv2=ie.getUV(br,Li,Ii,Di,os,as,cs,new At));let h={a,b:o,c,normal:new R,materialIndex:0};ie.getNormal(Li,Ii,Di,h.normal),l.face=h}return l}var zn=class extends ke{constructor(t=1,e=1,n=1,i=1,s=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:s,depthSegments:a};let o=this;i=Math.floor(i),s=Math.floor(s),a=Math.floor(a);let c=[],l=[],h=[],f=[],u=0,m=0;x("z","y","x",-1,-1,n,e,t,a,s,0),x("z","y","x",1,-1,n,e,-t,a,s,1),x("x","z","y",1,1,t,n,e,i,a,2),x("x","z","y",1,-1,t,n,-e,i,a,3),x("x","y","z",1,-1,t,e,n,i,s,4),x("x","y","z",-1,-1,t,e,-n,i,s,5),this.setIndex(c),this.setAttribute("position",new sn(l,3)),this.setAttribute("normal",new sn(h,3)),this.setAttribute("uv",new sn(f,2));function x(p,d,g,M,_,v,b,A,C,y,S){let P=v/C,O=b/y,B=v/2,D=b/2,I=A/2,k=C+1,Y=y+1,Z=0,H=0,$=new R;for(let J=0;J0?1:-1,h.push($.x,$.y,$.z),f.push(z/C),f.push(1-J/y),Z+=1}}for(let J=0;J0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;let n={};for(let i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}},Es=class extends pe{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new zt,this.projectionMatrix=new zt,this.projectionMatrixInverse=new zt}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}},Se=class extends Es{constructor(t=50,e=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){let e=.5*this.getFilmHeight()/t;this.fov=ha*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){let t=Math.tan(nr*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return ha*2*Math.atan(Math.tan(nr*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,n,i,s,a){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=this.near,e=t*Math.tan(nr*.5*this.fov)/this.zoom,n=2*e,i=this.aspect*n,s=-.5*i,a=this.view;if(this.view!==null&&this.view.enabled){let c=a.fullWidth,l=a.fullHeight;s+=a.offsetX*i/c,e-=a.offsetY*n/l,i*=a.width/c,n*=a.height/l}let o=this.filmOffset;o!==0&&(s+=t*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+i,e,e-n,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}},jn=-90,Qn=1,zr=class extends pe{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n;let i=new Se(jn,Qn,t,e);i.layers=this.layers,i.up.set(0,1,0),i.lookAt(1,0,0),this.add(i);let s=new Se(jn,Qn,t,e);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(-1,0,0),this.add(s);let a=new Se(jn,Qn,t,e);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(0,1,0),this.add(a);let o=new Se(jn,Qn,t,e);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(0,-1,0),this.add(o);let c=new Se(jn,Qn,t,e);c.layers=this.layers,c.up.set(0,1,0),c.lookAt(0,0,1),this.add(c);let l=new Se(jn,Qn,t,e);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,-1),this.add(l)}update(t,e){this.parent===null&&this.updateMatrixWorld();let n=this.renderTarget,[i,s,a,o,c,l]=this.children,h=t.getRenderTarget(),f=t.toneMapping,u=t.xr.enabled;t.toneMapping=nn,t.xr.enabled=!1;let m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0),t.render(e,i),t.setRenderTarget(n,1),t.render(e,s),t.setRenderTarget(n,2),t.render(e,a),t.setRenderTarget(n,3),t.render(e,o),t.setRenderTarget(n,4),t.render(e,c),n.texture.generateMipmaps=m,t.setRenderTarget(n,5),t.render(e,l),t.setRenderTarget(h),t.toneMapping=f,t.xr.enabled=u,n.texture.needsPMREMUpdate=!0}},Cs=class extends ue{constructor(t,e,n,i,s,a,o,c,l,h){t=t!==void 0?t:[],e=e!==void 0?e:ci,super(t,e,n,i,s,a,o,c,l,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}},Or=class extends rn{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;let n={width:t,height:t,depth:1},i=[n,n,n,n,n,n];this.texture=new Cs(i,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=e.generateMipmaps!==void 0?e.generateMipmaps:!1,this.texture.minFilter=e.minFilter!==void 0?e.minFilter:Re}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.encoding=e.encoding,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:`\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t`,fragmentShader:`\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t`},i=new zn(5,5,5),s=new on({name:"CubemapFromEquirect",uniforms:di(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:he,blending:pn});s.uniforms.tEquirect.value=e;let a=new qe(i,s),o=e.minFilter;return e.minFilter===Oi&&(e.minFilter=Re),new zr(1,10,this).update(t,a),e.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(t,e,n,i){let s=t.getRenderTarget();for(let a=0;a<6;a++)t.setRenderTarget(this,a),t.clear(e,n,i);t.setRenderTarget(s)}},wr=new R,Vl=new R,Gl=new le,Te=class{constructor(t=new R(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){let i=wr.subVectors(n,e).cross(Vl.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){let t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,e){let n=t.delta(wr),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;let s=-(t.start.dot(this.normal)+this.constant)/i;return s<0||s>1?null:e.copy(n).multiplyScalar(s).add(t.start)}intersectsLine(t){let e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){let n=e||Gl.getNormalMatrix(t),i=this.coplanarPoint(wr).applyMatrix4(t),s=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(s),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}},ti=new Fn,us=new R,Ps=class{constructor(t=new Te,e=new Te,n=new Te,i=new Te,s=new Te,a=new Te){this.planes=[t,e,n,i,s,a]}set(t,e,n,i,s,a){let o=this.planes;return o[0].copy(t),o[1].copy(e),o[2].copy(n),o[3].copy(i),o[4].copy(s),o[5].copy(a),this}copy(t){let e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t){let e=this.planes,n=t.elements,i=n[0],s=n[1],a=n[2],o=n[3],c=n[4],l=n[5],h=n[6],f=n[7],u=n[8],m=n[9],x=n[10],p=n[11],d=n[12],g=n[13],M=n[14],_=n[15];return e[0].setComponents(o-i,f-c,p-u,_-d).normalize(),e[1].setComponents(o+i,f+c,p+u,_+d).normalize(),e[2].setComponents(o+s,f+l,p+m,_+g).normalize(),e[3].setComponents(o-s,f-l,p-m,_-g).normalize(),e[4].setComponents(o-a,f-h,p-x,_-M).normalize(),e[5].setComponents(o+a,f+h,p+x,_+M).normalize(),this}intersectsObject(t){let e=t.geometry;return e.boundingSphere===null&&e.computeBoundingSphere(),ti.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(ti)}intersectsSprite(t){return ti.center.set(0,0,0),ti.radius=.7071067811865476,ti.applyMatrix4(t.matrixWorld),this.intersectsSphere(ti)}intersectsSphere(t){let e=this.planes,n=t.center,i=-t.radius;for(let s=0;s<6;s++)if(e[s].distanceToPoint(n)0?t.max.x:t.min.x,us.y=i.normal.y>0?t.max.y:t.min.y,us.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(us)<0)return!1}return!0}containsPoint(t){let e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function Qa(){let r=null,t=!1,e=null,n=null;function i(s,a){e(s,a),n=r.requestAnimationFrame(i)}return{start:function(){t!==!0&&e!==null&&(n=r.requestAnimationFrame(i),t=!0)},stop:function(){r.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(s){e=s},setContext:function(s){r=s}}}function Hl(r,t){let e=t.isWebGL2,n=new WeakMap;function i(l,h){let f=l.array,u=l.usage,m=r.createBuffer();r.bindBuffer(h,m),r.bufferData(h,f,u),l.onUploadCallback();let x;if(f instanceof Float32Array)x=5126;else if(f instanceof Uint16Array)if(l.isFloat16BufferAttribute)if(e)x=5131;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else x=5123;else if(f instanceof Int16Array)x=5122;else if(f instanceof Uint32Array)x=5125;else if(f instanceof Int32Array)x=5124;else if(f instanceof Int8Array)x=5120;else if(f instanceof Uint8Array)x=5121;else if(f instanceof Uint8ClampedArray)x=5121;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:m,type:x,bytesPerElement:f.BYTES_PER_ELEMENT,version:l.version}}function s(l,h,f){let u=h.array,m=h.updateRange;r.bindBuffer(f,l),m.count===-1?r.bufferSubData(f,0,u):(e?r.bufferSubData(f,m.offset*u.BYTES_PER_ELEMENT,u,m.offset,m.count):r.bufferSubData(f,m.offset*u.BYTES_PER_ELEMENT,u.subarray(m.offset,m.offset+m.count)),m.count=-1),h.onUploadCallback()}function a(l){return l.isInterleavedBufferAttribute&&(l=l.data),n.get(l)}function o(l){l.isInterleavedBufferAttribute&&(l=l.data);let h=n.get(l);h&&(r.deleteBuffer(h.buffer),n.delete(l))}function c(l,h){if(l.isGLBufferAttribute){let u=n.get(l);(!u||u.version 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif`,Ql=`#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\t return vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat R21 = R12;\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif`,th=`#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos.xyz );\n\t\tvec3 vSigmaY = dFdy( surf_pos.xyz );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif`,eh=`#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif`,nh=`#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif`,ih=`#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif`,sh=`#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif`,rh=`#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif`,oh=`#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif`,ah=`#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif`,ch=`#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif`,lh=`#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}`,hh=`#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif`,uh=`vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif`,fh=`#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif`,dh=`#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif`,ph=`#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif`,mh=`#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif`,gh="gl_FragColor = linearToOutputTexel( gl_FragColor );",xh=`vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}`,_h=`#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif`,yh=`#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif`,vh=`#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif`,Mh=`#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif`,bh=`#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif`,wh=`#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif`,Sh=`#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif`,Th=`#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif`,Ah=`#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif`,Eh=`#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}`,Ch=`#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif`,Ph=`#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif`,Rh=`LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;`,Lh=`varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert`,Ih=`uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif`,Dh=`#if defined( USE_ENVMAP )\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif`,Nh=`ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;`,Fh=`varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon`,zh=`BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;`,Oh=`varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong`,Bh=`PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif`,Uh=`struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX_Iridescence( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness );\n\t#else\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}`,kh=`\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif`,Vh=`#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif`,Gh=`#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif`,Hh=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif`,Wh=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif`,qh=`#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif`,Xh=`#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif`,Yh=`#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif`,Zh=`#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif`,Jh=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif`,$h=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif`,Kh=`float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif`,jh=`#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif`,Qh=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif`,tu=`#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif`,eu=`#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif`,nu=`#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif`,iu=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;`,su=`#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif`,ru=`#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif`,ou=`#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif`,au=`#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif`,cu=`#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif`,lu=`#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif`,hu=`#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif`,uu=`#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif`,fu=`#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif`,du=`#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );`,pu=`vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}`,mu=`#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif`,gu=`vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;`,xu=`#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif`,_u=`#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif`,yu=`float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif`,vu=`#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif`,Mu=`#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif`,bu=`#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif`,wu=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif`,Su=`float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}`,Tu=`#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif`,Au=`#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif`,Eu=`#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif`,Cu=`#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif`,Pu=`float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif`,Ru=`#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif`,Lu=`#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif`,Iu=`#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }`,Du=`#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission );\n#endif`,Nu=`#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef texture2DLodEXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif`,Fu=`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif`,zu=`#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif`,Ou=`#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif`,Bu=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif`,Uu=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif`,ku=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif`,Vu=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif`,Gu=`varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}`,Hu=`uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}`,Wu=`varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}`,qu=`#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}`,Xu=`varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}`,Yu=`uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}`,Zu=`#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}`,Ju=`#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}`,$u=`#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}`,Ku=`#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}`,ju=`varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}`,Qu=`uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}`,tf=`uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,ef=`uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,nf=`#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,sf=`uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,rf=`#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}`,of=`#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,af=`#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}`,cf=`#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,lf=`#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}`,hf=`#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}`,uf=`#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}`,ff=`#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,df=`#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}`,pf=`#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,mf=`#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}`,gf=`#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,xf=`uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}`,_f=`uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,yf=`#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,vf=`uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}`,Mf=`uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}`,bf=`uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}`,wt={alphamap_fragment:Wl,alphamap_pars_fragment:ql,alphatest_fragment:Xl,alphatest_pars_fragment:Yl,aomap_fragment:Zl,aomap_pars_fragment:Jl,begin_vertex:$l,beginnormal_vertex:Kl,bsdfs:jl,iridescence_fragment:Ql,bumpmap_pars_fragment:th,clipping_planes_fragment:eh,clipping_planes_pars_fragment:nh,clipping_planes_pars_vertex:ih,clipping_planes_vertex:sh,color_fragment:rh,color_pars_fragment:oh,color_pars_vertex:ah,color_vertex:ch,common:lh,cube_uv_reflection_fragment:hh,defaultnormal_vertex:uh,displacementmap_pars_vertex:fh,displacementmap_vertex:dh,emissivemap_fragment:ph,emissivemap_pars_fragment:mh,encodings_fragment:gh,encodings_pars_fragment:xh,envmap_fragment:_h,envmap_common_pars_fragment:yh,envmap_pars_fragment:vh,envmap_pars_vertex:Mh,envmap_physical_pars_fragment:Dh,envmap_vertex:bh,fog_vertex:wh,fog_pars_vertex:Sh,fog_fragment:Th,fog_pars_fragment:Ah,gradientmap_pars_fragment:Eh,lightmap_fragment:Ch,lightmap_pars_fragment:Ph,lights_lambert_fragment:Rh,lights_lambert_pars_fragment:Lh,lights_pars_begin:Ih,lights_toon_fragment:Nh,lights_toon_pars_fragment:Fh,lights_phong_fragment:zh,lights_phong_pars_fragment:Oh,lights_physical_fragment:Bh,lights_physical_pars_fragment:Uh,lights_fragment_begin:kh,lights_fragment_maps:Vh,lights_fragment_end:Gh,logdepthbuf_fragment:Hh,logdepthbuf_pars_fragment:Wh,logdepthbuf_pars_vertex:qh,logdepthbuf_vertex:Xh,map_fragment:Yh,map_pars_fragment:Zh,map_particle_fragment:Jh,map_particle_pars_fragment:$h,metalnessmap_fragment:Kh,metalnessmap_pars_fragment:jh,morphcolor_vertex:Qh,morphnormal_vertex:tu,morphtarget_pars_vertex:eu,morphtarget_vertex:nu,normal_fragment_begin:iu,normal_fragment_maps:su,normal_pars_fragment:ru,normal_pars_vertex:ou,normal_vertex:au,normalmap_pars_fragment:cu,clearcoat_normal_fragment_begin:lu,clearcoat_normal_fragment_maps:hu,clearcoat_pars_fragment:uu,iridescence_pars_fragment:fu,output_fragment:du,packing:pu,premultiplied_alpha_fragment:mu,project_vertex:gu,dithering_fragment:xu,dithering_pars_fragment:_u,roughnessmap_fragment:yu,roughnessmap_pars_fragment:vu,shadowmap_pars_fragment:Mu,shadowmap_pars_vertex:bu,shadowmap_vertex:wu,shadowmask_pars_fragment:Su,skinbase_vertex:Tu,skinning_pars_vertex:Au,skinning_vertex:Eu,skinnormal_vertex:Cu,specularmap_fragment:Pu,specularmap_pars_fragment:Ru,tonemapping_fragment:Lu,tonemapping_pars_fragment:Iu,transmission_fragment:Du,transmission_pars_fragment:Nu,uv_pars_fragment:Fu,uv_pars_vertex:zu,uv_vertex:Ou,uv2_pars_fragment:Bu,uv2_pars_vertex:Uu,uv2_vertex:ku,worldpos_vertex:Vu,background_vert:Gu,background_frag:Hu,backgroundCube_vert:Wu,backgroundCube_frag:qu,cube_vert:Xu,cube_frag:Yu,depth_vert:Zu,depth_frag:Ju,distanceRGBA_vert:$u,distanceRGBA_frag:Ku,equirect_vert:ju,equirect_frag:Qu,linedashed_vert:tf,linedashed_frag:ef,meshbasic_vert:nf,meshbasic_frag:sf,meshlambert_vert:rf,meshlambert_frag:of,meshmatcap_vert:af,meshmatcap_frag:cf,meshnormal_vert:lf,meshnormal_frag:hf,meshphong_vert:uf,meshphong_frag:ff,meshphysical_vert:df,meshphysical_frag:pf,meshtoon_vert:mf,meshtoon_frag:gf,points_vert:xf,points_frag:_f,shadow_vert:yf,shadow_frag:vf,sprite_vert:Mf,sprite_frag:bf},et={common:{diffuse:{value:new Bt(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new le},uv2Transform:{value:new le},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new At(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Bt(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 Bt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new le}},sprite:{diffuse:{value:new Bt(16777215)},opacity:{value:1},center:{value:new At(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new le}}},He={basic:{uniforms:ae([et.common,et.specularmap,et.envmap,et.aomap,et.lightmap,et.fog]),vertexShader:wt.meshbasic_vert,fragmentShader:wt.meshbasic_frag},lambert:{uniforms:ae([et.common,et.specularmap,et.envmap,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.fog,et.lights,{emissive:{value:new Bt(0)}}]),vertexShader:wt.meshlambert_vert,fragmentShader:wt.meshlambert_frag},phong:{uniforms:ae([et.common,et.specularmap,et.envmap,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.fog,et.lights,{emissive:{value:new Bt(0)},specular:{value:new Bt(1118481)},shininess:{value:30}}]),vertexShader:wt.meshphong_vert,fragmentShader:wt.meshphong_frag},standard:{uniforms:ae([et.common,et.envmap,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.roughnessmap,et.metalnessmap,et.fog,et.lights,{emissive:{value:new Bt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:wt.meshphysical_vert,fragmentShader:wt.meshphysical_frag},toon:{uniforms:ae([et.common,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.gradientmap,et.fog,et.lights,{emissive:{value:new Bt(0)}}]),vertexShader:wt.meshtoon_vert,fragmentShader:wt.meshtoon_frag},matcap:{uniforms:ae([et.common,et.bumpmap,et.normalmap,et.displacementmap,et.fog,{matcap:{value:null}}]),vertexShader:wt.meshmatcap_vert,fragmentShader:wt.meshmatcap_frag},points:{uniforms:ae([et.points,et.fog]),vertexShader:wt.points_vert,fragmentShader:wt.points_frag},dashed:{uniforms:ae([et.common,et.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:wt.linedashed_vert,fragmentShader:wt.linedashed_frag},depth:{uniforms:ae([et.common,et.displacementmap]),vertexShader:wt.depth_vert,fragmentShader:wt.depth_frag},normal:{uniforms:ae([et.common,et.bumpmap,et.normalmap,et.displacementmap,{opacity:{value:1}}]),vertexShader:wt.meshnormal_vert,fragmentShader:wt.meshnormal_frag},sprite:{uniforms:ae([et.sprite,et.fog]),vertexShader:wt.sprite_vert,fragmentShader:wt.sprite_frag},background:{uniforms:{uvTransform:{value:new le},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:wt.background_vert,fragmentShader:wt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:wt.backgroundCube_vert,fragmentShader:wt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:wt.cube_vert,fragmentShader:wt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:wt.equirect_vert,fragmentShader:wt.equirect_frag},distanceRGBA:{uniforms:ae([et.common,et.displacementmap,{referencePosition:{value:new R},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:wt.distanceRGBA_vert,fragmentShader:wt.distanceRGBA_frag},shadow:{uniforms:ae([et.lights,et.fog,{color:{value:new Bt(0)},opacity:{value:1}}]),vertexShader:wt.shadow_vert,fragmentShader:wt.shadow_frag}};He.physical={uniforms:ae([He.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new At(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new Bt(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new At},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Bt(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Bt(1,1,1)},specularColorMap:{value:null}}]),vertexShader:wt.meshphysical_vert,fragmentShader:wt.meshphysical_frag};var fs={r:0,b:0,g:0};function wf(r,t,e,n,i,s,a){let o=new Bt(0),c=s===!0?0:1,l,h,f=null,u=0,m=null;function x(d,g){let M=!1,_=g.isScene===!0?g.background:null;_&&_.isTexture&&(_=(g.backgroundBlurriness>0?e:t).get(_));let v=r.xr,b=v.getSession&&v.getSession();b&&b.environmentBlendMode==="additive"&&(_=null),_===null?p(o,c):_&&_.isColor&&(p(_,1),M=!0),(r.autoClear||M)&&r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil),_&&(_.isCubeTexture||_.mapping===Ls)?(h===void 0&&(h=new qe(new zn(1,1,1),new on({name:"BackgroundCubeMaterial",uniforms:di(He.backgroundCube.uniforms),vertexShader:He.backgroundCube.vertexShader,fragmentShader:He.backgroundCube.fragmentShader,side:he,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(A,C,y){this.matrixWorld.copyPosition(y.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(h)),h.material.uniforms.envMap.value=_,h.material.uniforms.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,h.material.toneMapped=_.encoding!==Ot,(f!==_||u!==_.version||m!==r.toneMapping)&&(h.material.needsUpdate=!0,f=_,u=_.version,m=r.toneMapping),h.layers.enableAll(),d.unshift(h,h.geometry,h.material,0,0,null)):_&&_.isTexture&&(l===void 0&&(l=new qe(new ki(2,2),new on({name:"BackgroundMaterial",uniforms:di(He.background.uniforms),vertexShader:He.background.vertexShader,fragmentShader:He.background.fragmentShader,side:Ue,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=_,l.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,l.material.toneMapped=_.encoding!==Ot,_.matrixAutoUpdate===!0&&_.updateMatrix(),l.material.uniforms.uvTransform.value.copy(_.matrix),(f!==_||u!==_.version||m!==r.toneMapping)&&(l.material.needsUpdate=!0,f=_,u=_.version,m=r.toneMapping),l.layers.enableAll(),d.unshift(l,l.geometry,l.material,0,0,null))}function p(d,g){d.getRGB(fs,ja(r)),n.buffers.color.setClear(fs.r,fs.g,fs.b,g,a)}return{getClearColor:function(){return o},setClearColor:function(d,g=1){o.set(d),c=g,p(o,c)},getClearAlpha:function(){return c},setClearAlpha:function(d){c=d,p(o,c)},render:x}}function Sf(r,t,e,n){let i=r.getParameter(34921),s=n.isWebGL2?null:t.get("OES_vertex_array_object"),a=n.isWebGL2||s!==null,o={},c=d(null),l=c,h=!1;function f(I,k,Y,Z,H){let $=!1;if(a){let J=p(Z,Y,k);l!==J&&(l=J,m(l.object)),$=g(I,Z,Y,H),$&&M(I,Z,Y,H)}else{let J=k.wireframe===!0;(l.geometry!==Z.id||l.program!==Y.id||l.wireframe!==J)&&(l.geometry=Z.id,l.program=Y.id,l.wireframe=J,$=!0)}H!==null&&e.update(H,34963),($||h)&&(h=!1,y(I,k,Y,Z),H!==null&&r.bindBuffer(34963,e.get(H).buffer))}function u(){return n.isWebGL2?r.createVertexArray():s.createVertexArrayOES()}function m(I){return n.isWebGL2?r.bindVertexArray(I):s.bindVertexArrayOES(I)}function x(I){return n.isWebGL2?r.deleteVertexArray(I):s.deleteVertexArrayOES(I)}function p(I,k,Y){let Z=Y.wireframe===!0,H=o[I.id];H===void 0&&(H={},o[I.id]=H);let $=H[k.id];$===void 0&&($={},H[k.id]=$);let J=$[Z];return J===void 0&&(J=d(u()),$[Z]=J),J}function d(I){let k=[],Y=[],Z=[];for(let H=0;H=0){let nt=H[z],it=$[z];if(it===void 0&&(z==="instanceMatrix"&&I.instanceMatrix&&(it=I.instanceMatrix),z==="instanceColor"&&I.instanceColor&&(it=I.instanceColor)),nt===void 0||nt.attribute!==it||it&&nt.data!==it.data)return!0;J++}return l.attributesNum!==J||l.index!==Z}function M(I,k,Y,Z){let H={},$=k.attributes,J=0,dt=Y.getAttributes();for(let z in dt)if(dt[z].location>=0){let nt=$[z];nt===void 0&&(z==="instanceMatrix"&&I.instanceMatrix&&(nt=I.instanceMatrix),z==="instanceColor"&&I.instanceColor&&(nt=I.instanceColor));let it={};it.attribute=nt,nt&&nt.data&&(it.data=nt.data),H[z]=it,J++}l.attributes=H,l.attributesNum=J,l.index=Z}function _(){let I=l.newAttributes;for(let k=0,Y=I.length;k=0){let K=H[dt];if(K===void 0&&(dt==="instanceMatrix"&&I.instanceMatrix&&(K=I.instanceMatrix),dt==="instanceColor"&&I.instanceColor&&(K=I.instanceColor)),K!==void 0){let nt=K.normalized,it=K.itemSize,U=e.get(K);if(U===void 0)continue;let Mt=U.buffer,ht=U.type,ut=U.bytesPerElement;if(K.isInterleavedBufferAttribute){let at=K.data,Ft=at.stride,bt=K.offset;if(at.isInstancedInterleavedBuffer){for(let _t=0;_t0&&r.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";C="mediump"}return C==="mediump"&&r.getShaderPrecisionFormat(35633,36337).precision>0&&r.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let a=typeof WebGL2RenderingContext!="undefined"&&r instanceof WebGL2RenderingContext,o=e.precision!==void 0?e.precision:"highp",c=s(o);c!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",c,"instead."),o=c);let l=a||t.has("WEBGL_draw_buffers"),h=e.logarithmicDepthBuffer===!0,f=r.getParameter(34930),u=r.getParameter(35660),m=r.getParameter(3379),x=r.getParameter(34076),p=r.getParameter(34921),d=r.getParameter(36347),g=r.getParameter(36348),M=r.getParameter(36349),_=u>0,v=a||t.has("OES_texture_float"),b=_&&v,A=a?r.getParameter(36183):0;return{isWebGL2:a,drawBuffers:l,getMaxAnisotropy:i,getMaxPrecision:s,precision:o,logarithmicDepthBuffer:h,maxTextures:f,maxVertexTextures:u,maxTextureSize:m,maxCubemapSize:x,maxAttributes:p,maxVertexUniforms:d,maxVaryings:g,maxFragmentUniforms:M,vertexTextures:_,floatFragmentTextures:v,floatVertexTextures:b,maxSamples:A}}function Ef(r){let t=this,e=null,n=0,i=!1,s=!1,a=new Te,o=new le,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(f,u){let m=f.length!==0||u||n!==0||i;return i=u,n=f.length,m},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(f,u){e=h(f,u,0)},this.setState=function(f,u,m){let x=f.clippingPlanes,p=f.clipIntersection,d=f.clipShadows,g=r.get(f);if(!i||x===null||x.length===0||s&&!d)s?h(null):l();else{let M=s?0:n,_=M*4,v=g.clippingState||null;c.value=v,v=h(x,u,_,m);for(let b=0;b!==_;++b)v[b]=e[b];g.clippingState=v,this.numIntersection=p?this.numPlanes:0,this.numPlanes+=M}};function l(){c.value!==e&&(c.value=e,c.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function h(f,u,m,x){let p=f!==null?f.length:0,d=null;if(p!==0){if(d=c.value,x!==!0||d===null){let g=m+p*4,M=u.matrixWorldInverse;o.getNormalMatrix(M),(d===null||d.length0){let l=new Or(c.height/2);return l.fromEquirectangularTexture(r,a),t.set(a,l),a.addEventListener("dispose",i),e(l.texture,a.mapping)}else return null}}return a}function i(a){let o=a.target;o.removeEventListener("dispose",i);let c=t.get(o);c!==void 0&&(t.delete(o),c.dispose())}function s(){t=new WeakMap}return{get:n,dispose:s}}var Br=class extends Es{constructor(t=-1,e=1,n=1,i=-1,s=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=i,this.near=s,this.far=a,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,n,i,s,a){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=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,s=n-t,a=n+t,o=i+e,c=i-e;if(this.view!==null&&this.view.enabled){let l=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=l*this.view.offsetX,a=s+l*this.view.width,o-=h*this.view.offsetY,c=o-h*this.view.height}this.projectionMatrix.makeOrthographic(s,a,o,c,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}},ii=4,ba=[.125,.215,.35,.446,.526,.582],Cn=20,Sr=new Br,wa=new Bt,Tr=null,En=(1+Math.sqrt(5))/2,ei=1/En,Sa=[new R(1,1,1),new R(-1,1,1),new R(1,1,-1),new R(-1,1,-1),new R(0,En,ei),new R(0,En,-ei),new R(ei,0,En),new R(-ei,0,En),new R(En,ei,0),new R(-En,ei,0)],Rs=class{constructor(t){this._renderer=t,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(t,e=0,n=.1,i=100){Tr=this._renderer.getRenderTarget(),this._setSize(256);let s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(t,n,i,s),e>0&&this._blur(s,0,0,e),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Ea(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Aa(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let t=0;t2?_:0,_,_),h.setRenderTarget(i),p&&h.render(x,o),h.render(t,o)}x.geometry.dispose(),x.material.dispose(),h.toneMapping=u,h.autoClear=f,t.background=d}_textureToCubeUV(t,e){let n=this._renderer,i=t.mapping===ci||t.mapping===li;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Ea()),this._cubemapMaterial.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Aa());let s=i?this._cubemapMaterial:this._equirectMaterial,a=new qe(this._lodPlanes[0],s),o=s.uniforms;o.envMap.value=t;let c=this._cubeSize;ds(e,0,0,3*c,2*c),n.setRenderTarget(e),n.render(a,Sr)}_applyPMREM(t){let e=this._renderer,n=e.autoClear;e.autoClear=!1;for(let i=1;iCn&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${d} samples when the maximum is set to ${Cn}`);let g=[],M=0;for(let C=0;C_-ii?i-_+ii:0),A=4*(this._cubeSize-v);ds(e,b,A,3*v,2*v),c.setRenderTarget(e),c.render(f,Sr)}};function Pf(r){let t=[],e=[],n=[],i=r,s=r-ii+1+ba.length;for(let a=0;ar-ii?c=ba[a-r+ii-1]:a===0&&(c=0),n.push(c);let l=1/(o-2),h=-l,f=1+l,u=[h,h,f,h,f,f,h,h,f,f,h,f],m=6,x=6,p=3,d=2,g=1,M=new Float32Array(p*x*m),_=new Float32Array(d*x*m),v=new Float32Array(g*x*m);for(let A=0;A2?0:-1,S=[C,y,0,C+2/3,y,0,C+2/3,y+1,0,C,y,0,C+2/3,y+1,0,C,y+1,0];M.set(S,p*x*A),_.set(u,d*x*A);let P=[A,A,A,A,A,A];v.set(P,g*x*A)}let b=new ke;b.setAttribute("position",new Yt(M,p)),b.setAttribute("uv",new Yt(_,d)),b.setAttribute("faceIndex",new Yt(v,g)),t.push(b),i>ii&&i--}return{lodPlanes:t,sizeLods:e,sigmas:n}}function Ta(r,t,e){let n=new rn(r,t,e);return n.texture.mapping=Ls,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function ds(r,t,e,n,i){r.viewport.set(t,e,n,i),r.scissor.set(t,e,n,i)}function Rf(r,t,e){let n=new Float32Array(Cn),i=new R(0,1,0);return new on({name:"SphericalGaussianBlur",defines:{n:Cn,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/e,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:oo(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues\' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t`,blending:pn,depthTest:!1,depthWrite:!1})}function Aa(){return new on({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:oo(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t`,blending:pn,depthTest:!1,depthWrite:!1})}function Ea(){return new on({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:oo(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t`,blending:pn,depthTest:!1,depthWrite:!1})}function oo(){return`\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t`}function Lf(r){let t=new WeakMap,e=null;function n(o){if(o&&o.isTexture){let c=o.mapping,l=c===Cr||c===Pr,h=c===ci||c===li;if(l||h)if(o.isRenderTargetTexture&&o.needsPMREMUpdate===!0){o.needsPMREMUpdate=!1;let f=t.get(o);return e===null&&(e=new Rs(r)),f=l?e.fromEquirectangular(o,f):e.fromCubemap(o,f),t.set(o,f),f.texture}else{if(t.has(o))return t.get(o).texture;{let f=o.image;if(l&&f&&f.height>0||h&&f&&i(f)){e===null&&(e=new Rs(r));let u=l?e.fromEquirectangular(o):e.fromCubemap(o);return t.set(o,u),o.addEventListener("dispose",s),u.texture}else return null}}}return o}function i(o){let c=0,l=6;for(let h=0;ht.maxTextureSize&&(O=Math.ceil(P/t.maxTextureSize),P=t.maxTextureSize);let B=new Float32Array(P*O*4*p),D=new bs(B,P,O,p);D.type=Rn,D.needsUpdate=!0;let I=S*4;for(let Y=0;Y0)return r;let i=t*e,s=Ca[i];if(s===void 0&&(s=new Float32Array(i),Ca[i]=s),t!==0){n.toArray(s,0);for(let a=1,o=0;a!==t;++a)o+=e,r[a].toArray(s,o)}return s}function Zt(r,t){if(r.length!==t.length)return!1;for(let e=0,n=r.length;e":" "} ${o}: ${e[a]}`)}return n.join(`\n`)}function Pd(r){switch(r){case Nn:return["Linear","( value )"];case Ot:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",r),["Linear","( value )"]}}function Fa(r,t,e){let n=r.getShaderParameter(t,35713),i=r.getShaderInfoLog(t).trim();if(n&&i==="")return"";let s=/ERROR: 0:(\\d+)/.exec(i);if(s){let a=parseInt(s[1]);return e.toUpperCase()+`\n\n`+i+`\n\n`+Cd(r.getShaderSource(t),a)}else return i}function Rd(r,t){let e=Pd(t);return"vec4 "+r+"( vec4 value ) { return LinearTo"+e[0]+e[1]+"; }"}function Ld(r,t){let e;switch(t){case Qc:e="Linear";break;case tl:e="Reinhard";break;case el:e="OptimizedCineon";break;case nl:e="ACESFilmic";break;case il:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+r+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}function Id(r){return[r.extensionDerivatives||r.envMapCubeUVHeight||r.bumpMap||r.tangentSpaceNormalMap||r.clearcoatNormalMap||r.flatShading||r.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(r.extensionFragDepth||r.logarithmicDepthBuffer)&&r.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",r.extensionDrawBuffers&&r.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(r.extensionShaderTextureLOD||r.envMap||r.transmission)&&r.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Fi).join(`\n`)}function Dd(r){let t=[];for(let e in r){let n=r[e];n!==!1&&t.push("#define "+e+" "+n)}return t.join(`\n`)}function Nd(r,t){let e={},n=r.getProgramParameter(t,35721);for(let i=0;i/gm;function Gr(r){return r.replace(Fd,zd)}function zd(r,t){let e=wt[t];if(e===void 0)throw new Error("Can not resolve #include <"+t+">");return Gr(e)}var Od=/#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 Ba(r){return r.replace(Od,Bd)}function Bd(r,t,e,n){let i="";for(let s=parseInt(t);s0&&(d+=`\n`),g=[m,x].filter(Fi).join(`\n`),g.length>0&&(g+=`\n`)):(d=[Ua(e),"#define SHADER_NAME "+e.shaderName,x,e.instancing?"#define USE_INSTANCING":"",e.instancingColor?"#define USE_INSTANCING_COLOR":"",e.supportsVertexTextures?"#define VERTEX_TEXTURES":"",e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+h:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.displacementMap&&e.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.flatShading?"#define FLAT_SHADED":"",e.skinning?"#define USE_SKINNING":"",e.morphTargets?"#define USE_MORPHTARGETS":"",e.morphNormals&&e.flatShading===!1?"#define USE_MORPHNORMALS":"",e.morphColors&&e.isWebGL2?"#define USE_MORPHCOLORS":"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+e.morphTextureStride:"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_COUNT "+e.morphTargetsCount:"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+c:"",e.sizeAttenuation?"#define USE_SIZEATTENUATION":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.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","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif",`\n`].filter(Fi).join(`\n`),g=[m,Ua(e),"#define SHADER_NAME "+e.shaderName,x,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.matcap?"#define USE_MATCAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+l:"",e.envMap?"#define "+h:"",e.envMap?"#define "+f:"",u?"#define CUBEUV_TEXEL_WIDTH "+u.texelWidth:"",u?"#define CUBEUV_TEXEL_HEIGHT "+u.texelHeight:"",u?"#define CUBEUV_MAX_MIP "+u.maxMip+".0":"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoat?"#define USE_CLEARCOAT":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescence?"#define USE_IRIDESCENCE":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaTest?"#define USE_ALPHATEST":"",e.sheen?"#define USE_SHEEN":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors||e.instancingColor?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.gradientMap?"#define USE_GRADIENTMAP":"",e.flatShading?"#define FLAT_SHADED":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+c:"",e.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",e.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==nn?"#define TONE_MAPPING":"",e.toneMapping!==nn?wt.tonemapping_pars_fragment:"",e.toneMapping!==nn?Ld("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",wt.encodings_pars_fragment,Rd("linearToOutputTexel",e.outputEncoding),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"",`\n`].filter(Fi).join(`\n`)),a=Gr(a),a=za(a,e),a=Oa(a,e),o=Gr(o),o=za(o,e),o=Oa(o,e),a=Ba(a),o=Ba(o),e.isWebGL2&&e.isRawShaderMaterial!==!0&&(M=`#version 300 es\n`,d=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(`\n`)+`\n`+d,g=["#define varying in",e.glslVersion===la?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===la?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(`\n`)+`\n`+g);let _=M+d+a,v=M+g+o,b=Na(i,35633,_),A=Na(i,35632,v);if(i.attachShader(p,b),i.attachShader(p,A),e.index0AttributeName!==void 0?i.bindAttribLocation(p,0,e.index0AttributeName):e.morphTargets===!0&&i.bindAttribLocation(p,0,"position"),i.linkProgram(p),r.debug.checkShaderErrors){let S=i.getProgramInfoLog(p).trim(),P=i.getShaderInfoLog(b).trim(),O=i.getShaderInfoLog(A).trim(),B=!0,D=!0;if(i.getProgramParameter(p,35714)===!1){B=!1;let I=Fa(i,b,"vertex"),k=Fa(i,A,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(p,35715)+`\n\nProgram Info Log: `+S+`\n`+I+`\n`+k)}else S!==""?console.warn("THREE.WebGLProgram: Program Info Log:",S):(P===""||O==="")&&(D=!1);D&&(this.diagnostics={runnable:B,programLog:S,vertexShader:{log:P,prefix:d},fragmentShader:{log:O,prefix:g}})}i.deleteShader(b),i.deleteShader(A);let C;this.getUniforms=function(){return C===void 0&&(C=new ai(i,p)),C};let y;return this.getAttributes=function(){return y===void 0&&(y=Nd(i,p)),y},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(p),this.program=void 0},this.name=e.shaderName,this.id=Ed++,this.cacheKey=t,this.usedTimes=1,this.program=p,this.vertexShader=b,this.fragmentShader=A,this}var qd=0,Hr=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){let e=t.vertexShader,n=t.fragmentShader,i=this._getShaderStage(e),s=this._getShaderStage(n),a=this._getShaderCacheForMaterial(t);return a.has(i)===!1&&(a.add(i),i.usedTimes++),a.has(s)===!1&&(a.add(s),s.usedTimes++),this}remove(t){let e=this.materialCache.get(t);for(let n of e)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){let e=this.materialCache,n=e.get(t);return n===void 0&&(n=new Set,e.set(t,n)),n}_getShaderStage(t){let e=this.shaderCache,n=e.get(t);return n===void 0&&(n=new Wr(t),e.set(t,n)),n}},Wr=class{constructor(t){this.id=qd++,this.code=t,this.usedTimes=0}};function Xd(r,t,e,n,i,s,a){let o=new ws,c=new Hr,l=[],h=i.isWebGL2,f=i.logarithmicDepthBuffer,u=i.vertexTextures,m=i.precision,x={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 p(y,S,P,O,B){let D=O.fog,I=B.geometry,k=y.isMeshStandardMaterial?O.environment:null,Y=(y.isMeshStandardMaterial?e:t).get(y.envMap||k),Z=Y&&Y.mapping===Ls?Y.image.height:null,H=x[y.type];y.precision!==null&&(m=i.getMaxPrecision(y.precision),m!==y.precision&&console.warn("THREE.WebGLProgram.getParameters:",y.precision,"not supported, using",m,"instead."));let $=I.morphAttributes.position||I.morphAttributes.normal||I.morphAttributes.color,J=$!==void 0?$.length:0,dt=0;I.morphAttributes.position!==void 0&&(dt=1),I.morphAttributes.normal!==void 0&&(dt=2),I.morphAttributes.color!==void 0&&(dt=3);let z,K,nt,it;if(H){let Ft=He[H];z=Ft.vertexShader,K=Ft.fragmentShader}else z=y.vertexShader,K=y.fragmentShader,c.update(y),nt=c.getVertexShaderID(y),it=c.getFragmentShaderID(y);let U=r.getRenderTarget(),Mt=y.alphaTest>0,ht=y.clearcoat>0,ut=y.iridescence>0;return{isWebGL2:h,shaderID:H,shaderName:y.type,vertexShader:z,fragmentShader:K,defines:y.defines,customVertexShaderID:nt,customFragmentShaderID:it,isRawShaderMaterial:y.isRawShaderMaterial===!0,glslVersion:y.glslVersion,precision:m,instancing:B.isInstancedMesh===!0,instancingColor:B.isInstancedMesh===!0&&B.instanceColor!==null,supportsVertexTextures:u,outputEncoding:U===null?r.outputEncoding:U.isXRRenderTarget===!0?U.texture.encoding:Nn,map:!!y.map,matcap:!!y.matcap,envMap:!!Y,envMapMode:Y&&Y.mapping,envMapCubeUVHeight:Z,lightMap:!!y.lightMap,aoMap:!!y.aoMap,emissiveMap:!!y.emissiveMap,bumpMap:!!y.bumpMap,normalMap:!!y.normalMap,objectSpaceNormalMap:y.normalMapType===wl,tangentSpaceNormalMap:y.normalMapType===bl,decodeVideoTexture:!!y.map&&y.map.isVideoTexture===!0&&y.map.encoding===Ot,clearcoat:ht,clearcoatMap:ht&&!!y.clearcoatMap,clearcoatRoughnessMap:ht&&!!y.clearcoatRoughnessMap,clearcoatNormalMap:ht&&!!y.clearcoatNormalMap,iridescence:ut,iridescenceMap:ut&&!!y.iridescenceMap,iridescenceThicknessMap:ut&&!!y.iridescenceThicknessMap,displacementMap:!!y.displacementMap,roughnessMap:!!y.roughnessMap,metalnessMap:!!y.metalnessMap,specularMap:!!y.specularMap,specularIntensityMap:!!y.specularIntensityMap,specularColorMap:!!y.specularColorMap,opaque:y.transparent===!1&&y.blending===ri,alphaMap:!!y.alphaMap,alphaTest:Mt,gradientMap:!!y.gradientMap,sheen:y.sheen>0,sheenColorMap:!!y.sheenColorMap,sheenRoughnessMap:!!y.sheenRoughnessMap,transmission:y.transmission>0,transmissionMap:!!y.transmissionMap,thicknessMap:!!y.thicknessMap,combine:y.combine,vertexTangents:!!y.normalMap&&!!I.attributes.tangent,vertexColors:y.vertexColors,vertexAlphas:y.vertexColors===!0&&!!I.attributes.color&&I.attributes.color.itemSize===4,vertexUvs:!!y.map||!!y.bumpMap||!!y.normalMap||!!y.specularMap||!!y.alphaMap||!!y.emissiveMap||!!y.roughnessMap||!!y.metalnessMap||!!y.clearcoatMap||!!y.clearcoatRoughnessMap||!!y.clearcoatNormalMap||!!y.iridescenceMap||!!y.iridescenceThicknessMap||!!y.displacementMap||!!y.transmissionMap||!!y.thicknessMap||!!y.specularIntensityMap||!!y.specularColorMap||!!y.sheenColorMap||!!y.sheenRoughnessMap,uvsVertexOnly:!(y.map||y.bumpMap||y.normalMap||y.specularMap||y.alphaMap||y.emissiveMap||y.roughnessMap||y.metalnessMap||y.clearcoatNormalMap||y.iridescenceMap||y.iridescenceThicknessMap||y.transmission>0||y.transmissionMap||y.thicknessMap||y.specularIntensityMap||y.specularColorMap||y.sheen>0||y.sheenColorMap||y.sheenRoughnessMap)&&!!y.displacementMap,fog:!!D,useFog:y.fog===!0,fogExp2:D&&D.isFogExp2,flatShading:!!y.flatShading,sizeAttenuation:y.sizeAttenuation,logarithmicDepthBuffer:f,skinning:B.isSkinnedMesh===!0,morphTargets:I.morphAttributes.position!==void 0,morphNormals:I.morphAttributes.normal!==void 0,morphColors:I.morphAttributes.color!==void 0,morphTargetsCount:J,morphTextureStride:dt,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:y.dithering,shadowMapEnabled:r.shadowMap.enabled&&P.length>0,shadowMapType:r.shadowMap.type,toneMapping:y.toneMapped?r.toneMapping:nn,physicallyCorrectLights:r.physicallyCorrectLights,premultipliedAlpha:y.premultipliedAlpha,doubleSided:y.side===We,flipSided:y.side===he,useDepthPacking:!!y.depthPacking,depthPacking:y.depthPacking||0,index0AttributeName:y.index0AttributeName,extensionDerivatives:y.extensions&&y.extensions.derivatives,extensionFragDepth:y.extensions&&y.extensions.fragDepth,extensionDrawBuffers:y.extensions&&y.extensions.drawBuffers,extensionShaderTextureLOD:y.extensions&&y.extensions.shaderTextureLOD,rendererExtensionFragDepth:h||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||n.has("EXT_shader_texture_lod"),customProgramCacheKey:y.customProgramCacheKey()}}function d(y){let S=[];if(y.shaderID?S.push(y.shaderID):(S.push(y.customVertexShaderID),S.push(y.customFragmentShaderID)),y.defines!==void 0)for(let P in y.defines)S.push(P),S.push(y.defines[P]);return y.isRawShaderMaterial===!1&&(g(S,y),M(S,y),S.push(r.outputEncoding)),S.push(y.customProgramCacheKey),S.join()}function g(y,S){y.push(S.precision),y.push(S.outputEncoding),y.push(S.envMapMode),y.push(S.envMapCubeUVHeight),y.push(S.combine),y.push(S.vertexUvs),y.push(S.fogExp2),y.push(S.sizeAttenuation),y.push(S.morphTargetsCount),y.push(S.morphAttributeCount),y.push(S.numDirLights),y.push(S.numPointLights),y.push(S.numSpotLights),y.push(S.numSpotLightMaps),y.push(S.numHemiLights),y.push(S.numRectAreaLights),y.push(S.numDirLightShadows),y.push(S.numPointLightShadows),y.push(S.numSpotLightShadows),y.push(S.numSpotLightShadowsWithMaps),y.push(S.shadowMapType),y.push(S.toneMapping),y.push(S.numClippingPlanes),y.push(S.numClipIntersection),y.push(S.depthPacking)}function M(y,S){o.disableAll(),S.isWebGL2&&o.enable(0),S.supportsVertexTextures&&o.enable(1),S.instancing&&o.enable(2),S.instancingColor&&o.enable(3),S.map&&o.enable(4),S.matcap&&o.enable(5),S.envMap&&o.enable(6),S.lightMap&&o.enable(7),S.aoMap&&o.enable(8),S.emissiveMap&&o.enable(9),S.bumpMap&&o.enable(10),S.normalMap&&o.enable(11),S.objectSpaceNormalMap&&o.enable(12),S.tangentSpaceNormalMap&&o.enable(13),S.clearcoat&&o.enable(14),S.clearcoatMap&&o.enable(15),S.clearcoatRoughnessMap&&o.enable(16),S.clearcoatNormalMap&&o.enable(17),S.iridescence&&o.enable(18),S.iridescenceMap&&o.enable(19),S.iridescenceThicknessMap&&o.enable(20),S.displacementMap&&o.enable(21),S.specularMap&&o.enable(22),S.roughnessMap&&o.enable(23),S.metalnessMap&&o.enable(24),S.gradientMap&&o.enable(25),S.alphaMap&&o.enable(26),S.alphaTest&&o.enable(27),S.vertexColors&&o.enable(28),S.vertexAlphas&&o.enable(29),S.vertexUvs&&o.enable(30),S.vertexTangents&&o.enable(31),S.uvsVertexOnly&&o.enable(32),y.push(o.mask),o.disableAll(),S.fog&&o.enable(0),S.useFog&&o.enable(1),S.flatShading&&o.enable(2),S.logarithmicDepthBuffer&&o.enable(3),S.skinning&&o.enable(4),S.morphTargets&&o.enable(5),S.morphNormals&&o.enable(6),S.morphColors&&o.enable(7),S.premultipliedAlpha&&o.enable(8),S.shadowMapEnabled&&o.enable(9),S.physicallyCorrectLights&&o.enable(10),S.doubleSided&&o.enable(11),S.flipSided&&o.enable(12),S.useDepthPacking&&o.enable(13),S.dithering&&o.enable(14),S.specularIntensityMap&&o.enable(15),S.specularColorMap&&o.enable(16),S.transmission&&o.enable(17),S.transmissionMap&&o.enable(18),S.thicknessMap&&o.enable(19),S.sheen&&o.enable(20),S.sheenColorMap&&o.enable(21),S.sheenRoughnessMap&&o.enable(22),S.decodeVideoTexture&&o.enable(23),S.opaque&&o.enable(24),y.push(o.mask)}function _(y){let S=x[y.type],P;if(S){let O=He[S];P=Bl.clone(O.uniforms)}else P=y.uniforms;return P}function v(y,S){let P;for(let O=0,B=l.length;O0?n.push(g):m.transparent===!0?i.push(g):e.push(g)}function c(f,u,m,x,p,d){let g=a(f,u,m,x,p,d);m.transmission>0?n.unshift(g):m.transparent===!0?i.unshift(g):e.unshift(g)}function l(f,u){e.length>1&&e.sort(f||Zd),n.length>1&&n.sort(u||ka),i.length>1&&i.sort(u||ka)}function h(){for(let f=t,u=r.length;f=s.length?(a=new Va,s.push(a)):a=s[i],a}function e(){r=new WeakMap}return{get:t,dispose:e}}function $d(){let r={};return{get:function(t){if(r[t.id]!==void 0)return r[t.id];let e;switch(t.type){case"DirectionalLight":e={direction:new R,color:new Bt};break;case"SpotLight":e={position:new R,direction:new R,color:new Bt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new R,color:new Bt,distance:0,decay:0};break;case"HemisphereLight":e={direction:new R,skyColor:new Bt,groundColor:new Bt};break;case"RectAreaLight":e={color:new Bt,position:new R,halfWidth:new R,halfHeight:new R};break}return r[t.id]=e,e}}}function Kd(){let r={};return{get:function(t){if(r[t.id]!==void 0)return r[t.id];let e;switch(t.type){case"DirectionalLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new At};break;case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new At};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new At,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[t.id]=e,e}}}var jd=0;function Qd(r,t){return(t.castShadow?2:0)-(r.castShadow?2:0)+(t.map?1:0)-(r.map?1:0)}function tp(r,t){let e=new $d,n=Kd(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-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};for(let h=0;h<9;h++)i.probe.push(new R);let s=new R,a=new zt,o=new zt;function c(h,f){let u=0,m=0,x=0;for(let O=0;O<9;O++)i.probe[O].set(0,0,0);let p=0,d=0,g=0,M=0,_=0,v=0,b=0,A=0,C=0,y=0;h.sort(Qd);let S=f!==!0?Math.PI:1;for(let O=0,B=h.length;O0&&(t.isWebGL2||r.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=et.LTC_FLOAT_1,i.rectAreaLTC2=et.LTC_FLOAT_2):r.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=et.LTC_HALF_1,i.rectAreaLTC2=et.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=u,i.ambient[1]=m,i.ambient[2]=x;let P=i.hash;(P.directionalLength!==p||P.pointLength!==d||P.spotLength!==g||P.rectAreaLength!==M||P.hemiLength!==_||P.numDirectionalShadows!==v||P.numPointShadows!==b||P.numSpotShadows!==A||P.numSpotMaps!==C)&&(i.directional.length=p,i.spot.length=g,i.rectArea.length=M,i.point.length=d,i.hemi.length=_,i.directionalShadow.length=v,i.directionalShadowMap.length=v,i.pointShadow.length=b,i.pointShadowMap.length=b,i.spotShadow.length=A,i.spotShadowMap.length=A,i.directionalShadowMatrix.length=v,i.pointShadowMatrix.length=b,i.spotLightMatrix.length=A+C-y,i.spotLightMap.length=C,i.numSpotLightShadowsWithMaps=y,P.directionalLength=p,P.pointLength=d,P.spotLength=g,P.rectAreaLength=M,P.hemiLength=_,P.numDirectionalShadows=v,P.numPointShadows=b,P.numSpotShadows=A,P.numSpotMaps=C,i.version=jd++)}function l(h,f){let u=0,m=0,x=0,p=0,d=0,g=f.matrixWorldInverse;for(let M=0,_=h.length;M<_;M++){let v=h[M];if(v.isDirectionalLight){let b=i.directional[u];b.direction.setFromMatrixPosition(v.matrixWorld),s.setFromMatrixPosition(v.target.matrixWorld),b.direction.sub(s),b.direction.transformDirection(g),u++}else if(v.isSpotLight){let b=i.spot[x];b.position.setFromMatrixPosition(v.matrixWorld),b.position.applyMatrix4(g),b.direction.setFromMatrixPosition(v.matrixWorld),s.setFromMatrixPosition(v.target.matrixWorld),b.direction.sub(s),b.direction.transformDirection(g),x++}else if(v.isRectAreaLight){let b=i.rectArea[p];b.position.setFromMatrixPosition(v.matrixWorld),b.position.applyMatrix4(g),o.identity(),a.copy(v.matrixWorld),a.premultiply(g),o.extractRotation(a),b.halfWidth.set(v.width*.5,0,0),b.halfHeight.set(0,v.height*.5,0),b.halfWidth.applyMatrix4(o),b.halfHeight.applyMatrix4(o),p++}else if(v.isPointLight){let b=i.point[m];b.position.setFromMatrixPosition(v.matrixWorld),b.position.applyMatrix4(g),m++}else if(v.isHemisphereLight){let b=i.hemi[d];b.direction.setFromMatrixPosition(v.matrixWorld),b.direction.transformDirection(g),d++}}}return{setup:c,setupView:l,state:i}}function Ga(r,t){let e=new tp(r,t),n=[],i=[];function s(){n.length=0,i.length=0}function a(f){n.push(f)}function o(f){i.push(f)}function c(f){e.setup(n,f)}function l(f){e.setupView(n,f)}return{init:s,state:{lightsArray:n,shadowsArray:i,lights:e},setupLights:c,setupLightsView:l,pushLight:a,pushShadow:o}}function ep(r,t){let e=new WeakMap;function n(s,a=0){let o=e.get(s),c;return o===void 0?(c=new Ga(r,t),e.set(s,[c])):a>=o.length?(c=new Ga(r,t),o.push(c)):c=o[a],c}function i(){e=new WeakMap}return{get:n,dispose:i}}var qr=class extends fi{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=vl,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}},Xr=class extends fi{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.referencePosition=new R,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}},np=`void main() {\n\tgl_Position = vec4( position, 1.0 );\n}`,ip=`uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}`;function sp(r,t,e){let n=new Ps,i=new At,s=new At,a=new Xt,o=new qr({depthPacking:Ml}),c=new Xr,l={},h=e.maxTextureSize,f={[Ue]:he,[he]:Ue,[We]:We},u=new on({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new At},radius:{value:4}},vertexShader:np,fragmentShader:ip}),m=u.clone();m.defines.HORIZONTAL_PASS=1;let x=new ke;x.setAttribute("position",new Yt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let p=new qe(x,u),d=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Wa,this.render=function(v,b,A){if(d.enabled===!1||d.autoUpdate===!1&&d.needsUpdate===!1||v.length===0)return;let C=r.getRenderTarget(),y=r.getActiveCubeFace(),S=r.getActiveMipmapLevel(),P=r.state;P.setBlending(pn),P.buffers.color.setClear(1,1,1,1),P.buffers.depth.setTest(!0),P.setScissorTest(!1);for(let O=0,B=v.length;Oh||i.y>h)&&(i.x>h&&(s.x=Math.floor(h/k.x),i.x=s.x*k.x,I.mapSize.x=s.x),i.y>h&&(s.y=Math.floor(h/k.y),i.y=s.y*k.y,I.mapSize.y=s.y)),I.map===null){let Z=this.type!==Ni?{minFilter:ce,magFilter:ce}:{};I.map=new rn(i.x,i.y,Z),I.map.texture.name=D.name+".shadowMap",I.camera.updateProjectionMatrix()}r.setRenderTarget(I.map),r.clear();let Y=I.getViewportCount();for(let Z=0;Z0||b.map&&b.alphaTest>0){let B=P.uuid,D=b.uuid,I=l[B];I===void 0&&(I={},l[B]=I);let k=I[D];k===void 0&&(k=P.clone(),I[D]=k),P=k}return P.visible=b.visible,P.wireframe=b.wireframe,S===Ni?P.side=b.shadowSide!==null?b.shadowSide:b.side:P.side=b.shadowSide!==null?b.shadowSide:f[b.side],P.alphaMap=b.alphaMap,P.alphaTest=b.alphaTest,P.map=b.map,P.clipShadows=b.clipShadows,P.clippingPlanes=b.clippingPlanes,P.clipIntersection=b.clipIntersection,P.displacementMap=b.displacementMap,P.displacementScale=b.displacementScale,P.displacementBias=b.displacementBias,P.wireframeLinewidth=b.wireframeLinewidth,P.linewidth=b.linewidth,A.isPointLight===!0&&P.isMeshDistanceMaterial===!0&&(P.referencePosition.setFromMatrixPosition(A.matrixWorld),P.nearDistance=C,P.farDistance=y),P}function _(v,b,A,C,y){if(v.visible===!1)return;if(v.layers.test(b.layers)&&(v.isMesh||v.isLine||v.isPoints)&&(v.castShadow||v.receiveShadow&&y===Ni)&&(!v.frustumCulled||n.intersectsObject(v))){v.modelViewMatrix.multiplyMatrices(A.matrixWorldInverse,v.matrixWorld);let O=t.update(v),B=v.material;if(Array.isArray(B)){let D=O.groups;for(let I=0,k=D.length;I=1):H.indexOf("OpenGL ES")!==-1&&(Z=parseFloat(/^OpenGL ES (\\d)/.exec(H)[1]),Y=Z>=2);let $=null,J={},dt=r.getParameter(3088),z=r.getParameter(2978),K=new Xt().fromArray(dt),nt=new Xt().fromArray(z);function it(L,V,j){let ot=new Uint8Array(4),lt=r.createTexture();r.bindTexture(L,lt),r.texParameteri(L,10241,9728),r.texParameteri(L,10240,9728);for(let It=0;ItQ||E.height>Q)&&(tt=Q/Math.max(E.width,E.height)),tt<1||w===!0)if(typeof HTMLImageElement!="undefined"&&E instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&E instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&E instanceof ImageBitmap){let st=w?Dr:Math.floor,yt=st(tt*E.width),rt=st(tt*E.height);p===void 0&&(p=M(yt,rt));let X=W?M(yt,rt):p;return X.width=yt,X.height=rt,X.getContext("2d").drawImage(E,0,0,yt,rt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+E.width+"x"+E.height+") to ("+yt+"x"+rt+")."),X}else return"data"in E&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+E.width+"x"+E.height+")."),E;return E}function v(E){return ua(E.width)&&ua(E.height)}function b(E){return o?!1:E.wrapS!==Oe||E.wrapT!==Oe||E.minFilter!==ce&&E.minFilter!==Re}function A(E,w){return E.generateMipmaps&&w&&E.minFilter!==ce&&E.minFilter!==Re}function C(E){r.generateMipmap(E)}function y(E,w,W,Q,tt=!1){if(o===!1)return w;if(E!==null){if(r[E]!==void 0)return r[E];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \'"+E+"\'")}let st=w;return w===6403&&(W===5126&&(st=33326),W===5131&&(st=33325),W===5121&&(st=33321)),w===33319&&(W===5126&&(st=33328),W===5131&&(st=33327),W===5121&&(st=33323)),w===6408&&(W===5126&&(st=34836),W===5131&&(st=34842),W===5121&&(st=Q===Ot&&tt===!1?35907:32856),W===32819&&(st=32854),W===32820&&(st=32855)),(st===33325||st===33326||st===33327||st===33328||st===34842||st===34836)&&t.get("EXT_color_buffer_float"),st}function S(E,w,W){return A(E,W)===!0||E.isFramebufferTexture&&E.minFilter!==ce&&E.minFilter!==Re?Math.log2(Math.max(w.width,w.height))+1:E.mipmaps!==void 0&&E.mipmaps.length>0?E.mipmaps.length:E.isCompressedTexture&&Array.isArray(E.image)?w.mipmaps.length:1}function P(E){return E===ce||E===Fo||E===Zs?9728:9729}function O(E){let w=E.target;w.removeEventListener("dispose",O),D(w),w.isVideoTexture&&x.delete(w)}function B(E){let w=E.target;w.removeEventListener("dispose",B),k(w)}function D(E){let w=n.get(E);if(w.__webglInit===void 0)return;let W=E.source,Q=d.get(W);if(Q){let tt=Q[w.__cacheKey];tt.usedTimes--,tt.usedTimes===0&&I(E),Object.keys(Q).length===0&&d.delete(W)}n.remove(E)}function I(E){let w=n.get(E);r.deleteTexture(w.__webglTexture);let W=E.source,Q=d.get(W);delete Q[w.__cacheKey],a.memory.textures--}function k(E){let w=E.texture,W=n.get(E),Q=n.get(w);if(Q.__webglTexture!==void 0&&(r.deleteTexture(Q.__webglTexture),a.memory.textures--),E.depthTexture&&E.depthTexture.dispose(),E.isWebGLCubeRenderTarget)for(let tt=0;tt<6;tt++)r.deleteFramebuffer(W.__webglFramebuffer[tt]),W.__webglDepthbuffer&&r.deleteRenderbuffer(W.__webglDepthbuffer[tt]);else{if(r.deleteFramebuffer(W.__webglFramebuffer),W.__webglDepthbuffer&&r.deleteRenderbuffer(W.__webglDepthbuffer),W.__webglMultisampledFramebuffer&&r.deleteFramebuffer(W.__webglMultisampledFramebuffer),W.__webglColorRenderbuffer)for(let tt=0;tt=c&&console.warn("THREE.WebGLTextures: Trying to use "+E+" texture units while this GPU supports only "+c),Y+=1,E}function $(E){let w=[];return w.push(E.wrapS),w.push(E.wrapT),w.push(E.wrapR||0),w.push(E.magFilter),w.push(E.minFilter),w.push(E.anisotropy),w.push(E.internalFormat),w.push(E.format),w.push(E.type),w.push(E.generateMipmaps),w.push(E.premultiplyAlpha),w.push(E.flipY),w.push(E.unpackAlignment),w.push(E.encoding),w.join()}function J(E,w){let W=n.get(E);if(E.isVideoTexture&&Ze(E),E.isRenderTargetTexture===!1&&E.version>0&&W.__version!==E.version){let Q=E.image;if(Q===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Q.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ht(W,E,w);return}}e.bindTexture(3553,W.__webglTexture,33984+w)}function dt(E,w){let W=n.get(E);if(E.version>0&&W.__version!==E.version){ht(W,E,w);return}e.bindTexture(35866,W.__webglTexture,33984+w)}function z(E,w){let W=n.get(E);if(E.version>0&&W.__version!==E.version){ht(W,E,w);return}e.bindTexture(32879,W.__webglTexture,33984+w)}function K(E,w){let W=n.get(E);if(E.version>0&&W.__version!==E.version){ut(W,E,w);return}e.bindTexture(34067,W.__webglTexture,33984+w)}let nt={[Rr]:10497,[Oe]:33071,[Lr]:33648},it={[ce]:9728,[Fo]:9984,[Zs]:9986,[Re]:9729,[sl]:9985,[Oi]:9987};function U(E,w,W){if(W?(r.texParameteri(E,10242,nt[w.wrapS]),r.texParameteri(E,10243,nt[w.wrapT]),(E===32879||E===35866)&&r.texParameteri(E,32882,nt[w.wrapR]),r.texParameteri(E,10240,it[w.magFilter]),r.texParameteri(E,10241,it[w.minFilter])):(r.texParameteri(E,10242,33071),r.texParameteri(E,10243,33071),(E===32879||E===35866)&&r.texParameteri(E,32882,33071),(w.wrapS!==Oe||w.wrapT!==Oe)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),r.texParameteri(E,10240,P(w.magFilter)),r.texParameteri(E,10241,P(w.minFilter)),w.minFilter!==ce&&w.minFilter!==Re&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),t.has("EXT_texture_filter_anisotropic")===!0){let Q=t.get("EXT_texture_filter_anisotropic");if(w.magFilter===ce||w.minFilter!==Zs&&w.minFilter!==Oi||w.type===Rn&&t.has("OES_texture_float_linear")===!1||o===!1&&w.type===Bi&&t.has("OES_texture_half_float_linear")===!1)return;(w.anisotropy>1||n.get(w).__currentAnisotropy)&&(r.texParameterf(E,Q.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(w.anisotropy,i.getMaxAnisotropy())),n.get(w).__currentAnisotropy=w.anisotropy)}}function Mt(E,w){let W=!1;E.__webglInit===void 0&&(E.__webglInit=!0,w.addEventListener("dispose",O));let Q=w.source,tt=d.get(Q);tt===void 0&&(tt={},d.set(Q,tt));let st=$(w);if(st!==E.__cacheKey){tt[st]===void 0&&(tt[st]={texture:r.createTexture(),usedTimes:0},a.memory.textures++,W=!0),tt[st].usedTimes++;let yt=tt[E.__cacheKey];yt!==void 0&&(tt[E.__cacheKey].usedTimes--,yt.usedTimes===0&&I(w)),E.__cacheKey=st,E.__webglTexture=tt[st].texture}return W}function ht(E,w,W){let Q=3553;(w.isDataArrayTexture||w.isCompressedArrayTexture)&&(Q=35866),w.isData3DTexture&&(Q=32879);let tt=Mt(E,w),st=w.source;e.bindTexture(Q,E.__webglTexture,33984+W);let yt=n.get(st);if(st.version!==yt.__version||tt===!0){e.activeTexture(33984+W),r.pixelStorei(37440,w.flipY),r.pixelStorei(37441,w.premultiplyAlpha),r.pixelStorei(3317,w.unpackAlignment),r.pixelStorei(37443,0);let rt=b(w)&&v(w.image)===!1,X=_(w.image,rt,!1,h);X=De(w,X);let mt=v(X)||o,xt=s.convert(w.format,w.encoding),ct=s.convert(w.type),gt=y(w.internalFormat,xt,ct,w.encoding,w.isVideoTexture);U(Q,w,mt);let ft,Rt=w.mipmaps,Ut=o&&w.isVideoTexture!==!0,$t=yt.__version===void 0||tt===!0,L=S(w,X,mt);if(w.isDepthTexture)gt=6402,o?w.type===Rn?gt=36012:w.type===Pn?gt=33190:w.type===oi?gt=35056:gt=33189:w.type===Rn&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),w.format===Ln&>===6402&&w.type!==Ja&&w.type!==Pn&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),w.type=Pn,ct=s.convert(w.type)),w.format===hi&>===6402&&(gt=34041,w.type!==oi&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),w.type=oi,ct=s.convert(w.type))),$t&&(Ut?e.texStorage2D(3553,1,gt,X.width,X.height):e.texImage2D(3553,0,gt,X.width,X.height,0,xt,ct,null));else if(w.isDataTexture)if(Rt.length>0&&mt){Ut&&$t&&e.texStorage2D(3553,L,gt,Rt[0].width,Rt[0].height);for(let V=0,j=Rt.length;V>=1,j>>=1}}else if(Rt.length>0&&mt){Ut&&$t&&e.texStorage2D(3553,L,gt,Rt[0].width,Rt[0].height);for(let V=0,j=Rt.length;V0&&$t++,e.texStorage2D(34067,$t,ft,X[0].width,X[0].height));for(let V=0;V<6;V++)if(rt){Rt?e.texSubImage2D(34069+V,0,0,0,X[V].width,X[V].height,ct,gt,X[V].data):e.texImage2D(34069+V,0,ft,X[V].width,X[V].height,0,ct,gt,X[V].data);for(let j=0;j=34069&&tt<=34074)&&r.framebufferTexture2D(36160,Q,tt,n.get(W).__webglTexture,0),e.bindFramebuffer(36160,null)}function Ft(E,w,W){if(r.bindRenderbuffer(36161,E),w.depthBuffer&&!w.stencilBuffer){let Q=33189;if(W||Nt(w)){let tt=w.depthTexture;tt&&tt.isDepthTexture&&(tt.type===Rn?Q=36012:tt.type===Pn&&(Q=33190));let st=Wt(w);Nt(w)?u.renderbufferStorageMultisampleEXT(36161,st,Q,w.width,w.height):r.renderbufferStorageMultisample(36161,st,Q,w.width,w.height)}else r.renderbufferStorage(36161,Q,w.width,w.height);r.framebufferRenderbuffer(36160,36096,36161,E)}else if(w.depthBuffer&&w.stencilBuffer){let Q=Wt(w);W&&Nt(w)===!1?r.renderbufferStorageMultisample(36161,Q,35056,w.width,w.height):Nt(w)?u.renderbufferStorageMultisampleEXT(36161,Q,35056,w.width,w.height):r.renderbufferStorage(36161,34041,w.width,w.height),r.framebufferRenderbuffer(36160,33306,36161,E)}else{let Q=w.isWebGLMultipleRenderTargets===!0?w.texture:[w.texture];for(let tt=0;tt0&&Nt(E)===!1){let rt=st?w:[w];W.__webglMultisampledFramebuffer=r.createFramebuffer(),W.__webglColorRenderbuffer=[],e.bindFramebuffer(36160,W.__webglMultisampledFramebuffer);for(let X=0;X0&&Nt(E)===!1){let w=E.isWebGLMultipleRenderTargets?E.texture:[E.texture],W=E.width,Q=E.height,tt=16384,st=[],yt=E.stencilBuffer?33306:36096,rt=n.get(E),X=E.isWebGLMultipleRenderTargets===!0;if(X)for(let mt=0;mt0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&w.__useRenderToTexture!==!1}function Ze(E){let w=a.render.frame;x.get(E)!==w&&(x.set(E,w),E.update())}function De(E,w){let W=E.encoding,Q=E.format,tt=E.type;return E.isCompressedTexture===!0||E.isVideoTexture===!0||E.format===Ir||W!==Nn&&(W===Ot?o===!1?t.has("EXT_sRGB")===!0&&Q===Be?(E.format=Ir,E.minFilter=Re,E.generateMipmaps=!1):w=vs.sRGBToLinear(w):(Q!==Be||tt!==Dn)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",W)),w}this.allocateTextureUnit=H,this.resetTextureUnits=Z,this.setTexture2D=J,this.setTexture2DArray=dt,this.setTexture3D=z,this.setTextureCube=K,this.rebindTextures=se,this.setupRenderTarget=Ae,this.updateRenderTargetMipmap=te,this.updateMultisampleRenderTarget=Ee,this.setupDepthRenderbuffer=_t,this.setupFrameBufferTexture=at,this.useMultisampledRTT=Nt}function ap(r,t,e){let n=e.isWebGL2;function i(s,a=null){let o;if(s===Dn)return 5121;if(s===cl)return 32819;if(s===ll)return 32820;if(s===rl)return 5120;if(s===ol)return 5122;if(s===Ja)return 5123;if(s===al)return 5124;if(s===Pn)return 5125;if(s===Rn)return 5126;if(s===Bi)return n?5131:(o=t.get("OES_texture_half_float"),o!==null?o.HALF_FLOAT_OES:null);if(s===hl)return 6406;if(s===Be)return 6408;if(s===ul)return 6409;if(s===fl)return 6410;if(s===Ln)return 6402;if(s===hi)return 34041;if(s===Ir)return o=t.get("EXT_sRGB"),o!==null?o.SRGB_ALPHA_EXT:null;if(s===dl)return 6403;if(s===pl)return 36244;if(s===ml)return 33319;if(s===gl)return 33320;if(s===xl)return 36249;if(s===Js||s===$s||s===Ks||s===js)if(a===Ot)if(o=t.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(s===Js)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===$s)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===Ks)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===js)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=t.get("WEBGL_compressed_texture_s3tc"),o!==null){if(s===Js)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===$s)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===Ks)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===js)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===zo||s===Oo||s===Bo||s===Uo)if(o=t.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(s===zo)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===Oo)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===Bo)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===Uo)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===_l)return o=t.get("WEBGL_compressed_texture_etc1"),o!==null?o.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===ko||s===Vo)if(o=t.get("WEBGL_compressed_texture_etc"),o!==null){if(s===ko)return a===Ot?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(s===Vo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===Go||s===Ho||s===Wo||s===qo||s===Xo||s===Yo||s===Zo||s===Jo||s===$o||s===Ko||s===jo||s===Qo||s===ta||s===ea)if(o=t.get("WEBGL_compressed_texture_astc"),o!==null){if(s===Go)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===Ho)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===Wo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===qo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===Xo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===Yo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===Zo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===Jo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===$o)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===Ko)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===jo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===Qo)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===ta)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===ea)return a===Ot?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===Qs)if(o=t.get("EXT_texture_compression_bptc"),o!==null){if(s===Qs)return a===Ot?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(s===yl||s===na||s===ia||s===sa)if(o=t.get("EXT_texture_compression_rgtc"),o!==null){if(s===Qs)return o.COMPRESSED_RED_RGTC1_EXT;if(s===na)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===ia)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===sa)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===oi?n?34042:(o=t.get("WEBGL_depth_texture"),o!==null?o.UNSIGNED_INT_24_8_WEBGL:null):r[s]!==void 0?r[s]:null}return{convert:i}}var Yr=class extends Se{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}},si=class extends pe{constructor(){super(),this.isGroup=!0,this.type="Group"}},cp={type:"move"},zi=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new si,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 si,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new R,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new R),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new si,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new R,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new R),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){let e=this._hand;if(e)for(let n of t.hand.values())this._getHandJoint(e,n)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,e,n){let i=null,s=null,a=null,o=this._targetRay,c=this._grip,l=this._hand;if(t&&e.session.visibilityState!=="visible-blurred"){if(l&&t.hand){a=!0;for(let p of t.hand.values()){let d=e.getJointPose(p,n),g=this._getHandJoint(l,p);d!==null&&(g.matrix.fromArray(d.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.jointRadius=d.radius),g.visible=d!==null}let h=l.joints["index-finger-tip"],f=l.joints["thumb-tip"],u=h.position.distanceTo(f.position),m=.02,x=.005;l.inputState.pinching&&u>m+x?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&u<=m-x&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else c!==null&&t.gripSpace&&(s=e.getPose(t.gripSpace,n),s!==null&&(c.matrix.fromArray(s.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),s.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(s.linearVelocity)):c.hasLinearVelocity=!1,s.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(s.angularVelocity)):c.hasAngularVelocity=!1));o!==null&&(i=e.getPose(t.targetRaySpace,n),i===null&&s!==null&&(i=s),i!==null&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(cp)))}return o!==null&&(o.visible=i!==null),c!==null&&(c.visible=s!==null),l!==null&&(l.visible=a!==null),this}_getHandJoint(t,e){if(t.joints[e.jointName]===void 0){let n=new si;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}},Zr=class extends ue{constructor(t,e,n,i,s,a,o,c,l,h){if(h=h!==void 0?h:Ln,h!==Ln&&h!==hi)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&h===Ln&&(n=Pn),n===void 0&&h===hi&&(n=oi),super(null,i,s,a,o,c,h,n,l),this.isDepthTexture=!0,this.image={width:t,height:e},this.magFilter=o!==void 0?o:ce,this.minFilter=c!==void 0?c:ce,this.flipY=!1,this.generateMipmaps=!1}},Jr=class extends mn{constructor(t,e){super();let n=this,i=null,s=1,a=null,o="local-floor",c=1,l=null,h=null,f=null,u=null,m=null,x=null,p=e.getContextAttributes(),d=null,g=null,M=[],_=[],v=new Set,b=new Map,A=new Se;A.layers.enable(1),A.viewport=new Xt;let C=new Se;C.layers.enable(2),C.viewport=new Xt;let y=[A,C],S=new Yr;S.layers.enable(1),S.layers.enable(2);let P=null,O=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(z){let K=M[z];return K===void 0&&(K=new zi,M[z]=K),K.getTargetRaySpace()},this.getControllerGrip=function(z){let K=M[z];return K===void 0&&(K=new zi,M[z]=K),K.getGripSpace()},this.getHand=function(z){let K=M[z];return K===void 0&&(K=new zi,M[z]=K),K.getHandSpace()};function B(z){let K=_.indexOf(z.inputSource);if(K===-1)return;let nt=M[K];nt!==void 0&&nt.dispatchEvent({type:z.type,data:z.inputSource})}function D(){i.removeEventListener("select",B),i.removeEventListener("selectstart",B),i.removeEventListener("selectend",B),i.removeEventListener("squeeze",B),i.removeEventListener("squeezestart",B),i.removeEventListener("squeezeend",B),i.removeEventListener("end",D),i.removeEventListener("inputsourceschange",I);for(let z=0;z=0&&(_[it]=null,M[it].disconnect(nt))}for(let K=0;K=_.length){_.push(nt),it=Mt;break}else if(_[Mt]===null){_[Mt]=nt,it=Mt;break}if(it===-1)break}let U=M[it];U&&U.connect(nt)}}let k=new R,Y=new R;function Z(z,K,nt){k.setFromMatrixPosition(K.matrixWorld),Y.setFromMatrixPosition(nt.matrixWorld);let it=k.distanceTo(Y),U=K.projectionMatrix.elements,Mt=nt.projectionMatrix.elements,ht=U[14]/(U[10]-1),ut=U[14]/(U[10]+1),at=(U[9]+1)/U[5],Ft=(U[9]-1)/U[5],bt=(U[8]-1)/U[0],_t=(Mt[8]+1)/Mt[0],se=ht*bt,Ae=ht*_t,te=it/(-bt+_t),Ee=te*-bt;K.matrixWorld.decompose(z.position,z.quaternion,z.scale),z.translateX(Ee),z.translateZ(te),z.matrixWorld.compose(z.position,z.quaternion,z.scale),z.matrixWorldInverse.copy(z.matrixWorld).invert();let Wt=ht+te,Nt=ut+te,Ze=se-Ee,De=Ae+(it-Ee),E=at*ut/Nt*Wt,w=Ft*ut/Nt*Wt;z.projectionMatrix.makePerspective(Ze,De,E,w,Wt,Nt)}function H(z,K){K===null?z.matrixWorld.copy(z.matrix):z.matrixWorld.multiplyMatrices(K.matrixWorld,z.matrix),z.matrixWorldInverse.copy(z.matrixWorld).invert()}this.updateCamera=function(z){if(i===null)return;S.near=C.near=A.near=z.near,S.far=C.far=A.far=z.far,(P!==S.near||O!==S.far)&&(i.updateRenderState({depthNear:S.near,depthFar:S.far}),P=S.near,O=S.far);let K=z.parent,nt=S.cameras;H(S,K);for(let U=0;UU&&(b.set(it,it.lastChangedTime),n.dispatchEvent({type:"planechanged",data:it}))}}x=null}let dt=new Qa;dt.setAnimationLoop(J),this.setAnimationLoop=function(z){$=z},this.dispose=function(){}}};function lp(r,t){function e(p,d){d.color.getRGB(p.fogColor.value,ja(r)),d.isFog?(p.fogNear.value=d.near,p.fogFar.value=d.far):d.isFogExp2&&(p.fogDensity.value=d.density)}function n(p,d,g,M,_){d.isMeshBasicMaterial||d.isMeshLambertMaterial?i(p,d):d.isMeshToonMaterial?(i(p,d),h(p,d)):d.isMeshPhongMaterial?(i(p,d),l(p,d)):d.isMeshStandardMaterial?(i(p,d),f(p,d),d.isMeshPhysicalMaterial&&u(p,d,_)):d.isMeshMatcapMaterial?(i(p,d),m(p,d)):d.isMeshDepthMaterial?i(p,d):d.isMeshDistanceMaterial?(i(p,d),x(p,d)):d.isMeshNormalMaterial?i(p,d):d.isLineBasicMaterial?(s(p,d),d.isLineDashedMaterial&&a(p,d)):d.isPointsMaterial?o(p,d,g,M):d.isSpriteMaterial?c(p,d):d.isShadowMaterial?(p.color.value.copy(d.color),p.opacity.value=d.opacity):d.isShaderMaterial&&(d.uniformsNeedUpdate=!1)}function i(p,d){p.opacity.value=d.opacity,d.color&&p.diffuse.value.copy(d.color),d.emissive&&p.emissive.value.copy(d.emissive).multiplyScalar(d.emissiveIntensity),d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===he&&(p.bumpScale.value*=-1)),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias),d.emissiveMap&&(p.emissiveMap.value=d.emissiveMap),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===he&&p.normalScale.value.negate()),d.specularMap&&(p.specularMap.value=d.specularMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let g=t.get(d).envMap;if(g&&(p.envMap.value=g,p.flipEnvMap.value=g.isCubeTexture&&g.isRenderTargetTexture===!1?-1:1,p.reflectivity.value=d.reflectivity,p.ior.value=d.ior,p.refractionRatio.value=d.refractionRatio),d.lightMap){p.lightMap.value=d.lightMap;let v=r.physicallyCorrectLights!==!0?Math.PI:1;p.lightMapIntensity.value=d.lightMapIntensity*v}d.aoMap&&(p.aoMap.value=d.aoMap,p.aoMapIntensity.value=d.aoMapIntensity);let M;d.map?M=d.map:d.specularMap?M=d.specularMap:d.displacementMap?M=d.displacementMap:d.normalMap?M=d.normalMap:d.bumpMap?M=d.bumpMap:d.roughnessMap?M=d.roughnessMap:d.metalnessMap?M=d.metalnessMap:d.alphaMap?M=d.alphaMap:d.emissiveMap?M=d.emissiveMap:d.clearcoatMap?M=d.clearcoatMap:d.clearcoatNormalMap?M=d.clearcoatNormalMap:d.clearcoatRoughnessMap?M=d.clearcoatRoughnessMap:d.iridescenceMap?M=d.iridescenceMap:d.iridescenceThicknessMap?M=d.iridescenceThicknessMap:d.specularIntensityMap?M=d.specularIntensityMap:d.specularColorMap?M=d.specularColorMap:d.transmissionMap?M=d.transmissionMap:d.thicknessMap?M=d.thicknessMap:d.sheenColorMap?M=d.sheenColorMap:d.sheenRoughnessMap&&(M=d.sheenRoughnessMap),M!==void 0&&(M.isWebGLRenderTarget&&(M=M.texture),M.matrixAutoUpdate===!0&&M.updateMatrix(),p.uvTransform.value.copy(M.matrix));let _;d.aoMap?_=d.aoMap:d.lightMap&&(_=d.lightMap),_!==void 0&&(_.isWebGLRenderTarget&&(_=_.texture),_.matrixAutoUpdate===!0&&_.updateMatrix(),p.uv2Transform.value.copy(_.matrix))}function s(p,d){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity}function a(p,d){p.dashSize.value=d.dashSize,p.totalSize.value=d.dashSize+d.gapSize,p.scale.value=d.scale}function o(p,d,g,M){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity,p.size.value=d.size*g,p.scale.value=M*.5,d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let _;d.map?_=d.map:d.alphaMap&&(_=d.alphaMap),_!==void 0&&(_.matrixAutoUpdate===!0&&_.updateMatrix(),p.uvTransform.value.copy(_.matrix))}function c(p,d){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity,p.rotation.value=d.rotation,d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let g;d.map?g=d.map:d.alphaMap&&(g=d.alphaMap),g!==void 0&&(g.matrixAutoUpdate===!0&&g.updateMatrix(),p.uvTransform.value.copy(g.matrix))}function l(p,d){p.specular.value.copy(d.specular),p.shininess.value=Math.max(d.shininess,1e-4)}function h(p,d){d.gradientMap&&(p.gradientMap.value=d.gradientMap)}function f(p,d){p.roughness.value=d.roughness,p.metalness.value=d.metalness,d.roughnessMap&&(p.roughnessMap.value=d.roughnessMap),d.metalnessMap&&(p.metalnessMap.value=d.metalnessMap),t.get(d).envMap&&(p.envMapIntensity.value=d.envMapIntensity)}function u(p,d,g){p.ior.value=d.ior,d.sheen>0&&(p.sheenColor.value.copy(d.sheenColor).multiplyScalar(d.sheen),p.sheenRoughness.value=d.sheenRoughness,d.sheenColorMap&&(p.sheenColorMap.value=d.sheenColorMap),d.sheenRoughnessMap&&(p.sheenRoughnessMap.value=d.sheenRoughnessMap)),d.clearcoat>0&&(p.clearcoat.value=d.clearcoat,p.clearcoatRoughness.value=d.clearcoatRoughness,d.clearcoatMap&&(p.clearcoatMap.value=d.clearcoatMap),d.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=d.clearcoatRoughnessMap),d.clearcoatNormalMap&&(p.clearcoatNormalScale.value.copy(d.clearcoatNormalScale),p.clearcoatNormalMap.value=d.clearcoatNormalMap,d.side===he&&p.clearcoatNormalScale.value.negate())),d.iridescence>0&&(p.iridescence.value=d.iridescence,p.iridescenceIOR.value=d.iridescenceIOR,p.iridescenceThicknessMinimum.value=d.iridescenceThicknessRange[0],p.iridescenceThicknessMaximum.value=d.iridescenceThicknessRange[1],d.iridescenceMap&&(p.iridescenceMap.value=d.iridescenceMap),d.iridescenceThicknessMap&&(p.iridescenceThicknessMap.value=d.iridescenceThicknessMap)),d.transmission>0&&(p.transmission.value=d.transmission,p.transmissionSamplerMap.value=g.texture,p.transmissionSamplerSize.value.set(g.width,g.height),d.transmissionMap&&(p.transmissionMap.value=d.transmissionMap),p.thickness.value=d.thickness,d.thicknessMap&&(p.thicknessMap.value=d.thicknessMap),p.attenuationDistance.value=d.attenuationDistance,p.attenuationColor.value.copy(d.attenuationColor)),p.specularIntensity.value=d.specularIntensity,p.specularColor.value.copy(d.specularColor),d.specularIntensityMap&&(p.specularIntensityMap.value=d.specularIntensityMap),d.specularColorMap&&(p.specularColorMap.value=d.specularColorMap)}function m(p,d){d.matcap&&(p.matcap.value=d.matcap)}function x(p,d){p.referencePosition.value.copy(d.referencePosition),p.nearDistance.value=d.nearDistance,p.farDistance.value=d.farDistance}return{refreshFogUniforms:e,refreshMaterialUniforms:n}}function hp(r,t,e,n){let i={},s={},a=[],o=e.isWebGL2?r.getParameter(35375):0;function c(M,_){let v=_.program;n.uniformBlockBinding(M,v)}function l(M,_){let v=i[M.id];v===void 0&&(x(M),v=h(M),i[M.id]=v,M.addEventListener("dispose",d));let b=_.program;n.updateUBOMapping(M,b);let A=t.render.frame;s[M.id]!==A&&(u(M),s[M.id]=A)}function h(M){let _=f();M.__bindingPointIndex=_;let v=r.createBuffer(),b=M.__size,A=M.usage;return r.bindBuffer(35345,v),r.bufferData(35345,b,A),r.bindBuffer(35345,null),r.bindBufferBase(35345,_,v),v}function f(){for(let M=0;M0){A=v%b;let B=b-A;A!==0&&B-P.boundary<0&&(v+=b-A,S.__offset=v)}v+=P.storage}return A=v%b,A>0&&(v+=b-A),M.__size=v,M.__cache={},this}function p(M){let _={boundary:0,storage:0};return typeof M=="number"?(_.boundary=4,_.storage=4):M.isVector2?(_.boundary=8,_.storage=8):M.isVector3||M.isColor?(_.boundary=16,_.storage=12):M.isVector4?(_.boundary=16,_.storage=16):M.isMatrix3?(_.boundary=48,_.storage=48):M.isMatrix4?(_.boundary=64,_.storage=64):M.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",M),_}function d(M){let _=M.target;_.removeEventListener("dispose",d);let v=a.indexOf(_.__bindingPointIndex);a.splice(v,1),r.deleteBuffer(i[_.id]),delete i[_.id],delete s[_.id]}function g(){for(let M in i)r.deleteBuffer(i[M]);a=[],i={},s={}}return{bind:c,update:l,dispose:g}}function up(){let r=ys("canvas");return r.style.display="block",r}function fp(r={}){this.isWebGLRenderer=!0;let t=r.canvas!==void 0?r.canvas:up(),e=r.context!==void 0?r.context:null,n=r.depth!==void 0?r.depth:!0,i=r.stencil!==void 0?r.stencil:!0,s=r.antialias!==void 0?r.antialias:!1,a=r.premultipliedAlpha!==void 0?r.premultipliedAlpha:!0,o=r.preserveDrawingBuffer!==void 0?r.preserveDrawingBuffer:!1,c=r.powerPreference!==void 0?r.powerPreference:"default",l=r.failIfMajorPerformanceCaveat!==void 0?r.failIfMajorPerformanceCaveat:!1,h;e!==null?h=e.getContextAttributes().alpha:h=r.alpha!==void 0?r.alpha:!1;let f=null,u=null,m=[],x=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Nn,this.physicallyCorrectLights=!1,this.toneMapping=nn,this.toneMappingExposure=1;let p=this,d=!1,g=0,M=0,_=null,v=-1,b=null,A=new Xt,C=new Xt,y=null,S=t.width,P=t.height,O=1,B=null,D=null,I=new Xt(0,0,S,P),k=new Xt(0,0,S,P),Y=!1,Z=new Ps,H=!1,$=!1,J=null,dt=new zt,z=new At,K=new R,nt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function it(){return _===null?O:1}let U=e;function Mt(T,F){for(let G=0;G0?u=x[x.length-1]:u=null,m.pop(),m.length>0?f=m[m.length-1]:f=null};function Kt(T,F,G,N){if(T.visible===!1)return;if(T.layers.test(F.layers)){if(T.isGroup)G=T.renderOrder;else if(T.isLOD)T.autoUpdate===!0&&T.update(F);else if(T.isLight)u.pushLight(T),T.castShadow&&u.pushShadow(T);else if(T.isSprite){if(!T.frustumCulled||Z.intersectsSprite(T)){N&&K.setFromMatrixPosition(T.matrixWorld).applyMatrix4(dt);let vt=Wt.update(T),St=T.material;St.visible&&f.push(T,vt,St,G,K.z,null)}}else if((T.isMesh||T.isLine||T.isPoints)&&(T.isSkinnedMesh&&T.skeleton.frame!==Ft.render.frame&&(T.skeleton.update(),T.skeleton.frame=Ft.render.frame),!T.frustumCulled||Z.intersectsObject(T))){N&&K.setFromMatrixPosition(T.matrixWorld).applyMatrix4(dt);let vt=Wt.update(T),St=T.material;if(Array.isArray(St)){let Tt=vt.groups;for(let Lt=0,Et=Tt.length;Lt0&&vn(q,F,G),N&&at.viewport(A.copy(N)),q.length>0&&kt(q,F,G),pt.length>0&&kt(pt,F,G),vt.length>0&&kt(vt,F,G),at.buffers.depth.setTest(!0),at.buffers.depth.setMask(!0),at.buffers.color.setMask(!0),at.setPolygonOffset(!1)}function vn(T,F,G){let N=ut.isWebGL2;J===null&&(J=new rn(1,1,{generateMipmaps:!0,type:ht.has("EXT_color_buffer_half_float")?Bi:Dn,minFilter:Oi,samples:N&&s===!0?4:0})),p.getDrawingBufferSize(z),N?J.setSize(z.x,z.y):J.setSize(Dr(z.x),Dr(z.y));let q=p.getRenderTarget();p.setRenderTarget(J),p.clear();let pt=p.toneMapping;p.toneMapping=nn,kt(T,F,G),p.toneMapping=pt,_t.updateMultisampleRenderTarget(J),_t.updateRenderTargetMipmap(J),p.setRenderTarget(q)}function kt(T,F,G){let N=F.isScene===!0?F.overrideMaterial:null;for(let q=0,pt=T.length;q0&&_t.useMultisampledRTT(T)===!1?q=bt.get(T).__webglMultisampledFramebuffer:q=Et,A.copy(T.viewport),C.copy(T.scissor),y=T.scissorTest}else A.copy(I).multiplyScalar(O).floor(),C.copy(k).multiplyScalar(O).floor(),y=Y;if(at.bindFramebuffer(36160,q)&&ut.drawBuffers&&N&&at.drawBuffers(T,q),at.viewport(A),at.scissor(C),at.setScissorTest(y),pt){let Tt=bt.get(T.texture);U.framebufferTexture2D(36160,36064,34069+F,Tt.__webglTexture,G)}else if(vt){let Tt=bt.get(T.texture),Lt=F||0;U.framebufferTextureLayer(36160,36064,Tt.__webglTexture,G||0,Lt)}v=-1},this.readRenderTargetPixels=function(T,F,G,N,q,pt,vt){if(!(T&&T.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let St=bt.get(T).__webglFramebuffer;if(T.isWebGLCubeRenderTarget&&vt!==void 0&&(St=St[vt]),St){at.bindFramebuffer(36160,St);try{let Tt=T.texture,Lt=Tt.format,Et=Tt.type;if(Lt!==Be&&rt.convert(Lt)!==U.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let Ct=Et===Bi&&(ht.has("EXT_color_buffer_half_float")||ut.isWebGL2&&ht.has("EXT_color_buffer_float"));if(Et!==Dn&&rt.convert(Et)!==U.getParameter(35738)&&!(Et===Rn&&(ut.isWebGL2||ht.has("OES_texture_float")||ht.has("WEBGL_color_buffer_float")))&&!Ct){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}F>=0&&F<=T.width-N&&G>=0&&G<=T.height-q&&U.readPixels(F,G,N,q,rt.convert(Lt),rt.convert(Et),pt)}finally{let Tt=_!==null?bt.get(_).__webglFramebuffer:null;at.bindFramebuffer(36160,Tt)}}},this.copyFramebufferToTexture=function(T,F,G=0){let N=Math.pow(2,-G),q=Math.floor(F.image.width*N),pt=Math.floor(F.image.height*N);_t.setTexture2D(F,0),U.copyTexSubImage2D(3553,G,0,0,T.x,T.y,q,pt),at.unbindTexture()},this.copyTextureToTexture=function(T,F,G,N=0){let q=F.image.width,pt=F.image.height,vt=rt.convert(G.format),St=rt.convert(G.type);_t.setTexture2D(G,0),U.pixelStorei(37440,G.flipY),U.pixelStorei(37441,G.premultiplyAlpha),U.pixelStorei(3317,G.unpackAlignment),F.isDataTexture?U.texSubImage2D(3553,N,T.x,T.y,q,pt,vt,St,F.image.data):F.isCompressedTexture?U.compressedTexSubImage2D(3553,N,T.x,T.y,F.mipmaps[0].width,F.mipmaps[0].height,vt,F.mipmaps[0].data):U.texSubImage2D(3553,N,T.x,T.y,vt,St,F.image),N===0&&G.generateMipmaps&&U.generateMipmap(3553),at.unbindTexture()},this.copyTextureToTexture3D=function(T,F,G,N,q=0){if(p.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let pt=T.max.x-T.min.x+1,vt=T.max.y-T.min.y+1,St=T.max.z-T.min.z+1,Tt=rt.convert(N.format),Lt=rt.convert(N.type),Et;if(N.isData3DTexture)_t.setTexture3D(N,0),Et=32879;else if(N.isDataArrayTexture)_t.setTexture2DArray(N,0),Et=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}U.pixelStorei(37440,N.flipY),U.pixelStorei(37441,N.premultiplyAlpha),U.pixelStorei(3317,N.unpackAlignment);let Ct=U.getParameter(3314),Vt=U.getParameter(32878),ye=U.getParameter(3316),$e=U.getParameter(3315),Mn=U.getParameter(32877),Gt=G.isCompressedTexture?G.mipmaps[0]:G.image;U.pixelStorei(3314,Gt.width),U.pixelStorei(32878,Gt.height),U.pixelStorei(3316,T.min.x),U.pixelStorei(3315,T.min.y),U.pixelStorei(32877,T.min.z),G.isDataTexture||G.isData3DTexture?U.texSubImage3D(Et,q,F.x,F.y,F.z,pt,vt,St,Tt,Lt,Gt.data):G.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),U.compressedTexSubImage3D(Et,q,F.x,F.y,F.z,pt,vt,St,Tt,Gt.data)):U.texSubImage3D(Et,q,F.x,F.y,F.z,pt,vt,St,Tt,Lt,Gt),U.pixelStorei(3314,Ct),U.pixelStorei(32878,Vt),U.pixelStorei(3316,ye),U.pixelStorei(3315,$e),U.pixelStorei(32877,Mn),q===0&&N.generateMipmaps&&U.generateMipmap(Et),at.unbindTexture()},this.initTexture=function(T){T.isCubeTexture?_t.setTextureCube(T,0):T.isData3DTexture?_t.setTexture3D(T,0):T.isDataArrayTexture||T.isCompressedArrayTexture?_t.setTexture2DArray(T,0):_t.setTexture2D(T,0),at.unbindTexture()},this.resetState=function(){g=0,M=0,_=null,at.reset(),X.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}var $r=class extends fp{};$r.prototype.isWebGL1Renderer=!0;function dn(r,t,e){return sc(r)?new r.constructor(r.subarray(t,e!==void 0?e:r.length)):r.slice(t,e)}function ps(r,t,e){return!r||!e&&r.constructor===t?r:typeof t.BYTES_PER_ELEMENT=="number"?new t(r):Array.prototype.slice.call(r)}function sc(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}var pi=class{constructor(t,e,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new e.constructor(n),this.sampleValues=e,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){let e=this.parameterPositions,n=this._cachedIndex,i=e[n],s=e[n-1];n:{t:{let a;e:{i:if(!(t=s)){let o=e[1];t=s)break t}a=n,n=0;break e}break n}for(;n>>1;te;)--a;if(++a,s!==0||a!==i){s>=a&&(a=Math.max(a,1),s=a-1);let o=this.getValueSize();this.times=dn(n,s,a),this.values=dn(this.values,s*o,a*o)}return this}validate(){let t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let n=this.times,i=this.values,s=n.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let a=null;for(let o=0;o!==s;o++){let c=n[o];if(typeof c=="number"&&isNaN(c)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,c),t=!1;break}if(a!==null&&a>c){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,c,a),t=!1;break}a=c}if(i!==void 0&&sc(i))for(let o=0,c=i.length;o!==c;++o){let l=i[o];if(isNaN(l)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,l),t=!1;break}}return t}optimize(){let t=dn(this.times),e=dn(this.values),n=this.getValueSize(),i=this.getInterpolation()===tr,s=t.length-1,a=1;for(let o=1;o0){t[a]=t[s];for(let o=s*n,c=a*n,l=0;l!==n;++l)e[c+l]=e[o+l];++a}return a!==t.length?(this.times=dn(t,0,a),this.values=dn(e,0,a*n)):(this.times=t,this.values=e),this}clone(){let t=dn(this.times,0),e=dn(this.values,0),n=this.constructor,i=new n(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}};Ve.prototype.TimeBufferType=Float32Array;Ve.prototype.ValueBufferType=Float32Array;Ve.prototype.DefaultInterpolation=_s;var On=class extends Ve{};On.prototype.ValueTypeName="bool";On.prototype.ValueBufferType=Array;On.prototype.DefaultInterpolation=xs;On.prototype.InterpolantFactoryMethodLinear=void 0;On.prototype.InterpolantFactoryMethodSmooth=void 0;var to=class extends Ve{};to.prototype.ValueTypeName="color";var eo=class extends Ve{};eo.prototype.ValueTypeName="number";var no=class extends pi{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){let s=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=(n-e)/(i-e),l=t*o;for(let h=l+o;l!==h;l+=4)gn.slerpFlat(s,0,a,l-o,a,l,c);return s}},Vi=class extends Ve{InterpolantFactoryMethodLinear(t){return new no(this.times,this.values,this.getValueSize(),t)}};Vi.prototype.ValueTypeName="quaternion";Vi.prototype.DefaultInterpolation=_s;Vi.prototype.InterpolantFactoryMethodSmooth=void 0;var Bn=class extends Ve{};Bn.prototype.ValueTypeName="string";Bn.prototype.ValueBufferType=Array;Bn.prototype.DefaultInterpolation=xs;Bn.prototype.InterpolantFactoryMethodLinear=void 0;Bn.prototype.InterpolantFactoryMethodSmooth=void 0;var io=class extends Ve{};io.prototype.ValueTypeName="vector";var ao="\\\\[\\\\]\\\\.:\\\\/",dp=new RegExp("["+ao+"]","g"),co="[^"+ao+"]",pp="[^"+ao.replace("\\\\.","")+"]",mp=/((?:WC+[\\/:])*)/.source.replace("WC",co),gp=/(WCOD+)?/.source.replace("WCOD",pp),xp=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",co),_p=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",co),yp=new RegExp("^"+mp+gp+xp+_p+"$"),vp=["material","materials","bones","map"],so=class{constructor(t,e,n){let i=n||Dt.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}getValue(t,e){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(t,e)}setValue(t,e){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=n.length;i!==s;++i)n[i].setValue(t,e)}bind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},Dt=class{constructor(t,e,n){this.path=e,this.parsedPath=n||Dt.parseTrackName(e),this.node=Dt.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new Dt.Composite(t,e,n):new Dt(t,e,n)}static sanitizeNodeName(t){return t.replace(/\\s/g,"_").replace(dp,"")}static parseTrackName(t){let e=yp.exec(t);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let s=n.nodeName.substring(i+1);vp.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){let n=t.skeleton.getBoneByName(e);if(n!==void 0)return n}if(t.children){let n=function(s){for(let a=0;ae&&(e=i,t=n)}return t}function ho(r,t){t.set(r)}function uo(r,t,e){let n,i;for(let s=0;s<3;s++){let a=s+3;n=r[s],i=t[s],e[s]=ni?n:i}}function Hi(r,t,e){for(let n=0;n<3;n++){let i=t[r+2*n],s=t[r+2*n+1],a=i-s,o=i+s;ae[n+3]&&(e[n+3]=o)}}function gi(r){let t=r[3]-r[0],e=r[4]-r[1],n=r[5]-r[2];return 2*(t*e+e*n+n*t)}function wp(r,t){if(!r.index){let e=r.attributes.position.count,n=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i;e>65535?i=new Uint32Array(new n(4*e)):i=new Uint16Array(new n(2*e)),r.setIndex(new Yt(i,1));for(let s=0;si-s);for(let i=0;ic&&(c=C),g&&vx&&(x=v);let y=r[M+2],S=r[M+3],P=y-S,O=y+S;Pl&&(l=O),g&&yp&&(p=y);let B=r[M+4],D=r[M+5],I=B-D,k=B+D;Ih&&(h=k),g&&Bd&&(d=B)}n[0]=s,n[1]=a,n[2]=o,n[3]=c,n[4]=l,n[5]=h,g&&(i[0]=f,i[1]=u,i[2]=m,i[3]=x,i[4]=p,i[5]=d)}function Tp(r,t,e,n){let i=1/0,s=1/0,a=1/0,o=-1/0,c=-1/0,l=-1/0;for(let h=t*6,f=(t+e)*6;ho&&(o=u);let m=r[h+2];mc&&(c=m);let x=r[h+4];xl&&(l=x)}n[0]=i,n[1]=s,n[2]=a,n[3]=o,n[4]=c,n[5]=l}function Ap(r,t,e,n,i){let s=e,a=e+n-1,o=i.pos,c=i.axis*2;for(;;){for(;s<=a&&t[s*6+c]=o;)a--;if(sr.candidate-t.candidate,xn=new Array(an).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),Ds=new Float32Array(6);function Cp(r,t,e,n,i,s){let a=-1,o=0;if(s===0)a=lo(t),a!==-1&&(o=(t[a]+t[a+3])/2);else if(s===1)a=lo(r),a!==-1&&(o=Pp(e,n,i,a));else if(s===2){let c=gi(r),l=1.25*i,h=n*6,f=(n+i)*6;for(let u=0;u<3;u++){let m=t[u],d=(t[u+3]-m)/an;if(i=C.candidate?Hi(v,e,C.rightCacheBounds):(Hi(v,e,C.leftCacheBounds),C.count++)}}for(let v=0;v<_;v++){let b=g[v],A=b.count,C=i-b.count,y=b.leftCacheBounds,S=b.rightCacheBounds,P=0;A!==0&&(P=gi(y)/c);let O=0;C!==0&&(O=gi(S)/c);let B=1+1.25*(P*A+O*C);B=an&&(A=an-1);let C=xn[A];C.count++,Hi(_,e,C.bounds)}let g=xn[an-1];ho(g.bounds,g.rightCacheBounds);for(let _=an-2;_>=0;_--){let v=xn[_],b=xn[_+1];uo(v.bounds,b.rightCacheBounds,v.rightCacheBounds)}let M=0;for(let _=0;_A&&(A=_),v>A&&(A=v);let C=(A-b)/2,y=g*2;s[m+y+0]=b+C,s[m+y+1]=C+(Math.abs(b)+C)*rc,bt[g+3]&&(t[g+3]=A)}}return s}function Lp(r,t){function e(g){u&&u(g/m)}function n(g,M,_,v=null,b=0){if(!x&&b>=c&&(x=!0,l&&(console.warn(`MeshBVH: Max depth of ${c} reached when generating BVH. Consider increasing maxDepth.`),console.warn(r))),_<=h||b>=c)return e(M+_),g.offset=M,g.count=_,g;let A=Cp(g.boundingData,v,a,M,_,f);if(A.axis===-1)return e(M+_),g.offset=M,g.count=_,g;let C=Ap(o,a,M,_,A);if(C===M||C===M+_)e(M+_),g.offset=M,g.count=_;else{g.splitAxis=A.axis;let y=new Un,S=M,P=C-M;g.left=y,y.boundingData=new Float32Array(6),po(a,S,P,y.boundingData,s),n(y,S,P,s,b+1);let O=new Un,B=C,D=_-P;g.right=O,O.boundingData=new Float32Array(6),po(a,B,D,O.boundingData,s),n(O,B,D,s,b+1)}return g}wp(r,t);let i=new Float32Array(6),s=new Float32Array(6),a=Rp(r,i),o=r.index.array,c=t.maxDepth,l=t.verbose,h=t.maxLeafTris,f=t.strategy,u=t.onProgress,m=r.index.count/3,x=!1,p=[],d=Sp(r);if(d.length===1){let g=d[0],M=new Un;M.boundingData=i,Tp(a,g.offset,g.count,s),n(M,g.offset,g.count,s),p.push(M)}else for(let g of d){let M=new Un;M.boundingData=new Float32Array(6),po(a,g.offset,g.count,M.boundingData,s),n(M,g.offset,g.count,s),p.push(M)}return p}function cc(r,t){let e=Lp(r,t),n,i,s,a=[],o=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let h=0;hMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return i[u+6]=_/4,_=l(_,g),i[u+7]=M,_}}}var ge=class{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(t,e){let n=1/0,i=-1/0;for(let s=0,a=t.length;si?c:i}this.min=n,this.max=i}setFromPoints(t,e){let n=1/0,i=-1/0;for(let s=0,a=e.length;si?c:i}this.min=n,this.max=i}isSeparated(t){return this.min>t.max||t.min>this.max}};ge.prototype.setFromBox=function(){let r=new R;return function(e,n){let i=n.min,s=n.max,a=1/0,o=-1/0;for(let c=0;c<=1;c++)for(let l=0;l<=1;l++)for(let h=0;h<=1;h++){r.x=i.x*c+s.x*(1-c),r.y=i.y*l+s.y*(1-l),r.z=i.z*h+s.z*(1-h);let f=e.dot(r);a=Math.min(f,a),o=Math.max(f,o)}this.min=a,this.max=o}}();var Qp=function(){let r=new ge;return function(e,n){let i=e.points,s=e.satAxes,a=e.satBounds,o=n.points,c=n.satAxes,l=n.satBounds;for(let h=0;h<3;h++){let f=a[h],u=s[h];if(r.setFromPoints(u,o),f.isSeparated(r))return!1}for(let h=0;h<3;h++){let f=l[h],u=c[h];if(r.setFromPoints(u,i),f.isSeparated(r))return!1}}}();var Ip=function(){let r=new R,t=new R,e=new R;return function(i,s,a){let o=i.start,c=r,l=s.start,h=t;e.subVectors(o,l),r.subVectors(i.end,i.start),t.subVectors(s.end,s.start);let f=e.dot(h),u=h.dot(c),m=h.dot(h),x=e.dot(c),d=c.dot(c)*m-u*u,g,M;d!==0?g=(f*u-x*m)/d:g=0,M=(f+g*u)/m,a.x=g,a.y=M}}(),Wi=function(){let r=new At,t=new R,e=new R;return function(i,s,a,o){Ip(i,s,r);let c=r.x,l=r.y;if(c>=0&&c<=1&&l>=0&&l<=1){i.at(c,a),s.at(l,o);return}else if(c>=0&&c<=1){l<0?s.at(0,o):s.at(1,o),i.closestPointToPoint(o,!0,a);return}else if(l>=0&&l<=1){c<0?i.at(0,a):i.at(1,a),s.closestPointToPoint(a,!0,o);return}else{let h;c<0?h=i.start:h=i.end;let f;l<0?f=s.start:f=s.end;let u=t,m=e;if(i.closestPointToPoint(f,!0,t),s.closestPointToPoint(h,!0,e),u.distanceToSquared(f)<=m.distanceToSquared(h)){a.copy(u),o.copy(f);return}else{a.copy(h),o.copy(m);return}}}}(),lc=function(){let r=new R,t=new R,e=new Te,n=new me;return function(s,a){let{radius:o,center:c}=s,{a:l,b:h,c:f}=a;if(n.start=l,n.end=h,n.closestPointToPoint(c,!0,r).distanceTo(c)<=o||(n.start=l,n.end=f,n.closestPointToPoint(c,!0,r).distanceTo(c)<=o)||(n.start=h,n.end=f,n.closestPointToPoint(c,!0,r).distanceTo(c)<=o))return!0;let p=a.getPlane(e);if(Math.abs(p.distanceToPoint(c))<=o){let g=p.projectPoint(c,t);if(a.containsPoint(g))return!0}return!1}}();var Dp=1e-15;function xi(r){return Math.abs(r)new R),this.satBounds=new Array(4).fill().map(()=>new ge),this.points=[this.a,this.b,this.c],this.sphere=new Fn,this.plane=new Te,this.needsUpdate=!0}intersectsSphere(t){return lc(t,this)}update(){let t=this.a,e=this.b,n=this.c,i=this.points,s=this.satAxes,a=this.satBounds,o=s[0],c=a[0];this.getNormal(o),c.setFromPoints(o,i);let l=s[1],h=a[1];l.subVectors(t,e),h.setFromPoints(l,i);let f=s[2],u=a[2];f.subVectors(e,n),u.setFromPoints(f,i);let m=s[3],x=a[3];m.subVectors(n,t),x.setFromPoints(m,i),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,t),this.needsUpdate=!1}};xe.prototype.closestPointToSegment=function(){let r=new R,t=new R,e=new me;return function(i,s=null,a=null){let{start:o,end:c}=i,l=this.points,h,f=1/0;for(let u=0;u<3;u++){let m=(u+1)%3;e.start.copy(l[u]),e.end.copy(l[m]),Wi(e,i,r,t),h=r.distanceToSquared(t),h1-1e-10){let M=this.satBounds,_=this.satAxes;e[0]=m.a,e[1]=m.b,e[2]=m.c;for(let A=0;A<4;A++){let C=M[A],y=_[A];if(n.setFromPoints(y,e),C.isSeparated(n))return!1}let v=m.satBounds,b=m.satAxes;t[0]=this.a,t[1]=this.b,t[2]=this.c;for(let A=0;A<4;A++){let C=v[A],y=b[A];if(n.setFromPoints(y,t),C.isSeparated(n))return!1}for(let A=0;A<4;A++){let C=_[A];for(let y=0;y<4;y++){let S=b[y];if(s.crossVectors(C,S),n.setFromPoints(s,t),i.setFromPoints(s,e),n.isSeparated(i))return!1}}return x&&(p||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),x.start.set(0,0,0),x.end.set(0,0,0)),!0}else{let M=this.points,_=!1,v=0;for(let I=0;I<3;I++){let k=M[I],Y=M[(I+1)%3];l.start.copy(k),l.end.copy(Y),l.delta(a);let Z=_?h.start:h.end,H=xi(g.distanceToPoint(k));if(xi(g.normal.dot(a))&&H){h.copy(l),v=2;break}if((g.intersectLine(l,Z)||H)&&!xi(Z.distanceTo(Y))){if(v++,_)break;_=!0}}if(v===1&&m.containsPoint(h.end))return x&&(x.start.copy(h.end),x.end.copy(h.end)),!0;if(v!==2)return!1;let b=m.points,A=!1,C=0;for(let I=0;I<3;I++){let k=b[I],Y=b[(I+1)%3];l.start.copy(k),l.end.copy(Y),l.delta(o);let Z=A?f.start:f.end,H=xi(d.distanceToPoint(k));if(xi(d.normal.dot(o))&&H){f.copy(l),C=2;break}if((d.intersectLine(l,Z)||H)&&!xi(Z.distanceTo(Y))){if(C++,A)break;A=!0}}if(C===1&&this.containsPoint(f.end))return x&&(x.start.copy(f.end),x.end.copy(f.end)),!0;if(C!==2)return!1;if(h.delta(a),f.delta(o),a.dot(o)<0){let I=f.start;f.start=f.end,f.end=I}let y=h.start.dot(a),S=h.end.dot(a),P=f.start.dot(a),O=f.end.dot(a),B=S0?x.start.copy(h.start):x.start.copy(f.start),c.subVectors(h.end,f.end),c.dot(a)<0?x.end.copy(h.end):x.end.copy(f.end)),!0)}}}();xe.prototype.distanceToPoint=function(){let r=new R;return function(e){return this.closestPointToPoint(e,r),e.distanceTo(r)}}();xe.prototype.distanceToTriangle=function(){let r=new R,t=new R,e=["a","b","c"],n=new me,i=new me;return function(a,o=null,c=null){let l=o||c?n:null;if(this.intersectsTriangle(a,l))return(o||c)&&(o&&l.getCenter(o),c&&l.getCenter(c)),0;let h=1/0;for(let f=0;f<3;f++){let u,m=e[f],x=a[m];this.closestPointToPoint(x,r),u=x.distanceToSquared(r),unew R),this.satAxes=new Array(3).fill().map(()=>new R),this.satBounds=new Array(3).fill().map(()=>new ge),this.alignedSatBounds=new Array(3).fill().map(()=>new ge),this.needsUpdate=!1,t&&this.min.copy(t),e&&this.max.copy(e),n&&this.matrix.copy(n)}set(t,e,n){this.min.copy(t),this.max.copy(e),this.matrix.copy(n),this.needsUpdate=!0}copy(t){this.min.copy(t.min),this.max.copy(t.max),this.matrix.copy(t.matrix),this.needsUpdate=!0}};_e.prototype.update=function(){return function(){let t=this.matrix,e=this.min,n=this.max,i=this.points;for(let l=0;l<=1;l++)for(let h=0;h<=1;h++)for(let f=0;f<=1;f++){let u=1*l|2*h|4*f,m=i[u];m.x=l?n.x:e.x,m.y=h?n.y:e.y,m.z=f?n.z:e.z,m.applyMatrix4(t)}let s=this.satBounds,a=this.satAxes,o=i[0];for(let l=0;l<3;l++){let h=a[l],f=s[l],u=1<new me),e=new Array(12).fill().map(()=>new me),n=new R,i=new R;return function(a,o=0,c=null,l=null){if(this.needsUpdate&&this.update(),this.intersectsBox(a))return(c||l)&&(a.getCenter(i),this.closestPointToPoint(i,n),a.closestPointToPoint(n,i),c&&c.copy(n),l&&l.copy(i)),0;let h=o*o,f=a.min,u=a.max,m=this.points,x=1/0;for(let d=0;d<8;d++){let g=m[d];i.copy(g).clamp(f,u);let M=g.distanceToSquared(i);if(M=0,m,x;u?(m=vi(r),x=Mi(r,o)):(m=Mi(r,o),x=vi(r));let d=Gs(m,s,n,Us)?Vs(m,t,e,n):null;if(d){let _=d.point[h];if(u?_<=s[x+l]:_>=s[x+l+3])return d}let M=Gs(x,s,n,Us)?Vs(x,t,e,n):null;return d&&M?d.distance<=M.distance?d:M:d||M||null}}var xc=function(){let r,t,e=[],n=new _i(()=>new fe);return function(...a){r=n.getPrimitive(),t=n.getPrimitive(),e.push(r,t);let o=i(...a);n.releasePrimitive(r),n.releasePrimitive(t),e.pop(),e.pop();let c=e.length;return c>0&&(t=e[c-1],r=e[c-2]),o};function i(s,a,o,c,l=null,h=0,f=0){function u(_){let v=_*2,b=_n,A=yn;for(;!cn(v,b);)_=vi(_),v=_*2;return kn(_,A)}function m(_){let v=_*2,b=_n,A=yn;for(;!cn(v,b);)_=Mi(_,A),v=_*2;return kn(_,A)+yi(v,b)}let x=s*2,p=wi,d=_n,g=yn;if(cn(x,d)){let _=kn(s,g),v=yi(x,d);return Le(s,p,r),c(_,v,!1,f,h+s,r)}else{let _=vi(s),v=Mi(s,g),b=_,A=v,C,y,S,P;if(l&&(S=r,P=t,Le(b,p,S),Le(A,p,P),C=l(S),y=l(P),yi.intersectsBox(y),intersectsTriangle:y=>{y.a.applyMatrix4(l),y.b.applyMatrix4(l),y.c.applyMatrix4(l),y.needsUpdate=!0;for(let S=b*3,P=(A+b)*3;Snew xe),Ye=class{static serialize(t,e={}){if(e.isBufferGeometry)return console.warn("MeshBVH.serialize: The arguments for the function have changed. See documentation for new signature."),Ye.serialize(arguments[0],{cloneBuffers:arguments[2]===void 0?!0:arguments[2]});e=Zi({cloneBuffers:!0},e);let n=t.geometry,i=t._roots,s=n.getIndex(),a;return e.cloneBuffers?a={roots:i.map(o=>o.slice()),index:s.array.slice()}:a={roots:i,index:s.array},a}static deserialize(t,e,n={}){if(typeof n=="boolean")return console.warn("MeshBVH.deserialize: The arguments for the function have changed. See documentation for new signature."),Ye.deserialize(arguments[0],arguments[1],{setIndex:arguments[2]===void 0?!0:arguments[2]});n=Zi({setIndex:!0},n);let{index:i,roots:s}=t,a=new Ye(e,Co(Zi({},n),{[yo]:!0}));if(a._roots=s,n.setIndex){let o=e.getIndex();if(o===null){let c=new Yt(t.index,1,!1);e.setIndex(c)}else o.array!==i&&(o.array.set(i),o.needsUpdate=!0)}return a}constructor(t,e={}){if(t.isBufferGeometry){if(t.index&&t.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(e=Object.assign({strategy:0,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,[yo]:!1},e),e.useSharedArrayBuffer&&typeof SharedArrayBuffer=="undefined")throw new Error("MeshBVH: SharedArrayBuffer is not available.");this._roots=null,e[yo]||(this._roots=cc(t,e),!t.boundingBox&&e.setBoundingBox&&(t.boundingBox=this.getBoundingBox(new fe))),this.geometry=t}refit(t=null){t&&Array.isArray(t)&&(t=new Set(t));let e=this.geometry,n=e.index.array,i=e.attributes.position,s,a,o,c,l=0,h=this._roots;for(let u=0,m=h.length;uA&&(A=B),DC&&(C=D),Iy&&(y=I)}return c[u+0]!==_||c[u+1]!==v||c[u+2]!==b||c[u+3]!==A||c[u+4]!==C||c[u+5]!==y?(c[u+0]=_,c[u+1]=v,c[u+2]=b,c[u+3]=A,c[u+4]=C,c[u+5]=y,!0):!1}else{let g=u+8,M=a[u+6],_=g+m,v=M+m,b=x,A=!1,C=!1;t?b||(A=t.has(_),C=t.has(v),b=!A&&!C):(A=!0,C=!0);let y=b||A,S=b||C,P=!1;y&&(P=f(g,m,b));let O=!1;S&&(O=f(M,m,b));let B=P||O;if(B)for(let D=0;D<3;D++){let I=g+D,k=M+D,Y=c[I],Z=c[I+3],H=c[k],$=c[k+3];c[u+D]=Y$?Z:$}return B}}}traverse(t,e=0){let n=this._roots[e],i=new Uint32Array(n),s=new Uint16Array(n);a(0);function a(o,c=0){let l=o*2,h=s[l+15]===65535;if(h){let f=i[o+6],u=s[l+14];t(c,h,new Float32Array(n,o*4,6),f,u)}else{let f=o+32/4,u=i[o+6],m=i[o+7];t(c,h,new Float32Array(n,o*4,6),m)||(a(f,c+1),a(u,c+1))}}}raycast(t,e=Ue){let n=this._roots,i=this.geometry,s=[],a=e.isMaterial,o=Array.isArray(e),c=i.groups,l=a?e.side:e;for(let h=0,f=n.length;h{let g=x*3;return u(m,g,g+1,g+2,p,d)}}t={boundsTraverseOrder:n,intersectsBounds:t,intersectsTriangle:e,intersectsRange:null},console.warn("MeshBVH: Shapecast function signature has changed and now takes an object of callbacks as a second argument. See docs for new signature.")}let s=Xe.getPrimitive(),{boundsTraverseOrder:a,intersectsBounds:o,intersectsRange:c,intersectsTriangle:l}=t;if(c&&l){let u=c;c=(m,x,p,d,g)=>u(m,x,p,d,g)?!0:xo(m,x,i,l,p,d,s)}else c||(l?c=(u,m,x,p)=>xo(u,m,i,l,x,p,s):c=(u,m,x)=>x);let h=!1,f=0;for(let u of this._roots){if(Si(u),h=xc(0,i,o,c,a,f),qi(),h)break;f+=u.byteLength}return Xe.releasePrimitive(s),h}bvhcast(t,e,n){let{intersectsRanges:i,intersectsTriangles:s}=n,a=this.geometry.index,o=this.geometry.attributes.position,c=t.geometry.index,l=t.geometry.attributes.position;Ti.copy(e).invert();let h=Xe.getPrimitive(),f=Xe.getPrimitive();if(s){let m=function(x,p,d,g,M,_,v,b){for(let A=d,C=d+g;AMo.intersectsBox(m),intersectsRange:(m,x,p,d,g,M)=>(vo.copy(M),vo.applyMatrix4(Ti),t.shapecast({intersectsBounds:_=>vo.intersectsBox(_),intersectsRange:(_,v,b,A,C)=>i(m,x,_,v,d,g,A,C)}))});return Xe.releasePrimitive(h),Xe.releasePrimitive(f),u}intersectsBox(t,e){return Vn.set(t.min,t.max,e),Vn.needsUpdate=!0,this.shapecast({intersectsBounds:n=>Vn.intersectsBox(n),intersectsTriangle:n=>Vn.intersectsTriangle(n)})}intersectsSphere(t){return this.shapecast({intersectsBounds:e=>t.intersectsBox(e),intersectsTriangle:e=>e.intersectsSphere(t)})}closestPointToGeometry(t,e,n={},i={},s=0,a=1/0){t.boundingBox||t.computeBoundingBox(),Vn.set(t.boundingBox.min,t.boundingBox.max,e),Vn.needsUpdate=!0;let o=this.geometry,c=o.attributes.position,l=o.index,h=t.attributes.position,f=t.index,u=Xe.getPrimitive(),m=Xe.getPrimitive(),x=Hs,p=Bp,d=null,g=null;i&&(d=Up,g=kp);let M=1/0,_=null,v=null;return Ti.copy(e).invert(),Xi.matrix.copy(Ti),this.shapecast({boundsTraverseOrder:b=>Vn.distanceToBox(b),intersectsBounds:(b,A,C)=>C{if(t.boundsTree)return t.boundsTree.shapecast({boundsTraverseOrder:C=>Xi.distanceToBox(C),intersectsBounds:(C,y,S)=>S{for(let S=C*3,P=(C+y)*3;S(Yi.copy(t).clamp(h.min,h.max),Yi.distanceToSquared(t)),intersectsBounds:(h,f,u)=>u{h.closestPointToPoint(t,Yi);let u=t.distanceToSquared(Yi);return u{Le(0,new Float32Array(n),yc),t.union(yc)}),t}};var bo=self;bo.addEventListener("message",async function({data:r}){let t=performance.now();function e(o){let c=performance.now();(c-t>=10||o===1)&&(postMessage({error:void 0,serialized:void 0,position:void 0,progress:o}),t=c)}let{id:n,index:i,position:s,options:a}=r;try{let o=new ke;if(o.setAttribute("position",new Yt(s,3,!1)),i&&o.setIndex(new Yt(i,1,!1)),a.includedProgressCallback&&(a.onProgress=e),a.groups){let h=a.groups;for(let f in h){let u=h[f];o.addGroup(u.start,u.count,u.materialIndex)}}let c=new Ye(o,a),l=Ye.serialize(c,{cloneBuffers:!1});bo.postMessage({id:n,error:void 0,serialized:l,position:s,progress:1},[l.index.buffer,s.buffer,...l.roots])}catch(o){bo.postMessage({id:n,error:o,serialized:void 0,position:void 0,progress:1})}});\n/*! Bundled license information:\n\nthree/build/three.module.js:\n (**\n * @license\n * Copyright 2010-2023 Three.js Authors\n * SPDX-License-Identifier: MIT\n *)\n*/\n')}var BC=class{constructor(){this.running=!1,this.worker=new NB,this.worker.onerror=e=>{throw e.message?new Error(`[GenerateMeshBVHWorker] Could not create Web Worker with error "${e.message}"`):new Error("[GenerateMeshBVHWorker] Could not create Web Worker.")}}isRunning(){return this.running}generate(e,t={}){if(this.running)return void ne.warn("[GenerateMeshBVHWorker] Already running job.");if(!this.worker)return void ne.warn("[GenerateMeshBVHWorker] Worker has been disposed.");let{worker:i}=this;this.running=!0;let r=new Map;e.forEach((e=>{r.set(e.id,e)}));let n=0;return new Promise(((e,s)=>{let a=()=>{++n===r.size&&(this.running=!1,i.onmessage=null,e())};i.onerror=e=>{ne.warn(`[GenerateMeshBVHWorker] ${e.message}`),s(new Error(`[GenerateMeshBVHWorker] ${e.message}`)),this.running=!1},i.onmessage=e=>{this.running=!1;let{data:i}=e;if(i.error)ne.warn(i.error),a();else if(i.serialized){let{serialized:e,position:n,id:s}=i,o=r.get(s),l=Pc.deserialize(e,o,{setIndex:!1}),h=Object.assign({setBoundingBox:!0},t);if(h.transferred&&(o.attributes.position.array=n),o.index)t.saveOriginalIndex&&!o.userData.originalIndex&&(o.userData.originalIndex=o.index.array),ne.debug("before update, index:",o.index.array),o.index.array=e.index;else{let t=new Wt(e.index,1,!1);o.setIndex(t)}o.index&&(ne.debug("after update, index:",o.index.array),o.index.needsUpdate=!0),h.setBoundingBox&&!o.boundingBox&&(o.boundingBox=l.getBoundingBox(new Dt)),o.boundsTree=l,a()}else t.onProgress&&t.onProgress(i.progress)};for(let e of r){let r=e[0],n=e[1],s=n.index?n.index.array:void 0,o=n.attributes.position,l=o.array;if(o.isInterleavedBufferAttribute||s&&s.isInterleavedBufferAttribute){ne.warn("[GenerateMeshBVHWorker] InterleavedBufferAttribute are not supported for the geometry attributes."),a();continue}let h=[];t.transferred&&(h.push(l),s&&(h.push(s),t.saveOriginalIndex&&(n.userData.originalIndex=s.slice()))),i.postMessage({id:r,index:s,position:l,options:Dn(Br({},t),{onProgress:null,includedProgressCallback:Boolean(t.onProgress),groups:[...n.groups]})},h.length>0?h.map((e=>e.buffer)):[])}}))}dispose(){this.worker.terminate(),this.worker=void 0}};function LB(){return Vx('var vr="149";var co=0,Pr=1,ho=2;var Ga=1,uo=2,li=3,nn=0,ye=1,tn=2;var en=0,Gn=1,Rr=2,Lr=3,Ir=4,fo=5,Bn=100,po=101,mo=102,Dr=103,Nr=104,go=200,_o=201,xo=202,yo=203,Ha=204,Wa=205,vo=206,Mo=207,bo=208,wo=209,So=210,To=0,Ao=1,Eo=2,Gs=3,Co=4,Po=5,Ro=6,Lo=7,Xa=0,Io=1,Do=2,We=0,No=1,Fo=2,zo=3,Oo=4,Uo=5,qa=300,Xn=301,qn=302,Hs=303,Ws=304,ns=306,Xs=1e3,Pe=1001,qs=1002,ae=1003,Fr=1004;var us=1005;var Se=1006,Bo=1007;var pi=1008;var yn=1009,ko=1010,Vo=1011,Ya=1012,Go=1013,mn=1014,gn=1015,mi=1016,Ho=1017,Wo=1018,Hn=1020,Xo=1021,Re=1023,qo=1024,Yo=1025,_n=1026,Yn=1027,Zo=1028,Jo=1029,$o=1030,Ko=1031,jo=1033,ds=33776,fs=33777,ps=33778,ms=33779,zr=35840,Or=35841,Ur=35842,Br=35843,Qo=36196,kr=37492,Vr=37496,Gr=37808,Hr=37809,Wr=37810,Xr=37811,qr=37812,Yr=37813,Zr=37814,Jr=37815,$r=37816,Kr=37817,jr=37818,Qr=37819,ta=37820,ea=37821,gs=36492,tl=36283,na=36284,ia=36285,sa=36286;var ki=2300,Vi=2301,_s=2302,ra=2400,aa=2401,oa=2402;var vn=3e3,zt=3001,el=3200,nl=3201,il=0,sl=1;var Ie="srgb",gi="srgb-linear";var xs=7680;var rl=519,la=35044;var ca="300 es",Ys=1035,sn=class{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[t]===void 0&&(n[t]=[]),n[t].indexOf(e)===-1&&n[t].push(e)}hasEventListener(t,e){if(this._listeners===void 0)return!1;let n=this._listeners;return n[t]!==void 0&&n[t].indexOf(e)!==-1}removeEventListener(t,e){if(this._listeners===void 0)return;let i=this._listeners[t];if(i!==void 0){let s=i.indexOf(e);s!==-1&&i.splice(s,1)}}dispatchEvent(t){if(this._listeners===void 0)return;let n=this._listeners[t.type];if(n!==void 0){t.target=this;let i=n.slice(0);for(let s=0,o=i.length;s>8&255]+ee[r>>16&255]+ee[r>>24&255]+"-"+ee[t&255]+ee[t>>8&255]+"-"+ee[t>>16&15|64]+ee[t>>24&255]+"-"+ee[e&63|128]+ee[e>>8&255]+"-"+ee[e>>16&255]+ee[e>>24&255]+ee[n&255]+ee[n>>8&255]+ee[n>>16&255]+ee[n>>24&255]).toLowerCase()}function ue(r,t,e){return Math.max(t,Math.min(e,r))}function Mr(r,t){return(r%t+t)%t}function al(r,t,e,n,i){return n+(r-t)*(i-n)/(e-t)}function ol(r,t,e){return r!==t?(e-r)/(t-r):0}function di(r,t,e){return(1-e)*r+e*t}function ll(r,t,e,n){return di(r,t,1-Math.exp(-e*n))}function cl(r,t=1){return t-Math.abs(Mr(r,t*2)-t)}function hl(r,t,e){return r<=t?0:r>=e?1:(r=(r-t)/(e-t),r*r*(3-2*r))}function ul(r,t,e){return r<=t?0:r>=e?1:(r=(r-t)/(e-t),r*r*r*(r*(r*6-15)+10))}function dl(r,t){return r+Math.floor(Math.random()*(t-r+1))}function fl(r,t){return r+Math.random()*(t-r)}function pl(r){return r*(.5-Math.random())}function ml(r){r!==void 0&&(ha=r);let t=ha+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function gl(r){return r*ui}function _l(r){return r*Gi}function Zs(r){return(r&r-1)===0&&r!==0}function xl(r){return Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function Hi(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}function yl(r,t,e,n,i){let s=Math.cos,o=Math.sin,a=s(e/2),c=o(e/2),l=s((t+n)/2),h=o((t+n)/2),f=s((t-n)/2),u=o((t-n)/2),m=s((n-t)/2),_=o((n-t)/2);switch(i){case"XYX":r.set(a*h,c*f,c*u,a*l);break;case"YZY":r.set(c*u,a*h,c*f,a*l);break;case"ZXZ":r.set(c*f,c*u,a*h,a*l);break;case"XZX":r.set(a*h,c*_,c*m,a*l);break;case"YXY":r.set(c*m,a*h,c*_,a*l);break;case"ZYZ":r.set(c*_,c*m,a*h,a*l);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function ci(r,t){switch(t.constructor){case Float32Array:return r;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function he(r,t){switch(t.constructor){case Float32Array:return r;case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}var Za=Object.freeze({__proto__:null,DEG2RAD:ui,RAD2DEG:Gi,ceilPowerOfTwo:xl,clamp:ue,damp:ll,degToRad:gl,denormalize:ci,euclideanModulo:Mr,floorPowerOfTwo:Hi,generateUUID:jn,inverseLerp:ol,isPowerOfTwo:Zs,lerp:di,mapLinear:al,normalize:he,pingpong:cl,radToDeg:_l,randFloat:fl,randFloatSpread:pl,randInt:dl,seededRandom:ml,setQuaternionFromProperEuler:yl,smootherstep:ul,smoothstep:hl}),Nt=class{constructor(t=0,e=0){Nt.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){let n=Math.cos(e),i=Math.sin(e),s=this.x-t.x,o=this.y-t.y;return this.x=s*n-o*i+t.x,this.y=s*i+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},oe=class{constructor(){oe.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(t,e,n,i,s,o,a,c,l){let h=this.elements;return h[0]=t,h[1]=i,h[2]=a,h[3]=e,h[4]=s,h[5]=c,h[6]=n,h[7]=o,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,o=n[0],a=n[3],c=n[6],l=n[1],h=n[4],f=n[7],u=n[2],m=n[5],_=n[8],p=i[0],d=i[3],v=i[6],T=i[1],b=i[4],M=i[7],A=i[2],C=i[5],I=i[8];return s[0]=o*p+a*T+c*A,s[3]=o*d+a*b+c*C,s[6]=o*v+a*M+c*I,s[1]=l*p+h*T+f*A,s[4]=l*d+h*b+f*C,s[7]=l*v+h*M+f*I,s[2]=u*p+m*T+_*A,s[5]=u*d+m*b+_*C,s[8]=u*v+m*M+_*I,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],l=t[7],h=t[8];return e*o*h-e*a*l-n*s*h+n*a*c+i*s*l-i*o*c}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],l=t[7],h=t[8],f=h*o-a*l,u=a*c-h*s,m=l*s-o*c,_=e*f+n*u+i*m;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);let p=1/_;return t[0]=f*p,t[1]=(i*l-h*n)*p,t[2]=(a*n-i*o)*p,t[3]=u*p,t[4]=(h*e-i*c)*p,t[5]=(i*s-a*e)*p,t[6]=m*p,t[7]=(n*c-l*e)*p,t[8]=(o*e-n*s)*p,this}transpose(){let t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,s,o,a){let c=Math.cos(s),l=Math.sin(s);return this.set(n*c,n*l,-n*(c*o+l*a)+o+t,-i*l,i*c,-i*(-l*o+c*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(ys.makeScale(t,e)),this}rotate(t){return this.premultiply(ys.makeRotation(-t)),this}translate(t,e){return this.premultiply(ys.makeTranslation(t,e)),this}makeTranslation(t,e){return this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<9;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return new this.constructor().fromArray(this.elements)}},ys=new oe;function Ja(r){for(let t=r.length-1;t>=0;--t)if(r[t]>=65535)return!0;return!1}function Wi(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function xn(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function Bi(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}var vs={[Ie]:{[gi]:xn},[gi]:{[Ie]:Bi}},se={legacyMode:!0,get workingColorSpace(){return gi},set workingColorSpace(r){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(r,t,e){if(this.legacyMode||t===e||!t||!e)return r;if(vs[t]&&vs[t][e]!==void 0){let n=vs[t][e];return r.r=n(r.r),r.g=n(r.g),r.b=n(r.b),r}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(r,t){return this.convert(r,this.workingColorSpace,t)},toWorkingColorSpace:function(r,t){return this.convert(r,t,this.workingColorSpace)}},$a={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Wt={r:0,g:0,b:0},Ae={h:0,s:0,l:0},vi={h:0,s:0,l:0};function Ms(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*6*(2/3-e):r}function Mi(r,t){return t.r=r.r,t.g=r.g,t.b=r.b,t}var Ot=class{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,e===void 0&&n===void 0?this.set(t):this.setRGB(t,e,n)}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Ie){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,se.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=se.workingColorSpace){return this.r=t,this.g=e,this.b=n,se.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=se.workingColorSpace){if(t=Mr(t,1),e=ue(e,0,1),n=ue(n,0,1),e===0)this.r=this.g=this.b=n;else{let s=n<=.5?n*(1+e):n+e-n*e,o=2*n-s;this.r=Ms(o,s,t+1/3),this.g=Ms(o,s,t),this.b=Ms(o,s,t-1/3)}return se.toWorkingColorSpace(this,i),this}setStyle(t,e=Ie){function n(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^((?:rgb|hsl)a?)\\(([^\\)]*)\\)/.exec(t)){let s,o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(s=/^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(s[1],10))/255,this.g=Math.min(255,parseInt(s[2],10))/255,this.b=Math.min(255,parseInt(s[3],10))/255,se.toWorkingColorSpace(this,e),n(s[4]),this;if(s=/^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(s[1],10))/100,this.g=Math.min(100,parseInt(s[2],10))/100,this.b=Math.min(100,parseInt(s[3],10))/100,se.toWorkingColorSpace(this,e),n(s[4]),this;break;case"hsl":case"hsla":if(s=/^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(a)){let c=parseFloat(s[1])/360,l=parseFloat(s[2])/100,h=parseFloat(s[3])/100;return n(s[4]),this.setHSL(c,l,h,e)}break}}else if(i=/^\\#([A-Fa-f\\d]+)$/.exec(t)){let s=i[1],o=s.length;if(o===3)return this.r=parseInt(s.charAt(0)+s.charAt(0),16)/255,this.g=parseInt(s.charAt(1)+s.charAt(1),16)/255,this.b=parseInt(s.charAt(2)+s.charAt(2),16)/255,se.toWorkingColorSpace(this,e),this;if(o===6)return this.r=parseInt(s.charAt(0)+s.charAt(1),16)/255,this.g=parseInt(s.charAt(2)+s.charAt(3),16)/255,this.b=parseInt(s.charAt(4)+s.charAt(5),16)/255,se.toWorkingColorSpace(this,e),this}return t&&t.length>0?this.setColorName(t,e):this}setColorName(t,e=Ie){let n=$a[t.toLowerCase()];return n!==void 0?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=xn(t.r),this.g=xn(t.g),this.b=xn(t.b),this}copyLinearToSRGB(t){return this.r=Bi(t.r),this.g=Bi(t.g),this.b=Bi(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Ie){return se.fromWorkingColorSpace(Mi(this,Wt),t),ue(Wt.r*255,0,255)<<16^ue(Wt.g*255,0,255)<<8^ue(Wt.b*255,0,255)<<0}getHexString(t=Ie){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=se.workingColorSpace){se.fromWorkingColorSpace(Mi(this,Wt),e);let n=Wt.r,i=Wt.g,s=Wt.b,o=Math.max(n,i,s),a=Math.min(n,i,s),c,l,h=(a+o)/2;if(a===o)c=0,l=0;else{let f=o-a;switch(l=h<=.5?f/(o+a):f/(2-o-a),o){case n:c=(i-s)/f+(i2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement!="undefined"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&t instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&t instanceof ImageBitmap){let e=Wi("canvas");e.width=t.width,e.height=t.height;let n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);let i=n.getImageData(0,0,t.width,t.height),s=i.data;for(let o=0;o0&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==qa)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Xs:t.x=t.x-Math.floor(t.x);break;case Pe:t.x=t.x<0?0:1;break;case qs:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Xs:t.y=t.y-Math.floor(t.y);break;case Pe:t.y=t.y<0?0:1;break;case qs:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}};le.DEFAULT_IMAGE=null;le.DEFAULT_MAPPING=qa;le.DEFAULT_ANISOTROPY=1;var Xt=class{constructor(t=0,e=0,n=0,i=1){Xt.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*s,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*s,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*s,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*s,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,s,c=t.elements,l=c[0],h=c[4],f=c[8],u=c[1],m=c[5],_=c[9],p=c[2],d=c[6],v=c[10];if(Math.abs(h-u)<.01&&Math.abs(f-p)<.01&&Math.abs(_-d)<.01){if(Math.abs(h+u)<.1&&Math.abs(f+p)<.1&&Math.abs(_+d)<.1&&Math.abs(l+m+v-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let b=(l+1)/2,M=(m+1)/2,A=(v+1)/2,C=(h+u)/4,I=(f+p)/4,x=(_+d)/4;return b>M&&b>A?b<.01?(n=0,i=.707106781,s=.707106781):(n=Math.sqrt(b),i=C/n,s=I/n):M>A?M<.01?(n=.707106781,i=0,s=.707106781):(i=Math.sqrt(M),n=C/i,s=x/i):A<.01?(n=.707106781,i=.707106781,s=0):(s=Math.sqrt(A),n=I/s,i=x/s),this.set(n,i,s,e),this}let T=Math.sqrt((d-_)*(d-_)+(f-p)*(f-p)+(u-h)*(u-h));return Math.abs(T)<.001&&(T=1),this.x=(d-_)/T,this.y=(f-p)/T,this.z=(u-h)/T,this.w=Math.acos((l+m+v-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},qe=class extends sn{constructor(t=1,e=1,n={}){super(),this.isWebGLRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new Xt(0,0,t,e),this.scissorTest=!1,this.viewport=new Xt(0,0,t,e);let i={width:t,height:e,depth:1};this.texture=new le(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.internalFormat=n.internalFormat!==void 0?n.internalFormat:null,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Se,this.depthBuffer=n.depthBuffer!==void 0?n.depthBuffer:!0,this.stencilBuffer=n.stencilBuffer!==void 0?n.stencilBuffer:!1,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null,this.samples=n.samples!==void 0?n.samples:0}setSize(t,e,n=1){(this.width!==t||this.height!==e||this.depth!==n)&&(this.width=t,this.height=e,this.depth=n,this.texture.image.width=t,this.texture.image.height=e,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.isRenderTargetTexture=!0;let e=Object.assign({},t.texture.image);return this.texture.source=new qi(e),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},Yi=class extends le{constructor(t=null,e=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=ae,this.minFilter=ae,this.wrapR=Pe,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Js=class extends le{constructor(t=null,e=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=ae,this.minFilter=ae,this.wrapR=Pe,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var rn=class{constructor(t=0,e=0,n=0,i=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,s,o,a){let c=n[i+0],l=n[i+1],h=n[i+2],f=n[i+3],u=s[o+0],m=s[o+1],_=s[o+2],p=s[o+3];if(a===0){t[e+0]=c,t[e+1]=l,t[e+2]=h,t[e+3]=f;return}if(a===1){t[e+0]=u,t[e+1]=m,t[e+2]=_,t[e+3]=p;return}if(f!==p||c!==u||l!==m||h!==_){let d=1-a,v=c*u+l*m+h*_+f*p,T=v>=0?1:-1,b=1-v*v;if(b>Number.EPSILON){let A=Math.sqrt(b),C=Math.atan2(A,v*T);d=Math.sin(d*C)/A,a=Math.sin(a*C)/A}let M=a*T;if(c=c*d+u*M,l=l*d+m*M,h=h*d+_*M,f=f*d+p*M,d===1-a){let A=1/Math.sqrt(c*c+l*l+h*h+f*f);c*=A,l*=A,h*=A,f*=A}}t[e]=c,t[e+1]=l,t[e+2]=h,t[e+3]=f}static multiplyQuaternionsFlat(t,e,n,i,s,o){let a=n[i],c=n[i+1],l=n[i+2],h=n[i+3],f=s[o],u=s[o+1],m=s[o+2],_=s[o+3];return t[e]=a*_+h*f+c*m-l*u,t[e+1]=c*_+h*u+l*f-a*m,t[e+2]=l*_+h*m+a*u-c*f,t[e+3]=h*_-a*f-c*u-l*m,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){let n=t._x,i=t._y,s=t._z,o=t._order,a=Math.cos,c=Math.sin,l=a(n/2),h=a(i/2),f=a(s/2),u=c(n/2),m=c(i/2),_=c(s/2);switch(o){case"XYZ":this._x=u*h*f+l*m*_,this._y=l*m*f-u*h*_,this._z=l*h*_+u*m*f,this._w=l*h*f-u*m*_;break;case"YXZ":this._x=u*h*f+l*m*_,this._y=l*m*f-u*h*_,this._z=l*h*_-u*m*f,this._w=l*h*f+u*m*_;break;case"ZXY":this._x=u*h*f-l*m*_,this._y=l*m*f+u*h*_,this._z=l*h*_+u*m*f,this._w=l*h*f-u*m*_;break;case"ZYX":this._x=u*h*f-l*m*_,this._y=l*m*f+u*h*_,this._z=l*h*_-u*m*f,this._w=l*h*f+u*m*_;break;case"YZX":this._x=u*h*f+l*m*_,this._y=l*m*f+u*h*_,this._z=l*h*_-u*m*f,this._w=l*h*f-u*m*_;break;case"XZY":this._x=u*h*f-l*m*_,this._y=l*m*f-u*h*_,this._z=l*h*_+u*m*f,this._w=l*h*f+u*m*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return e!==!1&&this._onChangeCallback(),this}setFromAxisAngle(t,e){let n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){let e=t.elements,n=e[0],i=e[4],s=e[8],o=e[1],a=e[5],c=e[9],l=e[2],h=e[6],f=e[10],u=n+a+f;if(u>0){let m=.5/Math.sqrt(u+1);this._w=.25/m,this._x=(h-c)*m,this._y=(s-l)*m,this._z=(o-i)*m}else if(n>a&&n>f){let m=2*Math.sqrt(1+n-a-f);this._w=(h-c)/m,this._x=.25*m,this._y=(i+o)/m,this._z=(s+l)/m}else if(a>f){let m=2*Math.sqrt(1+a-n-f);this._w=(s-l)/m,this._x=(i+o)/m,this._y=.25*m,this._z=(c+h)/m}else{let m=2*Math.sqrt(1+f-n-a);this._w=(o-i)/m,this._x=(s+l)/m,this._y=(c+h)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return nMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(ue(this.dot(t),-1,1)))}rotateTowards(t,e){let n=this.angleTo(t);if(n===0)return this;let i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let n=t._x,i=t._y,s=t._z,o=t._w,a=e._x,c=e._y,l=e._z,h=e._w;return this._x=n*h+o*a+i*l-s*c,this._y=i*h+o*c+s*a-n*l,this._z=s*h+o*l+n*c-i*a,this._w=o*h-n*a-i*c-s*l,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);let n=this._x,i=this._y,s=this._z,o=this._w,a=o*t._w+n*t._x+i*t._y+s*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=i,this._z=s,this;let c=1-a*a;if(c<=Number.EPSILON){let m=1-e;return this._w=m*o+e*this._w,this._x=m*n+e*this._x,this._y=m*i+e*this._y,this._z=m*s+e*this._z,this.normalize(),this._onChangeCallback(),this}let l=Math.sqrt(c),h=Math.atan2(l,a),f=Math.sin((1-e)*h)/l,u=Math.sin(e*h)/l;return this._w=o*f+this._w*u,this._x=n*f+this._x*u,this._y=i*f+this._y*u,this._z=s*f+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){let t=Math.random(),e=Math.sqrt(1-t),n=Math.sqrt(t),i=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(e*Math.cos(i),n*Math.sin(s),n*Math.cos(s),e*Math.sin(i))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},N=class{constructor(t=0,e=0,n=0){N.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return n===void 0&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(ua.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(ua.setFromAxisAngle(t,e))}applyMatrix3(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[3]*n+s[6]*i,this.y=s[1]*e+s[4]*n+s[7]*i,this.z=s[2]*e+s[5]*n+s[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=t.elements,o=1/(s[3]*e+s[7]*n+s[11]*i+s[15]);return this.x=(s[0]*e+s[4]*n+s[8]*i+s[12])*o,this.y=(s[1]*e+s[5]*n+s[9]*i+s[13])*o,this.z=(s[2]*e+s[6]*n+s[10]*i+s[14])*o,this}applyQuaternion(t){let e=this.x,n=this.y,i=this.z,s=t.x,o=t.y,a=t.z,c=t.w,l=c*e+o*i-a*n,h=c*n+a*e-s*i,f=c*i+s*n-o*e,u=-s*e-o*n-a*i;return this.x=l*c+u*-s+h*-a-f*-o,this.y=h*c+u*-o+f*-s-l*-a,this.z=f*c+u*-a+l*-o-h*-s,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i,this.y=s[1]*e+s[5]*n+s[9]*i,this.z=s[2]*e+s[6]*n+s[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){let n=t.x,i=t.y,s=t.z,o=e.x,a=e.y,c=e.z;return this.x=i*c-s*a,this.y=s*o-n*c,this.z=n*a-i*o,this}projectOnVector(t){let e=t.lengthSq();if(e===0)return this.set(0,0,0);let n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return ws.copy(this).projectOnVector(t),this.sub(ws)}reflect(t){return this.sub(ws.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;let n=this.dot(t)/e;return Math.acos(ue(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){let i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){let e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=(Math.random()-.5)*2,e=Math.random()*Math.PI*2,n=Math.sqrt(1-t**2);return this.x=n*Math.cos(e),this.y=n*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},ws=new N,ua=new rn,Mn=class{constructor(t=new N(1/0,1/0,1/0),e=new N(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){let e=1/0,n=1/0,i=1/0,s=-1/0,o=-1/0,a=-1/0;for(let c=0,l=t.length;cs&&(s=h),f>o&&(o=f),u>a&&(a=u)}return this.min.set(e,n,i),this.max.set(s,o,a),this}setFromBufferAttribute(t){let e=1/0,n=1/0,i=1/0,s=-1/0,o=-1/0,a=-1/0;for(let c=0,l=t.count;cs&&(s=h),f>o&&(o=f),u>a&&(a=u)}return this.min.set(e,n,i),this.max.set(s,o,a),this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,hn),hn.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(ei),bi.subVectors(this.max,ei),An.subVectors(t.a,ei),En.subVectors(t.b,ei),Cn.subVectors(t.c,ei),Je.subVectors(En,An),$e.subVectors(Cn,En),un.subVectors(An,Cn);let e=[0,-Je.z,Je.y,0,-$e.z,$e.y,0,-un.z,un.y,Je.z,0,-Je.x,$e.z,0,-$e.x,un.z,0,-un.x,-Je.y,Je.x,0,-$e.y,$e.x,0,-un.y,un.x,0];return!Ts(e,An,En,Cn,bi)||(e=[1,0,0,0,1,0,0,0,1],!Ts(e,An,En,Cn,bi))?!1:(wi.crossVectors(Je,$e),e=[wi.x,wi.y,wi.z],Ts(e,An,En,Cn,bi))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return hn.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=this.getSize(hn).length()*.5,t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(Ue[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Ue[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Ue[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Ue[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Ue[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Ue[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Ue[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Ue[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Ue),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},Ue=[new N,new N,new N,new N,new N,new N,new N,new N],hn=new N,Ss=new Mn,An=new N,En=new N,Cn=new N,Je=new N,$e=new N,un=new N,ei=new N,bi=new N,wi=new N,dn=new N;function Ts(r,t,e,n,i){for(let s=0,o=r.length-3;s<=o;s+=3){dn.fromArray(r,s);let a=i.x*Math.abs(dn.x)+i.y*Math.abs(dn.y)+i.z*Math.abs(dn.z),c=t.dot(dn),l=e.dot(dn),h=n.dot(dn);if(Math.max(-Math.max(c,l,h),Math.min(c,l,h))>a)return!1}return!0}var Ml=new Mn,ni=new N,As=new N,_i=class{constructor(t=new N,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){let n=this.center;e!==void 0?n.copy(e):Ml.setFromPoints(t).getCenter(n);let i=0;for(let s=0,o=t.length;sthis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;ni.subVectors(t,this.center);let e=ni.lengthSq();if(e>this.radius*this.radius){let n=Math.sqrt(e),i=(n-this.radius)*.5;this.center.addScaledVector(ni,i/n),this.radius+=i}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(As.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(ni.copy(t.center).add(As)),this.expandByPoint(ni.copy(t.center).sub(As))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},Be=new N,Es=new N,Si=new N,Ke=new N,Cs=new N,Ti=new N,Ps=new N,$s=class{constructor(t=new N,e=new N(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Be)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);let n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=Be.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Be.copy(this.direction).multiplyScalar(e).add(this.origin),Be.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){Es.copy(t).add(e).multiplyScalar(.5),Si.copy(e).sub(t).normalize(),Ke.copy(this.origin).sub(Es);let s=t.distanceTo(e)*.5,o=-this.direction.dot(Si),a=Ke.dot(this.direction),c=-Ke.dot(Si),l=Ke.lengthSq(),h=Math.abs(1-o*o),f,u,m,_;if(h>0)if(f=o*c-a,u=o*a-c,_=s*h,f>=0)if(u>=-_)if(u<=_){let p=1/h;f*=p,u*=p,m=f*(f+o*u+2*a)+u*(o*f+u+2*c)+l}else u=s,f=Math.max(0,-(o*u+a)),m=-f*f+u*(u+2*c)+l;else u=-s,f=Math.max(0,-(o*u+a)),m=-f*f+u*(u+2*c)+l;else u<=-_?(f=Math.max(0,-(-o*s+a)),u=f>0?-s:Math.min(Math.max(-s,-c),s),m=-f*f+u*(u+2*c)+l):u<=_?(f=0,u=Math.min(Math.max(-s,-c),s),m=u*(u+2*c)+l):(f=Math.max(0,-(o*s+a)),u=f>0?s:Math.min(Math.max(-s,-c),s),m=-f*f+u*(u+2*c)+l);else u=o>0?-s:s,f=Math.max(0,-(o*u+a)),m=-f*f+u*(u+2*c)+l;return n&&n.copy(this.direction).multiplyScalar(f).add(this.origin),i&&i.copy(Si).multiplyScalar(u).add(Es),m}intersectSphere(t,e){Be.subVectors(t.center,this.origin);let n=Be.dot(this.direction),i=Be.dot(Be)-n*n,s=t.radius*t.radius;if(i>s)return null;let o=Math.sqrt(s-i),a=n-o,c=n+o;return a<0&&c<0?null:a<0?this.at(c,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){let n=this.distanceToPlane(t);return n===null?null:this.at(n,e)}intersectsPlane(t){let e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,s,o,a,c,l=1/this.direction.x,h=1/this.direction.y,f=1/this.direction.z,u=this.origin;return l>=0?(n=(t.min.x-u.x)*l,i=(t.max.x-u.x)*l):(n=(t.max.x-u.x)*l,i=(t.min.x-u.x)*l),h>=0?(s=(t.min.y-u.y)*h,o=(t.max.y-u.y)*h):(s=(t.max.y-u.y)*h,o=(t.min.y-u.y)*h),n>o||s>i||((s>n||isNaN(n))&&(n=s),(o=0?(a=(t.min.z-u.z)*f,c=(t.max.z-u.z)*f):(a=(t.max.z-u.z)*f,c=(t.min.z-u.z)*f),n>c||a>i)||((a>n||n!==n)&&(n=a),(c=0?n:i,e)}intersectsBox(t){return this.intersectBox(t,Be)!==null}intersectTriangle(t,e,n,i,s){Cs.subVectors(e,t),Ti.subVectors(n,t),Ps.crossVectors(Cs,Ti);let o=this.direction.dot(Ps),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Ke.subVectors(this.origin,t);let c=a*this.direction.dot(Ti.crossVectors(Ke,Ti));if(c<0)return null;let l=a*this.direction.dot(Cs.cross(Ke));if(l<0||c+l>o)return null;let h=-a*Ke.dot(Ps);return h<0?null:this.at(h/o,s)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},qt=class{constructor(){qt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(t,e,n,i,s,o,a,c,l,h,f,u,m,_,p,d){let v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=i,v[1]=s,v[5]=o,v[9]=a,v[13]=c,v[2]=l,v[6]=h,v[10]=f,v[14]=u,v[3]=m,v[7]=_,v[11]=p,v[15]=d,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new qt().fromArray(this.elements)}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){let e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){let e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){let e=this.elements,n=t.elements,i=1/Pn.setFromMatrixColumn(t,0).length(),s=1/Pn.setFromMatrixColumn(t,1).length(),o=1/Pn.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*s,e[5]=n[5]*s,e[6]=n[6]*s,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){let e=this.elements,n=t.x,i=t.y,s=t.z,o=Math.cos(n),a=Math.sin(n),c=Math.cos(i),l=Math.sin(i),h=Math.cos(s),f=Math.sin(s);if(t.order==="XYZ"){let u=o*h,m=o*f,_=a*h,p=a*f;e[0]=c*h,e[4]=-c*f,e[8]=l,e[1]=m+_*l,e[5]=u-p*l,e[9]=-a*c,e[2]=p-u*l,e[6]=_+m*l,e[10]=o*c}else if(t.order==="YXZ"){let u=c*h,m=c*f,_=l*h,p=l*f;e[0]=u+p*a,e[4]=_*a-m,e[8]=o*l,e[1]=o*f,e[5]=o*h,e[9]=-a,e[2]=m*a-_,e[6]=p+u*a,e[10]=o*c}else if(t.order==="ZXY"){let u=c*h,m=c*f,_=l*h,p=l*f;e[0]=u-p*a,e[4]=-o*f,e[8]=_+m*a,e[1]=m+_*a,e[5]=o*h,e[9]=p-u*a,e[2]=-o*l,e[6]=a,e[10]=o*c}else if(t.order==="ZYX"){let u=o*h,m=o*f,_=a*h,p=a*f;e[0]=c*h,e[4]=_*l-m,e[8]=u*l+p,e[1]=c*f,e[5]=p*l+u,e[9]=m*l-_,e[2]=-l,e[6]=a*c,e[10]=o*c}else if(t.order==="YZX"){let u=o*c,m=o*l,_=a*c,p=a*l;e[0]=c*h,e[4]=p-u*f,e[8]=_*f+m,e[1]=f,e[5]=o*h,e[9]=-a*h,e[2]=-l*h,e[6]=m*f+_,e[10]=u-p*f}else if(t.order==="XZY"){let u=o*c,m=o*l,_=a*c,p=a*l;e[0]=c*h,e[4]=-f,e[8]=l*h,e[1]=u*f+p,e[5]=o*h,e[9]=m*f-_,e[2]=_*f-m,e[6]=a*h,e[10]=p*f+u}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(bl,t,wl)}lookAt(t,e,n){let i=this.elements;return me.subVectors(t,e),me.lengthSq()===0&&(me.z=1),me.normalize(),je.crossVectors(n,me),je.lengthSq()===0&&(Math.abs(n.z)===1?me.x+=1e-4:me.z+=1e-4,me.normalize(),je.crossVectors(n,me)),je.normalize(),Ai.crossVectors(me,je),i[0]=je.x,i[4]=Ai.x,i[8]=me.x,i[1]=je.y,i[5]=Ai.y,i[9]=me.y,i[2]=je.z,i[6]=Ai.z,i[10]=me.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,o=n[0],a=n[4],c=n[8],l=n[12],h=n[1],f=n[5],u=n[9],m=n[13],_=n[2],p=n[6],d=n[10],v=n[14],T=n[3],b=n[7],M=n[11],A=n[15],C=i[0],I=i[4],x=i[8],S=i[12],L=i[1],X=i[5],q=i[9],z=i[13],R=i[2],G=i[6],Y=i[10],j=i[14],W=i[3],Q=i[7],Z=i[11],ft=i[15];return s[0]=o*C+a*L+c*R+l*W,s[4]=o*I+a*X+c*G+l*Q,s[8]=o*x+a*q+c*Y+l*Z,s[12]=o*S+a*z+c*j+l*ft,s[1]=h*C+f*L+u*R+m*W,s[5]=h*I+f*X+u*G+m*Q,s[9]=h*x+f*q+u*Y+m*Z,s[13]=h*S+f*z+u*j+m*ft,s[2]=_*C+p*L+d*R+v*W,s[6]=_*I+p*X+d*G+v*Q,s[10]=_*x+p*q+d*Y+v*Z,s[14]=_*S+p*z+d*j+v*ft,s[3]=T*C+b*L+M*R+A*W,s[7]=T*I+b*X+M*G+A*Q,s[11]=T*x+b*q+M*Y+A*Z,s[15]=T*S+b*z+M*j+A*ft,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[4],i=t[8],s=t[12],o=t[1],a=t[5],c=t[9],l=t[13],h=t[2],f=t[6],u=t[10],m=t[14],_=t[3],p=t[7],d=t[11],v=t[15];return _*(+s*c*f-i*l*f-s*a*u+n*l*u+i*a*m-n*c*m)+p*(+e*c*m-e*l*u+s*o*u-i*o*m+i*l*h-s*c*h)+d*(+e*l*f-e*a*m-s*o*f+n*o*m+s*a*h-n*l*h)+v*(-i*a*h-e*c*f+e*a*u+i*o*f-n*o*u+n*c*h)}transpose(){let t=this.elements,e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){let i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],l=t[7],h=t[8],f=t[9],u=t[10],m=t[11],_=t[12],p=t[13],d=t[14],v=t[15],T=f*d*l-p*u*l+p*c*m-a*d*m-f*c*v+a*u*v,b=_*u*l-h*d*l-_*c*m+o*d*m+h*c*v-o*u*v,M=h*p*l-_*f*l+_*a*m-o*p*m-h*a*v+o*f*v,A=_*f*c-h*p*c-_*a*u+o*p*u+h*a*d-o*f*d,C=e*T+n*b+i*M+s*A;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let I=1/C;return t[0]=T*I,t[1]=(p*u*s-f*d*s-p*i*m+n*d*m+f*i*v-n*u*v)*I,t[2]=(a*d*s-p*c*s+p*i*l-n*d*l-a*i*v+n*c*v)*I,t[3]=(f*c*s-a*u*s-f*i*l+n*u*l+a*i*m-n*c*m)*I,t[4]=b*I,t[5]=(h*d*s-_*u*s+_*i*m-e*d*m-h*i*v+e*u*v)*I,t[6]=(_*c*s-o*d*s-_*i*l+e*d*l+o*i*v-e*c*v)*I,t[7]=(o*u*s-h*c*s+h*i*l-e*u*l-o*i*m+e*c*m)*I,t[8]=M*I,t[9]=(_*f*s-h*p*s-_*n*m+e*p*m+h*n*v-e*f*v)*I,t[10]=(o*p*s-_*a*s+_*n*l-e*p*l-o*n*v+e*a*v)*I,t[11]=(h*a*s-o*f*s-h*n*l+e*f*l+o*n*m-e*a*m)*I,t[12]=A*I,t[13]=(h*p*i-_*f*i+_*n*u-e*p*u-h*n*d+e*f*d)*I,t[14]=(_*a*i-o*p*i-_*n*c+e*p*c+o*n*d-e*a*d)*I,t[15]=(o*f*i-h*a*i+h*n*c-e*f*c-o*n*u+e*a*u)*I,this}scale(t){let e=this.elements,n=t.x,i=t.y,s=t.z;return e[0]*=n,e[4]*=i,e[8]*=s,e[1]*=n,e[5]*=i,e[9]*=s,e[2]*=n,e[6]*=i,e[10]*=s,e[3]*=n,e[7]*=i,e[11]*=s,this}getMaxScaleOnAxis(){let t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){let e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){let n=Math.cos(e),i=Math.sin(e),s=1-n,o=t.x,a=t.y,c=t.z,l=s*o,h=s*a;return this.set(l*o+n,l*a-i*c,l*c+i*a,0,l*a+i*c,h*a+n,h*c-i*o,0,l*c-i*a,h*c+i*o,s*c*c+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,s,o){return this.set(1,n,s,0,t,1,o,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){let i=this.elements,s=e._x,o=e._y,a=e._z,c=e._w,l=s+s,h=o+o,f=a+a,u=s*l,m=s*h,_=s*f,p=o*h,d=o*f,v=a*f,T=c*l,b=c*h,M=c*f,A=n.x,C=n.y,I=n.z;return i[0]=(1-(p+v))*A,i[1]=(m+M)*A,i[2]=(_-b)*A,i[3]=0,i[4]=(m-M)*C,i[5]=(1-(u+v))*C,i[6]=(d+T)*C,i[7]=0,i[8]=(_+b)*I,i[9]=(d-T)*I,i[10]=(1-(u+p))*I,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){let i=this.elements,s=Pn.set(i[0],i[1],i[2]).length(),o=Pn.set(i[4],i[5],i[6]).length(),a=Pn.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),t.x=i[12],t.y=i[13],t.z=i[14],Ee.copy(this);let l=1/s,h=1/o,f=1/a;return Ee.elements[0]*=l,Ee.elements[1]*=l,Ee.elements[2]*=l,Ee.elements[4]*=h,Ee.elements[5]*=h,Ee.elements[6]*=h,Ee.elements[8]*=f,Ee.elements[9]*=f,Ee.elements[10]*=f,e.setFromRotationMatrix(Ee),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,i,s,o){let a=this.elements,c=2*s/(e-t),l=2*s/(n-i),h=(e+t)/(e-t),f=(n+i)/(n-i),u=-(o+s)/(o-s),m=-2*o*s/(o-s);return a[0]=c,a[4]=0,a[8]=h,a[12]=0,a[1]=0,a[5]=l,a[9]=f,a[13]=0,a[2]=0,a[6]=0,a[10]=u,a[14]=m,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,e,n,i,s,o){let a=this.elements,c=1/(e-t),l=1/(n-i),h=1/(o-s),f=(e+t)*c,u=(n+i)*l,m=(o+s)*h;return a[0]=2*c,a[4]=0,a[8]=0,a[12]=-f,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-u,a[2]=0,a[6]=0,a[10]=-2*h,a[14]=-m,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<16;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}},Pn=new N,Ee=new qt,bl=new N(0,0,0),wl=new N(1,1,1),je=new N,Ai=new N,me=new N,da=new qt,fa=new rn,Zn=class{constructor(t=0,e=0,n=0,i=Zn.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){let i=t.elements,s=i[0],o=i[4],a=i[8],c=i[1],l=i[5],h=i[9],f=i[2],u=i[6],m=i[10];switch(e){case"XYZ":this._y=Math.asin(ue(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-ue(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(ue(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-ue(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(u,m),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-o,l));break;case"YZX":this._z=Math.asin(ue(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-ue(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return da.makeRotationFromQuaternion(t),this.setFromRotationMatrix(da,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return fa.setFromEuler(this),this.setFromQuaternion(fa,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};Zn.DEFAULT_ORDER="XYZ";var Zi=class{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let e=0;e1){for(let n=0;n0&&(n=n.concat(o))}return n}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ii,t,Tl),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ii,Al,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);let e=this.children;for(let n=0,i=e.length;n0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON()));function s(a,c){return a[c.uuid]===void 0&&(a[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(t.geometries,this.geometry);let a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){let c=a.shapes;if(Array.isArray(c))for(let l=0,h=c.length;l0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(n.geometries=a),c.length>0&&(n.materials=c),l.length>0&&(n.textures=l),h.length>0&&(n.images=h),f.length>0&&(n.shapes=f),u.length>0&&(n.skeletons=u),m.length>0&&(n.animations=m),_.length>0&&(n.nodes=_)}return n.object=i,n;function o(a){let c=[];for(let l in a){let h=a[l];delete h.metadata,c.push(h)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let n=0;n0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(t,e,n,i,s){Ce.subVectors(i,e),Ve.subVectors(n,e),Rs.subVectors(t,e);let o=Ce.dot(Ce),a=Ce.dot(Ve),c=Ce.dot(Rs),l=Ve.dot(Ve),h=Ve.dot(Rs),f=o*l-a*a;if(f===0)return s.set(-2,-1,-1);let u=1/f,m=(l*c-a*h)*u,_=(o*h-a*c)*u;return s.set(1-m-_,_,m)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,Ge),Ge.x>=0&&Ge.y>=0&&Ge.x+Ge.y<=1}static getUV(t,e,n,i,s,o,a,c){return this.getBarycoord(t,e,n,i,Ge),c.set(0,0),c.addScaledVector(s,Ge.x),c.addScaledVector(o,Ge.y),c.addScaledVector(a,Ge.z),c}static isFrontFacing(t,e,n,i){return Ce.subVectors(n,e),Ve.subVectors(t,e),Ce.cross(Ve).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return Ce.subVectors(this.c,this.b),Ve.subVectors(this.a,this.b),Ce.cross(Ve).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return xe.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return xe.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,n,i,s){return xe.getUV(t,this.a,this.b,this.c,e,n,i,s)}containsPoint(t){return xe.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return xe.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){let n=this.a,i=this.b,s=this.c,o,a;Ln.subVectors(i,n),In.subVectors(s,n),Ls.subVectors(t,n);let c=Ln.dot(Ls),l=In.dot(Ls);if(c<=0&&l<=0)return e.copy(n);Is.subVectors(t,i);let h=Ln.dot(Is),f=In.dot(Is);if(h>=0&&f<=h)return e.copy(i);let u=c*f-h*l;if(u<=0&&c>=0&&h<=0)return o=c/(c-h),e.copy(n).addScaledVector(Ln,o);Ds.subVectors(t,s);let m=Ln.dot(Ds),_=In.dot(Ds);if(_>=0&&m<=_)return e.copy(s);let p=m*l-c*_;if(p<=0&&l>=0&&_<=0)return a=l/(l-_),e.copy(n).addScaledVector(In,a);let d=h*_-m*f;if(d<=0&&f-h>=0&&m-_>=0)return ya.subVectors(s,i),a=(f-h)/(f-h+(m-_)),e.copy(i).addScaledVector(ya,a);let v=1/(d+p+u);return o=p*v,a=u*v,e.copy(n).addScaledVector(Ln,o).addScaledVector(In,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},Cl=0,Jn=class extends sn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Cl++}),this.uuid=jn(),this.name="",this.type="Material",this.blending=Gn,this.side=nn,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=Ha,this.blendDst=Wa,this.blendEquation=Bn,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Gs,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=rl,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=xs,this.stencilZFail=xs,this.stencilZPass=xs,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(let e in t){let n=t[e];if(n===void 0){console.warn("THREE.Material: \'"+e+"\' parameter is undefined.");continue}let i=this[e];if(i===void 0){console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.");continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n}}toJSON(t){let e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});let n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Gn&&(n.blending=this.blending),this.side!==nn&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(n.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(s){let o=[];for(let a in s){let c=s[a];delete c.metadata,o.push(c)}return o}if(e){let s=i(t.textures),o=i(t.images);s.length>0&&(n.textures=s),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;let e=t.clippingPlanes,n=null;if(e!==null){let i=e.length;n=new Array(i);for(let s=0;s!==i;++s)n[s]=e[s].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}},Ji=class extends Jn{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Ot(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Xa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}},Gt=new N,Ci=new Nt,ce=class{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=n,this.usage=la,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,s=this.itemSize;i0&&(t.userData=this.userData),this.parameters!==void 0){let c=this.parameters;for(let l in c)c[l]!==void 0&&(t[l]=c[l]);return t}t.data={attributes:{}};let e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});let n=this.attributes;for(let c in n){let l=n[c];t.data.attributes[c]=l.toJSON(t.data)}let i={},s=!1;for(let c in this.morphAttributes){let l=this.morphAttributes[c],h=[];for(let f=0,u=l.length;f0&&(i[c]=h,s=!0)}s&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);let o=this.groups;o.length>0&&(t.data.groups=JSON.parse(JSON.stringify(o)));let a=this.boundingSphere;return a!==null&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=t.name;let n=t.index;n!==null&&this.setIndex(n.clone(e));let i=t.attributes;for(let l in i){let h=i[l];this.setAttribute(l,h.clone(e))}let s=t.morphAttributes;for(let l in s){let h=[],f=s[l];for(let u=0,m=f.length;u0){let i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;se.far?null:{distance:l,point:Di.clone(),object:r}}function Ni(r,t,e,n,i,s,o,a,c){r.getVertexPosition(o,ri),r.getVertexPosition(a,ai),r.getVertexPosition(c,oi);let l=Rl(r,t,e,n,ri,ai,oi,Os);if(l){i&&(Ri.fromBufferAttribute(i,o),Li.fromBufferAttribute(i,a),Ii.fromBufferAttribute(i,c),l.uv=xe.getUV(Os,ri,ai,oi,Ri,Li,Ii,new Nt)),s&&(Ri.fromBufferAttribute(s,o),Li.fromBufferAttribute(s,a),Ii.fromBufferAttribute(s,c),l.uv2=xe.getUV(Os,ri,ai,oi,Ri,Li,Ii,new Nt));let h={a:o,b:a,c,normal:new N,materialIndex:0};xe.getNormal(ri,ai,oi,h.normal),l.face=h}return l}var bn=class extends Ye{constructor(t=1,e=1,n=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:s,depthSegments:o};let a=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);let c=[],l=[],h=[],f=[],u=0,m=0;_("z","y","x",-1,-1,n,e,t,o,s,0),_("z","y","x",1,-1,n,e,-t,o,s,1),_("x","z","y",1,1,t,n,e,i,o,2),_("x","z","y",1,-1,t,n,-e,i,o,3),_("x","y","z",1,-1,t,e,n,i,s,4),_("x","y","z",-1,-1,t,e,-n,i,s,5),this.setIndex(c),this.setAttribute("position",new Xe(l,3)),this.setAttribute("normal",new Xe(h,3)),this.setAttribute("uv",new Xe(f,2));function _(p,d,v,T,b,M,A,C,I,x,S){let L=M/I,X=A/x,q=M/2,z=A/2,R=C/2,G=I+1,Y=x+1,j=0,W=0,Q=new N;for(let Z=0;Z0?1:-1,h.push(Q.x,Q.y,Q.z),f.push(F/I),f.push(1-Z/x),j+=1}}for(let Z=0;Z0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;let n={};for(let i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}},ji=class extends de{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new qt,this.projectionMatrix=new qt,this.projectionMatrixInverse=new qt}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}},_e=class extends ji{constructor(t=50,e=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){let e=.5*this.getFilmHeight()/t;this.fov=Gi*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){let t=Math.tan(ui*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return Gi*2*Math.atan(Math.tan(ui*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,n,i,s,o){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=this.near,e=t*Math.tan(ui*.5*this.fov)/this.zoom,n=2*e,i=this.aspect*n,s=-.5*i,o=this.view;if(this.view!==null&&this.view.enabled){let c=o.fullWidth,l=o.fullHeight;s+=o.offsetX*i/c,e-=o.offsetY*n/l,i*=o.width/c,n*=o.height/l}let a=this.filmOffset;a!==0&&(s+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+i,e,e-n,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}},Fn=-90,zn=1,Ks=class extends de{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n;let i=new _e(Fn,zn,t,e);i.layers=this.layers,i.up.set(0,1,0),i.lookAt(1,0,0),this.add(i);let s=new _e(Fn,zn,t,e);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(-1,0,0),this.add(s);let o=new _e(Fn,zn,t,e);o.layers=this.layers,o.up.set(0,0,-1),o.lookAt(0,1,0),this.add(o);let a=new _e(Fn,zn,t,e);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);let c=new _e(Fn,zn,t,e);c.layers=this.layers,c.up.set(0,1,0),c.lookAt(0,0,1),this.add(c);let l=new _e(Fn,zn,t,e);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,-1),this.add(l)}update(t,e){this.parent===null&&this.updateMatrixWorld();let n=this.renderTarget,[i,s,o,a,c,l]=this.children,h=t.getRenderTarget(),f=t.toneMapping,u=t.xr.enabled;t.toneMapping=We,t.xr.enabled=!1;let m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0),t.render(e,i),t.setRenderTarget(n,1),t.render(e,s),t.setRenderTarget(n,2),t.render(e,o),t.setRenderTarget(n,3),t.render(e,a),t.setRenderTarget(n,4),t.render(e,c),n.texture.generateMipmaps=m,t.setRenderTarget(n,5),t.render(e,l),t.setRenderTarget(h),t.toneMapping=f,t.xr.enabled=u,n.texture.needsPMREMUpdate=!0}},Qi=class extends le{constructor(t,e,n,i,s,o,a,c,l,h){t=t!==void 0?t:[],e=e!==void 0?e:Xn,super(t,e,n,i,s,o,a,c,l,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}},js=class extends qe{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;let n={width:t,height:t,depth:1},i=[n,n,n,n,n,n];this.texture=new Qi(i,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=e.generateMipmaps!==void 0?e.generateMipmaps:!1,this.texture.minFilter=e.minFilter!==void 0?e.minFilter:Se}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.encoding=e.encoding,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:`\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t`,fragmentShader:`\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t`},i=new bn(5,5,5),s=new Ze({name:"CubemapFromEquirect",uniforms:$n(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:ye,blending:en});s.uniforms.tEquirect.value=e;let o=new Ne(i,s),a=e.minFilter;return e.minFilter===pi&&(e.minFilter=Se),new Ks(1,10,this).update(t,o),e.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(t,e,n,i){let s=t.getRenderTarget();for(let o=0;o<6;o++)t.setRenderTarget(this,o),t.clear(e,n,i);t.setRenderTarget(s)}},Us=new N,Fl=new N,zl=new oe,He=class{constructor(t=new N(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){let i=Us.subVectors(n,e).cross(Fl.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){let t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,e){let n=t.delta(Us),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;let s=-(t.start.dot(this.normal)+this.constant)/i;return s<0||s>1?null:e.copy(n).multiplyScalar(s).add(t.start)}intersectsLine(t){let e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){let n=e||zl.getNormalMatrix(t),i=this.coplanarPoint(Us).applyMatrix4(t),s=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(s),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}},On=new _i,Fi=new N,ts=class{constructor(t=new He,e=new He,n=new He,i=new He,s=new He,o=new He){this.planes=[t,e,n,i,s,o]}set(t,e,n,i,s,o){let a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(i),a[4].copy(s),a[5].copy(o),this}copy(t){let e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t){let e=this.planes,n=t.elements,i=n[0],s=n[1],o=n[2],a=n[3],c=n[4],l=n[5],h=n[6],f=n[7],u=n[8],m=n[9],_=n[10],p=n[11],d=n[12],v=n[13],T=n[14],b=n[15];return e[0].setComponents(a-i,f-c,p-u,b-d).normalize(),e[1].setComponents(a+i,f+c,p+u,b+d).normalize(),e[2].setComponents(a+s,f+l,p+m,b+v).normalize(),e[3].setComponents(a-s,f-l,p-m,b-v).normalize(),e[4].setComponents(a-o,f-h,p-_,b-T).normalize(),e[5].setComponents(a+o,f+h,p+_,b+T).normalize(),this}intersectsObject(t){let e=t.geometry;return e.boundingSphere===null&&e.computeBoundingSphere(),On.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(On)}intersectsSprite(t){return On.center.set(0,0,0),On.radius=.7071067811865476,On.applyMatrix4(t.matrixWorld),this.intersectsSphere(On)}intersectsSphere(t){let e=this.planes,n=t.center,i=-t.radius;for(let s=0;s<6;s++)if(e[s].distanceToPoint(n)0?t.max.x:t.min.x,Fi.y=i.normal.y>0?t.max.y:t.min.y,Fi.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(Fi)<0)return!1}return!0}containsPoint(t){let e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function ja(){let r=null,t=!1,e=null,n=null;function i(s,o){e(s,o),n=r.requestAnimationFrame(i)}return{start:function(){t!==!0&&e!==null&&(n=r.requestAnimationFrame(i),t=!0)},stop:function(){r.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(s){e=s},setContext:function(s){r=s}}}function Ol(r,t){let e=t.isWebGL2,n=new WeakMap;function i(l,h){let f=l.array,u=l.usage,m=r.createBuffer();r.bindBuffer(h,m),r.bufferData(h,f,u),l.onUploadCallback();let _;if(f instanceof Float32Array)_=5126;else if(f instanceof Uint16Array)if(l.isFloat16BufferAttribute)if(e)_=5131;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else _=5123;else if(f instanceof Int16Array)_=5122;else if(f instanceof Uint32Array)_=5125;else if(f instanceof Int32Array)_=5124;else if(f instanceof Int8Array)_=5120;else if(f instanceof Uint8Array)_=5121;else if(f instanceof Uint8ClampedArray)_=5121;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:m,type:_,bytesPerElement:f.BYTES_PER_ELEMENT,version:l.version}}function s(l,h,f){let u=h.array,m=h.updateRange;r.bindBuffer(f,l),m.count===-1?r.bufferSubData(f,0,u):(e?r.bufferSubData(f,m.offset*u.BYTES_PER_ELEMENT,u,m.offset,m.count):r.bufferSubData(f,m.offset*u.BYTES_PER_ELEMENT,u.subarray(m.offset,m.offset+m.count)),m.count=-1),h.onUploadCallback()}function o(l){return l.isInterleavedBufferAttribute&&(l=l.data),n.get(l)}function a(l){l.isInterleavedBufferAttribute&&(l=l.data);let h=n.get(l);h&&(r.deleteBuffer(h.buffer),n.delete(l))}function c(l,h){if(l.isGLBufferAttribute){let u=n.get(l);(!u||u.version 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif`,Yl=`#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\t return vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat R21 = R12;\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif`,Zl=`#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos.xyz );\n\t\tvec3 vSigmaY = dFdy( surf_pos.xyz );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif`,Jl=`#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif`,$l=`#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif`,Kl=`#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif`,jl=`#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif`,Ql=`#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif`,tc=`#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif`,ec=`#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif`,nc=`#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif`,ic=`#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}`,sc=`#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif`,rc=`vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif`,ac=`#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif`,oc=`#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif`,lc=`#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif`,cc=`#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif`,hc="gl_FragColor = linearToOutputTexel( gl_FragColor );",uc=`vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}`,dc=`#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif`,fc=`#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif`,pc=`#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif`,mc=`#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif`,gc=`#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif`,_c=`#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif`,xc=`#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif`,yc=`#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif`,vc=`#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif`,Mc=`#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}`,bc=`#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif`,wc=`#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif`,Sc=`LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;`,Tc=`varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert`,Ac=`uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif`,Ec=`#if defined( USE_ENVMAP )\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif`,Cc=`ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;`,Pc=`varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon`,Rc=`BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;`,Lc=`varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong`,Ic=`PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif`,Dc=`struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX_Iridescence( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness );\n\t#else\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}`,Nc=`\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif`,Fc=`#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif`,zc=`#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif`,Oc=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif`,Uc=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif`,Bc=`#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif`,kc=`#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif`,Vc=`#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif`,Gc=`#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif`,Hc=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif`,Wc=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif`,Xc=`float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif`,qc=`#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif`,Yc=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif`,Zc=`#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif`,Jc=`#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif`,$c=`#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif`,Kc=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;`,jc=`#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif`,Qc=`#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif`,th=`#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif`,eh=`#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif`,nh=`#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif`,ih=`#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif`,sh=`#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif`,rh=`#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif`,ah=`#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif`,oh=`#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );`,lh=`vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}`,ch=`#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif`,hh=`vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;`,uh=`#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif`,dh=`#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif`,fh=`float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif`,ph=`#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif`,mh=`#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif`,gh=`#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif`,_h=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif`,xh=`float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}`,yh=`#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif`,vh=`#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif`,Mh=`#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif`,bh=`#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif`,wh=`float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif`,Sh=`#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif`,Th=`#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif`,Ah=`#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }`,Eh=`#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission );\n#endif`,Ch=`#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef texture2DLodEXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif`,Ph=`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif`,Rh=`#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif`,Lh=`#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif`,Ih=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif`,Dh=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif`,Nh=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif`,Fh=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif`,zh=`varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}`,Oh=`uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}`,Uh=`varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}`,Bh=`#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}`,kh=`varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}`,Vh=`uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}`,Gh=`#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}`,Hh=`#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}`,Wh=`#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}`,Xh=`#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}`,qh=`varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}`,Yh=`uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}`,Zh=`uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,Jh=`uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,$h=`#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,Kh=`uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,jh=`#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}`,Qh=`#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,tu=`#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}`,eu=`#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,nu=`#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}`,iu=`#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}`,su=`#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}`,ru=`#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,au=`#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}`,ou=`#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,lu=`#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}`,cu=`#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,hu=`uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}`,uu=`uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,du=`#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}`,fu=`uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}`,pu=`uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}`,mu=`uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}`,wt={alphamap_fragment:Ul,alphamap_pars_fragment:Bl,alphatest_fragment:kl,alphatest_pars_fragment:Vl,aomap_fragment:Gl,aomap_pars_fragment:Hl,begin_vertex:Wl,beginnormal_vertex:Xl,bsdfs:ql,iridescence_fragment:Yl,bumpmap_pars_fragment:Zl,clipping_planes_fragment:Jl,clipping_planes_pars_fragment:$l,clipping_planes_pars_vertex:Kl,clipping_planes_vertex:jl,color_fragment:Ql,color_pars_fragment:tc,color_pars_vertex:ec,color_vertex:nc,common:ic,cube_uv_reflection_fragment:sc,defaultnormal_vertex:rc,displacementmap_pars_vertex:ac,displacementmap_vertex:oc,emissivemap_fragment:lc,emissivemap_pars_fragment:cc,encodings_fragment:hc,encodings_pars_fragment:uc,envmap_fragment:dc,envmap_common_pars_fragment:fc,envmap_pars_fragment:pc,envmap_pars_vertex:mc,envmap_physical_pars_fragment:Ec,envmap_vertex:gc,fog_vertex:_c,fog_pars_vertex:xc,fog_fragment:yc,fog_pars_fragment:vc,gradientmap_pars_fragment:Mc,lightmap_fragment:bc,lightmap_pars_fragment:wc,lights_lambert_fragment:Sc,lights_lambert_pars_fragment:Tc,lights_pars_begin:Ac,lights_toon_fragment:Cc,lights_toon_pars_fragment:Pc,lights_phong_fragment:Rc,lights_phong_pars_fragment:Lc,lights_physical_fragment:Ic,lights_physical_pars_fragment:Dc,lights_fragment_begin:Nc,lights_fragment_maps:Fc,lights_fragment_end:zc,logdepthbuf_fragment:Oc,logdepthbuf_pars_fragment:Uc,logdepthbuf_pars_vertex:Bc,logdepthbuf_vertex:kc,map_fragment:Vc,map_pars_fragment:Gc,map_particle_fragment:Hc,map_particle_pars_fragment:Wc,metalnessmap_fragment:Xc,metalnessmap_pars_fragment:qc,morphcolor_vertex:Yc,morphnormal_vertex:Zc,morphtarget_pars_vertex:Jc,morphtarget_vertex:$c,normal_fragment_begin:Kc,normal_fragment_maps:jc,normal_pars_fragment:Qc,normal_pars_vertex:th,normal_vertex:eh,normalmap_pars_fragment:nh,clearcoat_normal_fragment_begin:ih,clearcoat_normal_fragment_maps:sh,clearcoat_pars_fragment:rh,iridescence_pars_fragment:ah,output_fragment:oh,packing:lh,premultiplied_alpha_fragment:ch,project_vertex:hh,dithering_fragment:uh,dithering_pars_fragment:dh,roughnessmap_fragment:fh,roughnessmap_pars_fragment:ph,shadowmap_pars_fragment:mh,shadowmap_pars_vertex:gh,shadowmap_vertex:_h,shadowmask_pars_fragment:xh,skinbase_vertex:yh,skinning_pars_vertex:vh,skinning_vertex:Mh,skinnormal_vertex:bh,specularmap_fragment:wh,specularmap_pars_fragment:Sh,tonemapping_fragment:Th,tonemapping_pars_fragment:Ah,transmission_fragment:Eh,transmission_pars_fragment:Ch,uv_pars_fragment:Ph,uv_pars_vertex:Rh,uv_vertex:Lh,uv2_pars_fragment:Ih,uv2_pars_vertex:Dh,uv2_vertex:Nh,worldpos_vertex:Fh,background_vert:zh,background_frag:Oh,backgroundCube_vert:Uh,backgroundCube_frag:Bh,cube_vert:kh,cube_frag:Vh,depth_vert:Gh,depth_frag:Hh,distanceRGBA_vert:Wh,distanceRGBA_frag:Xh,equirect_vert:qh,equirect_frag:Yh,linedashed_vert:Zh,linedashed_frag:Jh,meshbasic_vert:$h,meshbasic_frag:Kh,meshlambert_vert:jh,meshlambert_frag:Qh,meshmatcap_vert:tu,meshmatcap_frag:eu,meshnormal_vert:nu,meshnormal_frag:iu,meshphong_vert:su,meshphong_frag:ru,meshphysical_vert:au,meshphysical_frag:ou,meshtoon_vert:lu,meshtoon_frag:cu,points_vert:hu,points_frag:uu,shadow_vert:du,shadow_frag:fu,sprite_vert:pu,sprite_frag:mu},et={common:{diffuse:{value:new Ot(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new oe},uv2Transform:{value:new oe},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Nt(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ot(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 Ot(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new oe}},sprite:{diffuse:{value:new Ot(16777215)},opacity:{value:1},center:{value:new Nt(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new oe}}},De={basic:{uniforms:re([et.common,et.specularmap,et.envmap,et.aomap,et.lightmap,et.fog]),vertexShader:wt.meshbasic_vert,fragmentShader:wt.meshbasic_frag},lambert:{uniforms:re([et.common,et.specularmap,et.envmap,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.fog,et.lights,{emissive:{value:new Ot(0)}}]),vertexShader:wt.meshlambert_vert,fragmentShader:wt.meshlambert_frag},phong:{uniforms:re([et.common,et.specularmap,et.envmap,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.fog,et.lights,{emissive:{value:new Ot(0)},specular:{value:new Ot(1118481)},shininess:{value:30}}]),vertexShader:wt.meshphong_vert,fragmentShader:wt.meshphong_frag},standard:{uniforms:re([et.common,et.envmap,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.roughnessmap,et.metalnessmap,et.fog,et.lights,{emissive:{value:new Ot(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:wt.meshphysical_vert,fragmentShader:wt.meshphysical_frag},toon:{uniforms:re([et.common,et.aomap,et.lightmap,et.emissivemap,et.bumpmap,et.normalmap,et.displacementmap,et.gradientmap,et.fog,et.lights,{emissive:{value:new Ot(0)}}]),vertexShader:wt.meshtoon_vert,fragmentShader:wt.meshtoon_frag},matcap:{uniforms:re([et.common,et.bumpmap,et.normalmap,et.displacementmap,et.fog,{matcap:{value:null}}]),vertexShader:wt.meshmatcap_vert,fragmentShader:wt.meshmatcap_frag},points:{uniforms:re([et.points,et.fog]),vertexShader:wt.points_vert,fragmentShader:wt.points_frag},dashed:{uniforms:re([et.common,et.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:wt.linedashed_vert,fragmentShader:wt.linedashed_frag},depth:{uniforms:re([et.common,et.displacementmap]),vertexShader:wt.depth_vert,fragmentShader:wt.depth_frag},normal:{uniforms:re([et.common,et.bumpmap,et.normalmap,et.displacementmap,{opacity:{value:1}}]),vertexShader:wt.meshnormal_vert,fragmentShader:wt.meshnormal_frag},sprite:{uniforms:re([et.sprite,et.fog]),vertexShader:wt.sprite_vert,fragmentShader:wt.sprite_frag},background:{uniforms:{uvTransform:{value:new oe},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:wt.background_vert,fragmentShader:wt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:wt.backgroundCube_vert,fragmentShader:wt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:wt.cube_vert,fragmentShader:wt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:wt.equirect_vert,fragmentShader:wt.equirect_frag},distanceRGBA:{uniforms:re([et.common,et.displacementmap,{referencePosition:{value:new N},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:wt.distanceRGBA_vert,fragmentShader:wt.distanceRGBA_frag},shadow:{uniforms:re([et.lights,et.fog,{color:{value:new Ot(0)},opacity:{value:1}}]),vertexShader:wt.shadow_vert,fragmentShader:wt.shadow_frag}};De.physical={uniforms:re([De.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Nt(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new Ot(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Nt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Ot(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Ot(1,1,1)},specularColorMap:{value:null}}]),vertexShader:wt.meshphysical_vert,fragmentShader:wt.meshphysical_frag};var zi={r:0,b:0,g:0};function gu(r,t,e,n,i,s,o){let a=new Ot(0),c=s===!0?0:1,l,h,f=null,u=0,m=null;function _(d,v){let T=!1,b=v.isScene===!0?v.background:null;b&&b.isTexture&&(b=(v.backgroundBlurriness>0?e:t).get(b));let M=r.xr,A=M.getSession&&M.getSession();A&&A.environmentBlendMode==="additive"&&(b=null),b===null?p(a,c):b&&b.isColor&&(p(b,1),T=!0),(r.autoClear||T)&&r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil),b&&(b.isCubeTexture||b.mapping===ns)?(h===void 0&&(h=new Ne(new bn(1,1,1),new Ze({name:"BackgroundCubeMaterial",uniforms:$n(De.backgroundCube.uniforms),vertexShader:De.backgroundCube.vertexShader,fragmentShader:De.backgroundCube.fragmentShader,side:ye,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(C,I,x){this.matrixWorld.copyPosition(x.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(h)),h.material.uniforms.envMap.value=b,h.material.uniforms.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,h.material.toneMapped=b.encoding!==zt,(f!==b||u!==b.version||m!==r.toneMapping)&&(h.material.needsUpdate=!0,f=b,u=b.version,m=r.toneMapping),h.layers.enableAll(),d.unshift(h,h.geometry,h.material,0,0,null)):b&&b.isTexture&&(l===void 0&&(l=new Ne(new xi(2,2),new Ze({name:"BackgroundMaterial",uniforms:$n(De.background.uniforms),vertexShader:De.background.vertexShader,fragmentShader:De.background.fragmentShader,side:nn,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=b,l.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,l.material.toneMapped=b.encoding!==zt,b.matrixAutoUpdate===!0&&b.updateMatrix(),l.material.uniforms.uvTransform.value.copy(b.matrix),(f!==b||u!==b.version||m!==r.toneMapping)&&(l.material.needsUpdate=!0,f=b,u=b.version,m=r.toneMapping),l.layers.enableAll(),d.unshift(l,l.geometry,l.material,0,0,null))}function p(d,v){d.getRGB(zi,Ka(r)),n.buffers.color.setClear(zi.r,zi.g,zi.b,v,o)}return{getClearColor:function(){return a},setClearColor:function(d,v=1){a.set(d),c=v,p(a,c)},getClearAlpha:function(){return c},setClearAlpha:function(d){c=d,p(a,c)},render:_}}function _u(r,t,e,n){let i=r.getParameter(34921),s=n.isWebGL2?null:t.get("OES_vertex_array_object"),o=n.isWebGL2||s!==null,a={},c=d(null),l=c,h=!1;function f(R,G,Y,j,W){let Q=!1;if(o){let Z=p(j,Y,G);l!==Z&&(l=Z,m(l.object)),Q=v(R,j,Y,W),Q&&T(R,j,Y,W)}else{let Z=G.wireframe===!0;(l.geometry!==j.id||l.program!==Y.id||l.wireframe!==Z)&&(l.geometry=j.id,l.program=Y.id,l.wireframe=Z,Q=!0)}W!==null&&e.update(W,34963),(Q||h)&&(h=!1,x(R,G,Y,j),W!==null&&r.bindBuffer(34963,e.get(W).buffer))}function u(){return n.isWebGL2?r.createVertexArray():s.createVertexArrayOES()}function m(R){return n.isWebGL2?r.bindVertexArray(R):s.bindVertexArrayOES(R)}function _(R){return n.isWebGL2?r.deleteVertexArray(R):s.deleteVertexArrayOES(R)}function p(R,G,Y){let j=Y.wireframe===!0,W=a[R.id];W===void 0&&(W={},a[R.id]=W);let Q=W[G.id];Q===void 0&&(Q={},W[G.id]=Q);let Z=Q[j];return Z===void 0&&(Z=d(u()),Q[j]=Z),Z}function d(R){let G=[],Y=[],j=[];for(let W=0;W=0){let nt=W[F],it=Q[F];if(it===void 0&&(F==="instanceMatrix"&&R.instanceMatrix&&(it=R.instanceMatrix),F==="instanceColor"&&R.instanceColor&&(it=R.instanceColor)),nt===void 0||nt.attribute!==it||it&&nt.data!==it.data)return!0;Z++}return l.attributesNum!==Z||l.index!==j}function T(R,G,Y,j){let W={},Q=G.attributes,Z=0,ft=Y.getAttributes();for(let F in ft)if(ft[F].location>=0){let nt=Q[F];nt===void 0&&(F==="instanceMatrix"&&R.instanceMatrix&&(nt=R.instanceMatrix),F==="instanceColor"&&R.instanceColor&&(nt=R.instanceColor));let it={};it.attribute=nt,nt&&nt.data&&(it.data=nt.data),W[F]=it,Z++}l.attributes=W,l.attributesNum=Z,l.index=j}function b(){let R=l.newAttributes;for(let G=0,Y=R.length;G=0){let J=W[ft];if(J===void 0&&(ft==="instanceMatrix"&&R.instanceMatrix&&(J=R.instanceMatrix),ft==="instanceColor"&&R.instanceColor&&(J=R.instanceColor)),J!==void 0){let nt=J.normalized,it=J.itemSize,O=e.get(J);if(O===void 0)continue;let Mt=O.buffer,ht=O.type,ut=O.bytesPerElement;if(J.isInterleavedBufferAttribute){let ot=J.data,Ft=ot.stride,bt=J.offset;if(ot.isInstancedInterleavedBuffer){for(let xt=0;xt0&&r.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";I="mediump"}return I==="mediump"&&r.getShaderPrecisionFormat(35633,36337).precision>0&&r.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let o=typeof WebGL2RenderingContext!="undefined"&&r instanceof WebGL2RenderingContext,a=e.precision!==void 0?e.precision:"highp",c=s(a);c!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",c,"instead."),a=c);let l=o||t.has("WEBGL_draw_buffers"),h=e.logarithmicDepthBuffer===!0,f=r.getParameter(34930),u=r.getParameter(35660),m=r.getParameter(3379),_=r.getParameter(34076),p=r.getParameter(34921),d=r.getParameter(36347),v=r.getParameter(36348),T=r.getParameter(36349),b=u>0,M=o||t.has("OES_texture_float"),A=b&&M,C=o?r.getParameter(36183):0;return{isWebGL2:o,drawBuffers:l,getMaxAnisotropy:i,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:h,maxTextures:f,maxVertexTextures:u,maxTextureSize:m,maxCubemapSize:_,maxAttributes:p,maxVertexUniforms:d,maxVaryings:v,maxFragmentUniforms:T,vertexTextures:b,floatFragmentTextures:M,floatVertexTextures:A,maxSamples:C}}function vu(r){let t=this,e=null,n=0,i=!1,s=!1,o=new He,a=new oe,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(f,u){let m=f.length!==0||u||n!==0||i;return i=u,n=f.length,m},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(f,u){e=h(f,u,0)},this.setState=function(f,u,m){let _=f.clippingPlanes,p=f.clipIntersection,d=f.clipShadows,v=r.get(f);if(!i||_===null||_.length===0||s&&!d)s?h(null):l();else{let T=s?0:n,b=T*4,M=v.clippingState||null;c.value=M,M=h(_,u,b,m);for(let A=0;A!==b;++A)M[A]=e[A];v.clippingState=M,this.numIntersection=p?this.numPlanes:0,this.numPlanes+=T}};function l(){c.value!==e&&(c.value=e,c.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function h(f,u,m,_){let p=f!==null?f.length:0,d=null;if(p!==0){if(d=c.value,_!==!0||d===null){let v=m+p*4,T=u.matrixWorldInverse;a.getNormalMatrix(T),(d===null||d.length0){let l=new js(c.height/2);return l.fromEquirectangularTexture(r,o),t.set(o,l),o.addEventListener("dispose",i),e(l.texture,o.mapping)}else return null}}return o}function i(o){let a=o.target;a.removeEventListener("dispose",i);let c=t.get(a);c!==void 0&&(t.delete(a),c.dispose())}function s(){t=new WeakMap}return{get:n,dispose:s}}var Qs=class extends ji{constructor(t=-1,e=1,n=1,i=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=i,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,n,i,s,o){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=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,s=n-t,o=n+t,a=i+e,c=i-e;if(this.view!==null&&this.view.enabled){let l=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=l*this.view.offsetX,o=s+l*this.view.width,a-=h*this.view.offsetY,c=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,c,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}},kn=4,Ma=[.125,.215,.35,.446,.526,.582],pn=20,Bs=new Qs,ba=new Ot,ks=null,fn=(1+Math.sqrt(5))/2,Un=1/fn,wa=[new N(1,1,1),new N(-1,1,1),new N(1,1,-1),new N(-1,1,-1),new N(0,fn,Un),new N(0,fn,-Un),new N(Un,0,fn),new N(-Un,0,fn),new N(fn,Un,0),new N(-fn,Un,0)],es=class{constructor(t){this._renderer=t,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(t,e=0,n=.1,i=100){ks=this._renderer.getRenderTarget(),this._setSize(256);let s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(t,n,i,s),e>0&&this._blur(s,0,0,e),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Aa(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Ta(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let t=0;t2?b:0,b,b),h.setRenderTarget(i),p&&h.render(_,a),h.render(t,a)}_.geometry.dispose(),_.material.dispose(),h.toneMapping=u,h.autoClear=f,t.background=d}_textureToCubeUV(t,e){let n=this._renderer,i=t.mapping===Xn||t.mapping===qn;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Aa()),this._cubemapMaterial.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Ta());let s=i?this._cubemapMaterial:this._equirectMaterial,o=new Ne(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=t;let c=this._cubeSize;Oi(e,0,0,3*c,2*c),n.setRenderTarget(e),n.render(o,Bs)}_applyPMREM(t){let e=this._renderer,n=e.autoClear;e.autoClear=!1;for(let i=1;ipn&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${d} samples when the maximum is set to ${pn}`);let v=[],T=0;for(let I=0;Ib-kn?i-b+kn:0),C=4*(this._cubeSize-M);Oi(e,A,C,3*M,2*M),c.setRenderTarget(e),c.render(f,Bs)}};function bu(r){let t=[],e=[],n=[],i=r,s=r-kn+1+Ma.length;for(let o=0;or-kn?c=Ma[o-r+kn-1]:o===0&&(c=0),n.push(c);let l=1/(a-2),h=-l,f=1+l,u=[h,h,f,h,f,f,h,h,f,f,h,f],m=6,_=6,p=3,d=2,v=1,T=new Float32Array(p*_*m),b=new Float32Array(d*_*m),M=new Float32Array(v*_*m);for(let C=0;C2?0:-1,S=[I,x,0,I+2/3,x,0,I+2/3,x+1,0,I,x,0,I+2/3,x+1,0,I,x+1,0];T.set(S,p*_*C),b.set(u,d*_*C);let L=[C,C,C,C,C,C];M.set(L,v*_*C)}let A=new Ye;A.setAttribute("position",new ce(T,p)),A.setAttribute("uv",new ce(b,d)),A.setAttribute("faceIndex",new ce(M,v)),t.push(A),i>kn&&i--}return{lodPlanes:t,sizeLods:e,sigmas:n}}function Sa(r,t,e){let n=new qe(r,t,e);return n.texture.mapping=ns,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function Oi(r,t,e,n,i){r.viewport.set(t,e,n,i),r.scissor.set(t,e,n,i)}function wu(r,t,e){let n=new Float32Array(pn),i=new N(0,1,0);return new Ze({name:"SphericalGaussianBlur",defines:{n:pn,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/e,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:br(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues\' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t`,blending:en,depthTest:!1,depthWrite:!1})}function Ta(){return new Ze({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:br(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t`,blending:en,depthTest:!1,depthWrite:!1})}function Aa(){return new Ze({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:br(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t`,blending:en,depthTest:!1,depthWrite:!1})}function br(){return`\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t`}function Su(r){let t=new WeakMap,e=null;function n(a){if(a&&a.isTexture){let c=a.mapping,l=c===Hs||c===Ws,h=c===Xn||c===qn;if(l||h)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let f=t.get(a);return e===null&&(e=new es(r)),f=l?e.fromEquirectangular(a,f):e.fromCubemap(a,f),t.set(a,f),f.texture}else{if(t.has(a))return t.get(a).texture;{let f=a.image;if(l&&f&&f.height>0||h&&f&&i(f)){e===null&&(e=new es(r));let u=l?e.fromEquirectangular(a):e.fromCubemap(a);return t.set(a,u),a.addEventListener("dispose",s),u.texture}else return null}}}return a}function i(a){let c=0,l=6;for(let h=0;ht.maxTextureSize&&(X=Math.ceil(L/t.maxTextureSize),L=t.maxTextureSize);let q=new Float32Array(L*X*4*p),z=new Yi(q,L,X,p);z.type=gn,z.needsUpdate=!0;let R=S*4;for(let Y=0;Y0)return r;let i=t*e,s=Ea[i];if(s===void 0&&(s=new Float32Array(i),Ea[i]=s),t!==0){n.toArray(s,0);for(let o=1,a=0;o!==t;++o)a+=e,r[o].toArray(s,a)}return s}function Yt(r,t){if(r.length!==t.length)return!1;for(let e=0,n=r.length;e":" "} ${a}: ${e[o]}`)}return n.join(`\n`)}function bd(r){switch(r){case vn:return["Linear","( value )"];case zt:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",r),["Linear","( value )"]}}function Na(r,t,e){let n=r.getShaderParameter(t,35713),i=r.getShaderInfoLog(t).trim();if(n&&i==="")return"";let s=/ERROR: 0:(\\d+)/.exec(i);if(s){let o=parseInt(s[1]);return e.toUpperCase()+`\n\n`+i+`\n\n`+Md(r.getShaderSource(t),o)}else return i}function wd(r,t){let e=bd(t);return"vec4 "+r+"( vec4 value ) { return LinearTo"+e[0]+e[1]+"; }"}function Sd(r,t){let e;switch(t){case No:e="Linear";break;case Fo:e="Reinhard";break;case zo:e="OptimizedCineon";break;case Oo:e="ACESFilmic";break;case Uo:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+r+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}function Td(r){return[r.extensionDerivatives||r.envMapCubeUVHeight||r.bumpMap||r.tangentSpaceNormalMap||r.clearcoatNormalMap||r.flatShading||r.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(r.extensionFragDepth||r.logarithmicDepthBuffer)&&r.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",r.extensionDrawBuffers&&r.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(r.extensionShaderTextureLOD||r.envMap||r.transmission)&&r.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(hi).join(`\n`)}function Ad(r){let t=[];for(let e in r){let n=r[e];n!==!1&&t.push("#define "+e+" "+n)}return t.join(`\n`)}function Ed(r,t){let e={},n=r.getProgramParameter(t,35721);for(let i=0;i/gm;function ir(r){return r.replace(Cd,Pd)}function Pd(r,t){let e=wt[t];if(e===void 0)throw new Error("Can not resolve #include <"+t+">");return ir(e)}var Rd=/#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 Oa(r){return r.replace(Rd,Ld)}function Ld(r,t,e,n){let i="";for(let s=parseInt(t);s0&&(d+=`\n`),v=[m,_].filter(hi).join(`\n`),v.length>0&&(v+=`\n`)):(d=[Ua(e),"#define SHADER_NAME "+e.shaderName,_,e.instancing?"#define USE_INSTANCING":"",e.instancingColor?"#define USE_INSTANCING_COLOR":"",e.supportsVertexTextures?"#define VERTEX_TEXTURES":"",e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+h:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.displacementMap&&e.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.flatShading?"#define FLAT_SHADED":"",e.skinning?"#define USE_SKINNING":"",e.morphTargets?"#define USE_MORPHTARGETS":"",e.morphNormals&&e.flatShading===!1?"#define USE_MORPHNORMALS":"",e.morphColors&&e.isWebGL2?"#define USE_MORPHCOLORS":"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+e.morphTextureStride:"",e.morphTargetsCount>0&&e.isWebGL2?"#define MORPHTARGETS_COUNT "+e.morphTargetsCount:"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+c:"",e.sizeAttenuation?"#define USE_SIZEATTENUATION":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.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","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif",`\n`].filter(hi).join(`\n`),v=[m,Ua(e),"#define SHADER_NAME "+e.shaderName,_,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.matcap?"#define USE_MATCAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+l:"",e.envMap?"#define "+h:"",e.envMap?"#define "+f:"",u?"#define CUBEUV_TEXEL_WIDTH "+u.texelWidth:"",u?"#define CUBEUV_TEXEL_HEIGHT "+u.texelHeight:"",u?"#define CUBEUV_MAX_MIP "+u.maxMip+".0":"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoat?"#define USE_CLEARCOAT":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.iridescence?"#define USE_IRIDESCENCE":"",e.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",e.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaTest?"#define USE_ALPHATEST":"",e.sheen?"#define USE_SHEEN":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors||e.instancingColor?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.gradientMap?"#define USE_GRADIENTMAP":"",e.flatShading?"#define FLAT_SHADED":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+c:"",e.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",e.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==We?"#define TONE_MAPPING":"",e.toneMapping!==We?wt.tonemapping_pars_fragment:"",e.toneMapping!==We?Sd("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.opaque?"#define OPAQUE":"",wt.encodings_pars_fragment,wd("linearToOutputTexel",e.outputEncoding),e.useDepthPacking?"#define DEPTH_PACKING "+e.depthPacking:"",`\n`].filter(hi).join(`\n`)),o=ir(o),o=Fa(o,e),o=za(o,e),a=ir(a),a=Fa(a,e),a=za(a,e),o=Oa(o),a=Oa(a),e.isWebGL2&&e.isRawShaderMaterial!==!0&&(T=`#version 300 es\n`,d=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(`\n`)+`\n`+d,v=["#define varying in",e.glslVersion===ca?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===ca?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(`\n`)+`\n`+v);let b=T+d+o,M=T+v+a,A=Da(i,35633,b),C=Da(i,35632,M);if(i.attachShader(p,A),i.attachShader(p,C),e.index0AttributeName!==void 0?i.bindAttribLocation(p,0,e.index0AttributeName):e.morphTargets===!0&&i.bindAttribLocation(p,0,"position"),i.linkProgram(p),r.debug.checkShaderErrors){let S=i.getProgramInfoLog(p).trim(),L=i.getShaderInfoLog(A).trim(),X=i.getShaderInfoLog(C).trim(),q=!0,z=!0;if(i.getProgramParameter(p,35714)===!1){q=!1;let R=Na(i,A,"vertex"),G=Na(i,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(p,35715)+`\n\nProgram Info Log: `+S+`\n`+R+`\n`+G)}else S!==""?console.warn("THREE.WebGLProgram: Program Info Log:",S):(L===""||X==="")&&(z=!1);z&&(this.diagnostics={runnable:q,programLog:S,vertexShader:{log:L,prefix:d},fragmentShader:{log:X,prefix:v}})}i.deleteShader(A),i.deleteShader(C);let I;this.getUniforms=function(){return I===void 0&&(I=new Wn(i,p)),I};let x;return this.getAttributes=function(){return x===void 0&&(x=Ed(i,p)),x},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(p),this.program=void 0},this.name=e.shaderName,this.id=vd++,this.cacheKey=t,this.usedTimes=1,this.program=p,this.vertexShader=A,this.fragmentShader=C,this}var Ud=0,sr=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){let e=t.vertexShader,n=t.fragmentShader,i=this._getShaderStage(e),s=this._getShaderStage(n),o=this._getShaderCacheForMaterial(t);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(t){let e=this.materialCache.get(t);for(let n of e)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){let e=this.materialCache,n=e.get(t);return n===void 0&&(n=new Set,e.set(t,n)),n}_getShaderStage(t){let e=this.shaderCache,n=e.get(t);return n===void 0&&(n=new rr(t),e.set(t,n)),n}},rr=class{constructor(t){this.id=Ud++,this.code=t,this.usedTimes=0}};function Bd(r,t,e,n,i,s,o){let a=new Zi,c=new sr,l=[],h=i.isWebGL2,f=i.logarithmicDepthBuffer,u=i.vertexTextures,m=i.precision,_={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 p(x,S,L,X,q){let z=X.fog,R=q.geometry,G=x.isMeshStandardMaterial?X.environment:null,Y=(x.isMeshStandardMaterial?e:t).get(x.envMap||G),j=Y&&Y.mapping===ns?Y.image.height:null,W=_[x.type];x.precision!==null&&(m=i.getMaxPrecision(x.precision),m!==x.precision&&console.warn("THREE.WebGLProgram.getParameters:",x.precision,"not supported, using",m,"instead."));let Q=R.morphAttributes.position||R.morphAttributes.normal||R.morphAttributes.color,Z=Q!==void 0?Q.length:0,ft=0;R.morphAttributes.position!==void 0&&(ft=1),R.morphAttributes.normal!==void 0&&(ft=2),R.morphAttributes.color!==void 0&&(ft=3);let F,J,nt,it;if(W){let Ft=De[W];F=Ft.vertexShader,J=Ft.fragmentShader}else F=x.vertexShader,J=x.fragmentShader,c.update(x),nt=c.getVertexShaderID(x),it=c.getFragmentShaderID(x);let O=r.getRenderTarget(),Mt=x.alphaTest>0,ht=x.clearcoat>0,ut=x.iridescence>0;return{isWebGL2:h,shaderID:W,shaderName:x.type,vertexShader:F,fragmentShader:J,defines:x.defines,customVertexShaderID:nt,customFragmentShaderID:it,isRawShaderMaterial:x.isRawShaderMaterial===!0,glslVersion:x.glslVersion,precision:m,instancing:q.isInstancedMesh===!0,instancingColor:q.isInstancedMesh===!0&&q.instanceColor!==null,supportsVertexTextures:u,outputEncoding:O===null?r.outputEncoding:O.isXRRenderTarget===!0?O.texture.encoding:vn,map:!!x.map,matcap:!!x.matcap,envMap:!!Y,envMapMode:Y&&Y.mapping,envMapCubeUVHeight:j,lightMap:!!x.lightMap,aoMap:!!x.aoMap,emissiveMap:!!x.emissiveMap,bumpMap:!!x.bumpMap,normalMap:!!x.normalMap,objectSpaceNormalMap:x.normalMapType===sl,tangentSpaceNormalMap:x.normalMapType===il,decodeVideoTexture:!!x.map&&x.map.isVideoTexture===!0&&x.map.encoding===zt,clearcoat:ht,clearcoatMap:ht&&!!x.clearcoatMap,clearcoatRoughnessMap:ht&&!!x.clearcoatRoughnessMap,clearcoatNormalMap:ht&&!!x.clearcoatNormalMap,iridescence:ut,iridescenceMap:ut&&!!x.iridescenceMap,iridescenceThicknessMap:ut&&!!x.iridescenceThicknessMap,displacementMap:!!x.displacementMap,roughnessMap:!!x.roughnessMap,metalnessMap:!!x.metalnessMap,specularMap:!!x.specularMap,specularIntensityMap:!!x.specularIntensityMap,specularColorMap:!!x.specularColorMap,opaque:x.transparent===!1&&x.blending===Gn,alphaMap:!!x.alphaMap,alphaTest:Mt,gradientMap:!!x.gradientMap,sheen:x.sheen>0,sheenColorMap:!!x.sheenColorMap,sheenRoughnessMap:!!x.sheenRoughnessMap,transmission:x.transmission>0,transmissionMap:!!x.transmissionMap,thicknessMap:!!x.thicknessMap,combine:x.combine,vertexTangents:!!x.normalMap&&!!R.attributes.tangent,vertexColors:x.vertexColors,vertexAlphas:x.vertexColors===!0&&!!R.attributes.color&&R.attributes.color.itemSize===4,vertexUvs:!!x.map||!!x.bumpMap||!!x.normalMap||!!x.specularMap||!!x.alphaMap||!!x.emissiveMap||!!x.roughnessMap||!!x.metalnessMap||!!x.clearcoatMap||!!x.clearcoatRoughnessMap||!!x.clearcoatNormalMap||!!x.iridescenceMap||!!x.iridescenceThicknessMap||!!x.displacementMap||!!x.transmissionMap||!!x.thicknessMap||!!x.specularIntensityMap||!!x.specularColorMap||!!x.sheenColorMap||!!x.sheenRoughnessMap,uvsVertexOnly:!(x.map||x.bumpMap||x.normalMap||x.specularMap||x.alphaMap||x.emissiveMap||x.roughnessMap||x.metalnessMap||x.clearcoatNormalMap||x.iridescenceMap||x.iridescenceThicknessMap||x.transmission>0||x.transmissionMap||x.thicknessMap||x.specularIntensityMap||x.specularColorMap||x.sheen>0||x.sheenColorMap||x.sheenRoughnessMap)&&!!x.displacementMap,fog:!!z,useFog:x.fog===!0,fogExp2:z&&z.isFogExp2,flatShading:!!x.flatShading,sizeAttenuation:x.sizeAttenuation,logarithmicDepthBuffer:f,skinning:q.isSkinnedMesh===!0,morphTargets:R.morphAttributes.position!==void 0,morphNormals:R.morphAttributes.normal!==void 0,morphColors:R.morphAttributes.color!==void 0,morphTargetsCount:Z,morphTextureStride:ft,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:x.dithering,shadowMapEnabled:r.shadowMap.enabled&&L.length>0,shadowMapType:r.shadowMap.type,toneMapping:x.toneMapped?r.toneMapping:We,physicallyCorrectLights:r.physicallyCorrectLights,premultipliedAlpha:x.premultipliedAlpha,doubleSided:x.side===tn,flipSided:x.side===ye,useDepthPacking:!!x.depthPacking,depthPacking:x.depthPacking||0,index0AttributeName:x.index0AttributeName,extensionDerivatives:x.extensions&&x.extensions.derivatives,extensionFragDepth:x.extensions&&x.extensions.fragDepth,extensionDrawBuffers:x.extensions&&x.extensions.drawBuffers,extensionShaderTextureLOD:x.extensions&&x.extensions.shaderTextureLOD,rendererExtensionFragDepth:h||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||n.has("EXT_shader_texture_lod"),customProgramCacheKey:x.customProgramCacheKey()}}function d(x){let S=[];if(x.shaderID?S.push(x.shaderID):(S.push(x.customVertexShaderID),S.push(x.customFragmentShaderID)),x.defines!==void 0)for(let L in x.defines)S.push(L),S.push(x.defines[L]);return x.isRawShaderMaterial===!1&&(v(S,x),T(S,x),S.push(r.outputEncoding)),S.push(x.customProgramCacheKey),S.join()}function v(x,S){x.push(S.precision),x.push(S.outputEncoding),x.push(S.envMapMode),x.push(S.envMapCubeUVHeight),x.push(S.combine),x.push(S.vertexUvs),x.push(S.fogExp2),x.push(S.sizeAttenuation),x.push(S.morphTargetsCount),x.push(S.morphAttributeCount),x.push(S.numDirLights),x.push(S.numPointLights),x.push(S.numSpotLights),x.push(S.numSpotLightMaps),x.push(S.numHemiLights),x.push(S.numRectAreaLights),x.push(S.numDirLightShadows),x.push(S.numPointLightShadows),x.push(S.numSpotLightShadows),x.push(S.numSpotLightShadowsWithMaps),x.push(S.shadowMapType),x.push(S.toneMapping),x.push(S.numClippingPlanes),x.push(S.numClipIntersection),x.push(S.depthPacking)}function T(x,S){a.disableAll(),S.isWebGL2&&a.enable(0),S.supportsVertexTextures&&a.enable(1),S.instancing&&a.enable(2),S.instancingColor&&a.enable(3),S.map&&a.enable(4),S.matcap&&a.enable(5),S.envMap&&a.enable(6),S.lightMap&&a.enable(7),S.aoMap&&a.enable(8),S.emissiveMap&&a.enable(9),S.bumpMap&&a.enable(10),S.normalMap&&a.enable(11),S.objectSpaceNormalMap&&a.enable(12),S.tangentSpaceNormalMap&&a.enable(13),S.clearcoat&&a.enable(14),S.clearcoatMap&&a.enable(15),S.clearcoatRoughnessMap&&a.enable(16),S.clearcoatNormalMap&&a.enable(17),S.iridescence&&a.enable(18),S.iridescenceMap&&a.enable(19),S.iridescenceThicknessMap&&a.enable(20),S.displacementMap&&a.enable(21),S.specularMap&&a.enable(22),S.roughnessMap&&a.enable(23),S.metalnessMap&&a.enable(24),S.gradientMap&&a.enable(25),S.alphaMap&&a.enable(26),S.alphaTest&&a.enable(27),S.vertexColors&&a.enable(28),S.vertexAlphas&&a.enable(29),S.vertexUvs&&a.enable(30),S.vertexTangents&&a.enable(31),S.uvsVertexOnly&&a.enable(32),x.push(a.mask),a.disableAll(),S.fog&&a.enable(0),S.useFog&&a.enable(1),S.flatShading&&a.enable(2),S.logarithmicDepthBuffer&&a.enable(3),S.skinning&&a.enable(4),S.morphTargets&&a.enable(5),S.morphNormals&&a.enable(6),S.morphColors&&a.enable(7),S.premultipliedAlpha&&a.enable(8),S.shadowMapEnabled&&a.enable(9),S.physicallyCorrectLights&&a.enable(10),S.doubleSided&&a.enable(11),S.flipSided&&a.enable(12),S.useDepthPacking&&a.enable(13),S.dithering&&a.enable(14),S.specularIntensityMap&&a.enable(15),S.specularColorMap&&a.enable(16),S.transmission&&a.enable(17),S.transmissionMap&&a.enable(18),S.thicknessMap&&a.enable(19),S.sheen&&a.enable(20),S.sheenColorMap&&a.enable(21),S.sheenRoughnessMap&&a.enable(22),S.decodeVideoTexture&&a.enable(23),S.opaque&&a.enable(24),x.push(a.mask)}function b(x){let S=_[x.type],L;if(S){let X=De[S];L=Il.clone(X.uniforms)}else L=x.uniforms;return L}function M(x,S){let L;for(let X=0,q=l.length;X0?n.push(v):m.transparent===!0?i.push(v):e.push(v)}function c(f,u,m,_,p,d){let v=o(f,u,m,_,p,d);m.transmission>0?n.unshift(v):m.transparent===!0?i.unshift(v):e.unshift(v)}function l(f,u){e.length>1&&e.sort(f||Vd),n.length>1&&n.sort(u||Ba),i.length>1&&i.sort(u||Ba)}function h(){for(let f=t,u=r.length;f=s.length?(o=new ka,s.push(o)):o=s[i],o}function e(){r=new WeakMap}return{get:t,dispose:e}}function Hd(){let r={};return{get:function(t){if(r[t.id]!==void 0)return r[t.id];let e;switch(t.type){case"DirectionalLight":e={direction:new N,color:new Ot};break;case"SpotLight":e={position:new N,direction:new N,color:new Ot,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new N,color:new Ot,distance:0,decay:0};break;case"HemisphereLight":e={direction:new N,skyColor:new Ot,groundColor:new Ot};break;case"RectAreaLight":e={color:new Ot,position:new N,halfWidth:new N,halfHeight:new N};break}return r[t.id]=e,e}}}function Wd(){let r={};return{get:function(t){if(r[t.id]!==void 0)return r[t.id];let e;switch(t.type){case"DirectionalLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nt};break;case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nt};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Nt,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[t.id]=e,e}}}var Xd=0;function qd(r,t){return(t.castShadow?2:0)-(r.castShadow?2:0)+(t.map?1:0)-(r.map?1:0)}function Yd(r,t){let e=new Hd,n=Wd(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-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};for(let h=0;h<9;h++)i.probe.push(new N);let s=new N,o=new qt,a=new qt;function c(h,f){let u=0,m=0,_=0;for(let X=0;X<9;X++)i.probe[X].set(0,0,0);let p=0,d=0,v=0,T=0,b=0,M=0,A=0,C=0,I=0,x=0;h.sort(qd);let S=f!==!0?Math.PI:1;for(let X=0,q=h.length;X0&&(t.isWebGL2||r.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=et.LTC_FLOAT_1,i.rectAreaLTC2=et.LTC_FLOAT_2):r.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=et.LTC_HALF_1,i.rectAreaLTC2=et.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=u,i.ambient[1]=m,i.ambient[2]=_;let L=i.hash;(L.directionalLength!==p||L.pointLength!==d||L.spotLength!==v||L.rectAreaLength!==T||L.hemiLength!==b||L.numDirectionalShadows!==M||L.numPointShadows!==A||L.numSpotShadows!==C||L.numSpotMaps!==I)&&(i.directional.length=p,i.spot.length=v,i.rectArea.length=T,i.point.length=d,i.hemi.length=b,i.directionalShadow.length=M,i.directionalShadowMap.length=M,i.pointShadow.length=A,i.pointShadowMap.length=A,i.spotShadow.length=C,i.spotShadowMap.length=C,i.directionalShadowMatrix.length=M,i.pointShadowMatrix.length=A,i.spotLightMatrix.length=C+I-x,i.spotLightMap.length=I,i.numSpotLightShadowsWithMaps=x,L.directionalLength=p,L.pointLength=d,L.spotLength=v,L.rectAreaLength=T,L.hemiLength=b,L.numDirectionalShadows=M,L.numPointShadows=A,L.numSpotShadows=C,L.numSpotMaps=I,i.version=Xd++)}function l(h,f){let u=0,m=0,_=0,p=0,d=0,v=f.matrixWorldInverse;for(let T=0,b=h.length;T=a.length?(c=new Va(r,t),a.push(c)):c=a[o],c}function i(){e=new WeakMap}return{get:n,dispose:i}}var ar=class extends Jn{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=el,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}},or=class extends Jn{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.referencePosition=new N,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}},Jd=`void main() {\n\tgl_Position = vec4( position, 1.0 );\n}`,$d=`uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}`;function Kd(r,t,e){let n=new ts,i=new Nt,s=new Nt,o=new Xt,a=new ar({depthPacking:nl}),c=new or,l={},h=e.maxTextureSize,f={[nn]:ye,[ye]:nn,[tn]:tn},u=new Ze({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Nt},radius:{value:4}},vertexShader:Jd,fragmentShader:$d}),m=u.clone();m.defines.HORIZONTAL_PASS=1;let _=new Ye;_.setAttribute("position",new ce(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let p=new Ne(_,u),d=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Ga,this.render=function(M,A,C){if(d.enabled===!1||d.autoUpdate===!1&&d.needsUpdate===!1||M.length===0)return;let I=r.getRenderTarget(),x=r.getActiveCubeFace(),S=r.getActiveMipmapLevel(),L=r.state;L.setBlending(en),L.buffers.color.setClear(1,1,1,1),L.buffers.depth.setTest(!0),L.setScissorTest(!1);for(let X=0,q=M.length;Xh||i.y>h)&&(i.x>h&&(s.x=Math.floor(h/G.x),i.x=s.x*G.x,R.mapSize.x=s.x),i.y>h&&(s.y=Math.floor(h/G.y),i.y=s.y*G.y,R.mapSize.y=s.y)),R.map===null){let j=this.type!==li?{minFilter:ae,magFilter:ae}:{};R.map=new qe(i.x,i.y,j),R.map.texture.name=z.name+".shadowMap",R.camera.updateProjectionMatrix()}r.setRenderTarget(R.map),r.clear();let Y=R.getViewportCount();for(let j=0;j0||A.map&&A.alphaTest>0){let q=L.uuid,z=A.uuid,R=l[q];R===void 0&&(R={},l[q]=R);let G=R[z];G===void 0&&(G=L.clone(),R[z]=G),L=G}return L.visible=A.visible,L.wireframe=A.wireframe,S===li?L.side=A.shadowSide!==null?A.shadowSide:A.side:L.side=A.shadowSide!==null?A.shadowSide:f[A.side],L.alphaMap=A.alphaMap,L.alphaTest=A.alphaTest,L.map=A.map,L.clipShadows=A.clipShadows,L.clippingPlanes=A.clippingPlanes,L.clipIntersection=A.clipIntersection,L.displacementMap=A.displacementMap,L.displacementScale=A.displacementScale,L.displacementBias=A.displacementBias,L.wireframeLinewidth=A.wireframeLinewidth,L.linewidth=A.linewidth,C.isPointLight===!0&&L.isMeshDistanceMaterial===!0&&(L.referencePosition.setFromMatrixPosition(C.matrixWorld),L.nearDistance=I,L.farDistance=x),L}function b(M,A,C,I,x){if(M.visible===!1)return;if(M.layers.test(A.layers)&&(M.isMesh||M.isLine||M.isPoints)&&(M.castShadow||M.receiveShadow&&x===li)&&(!M.frustumCulled||n.intersectsObject(M))){M.modelViewMatrix.multiplyMatrices(C.matrixWorldInverse,M.matrixWorld);let X=t.update(M),q=M.material;if(Array.isArray(q)){let z=X.groups;for(let R=0,G=z.length;R=1):W.indexOf("OpenGL ES")!==-1&&(j=parseFloat(/^OpenGL ES (\\d)/.exec(W)[1]),Y=j>=2);let Q=null,Z={},ft=r.getParameter(3088),F=r.getParameter(2978),J=new Xt().fromArray(ft),nt=new Xt().fromArray(F);function it(E,U,$){let at=new Uint8Array(4),ct=r.createTexture();r.bindTexture(E,ct),r.texParameteri(E,10241,9728),r.texParameteri(E,10240,9728);for(let Lt=0;Lt<$;Lt++)r.texImage2D(U+Lt,0,6408,1,1,0,6408,5121,at);return ct}let O={};O[3553]=it(3553,3553,1),O[34067]=it(34067,34069,6),a.setClear(0,0,0,1),c.setClear(1),l.setClear(0),Mt(2929),c.setFunc(Gs),Qt(!1),Me(Pr),Mt(2884),ne(en);function Mt(E){u[E]!==!0&&(r.enable(E),u[E]=!0)}function ht(E){u[E]!==!1&&(r.disable(E),u[E]=!1)}function ut(E,U){return m[E]!==U?(r.bindFramebuffer(E,U),m[E]=U,n&&(E===36009&&(m[36160]=U),E===36160&&(m[36009]=U)),!0):!1}function ot(E,U){let $=p,at=!1;if(E)if($=_.get(U),$===void 0&&($=[],_.set(U,$)),E.isWebGLMultipleRenderTargets){let ct=E.texture;if($.length!==ct.length||$[0]!==36064){for(let Lt=0,$t=ct.length;Lt<$t;Lt++)$[Lt]=36064+Lt;$.length=ct.length,at=!0}}else $[0]!==36064&&($[0]=36064,at=!0);else $[0]!==1029&&($[0]=1029,at=!0);at&&(e.isWebGL2?r.drawBuffers($):t.get("WEBGL_draw_buffers").drawBuffersWEBGL($))}function Ft(E){return d!==E?(r.useProgram(E),d=E,!0):!1}let bt={[Bn]:32774,[po]:32778,[mo]:32779};if(n)bt[Dr]=32775,bt[Nr]=32776;else{let E=t.get("EXT_blend_minmax");E!==null&&(bt[Dr]=E.MIN_EXT,bt[Nr]=E.MAX_EXT)}let xt={[go]:0,[_o]:1,[xo]:768,[Ha]:770,[So]:776,[bo]:774,[vo]:772,[yo]:769,[Wa]:771,[wo]:775,[Mo]:773};function ne(E,U,$,at,ct,Lt,$t,te){if(E===en){v===!0&&(ht(3042),v=!1);return}if(v===!1&&(Mt(3042),v=!0),E!==fo){if(E!==T||te!==S){if((b!==Bn||C!==Bn)&&(r.blendEquation(32774),b=Bn,C=Bn),te)switch(E){case Gn:r.blendFuncSeparate(1,771,1,771);break;case Rr:r.blendFunc(1,1);break;case Lr:r.blendFuncSeparate(0,769,0,1);break;case Ir:r.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",E);break}else switch(E){case Gn:r.blendFuncSeparate(770,771,1,771);break;case Rr:r.blendFunc(770,1);break;case Lr:r.blendFuncSeparate(0,769,0,1);break;case Ir:r.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",E);break}M=null,A=null,I=null,x=null,T=E,S=te}return}ct=ct||U,Lt=Lt||$,$t=$t||at,(U!==b||ct!==C)&&(r.blendEquationSeparate(bt[U],bt[ct]),b=U,C=ct),($!==M||at!==A||Lt!==I||$t!==x)&&(r.blendFuncSeparate(xt[$],xt[at],xt[Lt],xt[$t]),M=$,A=at,I=Lt,x=$t),T=E,S=!1}function ve(E,U){E.side===tn?ht(2884):Mt(2884);let $=E.side===ye;U&&($=!$),Qt($),E.blending===Gn&&E.transparent===!1?ne(en):ne(E.blending,E.blendEquation,E.blendSrc,E.blendDst,E.blendEquationAlpha,E.blendSrcAlpha,E.blendDstAlpha,E.premultipliedAlpha),c.setFunc(E.depthFunc),c.setTest(E.depthTest),c.setMask(E.depthWrite),a.setMask(E.colorWrite);let at=E.stencilWrite;l.setTest(at),at&&(l.setMask(E.stencilWriteMask),l.setFunc(E.stencilFunc,E.stencilRef,E.stencilFuncMask),l.setOp(E.stencilFail,E.stencilZFail,E.stencilZPass)),Dt(E.polygonOffset,E.polygonOffsetFactor,E.polygonOffsetUnits),E.alphaToCoverage===!0?Mt(32926):ht(32926)}function Qt(E){L!==E&&(E?r.frontFace(2304):r.frontFace(2305),L=E)}function Me(E){E!==co?(Mt(2884),E!==X&&(E===Pr?r.cullFace(1029):E===ho?r.cullFace(1028):r.cullFace(1032))):ht(2884),X=E}function Ht(E){E!==q&&(Y&&r.lineWidth(E),q=E)}function Dt(E,U,$){E?(Mt(32823),(z!==U||R!==$)&&(r.polygonOffset(U,$),z=U,R=$)):ht(32823)}function Fe(E){E?Mt(3089):ht(3089)}function Te(E){E===void 0&&(E=33984+G-1),Q!==E&&(r.activeTexture(E),Q=E)}function w(E,U,$){$===void 0&&(Q===null?$=33984+G-1:$=Q);let at=Z[$];at===void 0&&(at={type:void 0,texture:void 0},Z[$]=at),(at.type!==E||at.texture!==U)&&(Q!==$&&(r.activeTexture($),Q=$),r.bindTexture(E,U||O[E]),at.type=E,at.texture=U)}function g(){let E=Z[Q];E!==void 0&&E.type!==void 0&&(r.bindTexture(E.type,null),E.type=void 0,E.texture=void 0)}function k(){try{r.compressedTexImage2D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function K(){try{r.compressedTexImage3D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function tt(){try{r.texSubImage2D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function st(){try{r.texSubImage3D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function yt(){try{r.compressedTexSubImage2D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function rt(){try{r.compressedTexSubImage3D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function H(){try{r.texStorage2D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function mt(){try{r.texStorage3D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function _t(){try{r.texImage2D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function lt(){try{r.texImage3D.apply(r,arguments)}catch(E){console.error("THREE.WebGLState:",E)}}function gt(E){J.equals(E)===!1&&(r.scissor(E.x,E.y,E.z,E.w),J.copy(E))}function dt(E){nt.equals(E)===!1&&(r.viewport(E.x,E.y,E.z,E.w),nt.copy(E))}function Pt(E,U){let $=f.get(U);$===void 0&&($=new WeakMap,f.set(U,$));let at=$.get(E);at===void 0&&(at=r.getUniformBlockIndex(U,E.name),$.set(E,at))}function Ut(E,U){let at=f.get(U).get(E);h.get(U)!==at&&(r.uniformBlockBinding(U,at,E.__bindingPointIndex),h.set(U,at))}function Jt(){r.disable(3042),r.disable(2884),r.disable(2929),r.disable(32823),r.disable(3089),r.disable(2960),r.disable(32926),r.blendEquation(32774),r.blendFunc(1,0),r.blendFuncSeparate(1,0,1,0),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0),r.depthMask(!0),r.depthFunc(513),r.clearDepth(1),r.stencilMask(4294967295),r.stencilFunc(519,0,4294967295),r.stencilOp(7680,7680,7680),r.clearStencil(0),r.cullFace(1029),r.frontFace(2305),r.polygonOffset(0,0),r.activeTexture(33984),r.bindFramebuffer(36160,null),n===!0&&(r.bindFramebuffer(36009,null),r.bindFramebuffer(36008,null)),r.useProgram(null),r.lineWidth(1),r.scissor(0,0,r.canvas.width,r.canvas.height),r.viewport(0,0,r.canvas.width,r.canvas.height),u={},Q=null,Z={},m={},_=new WeakMap,p=[],d=null,v=!1,T=null,b=null,M=null,A=null,C=null,I=null,x=null,S=!1,L=null,X=null,q=null,z=null,R=null,J.set(0,0,r.canvas.width,r.canvas.height),nt.set(0,0,r.canvas.width,r.canvas.height),a.reset(),c.reset(),l.reset()}return{buffers:{color:a,depth:c,stencil:l},enable:Mt,disable:ht,bindFramebuffer:ut,drawBuffers:ot,useProgram:Ft,setBlending:ne,setMaterial:ve,setFlipSided:Qt,setCullFace:Me,setLineWidth:Ht,setPolygonOffset:Dt,setScissorTest:Fe,activeTexture:Te,bindTexture:w,unbindTexture:g,compressedTexImage2D:k,compressedTexImage3D:K,texImage2D:_t,texImage3D:lt,updateUBOMapping:Pt,uniformBlockBinding:Ut,texStorage2D:H,texStorage3D:mt,texSubImage2D:tt,texSubImage3D:st,compressedTexSubImage2D:yt,compressedTexSubImage3D:rt,scissor:gt,viewport:dt,reset:Jt}}function Qd(r,t,e,n,i,s,o){let a=i.isWebGL2,c=i.maxTextures,l=i.maxCubemapSize,h=i.maxTextureSize,f=i.maxSamples,u=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,m=typeof navigator=="undefined"?!1:/OculusBrowser/g.test(navigator.userAgent),_=new WeakMap,p,d=new WeakMap,v=!1;try{v=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch(w){}function T(w,g){return v?new OffscreenCanvas(w,g):Wi("canvas")}function b(w,g,k,K){let tt=1;if((w.width>K||w.height>K)&&(tt=K/Math.max(w.width,w.height)),tt<1||g===!0)if(typeof HTMLImageElement!="undefined"&&w instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&w instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&w instanceof ImageBitmap){let st=g?Hi:Math.floor,yt=st(tt*w.width),rt=st(tt*w.height);p===void 0&&(p=T(yt,rt));let H=k?T(yt,rt):p;return H.width=yt,H.height=rt,H.getContext("2d").drawImage(w,0,0,yt,rt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+w.width+"x"+w.height+") to ("+yt+"x"+rt+")."),H}else return"data"in w&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+w.width+"x"+w.height+")."),w;return w}function M(w){return Zs(w.width)&&Zs(w.height)}function A(w){return a?!1:w.wrapS!==Pe||w.wrapT!==Pe||w.minFilter!==ae&&w.minFilter!==Se}function C(w,g){return w.generateMipmaps&&g&&w.minFilter!==ae&&w.minFilter!==Se}function I(w){r.generateMipmap(w)}function x(w,g,k,K,tt=!1){if(a===!1)return g;if(w!==null){if(r[w]!==void 0)return r[w];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \'"+w+"\'")}let st=g;return g===6403&&(k===5126&&(st=33326),k===5131&&(st=33325),k===5121&&(st=33321)),g===33319&&(k===5126&&(st=33328),k===5131&&(st=33327),k===5121&&(st=33323)),g===6408&&(k===5126&&(st=34836),k===5131&&(st=34842),k===5121&&(st=K===zt&&tt===!1?35907:32856),k===32819&&(st=32854),k===32820&&(st=32855)),(st===33325||st===33326||st===33327||st===33328||st===34842||st===34836)&&t.get("EXT_color_buffer_float"),st}function S(w,g,k){return C(w,k)===!0||w.isFramebufferTexture&&w.minFilter!==ae&&w.minFilter!==Se?Math.log2(Math.max(g.width,g.height))+1:w.mipmaps!==void 0&&w.mipmaps.length>0?w.mipmaps.length:w.isCompressedTexture&&Array.isArray(w.image)?g.mipmaps.length:1}function L(w){return w===ae||w===Fr||w===us?9728:9729}function X(w){let g=w.target;g.removeEventListener("dispose",X),z(g),g.isVideoTexture&&_.delete(g)}function q(w){let g=w.target;g.removeEventListener("dispose",q),G(g)}function z(w){let g=n.get(w);if(g.__webglInit===void 0)return;let k=w.source,K=d.get(k);if(K){let tt=K[g.__cacheKey];tt.usedTimes--,tt.usedTimes===0&&R(w),Object.keys(K).length===0&&d.delete(k)}n.remove(w)}function R(w){let g=n.get(w);r.deleteTexture(g.__webglTexture);let k=w.source,K=d.get(k);delete K[g.__cacheKey],o.memory.textures--}function G(w){let g=w.texture,k=n.get(w),K=n.get(g);if(K.__webglTexture!==void 0&&(r.deleteTexture(K.__webglTexture),o.memory.textures--),w.depthTexture&&w.depthTexture.dispose(),w.isWebGLCubeRenderTarget)for(let tt=0;tt<6;tt++)r.deleteFramebuffer(k.__webglFramebuffer[tt]),k.__webglDepthbuffer&&r.deleteRenderbuffer(k.__webglDepthbuffer[tt]);else{if(r.deleteFramebuffer(k.__webglFramebuffer),k.__webglDepthbuffer&&r.deleteRenderbuffer(k.__webglDepthbuffer),k.__webglMultisampledFramebuffer&&r.deleteFramebuffer(k.__webglMultisampledFramebuffer),k.__webglColorRenderbuffer)for(let tt=0;tt=c&&console.warn("THREE.WebGLTextures: Trying to use "+w+" texture units while this GPU supports only "+c),Y+=1,w}function Q(w){let g=[];return g.push(w.wrapS),g.push(w.wrapT),g.push(w.wrapR||0),g.push(w.magFilter),g.push(w.minFilter),g.push(w.anisotropy),g.push(w.internalFormat),g.push(w.format),g.push(w.type),g.push(w.generateMipmaps),g.push(w.premultiplyAlpha),g.push(w.flipY),g.push(w.unpackAlignment),g.push(w.encoding),g.join()}function Z(w,g){let k=n.get(w);if(w.isVideoTexture&&Fe(w),w.isRenderTargetTexture===!1&&w.version>0&&k.__version!==w.version){let K=w.image;if(K===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(K.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ht(k,w,g);return}}e.bindTexture(3553,k.__webglTexture,33984+g)}function ft(w,g){let k=n.get(w);if(w.version>0&&k.__version!==w.version){ht(k,w,g);return}e.bindTexture(35866,k.__webglTexture,33984+g)}function F(w,g){let k=n.get(w);if(w.version>0&&k.__version!==w.version){ht(k,w,g);return}e.bindTexture(32879,k.__webglTexture,33984+g)}function J(w,g){let k=n.get(w);if(w.version>0&&k.__version!==w.version){ut(k,w,g);return}e.bindTexture(34067,k.__webglTexture,33984+g)}let nt={[Xs]:10497,[Pe]:33071,[qs]:33648},it={[ae]:9728,[Fr]:9984,[us]:9986,[Se]:9729,[Bo]:9985,[pi]:9987};function O(w,g,k){if(k?(r.texParameteri(w,10242,nt[g.wrapS]),r.texParameteri(w,10243,nt[g.wrapT]),(w===32879||w===35866)&&r.texParameteri(w,32882,nt[g.wrapR]),r.texParameteri(w,10240,it[g.magFilter]),r.texParameteri(w,10241,it[g.minFilter])):(r.texParameteri(w,10242,33071),r.texParameteri(w,10243,33071),(w===32879||w===35866)&&r.texParameteri(w,32882,33071),(g.wrapS!==Pe||g.wrapT!==Pe)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),r.texParameteri(w,10240,L(g.magFilter)),r.texParameteri(w,10241,L(g.minFilter)),g.minFilter!==ae&&g.minFilter!==Se&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),t.has("EXT_texture_filter_anisotropic")===!0){let K=t.get("EXT_texture_filter_anisotropic");if(g.magFilter===ae||g.minFilter!==us&&g.minFilter!==pi||g.type===gn&&t.has("OES_texture_float_linear")===!1||a===!1&&g.type===mi&&t.has("OES_texture_half_float_linear")===!1)return;(g.anisotropy>1||n.get(g).__currentAnisotropy)&&(r.texParameterf(w,K.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(g.anisotropy,i.getMaxAnisotropy())),n.get(g).__currentAnisotropy=g.anisotropy)}}function Mt(w,g){let k=!1;w.__webglInit===void 0&&(w.__webglInit=!0,g.addEventListener("dispose",X));let K=g.source,tt=d.get(K);tt===void 0&&(tt={},d.set(K,tt));let st=Q(g);if(st!==w.__cacheKey){tt[st]===void 0&&(tt[st]={texture:r.createTexture(),usedTimes:0},o.memory.textures++,k=!0),tt[st].usedTimes++;let yt=tt[w.__cacheKey];yt!==void 0&&(tt[w.__cacheKey].usedTimes--,yt.usedTimes===0&&R(g)),w.__cacheKey=st,w.__webglTexture=tt[st].texture}return k}function ht(w,g,k){let K=3553;(g.isDataArrayTexture||g.isCompressedArrayTexture)&&(K=35866),g.isData3DTexture&&(K=32879);let tt=Mt(w,g),st=g.source;e.bindTexture(K,w.__webglTexture,33984+k);let yt=n.get(st);if(st.version!==yt.__version||tt===!0){e.activeTexture(33984+k),r.pixelStorei(37440,g.flipY),r.pixelStorei(37441,g.premultiplyAlpha),r.pixelStorei(3317,g.unpackAlignment),r.pixelStorei(37443,0);let rt=A(g)&&M(g.image)===!1,H=b(g.image,rt,!1,h);H=Te(g,H);let mt=M(H)||a,_t=s.convert(g.format,g.encoding),lt=s.convert(g.type),gt=x(g.internalFormat,_t,lt,g.encoding,g.isVideoTexture);O(K,g,mt);let dt,Pt=g.mipmaps,Ut=a&&g.isVideoTexture!==!0,Jt=yt.__version===void 0||tt===!0,E=S(g,H,mt);if(g.isDepthTexture)gt=6402,a?g.type===gn?gt=36012:g.type===mn?gt=33190:g.type===Hn?gt=35056:gt=33189:g.type===gn&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),g.format===_n&>===6402&&g.type!==Ya&&g.type!==mn&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),g.type=mn,lt=s.convert(g.type)),g.format===Yn&>===6402&&(gt=34041,g.type!==Hn&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),g.type=Hn,lt=s.convert(g.type))),Jt&&(Ut?e.texStorage2D(3553,1,gt,H.width,H.height):e.texImage2D(3553,0,gt,H.width,H.height,0,_t,lt,null));else if(g.isDataTexture)if(Pt.length>0&&mt){Ut&&Jt&&e.texStorage2D(3553,E,gt,Pt[0].width,Pt[0].height);for(let U=0,$=Pt.length;U<$;U++)dt=Pt[U],Ut?e.texSubImage2D(3553,U,0,0,dt.width,dt.height,_t,lt,dt.data):e.texImage2D(3553,U,gt,dt.width,dt.height,0,_t,lt,dt.data);g.generateMipmaps=!1}else Ut?(Jt&&e.texStorage2D(3553,E,gt,H.width,H.height),e.texSubImage2D(3553,0,0,0,H.width,H.height,_t,lt,H.data)):e.texImage2D(3553,0,gt,H.width,H.height,0,_t,lt,H.data);else if(g.isCompressedTexture)if(g.isCompressedArrayTexture){Ut&&Jt&&e.texStorage3D(35866,E,gt,Pt[0].width,Pt[0].height,H.depth);for(let U=0,$=Pt.length;U<$;U++)dt=Pt[U],g.format!==Re?_t!==null?Ut?e.compressedTexSubImage3D(35866,U,0,0,0,dt.width,dt.height,H.depth,_t,dt.data,0,0):e.compressedTexImage3D(35866,U,gt,dt.width,dt.height,H.depth,0,dt.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Ut?e.texSubImage3D(35866,U,0,0,0,dt.width,dt.height,H.depth,_t,lt,dt.data):e.texImage3D(35866,U,gt,dt.width,dt.height,H.depth,0,_t,lt,dt.data)}else{Ut&&Jt&&e.texStorage2D(3553,E,gt,Pt[0].width,Pt[0].height);for(let U=0,$=Pt.length;U<$;U++)dt=Pt[U],g.format!==Re?_t!==null?Ut?e.compressedTexSubImage2D(3553,U,0,0,dt.width,dt.height,_t,dt.data):e.compressedTexImage2D(3553,U,gt,dt.width,dt.height,0,dt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Ut?e.texSubImage2D(3553,U,0,0,dt.width,dt.height,_t,lt,dt.data):e.texImage2D(3553,U,gt,dt.width,dt.height,0,_t,lt,dt.data)}else if(g.isDataArrayTexture)Ut?(Jt&&e.texStorage3D(35866,E,gt,H.width,H.height,H.depth),e.texSubImage3D(35866,0,0,0,0,H.width,H.height,H.depth,_t,lt,H.data)):e.texImage3D(35866,0,gt,H.width,H.height,H.depth,0,_t,lt,H.data);else if(g.isData3DTexture)Ut?(Jt&&e.texStorage3D(32879,E,gt,H.width,H.height,H.depth),e.texSubImage3D(32879,0,0,0,0,H.width,H.height,H.depth,_t,lt,H.data)):e.texImage3D(32879,0,gt,H.width,H.height,H.depth,0,_t,lt,H.data);else if(g.isFramebufferTexture){if(Jt)if(Ut)e.texStorage2D(3553,E,gt,H.width,H.height);else{let U=H.width,$=H.height;for(let at=0;at>=1,$>>=1}}else if(Pt.length>0&&mt){Ut&&Jt&&e.texStorage2D(3553,E,gt,Pt[0].width,Pt[0].height);for(let U=0,$=Pt.length;U<$;U++)dt=Pt[U],Ut?e.texSubImage2D(3553,U,0,0,_t,lt,dt):e.texImage2D(3553,U,gt,_t,lt,dt);g.generateMipmaps=!1}else Ut?(Jt&&e.texStorage2D(3553,E,gt,H.width,H.height),e.texSubImage2D(3553,0,0,0,_t,lt,H)):e.texImage2D(3553,0,gt,_t,lt,H);C(g,mt)&&I(K),yt.__version=st.version,g.onUpdate&&g.onUpdate(g)}w.__version=g.version}function ut(w,g,k){if(g.image.length!==6)return;let K=Mt(w,g),tt=g.source;e.bindTexture(34067,w.__webglTexture,33984+k);let st=n.get(tt);if(tt.version!==st.__version||K===!0){e.activeTexture(33984+k),r.pixelStorei(37440,g.flipY),r.pixelStorei(37441,g.premultiplyAlpha),r.pixelStorei(3317,g.unpackAlignment),r.pixelStorei(37443,0);let yt=g.isCompressedTexture||g.image[0].isCompressedTexture,rt=g.image[0]&&g.image[0].isDataTexture,H=[];for(let U=0;U<6;U++)!yt&&!rt?H[U]=b(g.image[U],!1,!0,l):H[U]=rt?g.image[U].image:g.image[U],H[U]=Te(g,H[U]);let mt=H[0],_t=M(mt)||a,lt=s.convert(g.format,g.encoding),gt=s.convert(g.type),dt=x(g.internalFormat,lt,gt,g.encoding),Pt=a&&g.isVideoTexture!==!0,Ut=st.__version===void 0||K===!0,Jt=S(g,mt,_t);O(34067,g,_t);let E;if(yt){Pt&&Ut&&e.texStorage2D(34067,Jt,dt,mt.width,mt.height);for(let U=0;U<6;U++){E=H[U].mipmaps;for(let $=0;$0&&Jt++,e.texStorage2D(34067,Jt,dt,H[0].width,H[0].height));for(let U=0;U<6;U++)if(rt){Pt?e.texSubImage2D(34069+U,0,0,0,H[U].width,H[U].height,lt,gt,H[U].data):e.texImage2D(34069+U,0,dt,H[U].width,H[U].height,0,lt,gt,H[U].data);for(let $=0;$=34069&&tt<=34074)&&r.framebufferTexture2D(36160,K,tt,n.get(k).__webglTexture,0),e.bindFramebuffer(36160,null)}function Ft(w,g,k){if(r.bindRenderbuffer(36161,w),g.depthBuffer&&!g.stencilBuffer){let K=33189;if(k||Dt(g)){let tt=g.depthTexture;tt&&tt.isDepthTexture&&(tt.type===gn?K=36012:tt.type===mn&&(K=33190));let st=Ht(g);Dt(g)?u.renderbufferStorageMultisampleEXT(36161,st,K,g.width,g.height):r.renderbufferStorageMultisample(36161,st,K,g.width,g.height)}else r.renderbufferStorage(36161,K,g.width,g.height);r.framebufferRenderbuffer(36160,36096,36161,w)}else if(g.depthBuffer&&g.stencilBuffer){let K=Ht(g);k&&Dt(g)===!1?r.renderbufferStorageMultisample(36161,K,35056,g.width,g.height):Dt(g)?u.renderbufferStorageMultisampleEXT(36161,K,35056,g.width,g.height):r.renderbufferStorage(36161,34041,g.width,g.height),r.framebufferRenderbuffer(36160,33306,36161,w)}else{let K=g.isWebGLMultipleRenderTargets===!0?g.texture:[g.texture];for(let tt=0;tt0&&Dt(w)===!1){let rt=st?g:[g];k.__webglMultisampledFramebuffer=r.createFramebuffer(),k.__webglColorRenderbuffer=[],e.bindFramebuffer(36160,k.__webglMultisampledFramebuffer);for(let H=0;H0&&Dt(w)===!1){let g=w.isWebGLMultipleRenderTargets?w.texture:[w.texture],k=w.width,K=w.height,tt=16384,st=[],yt=w.stencilBuffer?33306:36096,rt=n.get(w),H=w.isWebGLMultipleRenderTargets===!0;if(H)for(let mt=0;mt0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&g.__useRenderToTexture!==!1}function Fe(w){let g=o.render.frame;_.get(w)!==g&&(_.set(w,g),w.update())}function Te(w,g){let k=w.encoding,K=w.format,tt=w.type;return w.isCompressedTexture===!0||w.isVideoTexture===!0||w.format===Ys||k!==vn&&(k===zt?a===!1?t.has("EXT_sRGB")===!0&&K===Re?(w.format=Ys,w.minFilter=Se,w.generateMipmaps=!1):g=Xi.sRGBToLinear(g):(K!==Re||tt!==yn)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",k)),g}this.allocateTextureUnit=W,this.resetTextureUnits=j,this.setTexture2D=Z,this.setTexture2DArray=ft,this.setTexture3D=F,this.setTextureCube=J,this.rebindTextures=ne,this.setupRenderTarget=ve,this.updateRenderTargetMipmap=Qt,this.updateMultisampleRenderTarget=Me,this.setupDepthRenderbuffer=xt,this.setupFrameBufferTexture=ot,this.useMultisampledRTT=Dt}function tf(r,t,e){let n=e.isWebGL2;function i(s,o=null){let a;if(s===yn)return 5121;if(s===Ho)return 32819;if(s===Wo)return 32820;if(s===ko)return 5120;if(s===Vo)return 5122;if(s===Ya)return 5123;if(s===Go)return 5124;if(s===mn)return 5125;if(s===gn)return 5126;if(s===mi)return n?5131:(a=t.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===Xo)return 6406;if(s===Re)return 6408;if(s===qo)return 6409;if(s===Yo)return 6410;if(s===_n)return 6402;if(s===Yn)return 34041;if(s===Ys)return a=t.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===Zo)return 6403;if(s===Jo)return 36244;if(s===$o)return 33319;if(s===Ko)return 33320;if(s===jo)return 36249;if(s===ds||s===fs||s===ps||s===ms)if(o===zt)if(a=t.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===ds)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===fs)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===ps)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===ms)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=t.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===ds)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===fs)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===ps)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===ms)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===zr||s===Or||s===Ur||s===Br)if(a=t.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===zr)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===Or)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===Ur)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===Br)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===Qo)return a=t.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===kr||s===Vr)if(a=t.get("WEBGL_compressed_texture_etc"),a!==null){if(s===kr)return o===zt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===Vr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===Gr||s===Hr||s===Wr||s===Xr||s===qr||s===Yr||s===Zr||s===Jr||s===$r||s===Kr||s===jr||s===Qr||s===ta||s===ea)if(a=t.get("WEBGL_compressed_texture_astc"),a!==null){if(s===Gr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===Hr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===Wr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===Xr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===qr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===Yr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===Zr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===Jr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===$r)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===Kr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===jr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===Qr)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===ta)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===ea)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===gs)if(a=t.get("EXT_texture_compression_bptc"),a!==null){if(s===gs)return o===zt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(s===tl||s===na||s===ia||s===sa)if(a=t.get("EXT_texture_compression_rgtc"),a!==null){if(s===gs)return a.COMPRESSED_RED_RGTC1_EXT;if(s===na)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===ia)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===sa)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===Hn?n?34042:(a=t.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):r[s]!==void 0?r[s]:null}return{convert:i}}var lr=class extends _e{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}},Vn=class extends de{constructor(){super(),this.isGroup=!0,this.type="Group"}},ef={type:"move"},fi=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Vn,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 Vn,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new N,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new N),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Vn,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new N,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new N),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){let e=this._hand;if(e)for(let n of t.hand.values())this._getHandJoint(e,n)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,e,n){let i=null,s=null,o=null,a=this._targetRay,c=this._grip,l=this._hand;if(t&&e.session.visibilityState!=="visible-blurred"){if(l&&t.hand){o=!0;for(let p of t.hand.values()){let d=e.getJointPose(p,n),v=this._getHandJoint(l,p);d!==null&&(v.matrix.fromArray(d.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.jointRadius=d.radius),v.visible=d!==null}let h=l.joints["index-finger-tip"],f=l.joints["thumb-tip"],u=h.position.distanceTo(f.position),m=.02,_=.005;l.inputState.pinching&&u>m+_?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&u<=m-_&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else c!==null&&t.gripSpace&&(s=e.getPose(t.gripSpace,n),s!==null&&(c.matrix.fromArray(s.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),s.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(s.linearVelocity)):c.hasLinearVelocity=!1,s.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(s.angularVelocity)):c.hasAngularVelocity=!1));a!==null&&(i=e.getPose(t.targetRaySpace,n),i===null&&s!==null&&(i=s),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(ef)))}return a!==null&&(a.visible=i!==null),c!==null&&(c.visible=s!==null),l!==null&&(l.visible=o!==null),this}_getHandJoint(t,e){if(t.joints[e.jointName]===void 0){let n=new Vn;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}},cr=class extends le{constructor(t,e,n,i,s,o,a,c,l,h){if(h=h!==void 0?h:_n,h!==_n&&h!==Yn)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&h===_n&&(n=mn),n===void 0&&h===Yn&&(n=Hn),super(null,i,s,o,a,c,h,n,l),this.isDepthTexture=!0,this.image={width:t,height:e},this.magFilter=a!==void 0?a:ae,this.minFilter=c!==void 0?c:ae,this.flipY=!1,this.generateMipmaps=!1}},hr=class extends sn{constructor(t,e){super();let n=this,i=null,s=1,o=null,a="local-floor",c=1,l=null,h=null,f=null,u=null,m=null,_=null,p=e.getContextAttributes(),d=null,v=null,T=[],b=[],M=new Set,A=new Map,C=new _e;C.layers.enable(1),C.viewport=new Xt;let I=new _e;I.layers.enable(2),I.viewport=new Xt;let x=[C,I],S=new lr;S.layers.enable(1),S.layers.enable(2);let L=null,X=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(F){let J=T[F];return J===void 0&&(J=new fi,T[F]=J),J.getTargetRaySpace()},this.getControllerGrip=function(F){let J=T[F];return J===void 0&&(J=new fi,T[F]=J),J.getGripSpace()},this.getHand=function(F){let J=T[F];return J===void 0&&(J=new fi,T[F]=J),J.getHandSpace()};function q(F){let J=b.indexOf(F.inputSource);if(J===-1)return;let nt=T[J];nt!==void 0&&nt.dispatchEvent({type:F.type,data:F.inputSource})}function z(){i.removeEventListener("select",q),i.removeEventListener("selectstart",q),i.removeEventListener("selectend",q),i.removeEventListener("squeeze",q),i.removeEventListener("squeezestart",q),i.removeEventListener("squeezeend",q),i.removeEventListener("end",z),i.removeEventListener("inputsourceschange",R);for(let F=0;F=0&&(b[it]=null,T[it].disconnect(nt))}for(let J=0;J=b.length){b.push(nt),it=Mt;break}else if(b[Mt]===null){b[Mt]=nt,it=Mt;break}if(it===-1)break}let O=T[it];O&&O.connect(nt)}}let G=new N,Y=new N;function j(F,J,nt){G.setFromMatrixPosition(J.matrixWorld),Y.setFromMatrixPosition(nt.matrixWorld);let it=G.distanceTo(Y),O=J.projectionMatrix.elements,Mt=nt.projectionMatrix.elements,ht=O[14]/(O[10]-1),ut=O[14]/(O[10]+1),ot=(O[9]+1)/O[5],Ft=(O[9]-1)/O[5],bt=(O[8]-1)/O[0],xt=(Mt[8]+1)/Mt[0],ne=ht*bt,ve=ht*xt,Qt=it/(-bt+xt),Me=Qt*-bt;J.matrixWorld.decompose(F.position,F.quaternion,F.scale),F.translateX(Me),F.translateZ(Qt),F.matrixWorld.compose(F.position,F.quaternion,F.scale),F.matrixWorldInverse.copy(F.matrixWorld).invert();let Ht=ht+Qt,Dt=ut+Qt,Fe=ne-Me,Te=ve+(it-Me),w=ot*ut/Dt*Ht,g=Ft*ut/Dt*Ht;F.projectionMatrix.makePerspective(Fe,Te,w,g,Ht,Dt)}function W(F,J){J===null?F.matrixWorld.copy(F.matrix):F.matrixWorld.multiplyMatrices(J.matrixWorld,F.matrix),F.matrixWorldInverse.copy(F.matrixWorld).invert()}this.updateCamera=function(F){if(i===null)return;S.near=I.near=C.near=F.near,S.far=I.far=C.far=F.far,(L!==S.near||X!==S.far)&&(i.updateRenderState({depthNear:S.near,depthFar:S.far}),L=S.near,X=S.far);let J=F.parent,nt=S.cameras;W(S,J);for(let O=0;OO&&(A.set(it,it.lastChangedTime),n.dispatchEvent({type:"planechanged",data:it}))}}_=null}let ft=new ja;ft.setAnimationLoop(Z),this.setAnimationLoop=function(F){Q=F},this.dispose=function(){}}};function nf(r,t){function e(p,d){d.color.getRGB(p.fogColor.value,Ka(r)),d.isFog?(p.fogNear.value=d.near,p.fogFar.value=d.far):d.isFogExp2&&(p.fogDensity.value=d.density)}function n(p,d,v,T,b){d.isMeshBasicMaterial||d.isMeshLambertMaterial?i(p,d):d.isMeshToonMaterial?(i(p,d),h(p,d)):d.isMeshPhongMaterial?(i(p,d),l(p,d)):d.isMeshStandardMaterial?(i(p,d),f(p,d),d.isMeshPhysicalMaterial&&u(p,d,b)):d.isMeshMatcapMaterial?(i(p,d),m(p,d)):d.isMeshDepthMaterial?i(p,d):d.isMeshDistanceMaterial?(i(p,d),_(p,d)):d.isMeshNormalMaterial?i(p,d):d.isLineBasicMaterial?(s(p,d),d.isLineDashedMaterial&&o(p,d)):d.isPointsMaterial?a(p,d,v,T):d.isSpriteMaterial?c(p,d):d.isShadowMaterial?(p.color.value.copy(d.color),p.opacity.value=d.opacity):d.isShaderMaterial&&(d.uniformsNeedUpdate=!1)}function i(p,d){p.opacity.value=d.opacity,d.color&&p.diffuse.value.copy(d.color),d.emissive&&p.emissive.value.copy(d.emissive).multiplyScalar(d.emissiveIntensity),d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===ye&&(p.bumpScale.value*=-1)),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias),d.emissiveMap&&(p.emissiveMap.value=d.emissiveMap),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===ye&&p.normalScale.value.negate()),d.specularMap&&(p.specularMap.value=d.specularMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let v=t.get(d).envMap;if(v&&(p.envMap.value=v,p.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,p.reflectivity.value=d.reflectivity,p.ior.value=d.ior,p.refractionRatio.value=d.refractionRatio),d.lightMap){p.lightMap.value=d.lightMap;let M=r.physicallyCorrectLights!==!0?Math.PI:1;p.lightMapIntensity.value=d.lightMapIntensity*M}d.aoMap&&(p.aoMap.value=d.aoMap,p.aoMapIntensity.value=d.aoMapIntensity);let T;d.map?T=d.map:d.specularMap?T=d.specularMap:d.displacementMap?T=d.displacementMap:d.normalMap?T=d.normalMap:d.bumpMap?T=d.bumpMap:d.roughnessMap?T=d.roughnessMap:d.metalnessMap?T=d.metalnessMap:d.alphaMap?T=d.alphaMap:d.emissiveMap?T=d.emissiveMap:d.clearcoatMap?T=d.clearcoatMap:d.clearcoatNormalMap?T=d.clearcoatNormalMap:d.clearcoatRoughnessMap?T=d.clearcoatRoughnessMap:d.iridescenceMap?T=d.iridescenceMap:d.iridescenceThicknessMap?T=d.iridescenceThicknessMap:d.specularIntensityMap?T=d.specularIntensityMap:d.specularColorMap?T=d.specularColorMap:d.transmissionMap?T=d.transmissionMap:d.thicknessMap?T=d.thicknessMap:d.sheenColorMap?T=d.sheenColorMap:d.sheenRoughnessMap&&(T=d.sheenRoughnessMap),T!==void 0&&(T.isWebGLRenderTarget&&(T=T.texture),T.matrixAutoUpdate===!0&&T.updateMatrix(),p.uvTransform.value.copy(T.matrix));let b;d.aoMap?b=d.aoMap:d.lightMap&&(b=d.lightMap),b!==void 0&&(b.isWebGLRenderTarget&&(b=b.texture),b.matrixAutoUpdate===!0&&b.updateMatrix(),p.uv2Transform.value.copy(b.matrix))}function s(p,d){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity}function o(p,d){p.dashSize.value=d.dashSize,p.totalSize.value=d.dashSize+d.gapSize,p.scale.value=d.scale}function a(p,d,v,T){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity,p.size.value=d.size*v,p.scale.value=T*.5,d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let b;d.map?b=d.map:d.alphaMap&&(b=d.alphaMap),b!==void 0&&(b.matrixAutoUpdate===!0&&b.updateMatrix(),p.uvTransform.value.copy(b.matrix))}function c(p,d){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity,p.rotation.value=d.rotation,d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let v;d.map?v=d.map:d.alphaMap&&(v=d.alphaMap),v!==void 0&&(v.matrixAutoUpdate===!0&&v.updateMatrix(),p.uvTransform.value.copy(v.matrix))}function l(p,d){p.specular.value.copy(d.specular),p.shininess.value=Math.max(d.shininess,1e-4)}function h(p,d){d.gradientMap&&(p.gradientMap.value=d.gradientMap)}function f(p,d){p.roughness.value=d.roughness,p.metalness.value=d.metalness,d.roughnessMap&&(p.roughnessMap.value=d.roughnessMap),d.metalnessMap&&(p.metalnessMap.value=d.metalnessMap),t.get(d).envMap&&(p.envMapIntensity.value=d.envMapIntensity)}function u(p,d,v){p.ior.value=d.ior,d.sheen>0&&(p.sheenColor.value.copy(d.sheenColor).multiplyScalar(d.sheen),p.sheenRoughness.value=d.sheenRoughness,d.sheenColorMap&&(p.sheenColorMap.value=d.sheenColorMap),d.sheenRoughnessMap&&(p.sheenRoughnessMap.value=d.sheenRoughnessMap)),d.clearcoat>0&&(p.clearcoat.value=d.clearcoat,p.clearcoatRoughness.value=d.clearcoatRoughness,d.clearcoatMap&&(p.clearcoatMap.value=d.clearcoatMap),d.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=d.clearcoatRoughnessMap),d.clearcoatNormalMap&&(p.clearcoatNormalScale.value.copy(d.clearcoatNormalScale),p.clearcoatNormalMap.value=d.clearcoatNormalMap,d.side===ye&&p.clearcoatNormalScale.value.negate())),d.iridescence>0&&(p.iridescence.value=d.iridescence,p.iridescenceIOR.value=d.iridescenceIOR,p.iridescenceThicknessMinimum.value=d.iridescenceThicknessRange[0],p.iridescenceThicknessMaximum.value=d.iridescenceThicknessRange[1],d.iridescenceMap&&(p.iridescenceMap.value=d.iridescenceMap),d.iridescenceThicknessMap&&(p.iridescenceThicknessMap.value=d.iridescenceThicknessMap)),d.transmission>0&&(p.transmission.value=d.transmission,p.transmissionSamplerMap.value=v.texture,p.transmissionSamplerSize.value.set(v.width,v.height),d.transmissionMap&&(p.transmissionMap.value=d.transmissionMap),p.thickness.value=d.thickness,d.thicknessMap&&(p.thicknessMap.value=d.thicknessMap),p.attenuationDistance.value=d.attenuationDistance,p.attenuationColor.value.copy(d.attenuationColor)),p.specularIntensity.value=d.specularIntensity,p.specularColor.value.copy(d.specularColor),d.specularIntensityMap&&(p.specularIntensityMap.value=d.specularIntensityMap),d.specularColorMap&&(p.specularColorMap.value=d.specularColorMap)}function m(p,d){d.matcap&&(p.matcap.value=d.matcap)}function _(p,d){p.referencePosition.value.copy(d.referencePosition),p.nearDistance.value=d.nearDistance,p.farDistance.value=d.farDistance}return{refreshFogUniforms:e,refreshMaterialUniforms:n}}function sf(r,t,e,n){let i={},s={},o=[],a=e.isWebGL2?r.getParameter(35375):0;function c(T,b){let M=b.program;n.uniformBlockBinding(T,M)}function l(T,b){let M=i[T.id];M===void 0&&(_(T),M=h(T),i[T.id]=M,T.addEventListener("dispose",d));let A=b.program;n.updateUBOMapping(T,A);let C=t.render.frame;s[T.id]!==C&&(u(T),s[T.id]=C)}function h(T){let b=f();T.__bindingPointIndex=b;let M=r.createBuffer(),A=T.__size,C=T.usage;return r.bindBuffer(35345,M),r.bufferData(35345,A,C),r.bindBuffer(35345,null),r.bindBufferBase(35345,b,M),M}function f(){for(let T=0;T0){C=M%A;let q=A-C;C!==0&&q-L.boundary<0&&(M+=A-C,S.__offset=M)}M+=L.storage}return C=M%A,C>0&&(M+=A-C),T.__size=M,T.__cache={},this}function p(T){let b={boundary:0,storage:0};return typeof T=="number"?(b.boundary=4,b.storage=4):T.isVector2?(b.boundary=8,b.storage=8):T.isVector3||T.isColor?(b.boundary=16,b.storage=12):T.isVector4?(b.boundary=16,b.storage=16):T.isMatrix3?(b.boundary=48,b.storage=48):T.isMatrix4?(b.boundary=64,b.storage=64):T.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",T),b}function d(T){let b=T.target;b.removeEventListener("dispose",d);let M=o.indexOf(b.__bindingPointIndex);o.splice(M,1),r.deleteBuffer(i[b.id]),delete i[b.id],delete s[b.id]}function v(){for(let T in i)r.deleteBuffer(i[T]);o=[],i={},s={}}return{bind:c,update:l,dispose:v}}function rf(){let r=Wi("canvas");return r.style.display="block",r}function af(r={}){this.isWebGLRenderer=!0;let t=r.canvas!==void 0?r.canvas:rf(),e=r.context!==void 0?r.context:null,n=r.depth!==void 0?r.depth:!0,i=r.stencil!==void 0?r.stencil:!0,s=r.antialias!==void 0?r.antialias:!1,o=r.premultipliedAlpha!==void 0?r.premultipliedAlpha:!0,a=r.preserveDrawingBuffer!==void 0?r.preserveDrawingBuffer:!1,c=r.powerPreference!==void 0?r.powerPreference:"default",l=r.failIfMajorPerformanceCaveat!==void 0?r.failIfMajorPerformanceCaveat:!1,h;e!==null?h=e.getContextAttributes().alpha:h=r.alpha!==void 0?r.alpha:!1;let f=null,u=null,m=[],_=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=vn,this.physicallyCorrectLights=!1,this.toneMapping=We,this.toneMappingExposure=1;let p=this,d=!1,v=0,T=0,b=null,M=-1,A=null,C=new Xt,I=new Xt,x=null,S=t.width,L=t.height,X=1,q=null,z=null,R=new Xt(0,0,S,L),G=new Xt(0,0,S,L),Y=!1,j=new ts,W=!1,Q=!1,Z=null,ft=new qt,F=new Nt,J=new N,nt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function it(){return b===null?X:1}let O=e;function Mt(y,D){for(let B=0;B0?u=_[_.length-1]:u=null,m.pop(),m.length>0?f=m[m.length-1]:f=null};function $t(y,D,B,P){if(y.visible===!1)return;if(y.layers.test(D.layers)){if(y.isGroup)B=y.renderOrder;else if(y.isLOD)y.autoUpdate===!0&&y.update(D);else if(y.isLight)u.pushLight(y),y.castShadow&&u.pushShadow(y);else if(y.isSprite){if(!y.frustumCulled||j.intersectsSprite(y)){P&&J.setFromMatrixPosition(y.matrixWorld).applyMatrix4(ft);let vt=Ht.update(y),St=y.material;St.visible&&f.push(y,vt,St,B,J.z,null)}}else if((y.isMesh||y.isLine||y.isPoints)&&(y.isSkinnedMesh&&y.skeleton.frame!==Ft.render.frame&&(y.skeleton.update(),y.skeleton.frame=Ft.render.frame),!y.frustumCulled||j.intersectsObject(y))){P&&J.setFromMatrixPosition(y.matrixWorld).applyMatrix4(ft);let vt=Ht.update(y),St=y.material;if(Array.isArray(St)){let Tt=vt.groups;for(let Rt=0,At=Tt.length;Rt0&&an(V,D,B),P&&ot.viewport(C.copy(P)),V.length>0&&Bt(V,D,B),pt.length>0&&Bt(pt,D,B),vt.length>0&&Bt(vt,D,B),ot.buffers.depth.setTest(!0),ot.buffers.depth.setMask(!0),ot.buffers.color.setMask(!0),ot.setPolygonOffset(!1)}function an(y,D,B){let P=ut.isWebGL2;Z===null&&(Z=new qe(1,1,{generateMipmaps:!0,type:ht.has("EXT_color_buffer_half_float")?mi:yn,minFilter:pi,samples:P&&s===!0?4:0})),p.getDrawingBufferSize(F),P?Z.setSize(F.x,F.y):Z.setSize(Hi(F.x),Hi(F.y));let V=p.getRenderTarget();p.setRenderTarget(Z),p.clear();let pt=p.toneMapping;p.toneMapping=We,Bt(y,D,B),p.toneMapping=pt,xt.updateMultisampleRenderTarget(Z),xt.updateRenderTargetMipmap(Z),p.setRenderTarget(V)}function Bt(y,D,B){let P=D.isScene===!0?D.overrideMaterial:null;for(let V=0,pt=y.length;V0&&xt.useMultisampledRTT(y)===!1?V=bt.get(y).__webglMultisampledFramebuffer:V=At,C.copy(y.viewport),I.copy(y.scissor),x=y.scissorTest}else C.copy(R).multiplyScalar(X).floor(),I.copy(G).multiplyScalar(X).floor(),x=Y;if(ot.bindFramebuffer(36160,V)&&ut.drawBuffers&&P&&ot.drawBuffers(y,V),ot.viewport(C),ot.scissor(I),ot.setScissorTest(x),pt){let Tt=bt.get(y.texture);O.framebufferTexture2D(36160,36064,34069+D,Tt.__webglTexture,B)}else if(vt){let Tt=bt.get(y.texture),Rt=D||0;O.framebufferTextureLayer(36160,36064,Tt.__webglTexture,B||0,Rt)}M=-1},this.readRenderTargetPixels=function(y,D,B,P,V,pt,vt){if(!(y&&y.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let St=bt.get(y).__webglFramebuffer;if(y.isWebGLCubeRenderTarget&&vt!==void 0&&(St=St[vt]),St){ot.bindFramebuffer(36160,St);try{let Tt=y.texture,Rt=Tt.format,At=Tt.type;if(Rt!==Re&&rt.convert(Rt)!==O.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let Et=At===mi&&(ht.has("EXT_color_buffer_half_float")||ut.isWebGL2&&ht.has("EXT_color_buffer_float"));if(At!==yn&&rt.convert(At)!==O.getParameter(35738)&&!(At===gn&&(ut.isWebGL2||ht.has("OES_texture_float")||ht.has("WEBGL_color_buffer_float")))&&!Et){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}D>=0&&D<=y.width-P&&B>=0&&B<=y.height-V&&O.readPixels(D,B,P,V,rt.convert(Rt),rt.convert(At),pt)}finally{let Tt=b!==null?bt.get(b).__webglFramebuffer:null;ot.bindFramebuffer(36160,Tt)}}},this.copyFramebufferToTexture=function(y,D,B=0){let P=Math.pow(2,-B),V=Math.floor(D.image.width*P),pt=Math.floor(D.image.height*P);xt.setTexture2D(D,0),O.copyTexSubImage2D(3553,B,0,0,y.x,y.y,V,pt),ot.unbindTexture()},this.copyTextureToTexture=function(y,D,B,P=0){let V=D.image.width,pt=D.image.height,vt=rt.convert(B.format),St=rt.convert(B.type);xt.setTexture2D(B,0),O.pixelStorei(37440,B.flipY),O.pixelStorei(37441,B.premultiplyAlpha),O.pixelStorei(3317,B.unpackAlignment),D.isDataTexture?O.texSubImage2D(3553,P,y.x,y.y,V,pt,vt,St,D.image.data):D.isCompressedTexture?O.compressedTexSubImage2D(3553,P,y.x,y.y,D.mipmaps[0].width,D.mipmaps[0].height,vt,D.mipmaps[0].data):O.texSubImage2D(3553,P,y.x,y.y,vt,St,D.image),P===0&&B.generateMipmaps&&O.generateMipmap(3553),ot.unbindTexture()},this.copyTextureToTexture3D=function(y,D,B,P,V=0){if(p.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let pt=y.max.x-y.min.x+1,vt=y.max.y-y.min.y+1,St=y.max.z-y.min.z+1,Tt=rt.convert(P.format),Rt=rt.convert(P.type),At;if(P.isData3DTexture)xt.setTexture3D(P,0),At=32879;else if(P.isDataArrayTexture)xt.setTexture2DArray(P,0),At=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}O.pixelStorei(37440,P.flipY),O.pixelStorei(37441,P.premultiplyAlpha),O.pixelStorei(3317,P.unpackAlignment);let Et=O.getParameter(3314),kt=O.getParameter(32878),fe=O.getParameter(3316),Oe=O.getParameter(3315),on=O.getParameter(32877),Vt=B.isCompressedTexture?B.mipmaps[0]:B.image;O.pixelStorei(3314,Vt.width),O.pixelStorei(32878,Vt.height),O.pixelStorei(3316,y.min.x),O.pixelStorei(3315,y.min.y),O.pixelStorei(32877,y.min.z),B.isDataTexture||B.isData3DTexture?O.texSubImage3D(At,V,D.x,D.y,D.z,pt,vt,St,Tt,Rt,Vt.data):B.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),O.compressedTexSubImage3D(At,V,D.x,D.y,D.z,pt,vt,St,Tt,Vt.data)):O.texSubImage3D(At,V,D.x,D.y,D.z,pt,vt,St,Tt,Rt,Vt),O.pixelStorei(3314,Et),O.pixelStorei(32878,kt),O.pixelStorei(3316,fe),O.pixelStorei(3315,Oe),O.pixelStorei(32877,on),V===0&&P.generateMipmaps&&O.generateMipmap(At),ot.unbindTexture()},this.initTexture=function(y){y.isCubeTexture?xt.setTextureCube(y,0):y.isData3DTexture?xt.setTexture3D(y,0):y.isDataArrayTexture||y.isCompressedArrayTexture?xt.setTexture2DArray(y,0):xt.setTexture2D(y,0),ot.unbindTexture()},this.resetState=function(){v=0,T=0,b=null,ot.reset(),H.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}var ur=class extends af{};ur.prototype.isWebGL1Renderer=!0;function Qe(r,t,e){return io(r)?new r.constructor(r.subarray(t,e!==void 0?e:r.length)):r.slice(t,e)}function Ui(r,t,e){return!r||!e&&r.constructor===t?r:typeof t.BYTES_PER_ELEMENT=="number"?new t(r):Array.prototype.slice.call(r)}function io(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}var Kn=class{constructor(t,e,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new e.constructor(n),this.sampleValues=e,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){let e=this.parameterPositions,n=this._cachedIndex,i=e[n],s=e[n-1];n:{t:{let o;e:{i:if(!(t=s)){let a=e[1];t=s)break t}o=n,n=0;break e}break n}for(;n>>1;te;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);let a=this.getValueSize();this.times=Qe(n,s,o),this.values=Qe(this.values,s*a,o*a)}return this}validate(){let t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let n=this.times,i=this.values,s=n.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let o=null;for(let a=0;a!==s;a++){let c=n[a];if(typeof c=="number"&&isNaN(c)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,c),t=!1;break}if(o!==null&&o>c){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,c,o),t=!1;break}o=c}if(i!==void 0&&io(i))for(let a=0,c=i.length;a!==c;++a){let l=i[a];if(isNaN(l)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,l),t=!1;break}}return t}optimize(){let t=Qe(this.times),e=Qe(this.values),n=this.getValueSize(),i=this.getInterpolation()===_s,s=t.length-1,o=1;for(let a=1;a0){t[o]=t[s];for(let a=s*n,c=o*n,l=0;l!==n;++l)e[c+l]=e[a+l];++o}return o!==t.length?(this.times=Qe(t,0,o),this.values=Qe(e,0,o*n)):(this.times=t,this.values=e),this}clone(){let t=Qe(this.times,0),e=Qe(this.values,0),n=this.constructor,i=new n(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}};Le.prototype.TimeBufferType=Float32Array;Le.prototype.ValueBufferType=Float32Array;Le.prototype.DefaultInterpolation=Vi;var wn=class extends Le{};wn.prototype.ValueTypeName="bool";wn.prototype.ValueBufferType=Array;wn.prototype.DefaultInterpolation=ki;wn.prototype.InterpolantFactoryMethodLinear=void 0;wn.prototype.InterpolantFactoryMethodSmooth=void 0;var mr=class extends Le{};mr.prototype.ValueTypeName="color";var gr=class extends Le{};gr.prototype.ValueTypeName="number";var _r=class extends Kn{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,c=(n-e)/(i-e),l=t*a;for(let h=l+a;l!==h;l+=4)rn.slerpFlat(s,0,o,l-a,o,l,c);return s}},yi=class extends Le{InterpolantFactoryMethodLinear(t){return new _r(this.times,this.values,this.getValueSize(),t)}};yi.prototype.ValueTypeName="quaternion";yi.prototype.DefaultInterpolation=Vi;yi.prototype.InterpolantFactoryMethodSmooth=void 0;var Sn=class extends Le{};Sn.prototype.ValueTypeName="string";Sn.prototype.ValueBufferType=Array;Sn.prototype.DefaultInterpolation=ki;Sn.prototype.InterpolantFactoryMethodLinear=void 0;Sn.prototype.InterpolantFactoryMethodSmooth=void 0;var xr=class extends Le{};xr.prototype.ValueTypeName="vector";var wr="\\\\[\\\\]\\\\.:\\\\/",of=new RegExp("["+wr+"]","g"),Sr="[^"+wr+"]",lf="[^"+wr.replace("\\\\.","")+"]",cf=/((?:WC+[\\/:])*)/.source.replace("WC",Sr),hf=/(WCOD+)?/.source.replace("WCOD",lf),uf=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",Sr),df=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",Sr),ff=new RegExp("^"+cf+hf+uf+df+"$"),pf=["material","materials","bones","map"],yr=class{constructor(t,e,n){let i=n||It.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}getValue(t,e){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(t,e)}setValue(t,e){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=n.length;i!==s;++i)n[i].setValue(t,e)}bind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},It=class{constructor(t,e,n){this.path=e,this.parsedPath=n||It.parseTrackName(e),this.node=It.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new It.Composite(t,e,n):new It(t,e,n)}static sanitizeNodeName(t){return t.replace(/\\s/g,"_").replace(of,"")}static parseTrackName(t){let e=ff.exec(t);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let s=n.nodeName.substring(i+1);pf.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){let n=t.skeleton.getBoneByName(e);if(n!==void 0)return n}if(t.children){let n=function(s){for(let o=0;oMath.round(S*a);if(d[0]=`${x(A.x)}, ${x(A.y)}, ${x(A.z)}`,d[1]=`${x(C.x)}, ${x(C.y)}, ${x(C.z)}`,d[2]=`${x(I.x)}, ${x(I.y)}, ${x(I.z)}`,!(d[0]===d[1]||d[1]===d[2]||d[2]===d[0]))for(let S=0;S<3;S++){let L=(S+1)%3,X=d[S],q=d[L],z=as[p[S]],R=as[p[L]],G=`${X}_${q}`,Y=`${q}_${X}`;Y in v&&v[Y]?(Tr.dot(v[Y].normal)<=c&&(T.push(z.x,z.y,z.z),T.push(R.x,R.y,R.z)),v[Y]=null):G in v||(v[G]={index0:_[S],index1:_[L],normal:Tr.clone()})}}for(let M in v)if(v[M]){let{index0:A,index1:C}=v[M];ss.fromBufferAttribute(u,A),rs.fromBufferAttribute(u,C),T.push(ss.x,ss.y,ss.z),T.push(rs.x,rs.y,rs.z)}let b=new self[h](T);so.postMessage({id:e,vertices:b},[b.buffer])}});\n/*! Bundled license information:\n\nthree/build/three.module.js:\n (**\n * @license\n * Copyright 2010-2023 Three.js Authors\n * SPDX-License-Identifier: MIT\n *)\n*/\n')}var jo,zx=class{constructor(){this.worker=new LB,this.geometries=new Map,this.loadedGeometries=new Map,this.jobCount=0,this.init()}add(e,t){this.geometries.set(e,t),this.jobCount++}get(e){return this.geometries.get(e)}init(){this.worker.addEventListener("message",(e=>{let t=this.geometries.get(e.data.id.toString());(null==t?void 0:t.length)>0&&(t.forEach((t=>{null!=t&&t.geometry&&null!=t&&t.matrix&&null!=t&&t.geom&&null!=t&&t.line&&(t.geom.parameters={geometry:t.geometry,thresholdAngle:5},t.geom.setAttribute("position",new dt(e.data.vertices,3)),t.geom.applyMatrix4(t.matrix),t.line.geometry=t.geom,t.line.visible=!0)})),this.geometries.delete(e.data.id.toString()),this.jobCount--),this.loadedGeometries.set(e.data.id.toString(),e.data.vertices)}))}postMessage(e){this.worker.postMessage(JSON.stringify(e))}},lyt=new A(0,1,0),Wg=class{static resetObjectStyle(e){this.revertWireframeMode(e),this.revertObjectOpacity(e,[]),this.revertAppliedMaterialToObject(e),this.revertVisibleForFloors(e)}static resetObjectStyleById(e,t){let i=this.getObjectById(e,t);this.resetObjectStyle(i)}static setObjectOpacity(e,t=.3,i,r){let n=[],s=e=>{n.find((t=>t.id===e.id))||(n.push({id:e.id,opacity:e.opacity,transparent:e.transparent,side:e.side}),e.opacity*=t,e.transparent=!0,e.side=gi)},a=e=>{let i=n.find((t=>t.id===e.id));if(!i){let i=e.clone();return n.push({id:e.id,opacity:e.opacity,transparent:e.transparent,side:e.side,material:e,clonedMaterial:i}),i.opacity*=t,i.transparent=!0,i}return i.clonedMaterial};return e.traverse((e=>{if((!r||-1===r.indexOf(e.id))&&(!i||-1!==i.indexOf(e.id))&&e instanceof rt){let t=e;if(i||r){if(Array.isArray(t.material)){let e=[];t.material.forEach((t=>{let i=a(t);i&&e.push(i)})),t.material=e}else if(t.material){let e=a(t.material);e&&(t.material=e)}}else if(Array.isArray(t.material))t.material.forEach((e=>{s(e)}));else if(t.material){let e=t.material;s(e)}}})),n}static revertObjectOpacity(e,t,i,r){let n=e=>{let i=t.find((t=>t.id===e.id));i&&(e.opacity=i.opacity,e.transparent=i.transparent,e.side=i.side)},s=e=>{let i=t.find((t=>t.clonedMaterial&&t.clonedMaterial.id===e.id));if(i)return i.material};e.traverse((e=>{if((!r||-1===r.indexOf(e.id))&&(!i||-1!==i.indexOf(e.id))&&e instanceof rt)if(Array.isArray(e.material)){let t=[];e.material.forEach((e=>{let i=s(e);i?t.push(i):n(e)})),e.material=t}else if(e.material){let t=s(e.material);t?e.material=t:n(e.material)}}))}static setObjectOpacityById(e,t,i=.3,r,n){let s=e.getObjectById(t);if(!s)throw new Error(`Failed to find object by id: ${t}`);return Wg.setObjectOpacity(s,i,r,n)}static revertObjectOpacityById(e,t,i,r,n){let s=e.getObjectById(t);if(!s)throw new Error(`Failed to find object by id: ${t}`);Wg.revertObjectOpacity(s,i,r,n)}static applyMaterialToObject(e,t,i,r){e.traverse((e=>{r&&-1!==r.indexOf(e.id)||i&&-1===i.indexOf(e.id)||e instanceof rt&&(e.userData.originalMaterial||(e.userData.originalMaterial=e.material),e.material=t)}))}static revertAppliedMaterialToObject(e,t,i){e.traverse((e=>{i&&-1!==i.indexOf(e.id)||t&&-1===t.indexOf(e.id)||e.userData.originalMaterial&&(e.material=e.userData.originalMaterial,e.userData.originalMaterial=void 0)}))}static applyMaterialToObjectById(e,t,i,r,n){let s=e.getObjectById(t);if(!s)throw new Error(`Failed to find object by id: ${t}`);this.applyMaterialToObject(s,i,r,n)}static revertAppliedMaterialToObjectById(e,t,i,r){let n=e.getObjectById(t);if(!n)throw new Error(`Failed to find object by id: ${t}`);this.revertAppliedMaterialToObject(n,i,r)}static applyOpacityMaterialToObject(e,t,i){let r=new or({color:0,transparent:!0,opacity:.05});this.applyMaterialToObject(e,r,t,i)}static setWireframeMode(e){let t=new or({color:16732160,wireframe:!0,transparent:!0,opacity:.8});e.traverseVisible((e=>{if(e instanceof rt){let i=e;i.userData.materialForWireframe=i.material,i.material=t}}))}static setWireframeModeById(e,t){let i=e.getObjectById(t);if(!i)throw new Error(`Failed to find object by id: ${t}`);Wg.setWireframeMode(i)}static revertWireframeMode(e){e.traverseVisible((e=>{e instanceof rt&&e.userData.materialForWireframe&&(e.material=e.userData.materialForWireframe,e.userData.materialForWireframe=void 0)}))}static revertWireframeModeById(e,t){let i=e.getObjectById(t);if(!i)throw new Error(`Failed to find object by id: ${t}`);Wg.revertWireframeMode(i)}static findInner(e,t,i=[],r=!1){let n=t.toLowerCase(),s=[],a=e=>-1!==e.toLowerCase().indexOf(n),o=e=>-1!==e.toString().indexOf(n),l=e=>{if(e.name&&-1!==e.name.toLowerCase().indexOf(n))return!0;if(e.gltfExtensions){let t=e.gltfExtensions,i=t.objectId&&t.objectId.Value||t.elementId&&t.elementId.Value;if(i&&-1!==i.toLowerCase().indexOf(n))return!0}return!1};if(i.length>0)for(let t=0;t{(a(e.name)||o(e.id)||l(e.userData))&&s.push(e)})),r&&s.length>0)return[s[0]]}else if(e.traverse((e=>{(a(e.name)||o(e.id)||l(e.userData))&&s.push(e)})),r&&s.length>0)return[s[0]];return s}static find(e,t,i=[],r=!1){return this.findInner(e,t,i,r)}static findFirst(e,t,i=[],r=!1){let n=this.findInner(e,t,i,r);if(n.length>0)return n[0]}static getFloorsFromString(e){let t=[],i=new RegExp(/(?:-?(?:\d+(?:\.5)?)F)(?=\W|$)/,"g").exec(e);return i&&i.length>0&&i.forEach((e=>{if(e){let i=e.replace("F",""),r=Number(i);r?t.push(r):console.log(`[OU] invalid floor: ${e}`)}})),t}static matchFloor(e,t){return-1!==this.getFloorsFromString(e).findIndex((e=>e===t))}static matchFloors(e,t){return-1!==this.getFloorsFromString(e).findIndex((e=>-1!==t.findIndex((t=>t===e))))}static distinctFloors(e,t){let i=[],r=e=>{this.getFloorsFromString(e).forEach((e=>{i[e]=!0}))};return t.forEach((t=>{let i=e.getObjectById(t);i&&i.traverse((e=>{if(r(e.name),e.userData.gltfExtensions){let t=e.userData.gltfExtensions;t.level&&t.level.Value&&r(t.level.Value)}}))})),Object.keys(i).sort()}static traverseObjectByFloors(e,t,i,r,n){let s=e.getObjectById(t);if(!s)return[];s.traverse((e=>{let t=this.matchFloors(e.name,i);if(!t&&e.userData&&e.userData.gltfExtensions){let r=e.userData.gltfExtensions;r.level&&r.level.Value&&(t=this.matchFloors(r.level.Value,i))}t&&r&&r(e),!t&&n&&n(e)}))}static setVisibleForFloors(e,t,i,r=!0){this.traverseObjectByFloors(e,t,i,(e=>{let t=e;for(;t;)t.visible=!0,t=t.parent||void 0}),(e=>{r&&(e.visible=!1)}))}static revertVisibleForFloors(e){e.traverse((e=>{e.visible=!0}))}static revertVisibleForFloorsById(e,t){let i=this.getObjectById(e,t);this.revertVisibleForFloors(i)}static getObjectById(e,t){let i=e.getObjectById(t);if(!i)throw new Error(`Failed to find object by id: ${t}`);return i}static createOutlines(e,t={visibleOnly:!0,meshOnly:!0,replaceOriginalObject:!1}){if(!e)return[];if(0===e.children.length&&(t.visibleOnly&&!e.visible||t.meshOnly&&!(e instanceof rt)))return[];let i=e;for(let e=i.children.length-1;e>=0;--e){let r=i.children[e];this.createOutlines(r,t).forEach((e=>e.applyMatrix4(i.matrixWorld)))}if(!i.geometry)return[];let r=[];if(i instanceof rn)for(let e=0;e=0;--t){let i=e.children[t];i.children.length>0&&this.removeOutlines(i),i.userData.isOutline&&e.remove(i)}}static hasOutline(e){let t=!1;for(let i=0;i0&&(t=this.hasOutline(r),t))break}return t}static setOutlinesVisibility(e,t){e.traverse((e=>{e.userData.isOutline&&(e.visible=t)}))}static createOutline(e,t,i=this.OUTLINE_MATERIAL){let r=new Rp,n=new li(r,i);if(n.layers.set(11),n.userData.isOutline=!0,n.matrixAutoUpdate=!1,n.visible=!1,n.updateMatrix(),jo||(jo=new zx),jo.loadedGeometries.has(e.id.toString())){let i=jo.loadedGeometries.get(e.id.toString());return r.parameters={geometry:e,thresholdAngle:5},r.setAttribute("position",new dt(i,3)),r.applyMatrix4(t),n.geometry=r,n.visible=!0,n}if(jo.get(e.id.toString())||jo.add(e.id.toString(),[]),!jo.loadedGeometries.has(e.id.toString())){jo.add(e.id.toString(),jo.get(e.id.toString()).concat([{geometry:e,matrix:t,geom:r,line:n}]));let i=e.getAttribute("position");jo.postMessage({id:e.id,position:i.toJSON(),index:e.getIndex(),thresholdAngle:5})}return n}static createOutlineSync(e,t,i=this.OUTLINE_MATERIAL){let r=new Rp(e,5),n=new li(r,i);return n.layers.set(11),n.userData.isOutline=!0,n.matrixAutoUpdate=!1,n.applyMatrix4(t),n}static cloneObject(e,t=!0){let i=e.clone();return t&&i.traverse((e=>{(e instanceof rt||e instanceof Ir)&&(e.material=Cs.cloneMaterial(e.material))})),i}static createBox(e,t,i,r=Wg.BOX_FACE_MATERIAL,n=!0){let s=[],a=(e,t,i)=>{s.push(new A(e,t,i))};a(0,0,0),a(e,0,0),a(e,t,0),a(0,t,0),a(0,0,i),a(e,0,i),a(e,t,i),a(0,t,i);let o=new lt;o.setFromPoints(s);let l=[0,3,2,0,2,1,4,6,7,4,5,6,0,7,3,0,4,7,3,6,2,3,7,6,1,6,5,1,2,6];return n&&l.push(0,5,4,0,1,5),o.setIndex(l),o.computeVertexNormals(),new rt(o,r)}static rebaseObjectOnRTC(e){let t=e;if(!((t.isMesh||t.isLine||t.isPoints)&&t.geometry&&t.geometry instanceof lt))return e;let i=t.geometry;if(!i.hasAttribute("position"))return e;let r=i.getAttribute("position");if(0===r.count)return e;let n=r.itemSize,s=r.array,a=[];for(let e=0;e2?a[2]:0);let l=e.matrixAutoUpdate;return e.matrixAutoUpdate=!1,e.applyMatrix4(o),e.matrixAutoUpdate=l,e}static isEmptyObject(e){if(0===e.children.length){let t=e.geometry;if(!t||!t.hasAttribute("position")||0===t.getAttribute("position").count)return!0}return!1}static removeEmptyObjects(e){for(let t=0;t{e.removeFromParent()})),this.removeEmptyObjects(t))}static setSharedVariablesOfObject(e){e.uuid="",e.up=lyt}static isLeafObject(e){return(e instanceof rt||e instanceof Ir||e instanceof nn)&&!(e.children.length>0||!e.geometry)}},ei=Wg;ei.OUTLINE_MATERIAL=new vr({name:"outline",color:0,transparent:!0,opacity:.2}),ei.BOX_FACE_MATERIAL=new Es({color:11648971,transparent:!0,opacity:.3,side:tn});var kC=new Be,cyt=new Be,GC=class{static resetMergeInfo(){this.mergeInfo.removedObjects=0,this.mergeInfo.mergedMeshes=0,this.mergeInfo.mergedLines=0,this.mergeInfo.mergedPoints=0,this.mergeInfo.mergedUnknownTypeObjects=0,this.mergeInfo.elapsedTime=0}static merge(e,t=!0){let i=Date.now();this.mergeInner(e,t),this.mergeInfo.elapsedTime+=Date.now()-i}static mergeInner(e,t=!0){if(!e.children||e.children.length<1)return;let i=e.children.length,r={},n=[];for(let s=0;s0){this.mergeInner(i,t);continue}if(i.userData.relativeToCenter||i.isInstancedMesh||!i.geometry||!(i.geometry instanceof lt))continue;let a=!1,o=Object.values(r);for(let t=o.length-1;t>=0;--t){let i=o[t].indexes[0];if(a=this.tryHandleMergeableObjects(e,s,i,r,n),a)break}for(let t=n.length-1;!a&&t>=0;--t){let i=n[t];if(a=this.tryHandleMergeableObjects(e,s,i,r,n),a)break}a||n.push(s)}if(Object.keys(r).length<=0)return;let s=[],a=[],o=[],l=[];Object.values(r).forEach((i=>{let r,n=i.indexes,h=e.children[n[0]],u=[],c=0,p=0,d=0,f=[];if(n.forEach((i=>{var r,n,s;let a=e.children[i],o=a.geometry.clone();if(o.applyMatrix4(a.matrix),kt.tryConvertInterleavedBufferAttributes(o),o.userData.isLineSegments=!0===a.isLineSegments,u.push(o),t){let e=null==(n=null==(r=o.attributes)?void 0:r.position)?void 0:n.count,t=(null==(s=o.index)?void 0:s.count)||0;f.push({batchId:c,positionStart:p,positionCount:e,indexStart:d,indexCount:t}),p+=e,d+=t,c++}})),0!==u.length){if(h.isMesh){let e=zo(u);if(!e)return;e.userData={},r=new rt(e,h.material),s.push(r)}else if(h.isLine){let e=this.mergeLineGeometries(u,t,h.material instanceof Ap||h.material instanceof Yt,f);if(!e)return;r=new li(e,h.material),a.push(r)}else if(h.isPoints){let e=zo(u);if(!e)return;e.userData={},r=new nn(e,h.material),o.push(r)}r&&(t?r.userData.batches=f:r.userData=h.userData,r.userData.layerName=h.userData.layerName,r.name=`[Merged] ${h.name}`,r.matrixAutoUpdate=!1,r.renderOrder=h.renderOrder,r.layers=h.layers,r.visible=h.visible,l.push(...n)),u.forEach((e=>{kt.releaseGeometryManually(e)})),u=[]}})),l.sort(((e,t)=>t-e)),l.forEach((t=>{let i=e.children[t];e.remove(i)})),[...s,...a,...o].forEach((t=>{e.add(t)})),e.updateMatrix(),this.mergeInfo.removedObjects+=l.length,this.mergeInfo.mergedMeshes+=s.length,this.mergeInfo.mergedLines+=a.length,this.mergeInfo.mergedPoints+=o.length}static tryHandleMergeableObjects(e,t,i,r,n){let s=!1,a=Array.isArray(e),o=a?e.length:e.children.length;if(t===i||t>=o||i>=o)return s;let l=a?e[t]:e.children[t],h=a?e[i]:e.children[i];return this.areObjectsMergeable(l,h)&&this.areGeometriesMergeable(l.geometry,h.geometry)&&Cs.materialsEquals(l.material,h.material)&&(r[i]||(r[i]={indexes:[i]},this.removeFromArray(n,i)),r[i].indexes.push(t),s=!0),s}static isFilteredByOtherFactors(e,t){let i=e;if(i.isMesh&&i.material.isShaderMaterial)return!0;let r=!1,n=e;for(;n&&n!==t;){let e=n.userData;if(e.relativeToCenter||e.spatialFilterHandle){r=!0;break}n=n.parent}return r}static deepMerge(e,t,i=!0,r=!0,n=!0){let s={added:[],removed:[]};if(e.length<=1)return s;let a=Date.now(),o={},l=[];for(let i=0;i=0;--t){let r=s[t].indexes[0];if(n=this.tryHandleMergeableObjects(e,i,r,o,l),n)break}for(let t=l.length-1;!n&&t>=0;--t){let r=l[t];if(n=this.tryHandleMergeableObjects(e,i,r,o,l),n)break}n||l.push(i)}if(Object.keys(o).length<=0)return s;ne.debug(`[Merge] Built merged indexes for ${e.length} objects in ${(Date.now()-a)/1e3}s`),a=Date.now();let h=[],u=[],c=[],p=[];Object.values(o).forEach((i=>{let r=i.indexes;if(r.length<2)return;let s,a=e[r[0]],o=[],l=0,d=0,f=0,m=[];if(r.forEach((i=>{var r,s,h;let u=e[i],c=u.geometry.clone();if(a.material instanceof vr&&c.deleteAttribute("lineDistance"),this.applyMatrix(c,u,t),c.userData.isLineSegments=!0===u.isLineSegments,o.push(c),n){let e,t=null==(s=null==(r=c.attributes)?void 0:r.position)?void 0:s.count,i=(null==(h=c.index)?void 0:h.count)||0;a.isLine&&(c.boundingSphere||c.computeBoundingSphere(),e=c.boundingSphere.clone()),m.push({batchId:l,positionStart:d,positionCount:t,indexStart:f,indexCount:i,boundingSphere:e}),d+=t,f+=i,l++}})),0!==o.length){if(a.isMesh){let e=zo(o);if(!e)return;e.userData={},s=new rt(e,a.material),h.push(s)}else if(a.isLine){let e=this.mergeLineGeometries(o,n,a.material instanceof Ap||a.material instanceof Yt,m);if(!e)return;s=new li(e,a.material),u.push(s)}else if(a.isPoints){let e=zo(o);if(!e)return;e.userData={},s=new nn(e,a.material),c.push(s)}s&&(n?s.userData.batches=m:s.userData=a.userData,s.userData.layerName=a.userData.layerName,s.name=`[Merged] ${a.name}`,s.matrixAutoUpdate=!1,s.renderOrder=a.renderOrder,s.layers=a.layers,s.visible=a.visible,r.forEach((e=>p.push(e)))),o.forEach((e=>{kt.releaseGeometryManually(e)})),o=[]}})),ne.debug(`[Merge] Ran deepMerge() in ${(Date.now()-a)/1e3}s`);let d=s.removed;p.forEach((t=>{let r=e[t];d.push(r),i&&r.removeFromParent()}));let f=s.added;return[...h,...u,...c].forEach((e=>{f.push(e),i&&t&&(t.add(e),e.updateWorldMatrix(!1,!1))})),this.mergeInfo.removedObjects+=p.length,this.mergeInfo.mergedMeshes+=h.length,this.mergeInfo.mergedLines+=u.length,this.mergeInfo.mergedPoints+=c.length,r&&t&&ei.removeEmptyObjects(t),s}static applyMatrix(e,t,i){let r=t;for(kC.identity();r&&r!==i&&(kC.premultiply(r.matrix),r.parent);)r=r.parent;return kC.equals(cyt)?e:e.applyMatrix4(kC)}static mergeLineGeometries(e,t,i,r){let n;if(i)n=GC.mergeBufferGeometriesWithLinesToLineSegements(e,t,r);else{if(n=zo(e),!n)return;n.userData={};let i=[],s=0;e.forEach(((e,n)=>{let a=e.attributes.position;if(!a)return;let o=e.index,l=!0===e.userData.isLineSegments,h=i.length;if(o)for(let e=0;e0&&i.push(s+o.array[e-1],s+t)}else for(let e=0;e0&&(l?e%2==1&&i.push(s+e-1,s+e):i.push(s+e-1,s+e));s+=a.count,t&&r&&(r[n].indexStart=h,r[n].indexCount=i.length-h)})),n.setIndex(i)}return n}static mergeBufferGeometriesWithLinesToLineSegements(e,t,i){let r=new Set(Object.keys(e[0].attributes)),n={},s=new lt,a=[],o=0;for(let s=0;s=0;--i)if(e[i]===t)return void e.splice(i,1)}static removeObjectFromArray(e,t){for(let i=e.length-1;i>=0;--i)if(e[i]===t)return void e.splice(i,1)}static areGeometriesMergeable(e,t){if(!e||!t||"InstancedBufferGeometry"===e.type||"InstancedBufferGeometry"===t.type||!!e.index!=!!t.index)return!1;let i=Object.keys(e.attributes);if(i.length!==Object.keys(t.attributes).length)return!1;for(let e of i)if(!t.attributes[e])return!1;return!0}static areObjectsMergeable(e,t){if(e.layers.mask!==t.layers.mask||e.renderOrder!==t.renderOrder||e.visible!==t.visible||e.userData.layerName!==t.userData.layerName)return!1;if(e.type===t.type)return!0;let i=e,r=t;return i.isMesh&&r.isMesh||i.isLine&&r.isLine||i.isPoints&&r.isPoints}static isMergedMesh(e){return!(!e||!e.userData.batches)}static isFaceIndexInBatch(e,t,i){if(e.boundsTree){let r=e.index.getX(3*i);if(r>=t.positionStart&&r=e&&i<=r)return!0}else{let e=3*i;if(e>=t.positionStart&&e80*i){r=s=e[0],n=a=e[1];for(let t=i;ts&&(s=o),l>a&&(a=l);h=Math.max(s-r,a-n),h=0!==h?32767/h:0}return Xx(p,d,i,r,n,h,0),d}};function tde(e,t,i,r,n){let s,a;if(n===tTt(e,t,i,r)>0)for(s=t;s=t;s-=r)a=Qpe(s,e[s],e[s+1],a);return a&&KC(a,a.next)&&(Kx(a),a=a.next),a}function Yg(e,t){if(!e)return e;t||(t=e);let i,r=e;do{if(i=!1,r.steiner||!KC(r,r.next)&&0!==Ln(r.prev,r,r.next))r=r.next;else{if(Kx(r),r=t=r.prev,r===r.next)break;i=!0}}while(i||r!==t);return t}function Xx(e,t,i,r,n,s,a){if(!e)return;!a&&s&&$yt(e,r,n,s);let o,l,h=e;for(;e.prev!==e.next;)if(o=e.prev,l=e.next,s?Gyt(e,r,n,s):kyt(e))t.push(o.i/i|0),t.push(e.i/i|0),t.push(l.i/i|0),Kx(e),e=l.next,h=l.next;else if((e=l)===h){a?1===a?Xx(e=Vyt(Yg(e),t,i),t,i,r,n,s,2):2===a&&zyt(e,t,i,r,n,s):Xx(Yg(e),t,i,r,n,s,1);break}}function kyt(e){let t=e.prev,i=e,r=e.next;if(Ln(t,i,r)>=0)return!1;let n=t.x,s=i.x,a=r.x,o=t.y,l=i.y,h=r.y,u=ns?n>a?n:a:s>a?s:a,d=o>l?o>h?o:h:l>h?l:h,f=r.next;for(;f!==t;){if(f.x>=u&&f.x<=p&&f.y>=c&&f.y<=d&&pT(n,o,s,l,a,h,f.x,f.y)&&Ln(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function Gyt(e,t,i,r){let n=e.prev,s=e,a=e.next;if(Ln(n,s,a)>=0)return!1;let o=n.x,l=s.x,h=a.x,u=n.y,c=s.y,p=a.y,d=ol?o>h?o:h:l>h?l:h,g=u>c?u>p?u:p:c>p?c:p,y=VB(d,f,t,i,r),v=VB(m,g,t,i,r),T=e.prevZ,x=e.nextZ;for(;T&&T.z>=y&&x&&x.z<=v;){if(T.x>=d&&T.x<=m&&T.y>=f&&T.y<=g&&T!==n&&T!==a&&pT(o,u,l,c,h,p,T.x,T.y)&&Ln(T.prev,T,T.next)>=0||(T=T.prevZ,x.x>=d&&x.x<=m&&x.y>=f&&x.y<=g&&x!==n&&x!==a&&pT(o,u,l,c,h,p,x.x,x.y)&&Ln(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;T&&T.z>=y;){if(T.x>=d&&T.x<=m&&T.y>=f&&T.y<=g&&T!==n&&T!==a&&pT(o,u,l,c,h,p,T.x,T.y)&&Ln(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;x&&x.z<=v;){if(x.x>=d&&x.x<=m&&x.y>=f&&x.y<=g&&x!==n&&x!==a&&pT(o,u,l,c,h,p,x.x,x.y)&&Ln(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function Vyt(e,t,i){let r=e;do{let n=r.prev,s=r.next.next;!KC(n,s)&&rde(n,r,r.next,s)&&$x(n,s)&&$x(s,n)&&(t.push(n.i/i|0),t.push(r.i/i|0),t.push(s.i/i|0),Kx(r),Kx(r.next),r=e=s),r=r.next}while(r!==e);return Yg(r)}function zyt(e,t,i,r,n,s){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&Jyt(a,e)){let o=ide(a,e);return a=Yg(a,a.next),o=Yg(o,o.next),Xx(a,t,i,r,n,s,0),void Xx(o,t,i,r,n,s,0)}e=e.next}a=a.next}while(a!==e)}function jyt(e,t,i,r){let n,s,a,o,l,h=[];for(n=0,s=t.length;n=r.next.y&&r.next.y!==r.y){let e=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=s&&e>n&&(n=e,i=r.x=r.x&&r.x>=h&&s!==r.x&&pT(ai.x||r.x===i.x&&Xyt(i,r)))&&(i=r,c=o)),r=r.next}while(r!==l);return i}function Xyt(e,t){return Ln(e.prev,e,t.prev)<0&&Ln(t.next,e,e.next)<0}function $yt(e,t,i,r){let n=e;do{0===n.z&&(n.z=VB(n.x,n.y,t,i,r)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,Kyt(n)}function Kyt(e){let t,i,r,n,s,a,o,l,h=1;do{for(i=e,e=null,s=null,a=0;i;){for(a++,r=i,o=0,t=0;t0||l>0&&r;)0!==o&&(0===l||!r||i.z<=r.z)?(n=i,i=i.nextZ,o--):(n=r,r=r.nextZ,l--),s?s.nextZ=n:e=n,n.prevZ=s,s=n;i=r}s.nextZ=null,h*=2}while(a>1);return e}function VB(e,t,i,r,n){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-i)*n|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*n|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Zyt(e){let t=e,i=e;do{(t.x=(e-a)*(s-o)&&(e-a)*(r-o)>=(i-a)*(t-o)&&(i-a)*(s-o)>=(n-a)*(r-o)}function Jyt(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!Qyt(e,t)&&($x(e,t)&&$x(t,e)&&eTt(e,t)&&(Ln(e.prev,e,t.prev)||Ln(e,t.prev,t))||KC(e,t)&&Ln(e.prev,e,e.next)>0&&Ln(t.prev,t,t.next)>0)}function Ln(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function KC(e,t){return e.x===t.x&&e.y===t.y}function rde(e,t,i,r){let n=$C(Ln(e,t,i)),s=$C(Ln(e,t,r)),a=$C(Ln(i,r,e)),o=$C(Ln(i,r,t));return!!(n!==s&&a!==o||0===n&&XC(e,i,t)||0===s&&XC(e,r,t)||0===a&&XC(i,e,r)||0===o&&XC(i,t,r))}function XC(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function $C(e){return e>0?1:e<0?-1:0}function Qyt(e,t){let i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&rde(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function $x(e,t){return Ln(e.prev,e,e.next)<0?Ln(e,t,e.next)>=0&&Ln(e,e.prev,t)>=0:Ln(e,t,e.prev)<0||Ln(e,e.next,t)<0}function eTt(e,t){let i=e,r=!1,n=(e.x+t.x)/2,s=(e.y+t.y)/2;do{i.y>s!=i.next.y>s&&i.next.y!==i.y&&n<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next}while(i!==e);return r}function ide(e,t){let i=new zB(e.i,e.x,e.y),r=new zB(t.i,t.x,t.y),n=e.next,s=t.prev;return e.next=t,t.prev=e,i.next=n,n.prev=i,r.next=i,i.prev=r,s.next=r,r.prev=s,r}function Qpe(e,t,i,r){let n=new zB(e,t,i);return r?(n.next=r.next,n.prev=r,r.next.prev=n,r.next=n):(n.prev=n,n.next=n),n}function Kx(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function zB(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function tTt(e,t,i,r){let n=0;for(let s=t,a=i-r;se.toArray())).reduce(((e,t)=>(e.push(...t),e)),[]),i=[];return ede.triangulate(t,[],3).forEach((e=>i.push(e))),i}static arePointsCoplanar(e){if(e.length<4)return!0;let t=e[1].clone().sub(e[0]),i=e[2].clone().sub(e[0]).cross(t).normalize();for(let t=3;trTt)return!1;return!0}static isSelfIntersecting(e){let t=e.map((e=>e.toArray().slice(0,-1)));return(0,nde.default)(t).length>0}},jB=class{constructor(e,t,i,r=jB.DEFAULT_SCALE){this.isExplodeUp=!1,this.scene=e,this.objectId=t,t||console.log(`[EXP] Invalid objectId: ${t}`),this.scale=r,r<=0&&console.log(`[EXP] Invalid scale: ${r}`),i?this.position=i:(this.position=new A,this.getObjectCenter(this.position))}explode(){if(!this.objectId||!this.position||!this.scale)return void console.log(`[EXP] Invalid objectId: ${this.objectId}, or position: ${this.position}, or this.power: ${this.scale}`);let e=this.scene.getObjectById(this.objectId);e&&e.children?(console.log(`[EXP] Exploding ${e.name} at: ${this.position.x}, ${this.position.y}, ${this.position.z}`),this.explodeObject(e)):console.log("[EXP] No children to explode!")}explodeObject(e){e.geometry?this.explodeLeafObject(e):e.children.length>0?e.children.forEach((e=>this.explodeObject(e))):this.explodeLeafObject(e)}explodeLeafObject(e){if(e.geometry){if(e.userData.originalPosition=e.position.clone(),e instanceof rn){let t=new Be,i=new A,r=new Hr,n=new A;for(let s=0;s0?e.children.forEach((e=>this.unexplodeObject(e))):this.unexplodeLeafObject(e)}unexplodeLeafObject(e){let t=e.userData.originalPosition;t&&(e.position.set(t.x,t.y,t.z),e.updateMatrix(),delete e.userData.originalPosition)}setOnlyExplodeUp(e){this.isExplodeUp=e}getObjectCenter(e){let t=new Dt;if(!this.objectId)return void console.log(`[EXP] Invalid objectId: ${this.objectId}`);let i=this.scene.getObjectById(this.objectId);i&&i.children?(i.traverse((e=>{t.expandByObject(e)})),t.getCenter(e)):console.log("[EXP] No children to explode!")}},Zx=jB;Zx.DEFAULT_SCALE=1;var Tn=class{static getVisibleObjectBoundingBox(e){let t=new Dt;return e.traverseVisible((e=>{e instanceof rt&&!1!==e.userData.selectable&&t.expandByObject(e)})),t}static getObjectsBoundingBox(e,t,i){let r=new Dt;return t.forEach((t=>{let n=e.getObjectById(t);if(n){let e=Tn.getBoundingBox(n,i);e.isEmpty()||r.union(e)}})),r}static getBoundingBox(e,t=!0){let i=new Dt;if(e instanceof rn)return Tn.getInstancedMeshBoundingBox(e);if(0===e.children.length)return i.expandByObject(e),i;let r=e.children.length,n=1;r>20&&(n=3),r>100&&(n=5),r>200&&(n=10),r>1e3&&(n=100),e.updateMatrixWorld(!1);for(let s=0;s{i.find((e=>e===n.id))&&(n.children&&1===n.children.length?Tn.explodeObject(n.children[0],e,t,r):Tn.explodeObject(n,e,t,r))})),t}static unexplodeObjects(e,t){e.traverse((e=>{let i=t[e.id];i&&(i.unexplode(),delete t[e.id])}))}static getObjectCenter(e,t){let i=Tn.getBoundingBox(e);i.getCenter(t),t.y=i.min.y}},Yu=class{static setMaterialSection(e,t,i=!1,r=!1){let n=i&&e.clippingPlanes?e.clippingPlanes:[];n.push(...t),e.clippingPlanes=n,e.clipIntersection=r}static removeSection(e){e&&e.traverse((e=>{let t=e.material;Array.isArray(t)?t.forEach((e=>{e.clippingPlanes=void 0})):t&&(t.clippingPlanes=void 0)}))}static addSection(e,t,i=!1,r=!1){e&&e.traverse((e=>{let n=e.material;Array.isArray(n)?n.forEach((e=>{Yu.setMaterialSection(e,t,i,r)})):n&&Yu.setMaterialSection(n,t,i,r)}))}static generateSectionPlanesByBox(e){let t=e.min,i=e.max;return[new bi(new A(0,-1,0),i.y),new bi(new A(0,1,0),-t.y),new bi(new A(1,0,0),-t.x),new bi(new A(-1,0,0),i.x)]}static generateSectionPlanesByPoints(e,t=!0){let i=e.length;if(i<2)return;let r=[];for(let n=0;n-1&&e.splice(i,1)}function nTt(e,t){let i=t.position.distanceTo(e.position),r=0,n=[];for(let i=0,r=e.faces.length;i=0;e--)i.faces[e]&&i.faces[e].hasVertex(r)&&sTt(i.faces[e],t);for(let e=i.faces.length-1;e>=0;e--)i.faces[e].replaceVertex(i,r);ode(i,e);for(let e=0;e0?(new JC).modify(e,i):e}static simplifyPoints(e,t=1){let i=(0,cde.default)(e,t);return this.simplifiedInfo.total+=e.length,this.simplifiedInfo.removed+=e.length-i.length,i}static getNumberOfVerticesToRemove(e,t){let i=0;e instanceof lt&&e.index&&(i=e.attributes.position.count);let r=Math.floor(i*t);return i<20?0:r}};Jx.simplifiedInfo={total:0,removed:0};var $g=class{static createSkyOfGradientRamp(e=4e3,t=32,i=15,r=new A,n=new A(0,.7,.5)){let s=this.COLOR_TEMPLATES.default,a={topColor:{value:new je(s[0])},skylineColor:{value:new je(s[1])},bottomColor:{value:new je(s[2])},offset:{value:400},exponent:{value:.9},skyCenter:{value:r||new A},sunDirection:{value:n.normalize()}},o=new ro(e,t,i),l=new Yt({uniforms:a,vertexShader:this.vertexShader,fragmentShader:this.fragmentShader,side:zn}),h=new rt(o,l);return h.matrixAutoUpdate=!1,h.name=this.NAME,h.userData.selectable=!1,h.layers.set(11),h}static createSkyOfGradientRampByBoundingBox(e){let t=2*(e.max.x-e.min.x+(e.max.y-e.min.y)+(e.max.z-e.min.z));t<$g.MIN_SKY_RADIUS?t=$g.MIN_SKY_RADIUS:t>$g.MAX_SKY_RADIUS&&(t=$g.MAX_SKY_RADIUS);let i=new A;e.getCenter(i);let r=$g.createSkyOfGradientRamp(t,void 0,void 0,i);return r.position.set(i.x,0,i.z),r}static createSkyFromTextures(e){return ht(this,null,(function*(){let t=new Tx;return new Promise((i=>{t.load(e,(e=>i(e)))}))}))}},qo=$g;qo.NAME="SKYBOX",qo.MIN_SKY_RADIUS=4e3,qo.MAX_SKY_RADIUS=2e4,qo.vertexShader="\n varying vec3 vWorldPosition;\n void main() {\n vec4 worldPosition = modelMatrix * vec4( position, 1.0 );\n vWorldPosition = worldPosition.xyz;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",qo.fragmentShader="\n uniform vec3 topColor;\n uniform vec3 skylineColor;\n uniform vec3 bottomColor;\n uniform float offset;\n uniform float exponent;\n uniform vec3 skyCenter;\n uniform vec3 sunDirection;\n varying vec3 vWorldPosition;\n // Used to find the position to draw the sun. Sun size is bigger when this value is smaller\n const float sunDirectionDotThreshold = 0.98;\n\n void main() {\n vec3 position = vec3(vWorldPosition.x - skyCenter.x, vWorldPosition.y - skyCenter.y, vWorldPosition.z - skyCenter.z);\n vec3 normalizedPosition = normalize( position + offset );\n float h = normalizedPosition.y;\n vec3 color;\n if (h > 0.0) {\n color = mix( skylineColor, topColor, pow( h, exponent ) );\n\n // draw the sun\n float dotResult = dot(sunDirection, normalizedPosition);\n if (dotResult > sunDirectionDotThreshold) {\n const float sunSize = 1.0 - sunDirectionDotThreshold; // maximum sun size\n const vec3 sunColor = vec3(1.0, 1.0, 1.0);\n color = mix(color, sunColor, pow((dotResult + sunSize - 1.0) / sunSize, 3.0));\n }\n } else {\n color = mix( skylineColor, bottomColor, pow( -h, exponent ) );\n }\n gl_FragColor = vec4(color , 1.0);\n }",qo.COLOR_TEMPLATES={default:[8828661,16777215,10066329],blueSky:[11189247,16777215,6974058],boardwalk:[14413823,16777215,15459804]};var eA=class extends Fg{constructor(e){super(e),this.type=Uo}parse(e){let t=function(e,t){switch(e){case 1:console.error("THREE.RGBELoader Read Error: "+(t||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(t||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(t||""));break;default:console.error("THREE.RGBELoader: Error: "+(t||""))}return-1},i=function(e,t,i){t=t||1024;let r=e.pos,n=-1,s=0,a="",o=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));for(;0>(n=o.indexOf("\n"))&&s=e.byteLength||!(r=i(e)))return t(1,"no header found");if(!(n=r.match(/^#\?(\S+)/)))return t(3,"bad initial token");for(h.valid|=1,h.programtype=n[1],h.string+=r+"\n";r=i(e),!1!==r;)if(h.string+=r+"\n","#"!==r.charAt(0)){if((n=r.match(s))&&(h.gamma=parseFloat(n[1])),(n=r.match(a))&&(h.exposure=parseFloat(n[1])),(n=r.match(o))&&(h.valid|=2,h.format=n[1]),(n=r.match(l))&&(h.valid|=4,h.height=parseInt(n[1],10),h.width=parseInt(n[2],10)),2&h.valid&&4&h.valid)break}else h.comments+=r+"\n";return 2&h.valid?4&h.valid?h:t(3,"missing image size specifier"):t(3,"missing format specifier")}(s);if(-1!==a){let e=a.width,i=a.height,o=function(e,i,r){let n=i;if(n<8||n>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);if(n!==(e[2]<<8|e[3]))return t(3,"wrong scanline width");let s=new Uint8Array(4*i*r);if(!s.length)return t(4,"unable to allocate buffer space");let a=0,o=0,l=4*n,h=new Uint8Array(4),u=new Uint8Array(l),c=r;for(;c>0&&oe.byteLength)return t(1);if(h[0]=e[o++],h[1]=e[o++],h[2]=e[o++],h[3]=e[o++],2!=h[0]||2!=h[1]||(h[2]<<8|h[3])!=n)return t(3,"bad rgbe scanline format");let i,r=0;for(;r128;if(n&&(i-=128),0===i||r+i>l)return t(3,"bad scanline data");if(n){let t=e[o++];for(let e=0;e{i.load(t,(t=>{if(e){let i=e.fromEquirectangular(t).texture;e.dispose(),r(i)}}))}))}))}static createEnvTextureFromDataArray(e){return ht(this,arguments,(function*(e,t=this.HDR_CITY_STREET_64x32,i=64,r=32){if(e){let n=new Il(t,i,r);n.flipY=!0,n.magFilter=oi,n.minFilter=oi,n.type=Uo,n.version=1;let s=e.fromEquirectangular(n).texture;return e.dispose(),Promise.resolve(s)}return Promise.reject("Invalid pmremGenerator!")}))}};function lTt(){if(wi.isBrowser){let e=document.createElement("div");return e.setAttribute("style","height: 1in; visibility: hidden; position: absolute; margin: 0; padding: 0;"),document.body.appendChild(e),.0254/e.clientHeight}return.0254/96}Nc.HDR_CITY_STREET_64x32=Uint16Array.from([11910,12340,12797,15360,11926,12348,12806,15360,11958,12364,12814,15360,11974,12380,12830,15360,11958,12364,12822,15360,11926,12348,12797,15360,11878,12324,12773,15360,11830,12308,12749,15360,11798,12292,12733,15360,11782,12279,12725,15360,11765,12263,12709,15360,11749,12247,12701,15360,11733,12231,12701,15360,11701,12215,12693,15360,11685,12199,12685,15360,11685,12199,12685,15360,11701,12215,12693,15360,11717,12231,12701,15360,11733,12247,12709,15360,11749,12263,12717,15360,11749,12279,12717,15360,11765,12279,12725,15360,11765,12279,12725,15360,11765,12292,12725,15360,11798,12300,12733,15360,11830,12316,12749,15360,11846,12324,12757,15360,11894,12340,12781,15360,11926,12356,12797,15360,11942,12356,12797,15360,11926,12348,12789,15360,11926,12348,12789,15360,11942,12356,12797,15360,11942,12356,12797,15360,11942,12348,12806,15360,11942,12356,12806,15360,11942,12356,12814,15360,11958,12372,12830,15360,11974,12372,12830,15360,11974,12372,12838,15360,11990,12388,12854,15360,12055,12420,12886,15360,12119,12452,12918,15360,12167,12476,12950,15360,12231,12500,12982,15360,12263,12516,12998,15360,12231,12500,12974,15360,12199,12484,12958,15360,12199,12484,12958,15360,12199,12492,12966,15360,12247,12508,12982,15360,12247,12508,12990,15360,12231,12500,12982,15360,12199,12484,12966,15360,12167,12468,12942,15360,12119,12444,12918,15360,12087,12436,12902,15360,12055,12420,12886,15360,12055,12412,12878,15360,12039,12412,12878,15360,12022,12396,12862,15360,12006,12388,12846,15360,11958,12364,12830,15360,11910,12340,12806,15360,12119,12508,13103,15360,12087,12484,13071,15360,12055,12468,13046,15360,12006,12436,13006,15360,11926,12396,12958,15360,11878,12364,12926,15360,11846,12348,12894,15360,11782,12308,12854,15360,11749,12292,12830,15360,11717,12263,12814,15360,11685,12247,12806,15360,11669,12215,12789,15360,11685,12231,12789,15360,11701,12247,12797,15360,11701,12247,12806,15360,11717,12263,12814,15360,11749,12292,12822,15360,11782,12308,12838,15360,11798,12316,12846,15360,11814,12332,12862,15360,11846,12340,12870,15360,11862,12348,12878,15360,11846,12340,12870,15360,11846,12340,12862,15360,11878,12356,12886,15360,11910,12372,12910,15360,11942,12396,12934,15360,11958,12412,12958,15360,12039,12452,12998,15360,12071,12468,13022,15360,12039,12452,12998,15360,12039,12452,12998,15360,12006,12444,13006,15360,11974,12436,12998,15360,11942,12412,12982,15360,11926,12396,12974,15360,11926,12404,12974,15360,11958,12420,12998,15360,12006,12452,13038,15360,12055,12476,13071,15360,12039,12476,13079,15360,12087,12508,13127,15360,12247,12597,13231,15360,12388,12693,13332,15360,12420,12741,13364,15360,12436,12757,13372,15360,12468,12773,13380,15360,12500,12806,13388,15360,12516,12822,13404,15360,12629,12934,13452,15360,12741,13046,13508,15360,12806,13095,13532,15360,12757,13046,13516,15360,12645,12950,13460,15360,12565,12870,13428,15360,12532,12838,13412,15360,12549,12854,13412,15360,12516,12838,13396,15360,12452,12757,13356,15360,12420,12725,13340,15360,12404,12709,13332,15360,12372,12677,13316,15360,12279,12589,13207,15360,12135,12516,13119,15360,12388,12709,13348,15360,12247,12581,13223,15360,12055,12476,13087,15360,11910,12388,12982,15360,11733,12308,12886,15360,11669,12247,12846,15360,11621,12199,12814,15360,11541,12103,12765,15360,11492,12055,12733,15360,11508,12055,12733,15360,11476,12022,12717,15360,11525,12055,12725,15360,11589,12135,12757,15360,11669,12199,12765,15360,11765,12292,12814,15360,11862,12348,12886,15360,11910,12372,12910,15360,12006,12420,12966,15360,12071,12452,12998,15360,12119,12476,13022,15360,12167,12492,13046,15360,12183,12500,13063,15360,12199,12524,13079,15360,12308,12589,13151,15360,12300,12581,13151,15360,12167,12516,13087,15360,12087,12468,13030,15360,12022,12444,13014,15360,11990,12420,12990,15360,11974,12420,12990,15360,11974,12420,12990,15360,11990,12436,13014,15360,11990,12444,13030,15360,12103,12500,13103,15360,12087,12508,13111,15360,12039,12484,13103,15360,12039,12476,13103,15360,11942,12436,13054,15360,11974,12452,13087,15360,12039,12492,13135,15360,12103,12532,13199,15360,12183,12581,13263,15360,12308,12661,13340,15360,12484,12822,13436,15360,12613,12918,13484,15360,12725,13046,13540,15360,13046,13332,13677,15360,13143,13380,13717,15360,13223,13420,13741,15360,13396,13540,13862,15360,13436,13589,13902,15360,13484,13629,13942,15360,13468,13621,13934,15360,13412,13564,13878,15360,13372,13524,13846,15360,13287,13452,13781,15360,13223,13428,13749,15360,13340,13492,13805,15360,13239,13428,13749,15360,13095,13364,13685,15360,12918,13223,13597,15360,12822,13111,13556,15360,12613,12934,13468,15360,12532,12854,13428,15360,12565,12870,13444,15360,12468,12789,13396,15360,12372,12693,13340,15360,12087,12492,13111,15360,11846,12364,12958,15360,11717,12300,12878,15360,11557,12135,12781,15360,11476,12055,12741,15360,11460,12022,12725,15360,11476,12022,12725,15360,11476,12022,12709,15360,11476,11958,12605,15360,11364,11733,12332,15360,11111,11412,11661,15360,11223,11476,11773,15360,11388,11669,12095,15360,11765,12119,12492,15360,12388,12613,13079,15360,12661,12902,13356,15360,12998,13255,13564,15360,13372,13508,13797,15360,13412,13548,13846,15360,13287,13436,13725,15360,13271,13428,13709,15360,13287,13428,13717,15360,13014,13287,13597,15360,12709,12998,13460,15360,12452,12741,13332,15360,12364,12653,13271,15360,12404,12693,13316,15360,12420,12709,13316,15360,12420,12709,13332,15360,12263,12589,13231,15360,12332,12661,13312,15360,12300,12629,13295,15360,12263,12605,13287,15360,12231,12597,13279,15360,12247,12613,13303,15360,12231,12597,13295,15360,12231,12605,13312,15360,12199,12597,13324,15360,12231,12613,13340,15360,12516,12870,13468,15360,12725,13063,13564,15360,12741,13079,13573,15360,12854,13175,13613,15360,12902,13223,13629,15360,13046,13348,13693,15360,13356,13516,13846,15360,13605,13765,14078,15360,13717,13870,14191,15360,13765,13918,14255,15360,13765,13910,14247,15360,13701,13854,14191,15360,13573,13733,14070,15360,13508,13677,14006,15360,13380,13548,13886,15360,13111,13380,13741,15360,13063,13348,13709,15360,12886,13207,13629,15360,12725,13046,13548,15360,12645,12966,13508,15360,12677,12982,13508,15360,12629,12950,13492,15360,12452,12789,13412,15360,12324,12661,13332,15360,12356,12677,13340,15360,12388,12693,13348,15360,12279,12597,13247,15360,11894,12396,12998,15360,11637,12231,12846,15360,11573,12135,12789,15360,11589,12151,12797,15360,11621,12167,12797,15360,11637,12119,12677,15360,11079,11404,11693,15360,10517,10701,10653,15360,10252,10348,10007,15360,9902,9999,9428,15360,9846,9886,9047,15360,10135,10260,9685,15360,10412,10533,10412,15360,11268,11436,11549,15360,12364,12605,13087,15360,12444,12709,13255,15360,12549,12822,13348,15360,12613,12886,13396,15360,12597,12886,13412,15360,12581,12870,13404,15360,12661,12950,13460,15360,12725,13014,13492,15360,13079,13332,13645,15360,12757,13046,13500,15360,12677,12982,13476,15360,12854,13143,13556,15360,12693,12982,13492,15360,12581,12886,13452,15360,12709,13030,13508,15360,12372,12709,13364,15360,12324,12661,13348,15360,12292,12645,13340,15360,12292,12645,13348,15360,12468,12806,13436,15360,12532,12854,13460,15360,12500,12854,13468,15360,12500,12854,13484,15360,12725,13063,13589,15360,12982,13324,13701,15360,13111,13388,13741,15360,13014,13340,13709,15360,13014,13332,13717,15360,13287,13476,13862,15360,13436,13621,13974,15360,13532,13717,14095,15360,13725,13902,14295,15360,13942,14103,14420,15360,13974,14135,14436,15360,13862,14022,14388,15360,13725,13894,14295,15360,13789,13958,14336,15360,13830,13990,14348,15360,13372,13548,13942,15360,13014,13332,13733,15360,12886,13239,13661,15360,12854,13207,13637,15360,12757,13095,13589,15360,12757,13079,13573,15360,12645,12982,13516,15360,12629,12966,13532,15360,12549,12870,13468,15360,12356,12693,13372,15360,12151,12549,13231,15360,12215,12573,13247,15360,12199,12565,13231,15360,12071,12492,13135,15360,12055,12468,13087,15360,11878,12372,12958,15360,11685,12199,12781,15360,10774,11159,11412,15360,9533,9621,8870,15360,9308,9340,8071,15360,9276,9300,7878,15360,9324,9332,8420,15360,9191,9216,7991,15360,8950,8983,7766,15360,9493,9525,8677,15360,10252,10332,10007,15360,10661,10846,10894,15360,10701,10926,10998,15360,10950,11276,11428,15360,11364,11637,12063,15360,11958,12388,12926,15360,12183,12540,13175,15360,12340,12645,13295,15360,12420,12693,13316,15360,12757,13030,13460,15360,13046,13324,13645,15360,13095,13348,13677,15360,13303,13460,13781,15360,13207,13404,13741,15360,13127,13372,13717,15360,13372,13524,13862,15360,12693,13030,13540,15360,12725,13046,13548,15360,12468,12822,13436,15360,12263,12629,13348,15360,12436,12773,13428,15360,12693,12998,13524,15360,12725,13046,13564,15360,12645,12982,13556,15360,12613,12966,13556,15360,12886,13255,13685,15360,13436,13629,14022,15360,13637,13813,14231,15360,13621,13789,14215,15360,13878,14038,14412,15360,14022,14183,14468,15360,13926,14119,14452,15360,14054,14231,14508,15360,14135,14311,14540,15360,14348,14436,14669,15360,14460,14540,14749,15360,14404,14484,14709,15360,14420,14500,14709,15360,14653,14717,14894,15360,14119,14279,14508,15360,13484,13669,14078,15360,13063,13380,13773,15360,12677,13079,13613,15360,12484,12886,13516,15360,12436,12822,13476,15360,12468,12838,13476,15360,12039,12532,13316,15360,12231,12613,13340,15360,12468,12789,13436,15360,12388,12725,13396,15360,12135,12557,13287,15360,12151,12557,13271,15360,12039,12484,13175,15360,11878,12396,13038,15360,11814,12348,12950,15360,11492,11894,12460,15360,9950,10103,9621,15360,8830,8838,7220,15360,8565,8533,7015,15360,8541,8501,6919,15360,8332,8300,6822,15360,8412,8372,7220,15360,8710,8701,7686,15360,9372,9404,8549,15360,9533,9621,9079,15360,9268,9292,8196,15360,9452,9460,8167,15360,9533,9581,8533,15360,9742,9870,9316,15360,11460,11814,12348,15360,11942,12388,12902,15360,11749,12167,12573,15360,11300,11492,11621,15360,11974,12332,12669,15360,12436,12741,13364,15360,12597,12886,13460,15360,12966,13271,13653,15360,12998,13303,13669,15360,13476,13629,13974,15360,13733,13886,14239,15360,13364,13524,13894,15360,13063,13356,13725,15360,12982,13287,13669,15360,12484,12806,13444,15360,12565,12902,13500,15360,12950,13287,13693,15360,12934,13271,13677,15360,12693,13046,13589,15360,12661,13030,13605,15360,12870,13271,13717,15360,13348,13548,13966,15360,13621,13813,14271,15360,13797,13974,14412,15360,13942,14119,14484,15360,14263,14388,14629,15360,14420,14508,14733,15360,14460,14548,14773,15360,14982,15046,15231,15360,15564,15580,15669,15360,15974,15982,16078,15360,15805,15821,15926,15360,15460,15476,15572,15360,15436,15460,15556,15360,14781,14862,15127,15360,13621,13813,14348,15360,12789,13207,13757,15360,12452,12886,13581,15360,12263,12709,13476,15360,12039,12597,13396,15360,11942,12516,13340,15360,11846,12468,13271,15360,11733,12380,13127,15360,11926,12460,13191,15360,12055,12524,13263,15360,11878,12428,13159,15360,11605,12231,12886,15360,11412,11990,12709,15360,11508,12103,12789,15360,11637,12231,12854,15360,10661,11079,11380,15360,9541,9685,9252,15360,8573,8605,7493,15360,8404,8388,7348,15360,8830,8822,8212,15360,9308,9324,9095,15360,9324,9364,9220,15360,9047,9119,8653,15360,9023,9055,8404,15360,9055,9063,8167,15360,8870,8846,7541,15360,8862,8806,7380,15360,8950,8910,7252,15360,9268,9284,7557,15360,10316,10468,10380,15360,11239,11476,11677,15360,10653,10942,11047,15360,9661,9814,9324,15360,10693,10958,11047,15360,11396,11653,11990,15360,11878,12292,12597,15360,12468,12789,13396,15360,12773,13095,13589,15360,13364,13516,13894,15360,13894,14054,14380,15360,13717,13870,14247,15360,13420,13589,13958,15360,13255,13452,13830,15360,12806,13143,13637,15360,13159,13412,13830,15360,13629,13813,14215,15360,13303,13500,13910,15360,13079,13396,13805,15360,13191,13452,13878,15360,13412,13621,14062,15360,14103,14279,14540,15360,14773,14854,15086,15360,14717,14805,15046,15360,14295,14420,14685,15360,14380,14476,14733,15360,14572,14661,14902,15360,15596,15612,15701,15360,16351,16335,16384,15360,16484,16476,16492,15360,16516,16500,16516,15360,16388,16375,16404,15360,16054,16054,16118,15360,15918,15926,16006,15360,15556,15572,15669,15360,14653,14725,14982,15360,13637,13838,14319,15360,13412,13613,14054,15360,12870,13287,13789,15360,12404,12838,13524,15360,12199,12677,13428,15360,12324,12741,13452,15360,11942,12516,13324,15360,11765,12380,13111,15360,11428,11942,12589,15360,10886,11388,11902,15360,10372,10717,11006,15360,9846,10240,10191,15360,10252,10549,10766,15360,10613,11079,11484,15360,10581,10998,11388,15360,9613,9846,9629,15360,8525,8557,7541,15360,8605,8613,7814,15360,9292,9324,9079,15360,9388,9396,9220,15360,10709,10846,11031,15360,9894,9966,9854,15360,9252,9236,8774,15360,8822,8790,8183,15360,8292,8260,6533,15360,8111,8007,6324,15360,8228,8183,6405,15360,8501,8501,6565,15360,8814,8878,7172,15360,9260,9364,8244,15360,8902,9095,8252,15360,9444,9581,9047,15360,9509,9637,8790,15360,9477,9613,8806,15360,10725,11063,11079,15360,11508,11910,12356,15360,12484,12789,13380,15360,12838,13159,13629,15360,13428,13589,13974,15360,14135,14279,14484,15360,13942,14087,14396,15360,13677,13846,14247,15360,13436,13613,14006,15360,13597,13781,14183,15360,14183,14340,14540,15360,14022,14215,14484,15360,13637,13838,14271,15360,14038,14231,14508,15360,14380,14476,14701,15360,14757,14854,15078,15360,15030,15111,15343,15360,15420,15452,15556,15360,15476,15500,15588,15360,15351,15388,15492,15360,15572,15596,15677,15360,15653,15669,15717,15360,15821,15821,15853,15360,15845,15845,15869,15360,15998,15990,16022,15360,15926,15926,15974,15360,15653,15669,15733,15360,15661,15677,15749,15360,15612,15629,15717,15360,15271,15335,15452,15360,14484,14572,14821,15360,14215,14372,14588,15360,13468,13677,14167,15360,12773,13175,13653,15360,12725,13143,13637,15360,12452,12886,13532,15360,12263,12709,13444,15360,11894,12436,13103,15360,10252,10533,10661,15360,8613,8693,7445,15360,8742,8782,7047,15360,8420,8412,6565,15360,7926,7910,6405,15360,8806,8854,7300,15360,9127,9228,8007,15360,8685,8750,7300,15360,8348,8356,6758,15360,8380,8340,7300,15360,8991,8918,8388,15360,9838,9790,9549,15360,10055,10127,10047,15360,9501,9493,9268,15360,9332,9292,8902,15360,9079,9007,8509,15360,8300,8260,7252,15360,8693,8701,8196,15360,8228,8212,7111,15360,8469,8501,7380,15360,8420,8501,6919,15360,8549,8645,6983,15360,8581,8661,6951,15360,9268,9332,7718,15360,9063,9207,7445,15360,9284,9380,7718,15360,9412,9557,8693,15360,10276,10517,10103,15360,11830,12279,12589,15360,12725,13079,13589,15360,13127,13396,13773,15360,14087,14231,14460,15360,13974,14119,14412,15360,13677,13854,14247,15360,14119,14279,14500,15360,13990,14167,14460,15360,14364,14452,14653,15360,14564,14653,14837,15360,14404,14492,14701,15360,14870,14942,15135,15360,15388,15420,15500,15360,15207,15287,15420,15360,14797,14894,15127,15360,15271,15335,15452,15360,15926,15942,15990,15360,16207,16207,16231,15360,16118,16110,16126,15360,15741,15733,15741,15360,16239,16207,16175,15360,16444,16460,16484,15360,16046,16022,16006,15360,15942,15950,15966,15360,15773,15789,15829,15360,15789,15797,15845,15360,15693,15709,15757,15360,15540,15564,15653,15360,15303,15364,15468,15360,14733,14813,15014,15360,13862,14054,14420,15360,12838,13255,13725,15360,12789,13207,13693,15360,12468,12918,13564,15360,12404,12838,13500,15360,11428,11862,12412,15360,9143,9276,8388,15360,8541,8533,6726,15360,8444,8428,6629,15360,8212,8183,6597,15360,8388,8380,7015,15360,8726,8710,6758,15360,8332,8316,6437,15360,8453,8428,6565,15360,8597,8605,7814,15360,8701,8661,8151,15360,9452,9396,9015,15360,10581,10557,10380,15360,10950,10974,10846,15360,10380,10356,10252,15360,10749,10741,10685,15360,9870,9854,9693,15360,9023,9039,8669,15360,8790,8854,8509,15360,8196,8167,7332,15360,7975,8015,7079,15360,8589,8750,7445,15360,9095,9260,7111,15360,8983,9135,7188,15360,8902,8991,7252,15360,8862,9007,7015,15360,8967,9111,7300,15360,8742,8878,7493,15360,9557,9999,9549,15360,11292,11613,11862,15360,12135,12468,12982,15360,12215,12460,12878,15360,13356,13468,13685,15360,13821,13934,14199,15360,13548,13701,14022,15360,14103,14263,14468,15360,14279,14388,14572,15360,14364,14452,14645,15360,14709,14789,14950,15360,15143,15199,15327,15360,15388,15412,15468,15360,15476,15500,15548,15360,15420,15444,15492,15360,15436,15460,15516,15360,15612,15637,15685,15360,16086,16086,16110,15360,16396,16388,16396,15360,16094,16094,16110,15360,15869,15861,15861,15360,16135,16110,16070,15360,16428,16420,16404,15360,15588,15556,15524,15360,15484,15500,15508,15360,15335,15364,15396,15360,15677,15685,15717,15360,15604,15621,15661,15360,15420,15444,15500,15360,15303,15372,15452,15360,14717,14805,14998,15360,14412,14508,14701,15360,13548,13765,14199,15360,13271,13508,13942,15360,12661,13159,13709,15360,12468,12854,13436,15360,10260,10484,10509,15360,8613,8669,6951,15360,8151,8143,6469,15360,8653,8629,7814,15360,8469,8444,7541,15360,8718,8693,7814,15360,8372,8332,6597,15360,8356,8308,7111,15360,9047,8983,8396,15360,8822,8798,8308,15360,9372,9348,8967,15360,10364,10364,10183,15360,10268,10260,9894,15360,10541,10533,10468,15360,10380,10364,10276,15360,10621,10613,10549,15360,9910,9942,9758,15360,8364,8380,7621,15360,8581,8637,8135,15360,8252,8300,7573,15360,8119,8175,7300,15360,8372,8453,7493,15360,8420,8501,6983,15360,8742,8822,7573,15360,8782,8854,8151,15360,8581,8661,7079,15360,9220,9268,8340,15360,9549,9645,8854,15360,11717,11950,12127,15360,12468,12741,13207,15360,12709,12966,13388,15360,12300,12508,12886,15360,12492,12709,13063,15360,13239,13372,13548,15360,12476,12597,12814,15360,13581,13685,13878,15360,14476,14548,14685,15360,14556,14629,14773,15360,14765,14829,14966,15360,15159,15207,15303,15360,15372,15396,15444,15360,15516,15532,15572,15360,15653,15661,15693,15360,15829,15837,15853,15360,16022,16014,16022,15360,16311,16295,16279,15360,16343,16319,16303,15360,16412,16388,16359,15360,15813,15797,15773,15360,13063,13151,13183,15360,11484,11701,11798,15360,12300,12412,12468,15360,14613,14637,14653,15360,11974,12215,12316,15360,14135,14215,14303,15360,15604,15629,15677,15360,15524,15548,15596,15360,15351,15380,15428,15360,14797,14894,15054,15360,13990,14231,14500,15360,13492,13709,14070,15360,12886,13316,13701,15360,12613,13207,13749,15360,11525,11974,12428,15360,9284,9412,8629,15360,8597,8653,6951,15360,7806,7790,6292,15360,7589,7541,6437,15360,7485,7437,6597,15360,7453,7404,6180,15360,7774,7686,6565,15360,8300,8260,7332,15360,9918,9942,9862,15360,10348,10372,10231,15360,9725,9709,9228,15360,10613,10621,10509,15360,10199,10175,9838,15360,10380,10388,10340,15360,11207,11255,11284,15360,10661,10717,10725,15360,10103,10135,9950,15360,8444,8436,7669,15360,8469,8501,7445,15360,8950,9111,8854,15360,9485,9798,10071,15360,8364,8501,8039,15360,7959,7951,6806,15360,8597,8605,8039,15360,8501,8533,7557,15360,8758,8830,7509,15360,10758,10830,10693,15360,11508,11605,11621,15360,13524,13669,13886,15360,13830,14022,14327,15360,13926,14103,14364,15360,13460,13621,13886,15360,12854,13191,13420,15360,13597,13733,13926,15360,13846,13990,14223,15360,13773,13942,14199,15360,13910,14087,14356,15360,13813,14022,14319,15360,14247,14396,14540,15360,14693,14765,14878,15360,15223,15279,15343,15360,15508,15524,15540,15360,15540,15548,15564,15360,15327,15335,15319,15360,15303,15311,15303,15360,15918,15910,15886,15360,16247,16207,16151,15360,16175,16143,16086,15360,14436,14452,14436,15360,12263,12380,12404,15360,11476,11701,11773,15360,12380,12492,12532,15360,14797,14797,14757,15360,11372,11589,11677,15360,12597,12934,13356,15360,13990,14364,14725,15360,14183,14444,14773,15360,14231,14444,14717,15360,14412,14532,14709,15360,14054,14199,14380,15360,12372,12500,12605,15360,12199,12565,13006,15360,12581,13175,13653,15360,10055,10380,10324,15360,8557,8573,6726,15360,8167,8196,6533,15360,7517,7485,6119,15360,7244,7172,5798,15360,7071,6959,5718,15360,7669,7581,6260,15360,8661,8605,7975,15360,10942,11079,11151,15360,12573,12741,13014,15360,11902,12030,12191,15360,10308,10332,10135,15360,11255,11300,11284,15360,11276,11348,11396,15360,10055,10215,10292,15360,12183,12332,12468,15360,9918,9966,9798,15360,8734,8742,8196,15360,8967,8950,8469,15360,10260,10276,10039,15360,9734,9758,9605,15360,9388,9404,9308,15360,7943,7878,7095,15360,7726,7637,6645,15360,8047,7983,7204,15360,9284,9236,8693,15360,9621,9565,9143,15360,11255,11268,11047,15360,13175,13332,13420,15360,13773,13934,14175,15360,13854,14022,14271,15360,13870,14038,14279,15360,13388,13516,13677,15360,12279,12629,12966,15360,13348,13452,13564,15360,13821,13918,14054,15360,13701,13846,14022,15360,13460,13605,13781,15360,13492,13637,13821,15360,13709,13821,13950,15360,14372,14428,14476,15360,14516,14572,14613,15360,14741,14789,14813,15360,14725,14749,14749,15360,13452,13484,13468,15360,13476,13500,13492,15360,14990,15022,15022,15360,14556,14572,14564,15360,15094,15111,15094,15360,13231,13287,13215,15360,11255,11380,11175,15360,10677,10886,10492,15360,11846,12006,11934,15360,14327,14340,14279,15360,10766,11039,10862,15360,12918,13255,13452,15360,14231,14548,14886,15360,13878,14380,14765,15360,13444,13862,14412,15360,12151,12404,12621,15360,12637,12902,13215,15360,11549,11749,11870,15360,12279,12653,13119,15360,13223,13404,13516,15360,9228,9260,8276,15360,8087,7991,6308,15360,7918,7814,6919,15360,7469,7364,6148,15360,7485,7380,6212,15360,8228,7991,7204,15360,9276,8967,8212,15360,9806,9573,8742,15360,10135,10087,9621,15360,11452,11452,11452,15360,10629,10637,10509,15360,10693,10733,10637,15360,11095,11111,10982,15360,11292,11348,11372,15360,10199,10244,10167,15360,10814,10926,10846,15360,8669,8774,7493,15360,7870,7910,6244,15360,8204,8183,6919,15360,9806,9758,9159,15360,9460,9436,8629,15360,9159,9087,8260,15360,7637,7509,6790,15360,7758,7629,6838,15360,7967,7918,6774,15360,10854,10749,10501,15360,11508,11412,11316,15360,12372,12300,12151,15360,12030,12119,12063,15360,12781,12910,12982,15360,13476,13581,13661,15360,13484,13589,13677,15360,12404,12428,12380,15360,11605,11765,11798,15360,11492,11533,11452,15360,11838,11886,11798,15360,12263,12372,12380,15360,12151,12231,12175,15360,11492,11508,11412,15360,11119,11111,10838,15360,12508,12581,12573,15360,12621,12693,12677,15360,12573,12629,12589,15360,12292,12324,12231,15360,12476,12565,12573,15360,11998,12159,12215,15360,12950,13071,13159,15360,12263,12372,12428,15360,12380,12428,12444,15360,11300,11308,11143,15360,10199,10244,9734,15360,9709,9701,9252,15360,10492,10581,10404,15360,11476,11516,11388,15360,9477,9517,8790,15360,11717,11854,11838,15360,14247,14420,14524,15360,14054,14311,14436,15360,13597,13805,13982,15360,11364,11533,11597,15360,12263,12428,12549,15360,11436,11605,11653,15360,13079,13324,13444,15360,12516,12613,12605,15360,10039,10015,9605,15360,8693,8621,7878,15360,7951,7862,6902,15360,8196,8204,7015,15360,8677,8589,7637,15360,9284,9031,8340,15360,9814,9605,8902,15360,10685,10428,9910,15360,10492,10260,9685,15360,9404,9252,7943,15360,8830,8766,7220,15360,9220,9047,7943,15360,9693,9669,9015,15360,11412,11468,11372,15360,11135,11159,11023,15360,10087,10055,9428,15360,9910,10007,9621,15360,9236,9300,8934,15360,9597,9557,8902,15360,10669,10549,9782,15360,9926,9870,9127,15360,9894,9918,9047,15360,8685,8742,7910,15360,9958,10167,10284,15360,10215,10332,10396,15360,11396,11428,11452,15360,11223,11255,11300,15360,11814,11862,11958,15360,10685,10846,10870,15360,10340,10380,10007,15360,11175,11207,10894,15360,12103,12207,12215,15360,11143,11103,10902,15360,9910,9966,9613,15360,10015,10079,9493,15360,10806,10846,10517,15360,10862,10934,10637,15360,10838,10942,10661,15360,10958,11087,10878,15360,10709,10838,10701,15360,10669,10741,10589,15360,10581,10669,10525,15360,10252,10348,9974,15360,11396,11500,11525,15360,11207,11255,11264,15360,10878,10910,10934,15360,11031,11063,11159,15360,11292,11324,11396,15360,11223,11255,11300,15360,10693,10685,10645,15360,10428,10420,10324,15360,10300,10252,9991,15360,10838,10846,10798,15360,10428,10428,10364,15360,9669,9605,9380,15360,10167,10244,10087,15360,11709,11854,11910,15360,11223,11284,11268,15360,10231,10244,9878,15360,10199,10244,9862,15360,10183,10260,9942,15360,10525,10653,10541,15360,12500,12597,12621,15360,11814,11741,11597,15360,11533,11460,11175,15360,11103,11006,10557,15360,10444,10396,9846,15360,10007,10023,9228,15360,9653,9790,8469,15360,9316,9372,8039,15360,9557,9830,8071,15360,9621,9918,8071,15360,9677,10015,8167,15360,9991,10284,8420,15360,10215,10436,8581,15360,10260,10484,8645,15360,10292,10476,8902,15360,10324,10468,9252,15360,9910,9894,8886,15360,10525,10573,9701,15360,9782,10039,8581,15360,9565,9814,8167,15360,9950,10039,8934,15360,10749,10758,10199,15360,10669,10685,10244,15360,10838,10838,10460,15360,11215,10910,10087,15360,11492,11364,10806,15360,11095,11159,11055,15360,11364,11388,11356,15360,11023,11039,10990,15360,11653,11653,11613,15360,11798,11725,11557,15360,11974,11862,11637,15360,12039,11942,11765,15360,12119,12047,11934,15360,12151,12071,11950,15360,12087,12006,11886,15360,12047,11966,11838,15360,11990,11926,11790,15360,11974,11910,11798,15360,11998,11934,11814,15360,12111,12039,11886,15360,12231,12143,11998,15360,12292,12199,12039,15360,12039,11974,11846,15360,11822,11782,11653,15360,11862,11838,11765,15360,11798,11765,11701,15360,11782,11733,11669,15360,11798,11749,11685,15360,11838,11790,11725,15360,11870,11822,11749,15360,11741,11701,11621,15360,11565,11541,11452,15360,11533,11500,11412,15360,11621,11581,11484,15360,11605,11557,11460,15360,11516,11468,11372,15360,11565,11533,11444,15360,11677,11637,11541,15360,11725,11661,11557,15360,11725,11661,11557,15360,11733,11669,11573,15360,11838,11773,11677,15360,11998,11926,11814,15360,12014,11926,11798,15360,11460,11404,11332,15360,11637,11557,11428,15360,12014,11894,11693,15360,12167,12022,11765,15360,12119,11982,11709,15360,11926,11806,11516,15360,11685,11589,11300,15360,11476,11404,10886,15360,11239,11151,10468,15360,10766,10733,9894,15360,10565,10565,9589,15360,10436,10444,9332,15360,10308,10308,9031,15360,10308,10316,8999,15360,10199,10244,8774,15360,9725,9645,8549,15360,10244,10276,8967,15360,10878,10838,10183,15360,11055,10966,10348,15360,11119,11006,10404,15360,11264,11135,10565,15360,11404,11316,10822,15360,11492,11388,10982,15360,11798,11613,11223,15360,12047,11830,11412,15360,12039,11894,11597,15360,12127,11990,11693,15360,12127,11990,11725,15360,12191,12055,11806,15360,12191,12055,11830,15360,11870,11773,11613,15360,11573,11516,11428,15360,11533,11484,11412,15360,11541,11492,11420,15360,11565,11516,11452,15360,11589,11541,11476,15360,11605,11557,11500,15360,11637,11589,11533,15360,11669,11621,11557,15360,11701,11645,11573,15360,11733,11669,11589,15360,11798,11717,11605,15360,11838,11749,11621,15360,11878,11782,11661,15360,11894,11798,11661,15360,11926,11806,11653,15360,11958,11822,11661,15360,11982,11846,11677,15360,12006,11870,11685,15360,12095,11950,11765,15360,12047,11910,11741,15360,11886,11765,11605,15360,11838,11733,11589,15360,11814,11717,11589,15360,11814,11709,11573,15360,11790,11693,11565,15360,11741,11677,11589,15360,11733,11677,11613,15360,11733,11685,11629,15360,11717,11669,11621,15360,11685,11645,11589,15360,11629,11589,11533,15360,11573,11525,11468,15360,11492,11444,11380,15360,11316,11255,11111,15360,11348,11292,11143,15360,11516,11436,11316,15360,11854,11749,11589,15360,12127,11990,11765,15360,12199,12055,11782,15360,12340,12231,11910,15360,12372,12292,11958,15360,12380,12300,11974,15360,12348,12247,11910,15360,12324,12215,11878,15360,12247,12103,11773,15360,12095,11958,11637,15360,12055,11926,11613,15360,11974,11854,11541,15360,11870,11765,11468,15360,11966,11854,11541,15360,12300,12151,11846,15360,12396,12316,12006,15360,12388,12308,11990,15360,12388,12308,12006,15360,12396,12316,12022,15360,12396,12308,12022,15360,12396,12308,12022,15360,12364,12279,11974,15360,12340,12247,11942,15360,12340,12231,11926,15360,12215,12071,11806,15360,12095,11966,11749,15360,11741,11645,11500,15360,11420,11356,11255,15360,11364,11308,11207,15360,11356,11300,11175,15360,11348,11292,11191,15360,11372,11324,11255,15360,11412,11364,11308,15360,11420,11372,11316,15360,11428,11380,11324,15360,11444,11388,11332,15360,11484,11428,11364,15360,11508,11460,11396,15360,11557,11500,11436,15360,11589,11533,11460,15360,11613,11557,11484,15360,11621,11557,11492,15360,11613,11557,11500,15360,11621,11557,11500,15360,11629,11573,11508,15360,11629,11573,11508,15360,11605,11557,11484,15360,11589,11533,11468,15360,11557,11508,11436,15360,11549,11500,11428,15360,11557,11500,11436,15360,11549,11492,11436,15360,11533,11484,11428,15360,11525,11476,11428,15360,11516,11476,11428,15360,11525,11484,11444,15360,11516,11476,11428,15360,11468,11428,11380,15360,11428,11388,11332,15360,11356,11308,11239,15360,11308,11255,11127,15360,11167,11071,10926,15360,11223,11119,10966,15360,11276,11175,10998,15360,11404,11332,11191,15360,11773,11693,11557,15360,11926,11798,11613,15360,12207,12039,11773,15360,12348,12231,11894,15360,12308,12151,11846,15360,12332,12215,11894,15360,12364,12279,11958,15360,12380,12292,11974,15360,12396,12316,12022,15360,12404,12316,12039,15360,12412,12332,12087,15360,12412,12332,12103,15360,12436,12356,12135,15360,12372,12292,12039,15360,12420,12332,12087,15360,12396,12316,12055,15360,12356,12263,11990,15360,12340,12231,11942,15360,12271,12127,11854,15360,12215,12071,11814,15360,12292,12135,11878,15360,12288,12135,11870,15360,12111,11982,11765,15360,11990,11886,11717,15360,11637,11557,11428,15360,11364,11300,11143,15360,11316,11239,11079,15360,11300,11207,11047,15360,11268,11159,11015,15360,11268,11159,11015,15360,11268,11159,11031,15360,11300,11223,11095,15360,11340,11292,11191,15360,11348,11300,11223,15360,11372,11324,11255,15360,11380,11332,11255,15360,11372,11316,11239,15360,11396,11340,11268,15360,11468,11404,11300,15360,11460,11404,11324,15360,11484,11428,11356,15360,11492,11436,11372,15360,11500,11444,11388,15360,11508,11460,11404,15360,11500,11452,11396,15360,11492,11436,11380,15360,11468,11412,11356,15360,11444,11388,11324,15360,11444,11388,11324,15360,11428,11380,11316,15360,11412,11356,11300,15360,11404,11348,11300,15360,11404,11356,11308,15360,11396,11356,11308,15360,11388,11348,11308,15360,11372,11340,11292,15360,11348,11308,11255,15360,11284,11223,11111,15360,11231,11143,11023,15360,11199,11111,10974,15360,11047,10958,10814,15360,11127,11023,10870,15360,11119,11006,10846,15360,11175,11055,10886,15360,11292,11191,10998,15360,11525,11404,11284,15360,11822,11637,11476,15360,11878,11733,11549,15360,11918,11790,11573,15360,12063,11918,11653,15360,12223,12063,11765,15360,12300,12151,11846,15360,12255,12103,11814,15360,12271,12127,11846,15360,12271,12127,11862,15360,12271,12127,11886,15360,12308,12183,11942,15360,12175,12039,11814,15360,12063,11934,11709,15360,12159,12014,11765,15360,12215,12063,11798,15360,12143,11998,11757,15360,12071,11934,11693,15360,11998,11870,11661,15360,11974,11870,11685,15360,11998,11910,11757,15360,11846,11765,11629,15360,11468,11396,11284,15360,11308,11223,11031,15360,11215,11103,10934,15360,11207,11095,10942,15360,11215,11103,10950,15360,11191,11087,10942,15360,11175,11079,10942,15360,11167,11063,10934,15360,11143,11031,10902,15360,11247,11143,11015,15360,11284,11191,11079,15360,11300,11223,11095,15360,11316,11268,11127,15360,11340,11284,11143,15360,11340,11284,11159,15360,11356,11300,11191,15360,11372,11316,11239,15360,11380,11324,11255,15360,11372,11316,11255,15360,11380,11324,11276,15360,11380,11324,11268,15360,11372,11316,11255,15360,11364,11316,11255,15360,11364,11308,11239,15360,11348,11292,11207,15360,11340,11284,11191,15360,11348,11292,11191,15360,11348,11292,11207,15360,11340,11292,11207,15360,11340,11292,11207,15360,11324,11276,11207,15360,11308,11255,11175,15360,11264,11175,11079,15360,11119,11039,10934,15360,11103,11015,10902,15360,11095,11006,10878,15360,11031,10942,10806,15360,10990,10902,10766,15360,11047,10942,10814,15360,11031,10926,10790,15360,11055,10942,10806,15360,11119,10998,10846,15360,11151,11015,10830,15360,11268,11095,10886,15360,11484,11396,11268,15360,11790,11701,11549,15360,11886,11790,11637,15360,11838,11741,11581,15360,11838,11725,11541,15360,11902,11782,11581,15360,11966,11838,11629,15360,11974,11846,11629,15360,11958,11838,11629,15360,11950,11838,11637,15360,11814,11701,11525,15360,11581,11492,11332,15360,11645,11541,11380,15360,11806,11701,11533,15360,11902,11806,11637,15360,11950,11862,11717,15360,12014,11934,11790,15360,11942,11862,11725,15360,11565,11492,11388,15360,11292,11191,11015,15360,11231,11111,10950,15360,11159,11047,10894,15360,11119,11006,10854,15360,11127,11023,10878,15360,11159,11055,10902,15360,11135,11031,10894,15360,11111,11006,10878,15360,11095,10990,10870,15360,11095,10998,10886,15360,11071,10966,10846,15360,11111,11006,10902,15360,11191,11095,10974,15360,11268,11159,11031,15360,11284,11191,11063,15360,11292,11207,11063,15360,11300,11223,11079,15360,11332,11268,11143,15360,11316,11255,11127,15360,11316,11255,11143,15360,11308,11239,11127,15360,11316,11255,11159,15360,11300,11223,11127,15360,11292,11207,11095,15360,11300,11223,11111,15360,11300,11223,11095,15360,11300,11223,11095,15360,11308,11239,11111,15360,11300,11223,11111,15360,11292,11207,11111,15360,11264,11167,11071,15360,11215,11127,11047,15360,11135,11055,10966,15360,11015,10934,10846,15360,10918,10838,10733,15360,10982,10894,10782,15360,10974,10886,10766,15360,10982,10894,10766,15360,10958,10862,10749,15360,10982,10886,10774,15360,10958,10862,10758,15360,10958,10862,10749,15360,11015,10910,10790,15360,11023,10910,10774,15360,11079,10958,10806,15360,11103,10974,10798,15360,11191,11047,10846,15360,11468,11388,11276,15360,11846,11765,11637,15360,12006,11918,11782,15360,11998,11910,11782,15360,11902,11822,11693,15360,11838,11749,11637,15360,11782,11709,11605,15360,11806,11741,11645,15360,11782,11717,11629,15360,11773,11717,11621,15360,11870,11806,11701,15360,11942,11862,11757,15360,12183,12103,11974,15360,11974,11894,11765,15360,11476,11404,11308,15360,11268,11143,10966,15360,11183,11063,10902,15360,11111,10998,10854,15360,11055,10942,10806,15360,11023,10910,10766,15360,11047,10934,10782,15360,11039,10926,10782,15360,11079,10966,10830,15360,11031,10918,10782,15360,11031,10926,10806,15360,10990,10894,10782,15360,10974,10886,10790,15360,10966,10870,10774,15360,11006,10902,10806,15360,11039,10942,10838,15360,11127,11023,10910,15360,11175,11079,10958,15360,11191,11087,10958,15360,11207,11095,10958,15360,11268,11143,11015,15360,11276,11175,11047,15360,11284,11191,11079,15360,11292,11191,11079,15360,11276,11175,11079,15360,11239,11135,11031,15360,11268,11159,11047,15360,11215,11111,11006,15360,11239,11127,11015,15360,11255,11143,11031,15360,11223,11119,11015,15360,11199,11103,10998,15360,11175,11087,10982,15360,11143,11047,10958,15360,11031,10942,10854,15360,10958,10878,10790,15360,10910,10830,10741,15360,10942,10862,10758,15360,10926,10838,10733,15360,10854,10758,10637,15360,10918,10830,10709,15360,10910,10822,10717,15360,10942,10846,10749,15360,10942,10854,10741,15360,10942,10854,10749,15360,10966,10870,10758,15360,10966,10870,10758,15360,10958,10854,10733,15360,10998,10886,10741,15360,10942,10830,10677,15360,11039,10918,10749,15360,11095,10974,10806,15360,11308,11223,11031,15360,11468,11396,11292,15360,11605,11533,11428,15360,11701,11621,11525,15360,11693,11629,11541,15360,11685,11621,11549,15360,11685,11629,11549,15360,11629,11565,11484,15360,11589,11533,11444,15360,11364,11308,11191,15360,11191,11087,10958,15360,11135,11031,10902,15360,11135,11031,10894,15360,11055,10950,10830,15360,11015,10910,10782,15360,10958,10854,10733,15360,10942,10838,10717,15360,10974,10870,10733,15360,10982,10878,10749,15360,10990,10886,10758,15360,11015,10910,10798,15360,10966,10862,10758,15360,10950,10854,10758,15360,10910,10822,10733,15360,10894,10798,10709,15360,10902,10814,10725,15360,10934,10846,10758,15360,10910,10822,10733,15360,10950,10854,10749,15360,10974,10878,10766,15360,11047,10942,10830,15360,11095,10990,10878,15360,11167,11055,10942,15360,11199,11103,10990,15360,11191,11087,10982,15360,11151,11047,10950,15360,11135,11031,10934,15360,11095,10998,10902,15360,11143,11047,10950,15360,11079,10990,10894,15360,11079,10990,10902,15360,11103,11006,10910,15360,11079,10982,10886,15360,11023,10926,10822,15360,10982,10894,10798,15360,10958,10870,10782,15360,10910,10814,10725,15360,10926,10838,10741,15360,10934,10838,10733,15360,10950,10854,10749,15360,10886,10798,10709,15360,10910,10814,10709,15360,10926,10830,10725,15360,10910,10814,10701,15360,10862,10774,10677,15360,10950,10854,10733,15360,10926,10830,10717,15360,10926,10838,10725,15360,10926,10830,10725,15360,10894,10798,10685,15360,10926,10830,10701,15360,10958,10854,10717,15360,10934,10830,10685,15360,10950,10846,10709,15360,10974,10862,10717,15360,10942,10830,10685,15360,10958,10846,10701,15360,11006,10894,10749,15360,10950,10846,10725,15360,10958,10862,10741,15360,10894,10806,10701,15360,10854,10774,10669,15360,10886,10806,10701,15360,10862,10790,10693,15360,10878,10806,10717,15360,10982,10902,10798,15360,10990,10902,10798,15360,10950,10862,10758,15360,10942,10846,10733,15360,10870,10774,10669,15360,10894,10798,10693,15360,10918,10830,10725,15360,10894,10806,10701,15360,10926,10830,10733,15360,10902,10830,10725,15360,10870,10790,10693,15360,10886,10814,10725,15360,10814,10741,10661,15360,10838,10766,10677,15360,10822,10741,10661,15360,10822,10741,10669,15360,10862,10790,10709,15360,10846,10758,10669,15360,10894,10798,10693,15360,10974,10878,10766,15360,10966,10870,10766,15360,11023,10926,10814,15360,11079,10974,10862,15360,11006,10910,10814,15360,10950,10862,10766,15360,10982,10894,10798,15360,10958,10862,10774,15360,10958,10870,10782,15360,10910,10830,10741,15360,10950,10862,10766,15360,10982,10886,10790,15360,10918,10822,10725,15360,10886,10798,10701,15360,10854,10766,10669,15360,10894,10806,10709,15360,10926,10830,10725,15360,10926,10830,10725,15360,10958,10862,10749,15360,10958,10862,10749,15360,10894,10806,10717,15360,10902,10814,10717,15360,10878,10790,10677,15360,10942,10838,10717,15360,10918,10814,10701,15360,10886,10790,10661,15360,10942,10838,10717,15360,10950,10854,10725,15360,10950,10854,10725,15360,10910,10814,10693,15360,10910,10814,10685,15360,10942,10838,10709,15360,10894,10790,10661,15360,10910,10806,10669,15360,10822,10725,10597,15360,10749,10661,10541,15360,10830,10733,10613,15360,10838,10741,10629,15360,10806,10709,10597,15360,10854,10766,10653,15360,10862,10774,10669,15360,10798,10725,10629,15360,10822,10749,10653,15360,10854,10782,10693,15360,10806,10741,10661,15360,10862,10790,10701,15360,10870,10790,10685,15360,10870,10790,10693,15360,10878,10790,10677,15360,10862,10782,10677,15360,10870,10790,10693,15360,10870,10782,10685,15360,10894,10814,10709,15360,10886,10814,10709,15360,10846,10782,10685,15360,10741,10669,10573,15360,10766,10693,10589,15360,10709,10637,10541,15360,10741,10669,10589,15360,10741,10677,10589,15360,10709,10637,10557,15360,10774,10701,10613,15360,10862,10774,10677,15360,11006,10918,10806,15360,11006,10902,10782,15360,10974,10870,10749,15360,10958,10854,10733,15360,10934,10838,10725,15360,10934,10838,10733,15360,10934,10838,10725,15360,10886,10790,10685,15360,10854,10766,10661,15360,10886,10798,10701,15360,10838,10749,10645,15360,10878,10782,10661,15360,10822,10725,10613,15360,10822,10717,10605,15360,10846,10749,10629,15360,10854,10749,10637,15360,10950,10854,10733,15360,10958,10854,10741,15360,10910,10806,10693,15360,10926,10822,10693,15360,10934,10838,10725,15360,10910,10822,10709,15360,10910,10822,10709,15360,10886,10782,10661,15360,10910,10814,10677,15360,10910,10806,10677,15360,10926,10822,10685,15360,10958,10854,10717,15360,10974,10870,10725,15360,10926,10830,10693,15360,10926,10830,10693,15360,10918,10822,10693,15360,10934,10838,10701,15360,10918,10814,10685,15360,10878,10782,10653,15360,10870,10774,10645,15360,10838,10749,10629,15360,10806,10717,10605,15360,10822,10733,10621,15360,10822,10733,10621,15360,10846,10758,10653,15360,10846,10766,10653,15360,10822,10741,10629,15360,10806,10733,10629,15360,10806,10725,10621,15360,10790,10709,10605,15360,10766,10693,10589,15360,10814,10741,10629,15360,10846,10766,10653,15360,10838,10758,10653,15360,10878,10790,10677,15360,10894,10798,10685,15360,10830,10741,10629,15360,10830,10758,10653,15360,10798,10725,10629,15360,10806,10733,10629,15360,10717,10637,10525,15360,10661,10581,10476,15360,10701,10621,10517,15360,10733,10661,10565,15360,10782,10685,10557,15360,10862,10758,10613,15360,10974,10862,10725,15360,10958,10846,10709,15360,11006,10902,10766,15360,11006,10902,10774,15360,11039,10934,10814,15360,11006,10902,10790,15360,11006,10910,10790,15360,10950,10854,10741,15360,10934,10830,10709,15360,10918,10814,10701,15360,10854,10758,10653,15360,10918,10814,10701,15360,10870,10766,10645,15360,10830,10733,10621,15360,10934,10830,10709,15360,10990,10886,10758,15360,10950,10838,10717,15360,10910,10814,10701,15360,10926,10822,10693,15360,10934,10830,10709,15360,10878,10774,10653,15360,10934,10830,10701,15360,10926,10822,10693,15360,10878,10782,10661,15360,10878,10782,10661,15360,10862,10766,10621,15360,10886,10782,10645,15360,10886,10782,10653,15360,10926,10822,10701,15360,10902,10806,10685,15360,10926,10822,10701,15360,10918,10814,10685,15360,10878,10782,10645,15360,10910,10806,10669,15360,10854,10758,10621,15360,10886,10790,10645,15360,10854,10758,10629,15360,10830,10741,10613,15360,10918,10814,10685,15360,10862,10766,10645,15360,10830,10741,10613,15360,10806,10717,10597,15360,10741,10661,10557,15360,10774,10693,10581,15360,10749,10669,10557,15360,10774,10693,10581,15360,10766,10685,10573,15360,10790,10709,10597,15360,10782,10701,10589,15360,10790,10709,10597,15360,10838,10749,10621,15360,10870,10774,10645,15360,10894,10790,10661,15360,10878,10782,10653,15360,10846,10741,10613,15360,10790,10693,10557,15360,10814,10717,10597,15360,10790,10701,10581,15360,10741,10645,10525,15360,10717,10629,10509,15360,10774,10685,10573,15360,10725,10637,10525,15360,10854,10749,10621,15360,10950,10846,10701,15360,10966,10854,10709,15360,10934,10814,10677,15360,10926,10822,10701,15360,10982,10878,10766,15360,10998,10894,10782,15360,10990,10878,10766,15360,10998,10894,10782,15360,10998,10886,10774,15360,10998,10886,10758,15360,11006,10894,10774,15360,10942,10838,10733,15360,10958,10854,10741,15360,10958,10854,10749,15360,11006,10902,10790,15360,11015,10902,10798,15360,10982,10870,10758,15360,10998,10894,10782,15360,10974,10870,10758,15360,11006,10902,10790,15360,10998,10894,10774,15360,10974,10870,10758,15360,10950,10854,10741,15360,10878,10790,10693,15360,10902,10814,10701,15360,10918,10822,10709,15360,10838,10733,10613,15360,10878,10782,10661,15360,10934,10838,10717,15360,10902,10806,10693,15360,10918,10822,10709,15360,10926,10830,10709,15360,10838,10733,10605,15360,10910,10806,10661,15360,10942,10838,10693,15360,10886,10782,10645,15360,10886,10782,10637,15360,10854,10749,10621,15360,10926,10830,10709,15360,10966,10862,10741,15360,10846,10749,10629,15360,10830,10733,10605,15360,10854,10758,10637,15360,10822,10725,10605,15360,10886,10790,10661,15360,10902,10806,10669,15360,10918,10814,10677,15360,10830,10733,10605,15360,10806,10717,10589,15360,10870,10774,10645,15360,10934,10838,10709,15360,10958,10862,10733,15360,10886,10790,10661,15360,10894,10798,10661,15360,10958,10854,10709,15360,10934,10830,10709,15360,10814,10717,10581,15360,10862,10758,10613,15360,10854,10741,10589,15360,10814,10717,10573,15360,10886,10782,10645,15360,10814,10725,10597,15360,10862,10766,10637,15360,10910,10806,10669,15360,10942,10838,10709,15360,10966,10862,10733,15360,10974,10870,10741,15360,10974,10870,10749,15360,10958,10862,10749,15360,11031,10934,10822,15360,10998,10894,10782,15360,10974,10870,10766,15360,11023,10918,10814,15360,11039,10926,10822,15360,10958,10846,10741,15360,10918,10814,10693,15360,10966,10870,10741,15360,10982,10886,10766,15360,10982,10878,10766,15360,10942,10846,10733,15360,10958,10862,10758,15360,10950,10854,10758,15360,10934,10830,10717,15360,10966,10862,10733,15360,10942,10846,10725,15360,10934,10846,10733,15360,10934,10846,10733,15360,10878,10798,10693,15360,10886,10798,10693,15360,10910,10814,10709,15360,10942,10846,10733,15360,10838,10733,10597,15360,10878,10774,10645,15360,10918,10822,10701,15360,10878,10782,10653,15360,10894,10790,10661,15360,10934,10838,10725,15360,10958,10854,10725,15360,10966,10862,10733,15360,10910,10806,10685,15360,10982,10878,10758,15360,10942,10854,10749,15360,10934,10838,10733,15360,10918,10814,10701,15360,10894,10798,10669,15360,10894,10798,10669,15360,10814,10725,10605,15360,10902,10798,10669,15360,10814,10725,10605,15360,10894,10798,10685,15360,10958,10862,10749,15360,10910,10814,10701,15360,10910,10806,10685,15360,10918,10814,10693,15360,10926,10822,10709,15360,10894,10790,10661,15360,10902,10806,10677,15360,10902,10806,10685,15360,10934,10838,10717,15360,10934,10838,10701,15360,10934,10838,10717,15360,10950,10854,10725,15360,10894,10798,10661,15360,10862,10749,10597,15360,10894,10798,10677,15360,10878,10782,10661,15360,10926,10838,10717,15360,10926,10838,10717,15360,10918,10822,10709,15360,10934,10838,10733,15360,10926,10838,10733,15360,10958,10870,10766,15360,10942,10854,10749,15360,10958,10870,10774,15360,10974,10878,10774,15360,10958,10854,10741,15360,10950,10846,10741,15360,10950,10854,10758,15360,10934,10838,10733,15360,10942,10846,10725,15360,10966,10862,10741,15360,10926,10838,10733,15360,10958,10862,10749,15360,10910,10822,10709,15360,10942,10854,10758,15360,10926,10838,10733,15360,10910,10822,10717,15360,10934,10838,10733,15360,10934,10846,10733,15360,10902,10814,10709,15360,10926,10830,10717,15360,10918,10822,10709,15360,10838,10749,10637,15360,10878,10790,10677,15360,10942,10846,10733,15360,10926,10822,10701,15360,10958,10862,10749,15360,10886,10790,10685,15360,10918,10814,10693,15360,10910,10814,10693,15360,10902,10806,10701,15360,10878,10774,10637,15360,10798,10693,10565,15360,10822,10725,10597,15360,10934,10838,10709,15360,10958,10854,10725,15360,10886,10790,10669,15360,10910,10806,10677,15360,10886,10782,10645,15360,10830,10725,10597,15360,10822,10717,10581,15360,10862,10758,10637,15360,10878,10782,10669,15360,10926,10822,10709,15360,10974,10878,10774,15360,10966,10870,10758,15360,10918,10822,10709,15360,10846,10749,10645,15360,10894,10798,10693,15360,10918,10822,10709,15360,10974,10878,10774,15360,10918,10822,10717,15360,10982,10886,10774,15360,10974,10878,10758,15360,10950,10854,10741,15360,10958,10854,10725,15360,10982,10886,10766,15360,10918,10822,10701,15360,10878,10782,10669,15360,10886,10790,10669,15360,10934,10838,10717,15360,10950,10854,10741,15360,10934,10838,10733,15360,10982,10886,10782,15360,10886,10798,10701,15360,10870,10782,10685,15360,10894,10814,10717,15360,10910,10822,10725,15360,10934,10838,10733,15360,10950,10846,10741,15360,10934,10838,10725,15360,10934,10846,10749,15360,10902,10814,10717,15360,10878,10790,10677,15360,10878,10782,10669,15360,10854,10766,10645,15360,10838,10749,10629,15360,10902,10814,10701,15360,10910,10814,10693,15360,10902,10798,10669,15360,10910,10806,10677,15360,10886,10782,10653,15360,10854,10749,10629,15360,10870,10774,10653,15360,10974,10870,10758,15360,10990,10878,10758,15360,10918,10822,10709,15360,10926,10838,10725,15360,10958,10854,10733,15360,10894,10790,10653,15360,10822,10725,10605,15360,10878,10782,10661,15360,10974,10870,10749,15360,10902,10806,10677,15360,10934,10838,10725,15360,10870,10774,10653,15360,10798,10701,10581,15360,10854,10749,10621,15360,10894,10798,10669,15360,10934,10822,10685,15360,10942,10830,10701,15360,10910,10806,10669,15360,10870,10758,10629,15360,10886,10774,10645,15360,10950,10838,10701,15360,10966,10870,10749,15360,10886,10790,10685,15360,10870,10782,10677,15360,10934,10838,10733,15360,10934,10838,10725,15360,10822,10725,10621,15360,10878,10790,10677,15360,10894,10798,10693,15360,10822,10733,10629,15360,10894,10798,10685,15360,10998,10902,10790,15360,11015,10918,10806,15360,10950,10854,10741,15360,10950,10846,10741,15360,10934,10838,10733,15360,10942,10846,10749,15360,10910,10822,10725,15360,10846,10758,10653,15360,10878,10790,10685,15360,10894,10798,10701,15360,10862,10774,10669,15360,10814,10725,10621,15360,10846,10758,10645,15360,10870,10774,10661,15360,10870,10774,10677,15360,10878,10790,10693,15360,10878,10782,10677,15360,10830,10741,10637,15360,10870,10782,10677,15360,10966,10870,10766,15360,11015,10918,10814,15360,10910,10814,10701,15360,10942,10846,10725,15360,10950,10846,10725,15360,10942,10838,10725,15360,10934,10830,10701,15360,10910,10798,10677,15360,10886,10782,10653,15360,10838,10733,10597,15360,10902,10806,10669,15360,10830,10733,10613,15360,10838,10741,10621,15360,10838,10741,10621,15360,10894,10798,10669,15360,10934,10830,10685,15360,10886,10790,10669,15360,10902,10806,10685,15360,10854,10749,10637,15360]);var ude={file:1,m:1,mm:.001,cm:.01,ft:.3048,in:.0254,pt:lTt()},cTt={file:"m",m:"m",mm:"mm",cm:"cm",ft:"ft",in:"in",pt:"pt"},hde=e=>2===e?"²":3===e?"³":"",Qx=(e,t=1)=>cTt[e]+hde(t),YYt=(e,t,i,r=1)=>(null==i&&(i=t),i===t?{value:e,unit:Qx(i)}:{value:e*Math.pow(ude[t]/ude[i],r),unit:Qx(i)+hde(r)}),YB=(e=>(e.Top="Top",e.Bottom="Bottom",e.Front="Front",e.Back="Back",e.Left="Left",e.Right="Right",e))(YB||{}),tA=class{static getCameraPositionByBboxAndView(e,t,i,r,n){let s=tA.getCameraDirectionByView(t);return this.getCameraPositionByBboxAndDirection(e,i,r,n,s)}static getCameraPositionByBboxAndDirection(e,t,i,r,n){if(e.isEmpty()||!r)return;let s=new A,a=new A,o=new A(0,1,0);e.getSize(a),e.getCenter(s);let l,h,u=(a.x+a.y+a.z)/3*1.5;if(!n||null!=n&&n.equals(new A))l=new A(s.x+u,s.y+u/1.5,s.z+u),h=l.clone().sub(s);else{let e=new A(u,u/1.5,u).length();h=new A(-n.x,-n.y,-n.z).normalize().multiplyScalar(e),l=h.clone().add(s)}u=h.length(),h=h.normalize();let c=new Be;c.lookAt(l,s,o);let p=new Be;p.makeTranslation(-l.x,-l.y,-l.z);let d=e.clone().applyMatrix4(p).applyMatrix4(c.invert()).applyMatrix4(r),f=Math.max(Math.abs(d.max.x),Math.abs(d.min.x)),m=Math.max(Math.abs(d.max.y),Math.abs(d.min.y));u*=1.1*Math.sqrt(Math.pow(f,2)+Math.pow(m,2)),l=h.multiplyScalar(u).add(s),i.set(s.x,s.y,s.z),t.set(l.x,l.y,l.z)}static getCameraDirectionByView(e){let t=new A(1,0,0);return"Top"===e?t.set(0,-1,0):"Bottom"===e?t.set(0,1,0):"Front"===e?t.set(0,0,-1):"Back"===e?t.set(0,0,1):"Left"===e?t.set(1,0,0):"Right"===e&&t.set(-1,0,0),t}static sleep(e){return ht(this,null,(function*(){let t;return new Promise((i=>{t=setTimeout((()=>{i("")}),e)})).then((()=>{clearTimeout(t)}))}))}static twinkle(e,t=500){return ht(this,null,(function*(){let i=tA.twinklingObjectIds;i[e.id]||(i[e.id]=!0,e.visible=!e.visible,yield this.sleep(t),e.visible=!e.visible,yield this.sleep(t),e.visible=!e.visible,yield this.sleep(t),e.visible=!e.visible,yield this.sleep(t),e.visible=!e.visible,yield this.sleep(t),e.visible=!e.visible,delete i[e.id])}))}},xs=tA;xs.twinklingObjectIds={};var uTt=!1,Aa=class extends Ks{constructor(e){super(),this.DEFAULT_LINE_WIDTH=1,this.DEFAULT_STROKE_STYLE="#000000",this.DEFAULT_FILL_STYLE="#000000",this.lineWidth=this.DEFAULT_LINE_WIDTH,this.lineColor=this.DEFAULT_STROKE_STYLE,this.fillColor=this.DEFAULT_FILL_STYLE,this.x=0,this.y=0,this.points=[],this.userData={},this.width=0,this.height=0,this.tolerance=1,this.visible=!0,this.selected=!1,this.needsFrustumCulled=!0,this.editPointSize=3,this.editPointColor="#ffffff",this.matrix=new Be,this.id=e||_t.guid()}setTolerance(e){this.tolerance=e}render(e,t){this.ctx=e,this.draw(e,t),this.selected&&this.drawSelect(e,t),uTt&&(this.drawBounds(e,t),this.drawCenter(e,t))}getData(){return{id:this.id,points:this.points.map((e=>[e.x,e.y])),lineWidth:this.lineWidth,lineColor:this.lineColor,fillColor:this.fillColor,type:this.getClassType()}}setData(e){this.id=e.id,this.setLineWidth(e.lineWidth),this.setLineColor(e.lineColor),this.setFillColor(e.fillColor)}getVertexs(){return[new A(this.x,this.y,0),new A(this.x+this.width,this.y,0),new A(this.x+this.width,this.y+this.height,0),new A(this.x,this.y+this.height,0)]}setLineWidth(e){this.lineWidth=e||this.DEFAULT_LINE_WIDTH}setLineColor(e){this.lineColor=e||this.DEFAULT_STROKE_STYLE}setFillColor(e){this.fillColor=e||this.DEFAULT_FILL_STYLE}isSelected(){return this.selected}getCenter(){return this.getBounds().getCenter(new A)}transToScreenCoord(e,t){return this.ctx?Ci.worldPosition2ScreenPoint(e,t,this.ctx.canvas):new le}drawBounds(e,t){let{min:i,max:r}=this.getBounds(),n=[],s=(e,t,i)=>n.push(new A(e,t,i));s(r.x,r.y,r.z),s(i.x,r.y,r.z),s(i.x,i.y,r.z),s(r.x,i.y,r.z),s(r.x,r.y,i.z),s(i.x,r.y,i.z),s(i.x,i.y,i.z),s(r.x,i.y,i.z),s(i.x,r.y,r.z),s(i.x,i.y,r.z),s(r.x,r.y,r.z),s(r.x,i.y,r.z),s(r.x,r.y,i.z),s(r.x,i.y,i.z),s(i.x,r.y,i.z),s(i.x,i.y,i.z),s(i.x,r.y,r.z),s(i.x,r.y,i.z),s(r.x,r.y,r.z),s(r.x,r.y,i.z),s(i.x,i.y,r.z),s(i.x,i.y,i.z),s(r.x,i.y,r.z),s(r.x,i.y,i.z),e.save(),e.strokeStyle="yellow",e.beginPath(),n.forEach(((i,r)=>{let n=this.transToScreenCoord(i,t);r%2==0?e.moveTo(n.x,n.y):e.lineTo(n.x,n.y)})),e.closePath(),e.stroke(),e.restore()}drawCenter(e,t){let i=this.transToScreenCoord(this.getCenter(),t);e.save(),e.fillStyle="yellow",e.beginPath(),e.arc(i.x,i.y,5,0,2*Math.PI),e.closePath(),e.fill(),e.restore()}getBounds(){let e=this.getVertexs();return(new Dt).setFromPoints(e)}},Kg=(e=>(e.LayoutChanged="LayoutChanged",e.ModelLoaded="ModelLoaded",e.RenderAfter="RenderAfter",e.CameraChanged="CameraChanged",e))(Kg||{}),pde={},wr=class extends Ks{constructor(e){super(),this.drawableLists=[],this.frustum=new Xs,this.projScreenMatrix=new Be,this.viewer=e,this.init()}static _registerDrawableClass(e){pde[e.prototype.getClassType()]=e}static createDrawable(e){let t=pde[e.type];if(!t)throw new Error(`Invalid drawable type: ${t}`);let i=e.points.map((e=>new A(e[0],e[1],e[2]||0))),r=new t(e.id,i);return r.setData(e),r}get container(){return this.viewer.viewerContainer}get camera(){return this.viewer.camera}get raycaster(){return this.viewer.getRaycaster()}getPixelSize(e,t){if(!this.canvas)return 1;let{clientWidth:i,clientHeight:r}=this.canvas,n=0;if("OrthographicCamera"===t.type){let s=t;n=e*Math.max(s.right-s.left,s.top-s.bottom)/s.zoom/Math.max(i,r)}else if("PerspectiveCamera"===t.type){let i=t,s=this.viewer.cameraCfg,a=s&&_t.arrayToVector3(s.eye),o=s&&_t.arrayToVector3(s.look);n=2*e*(a.distanceTo(o)*Math.tan(i.fov/2*Math.PI/180))/r}return n}init(){this.initCanvas(),this.viewer.addEventListener("RenderAfter",(()=>{this.projScreenMatrix.multiplyMatrices(this.camera.projectionMatrix,this.camera.matrixWorldInverse),this.frustum.setFromProjectionMatrix(this.projScreenMatrix),this.render()}))}initCanvas(){let e=this.viewer.getViewConfig();if(wi.isBrowser&&!e.context2d){let e=this.canvas=document.createElement("canvas"),t=this.viewer.viewerContainer;t.appendChild(e),e.classList.add("overlay-renderer"),e.style.pointerEvents="none",e.style.position="absolute",e.style.left="0px",e.style.top="0px",e.style.userSelect="none",this.context=e.getContext("2d",{willReadFrequently:!0});let{clientWidth:i,clientHeight:r}=t;this.setSize(i,r)}else e.context2d&&(this.context=e.context2d,this.canvas=wi.creatReactNativeCanvas(this.context),this.context.canvas||(this.context.canvas=this.canvas))}toHighDpr(e,t,i){let r=Math.max(window.devicePixelRatio||1,1),n=this.canvas;return n.width=t*r,n.height=i*r,e.scale(r,r),n.style.width=`${t}px`,n.style.height=`${i}px`,e}clearCanvas(){var e,t,i;null==(i=this.context)||i.clearRect(0,0,null==(e=this.canvas)?void 0:e.width,null==(t=this.canvas)?void 0:t.height)}addDrawableList(e){this.drawableLists.push(e)}render(){if(!this.canvas||!this.context)return;this.clearCanvas();let e=this.getSortedDrawables(),t=new Wi;for(let i=0;i{e.push(...Array.from(t.getDrawables().values()))})),e.sort(((e,t)=>t.getCenter().distanceTo(this.camera.position)-e.getCenter().distanceTo(this.camera.position))),e}getDrawablesByPosition(e,t){let i=this.getSortedDrawables().reverse(),r=[];for(let n=0;ne.clear())),this.drawableLists=[],this.canvas&&(null==(e=this.viewer.viewerContainer)||e.removeChild(this.canvas),this.canvas=void 0)}},Xu=class{constructor(e){this.drawableMap=new Map,this.category=e}addDrawable(e){this.drawableMap.set(e.id,e)}updateDrawable(e,t){e.setData(t)}removeDrawable(e){this.drawableMap.delete(e.id)}getDrawableById(e){return this.drawableMap.get(e)}clear(){this.drawableMap.clear()}getDrawables(){return this.drawableMap}getDrawableDatas(){return Array.from(this.drawableMap).map((([e,t])=>t.getData()))}setDrawableDatas(e){for(let t=0;t{let r=this.transToScreenCoord(i,t);e.moveTo(r.x,r.y),e.arc(r.x,r.y,this.editPointSize,0,2*Math.PI)})),e.closePath(),e.fill(),e.restore()}setEditPointSize(e){this.editPointSize=e}setEditPointColor(e){this.editPointColor=e}getCenter(){return this.getBounds().getCenter(new A)}isPointInPath(e){let t=this.getVertexs().map((e=>new le(e.x,e.y)));return kt.isPointInPolygon(new le(e.x,e.y),t,!0)}setData(e){super.setData(e),this.update(e.points.map((e=>new A(e[0],e[1],0))))}translate(e,t){let i=new A(e,t,0);return this.points.forEach((e=>e.add(i))),this.update(this.points),this}rotate(){return this}scale(){return this}},Yo=(e=>(e.Arrow="ArrowMarkup",e.Circle="CircleMarkup",e.CloudLine="CloudLineMarkup",e.CloudLineRectangle="CloudRectMarkup",e.Dot="DotMarkup",e.Ellipse="EllipseMarkup",e.PolyLine="PolylineMarkup",e.Rectangle="RectMarkup",e.Text="TextMarkup",e.X="XMarkup",e))(Yo||{}),XB=class extends Wn{constructor(e,t){super(e),this.type="ArrowMarkup",this.update(t)}draw(e,t){let i=this.points.map((e=>this.transToScreenCoord(e,t)));this.drawArrowLine(e,i),this.drawArrowHead(e,i[0],i[1],this.lineWidth+10,this.lineWidth+20)}drawArrowLine(e,t){e.save(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor;let[i,r]=t,n=(new le).subVectors(r,i).normalize();e.beginPath(),e.moveTo(i.x,i.y);let s=r.clone().sub(n.multiplyScalar(this.lineWidth+5));e.lineTo(s.x,s.y),e.closePath(),e.stroke(),e.restore()}drawArrowHead(e,t,i,r,n){let s=180*Math.atan2(t.y-i.y,t.x-i.x)/Math.PI,a=(s+r)*Math.PI/180,o=(s-r)*Math.PI/180,l=n*Math.cos(a),h=n*Math.sin(a),u=n*Math.cos(o),c=n*Math.sin(o),p=new le(i.x+l,i.y+h),d=new le(i.x+u,i.y+c);e.save(),e.fillStyle=this.lineColor,e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(p.x,p.y),e.lineTo(d.x,d.y),e.closePath(),e.fill(),e.restore()}getVertexs(){return this.points}update(e){let[t,i]=e;return this.points=e,this.x=Math.min(t.x,i.x),this.y=Math.min(t.y,i.y),this.width=Math.abs(i.x-t.x),this.height=Math.abs(i.y-t.y),this}isPointInPath(e){return kt.isPointOnLineSegments(e,this.points,this.tolerance)}getClassType(){return"ArrowMarkup"}};wr._registerDrawableClass(XB);var $B=class extends Wn{constructor(e,t){super(e),this.radius=1,this.type="CircleMarkup",this.update(t)}draw(e,t){let[i,r]=this.points.map((e=>this.transToScreenCoord(e,t)));this.radius=(new le).subVectors(r,i).length(),e.save(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.fillStyle=this.fillColor,e.beginPath(),e.arc(i.x,i.y,this.radius,0,2*Math.PI),e.closePath(),e.stroke(),e.restore()}update(e){let[t,i]=e,r=(new A).subVectors(i,t).length();return this.width=2*r,this.height=2*r,this.x=t.x-this.width/2,this.y=t.y-this.height/2,this.points=e,this}isPointInPath(e){let[t,i]=this.points,r=(new A).subVectors(t,i).length();return Math.abs(e.distanceTo(t)-r)<=2*this.tolerance}getClassType(){return"CircleMarkup"}};wr._registerDrawableClass($B);var hTt=new Dt,kp=class extends Wn{constructor(e,t){super(e),this.type="CloudLineMarkup",this.update(t)}draw(e,t){let i=this.points,r=[];e.save(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.fillStyle=this.fillColor,e.beginPath();for(let n=0;nthis.transToScreenCoord(e,t))),n=(new le).lerpVectors(i,r,.5);this.radiusX=Math.abs(r.x-i.x)/2,this.radiusY=Math.abs(r.y-i.y)/2,e.save(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.fillStyle=this.fillColor,e.beginPath(),e.ellipse(n.x,n.y,this.radiusX,this.radiusY,0,0,2*Math.PI),e.closePath(),e.stroke(),e.restore()}update(e){let[t,i]=e;return this.x=Math.min(t.x,i.x),this.y=Math.min(t.y,i.y),this.width=Math.abs(i.x-t.x),this.height=Math.abs(i.y-t.y),this.points=e,this}isPointInPath(e){let[t,i]=this.points,r=(new A).lerpVectors(t,i,.5),n=Math.abs(i.x-t.x)/2,s=Math.abs(i.y-t.y)/2,a=Math.pow(e.x-r.x,2)/(n*n),o=Math.pow(e.y-r.y,2)/(s*s);return Math.abs(a+o-1)<=.1}getClassType(){return"EllipseMarkup"}};wr._registerDrawableClass(JB);var QB=class extends Wn{constructor(e,t){super(e),this.type="PolylineMarkup",this.update(t)}draw(e,t){e.save(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.fillStyle=this.fillColor;let i=this.points;e.beginPath(),i.forEach(((i,r)=>{let n=this.transToScreenCoord(i,t);0===r?e.moveTo(n.x,n.y):e.lineTo(n.x,n.y)})),e.stroke(),e.restore()}isPointInPath(e){let t=this.points,i=[];for(let e=0;e{let n=this.transToScreenCoord(i,t);0===r?e.moveTo(n.x,n.y):e.lineTo(n.x,n.y)})),e.closePath(),e.stroke(),e.restore()}update(e){let[t,i]=e;return this.x=Math.min(t.x,i.x),this.y=Math.min(t.y,i.y),this.width=Math.abs(i.x-t.x),this.height=Math.abs(i.y-t.y),this.points=e,this}isPointInPath(e){let t=this.getVertexs(),i=[];for(let e=0;ethis.textWidth&&(this.textWidth=s),r.push({lineWidth:s,lineText:n})}return this.textRow!==r.length&&(this.y-=(r.length-1)*this.fontSize),r.reverse()}setFontSize(e){this.fontSize=e}update(e){let t=e[0];return this.x=t.x,this.y=t.y,this.points=[t],this.textRow=1,this}setData(e){super.setData(e),this.text=e.text,this.setFontSize(e.fontSize)}updateText(e){this.text=e}getData(){return{id:this.id,points:this.points.map((e=>[e.x,e.y])),text:this.text,lineWidth:this.lineWidth,lineColor:this.lineColor,fillColor:this.fillColor,fontSize:this.fontSize,type:this.getClassType()}}getClassType(){return"TextMarkup"}};wr._registerDrawableClass(tk);var rk=class extends Wn{constructor(e,t){super(e),this.type="XMarkup",this.update(t)}draw(e,t){e.save(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.beginPath();let[i,r,n,s]=this.getVertexs().map((e=>this.transToScreenCoord(e,t)));e.moveTo(i.x,i.y),e.lineTo(n.x,n.y),e.moveTo(r.x,r.y),e.lineTo(s.x,s.y),e.closePath(),e.stroke(),e.restore()}isPointInPath(e){let[t,i,r,n]=this.getVertexs();return kt.isPointOnLineSegments(e,[t,r,i,n],.1)}update(e){let[t,i]=e;return this.points=e,this.x=Math.min(t.x,i.x),this.y=Math.min(t.y,i.y),this.width=Math.abs(i.x-t.x),this.height=Math.abs(i.y-t.y),this}getClassType(){return"XMarkup"}};wr._registerDrawableClass(rk);var rA=class{constructor(e,t){this.flyDuration=500,this.autoRotateRemainingTime=0,this.automaticallyAdjustCameraPosition=!0,this.rotateIntervalStartTime=0,this.camera=e,this.controls=t}flyTo(e,t,i){let r=this.camera,n=this.controls;if(!r||!n)return;if(e.equals(t))return void console.error("[BimViewer] camera position and lookAt cannot be the same!");if(isNaN(e.x)||isNaN(e.y)||isNaN(e.z)||isNaN(t.x)||isNaN(t.y)||isNaN(t.z))return void console.error("[BimViewer] invalid position or lookAt!");if(this.automaticallyAdjustCameraPosition){let i=e.distanceTo(t);ir.far&&(e=e.clone().sub(t).normalize().multiplyScalar(.9*r.far),console.warn("[BimViewer] camera could be too far to see the object!"))}let s=r.position.clone(),a=n.target.clone(),o=this.flyDuration,l=Date.now();this.cameraUpdateInterval&&clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=setInterval((()=>{let h=Date.now()-l;h>o&&(h=o);let u=(e,t,i)=>{let r=e.x+(t.x-e.x)*i,n=e.y+(t.y-e.y)*i,s=e.z+(t.z-e.z)*i;return new A(r,n,s)};((e,t)=>{r.lookAt(t),r.position.set(e.x,e.y,e.z),n.target.set(t.x,t.y,t.z),n.update()})(u(s,e,h/o),u(a,t,h/o)),h>=o&&(clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=void 0,i&&i())}),10)}lookTo(e){let t=this.camera,i=this.controls;if(!t||!i)return;let r=t.position,n=i.target.distanceTo(r),s=e.normalize().multiplyScalar(n),a=new A(r.x+s.x,r.y+s.y,r.z+s.z);this.flyTo(r,a)}startAutoRotate(){let e=this.camera,t=this.controls;if(!e||!t)return;t.autoRotate=!0;let i=new A;e.getWorldPosition(i);let r=t.target;if(r.y===i.y)return;let n=(r.y-i.y)/50;for(let e=0;e<50;++e)setTimeout((()=>{let e=t.target.y-n;t.target.setY(e),t.update()}),30*e)}delayAutoRotate(){this.autoRotateRemainingTime=5e3,this.controls&&(this.controls.autoRotate=!1)}startToRotate(e){let t=Date.now()-this.rotateIntervalStartTime;this.rotateIntervalStartTime=Date.now(),!(this.rotateInterval&&t<100)&&(this.rotateInterval&&clearInterval(this.rotateInterval),this.rotateInterval=setInterval((()=>{if(Date.now()-this.rotateIntervalStartTime>=100)return clearInterval(this.rotateInterval),void(this.rotateInterval=void 0);"ArrowLeft"===e.code||"ArrowRight"===e.code?this.rotateLeftOrRight(.3,"ArrowLeft"===e.code):("ArrowUp"===e.code||"ArrowDown"===e.code)&&this.rotateUpOrDown(.3,"ArrowUp"===e.code)}),1))}rotateLeftOrRight(e,t=!0){let i=this.controls;if(!this.camera||!i)return;let r=this.camera.position,n=i.target,s=n.clone(),a=Math.PI*e/180;t&&(a=-a),s.x=(n.x-r.x)*Math.cos(a)-(n.z-r.z)*Math.sin(a)+r.x,s.z=(n.z-r.z)*Math.cos(a)+(n.x-r.x)*Math.sin(a)+r.z,this.camera.lookAt(s),i.target=s,i.update()}rotateUpOrDown(e,t=!0){let i=this.controls;if(!this.camera||!i)return;let r=this.camera.position,n=i.target,s=n.clone(),a=Math.PI*e/180,o=new A(n.x-r.x,n.y-r.y,n.z-r.z).length(),l=n.y-r.y;t||(a=-a);let h=Math.asin(l/o)+a;if(h<-Math.PI/2||h>Math.PI/2)return;let u=Math.sin(h)*o;s.y=n.y+(u-l),i.target=s,i.update()}},iA=class{constructor(e){this.object=e}instantiate(){let e=Date.now();this.instantiateInner(this.object),console.log(`[Inst] instantiate() costed ${(Date.now()-e)/1e3}s`)}instantiateInner(e){if(!e.children||0===e.children.length)return;let t=e.children.length,i={},r=[];for(let n=0;n0||!t.geometry)continue;let s=!1,a=Object.values(i);for(let o=a.length-1;o>=0;--o){let l=a[o].indexes[0],h=e.children[l];if(this.geometryEquals(t.geometry,h.geometry)&&Cs.materialsEquals(t.material,h.material)){i[l]||(i[l]={indexes:[l]},this.removeFromArray(r,l)),i[l].indexes.push(n),s=!0;break}}for(let a=r.length-1;!s&&a>=0;--a){let o=r[a],l=e.children[o];if(this.geometryEquals(t.geometry,l.geometry)&&Cs.materialsEquals(t.material,l.material)){i[o]||(i[o]={indexes:[o]},this.removeFromArray(r,o)),i[o].indexes.push(n),s=!0;break}}s||r.push(n)}if(Object.keys(i).length<=0)return;let n=[],s=[];Object.values(i).forEach((t=>{let i=t.indexes;s.push(...i);let r=e.children[i[0]],a=r.material;if(a instanceof zr)a=a.clone();else if(Array.isArray(a)){let e=[];a.forEach((t=>e.push(t.clone()))),a=e}let o=new rn(r.geometry,a,i.length);o.name=`[Instanced] ${r.name}`;for(let t=0;tt-e)),s.forEach((t=>e.remove(e.children[t]))),n.forEach((t=>{t.parent=e,e.children.push(t)})),e.updateMatrix(),console.log(`[Inst] ${s.length}(out of ${t}) objects instanced to ${n.length} InstancedMesh`)}removeFromArray(e,t){for(let i=e.length-1;i>=0;--i)if(e[i]===t)return void e.splice(i,1)}geometryEquals(e,t){return kt.geometryEquals(e,t)}},dT=class{constructor(){this.TIMEOUT="timeout",this.INTERVAL="interval",this.timeoutMap={},this.intervalMap={}}run(e=this.INTERVAL,t,i=16.7){let r=Date.now,n=r(),s=n,a=Symbol(""),o=()=>{this.setIdMap(a,e,o),s=r(),s-n>=i&&(e===this.intervalMap&&(n=r(),s=n),t(),e===this.TIMEOUT&&this.clearTimeout(a))};return this.setIdMap(a,e,o),a}setIdMap(e,t,i){let r=requestAnimationFrame(i);t===this.INTERVAL?this.intervalMap[e]=r:t===this.TIMEOUT&&(this.timeoutMap[e]=r)}setTimeout(e,t){return this.run(this.TIMEOUT,e,t)}clearTimeout(e){cancelAnimationFrame(this.timeoutMap[e])}setInterval(e,t){return this.run(this.INTERVAL,e,t)}clearInterval(e){cancelAnimationFrame(this.intervalMap[e])}},sk=kn(dde(),1),Af=class{constructor(e,t){this.endian=t&&"big"===t?"big":"little",this.position=0,this.data=new DataView(e)}readAsciiString(e){if(this.data.byteLength256||24!==e.colormap_size||1!==e.colormap_type)&&console.error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case r:case n:case a:case o:e.colormap_type&&console.error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case t:console.error("THREE.TGALoader: No data.");default:console.error('THREE.TGALoader: Invalid type "%s".',e.image_type)}(e.width<=0||e.height<=0)&&console.error("THREE.TGALoader: Invalid image size."),8!==e.pixel_size&&16!==e.pixel_size&&24!==e.pixel_size&&32!==e.pixel_size&&console.error('THREE.TGALoader: Invalid pixel size "%s".',e.pixel_size)})(g),g.id_length+f>e.length&&console.error("THREE.TGALoader: No data."),f+=g.id_length;let y=!1,v=!1,T=!1;switch(g.image_type){case s:y=!0,v=!0;break;case i:v=!0;break;case a:y=!0;break;case r:break;case o:y=!0,T=!0;break;case n:T=!0}let x=new Uint8Array(g.width*g.height*4),b=function(e,t,i,r,n){let s,a,o=i.pixel_size>>3,l=i.width*i.height*o;if(t&&(a=n.subarray(r,r+=i.colormap_length*(i.colormap_size>>3))),e){s=new Uint8Array(l);let e,t,i,a=0,h=new Uint8Array(o);for(;a>h){default:case p:s=0,o=1,m=t,a=0,f=1,y=i;break;case u:s=0,o=1,m=t,a=i-1,f=-1,y=-1;break;case d:s=t-1,o=-1,m=-1,a=0,f=1,y=i;break;case c:s=t-1,o=-1,m=-1,a=i-1,f=-1,y=-1}if(T)switch(g.pixel_size){case 8:!function(e,t,i,r,n,s,a,o){let l,h,u,c=0,p=g.width;for(u=t;u!==r;u+=i)for(h=n;h!==a;h+=s,c++)l=o[c],e[4*(h+p*u)+0]=l,e[4*(h+p*u)+1]=l,e[4*(h+p*u)+2]=l,e[4*(h+p*u)+3]=255}(e,a,f,y,s,o,m,r);break;case 16:!function(e,t,i,r,n,s,a,o){let l,h,u=0,c=g.width;for(h=t;h!==r;h+=i)for(l=n;l!==a;l+=s,u+=2)e[4*(l+c*h)+0]=o[u+0],e[4*(l+c*h)+1]=o[u+0],e[4*(l+c*h)+2]=o[u+0],e[4*(l+c*h)+3]=o[u+1]}(e,a,f,y,s,o,m,r);break;default:console.error("THREE.TGALoader: Format not supported.")}else switch(g.pixel_size){case 8:!function(e,t,i,r,n,s,a,o,l){let h,u,c,p=l,d=0,f=g.width;for(c=t;c!==r;c+=i)for(u=n;u!==a;u+=s,d++)h=o[d],e[4*(u+f*c)+3]=255,e[4*(u+f*c)+2]=p[3*h+0],e[4*(u+f*c)+1]=p[3*h+1],e[4*(u+f*c)+0]=p[3*h+2]}(e,a,f,y,s,o,m,r,n);break;case 16:!function(e,t,i,r,n,s,a,o){let l,h,u,c=0,p=g.width;for(u=t;u!==r;u+=i)for(h=n;h!==a;h+=s,c+=2)l=o[c+0]+(o[c+1]<<8),e[4*(h+p*u)+0]=(31744&l)>>7,e[4*(h+p*u)+1]=(992&l)>>2,e[4*(h+p*u)+2]=(31&l)<<3,e[4*(h+p*u)+3]=32768&l?0:255}(e,a,f,y,s,o,m,r);break;case 24:!function(e,t,i,r,n,s,a,o){let l,h,u=0,c=g.width;for(h=t;h!==r;h+=i)for(l=n;l!==a;l+=s,u+=3)e[4*(l+c*h)+3]=255,e[4*(l+c*h)+2]=o[u+0],e[4*(l+c*h)+1]=o[u+1],e[4*(l+c*h)+0]=o[u+2]}(e,a,f,y,s,o,m,r);break;case 32:!function(e,t,i,r,n,s,a,o){let l,h,u=0,c=g.width;for(h=t;h!==r;h+=i)for(l=n;l!==a;l+=s,u+=4)e[4*(l+c*h)+2]=o[u+0],e[4*(l+c*h)+1]=o[u+1],e[4*(l+c*h)+0]=o[u+2],e[4*(l+c*h)+3]=o[u+3]}(e,a,f,y,s,o,m,r);break;default:console.error("THREE.TGALoader: Format not supported.")}}(x,g.width,g.height,b.pixel_data,b.palettes),{data:x,width:g.width,height:g.height,flipY:!0,generateMipmaps:!0,minFilter:Ra}}},nA=class extends ci{constructor(e){super(e)}load(e,t,i,r){let n=this,s=""===n.path?Bs.extractUrlBase(e):n.path,a=new ui(n.manager);a.setPath(n.path),a.setRequestHeader(n.requestHeader),a.setWithCredentials(n.withCredentials),a.load(e,(function(i){try{t(n.parse(i,s))}catch(t){r?r(t):console.error(t),n.manager.itemError(e)}}),i,r)}parse(e,t){function i(e,t){let i=[],r=e.childNodes;for(let e=0,n=r.length;e0&&t.push(new no(r+".position",n,s)),a.length>0&&t.push(new Da(r+".quaternion",n,a)),o.length>0&&t.push(new no(r+".scale",n,o)),t}function _(e,t,i){let r,n,s,a=!0;for(n=0,s=e.length;n=0;){let r=e[t];if(null!==r.value[i])return r;t--}return null}function w(e,t,i){for(;t>>0));t="tga"===(i=i.toLowerCase(),i)?$e:Ke;return t}(n);if(void 0!==i){let r=i.load(n),s=e.extra;if(void 0!==s&&void 0!==s.technique&&!1===o(s.technique)){let e=s.technique;r.wrapS=e.wrapU?vn:gn,r.wrapT=e.wrapV?vn:gn,r.offset.set(e.offsetU||0,e.offsetV||0),r.repeat.set(e.repeatU||1,e.repeatV||1)}else r.wrapS=vn,r.wrapT=vn;return null!==t&&(r.encoding=t),r}return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",n),null}return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",e.id),null}t.name=e.name||"";let s=r.parameters;for(let e in s){let i=s[e];switch(e){case"diffuse":i.color&&t.color.fromArray(i.color),i.texture&&(t.map=n(i.texture,gr));break;case"specular":i.color&&t.specular&&t.specular.fromArray(i.color),i.texture&&(t.specularMap=n(i.texture));break;case"bump":i.texture&&(t.normalMap=n(i.texture));break;case"ambient":i.texture&&(t.lightMap=n(i.texture,gr));break;case"shininess":i.float&&t.shininess&&(t.shininess=i.float);break;case"emission":i.color&&t.emissive&&t.emissive.fromArray(i.color),i.texture&&(t.emissiveMap=n(i.texture,gr))}}t.color.convertSRGBToLinear(),t.specular&&t.specular.convertSRGBToLinear(),t.emissive&&t.emissive.convertSRGBToLinear();let a=s.transparent,l=s.transparency;if(void 0===l&&a&&(l={float:1}),void 0===a&&l&&(a={opaque:"A_ONE",data:{color:[1,1,1,1]}}),a&&l)if(a.data.texture)t.transparent=!0;else{let e=a.data.color;switch(a.opaque){case"A_ONE":t.opacity=e[3]*l.float;break;case"RGB_ZERO":t.opacity=1-e[0]*l.float;break;case"A_ZERO":t.opacity=1-e[3]*l.float;break;case"RGB_ONE":t.opacity=e[0]*l.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',a.opaque)}t.opacity<1&&(t.transparent=!0)}if(void 0!==r.extra&&void 0!==r.extra.technique){let e=r.extra.technique;for(let i in e){let r=e[i];switch(i){case"double_sided":t.side=1===r?gi:tn;break;case"bump":t.normalMap=n(r.texture),t.normalScale=new le(1,1)}}}return t}function J(e){return p(nt.materials[e],K)}function $(e){for(let t=0;t0?i+o:i;t.inputs[l]={id:e,offset:n},t.stride=Math.max(t.stride,n+1),"TEXCOORD"===i&&(t.hasUV=!0);break;case"vcount":t.vcount=s(r.textContent);break;case"p":t.p=s(r.textContent)}}return t}function ce(e){let t=0;for(let i=0,r=e.length;i0&&t0&&d.setAttribute("position",new dt(n.array,n.stride)),s.array.length>0&&d.setAttribute("normal",new dt(s.array,s.stride)),l.array.length>0&&d.setAttribute("color",new dt(l.array,l.stride)),a.array.length>0&&d.setAttribute("uv",new dt(a.array,a.stride)),o.array.length>0&&d.setAttribute("uv2",new dt(o.array,o.stride)),h.length>0&&d.setAttribute("skinIndex",new dt(h,u)),c.length>0&&d.setAttribute("skinWeight",new dt(c,p)),r.data=d,r.type=e[0].type,r.materialKeys=f,r}function fe(e,t,i,r,n=!1){let s=e.p,a=e.stride,o=e.vcount;function l(e){let t=s[e+i]*u,a=t+u;for(;t4)for(let t=1,r=i-2;t<=r;t++){let i=e+a*t,r=e+a*(t+1);l(e+0*a),l(i),l(r)}e+=a*i}}else for(let e=0,t=s.length;e=t.limits.max&&(t.static=!0),t.middlePosition=(t.limits.min+t.limits.max)/2,t}function xe(e){let t={sid:e.getAttribute("sid"),name:e.getAttribute("name")||"",attachments:[],transforms:[]};for(let i=0;ir.limits.max||t{this.decodeDracoFile(e,t).catch(r)}),i,r)}decodeDracoFile(e,t,i,r){let n={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!i};return this.decodeGeometry(e,n).then(t)}decodeGeometry(e,t){let i=JSON.stringify(t);if(ak.has(e)){let t=ak.get(e);if(t.key===i)return t.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r,n=this.workerNextTaskID++,s=e.byteLength,a=this._getWorker(n,s).then((i=>(r=i,new Promise(((i,s)=>{r._callbacks[n]={resolve:i,reject:s},r.postMessage({type:"decode",id:n,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return a.catch((()=>!0)).then((()=>{r&&n&&this._releaseTask(r,n)})),ak.set(e,{key:i,promise:a}),a}_createGeometry(e){let t=new lt;e.index&&t.setIndex(new Wt(e.index.array,1));for(let i=0;i{i.load(e,t,void 0,r)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;let e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then((t=>{let i=t[0];e||(this.decoderConfig.wasmBinary=t[1]);let r=pTt.toString(),n=["/* draco decoder */",i,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([n]))})),this.decoderPending}_getWorker(e,t){return this._initDecoder().then((()=>{if(this.workerPool.lengtht._taskLoad?-1:1}));let i=this.workerPool[this.workerPool.length-1];return i._taskCosts[e]=t,i._taskLoad+=t,i}))}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map((e=>e._taskLoad)))}dispose(){for(let e=0;e{let t=e.draco,a=new t.Decoder,o=new t.DecoderBuffer;o.Init(new Int8Array(r),r.byteLength);try{let e=function(e,t,r,n){let s,a,o=n.attributeIDs,l=n.attributeTypes,h=t.GetEncodedGeometryType(r);if(h===e.TRIANGULAR_MESH)s=new e.Mesh,a=t.DecodeBufferToMesh(r,s);else{if(h!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");s=new e.PointCloud,a=t.DecodeBufferToPointCloud(r,s)}if(!a.ok()||0===s.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+a.error_msg());let u={index:null,attributes:[]};for(let r in o){let a,h,c=self[l[r]];if(n.useUniqueIDs)h=o[r],a=t.GetAttributeByUniqueId(s,h);else{if(h=t.GetAttributeId(s,e[o[r]]),-1===h)continue;a=t.GetAttribute(s,h)}u.attributes.push(i(e,t,s,r,c,a))}return h===e.TRIANGULAR_MESH&&(u.index=function(e,t,i){let r=3*i.num_faces(),n=4*r,s=e._malloc(n);t.GetTrianglesUInt32Array(i,n,s);let a=new Uint32Array(e.HEAPF32.buffer,s,r).slice();return e._free(s),{array:a,itemSize:1}}(e,t,s)),e.destroy(s),u}(t,a,o,s),r=e.attributes.map((e=>e.array.buffer));e.index&&r.push(e.index.array.buffer),self.postMessage({type:"decode",id:n.id,geometry:e},r)}catch(e){console.error(e),self.postMessage({type:"error",id:n.id,error:e.message})}finally{t.destroy(o),t.destroy(a)}}))}}}var fde=function(e){return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))},dTt=function(e){return new Worker(e)};try{URL.revokeObjectURL(fde(""))}catch(e){fde=function(e){return"data:application/javascript;charset=UTF-8,"+encodeURI(e)},dTt=function(e){return new Worker(e,{type:"module"})}}var Hl=Uint8Array,Of=Uint16Array,ck=Uint32Array,mde=new Hl([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),gde=new Hl([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),fTt=new Hl([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),vde=function(e,t){for(var i=new Of(31),r=0;r<31;++r)i[r]=t+=1<>>1|(21845&ki)<<1))>>>2|(13107&Gp)<<2))>>>4|(3855&Gp)<<4,uk[ki]=((65280&Gp)>>>8|(255&Gp)<<8)>>>1;var Gp,tI=function(e,t,i){for(var r=e.length,n=0,s=new Of(t);n>>l]=h}else for(a=new Of(r),n=0;n>>15-e[n]);return a},rI=new Hl(288);for(ki=0;ki<144;++ki)rI[ki]=8;for(ki=144;ki<256;++ki)rI[ki]=9;for(ki=256;ki<280;++ki)rI[ki]=7;for(ki=280;ki<288;++ki)rI[ki]=8;var ki,bde=new Hl(32);for(ki=0;ki<32;++ki)bde[ki]=5;var vTt=tI(rI,9,1),yTt=tI(bde,5,1),ok=function(e){for(var t=e[0],i=1;it&&(t=e[i]);return t},Lc=function(e,t,i){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&i},lk=function(e,t){var i=t/8|0;return(e[i]|e[i+1]<<8|e[i+2]<<16)>>(7&t)},TTt=function(e){return(e/8|0)+(7&e&&1)},ETt=function(e,t,i){(null==t||t<0)&&(t=0),(null==i||i>e.length)&&(i=e.length);var r=new(e instanceof Of?Of:e instanceof ck?ck:Hl)(i-t);return r.set(e.subarray(t,i)),r},bTt=function(e,t,i){var r=e.length;if(!r||i&&!i.l&&r<5)return t||new Hl(0);var n=!t||i,s=!i||i.i;i||(i={}),t||(t=new Hl(3*r));var a=function(e){var i=t.length;if(e>i){var r=new Hl(Math.max(2*i,e));r.set(t),t=r}},o=i.f||0,l=i.p||0,h=i.b||0,u=i.l,c=i.d,p=i.m,d=i.n,f=8*r;do{if(!u){i.f=o=Lc(e,l,1);var m=Lc(e,l+1,3);if(l+=3,!m){var g=e[(M=TTt(l)+4)-4]|e[M-3]<<8,y=M+g;if(y>r){if(s)throw"unexpected EOF";break}n&&a(h+g),t.set(e.subarray(M,y),h),i.b=h+=g,i.p=l=8*y;continue}if(1==m)u=vTt,c=yTt,p=9,d=5;else{if(2!=m)throw"invalid block type";var v=Lc(e,l,31)+257,T=Lc(e,l+10,15)+4,x=v+Lc(e,l+5,31)+1;l+=14;for(var b=new Hl(x),_=new Hl(19),E=0;E>>4)<16)b[E++]=M;else{var D=0,O=0;for(16==M?(O=3+Lc(e,l,3),l+=2,D=b[E-1]):17==M?(O=3+Lc(e,l,7),l+=3):18==M&&(O=11+Lc(e,l,127),l+=7);O--;)b[E++]=D}}var R=b.subarray(0,v),C=b.subarray(v);p=ok(R),d=ok(C),u=tI(R,p,1),c=tI(C,d,1)}if(l>f){if(s)throw"unexpected EOF";break}}n&&a(h+131072);for(var N=(1<>>4;if((l+=15&D)>f){if(s)throw"unexpected EOF";break}if(!D)throw"invalid length/literal";if(F<256)t[h++]=F;else{if(256==F){L=l,u=null;break}var U=F-254;if(F>264){var k=mde[E=F-257];U=Lc(e,l,(1<>>4;if(!B)throw"invalid distance";l+=15&B;C=gTt[H];if(H>3){k=gde[H];C+=lk(e,l)&(1<f){if(s)throw"unexpected EOF";break}n&&a(h+131072);for(var G=h+U;h>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"};function xde(e,t){return bTt((ITt(e),e.subarray(2,-4)),t)}var _Tt="undefined"!=typeof TextDecoder&&new TextDecoder,STt=0;try{_Tt.decode(xTt,{stream:!0}),STt=1}catch(e){}function Ide(e,t,i){let r=i.length-e-1;if(t>=i[r])return r-1;if(t<=i[e])return e;let n=e,s=r,a=Math.floor((n+s)/2);for(;t=i[a+1];)t=s&&(l[n][0]=l[t][0]/o[u+1][h],r=l[n][0]*o[h][u]);let c=e-1<=u?s-1:i-e;for(let e=h>=-1?1:-h;e<=c;++e)l[n][e]=(l[t][e]-l[t][e-1])/o[u+1][h+e],r+=l[n][e]*o[h+e][u];e<=u&&(l[n][s]=-l[t][s-1]/o[u+1][e],r+=l[n][s]*o[e][u]),a[s][e]=r;let p=t;t=n,n=p}}let u=i;for(let e=1;e<=r;++e){for(let t=0;t<=i;++t)a[e][t]*=u;u*=i-e}return a}function DTt(e,t,i,r,n){let s=n0,s="string"==typeof n.Content&&""!==n.Content;if(e||s){let e=this.parseImage(i[r]);t[n.RelativeFilename||n.Filename]=e}}}}for(let i in e){let r=e[i];void 0!==t[r]?e[i]=t[r]:e[i]=e[i].split("\\").pop()}return e}parseImage(e){let t,i=e.Content,r=e.RelativeFilename||e.Filename,n=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(n){case"bmp":t="image/bmp";break;case"jpg":case"jpeg":t="image/jpeg";break;case"png":t="image/png";break;case"tif":t="image/tiff";break;case"tga":null===this.manager.getHandler(".tga")&&console.warn("FBXLoader: TGA loader not found, skipping ",r),t="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+n+'" is not supported.')}if("string"==typeof i)return"data:"+t+";base64,"+i;{let e=new Uint8Array(i);return window.URL.createObjectURL(new Blob([e],{type:t}))}}parseTextures(e){let t=new Map;if("Texture"in hi.Objects){let i=hi.Objects.Texture;for(let r in i){let n=this.parseTexture(i[r],e);t.set(parseInt(r),n)}}return t}parseTexture(e,t){let i=this.loadTexture(e,t);i.ID=e.id,i.name=e.attrName;let r=e.WrapModeU,n=e.WrapModeV,s=void 0!==r?r.value:0,a=void 0!==n?n.value:0;if(i.wrapS=0===s?vn:gn,i.wrapT=0===a?vn:gn,"Scaling"in e){let t=e.Scaling.value;i.repeat.x=t[0],i.repeat.y=t[1]}if("Translation"in e){let t=e.Translation.value;i.offset.x=t[0],i.offset.y=t[1]}return i}loadTexture(e,t){let i,r=this.textureLoader.path,n=is.get(e.id).children;void 0!==n&&n.length>0&&void 0!==t[n[0].ID]&&(i=t[n[0].ID],(0===i.indexOf("blob:")||0===i.indexOf("data:"))&&this.textureLoader.setPath(void 0));let s,a=e.FileName.slice(-3).toLowerCase();if("tga"===a){let t=this.manager.getHandler(".tga");null===t?(console.warn("FBXLoader: TGA loader not found, creating placeholder texture for",e.RelativeFilename),s=new Bi):(t.setPath(this.textureLoader.path),s=t.load(i))}else"psd"===a?(console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for",e.RelativeFilename),s=new Bi):s=this.textureLoader.load(i);return this.textureLoader.setPath(r),s}parseMaterials(e){let t=new Map;if("Material"in hi.Objects){let i=hi.Objects.Material;for(let r in i){let n=this.parseMaterial(i[r],e);null!==n&&t.set(parseInt(r),n)}}return t}parseMaterial(e,t){let i=e.id,r=e.attrName,n=e.ShadingModel;if("object"==typeof n&&(n=n.value),!is.has(i))return null;let s,a=this.parseParameters(e,t,i);switch(n.toLowerCase()){case"phong":s=new Es;break;case"lambert":s=new io;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',n),s=new Es}return s.setValues(a),s.name=r,s}parseParameters(e,t,i){let r={};e.BumpFactor&&(r.bumpScale=e.BumpFactor.value),e.Diffuse?r.color=(new je).fromArray(e.Diffuse.value):e.DiffuseColor&&("Color"===e.DiffuseColor.type||"ColorRGB"===e.DiffuseColor.type)&&(r.color=(new je).fromArray(e.DiffuseColor.value)),e.DisplacementFactor&&(r.displacementScale=e.DisplacementFactor.value),e.Emissive?r.emissive=(new je).fromArray(e.Emissive.value):e.EmissiveColor&&("Color"===e.EmissiveColor.type||"ColorRGB"===e.EmissiveColor.type)&&(r.emissive=(new je).fromArray(e.EmissiveColor.value)),e.EmissiveFactor&&(r.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(r.opacity=parseFloat(e.Opacity.value)),r.opacity<1&&(r.transparent=!0),e.ReflectionFactor&&(r.reflectivity=e.ReflectionFactor.value),e.Shininess&&(r.shininess=e.Shininess.value),e.Specular?r.specular=(new je).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(r.specular=(new je).fromArray(e.SpecularColor.value));let n=this;return is.get(i).children.forEach((function(e){let i=e.relationship;switch(i){case"Bump":r.bumpMap=n.getTexture(t,e.ID);break;case"Maya|TEX_ao_map":r.aoMap=n.getTexture(t,e.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":r.map=n.getTexture(t,e.ID),void 0!==r.map&&(r.map.encoding=gr);break;case"DisplacementColor":r.displacementMap=n.getTexture(t,e.ID);break;case"EmissiveColor":r.emissiveMap=n.getTexture(t,e.ID),void 0!==r.emissiveMap&&(r.emissiveMap.encoding=gr);break;case"NormalMap":case"Maya|TEX_normal_map":r.normalMap=n.getTexture(t,e.ID);break;case"ReflectionColor":r.envMap=n.getTexture(t,e.ID),void 0!==r.envMap&&(r.envMap.mapping=yg,r.envMap.encoding=gr);break;case"SpecularColor":r.specularMap=n.getTexture(t,e.ID),void 0!==r.specularMap&&(r.specularMap.encoding=gr);break;case"TransparentColor":case"TransparencyFactor":r.alphaMap=n.getTexture(t,e.ID),r.transparent=!0;break;default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}})),r}getTexture(e,t){return"LayeredTexture"in hi.Objects&&t in hi.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),t=is.get(t).children[0].ID),e.get(t)}parseDeformers(){let e={},t={};if("Deformer"in hi.Objects){let i=hi.Objects.Deformer;for(let r in i){let n=i[r],s=is.get(parseInt(r));if("Skin"===n.attrType){let t=this.parseSkeleton(s,i);t.ID=r,s.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),t.geometryID=s.parents[0].ID,e[r]=t}else if("BlendShape"===n.attrType){let e={id:r};e.rawTargets=this.parseMorphTargets(s,i),e.id=r,s.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),t[r]=e}}}return{skeletons:e,morphTargets:t}}parseSkeleton(e,t){let i=[];return e.children.forEach((function(e){let r=t[e.ID];if("Cluster"!==r.attrType)return;let n={ID:e.ID,indices:[],weights:[],transformLink:(new Be).fromArray(r.TransformLink.a)};"Indexes"in r&&(n.indices=r.Indexes.a,n.weights=r.Weights.a),i.push(n)})),{rawBones:i,bones:[]}}parseMorphTargets(e,t){let i=[];for(let r=0;r1?s=a:a.length>0?s=a[0]:(s=new Es({color:13421772}),a.push(s)),"color"in n.attributes&&a.forEach((function(e){e.vertexColors=!0})),n.FBX_Deformer?(r=new Bu(n,s),r.normalizeSkinWeights()):r=new rt(n,s),r}createCurve(e,t){let i=e.children.reduce((function(e,i){return t.has(i.ID)&&(e=t.get(i.ID)),e}),null),r=new vr({color:3342591,linewidth:1});return new Ir(i,r)}getTransformData(e,t){let i={};"InheritType"in t&&(i.inheritType=parseInt(t.InheritType.value)),i.eulerOrder="RotationOrder"in t?Dde(t.RotationOrder.value):"ZYX","Lcl_Translation"in t&&(i.translation=t.Lcl_Translation.value),"PreRotation"in t&&(i.preRotation=t.PreRotation.value),"Lcl_Rotation"in t&&(i.rotation=t.Lcl_Rotation.value),"PostRotation"in t&&(i.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(i.scale=t.Lcl_Scaling.value),"ScalingOffset"in t&&(i.scalingOffset=t.ScalingOffset.value),"ScalingPivot"in t&&(i.scalingPivot=t.ScalingPivot.value),"RotationOffset"in t&&(i.rotationOffset=t.RotationOffset.value),"RotationPivot"in t&&(i.rotationPivot=t.RotationPivot.value),e.userData.transformData=i}setLookAtProperties(e,t){"LookAtProperty"in t&&is.get(e.ID).children.forEach((function(t){if("LookAtProperty"===t.relationship){let i=hi.Objects.Model[t.ID];if("Lcl_Translation"in i){let t=i.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(t),ho.add(e.target)):e.lookAt((new A).fromArray(t))}}}))}bindSkeleton(e,t,i){let r=this.parsePoseNodes();for(let n in e){let s=e[n];is.get(parseInt(s.ID)).parents.forEach((function(e){if(t.has(e.ID)){let t=e.ID;is.get(t).parents.forEach((function(e){i.has(e.ID)&&i.get(e.ID).bind(new wl(s.bones),r[e.ID])}))}}))}}parsePoseNodes(){let e={};if("Pose"in hi.Objects){let t=hi.Objects.Pose;for(let i in t)if("BindPose"===t[i].attrType&&t[i].NbPoseNodes>0){let r=t[i].PoseNode;Array.isArray(r)?r.forEach((function(t){e[t.Node]=(new Be).fromArray(t.Matrix.a)})):e[r.Node]=(new Be).fromArray(r.Matrix.a)}}return e}createAmbientLight(){if("GlobalSettings"in hi&&"AmbientColor"in hi.GlobalSettings){let e=hi.GlobalSettings.AmbientColor.value,t=e[0],i=e[1],r=e[2];if(0!==t||0!==i||0!==r){let e=new je(t,i,r);ho.add(new Cl(e,1))}}}},fk=class{constructor(){this.negativeMaterialIndices=!1}parse(e){let t=new Map;if("Geometry"in hi.Objects){let i=hi.Objects.Geometry;for(let r in i){let n=is.get(parseInt(r)),s=this.parseGeometry(n,i[r],e);t.set(parseInt(r),s)}}return!0===this.negativeMaterialIndices&&console.warn("THREE.FBXLoader: The FBX file contains invalid (negative) material indices. The asset might not render as expected."),t}parseGeometry(e,t,i){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,i);case"NurbsCurve":return this.parseNurbsGeometry(t)}}parseMeshGeometry(e,t,i){let r=i.skeletons,n=[],s=e.parents.map((function(e){return hi.Objects.Model[e.ID]}));if(0===s.length)return;let a=e.children.reduce((function(e,t){return void 0!==r[t.ID]&&(e=r[t.ID]),e}),null);e.children.forEach((function(e){void 0!==i.morphTargets[e.ID]&&n.push(i.morphTargets[e.ID])}));let o=s[0],l={};"RotationOrder"in o&&(l.eulerOrder=Dde(o.RotationOrder.value)),"InheritType"in o&&(l.inheritType=parseInt(o.InheritType.value)),"GeometricTranslation"in o&&(l.translation=o.GeometricTranslation.value),"GeometricRotation"in o&&(l.rotation=o.GeometricRotation.value),"GeometricScaling"in o&&(l.scale=o.GeometricScaling.value);let h=Mde(l);return this.genGeometry(t,a,n,h)}genGeometry(e,t,i,r){let n=new lt;e.attrName&&(n.name=e.attrName);let s=this.parseGeoNode(e,t),a=this.genBuffers(s),o=new dt(a.vertex,3);if(o.applyMatrix4(r),n.setAttribute("position",o),a.colors.length>0&&n.setAttribute("color",new dt(a.colors,3)),t&&(n.setAttribute("skinIndex",new Tg(a.weightsIndices,4)),n.setAttribute("skinWeight",new dt(a.vertexWeights,4)),n.FBX_Deformer=t),a.normal.length>0){let e=(new Pi).getNormalMatrix(r),t=new dt(a.normal,3);t.applyNormalMatrix(e),n.setAttribute("normal",t)}if(a.uvs.forEach((function(e,t){let i="uv"+(t+1).toString();0===t&&(i="uv"),n.setAttribute(i,new dt(a.uvs[t],2))})),s.material&&"AllSame"!==s.material.mappingType){let e=a.materialIndex[0],t=0;if(a.materialIndex.forEach((function(i,r){i!==e&&(n.addGroup(t,r-t,e),e=i,t=r)})),n.groups.length>0){let t=n.groups[n.groups.length-1],i=t.start+t.count;i!==a.materialIndex.length&&n.addGroup(i,a.materialIndex.length-i,e)}0===n.groups.length&&n.addGroup(0,a.materialIndex.length,a.materialIndex[0])}return this.addMorphTargets(n,e,i,r),n}parseGeoNode(e,t){let i={};if(i.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],i.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(i.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(i.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(i.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){i.uv=[];let t=0;for(;e.LayerElementUV[t];)e.LayerElementUV[t].UV&&i.uv.push(this.parseUVs(e.LayerElementUV[t])),t++}return i.weightTable={},null!==t&&(i.skeleton=t,t.rawBones.forEach((function(e,t){e.indices.forEach((function(r,n){void 0===i.weightTable[r]&&(i.weightTable[r]=[]),i.weightTable[r].push({id:t,weight:e.weights[n]})}))}))),i}genBuffers(e){let t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},i=0,r=0,n=!1,s=[],a=[],o=[],l=[],h=[],u=[],c=this;return e.vertexIndices.forEach((function(p,d){let f,m=!1;p<0&&(p^=-1,m=!0);let g=[],y=[];if(s.push(3*p,3*p+1,3*p+2),e.color){let t=oA(d,i,p,e.color);o.push(t[0],t[1],t[2])}if(e.skeleton){if(void 0!==e.weightTable[p]&&e.weightTable[p].forEach((function(e){y.push(e.weight),g.push(e.id)})),y.length>4){n||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),n=!0);let e=[0,0,0,0],t=[0,0,0,0];y.forEach((function(i,r){let n=i,s=g[r];t.forEach((function(t,i,r){if(n>t){r[i]=n,n=t;let a=e[i];e[i]=s,s=a}}))})),g=e,y=t}for(;y.length<4;)y.push(0),g.push(0);for(let e=0;e<4;++e)h.push(y[e]),u.push(g[e])}if(e.normal){let t=oA(d,i,p,e.normal);a.push(t[0],t[1],t[2])}e.material&&"AllSame"!==e.material.mappingType&&(f=oA(d,i,p,e.material)[0],f<0&&(c.negativeMaterialIndices=!0,f=0)),e.uv&&e.uv.forEach((function(e,t){let r=oA(d,i,p,e);void 0===l[t]&&(l[t]=[]),l[t].push(r[0]),l[t].push(r[1])})),r++,m&&(r>4&&console.warn("THREE.FBXLoader: Polygons with more than four sides are not supported. Make sure to triangulate the geometry during export."),c.genFace(t,e,s,f,a,o,l,h,u,r),i++,r=0,s=[],a=[],o=[],l=[],h=[],u=[])})),t}genFace(e,t,i,r,n,s,a,o,l,h){for(let u=2;u1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");let s=e.get(n[0].ID);i[r]={name:t[r].attrName,layer:s}}return i}addClip(e){let t=[],i=this;return e.layer.forEach((function(e){t=t.concat(i.generateTracks(e))})),new so(e.name,-1,t)}generateTracks(e){let t=[],i=new A,r=new Hr,n=new A;if(e.transform&&e.transform.decompose(i,r,n),i=i.toArray(),r=(new xr).setFromQuaternion(r,e.eulerOrder).toArray(),n=n.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){let r=this.generateVectorTrack(e.modelName,e.T.curves,i,"position");void 0!==r&&t.push(r)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){let i=this.generateRotationTrack(e.modelName,e.R.curves,r,e.preRotation,e.postRotation,e.eulerOrder);void 0!==i&&t.push(i)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){let i=this.generateVectorTrack(e.modelName,e.S.curves,n,"scale");void 0!==i&&t.push(i)}if(void 0!==e.DeformPercent){let i=this.generateMorphTrack(e);void 0!==i&&t.push(i)}return t}generateVectorTrack(e,t,i,r){let n=this.getTimesForAllAxes(t),s=this.getKeyframeTrackValues(n,t,i);return new no(e+"."+r,n,s)}generateRotationTrack(e,t,i,r,n,s){void 0!==t.x&&(this.interpolateRotations(t.x),t.x.values=t.x.values.map(_r.degToRad)),void 0!==t.y&&(this.interpolateRotations(t.y),t.y.values=t.y.values.map(_r.degToRad)),void 0!==t.z&&(this.interpolateRotations(t.z),t.z.values=t.z.values.map(_r.degToRad));let a=this.getTimesForAllAxes(t),o=this.getKeyframeTrackValues(a,t,i);void 0!==r&&((r=r.map(_r.degToRad)).push(s),r=(new xr).fromArray(r),r=(new Hr).setFromEuler(r)),void 0!==n&&((n=n.map(_r.degToRad)).push(s),n=(new xr).fromArray(n),n=(new Hr).setFromEuler(n).invert());let l=new Hr,h=new xr,u=[];for(let e=0;e1){let e=1,i=t[0];for(let r=1;r=180){let s=n/180,a=r/s,o=i+a,l=e.times[t-1],h=(e.times[t]-l)/s,u=l+h,c=[],p=[];for(;u1&&(i=e[1].replace(/^(\w+)::/,""),r=e[2]),{id:t,name:i,type:r}}parseNodeProperty(e,t,i){let r=t[1].replace(/^"/,"").replace(/"$/,"").trim(),n=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===n&&(n=i.replace(/"/g,"").replace(/,$/,"").trim());let s=this.getCurrentNode();if("Properties70"!==s.name){if("C"===r){let e=n.split(",").slice(1),t=parseInt(e[0]),i=parseInt(e[1]),a=n.split(",").slice(3);a=a.map((function(e){return e.trim().replace(/^"/,"")})),r="connections",n=[t,i],HTt(n,a),void 0===s[r]&&(s[r]=[])}"Node"===r&&(s.id=n),r in s&&Array.isArray(s[r])?s[r].push(n):"a"!==r?s[r]=n:s.a=n,this.setCurrentProp(s,r),"a"===r&&","!==n.slice(-1)&&(s.a=pk(n))}else this.parseNodeSpecialProperty(e,r,n)}parseNodePropertyContinued(e){let t=this.getCurrentNode();t.a+=e,","!==e.slice(-1)&&(t.a=pk(t.a))}parseNodeSpecialProperty(e,t,i){let r=i.split('",').map((function(e){return e.trim().replace(/^\"/,"").replace(/\s/,"_")})),n=r[0],s=r[1],a=r[2],o=r[3],l=r[4];switch(s){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":l=parseFloat(l);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":l=pk(l)}this.getPrevNode()[n]={type:s,type2:a,flag:o,value:l},this.setCurrentProp(this.getPrevNode(),n)}},vk=class{parse(e){let t=new cA(e);t.skip(23);let i=t.getUint32();if(i<6400)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+i);let r=new uA;for(;!this.endOfContent(t);){let e=this.parseNode(t,i);null!==e&&r.add(e.name,e)}return r}endOfContent(e){return e.size()%16==0?(e.getOffset()+160+16&-16)>=e.size():e.getOffset()+160+16>=e.size()}parseNode(e,t){let i={},r=t>=7500?e.getUint64():e.getUint32(),n=t>=7500?e.getUint64():e.getUint32();t>=7500?e.getUint64():e.getUint32();let s=e.getUint8(),a=e.getString(s);if(0===r)return null;let o=[];for(let t=0;t0?o[0]:"",h=o.length>1?o[1]:"",u=o.length>2?o[2]:"";for(i.singleProperty=1===n&&e.getOffset()===r;r>e.getOffset();){let r=this.parseNode(e,t);null!==r&&this.parseSubNode(a,i,r)}return i.propertyList=o,"number"==typeof l&&(i.id=l),""!==h&&(i.attrName=h),""!==u&&(i.attrType=u),""!==a&&(i.name=a),i}parseSubNode(e,t,i){if(!0===i.singleProperty){let e=i.propertyList[0];Array.isArray(e)?(t[i.name]=i,i.a=e):t[i.name]=e}else if("Connections"===e&&"C"===i.name){let e=[];i.propertyList.forEach((function(t,i){0!==i&&e.push(t)})),void 0===t.connections&&(t.connections=[]),t.connections.push(e)}else if("Properties70"===i.name)Object.keys(i).forEach((function(e){t[e]=i[e]}));else if("Properties70"===e&&"P"===i.name){let e,r=i.propertyList[0],n=i.propertyList[1],s=i.propertyList[2],a=i.propertyList[3];0===r.indexOf("Lcl ")&&(r=r.replace("Lcl ","Lcl_")),0===n.indexOf("Lcl ")&&(n=n.replace("Lcl ","Lcl_")),e="Color"===n||"ColorRGB"===n||"Vector"===n||"Vector3D"===n||0===n.indexOf("Lcl_")?[i.propertyList[4],i.propertyList[5],i.propertyList[6]]:i.propertyList[4],t[r]={type:n,type2:s,flag:a,value:e}}else void 0===t[i.name]?"number"==typeof i.id?(t[i.name]={},t[i.name][i.id]=i):t[i.name]=i:"PoseNode"===i.name?(Array.isArray(t[i.name])||(t[i.name]=[t[i.name]]),t[i.name].push(i)):void 0===t[i.name][i.id]&&(t[i.name][i.id]=i)}parseProperty(e){let t,i=e.getString(1);switch(i){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":return t=e.getUint32(),e.getArrayBuffer(t);case"S":return t=e.getUint32(),e.getString(t);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":let r=e.getUint32(),n=e.getUint32(),s=e.getUint32();if(0===n)switch(i){case"b":case"c":return e.getBooleanArray(r);case"d":return e.getFloat64Array(r);case"f":return e.getFloat32Array(r);case"i":return e.getInt32Array(r);case"l":return e.getInt64Array(r)}let a=xde(new Uint8Array(e.getArrayBuffer(s))),o=new cA(a.buffer);switch(i){case"b":case"c":return o.getBooleanArray(r);case"d":return o.getFloat64Array(r);case"f":return o.getFloat32Array(r);case"i":return o.getInt32Array(r);case"l":return o.getInt64Array(r)}break;default:throw new Error("THREE.FBXLoader: Unknown property type "+i)}}},cA=class{constructor(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t,this._textDecoder=new TextDecoder}getOffset(){return this.offset}size(){return this.dv.buffer.byteLength}skip(e){this.offset+=e}getBoolean(){return 1==(1&this.getUint8())}getBooleanArray(e){let t=[];for(let i=0;i=0&&(i=new Uint8Array(this.dv.buffer,t,r)),this._textDecoder.decode(i)}},uA=class{add(e,t){this[e]=t}};function PTt(e){let t="Kaydara FBX Binary \0";return e.byteLength>=t.length&&t===Cde(e,0,t.length)}function NTt(e){let t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"],i=0;function r(t){let r=e[t-1];return e=e.slice(i+t),i++,r}for(let e=0;e=2.0 are supported.")));let l=new Gk(n,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e=0&&void 0===a[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}l.setExtensions(s),l.setPlugins(a),l.parse(i,r)}parseAsync(e,t){let i=this;return new Promise((function(r,n){i.parse(e,t,r,n)}))}};function GTt(){let e={};return{get:function(t){return e[t]},add:function(t,i){e[t]=i},remove:function(t){delete e[t]},removeAll:function(){e={}}}}var Ai={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_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_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"},Ek=class{constructor(e){this.parser=e,this.name=Ai.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){let e=this.parser,t=this.parser.json.nodes||[];for(let i=0,r=t.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,n.source,s)}},Ak=class{constructor(e){this.parser=e,this.name=Ai.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){let t=this.name,i=this.parser,r=i.json,n=r.textures[e];if(!n.extensions||!n.extensions[t])return null;let s=n.extensions[t],a=r.images[s.source],o=i.textureLoader;if(a.uri){let e=i.options.manager.getHandler(a.uri);null!==e&&(o=e)}return this.detectSupport().then((function(n){if(n)return i.loadTextureImage(e,s.source,o);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){let t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}},Ok=class{constructor(e){this.name=Ai.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){let t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){let e=i.extensions[this.name],r=this.parser.getDependency("buffer",e.buffer),n=this.parser.options.meshoptDecoder;if(!n||!n.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 r.then((function(t){let i=e.byteOffset||0,r=e.byteLength||0,s=e.count,a=e.byteStride,o=new Uint8Array(t,i,r);return n.decodeGltfBufferAsync?n.decodeGltfBufferAsync(s,a,o,e.mode,e.filter).then((function(e){return e.buffer})):n.ready.then((function(){let t=new ArrayBuffer(s*a);return n.decodeGltfBuffer(new Uint8Array(t),s,a,o,e.mode,e.filter),t}))}))}return null}},Pk=class{constructor(e){this.name=Ai.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){let t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||void 0===i.mesh)return null;let r=t.meshes[i.mesh];for(let e of r.primitives)if(e.mode!==Ul.TRIANGLES&&e.mode!==Ul.TRIANGLE_STRIP&&e.mode!==Ul.TRIANGLE_FAN&&void 0!==e.mode)return null;let n=i.extensions[this.name].attributes,s=[],a={};for(let e in n)s.push(this.parser.getDependency("accessor",n[e]).then((t=>(a[e]=t,a[e]))));return s.length<1?null:(s.push(this.parser.createNodeMesh(e)),Promise.all(s).then((e=>{let t=e.pop(),i=t.isGroup?t.children:[t],r=e[0].count,n=[];for(let e of i){let t=new Be,i=new A,s=new Hr,o=new A(1,1,1),l=new rn(e.geometry,e.material,r);for(let e=0;e0||0===e.search(/^data\:image\/jpeg/)?"image/jpeg":e.search(/\.webp($|\?)/i)>0||0===e.search(/^data\:image\/webp/)?"image/webp":"image/png"}var $Tt=new Be,Gk=class{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new GTt,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,r=!1,n=-1;"undefined"!=typeof navigator&&(i=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),r=navigator.userAgent.indexOf("Firefox")>-1,n=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||i||r&&n<98?this.textureLoader=new bs(this.options.manager):this.textureLoader=new bx(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new ui(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){let i=this,r=this.json,n=this.extensions;this.cache.removeAll(),this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])})).then((function(t){let s={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:i,userData:{}};nI(n,s,r),Nf(s,r),Promise.all(i._invokeAll((function(e){return e.afterRoot&&e.afterRoot(s)}))).then((function(){e(s)}))})).catch(t)}_markDefs(){let e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let i=0,r=t.length;i{let i=this.associations.get(e);null!=i&&this.associations.set(t,i);for(let[i,r]of e.children.entries())n(r,t.children[i])};return n(i,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){let t=Object.values(this.plugins);t.push(this);for(let i=0;i=2&&s.setY(t,c[e*o+1]),o>=3&&s.setZ(t,c[e*o+2]),o>=4&&s.setW(t,c[e*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return s}))}loadTexture(e){let t=this.json,i=this.options,r=t.textures[e].source,n=t.images[r],s=this.textureLoader;if(n.uri){let e=i.manager.getHandler(n.uri);null!==e&&(s=e)}return this.loadTextureImage(e,r,s)}loadTextureImage(e,t,i){let r=this,n=this.json,s=n.textures[e],a=n.images[t],o=(a.uri||a.bufferView)+":"+s.sampler;if(this.textureCache[o])return this.textureCache[o];let l=this.loadImageSource(t,i).then((function(t){t.flipY=!1,t.name=s.name||a.name||"";let i=(n.samplers||{})[s.sampler]||{};return t.magFilter=Ode[i.magFilter]||oi,t.minFilter=Ode[i.minFilter]||Ra,t.wrapS=Pde[i.wrapS]||vn,t.wrapT=Pde[i.wrapT]||vn,r.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[o]=l,l}loadImageSource(e,t){let i=this.json,r=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));let n=i.images[e],s=self.URL||self.webkitURL,a=n.uri||"",o=!1;if(void 0!==n.bufferView)a=this.getDependency("bufferView",n.bufferView).then((function(e){o=!0;let t=new Blob([e],{type:n.mimeType});return a=s.createObjectURL(t),a}));else if(void 0===n.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");let l=Promise.resolve(a).then((function(e){return new Promise((function(i,n){let s=i;!0===t.isImageBitmapLoader&&(s=function(e){let t=new Bi(e);t.needsUpdate=!0,i(t)}),t.load(Bs.resolveURL(e,r.path),s,void 0,n)}))})).then((function(e){return!0===o&&s.revokeObjectURL(a),e.userData.mimeType=n.mimeType||XTt(n.uri),e})).catch((function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",a),e}));return this.sourceCache[e]=l,l}assignTexture(e,t,i,r){let n=this;return this.getDependency("texture",i.index).then((function(s){if(!s)return null;if(void 0!==i.texCoord&&0!=i.texCoord&&!("aoMap"===t&&1==i.texCoord)&&console.warn("THREE.GLTFLoader: Custom UV set "+i.texCoord+" for texture "+t+" not yet supported."),n.extensions[Ai.KHR_TEXTURE_TRANSFORM]){let e=void 0!==i.extensions?i.extensions[Ai.KHR_TEXTURE_TRANSFORM]:void 0;if(e){let t=n.associations.get(s);s=n.extensions[Ai.KHR_TEXTURE_TRANSFORM].extendTexture(s,e),n.associations.set(s,t)}}return void 0!==r&&(s.encoding=r),e[t]=s,s}))}assignFinalMaterial(e){let t=e.geometry,i=e.material,r=void 0===t.attributes.tangent,n=void 0!==t.attributes.color,s=void 0===t.attributes.normal;if(e.isPoints){let e="PointsMaterial:"+i.uuid,t=this.cache.get(e);t||(t=new jn,zr.prototype.copy.call(t,i),t.color.copy(i.color),t.map=i.map,t.sizeAttenuation=!1,this.cache.add(e,t)),i=t}else if(e.isLine){let e="LineBasicMaterial:"+i.uuid,t=this.cache.get(e);t||(t=new vr,zr.prototype.copy.call(t,i),t.color.copy(i.color),this.cache.add(e,t)),i=t}if(r||n||s){let e="ClonedMaterial:"+i.uuid+":";r&&(e+="derivative-tangents:"),n&&(e+="vertex-colors:"),s&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=i.clone(),n&&(t.vertexColors=!0),s&&(t.flatShading=!0),r&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(i))),i=t}i.aoMap&&void 0===t.attributes.uv2&&void 0!==t.attributes.uv&&t.setAttribute("uv2",t.attributes.uv),e.material=i}getMaterialType(){return Gu}loadMaterial(e){let t,i=this,r=this.json,n=this.extensions,s=r.materials[e],a={},o=[];if((s.extensions||{})[Ai.KHR_MATERIALS_UNLIT]){let e=n[Ai.KHR_MATERIALS_UNLIT];t=e.getMaterialType(),o.push(e.extendParams(a,s,i))}else{let r=s.pbrMetallicRoughness||{};if(a.color=new je(1,1,1),a.opacity=1,Array.isArray(r.baseColorFactor)){let e=r.baseColorFactor;a.color.fromArray(e),a.opacity=e[3]}void 0!==r.baseColorTexture&&o.push(i.assignTexture(a,"map",r.baseColorTexture,gr)),a.metalness=void 0!==r.metallicFactor?r.metallicFactor:1,a.roughness=void 0!==r.roughnessFactor?r.roughnessFactor:1,void 0!==r.metallicRoughnessTexture&&(o.push(i.assignTexture(a,"metalnessMap",r.metallicRoughnessTexture)),o.push(i.assignTexture(a,"roughnessMap",r.metallicRoughnessTexture))),t=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),o.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,a)}))))}!0===s.doubleSided&&(a.side=gi);let l=s.alphaMode||Tk.OPAQUE;if(l===Tk.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,l===Tk.MASK&&(a.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&t!==or&&(o.push(i.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new le(1,1),void 0!==s.normalTexture.scale)){let e=s.normalTexture.scale;a.normalScale.set(e,e)}return void 0!==s.occlusionTexture&&t!==or&&(o.push(i.assignTexture(a,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(a.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&t!==or&&(a.emissive=(new je).fromArray(s.emissiveFactor)),void 0!==s.emissiveTexture&&t!==or&&o.push(i.assignTexture(a,"emissiveMap",s.emissiveTexture,gr)),Promise.all(o).then((function(){let r=new t(a);return s.name&&(r.name=s.name),Nf(r,s),i.associations.set(r,{materials:e}),s.extensions&&nI(n,r,s),r}))}createUniqueName(e){let t=Rr.sanitizeNodeName(e||""),i=t;for(let e=1;this.nodeNamesUsed[i];++e)i=t+"_"+e;return this.nodeNamesUsed[i]=!0,i}loadGeometries(e){let t=this,i=this.extensions,r=this.primitiveCache;function n(e){return i[Ai.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(i){return Lde(i,e,t)}))}let s=[];for(let i=0,a=e.length;i0&&qTt(h,n),h.name=t.createUniqueName(n.name||"mesh_"+e),Nf(h,n),c.extensions&&nI(r,h,c),t.assignFinalMaterial(h),l.push(h)}for(let i=0,r=l.length;i1?new ur:1===o.length?o[0]:new cr,a!==o[0])for(let e=0,t=o.length;e{let t=new Map;for(let[e,i]of r.associations)(e instanceof zr||e instanceof Bi)&&t.set(e,i);return e.traverse((e=>{let i=r.associations.get(e);null!=i&&t.set(e,i)})),t})(n),n}))}};function KTt(e,t,i){let r=t.attributes,n=new Dt;if(void 0===r.POSITION)return;{let e=i.json.accessors[r.POSITION],t=e.min,s=e.max;if(void 0===t||void 0===s)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(n.set(new A(t[0],t[1],t[2]),new A(s[0],s[1],s[2])),e.normalized){let t=kk(gT[e.componentType]);n.min.multiplyScalar(t),n.max.multiplyScalar(t)}}let s=t.targets;if(void 0!==s){let e=new A,t=new A;for(let r=0,n=s.length;rt in e?ZTt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Bde=(e,t)=>{for(var i in t||(t={}))JTt.call(t,i)&&Ude(e,i,t[i]);if(Hde)for(var i of Hde(t))QTt.call(t,i)&&Ude(e,i,t[i]);return e},Vk=e=>{if(void 0!==t2)return t2(e);throw new Error('Dynamic require of "'+e+'" is not supported')},Gde=(e,t)=>function(){return t||(0,e[Object.keys(e)[0]])((t={exports:{}}).exports,t),t.exports},eEt=(e,t,i)=>new Promise(((r,n)=>{var s=e=>{try{o(i.next(e))}catch(e){n(e)}},a=e=>{try{o(i.throw(e))}catch(e){n(e)}},o=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,a);o((i=i.apply(e,t)).next())})),tEt=Gde({"(disabled):crypto"(){}}),rEt=Gde({"dist/web-ifc.js"(e,t){var i,r=(i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(i=i||__filename),function(e){var t,r,n=void 0!==(e=e||{})?e:{};n.ready=new Promise((function(e,i){t=e,r=i}));var s,a={};for(s in n)n.hasOwnProperty(s)&&(a[s]=n[s]);var o=[],l="./this.program",h=function(e,t){throw t},u=!1,c=!1,p=!1,d=!1;u="object"==typeof window,c="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,d=!u&&!p&&!c;var f,m,g,y,v="";function T(e){return n.locateFile?n.locateFile(e,v):v+e}p?(v=c?Vk("path").dirname(v)+"/":__dirname+"/",f=function(e,t){return g||(g=Vk("fs")),y||(y=Vk("path")),e=y.normalize(e),g.readFileSync(e,t?null:"utf8")},m=function(e){var t=f(e,!0);return t.buffer||(t=new Uint8Array(t)),D(t.buffer),t},process.argv.length>1&&(l=process.argv[1].replace(/\\/g,"/")),o=process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof Hr))throw e})),process.on("unhandledRejection",xe),h=function(e){process.exit(e)},n.inspect=function(){return"[Emscripten Module object]"}):d?("undefined"!=typeof read&&(f=function(e){return read(e)}),m=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(D("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?o=scriptArgs:void 0!==arguments&&(o=arguments),"function"==typeof quit&&(h=function(e){quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(u||c)&&(c?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),i&&(v=i),v=0!==v.indexOf("blob:")?v.slice(0,v.lastIndexOf("/")+1):"",f=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},c&&(m=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}));var x=n.print||console.log.bind(console),b=n.printErr||console.warn.bind(console);for(s in a)a.hasOwnProperty(s)&&(n[s]=a[s]);a=null,n.arguments&&(o=n.arguments),n.thisProgram&&(l=n.thisProgram),n.quit&&(h=n.quit);var _=16;function E(e,t){return t||(t=_),Math.ceil(e/t)*t}var w,S,I=function(e){};n.wasmBinary&&(w=n.wasmBinary),n.noExitRuntime&&(S=n.noExitRuntime),"object"!=typeof WebAssembly&&xe("no native wasm support detected");var M,A=!1;function D(e,t){e||xe("Assertion failed: "+t)}var O="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function R(e,t,i){for(var r=(t>>>=0)+i,n=t;e[n>>>0]&&!(n>=r);)++n;if(n-t>16&&e.subarray&&O)return O.decode(e.subarray(t>>>0,n>>>0));for(var s="";t>>0];if(128&a){var o=63&e[t++>>>0];if(192!=(224&a)){var l=63&e[t++>>>0];if((a=224==(240&a)?(15&a)<<12|o<<6|l:(7&a)<<18|o<<12|l<<6|63&e[t++>>>0])<65536)s+=String.fromCharCode(a);else{var h=a-65536;s+=String.fromCharCode(55296|h>>10,56320|1023&h)}}else s+=String.fromCharCode((31&a)<<6|o)}else s+=String.fromCharCode(a)}return s}function C(e,t){return(e>>>=0)?R(k,e,t):""}function N(e,t,i,r){if(!(r>0))return 0;for(var n=i>>>=0,s=i+r-1,a=0;a=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),o<=127){if(i>=s)break;t[i++>>>0]=o}else if(o<=2047){if(i+1>=s)break;t[i++>>>0]=192|o>>6,t[i++>>>0]=128|63&o}else if(o<=65535){if(i+2>=s)break;t[i++>>>0]=224|o>>12,t[i++>>>0]=128|o>>6&63,t[i++>>>0]=128|63&o}else{if(i+3>=s)break;t[i++>>>0]=240|o>>18,t[i++>>>0]=128|o>>12&63,t[i++>>>0]=128|o>>6&63,t[i++>>>0]=128|63&o}}return t[i>>>0]=0,i-n}function P(e,t,i){return N(e,k,t,i)}function L(e){for(var t=0,i=0;i=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++i)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4}return t}var F,U,k,B,H,G,z,V,j,W="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Y(e,t){for(var i=e,r=i>>1,n=r+t/2;!(r>=n)&&H[r>>>0];)++r;if((i=r<<1)-e>32&&W)return W.decode(k.subarray(e>>>0,i>>>0));for(var s="",a=0;!(a>=t/2);++a){var o=B[e+2*a>>>1];if(0==o)break;s+=String.fromCharCode(o)}return s}function X(e,t,i){if(void 0===i&&(i=2147483647),i<2)return 0;for(var r=t,n=(i-=2)<2*e.length?i/2:e.length,s=0;s>>1]=a,t+=2}return B[t>>>1]=0,t-r}function q(e){return 2*e.length}function Z(e,t){for(var i=0,r="";!(i>=t/4);){var n=G[e+4*i>>>2];if(0==n)break;if(++i,n>=65536){var s=n-65536;r+=String.fromCharCode(55296|s>>10,56320|1023&s)}else r+=String.fromCharCode(n)}return r}function K(e,t,i){if(void 0===i&&(i=2147483647),i<4)return 0;for(var r=t>>>=0,n=r+i-4,s=0;s=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++s)),G[t>>>2]=a,(t+=4)+4>n)break}return G[t>>>2]=0,t-r}function J(e){for(var t=0,i=0;i=55296&&r<=57343&&++i,t+=4}return t}function $(e,t){U.set(e,t>>>0)}function Q(e,t,i){for(var r=0;r>>0]=e.charCodeAt(r);i||(U[t>>>0]=0)}function ee(e,t){return e%t>0&&(e+=t-e%t),e}function te(e){F=e,n.HEAP8=U=new Int8Array(e),n.HEAP16=B=new Int16Array(e),n.HEAP32=G=new Int32Array(e),n.HEAPU8=k=new Uint8Array(e),n.HEAPU16=H=new Uint16Array(e),n.HEAPU32=z=new Uint32Array(e),n.HEAPF32=V=new Float32Array(e),n.HEAPF64=j=new Float64Array(e)}var ie=n.INITIAL_MEMORY||16777216;(M=n.wasmMemory?n.wasmMemory:new WebAssembly.Memory({initial:ie/65536,maximum:65536}))&&(F=M.buffer),ie=F.byteLength,te(F);var re,ne=[],se=[],ae=[],oe=[];function le(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)de(n.preRun.shift());Ce(ne)}function he(){!n.noFSInit&&!Ve.init.initialized&&Ve.init(),He.init(),Ce(se)}function ue(){Ve.ignorePermissions=!1,Ce(ae)}function ce(){}function pe(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)fe(n.postRun.shift());Ce(oe)}function de(e){ne.unshift(e)}function fe(e){oe.unshift(e)}var me=0,ge=null,ye=null;function ve(e){me++,n.monitorRunDependencies&&n.monitorRunDependencies(me)}function Te(e){if(me--,n.monitorRunDependencies&&n.monitorRunDependencies(me),0==me&&(null!==ge&&(clearInterval(ge),ge=null),ye)){var t=ye;ye=null,t()}}function xe(e){n.onAbort&&n.onAbort(e),b(e+=""),A=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(e);throw r(t),t}function be(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}n.preloadedImages={},n.preloadedAudios={};var _e="data:application/octet-stream;base64,";function Ee(e){return be(e,_e)}var we="file://";function Se(e){return be(e,we)}var Ie,Me,Ae=lRe+"web-ifc.wasm";function De(){try{if(w)return new Uint8Array(w);if(m)return m(Ae);throw"both async and sync fetching of the wasm failed"}catch(e){xe(e)}}function Oe(){return w||!u&&!c||"function"!=typeof fetch||Se(Ae)?Promise.resolve().then(De):fetch(Ae,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+Ae+"'";return e.arrayBuffer()})).catch((function(){return De()}))}function Re(){var e={a:Pr};function t(e,t){var i=e.exports;n.asm=i,re=n.asm.X,Te()}function i(e){t(e.instance)}function s(t){return Oe().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){b("failed to asynchronously prepare wasm: "+e),xe(e)}))}if(ve(),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){return b("Module.instantiateWasm callback failed with error: "+e),!1}return(w||"function"!=typeof WebAssembly.instantiateStreaming||Ee(Ae)||Se(Ae)||"function"!=typeof fetch?s(i):fetch(Ae,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(e){return b("wasm streaming compile failed: "+e),b("falling back to ArrayBuffer instantiation"),s(i)}))}))).catch(r),{}}function Ce(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?re.get(i)():re.get(i)(t.arg):i(void 0===t.arg?null:t.arg)}else t(n)}}function Ne(e,t,i){return i&&i.length?n["dynCall_"+e].apply(null,[t].concat(i)):n["dynCall_"+e].call(null,t)}function Pe(e,t,i){return-1!=e.indexOf("j")?Ne(e,t,i):re.get(t).apply(null,i)}function Le(e,t,i,r){xe("Assertion failed: "+C(e)+", at: "+[t?C(t):"unknown filename",i,r?C(r):"unknown function"])}function Fe(e){return G[kr()>>>2]=e,e}Ee(Ae)||(Ae=T(Ae));var Ue={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i;i--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),i="/"===e.slice(-1);return!(e=Ue.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))&&!t&&(e="."),e&&i&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=Ue.splitPath(e),i=t[0],r=t[1];return i||r?(r&&(r=r.slice(0,r.length-1)),i+r):"."},basename:function(e){if("/"===e)return"/";var t=(e=(e=Ue.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.slice(t+1)},extname:function(e){return Ue.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return Ue.normalize(e.join("/"))},join2:function(e,t){return Ue.normalize(e+"/"+t)}};function ke(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}if(p)try{var t=tEt();return function(){return t.randomBytes(1)[0]}}catch(e){}return function(){xe("randomDevice")}}var Be={resolve:function(){for(var e="",t=!1,i=arguments.length-1;i>=-1&&!t;i--){var r=i>=0?arguments[i]:Ve.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t="/"===r.charAt(0)}return(t?"/":"")+(e=Ue.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function i(e){for(var t=0;t=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=Be.resolve(e).slice(1),t=Be.resolve(t).slice(1);for(var r=i(e.split("/")),n=i(t.split("/")),s=Math.min(r.length,n.length),a=s,o=0;o0?i.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=Cr(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(x(R(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(x(R(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(b(R(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(b(R(e.output,0)),e.output=[])}}};function Ge(e){for(var t=E(e,16384),i=Fr(t);e>>0]=0;return i}var ze={ops_table:null,mount:function(e){return ze.createNode(null,"/",16895,0)},createNode:function(e,t,i,r){if(Ve.isBlkdev(i)||Ve.isFIFO(i))throw new Ve.ErrnoError(63);ze.ops_table||(ze.ops_table={dir:{node:{getattr:ze.node_ops.getattr,setattr:ze.node_ops.setattr,lookup:ze.node_ops.lookup,mknod:ze.node_ops.mknod,rename:ze.node_ops.rename,unlink:ze.node_ops.unlink,rmdir:ze.node_ops.rmdir,readdir:ze.node_ops.readdir,symlink:ze.node_ops.symlink},stream:{llseek:ze.stream_ops.llseek}},file:{node:{getattr:ze.node_ops.getattr,setattr:ze.node_ops.setattr},stream:{llseek:ze.stream_ops.llseek,read:ze.stream_ops.read,write:ze.stream_ops.write,allocate:ze.stream_ops.allocate,mmap:ze.stream_ops.mmap,msync:ze.stream_ops.msync}},link:{node:{getattr:ze.node_ops.getattr,setattr:ze.node_ops.setattr,readlink:ze.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ze.node_ops.getattr,setattr:ze.node_ops.setattr},stream:Ve.chrdev_stream_ops}});var n=Ve.createNode(e,t,i,r);return Ve.isDir(n.mode)?(n.node_ops=ze.ops_table.dir.node,n.stream_ops=ze.ops_table.dir.stream,n.contents={}):Ve.isFile(n.mode)?(n.node_ops=ze.ops_table.file.node,n.stream_ops=ze.ops_table.file.stream,n.usedBytes=0,n.contents=null):Ve.isLink(n.mode)?(n.node_ops=ze.ops_table.link.node,n.stream_ops=ze.ops_table.link.stream):Ve.isChrdev(n.mode)&&(n.node_ops=ze.ops_table.chrdev.node,n.stream_ops=ze.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n),n},getFileDataAsRegularArray:function(e){if(e.contents&&e.contents.subarray){for(var t=[],i=0;i>>=0;var i=e.contents?e.contents.length:0;if(!(i>=t)){t=Math.max(t,i*(i<1048576?2:1.125)>>>0),0!=i&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(t>>>=0,e.usedBytes!=t){if(0==t)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var i=e.contents;return e.contents=new Uint8Array(t),i&&e.contents.set(i.subarray(0,Math.min(t,e.usedBytes))),void(e.usedBytes=t)}if(e.contents||(e.contents=[]),e.contents.length>t)e.contents.length=t;else for(;e.contents.length=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-n,r);if(a>8&&s.subarray)t.set(s.subarray(n,n+a),i);else for(var o=0;o0||r+i>>=0,U.set(l,a>>>0)}else o=!1,a=l.byteOffset;return{ptr:a,allocated:o}},msync:function(e,t,i,r,n){if(!Ve.isFile(e.node.mode))throw new Ve.ErrnoError(43);return 2&n||ze.stream_ops.write(e,t,0,r,i,!1),0}}},Ve={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(e,t){if(t=t||{},!(e=Be.resolve(Ve.cwd(),e)))return{path:"",node:null};var i={follow_mount:!0,recurse_count:0};for(var r in i)void 0===t[r]&&(t[r]=i[r]);if(t.recurse_count>8)throw new Ve.ErrnoError(32);for(var n=Ue.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),s=Ve.root,a="/",o=0;o40)throw new Ve.ErrnoError(32)}}return{path:a,node:s}},getPath:function(e){for(var t;;){if(Ve.isRoot(e)){var i=e.mount.mountpoint;return t?"/"!==i[i.length-1]?i+"/"+t:i+t:i}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var i=0,r=0;r>>0)%Ve.nameTable.length},hashAddNode:function(e){var t=Ve.hashName(e.parent.id,e.name);e.name_next=Ve.nameTable[t],Ve.nameTable[t]=e},hashRemoveNode:function(e){var t=Ve.hashName(e.parent.id,e.name);if(Ve.nameTable[t]===e)Ve.nameTable[t]=e.name_next;else for(var i=Ve.nameTable[t];i;){if(i.name_next===e){i.name_next=e.name_next;break}i=i.name_next}},lookupNode:function(e,t){var i=Ve.mayLookup(e);if(i)throw new Ve.ErrnoError(i,e);for(var r=Ve.hashName(e.id,t),n=Ve.nameTable[r];n;n=n.name_next){var s=n.name;if(n.parent.id===e.id&&s===t)return n}return Ve.lookup(e,t)},createNode:function(e,t,i,r){var n=new Ve.FSNode(e,t,i,r);return Ve.hashAddNode(n),n},destroyNode:function(e){Ve.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(e){var t=Ve.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return Ve.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){return Ve.nodePermissions(e,"x")||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{return Ve.lookupNode(e,t),20}catch(e){}return Ve.nodePermissions(e,"wx")},mayDelete:function(e,t,i){var r;try{r=Ve.lookupNode(e,t)}catch(e){return e.errno}var n=Ve.nodePermissions(e,"wx");if(n)return n;if(i){if(!Ve.isDir(r.mode))return 54;if(Ve.isRoot(r)||Ve.getPath(r)===Ve.cwd())return 10}else if(Ve.isDir(r.mode))return 31;return 0},mayOpen:function(e,t){return e?Ve.isLink(e.mode)?32:Ve.isDir(e.mode)&&("r"!==Ve.flagsToPermissionString(t)||512&t)?31:Ve.nodePermissions(e,Ve.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||Ve.MAX_OPEN_FDS;for(var i=e;i<=t;i++)if(!Ve.streams[i])return i;throw new Ve.ErrnoError(33)},getStream:function(e){return Ve.streams[e]},createStream:function(e,t,i){Ve.FSStream||(Ve.FSStream=function(){},Ve.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var r=new Ve.FSStream;for(var n in e)r[n]=e[n];e=r;var s=Ve.nextfd(t,i);return e.fd=s,Ve.streams[s]=e,e},closeStream:function(e){Ve.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=Ve.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new Ve.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){Ve.devices[e]={stream_ops:t}},getDevice:function(e){return Ve.devices[e]},getMounts:function(e){for(var t=[],i=[e];i.length;){var r=i.pop();t.push(r),i.push.apply(i,r.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),Ve.syncFSRequests++,Ve.syncFSRequests>1&&b("warning: "+Ve.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var i=Ve.getMounts(Ve.root.mount),r=0;function n(e){return Ve.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,n(e));++r>=i.length&&n(null)}i.forEach((function(t){if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount:function(e,t,i){var r,n="/"===i,s=!i;if(n&&Ve.root)throw new Ve.ErrnoError(10);if(!n&&!s){var a=Ve.lookupPath(i,{follow_mount:!1});if(i=a.path,r=a.node,Ve.isMountpoint(r))throw new Ve.ErrnoError(10);if(!Ve.isDir(r.mode))throw new Ve.ErrnoError(54)}var o={type:e,opts:t,mountpoint:i,mounts:[]},l=e.mount(o);return l.mount=o,o.root=l,n?Ve.root=l:r&&(r.mounted=o,r.mount&&r.mount.mounts.push(o)),l},unmount:function(e){var t=Ve.lookupPath(e,{follow_mount:!1});if(!Ve.isMountpoint(t.node))throw new Ve.ErrnoError(28);var i=t.node,r=i.mounted,n=Ve.getMounts(r);Object.keys(Ve.nameTable).forEach((function(e){for(var t=Ve.nameTable[e];t;){var i=t.name_next;-1!==n.indexOf(t.mount)&&Ve.destroyNode(t),t=i}})),i.mounted=null;var s=i.mount.mounts.indexOf(r);i.mount.mounts.splice(s,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,i){var r=Ve.lookupPath(e,{parent:!0}).node,n=Ue.basename(e);if(!n||"."===n||".."===n)throw new Ve.ErrnoError(28);var s=Ve.mayCreate(r,n);if(s)throw new Ve.ErrnoError(s);if(!r.node_ops.mknod)throw new Ve.ErrnoError(63);return r.node_ops.mknod(r,n,t,i)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,Ve.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,Ve.mknod(e,t,0)},mkdirTree:function(e,t){for(var i=e.split("/"),r="",n=0;n>>=0,r<0||n<0)throw new Ve.ErrnoError(28);if(Ve.isClosed(e))throw new Ve.ErrnoError(8);if(1==(2097155&e.flags))throw new Ve.ErrnoError(8);if(Ve.isDir(e.node.mode))throw new Ve.ErrnoError(31);if(!e.stream_ops.read)throw new Ve.ErrnoError(28);var s=void 0!==n;if(s){if(!e.seekable)throw new Ve.ErrnoError(70)}else n=e.position;var a=e.stream_ops.read(e,t,i,r,n);return s||(e.position+=a),a},write:function(e,t,i,r,n,s){if(i>>>=0,r<0||n<0)throw new Ve.ErrnoError(28);if(Ve.isClosed(e))throw new Ve.ErrnoError(8);if(!(2097155&e.flags))throw new Ve.ErrnoError(8);if(Ve.isDir(e.node.mode))throw new Ve.ErrnoError(31);if(!e.stream_ops.write)throw new Ve.ErrnoError(28);e.seekable&&1024&e.flags&&Ve.llseek(e,0,2);var a=void 0!==n;if(a){if(!e.seekable)throw new Ve.ErrnoError(70)}else n=e.position;var o=e.stream_ops.write(e,t,i,r,n,s);a||(e.position+=o);try{e.path&&Ve.trackingDelegate.onWriteToFile&&Ve.trackingDelegate.onWriteToFile(e.path)}catch(t){b("FS.trackingDelegate['onWriteToFile']('"+e.path+"') threw an exception: "+t.message)}return o},allocate:function(e,t,i){if(Ve.isClosed(e))throw new Ve.ErrnoError(8);if(t<0||i<=0)throw new Ve.ErrnoError(28);if(!(2097155&e.flags))throw new Ve.ErrnoError(8);if(!Ve.isFile(e.node.mode)&&!Ve.isDir(e.node.mode))throw new Ve.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ve.ErrnoError(138);e.stream_ops.allocate(e,t,i)},mmap:function(e,t,i,r,n,s){if(t>>>=0,2&n&&!(2&s)&&2!=(2097155&e.flags))throw new Ve.ErrnoError(2);if(1==(2097155&e.flags))throw new Ve.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ve.ErrnoError(43);return e.stream_ops.mmap(e,t,i,r,n,s)},msync:function(e,t,i,r,n){return i>>>=0,e&&e.stream_ops.msync?e.stream_ops.msync(e,t,i,r,n):0},munmap:function(e){return 0},ioctl:function(e,t,i){if(!e.stream_ops.ioctl)throw new Ve.ErrnoError(59);return e.stream_ops.ioctl(e,t,i)},readFile:function(e,t){if((t=t||{}).flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var i,r=Ve.open(e,t.flags),n=Ve.stat(e).size,s=new Uint8Array(n);return Ve.read(r,s,0,n,0),"utf8"===t.encoding?i=R(s,0):"binary"===t.encoding&&(i=s),Ve.close(r),i},writeFile:function(e,t,i){(i=i||{}).flags=i.flags||577;var r=Ve.open(e,i.flags,i.mode);if("string"==typeof t){var n=new Uint8Array(L(t)+1),s=N(t,n,0,n.length);Ve.write(r,n,0,s,void 0,i.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Ve.write(r,t,0,t.byteLength,void 0,i.canOwn)}Ve.close(r)},cwd:function(){return Ve.currentPath},chdir:function(e){var t=Ve.lookupPath(e,{follow:!0});if(null===t.node)throw new Ve.ErrnoError(44);if(!Ve.isDir(t.node.mode))throw new Ve.ErrnoError(54);var i=Ve.nodePermissions(t.node,"x");if(i)throw new Ve.ErrnoError(i);Ve.currentPath=t.path},createDefaultDirectories:function(){Ve.mkdir("/tmp"),Ve.mkdir("/home"),Ve.mkdir("/home/web_user")},createDefaultDevices:function(){Ve.mkdir("/dev"),Ve.registerDevice(Ve.makedev(1,3),{read:function(){return 0},write:function(e,t,i,r,n){return r}}),Ve.mkdev("/dev/null",Ve.makedev(1,3)),He.register(Ve.makedev(5,0),He.default_tty_ops),He.register(Ve.makedev(6,0),He.default_tty1_ops),Ve.mkdev("/dev/tty",Ve.makedev(5,0)),Ve.mkdev("/dev/tty1",Ve.makedev(6,0));var e=ke();Ve.createDevice("/dev","random",e),Ve.createDevice("/dev","urandom",e),Ve.mkdir("/dev/shm"),Ve.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){Ve.mkdir("/proc"),Ve.mkdir("/proc/self"),Ve.mkdir("/proc/self/fd"),Ve.mount({mount:function(){var e=Ve.createNode("/proc/self","fd",16895,73);return e.node_ops={lookup:function(e,t){var i=+t,r=Ve.getStream(i);if(!r)throw new Ve.ErrnoError(8);var n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return r.path}}};return n.parent=n,n}},e}},{},"/proc/self/fd")},createStandardStreams:function(){n.stdin?Ve.createDevice("/dev","stdin",n.stdin):Ve.symlink("/dev/tty","/dev/stdin"),n.stdout?Ve.createDevice("/dev","stdout",null,n.stdout):Ve.symlink("/dev/tty","/dev/stdout"),n.stderr?Ve.createDevice("/dev","stderr",null,n.stderr):Ve.symlink("/dev/tty1","/dev/stderr"),Ve.open("/dev/stdin",0),Ve.open("/dev/stdout",1),Ve.open("/dev/stderr",1)},ensureErrnoError:function(){Ve.ErrnoError||(Ve.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Ve.ErrnoError.prototype=new Error,Ve.ErrnoError.prototype.constructor=Ve.ErrnoError,[44].forEach((function(e){Ve.genericErrors[e]=new Ve.ErrnoError(e),Ve.genericErrors[e].stack=""})))},staticInit:function(){Ve.ensureErrnoError(),Ve.nameTable=new Array(4096),Ve.mount(ze,{},"/"),Ve.createDefaultDirectories(),Ve.createDefaultDevices(),Ve.createSpecialDirectories(),Ve.filesystems={MEMFS:ze}},init:function(e,t,i){Ve.init.initialized=!0,Ve.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=t||n.stdout,n.stderr=i||n.stderr,Ve.createStandardStreams()},quit:function(){Ve.init.initialized=!1;var e=n._fflush;e&&e(0);for(var t=0;tthis.length-1||e<0)){var t=e%this.chunkSize,i=e/this.chunkSize|0;return this.getter(i)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;n||(a=r);var o=this;o.setDataGetter((function(e){var t=e*a,n=(e+1)*a-1;if(n=Math.min(n,r-1),void 0===o.chunks[e]&&(o.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",i,!1),r!==a&&n.setRequestHeader("Range","bytes="+e+"-"+t),"undefined"!=typeof Uint8Array&&(n.responseType="arraybuffer"),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+i+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):Cr(n.responseText||"",!0)}(t,n)),void 0===o.chunks[e])throw new Error("doXHR failed!");return o.chunks[e]})),(s||!r)&&(a=r=1,r=this.getter(0).length,a=r,x("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!c)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new s;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var o={isDevice:!1,contents:a}}else o={isDevice:!1,url:i};var l=Ve.createFile(e,t,o,r,n);o.contents?l.contents=o.contents:o.url&&(l.contents=null,l.url=o.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var h={};return Object.keys(l.stream_ops).forEach((function(e){var t=l.stream_ops[e];h[e]=function(){return Ve.forceLoadFile(l),t.apply(null,arguments)}})),h.read=function(e,t,i,r,n){Ve.forceLoadFile(l);var s=e.node.contents;if(n>=s.length)return 0;var a=Math.min(s.length-n,r);if(s.slice)for(var o=0;o>>2]=r.dev,G[i+4>>>2]=0,G[i+8>>>2]=r.ino,G[i+12>>>2]=r.mode,G[i+16>>>2]=r.nlink,G[i+20>>>2]=r.uid,G[i+24>>>2]=r.gid,G[i+28>>>2]=r.rdev,G[i+32>>>2]=0,Me=[r.size>>>0,(Ie=r.size,+Math.abs(Ie)>=1?Ie>0?(0|Math.min(+Math.floor(Ie/4294967296),4294967295))>>>0:~~+Math.ceil((Ie-+(~~Ie>>>0))/4294967296)>>>0:0)],G[i+40>>>2]=Me[0],G[i+44>>>2]=Me[1],G[i+48>>>2]=4096,G[i+52>>>2]=r.blocks,G[i+56>>>2]=r.atime.getTime()/1e3|0,G[i+60>>>2]=0,G[i+64>>>2]=r.mtime.getTime()/1e3|0,G[i+68>>>2]=0,G[i+72>>>2]=r.ctime.getTime()/1e3|0,G[i+76>>>2]=0,Me=[r.ino>>>0,(Ie=r.ino,+Math.abs(Ie)>=1?Ie>0?(0|Math.min(+Math.floor(Ie/4294967296),4294967295))>>>0:~~+Math.ceil((Ie-+(~~Ie>>>0))/4294967296)>>>0:0)],G[i+80>>>2]=Me[0],G[i+84>>>2]=Me[1],0},doMsync:function(e,t,i,r,n){var s=k.slice(e,e+i);Ve.msync(t,s,n,i,r)},doMkdir:function(e,t){return"/"===(e=Ue.normalize(e))[e.length-1]&&(e=e.slice(0,e.length-1)),Ve.mkdir(e,t,0),0},doMknod:function(e,t,i){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Ve.mknod(e,t,i),0},doReadlink:function(e,t,i){if(i<=0)return-28;var r=Ve.readlink(e),n=Math.min(i,L(r)),s=U[t+n>>>0];return P(r,t,i+1),U[t+n>>>0]=s,n},doAccess:function(e,t){if(-8&t)return-28;var i;if(!(i=Ve.lookupPath(e,{follow:!0}).node))return-44;var r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&Ve.nodePermissions(i,r)?-2:0},doDup:function(e,t,i){var r=Ve.getStream(i);return r&&Ve.close(r),Ve.open(e,t,0,i,i).fd},doReadv:function(e,t,i,r){for(var n=0,s=0;s>>2],o=G[t+(8*s+4)>>>2],l=Ve.read(e,U,a,o,r);if(l<0)return-1;if(n+=l,l>>2],o=G[t+(8*s+4)>>>2],l=Ve.write(e,U,a,o,r);if(l<0)return-1;n+=l}return n},varargs:void 0,get:function(){return je.varargs+=4,G[je.varargs-4>>>2]},getStr:function(e){return C(e)},getStreamFromFD:function(e){var t=Ve.getStream(e);if(!t)throw new Ve.ErrnoError(8);return t},get64:function(e,t){return e}};function We(e,t,i){je.varargs=i;try{var r=je.getStreamFromFD(e);switch(t){case 0:return(n=je.get())<0?-28:Ve.open(r.path,r.flags,0,n).fd;case 1:case 2:case 13:case 14:return 0;case 3:return r.flags;case 4:var n=je.get();return r.flags|=n,0;case 12:return n=je.get(),B[n+0>>>1]=2,0;case 16:case 8:default:return-28;case 9:return Fe(28),-1}}catch(e){return(void 0===Ve||!(e instanceof Ve.ErrnoError))&&xe(e),-e.errno}}function Ye(e,t,i){je.varargs=i;try{var r=je.getStreamFromFD(e);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return r.tty?0:-59;case 21519:if(!r.tty)return-59;var n=je.get();return G[n>>>2]=0,0;case 21520:return r.tty?-28:-59;case 21531:return n=je.get(),Ve.ioctl(r,t,n);default:xe("bad ioctl syscall "+t)}}catch(e){return(void 0===Ve||!(e instanceof Ve.ErrnoError))&&xe(e),-e.errno}}function Xe(e,t,i){je.varargs=i;try{var r=je.getStr(e),n=je.get();return Ve.open(r,t,n).fd}catch(e){return(void 0===Ve||!(e instanceof Ve.ErrnoError))&&xe(e),-e.errno}}var qe={};function Ze(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Ke(e){return this.fromWireType(z[e>>>2])}var Je={},$e={},Qe={},et=48,tt=57;function it(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=et&&t<=tt?"_"+e:e}function rt(e,t){return e=it(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function nt(e,t){var i=rt(t,(function(e){this.name=t,this.message=e;var i=new Error(e).stack;void 0!==i&&(this.stack=this.toString()+"\n"+i.replace(/^Error(:[^\n]*)?\n/,""))}));return i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},i}var st=void 0;function at(e){throw new st(e)}function ot(e,t,i){function r(t){var r=i(t);r.length!==e.length&&at("Mismatched type converter count");for(var n=0;n>>0];)t+=dt[k[i++>>>0]];return t}var mt=void 0;function gt(e){throw new mt(e)}function yt(e,t,i){if(i=i||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var r=t.name;if(e||gt('type "'+r+'" must have a positive integer typeid pointer'),$e.hasOwnProperty(e)){if(i.ignoreDuplicateRegistrations)return;gt("Cannot register type '"+r+"' twice")}if($e[e]=t,delete Qe[e],Je.hasOwnProperty(e)){var n=Je[e];delete Je[e],n.forEach((function(e){e()}))}}function vt(e,t,i,r,n){var s=ct(i);yt(e,{name:t=ft(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:8,readValueFromPointer:function(e){var r;if(1===i)r=U;else if(2===i)r=B;else{if(4!==i)throw new TypeError("Unknown boolean type size: "+t);r=G}return this.fromWireType(r[e>>>s])},destructorFunction:null})}function Tt(e){if(!(this instanceof Lt&&e instanceof Lt))return!1;for(var t=this.$$.ptrType.registeredClass,i=this.$$.ptr,r=e.$$.ptrType.registeredClass,n=e.$$.ptr;t.baseClass;)i=t.upcast(i),t=t.baseClass;for(;r.baseClass;)n=r.upcast(n),r=r.baseClass;return t===r&&i===n}function xt(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function bt(e){gt(e.$$.ptrType.registeredClass.name+" instance already deleted")}var _t=!1;function Et(e){}function wt(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function St(e){e.count.value-=1,0===e.count.value&&wt(e)}function It(e){return"undefined"==typeof FinalizationGroup?(It=function(e){return e},e):(_t=new FinalizationGroup((function(e){for(var t=e.next();!t.done;t=e.next()){var i=t.value;i.ptr?St(i):console.warn("object already deleted: "+i.ptr)}})),Et=function(e){_t.unregister(e.$$)},(It=function(e){return _t.register(e,e.$$,e.$$),e})(e))}function Mt(){if(this.$$.ptr||bt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=It(Object.create(Object.getPrototypeOf(this),{$$:{value:xt(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function At(){this.$$.ptr||bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),Et(this),St(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Dt(){return!this.$$.ptr}var Ot=void 0,Rt=[];function Ct(){for(;Rt.length;){var e=Rt.pop();e.$$.deleteScheduled=!1,e.delete()}}function Nt(){return this.$$.ptr||bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),Rt.push(this),1===Rt.length&&Ot&&Ot(Ct),this.$$.deleteScheduled=!0,this}function Pt(){Lt.prototype.isAliasOf=Tt,Lt.prototype.clone=Mt,Lt.prototype.delete=At,Lt.prototype.isDeleted=Dt,Lt.prototype.deleteLater=Nt}function Lt(){}var Ft={};function Ut(e,t,i){if(void 0===e[t].overloadTable){var r=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||gt("Function '"+i+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}}function kt(e,t,i){n.hasOwnProperty(e)?((void 0===i||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[i])&>("Cannot register public name '"+e+"' twice"),Ut(n,e,e),n.hasOwnProperty(i)&>("Cannot register multiple overloads of a function with the same number of arguments ("+i+")!"),n[e].overloadTable[i]=t):(n[e]=t,void 0!==i&&(n[e].numArguments=i))}function Bt(e,t,i,r,n,s,a,o){this.name=e,this.constructor=t,this.instancePrototype=i,this.rawDestructor=r,this.baseClass=n,this.getActualType=s,this.upcast=a,this.downcast=o,this.pureVirtualFunctions=[]}function Ht(e,t,i){for(;t!==i;)t.upcast||gt("Expected null or instance of "+i.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Gt(e,t){if(null===t)return this.isReference&>("null is not a valid "+this.name),0;t.$$||gt('Cannot pass "'+Si(t)+'" as a '+this.name),t.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name);var i=t.$$.ptrType.registeredClass;return Ht(t.$$.ptr,i,this.registeredClass)}function zt(e,t){var i;if(null===t)return this.isReference&>("null is not a valid "+this.name),this.isSmartPointer?(i=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,i),i):0;t.$$||gt('Cannot pass "'+Si(t)+'" as a '+this.name),t.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&>("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;if(i=Ht(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&>("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?i=t.$$.smartPtr:gt("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:i=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)i=t.$$.smartPtr;else{var n=t.clone();i=this.rawShare(i,Ei((function(){n.delete()}))),null!==e&&e.push(this.rawDestructor,i)}break;default:gt("Unsupporting sharing policy")}return i}function Vt(e,t){if(null===t)return this.isReference&>("null is not a valid "+this.name),0;t.$$||gt('Cannot pass "'+Si(t)+'" as a '+this.name),t.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&>("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var i=t.$$.ptrType.registeredClass;return Ht(t.$$.ptr,i,this.registeredClass)}function jt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Wt(e){this.rawDestructor&&this.rawDestructor(e)}function Yt(e){null!==e&&e.delete()}function Xt(e,t,i){if(t===i)return e;if(void 0===i.baseClass)return null;var r=Xt(e,t,i.baseClass);return null===r?null:i.downcast(r)}function qt(){return Object.keys($t).length}function Zt(){var e=[];for(var t in $t)$t.hasOwnProperty(t)&&e.push($t[t]);return e}function Kt(e){Ot=e,Rt.length&&Ot&&Ot(Ct)}function Jt(){n.getInheritedInstanceCount=qt,n.getLiveInheritedInstances=Zt,n.flushPendingDeletes=Ct,n.setDelayFunction=Kt}var $t={};function Qt(e,t){for(void 0===t&>("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function ei(e,t){return t=Qt(e,t),$t[t]}function ti(e,t){return(!t.ptrType||!t.ptr)&&at("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&at("Both smartPtrType and smartPtr must be specified"),t.count={value:1},It(Object.create(e,{$$:{value:t}}))}function ii(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var i=ei(this.registeredClass,t);if(void 0!==i){if(0===i.$$.count.value)return i.$$.ptr=t,i.$$.smartPtr=e,i.clone();var r=i.clone();return this.destructor(e),r}function n(){return this.isSmartPointer?ti(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ti(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,a=this.registeredClass.getActualType(t),o=Ft[a];if(!o)return n.call(this);s=this.isConst?o.constPointerType:o.pointerType;var l=Xt(t,this.registeredClass,s.registeredClass);return null===l?n.call(this):this.isSmartPointer?ti(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:e}):ti(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}function ri(){ni.prototype.getPointee=jt,ni.prototype.destructor=Wt,ni.prototype.argPackAdvance=8,ni.prototype.readValueFromPointer=Ke,ni.prototype.deleteObject=Yt,ni.prototype.fromWireType=ii}function ni(e,t,i,r,n,s,a,o,l,h,u){this.name=e,this.registeredClass=t,this.isReference=i,this.isConst=r,this.isSmartPointer=n,this.pointeeType=s,this.sharingPolicy=a,this.rawGetPointee=o,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=u,n||void 0!==t.baseClass?this.toWireType=zt:r?(this.toWireType=Gt,this.destructorFunction=null):(this.toWireType=Vt,this.destructorFunction=null)}function si(e,t,i){n.hasOwnProperty(e)||at("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==i?n[e].overloadTable[i]=t:(n[e]=t,n[e].argCount=i)}function ai(e,t){D(e.indexOf("j")>=0,"getDynCaller should only be called with i64 sigs");var i=[];return function(){i.length=arguments.length;for(var r=0;r>2)+r>>>0]);return i}function di(e,t,i,r,n,s){D(t>0);var a=pi(t,i);n=oi(r,n);var o=[s],l=[];ot([],[e],(function(e){var i="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new mt("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){ui("Cannot construct "+e.name+" due to unbound types",a)},ot([],a,(function(r){return e.registeredClass.constructor_body[t-1]=function(){arguments.length!==t-1&>(i+" called with "+arguments.length+" arguments, expected "+(t-1)),l.length=0,o.length=t;for(var e=1;e0?", ":"")+c),p+=(h?"var rv = ":"")+"invoker(fn"+(c.length>0?", ":"")+c+");\n",o)p+="runDestructors(destructors);\n";else for(l=a?1:2;l4&&0==--vi[e].refcount&&(vi[e]=void 0,yi.push(e))}function xi(){for(var e=0,t=5;t>>2])};case 3:return function(e){return this.fromWireType(j[e>>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Mi(e,t,i){var r=ct(i);yt(e,{name:t=ft(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+Si(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:Ii(t,r),destructorFunction:null})}function Ai(e,t,i,r,n,s){var a=pi(t,i);e=ft(e),n=oi(r,n),kt(e,(function(){ui("Cannot call "+e+" due to unbound types",a)}),t-1),ot([],a,(function(i){var r=[i[0],null].concat(i.slice(1));return si(e,mi(e,r,null,n,s),t-1),[]}))}function Di(e,t,i){switch(t){case 0:return i?function(e){return U[e>>>0]}:function(e){return k[e>>>0]};case 1:return i?function(e){return B[e>>>1]}:function(e){return H[e>>>1]};case 2:return i?function(e){return G[e>>>2]}:function(e){return z[e>>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function Oi(e,t,i,r,n){t=ft(t),-1===n&&(n=4294967295);var s=ct(i),a=function(e){return e};if(0===r){var o=32-8*i;a=function(e){return e<>>o}}var l=-1!=t.indexOf("unsigned");yt(e,{name:t,fromWireType:a,toWireType:function(e,i){if("number"!=typeof i&&"boolean"!=typeof i)throw new TypeError('Cannot convert "'+Si(i)+'" to '+this.name);if(in)throw new TypeError('Passing a number "'+Si(i)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+r+", "+n+"]!");return l?i>>>0:0|i},argPackAdvance:8,readValueFromPointer:Di(t,s,0!==r),destructorFunction:null})}function Ri(e,t,i){var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function n(e){var t=z,i=t[(e>>=2)>>>0],n=t[e+1>>>0];return new r(F,n,i)}yt(e,{name:i=ft(i),fromWireType:n,argPackAdvance:8,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})}function Ci(e,t){var i="std::string"===(t=ft(t));yt(e,{name:t,fromWireType:function(e){var t,r=z[e>>>2];if(i)for(var n=e+4,s=0;s<=r;++s){var a=e+4+s;if(s==r||0==k[a>>>0]){var o=C(n,a-n);void 0===t?t=o:(t+=String.fromCharCode(0),t+=o),n=a+1}}else{var l=new Array(r);for(s=0;s>>0]);t=l.join("")}return Br(e),t},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r="string"==typeof t;r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||gt("Cannot pass non-string to std::string");var n=(i&&r?function(){return L(t)}:function(){return t.length})(),s=Fr(4+n+1);if(z[(s>>>=0)>>>2]=n,i&&r)P(t,s+4,n+1);else if(r)for(var a=0;a255&&(Br(s),gt("String has UTF-16 code units that do not fit in 8 bits")),k[s+4+a>>>0]=o}else for(a=0;a>>0]=t[a];return null!==e&&e.push(Br,s),s},argPackAdvance:8,readValueFromPointer:Ke,destructorFunction:function(e){Br(e)}})}function Ni(e,t,i){var r,n,s,a,o;i=ft(i),2===t?(r=Y,n=X,a=q,s=function(){return H},o=1):4===t&&(r=Z,n=K,a=J,s=function(){return z},o=2),yt(e,{name:i,fromWireType:function(e){for(var i,n=z[e>>>2],a=s(),l=e+4,h=0;h<=n;++h){var u=e+4+h*t;if(h==n||0==a[u>>>o]){var c=r(l,u-l);void 0===i?i=c:(i+=String.fromCharCode(0),i+=c),l=u+t}}return Br(e),i},toWireType:function(e,r){"string"!=typeof r&>("Cannot pass non-string to C++ string type "+i);var s=a(r),l=Fr(4+s+t);return z[(l>>>=0)>>>2]=s>>o,n(r,l+4,s+t),null!==e&&e.push(Br,l),l},argPackAdvance:8,readValueFromPointer:Ke,destructorFunction:function(e){Br(e)}})}function Pi(e,t,i,r,n,s){qe[e]={name:ft(t),rawConstructor:oi(i,r),rawDestructor:oi(n,s),elements:[]}}function Li(e,t,i,r,n,s,a,o,l){qe[e].elements.push({getterReturnType:t,getter:oi(i,r),getterContext:n,setterArgumentType:s,setter:oi(a,o),setterContext:l})}function Fi(e,t,i,r,n,s){ht[e]={name:ft(t),rawConstructor:oi(i,r),rawDestructor:oi(n,s),fields:[]}}function Ui(e,t,i,r,n,s,a,o,l,h){ht[e].fields.push({fieldName:ft(t),getterReturnType:i,getter:oi(r,n),getterContext:s,setterArgumentType:a,setter:oi(o,l),setterContext:h})}function ki(e,t){yt(e,{isVoid:!0,name:t=ft(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}function Bi(e){return e||gt("Cannot use deleted val. handle = "+e),vi[e].value}function Hi(e,t){var i=$e[e];return void 0===i&>(t+" has unknown type "+hi(e)),i}function Gi(e,t,i){e=Bi(e),t=Hi(t,"emval::as");var r=[],n=Ei(r);return G[i>>>2]=n,t.toWireType(r,e)}function zi(e,t){for(var i=new Array(e),r=0;r>2)+r>>>0],"parameter "+r);return i}function Vi(e,t,i,r){e=Bi(e);for(var n=zi(t,i),s=new Array(t),a=0;a4&&(vi[e].refcount+=1)}function Ji(e,t){return(e=Bi(e))instanceof(t=Bi(t))}function $i(e){return"number"==typeof(e=Bi(e))}function Qi(){return Ei([])}function er(e){return Ei(Yi(e))}function tr(){return Ei({})}function ir(e){Ze(vi[e].value),Ti(e)}function rr(e,t,i){e=Bi(e),t=Bi(t),i=Bi(i),e[t]=i}function nr(e,t){return Ei((e=Hi(e,"_emval_take_value")).readValueFromPointer(t))}function sr(){xe()}ji=p?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof dateNow?dateNow:function(){return performance.now()};var ar=!0;function or(e,t){var i;if(0===e)i=Date.now();else{if(1!==e&&4!==e||!ar)return Fe(28),-1;i=ji()}return G[t>>>2]=i/1e3|0,G[t+4>>>2]=i%1e3*1e3*1e3|0,0}function lr(e,t,i){k.copyWithin(e>>>0,t>>>0,t+i>>>0)}function hr(){return k.length}function ur(e){try{return M.grow(e-F.byteLength+65535>>>16),te(M.buffer),1}catch(e){}}function cr(e){e>>>=0;var t=hr(),i=4294967296;if(e>i)return!1;for(var r=1;r<=4;r*=2){var n=t*(1+.2/r);if(n=Math.min(n,e+100663296),ur(Math.min(i,ee(Math.max(16777216,e,n),65536))))return!0}return!1}var pr={};function dr(){return l||"./this.program"}function fr(){if(!fr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:dr()};for(var t in pr)e[t]=pr[t];var i=[];for(var t in e)i.push(t+"="+e[t]);fr.strings=i}return fr.strings}function mr(e,t){try{var i=0;return fr().forEach((function(r,n){var s=t+i;G[e+4*n>>>2]=s,Q(r,s),i+=r.length+1})),0}catch(e){return(void 0===Ve||!(e instanceof Ve.ErrnoError))&&xe(e),e.errno}}function gr(e,t){try{var i=fr();G[e>>>2]=i.length;var r=0;return i.forEach((function(e){r+=e.length+1})),G[t>>>2]=r,0}catch(e){return(void 0===Ve||!(e instanceof Ve.ErrnoError))&&xe(e),e.errno}}function yr(e){try{var t=je.getStreamFromFD(e);return Ve.close(t),0}catch(e){return(void 0===Ve||!(e instanceof Ve.ErrnoError))&&xe(e),e.errno}}function vr(e,t,i,r){try{var n=je.getStreamFromFD(e),s=je.doReadv(n,t,i);return G[r>>>2]=s,0}catch(e){return(void 0===Ve||!(e instanceof Ve.ErrnoError))&&xe(e),e.errno}}function Tr(e,t,i,r,n){try{var s=je.getStreamFromFD(e),a=4294967296*i+(t>>>0),o=9007199254740992;return a<=-o||a>=o?-61:(Ve.llseek(s,a,r),Me=[s.position>>>0,(Ie=s.position,+Math.abs(Ie)>=1?Ie>0?(0|Math.min(+Math.floor(Ie/4294967296),4294967295))>>>0:~~+Math.ceil((Ie-+(~~Ie>>>0))/4294967296)>>>0:0)],G[n>>>2]=Me[0],G[n+4>>>2]=Me[1],s.getdents&&0===a&&0===r&&(s.getdents=null),0)}catch(e){return(void 0===Ve||!(e instanceof Ve.ErrnoError))&&xe(e),e.errno}}function xr(e,t,i,r){try{var n=je.getStreamFromFD(e),s=je.doWritev(n,t,i);return G[r>>>2]=s,0}catch(e){return(void 0===Ve||!(e instanceof Ve.ErrnoError))&&xe(e),e.errno}}function br(e){I(0|e)}function _r(e){return e%4==0&&(e%100!=0||e%400==0)}function Er(e,t){for(var i=0,r=0;r<=t;i+=e[r++]);return i}var wr=[31,29,31,30,31,30,31,31,30,31,30,31],Sr=[31,28,31,30,31,30,31,31,30,31,30,31];function Ir(e,t){for(var i=new Date(e.getTime());t>0;){var r=_r(i.getFullYear()),n=i.getMonth(),s=(r?wr:Sr)[n];if(!(t>s-i.getDate()))return i.setDate(i.getDate()+t),i;t-=s-i.getDate()+1,i.setDate(1),n<11?i.setMonth(n+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1))}return i}function Mr(e,t,i,r){var n=G[r+40>>>2],s={tm_sec:G[r>>>2],tm_min:G[r+4>>>2],tm_hour:G[r+8>>>2],tm_mday:G[r+12>>>2],tm_mon:G[r+16>>>2],tm_year:G[r+20>>>2],tm_wday:G[r+24>>>2],tm_yday:G[r+28>>>2],tm_isdst:G[r+32>>>2],tm_gmtoff:G[r+36>>>2],tm_zone:n?C(n):""},a=C(i),o={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in o)a=a.replace(new RegExp(l,"g"),o[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(e,t,i){for(var r="number"==typeof e?e.toString():e||"";r.length0?1:0}var r;return 0===(r=i(e.getFullYear()-t.getFullYear()))&&0===(r=i(e.getMonth()-t.getMonth()))&&(r=i(e.getDate()-t.getDate())),r}function f(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var t=Ir(new Date(e.tm_year+1900,0,1),e.tm_yday),i=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),n=f(i),s=f(r);return d(n,t)<=0?d(s,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var g={"%a":function(e){return h[e.tm_wday].substring(0,3)},"%A":function(e){return h[e.tm_wday]},"%b":function(e){return u[e.tm_mon].substring(0,3)},"%B":function(e){return u[e.tm_mon]},"%C":function(e){return p((e.tm_year+1900)/100|0,2)},"%d":function(e){return p(e.tm_mday,2)},"%e":function(e){return c(e.tm_mday,2," ")},"%g":function(e){return m(e).toString().substring(2)},"%G":function(e){return m(e)},"%H":function(e){return p(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),p(t,2)},"%j":function(e){return p(e.tm_mday+Er(_r(e.tm_year+1900)?wr:Sr,e.tm_mon-1),3)},"%m":function(e){return p(e.tm_mon+1,2)},"%M":function(e){return p(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return p(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),i=0===t.getDay()?t:Ir(t,7-t.getDay()),r=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(d(i,r)<0){var n=Er(_r(r.getFullYear())?wr:Sr,r.getMonth()-1)-31,s=31-i.getDate()+n+r.getDate();return p(Math.ceil(s/7),2)}return 0===d(i,t)?"01":"00"},"%V":function(e){var t,i=new Date(e.tm_year+1900,0,4),r=new Date(e.tm_year+1901,0,4),n=f(i),s=f(r),a=Ir(new Date(e.tm_year+1900,0,1),e.tm_yday);return d(a,n)<0?"53":d(s,a)<=0?"01":(t=n.getFullYear()=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(i?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in g)a.indexOf(l)>=0&&(a=a.replace(new RegExp(l,"g"),g[l](s)));var y=Cr(a,!1);return y.length>t?0:($(y,e),y.length-1)}function Ar(e,t,i,r){return Mr(e,t,i,r)}var Dr=function(e,t,i,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ve.nextInode++,this.name=t,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=r},Or=365,Rr=146;function Cr(e,t,i){var r=i>0?i:L(e)+1,n=new Array(r),s=N(e,n,0,n.length);return t&&(n.length=s),n}Object.defineProperties(Dr.prototype,{read:{get:function(){return(this.mode&Or)===Or},set:function(e){e?this.mode|=Or:this.mode&=~Or}},write:{get:function(){return(this.mode&Rr)===Rr},set:function(e){e?this.mode|=Rr:this.mode&=~Rr}},isFolder:{get:function(){return Ve.isDir(this.mode)}},isDevice:{get:function(){return Ve.isChrdev(this.mode)}}}),Ve.FSNode=Dr,Ve.staticInit(),n.FS_createPath=Ve.createPath,n.FS_createDataFile=Ve.createDataFile,n.FS_createPreloadedFile=Ve.createPreloadedFile,n.FS_createLazyFile=Ve.createLazyFile,n.FS_createDevice=Ve.createDevice,n.FS_unlink=Ve.unlink,st=n.InternalError=nt(Error,"InternalError"),pt(),mt=n.BindingError=nt(Error,"BindingError"),Pt(),ri(),Jt(),li=n.UnboundTypeError=nt(Error,"UnboundTypeError"),_i(),se.push({func:function(){Lr()}});var Nr,Pr={x:Le,A:We,P:Ye,Q:Xe,U:lt,s:ut,S:vt,v:ci,u:di,d:gi,R:wi,C:Mi,h:Ai,m:Oi,k:Ri,D:Ci,w:Ni,V:Pi,g:Li,t:Fi,j:Ui,T:ki,q:Gi,W:Vi,b:Ti,F:qi,n:Zi,l:Ki,N:Ji,E:$i,y:Qi,f:er,r:tr,p:ir,i:rr,e:nr,c:sr,M:or,I:lr,o:cr,K:mr,L:gr,B:yr,O:vr,G:Tr,z:xr,a:M,H:br,J:Ar},Lr=(Re(),n.___wasm_call_ctors=function(){return(Lr=n.___wasm_call_ctors=n.asm.Y).apply(null,arguments)}),Fr=(n._main=function(){return(n._main=n.asm.Z).apply(null,arguments)},n._malloc=function(){return(Fr=n._malloc=n.asm._).apply(null,arguments)}),Ur=n.___getTypeName=function(){return(Ur=n.___getTypeName=n.asm.$).apply(null,arguments)},kr=(n.___embind_register_native_and_builtin_types=function(){return(n.___embind_register_native_and_builtin_types=n.asm.aa).apply(null,arguments)},n.___errno_location=function(){return(kr=n.___errno_location=n.asm.ba).apply(null,arguments)}),Br=n._free=function(){return(Br=n._free=n.asm.ca).apply(null,arguments)};function Hr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Gr(e){var t=n._main;try{Vr(t(0,0),!0)}catch(e){if(e instanceof Hr)return;if("unwind"==e)return void(S=!0);var i=e;e&&"object"==typeof e&&e.stack&&(i=[e,e.stack]),b("exception thrown: "+i),h(1,e)}}function zr(e){function i(){Nr||(Nr=!0,n.calledRun=!0,!A&&(he(),ue(),t(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),jr&&Gr(),pe()))}e=e||o,me>0||(le(),me>0)||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),i()}),1)):i())}function Vr(e,t){t&&S&&0===e||(S||(ce(),n.onExit&&n.onExit(e),A=!0),h(e,new Hr(e)))}if(n.dynCall_jiji=function(){return(n.dynCall_jiji=n.asm.da).apply(null,arguments)},n.dynCall_viijii=function(){return(n.dynCall_viijii=n.asm.ea).apply(null,arguments)},n.dynCall_iiiiiijj=function(){return(n.dynCall_iiiiiijj=n.asm.fa).apply(null,arguments)},n.dynCall_iiiiij=function(){return(n.dynCall_iiiiij=n.asm.ga).apply(null,arguments)},n.dynCall_iiiiijj=function(){return(n.dynCall_iiiiijj=n.asm.ha).apply(null,arguments)},n.addRunDependency=ve,n.removeRunDependency=Te,n.FS_createPath=Ve.createPath,n.FS_createDataFile=Ve.createDataFile,n.FS_createPreloadedFile=Ve.createPreloadedFile,n.FS_createLazyFile=Ve.createLazyFile,n.FS_createDevice=Ve.createDevice,n.FS_unlink=Ve.unlink,n.FS=Ve,ye=function e(){Nr||zr(),Nr||(ye=e)},n.run=zr,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();var jr=!0;return n.noInitialRun&&(jr=!1),S=!0,zr(),e.ready});"object"==typeof e&&"object"==typeof t?t.exports=r:"function"==typeof define&&define.amd?define([],(function(){return r})):"object"==typeof e&&(e.WebIFCWasm=r)}}),iEt=3821786052,nEt=2296667514,sEt=3630933823,aEt=4288193352,oEt=2874132201,lEt=618182010,cEt=1635779807,uEt=2603310189,hEt=3406155212,pEt=1634111441,dEt=177149247,fEt=1411407467,mEt=3352864051,gEt=2056796094,vEt=1871374353,yEt=3087945054,TEt=3001207471,EEt=325726236,bEt=749761778,xEt=3199563722,IEt=2483840362,_Et=3379348081,SEt=3239324667,wEt=4263986512,REt=53199957,MEt=2029264950,DEt=3512275521,CEt=1674181508,AEt=669184980,OEt=639542469,PEt=411424972,NEt=130549933,LEt=3869604511,FEt=3798115385,HEt=1310608509,UEt=2705031697,BEt=3460190687,kEt=3207858831,GEt=277319702,VEt=1532957894,zEt=4261334040,jEt=3125803723,WEt=2740243338,qEt=1967976161,YEt=2461110595,XEt=2887950389,$Et=167062518,KEt=753842376,ZEt=2906023776,JEt=819618141,QEt=4196446775,e1t=3649138523,t1t=616511568,r1t=1334484129,i1t=32344328,n1t=231477066,s1t=3649129432,a1t=2736907675,o1t=4037036970,l1t=1136057603,c1t=1560379544,u1t=3367102660,h1t=1387855156,p1t=2069777674,d1t=1260505505,f1t=4182860854,m1t=2581212453,g1t=2713105998,v1t=644574406,y1t=963979645,T1t=4031249490,E1t=3299480353,b1t=2979338954,x1t=39481116,I1t=1095909175,_1t=1909888760,S1t=1950629157,w1t=3124254112,R1t=1177604601,M1t=2938176219,D1t=2188180465,C1t=2898889636,A1t=635142910,O1t=395041908,P1t=3758799889,N1t=3293546465,L1t=1051757585,F1t=2674252688,H1t=4217484030,U1t=1285652485,B1t=3999819293,k1t=3203706013,G1t=1123145078,V1t=574549367,z1t=1675464909,j1t=2059837836,W1t=59481748,q1t=3749851601,Y1t=3486308946,X1t=3331915920,$1t=1416205885,K1t=3150382593,Z1t=3902619387,J1t=2951183804,Q1t=3296154744,ebt=2197970202,tbt=2611217952,rbt=2937912522,ibt=1383045692,nbt=1062206242,sbt=1677625105,abt=3893394355,obt=747523909,lbt=647927063,cbt=2205249479,ubt=639361253,hbt=2301859152,pbt=776857604,dbt=3285139300,fbt=3264961684,mbt=843113511,gbt=905975707,vbt=300633059,ybt=3221913625,Tbt=400855858,Ebt=2542286263,bbt=3875453745,xbt=3732776249,Ibt=15328376,_bt=2485617015,Sbt=1485152156,wbt=3571504051,Rbt=3850581409,Mbt=2272882330,Dbt=2816379211,Cbt=2510884976,Abt=370225590,Obt=1981873012,Pbt=2859738748,Nbt=45288368,Lbt=2614616156,Fbt=2732653382,Hbt=775493141,Ubt=1959218052,Bbt=3898045240,kbt=2185764099,Gbt=1060000209,Vbt=4105962743,zbt=488727124,jbt=1525564444,Wbt=2559216714,qbt=2574617495,Ybt=3419103109,Xbt=3050246964,$bt=3293443760,Kbt=25142252,Zbt=578613899,Jbt=2889183280,Qbt=2713554722,ext=4136498852,txt=335055490,rxt=3640358203,ixt=2954562838,nxt=1785450214,sxt=1466758467,axt=3895139033,oxt=1419761937,lxt=602808272,cxt=1973544240,uxt=1916426348,hxt=3295246426,pxt=1815067380,dxt=2506170314,fxt=2147822146,mxt=539742890,gxt=3495092785,vxt=1457835157,yxt=2601014836,Txt=2827736869,Ext=2629017746,bxt=1186437898,xxt=3800577675,Ixt=1105321065,_xt=2367409068,Sxt=3510044353,wxt=1213902940,Rxt=4074379575,Mxt=3961806047,Dxt=3426335179,Cxt=1306400036,Axt=3632507154,Oxt=1765591967,Pxt=1045800335,Nxt=2949456006,Lxt=32440307,Fxt=1335981549,Hxt=2635815018,Uxt=1945343521,Bxt=1052013943,kxt=1599208980,Gxt=562808652,Vxt=1062813311,zxt=2063403501,jxt=1945004755,Wxt=3256556792,qxt=3040386961,Yxt=3849074793,Xxt=3041715199,$xt=3205830791,Kxt=1154170062,Zxt=770865208,Jxt=3732053477,Qxt=395920057,eIt=2963535650,tIt=1714330368,rIt=3242481149,iIt=526551008,nIt=2323601079,sIt=445594917,aIt=4006246654,oIt=342316401,lIt=869906466,cIt=3518393246,uIt=3760055223,hIt=1360408905,pIt=2030761528,dIt=3900360178,fIt=476780140,mIt=1472233963,gIt=1904799276,vIt=663422040,yIt=862014818,TIt=2417008758,EIt=3310460725,bIt=3277789161,xIt=264262732,IIt=1534661035,_It=402227799,SIt=1217240411,wIt=1003880860,RIt=712377611,MIt=1758889154,DIt=4123344466,CIt=2397081782,AIt=1623761950,OIt=2590856083,PIt=1883228015,NIt=339256511,LIt=2777663545,FIt=1704287377,HIt=2835456948,UIt=1658829314,BIt=2107101300,kIt=2814081492,GIt=132023988,VIt=3747195512,zIt=3174744832,jIt=484807127,WIt=3390157468,qIt=4148101412,YIt=211053100,XIt=4024345920,$It=297599258,KIt=4294318154,ZIt=3200245327,JIt=1437805879,QIt=1209101575,e_t=2853485674,t_t=2242383968,r_t=1040185647,i_t=3548104201,n_t=477187591,s_t=2804161546,a_t=2556980723,o_t=2047409740,l_t=1809719519,c_t=803316827,u_t=3008276851,h_t=807026263,p_t=3737207727,d_t=24185140,f_t=1310830890,m_t=4219587988,g_t=3415622556,v_t=346874300,y_t=647756555,T_t=2489546625,E_t=2827207264,b_t=2143335405,x_t=1287392070,I_t=738692330,__t=374418227,S_t=315944413,w_t=819412036,R_t=1810631287,M_t=1426591983,D_t=4222183408,C_t=2652556860,A_t=2058353004,O_t=3907093117,P_t=4278956645,N_t=3198132628,L_t=182646315,F_t=4037862832,H_t=2188021234,U_t=3815607619,B_t=3132237377,k_t=1482959167,G_t=987401354,V_t=1834744321,z_t=707683696,j_t=1339347760,W_t=2223149337,q_t=2297155007,Y_t=3508470533,X_t=3009222698,$_t=900683007,K_t=1893162501,Z_t=263784265,J_t=4238390223,Q_t=1509553395,eSt=1268542332,tSt=3493046030,rSt=4095422895,iSt=987898635,nSt=3448662350,sSt=2453401579,aSt=4142052618,oSt=3590301190,lSt=3009204131,cSt=852622518,uSt=178086475,hSt=2706460486,pSt=812098782,dSt=3319311131,fSt=1251058090,mSt=2068733104,gSt=1806887404,vSt=1484403080,ySt=3905492369,TSt=3570813810,ESt=2571569899,bSt=178912537,xSt=2294589976,ISt=1437953363,_St=2133299955,SSt=4175244083,wSt=3946677679,RSt=3113134337,MSt=2391368822,DSt=3741457305,CSt=3020489413,ASt=2176052936,OSt=4288270099,PSt=572779678,NSt=3827777499,LSt=428585644,FSt=1585845231,HSt=76236018,USt=1051575348,BSt=2655187982,kSt=3452421091,GSt=4162380809,VSt=629592764,zSt=1161773419,jSt=1566485204,WSt=1402838566,qSt=125510826,YSt=2604431987,XSt=4266656042,$St=1520743889,KSt=3422422726,ZSt=1281925730,JSt=3092502836,QSt=388784114,ewt=1154579445,twt=2624227202,rwt=1008929658,iwt=1425443689,nwt=3057273783,swt=2347385850,awt=1838606355,owt=1847130766,lwt=3708119e3,cwt=2852063980,uwt=760658860,hwt=2022407955,pwt=248100487,dwt=3303938423,fwt=1303795690,mwt=1847252529,gwt=2199411900,vwt=2235152071,ywt=164193824,Twt=3079605661,Ewt=3404854881,bwt=552965576,xwt=3265635763,Iwt=853536259,_wt=1507914824,Swt=2597039031,wwt=377706215,Rwt=2108223431,Mwt=1437502449,Dwt=1114901282,Cwt=1073191201,Awt=1911478936,Owt=3181161470,Pwt=3368373690,Nwt=2998442950,Lwt=2706619895,Fwt=2474470126,Hwt=977012517,Uwt=1918398963,Bwt=3888040117,kwt=219451334,Gwt=3701648758,Vwt=2251480897,zwt=4143007308,jwt=590820931,Wwt=3388369263,qwt=3505215534,Ywt=2485787929,Xwt=2665983363,$wt=3588315303,Kwt=3079942009,Zwt=4251960020,Jwt=1411181986,Qwt=643959842,eRt=1029017970,tRt=144952367,rRt=3694346114,iRt=2837617999,nRt=1207048766,sRt=2529465313,aRt=2519244187,oRt=1682466193,lRt=2382730787,cRt=3566463478,uRt=3327091369,hRt=2077209135,pRt=101040310,dRt=3021840470,fRt=2483315170,mRt=2226359599,gRt=1687234759,vRt=1158309216,yRt=310824031,TRt=804291784,ERt=3612865200,bRt=4231323485,xRt=597895409,IRt=2004835150,_Rt=603570806,SRt=1663979128,wRt=220341763,RRt=3171933400,MRt=1156407060,DRt=4017108033,CRt=2067069095,ARt=4022376103,ORt=1423911732,PRt=2924175390,NRt=2775532180,LRt=2839578677,FRt=3724593414,HRt=3740093272,URt=1946335990,BRt=3355820592,kRt=759155922,GRt=2559016684,VRt=3727388367,zRt=3778827333,jRt=3967405729,WRt=1775413392,qRt=677532197,YRt=2022622350,XRt=1304840413,$Rt=3119450353,KRt=2417041796,ZRt=2744685151,JRt=569719735,QRt=2945172077,eMt=4208778838,tMt=673634403,rMt=2095639259,iMt=3958567839,nMt=2802850158,pA=103090709,sMt=653396225,aMt=2904328755,oMt=3843373140,lMt=3651124850,cMt=2598011224,uMt=986844984,hMt=871118103,pMt=1680319473,dMt=148025276,fMt=4166981789,mMt=3710013099,gMt=2752243245,vMt=941946838,yMt=1451395588,TMt=3357820518,EMt=492091185,bMt=3650150729,xMt=110355661,IMt=3521284610,_Mt=1482703590,SMt=738039164,wMt=2295281155,RMt=655969474,MMt=1842657554,DMt=3219374653,CMt=90941305,AMt=2250791053,OMt=2044713172,PMt=2093928680,NMt=931644368,LMt=2090586900,FMt=3252649465,HMt=2405470396,UMt=825690147,BMt=2262370178,kMt=2893384427,GMt=3024970846,VMt=3283111854,zMt=2324767716,jMt=1469900589,WMt=1232101972,qMt=683857671,YMt=2770003689,XMt=3615266464,$Mt=2798486643,KMt=3454111270,ZMt=3915482550,JMt=2433181523,QMt=4021432810,eDt=3413951693,tDt=1580146022,rDt=3765753017,iDt=979691226,nDt=2572171363,sDt=3027567501,aDt=964333572,oDt=2320036040,lDt=2310774935,zk=160246688,cDt=3939117080,uDt=1683148259,hDt=2495723537,pDt=1307041759,dDt=1027710054,fDt=4278684876,mDt=2857406711,gDt=205026976,vDt=1865459582,yDt=4095574036,TDt=919958153,EDt=2728634034,bDt=982818633,xDt=3840914261,jk=2655215786,IDt=826625072,_Dt=1204542856,SDt=3945020480,wDt=4201705270,RDt=3190031847,MDt=2127690289,DDt=1638771189,CDt=504942748,ADt=3678494232,Wk=3242617779,ODt=886880790,PDt=2802773753,NDt=2565941209,LDt=2551354335,FDt=693640335,HDt=1462361463,qk=4186316022,UDt=307848117,Yk=781010003,BDt=3940055652,kDt=279856033,GDt=427948657,VDt=3268803585,zDt=1441486842,jDt=750771296,WDt=1245217292,qDt=4122056220,YDt=366585022,XDt=3451746338,$Dt=3523091289,KDt=1521410863,ZDt=1401173127,JDt=478536968,QDt=816062949,eCt=1076942058,tCt=3377609919,rCt=3008791417,iCt=1660063152,nCt=2914609552,sCt=2943643501,aCt=1608871552,oCt=2439245199,lCt=1042787934,cCt=1856042241,uCt=3243963512,hCt=4158566097,pCt=3626867408,dCt=2016517767,fCt=2781568857,mCt=2341007311,gCt=2778083089,vCt=448429030,yCt=3053780830,TCt=1768891740,ECt=1054537805,bCt=2157484638,xCt=2042790032,ICt=4165799628,_Ct=1862484736,SCt=1290935644,wCt=1509187699,RCt=4086658281,MCt=1783015770,DCt=1329646415,CCt=4074543187,ACt=867548509,OCt=3982875396,PCt=4240577450,NCt=4124623270,LCt=3692461612,FCt=3663146110,HCt=4097777520,UCt=1529196076,BCt=3127900445,kCt=3027962421,GCt=2533589738,VCt=2609359061,zCt=3420628829,jCt=1072016465,WCt=723233188,qCt=3856911033,YCt=1999602285,XCt=1305183839,$Ct=3812236995,KCt=1412071761,ZCt=710998568,JCt=2706606064,QCt=3893378262,eAt=463610769,tAt=2481509218,rAt=451544542,iAt=4015995234,nAt=1404847402,sAt=3112655638,aAt=331165859,oAt=4252922144,lAt=1039846685,cAt=338393293,uAt=682877961,hAt=3544373492,pAt=2515109513,dAt=1179482911,fAt=2273995522,mAt=1004757350,gAt=4243806635,vAt=214636428,yAt=2445595289,TAt=2757150158,EAt=3136571912,bAt=1807405624,xAt=2162789131,IAt=385403989,_At=3478079324,SAt=1252848954,wAt=1595516126,RAt=609421318,MAt=2668620305,DAt=2473145415,CAt=1973038258,AAt=1597423693,OAt=1190533807,PAt=2525727697,NAt=3408363356,LAt=530289379,FAt=1621171031,HAt=2082059205,UAt=734778138,BAt=1235345126,kAt=3689010777,GAt=2986769608,VAt=3657597509,zAt=1975003073,jAt=3979015343,WAt=2218152070,qAt=603775116,YAt=2830218821,XAt=3958052878,$At=3049322572,KAt=148013059,ZAt=4095615324,JAt=2233826070,QAt=2513912981,eOt=699246055,tOt=2028607225,rOt=3101698114,iOt=2809605785,nOt=4124788165,sOt=2934153892,aOt=1300840506,oOt=3303107099,lOt=1607154358,cOt=1878645084,uOt=846575682,hOt=1351298697,pOt=626085974,dOt=2247615214,fOt=1260650574,mOt=1096409881,gOt=230924584,vOt=1162798199,yOt=2315554128,TOt=2254336722,EOt=413509423,bOt=1580310250,xOt=3071757647,IOt=985171141,_Ot=2043862942,SOt=531007025,wOt=812556717,ROt=5716631,MOt=3473067441,DOt=1549132990,COt=2771591690,AOt=3206491090,OOt=912023232,POt=3824725483,NOt=2347447852,LOt=3081323446,FOt=3663046924,HOt=2281632017,UOt=2415094496,BOt=2387106220,kOt=901063453,GOt=4282788508,VOt=3124975700,zOt=1447204868,jOt=1983826977,WOt=2636378356,qOt=1640371178,YOt=280115917,XOt=1742049831,$Ot=2552916305,KOt=1210645708,ZOt=3611470254,JOt=1199560280,QOt=3101149627,e3t=581633288,t3t=1377556343,r3t=1735638870,i3t=1935646853,n3t=3825984169,s3t=1692211062,a3t=2595432518,o3t=1620046519,l3t=2097647324,c3t=2715220739,u3t=2916149573,h3t=1229763772,p3t=3593883385,d3t=3026737570,f3t=1600972822,m3t=1628702193,g3t=3736923433,v3t=2347495698,y3t=3698973494,T3t=427810014,E3t=180925521,b3t=630975310,x3t=3179687236,I3t=4292641817,_3t=1911125066,S3t=4207607924,w3t=728799441,R3t=1417489154,M3t=2799835756,D3t=2759199220,C3t=1907098498,A3t=1530820697,O3t=3956297820,P3t=2391383451,N3t=3313531582,L3t=2769231204,F3t=891718957,H3t=926996030,U3t=2391406946,B3t=4156078855,k3t=3512223829,G3t=1898987631,V3t=4237592921,z3t=1133259667,j3t=3304561284,W3t=336235671,q3t=512836454,Y3t=486154966,X3t=1299126871,$3t=4009809668,K3t=4088093105,Z3t=1028945134,J3t=4218914973,Q3t=3342526732,ePt=1236880293,tPt=2543172580,rPt=1033361043,O={};O[iEt]=e=>rfe.FromTape(e.ID,e.type,e.arguments),O[nEt]=e=>ife.FromTape(e.ID,e.type,e.arguments),O[sEt]=e=>nfe.FromTape(e.ID,e.type,e.arguments),O[aEt]=e=>sfe.FromTape(e.ID,e.type,e.arguments),O[oEt]=e=>afe.FromTape(e.ID,e.type,e.arguments),O[lEt]=e=>ofe.FromTape(e.ID,e.type,e.arguments),O[cEt]=e=>lfe.FromTape(e.ID,e.type,e.arguments),O[uEt]=e=>cfe.FromTape(e.ID,e.type,e.arguments),O[hEt]=e=>ufe.FromTape(e.ID,e.type,e.arguments),O[pEt]=e=>hfe.FromTape(e.ID,e.type,e.arguments),O[dEt]=e=>pfe.FromTape(e.ID,e.type,e.arguments),O[fEt]=e=>dfe.FromTape(e.ID,e.type,e.arguments),O[mEt]=e=>ffe.FromTape(e.ID,e.type,e.arguments),O[gEt]=e=>mfe.FromTape(e.ID,e.type,e.arguments),O[vEt]=e=>gfe.FromTape(e.ID,e.type,e.arguments),O[yEt]=e=>vfe.FromTape(e.ID,e.type,e.arguments),O[TEt]=e=>yfe.FromTape(e.ID,e.type,e.arguments),O[EEt]=e=>Tfe.FromTape(e.ID,e.type,e.arguments),O[bEt]=e=>Efe.FromTape(e.ID,e.type,e.arguments),O[xEt]=e=>bfe.FromTape(e.ID,e.type,e.arguments),O[IEt]=e=>xfe.FromTape(e.ID,e.type,e.arguments),O[_Et]=e=>Ife.FromTape(e.ID,e.type,e.arguments),O[SEt]=e=>_fe.FromTape(e.ID,e.type,e.arguments),O[wEt]=e=>Sfe.FromTape(e.ID,e.type,e.arguments),O[REt]=e=>wfe.FromTape(e.ID,e.type,e.arguments),O[MEt]=e=>Rfe.FromTape(e.ID,e.type,e.arguments),O[DEt]=e=>Mfe.FromTape(e.ID,e.type,e.arguments),O[CEt]=e=>Dfe.FromTape(e.ID,e.type,e.arguments),O[AEt]=e=>Cfe.FromTape(e.ID,e.type,e.arguments),O[OEt]=e=>Afe.FromTape(e.ID,e.type,e.arguments),O[PEt]=e=>Ofe.FromTape(e.ID,e.type,e.arguments),O[NEt]=e=>Pfe.FromTape(e.ID,e.type,e.arguments),O[LEt]=e=>Nfe.FromTape(e.ID,e.type,e.arguments),O[FEt]=e=>Lfe.FromTape(e.ID,e.type,e.arguments),O[HEt]=e=>Ffe.FromTape(e.ID,e.type,e.arguments),O[UEt]=e=>Hfe.FromTape(e.ID,e.type,e.arguments),O[BEt]=e=>Ufe.FromTape(e.ID,e.type,e.arguments),O[kEt]=e=>Bfe.FromTape(e.ID,e.type,e.arguments),O[GEt]=e=>kfe.FromTape(e.ID,e.type,e.arguments),O[VEt]=e=>Gfe.FromTape(e.ID,e.type,e.arguments),O[zEt]=e=>Vfe.FromTape(e.ID,e.type,e.arguments),O[jEt]=e=>zfe.FromTape(e.ID,e.type,e.arguments),O[WEt]=e=>jfe.FromTape(e.ID,e.type,e.arguments),O[qEt]=e=>Wfe.FromTape(e.ID,e.type,e.arguments),O[YEt]=e=>qfe.FromTape(e.ID,e.type,e.arguments),O[XEt]=e=>Yfe.FromTape(e.ID,e.type,e.arguments),O[$Et]=e=>Xfe.FromTape(e.ID,e.type,e.arguments),O[KEt]=e=>$fe.FromTape(e.ID,e.type,e.arguments),O[ZEt]=e=>Kfe.FromTape(e.ID,e.type,e.arguments),O[JEt]=e=>Zfe.FromTape(e.ID,e.type,e.arguments),O[QEt]=e=>Jfe.FromTape(e.ID,e.type,e.arguments),O[e1t]=e=>Qfe.FromTape(e.ID,e.type,e.arguments),O[t1t]=e=>eme.FromTape(e.ID,e.type,e.arguments),O[r1t]=e=>tme.FromTape(e.ID,e.type,e.arguments),O[i1t]=e=>rme.FromTape(e.ID,e.type,e.arguments),O[n1t]=e=>ime.FromTape(e.ID,e.type,e.arguments),O[s1t]=e=>nme.FromTape(e.ID,e.type,e.arguments),O[a1t]=e=>sme.FromTape(e.ID,e.type,e.arguments),O[o1t]=e=>ame.FromTape(e.ID,e.type,e.arguments),O[l1t]=e=>ome.FromTape(e.ID,e.type,e.arguments),O[c1t]=e=>lme.FromTape(e.ID,e.type,e.arguments),O[u1t]=e=>cme.FromTape(e.ID,e.type,e.arguments),O[h1t]=e=>ume.FromTape(e.ID,e.type,e.arguments),O[p1t]=e=>hme.FromTape(e.ID,e.type,e.arguments),O[d1t]=e=>pme.FromTape(e.ID,e.type,e.arguments),O[f1t]=e=>dme.FromTape(e.ID,e.type,e.arguments),O[m1t]=e=>fme.FromTape(e.ID,e.type,e.arguments),O[g1t]=e=>mme.FromTape(e.ID,e.type,e.arguments),O[v1t]=e=>gme.FromTape(e.ID,e.type,e.arguments),O[y1t]=e=>vme.FromTape(e.ID,e.type,e.arguments),O[T1t]=e=>yme.FromTape(e.ID,e.type,e.arguments),O[E1t]=e=>Tme.FromTape(e.ID,e.type,e.arguments),O[b1t]=e=>Eme.FromTape(e.ID,e.type,e.arguments),O[x1t]=e=>bme.FromTape(e.ID,e.type,e.arguments),O[I1t]=e=>xme.FromTape(e.ID,e.type,e.arguments),O[_1t]=e=>Ime.FromTape(e.ID,e.type,e.arguments),O[S1t]=e=>_me.FromTape(e.ID,e.type,e.arguments),O[w1t]=e=>Sme.FromTape(e.ID,e.type,e.arguments),O[R1t]=e=>wme.FromTape(e.ID,e.type,e.arguments),O[M1t]=e=>Rme.FromTape(e.ID,e.type,e.arguments),O[D1t]=e=>Mme.FromTape(e.ID,e.type,e.arguments),O[C1t]=e=>Dme.FromTape(e.ID,e.type,e.arguments),O[A1t]=e=>Cme.FromTape(e.ID,e.type,e.arguments),O[O1t]=e=>Ame.FromTape(e.ID,e.type,e.arguments),O[P1t]=e=>Ome.FromTape(e.ID,e.type,e.arguments),O[N1t]=e=>Pme.FromTape(e.ID,e.type,e.arguments),O[L1t]=e=>Nme.FromTape(e.ID,e.type,e.arguments),O[F1t]=e=>Lme.FromTape(e.ID,e.type,e.arguments),O[H1t]=e=>Fme.FromTape(e.ID,e.type,e.arguments),O[U1t]=e=>Hme.FromTape(e.ID,e.type,e.arguments),O[B1t]=e=>Ume.FromTape(e.ID,e.type,e.arguments),O[k1t]=e=>Bme.FromTape(e.ID,e.type,e.arguments),O[G1t]=e=>kme.FromTape(e.ID,e.type,e.arguments),O[V1t]=e=>Gme.FromTape(e.ID,e.type,e.arguments),O[z1t]=e=>Vme.FromTape(e.ID,e.type,e.arguments),O[j1t]=e=>zme.FromTape(e.ID,e.type,e.arguments),O[W1t]=e=>jme.FromTape(e.ID,e.type,e.arguments),O[q1t]=e=>Wme.FromTape(e.ID,e.type,e.arguments),O[Y1t]=e=>qme.FromTape(e.ID,e.type,e.arguments),O[X1t]=e=>Yme.FromTape(e.ID,e.type,e.arguments),O[$1t]=e=>Xme.FromTape(e.ID,e.type,e.arguments),O[K1t]=e=>$me.FromTape(e.ID,e.type,e.arguments),O[Z1t]=e=>Kme.FromTape(e.ID,e.type,e.arguments),O[J1t]=e=>Zme.FromTape(e.ID,e.type,e.arguments),O[Q1t]=e=>Jme.FromTape(e.ID,e.type,e.arguments),O[ebt]=e=>Qme.FromTape(e.ID,e.type,e.arguments),O[tbt]=e=>ege.FromTape(e.ID,e.type,e.arguments),O[rbt]=e=>tge.FromTape(e.ID,e.type,e.arguments),O[ibt]=e=>rge.FromTape(e.ID,e.type,e.arguments),O[nbt]=e=>ige.FromTape(e.ID,e.type,e.arguments),O[sbt]=e=>nge.FromTape(e.ID,e.type,e.arguments),O[abt]=e=>sge.FromTape(e.ID,e.type,e.arguments),O[obt]=e=>age.FromTape(e.ID,e.type,e.arguments),O[lbt]=e=>oge.FromTape(e.ID,e.type,e.arguments),O[cbt]=e=>lge.FromTape(e.ID,e.type,e.arguments),O[ubt]=e=>cge.FromTape(e.ID,e.type,e.arguments),O[hbt]=e=>uge.FromTape(e.ID,e.type,e.arguments),O[pbt]=e=>hge.FromTape(e.ID,e.type,e.arguments),O[dbt]=e=>pge.FromTape(e.ID,e.type,e.arguments),O[fbt]=e=>dge.FromTape(e.ID,e.type,e.arguments),O[mbt]=e=>fge.FromTape(e.ID,e.type,e.arguments),O[gbt]=e=>mge.FromTape(e.ID,e.type,e.arguments),O[vbt]=e=>gge.FromTape(e.ID,e.type,e.arguments),O[ybt]=e=>vge.FromTape(e.ID,e.type,e.arguments),O[Tbt]=e=>yge.FromTape(e.ID,e.type,e.arguments),O[Ebt]=e=>Tge.FromTape(e.ID,e.type,e.arguments),O[bbt]=e=>Ege.FromTape(e.ID,e.type,e.arguments),O[xbt]=e=>bge.FromTape(e.ID,e.type,e.arguments),O[Ibt]=e=>xge.FromTape(e.ID,e.type,e.arguments),O[_bt]=e=>Ige.FromTape(e.ID,e.type,e.arguments),O[Sbt]=e=>_ge.FromTape(e.ID,e.type,e.arguments),O[wbt]=e=>Sge.FromTape(e.ID,e.type,e.arguments),O[Rbt]=e=>wge.FromTape(e.ID,e.type,e.arguments),O[Mbt]=e=>Rge.FromTape(e.ID,e.type,e.arguments),O[Dbt]=e=>Mge.FromTape(e.ID,e.type,e.arguments),O[Cbt]=e=>Dge.FromTape(e.ID,e.type,e.arguments),O[Abt]=e=>Cge.FromTape(e.ID,e.type,e.arguments),O[Obt]=e=>Age.FromTape(e.ID,e.type,e.arguments),O[Pbt]=e=>Oge.FromTape(e.ID,e.type,e.arguments),O[Nbt]=e=>Pge.FromTape(e.ID,e.type,e.arguments),O[Lbt]=e=>Nge.FromTape(e.ID,e.type,e.arguments),O[Fbt]=e=>Lge.FromTape(e.ID,e.type,e.arguments),O[Hbt]=e=>Fge.FromTape(e.ID,e.type,e.arguments),O[Ubt]=e=>Hge.FromTape(e.ID,e.type,e.arguments),O[Bbt]=e=>Uge.FromTape(e.ID,e.type,e.arguments),O[kbt]=e=>Bge.FromTape(e.ID,e.type,e.arguments),O[Gbt]=e=>kge.FromTape(e.ID,e.type,e.arguments),O[Vbt]=e=>Gge.FromTape(e.ID,e.type,e.arguments),O[zbt]=e=>Vge.FromTape(e.ID,e.type,e.arguments),O[jbt]=e=>zge.FromTape(e.ID,e.type,e.arguments),O[Wbt]=e=>jge.FromTape(e.ID,e.type,e.arguments),O[qbt]=e=>Wge.FromTape(e.ID,e.type,e.arguments),O[Ybt]=e=>qge.FromTape(e.ID,e.type,e.arguments),O[Xbt]=e=>Yge.FromTape(e.ID,e.type,e.arguments),O[$bt]=e=>Xge.FromTape(e.ID,e.type,e.arguments),O[Kbt]=e=>$ge.FromTape(e.ID,e.type,e.arguments),O[Zbt]=e=>Kge.FromTape(e.ID,e.type,e.arguments),O[Jbt]=e=>Zge.FromTape(e.ID,e.type,e.arguments),O[Qbt]=e=>Jge.FromTape(e.ID,e.type,e.arguments),O[ext]=e=>Qge.FromTape(e.ID,e.type,e.arguments),O[txt]=e=>e0e.FromTape(e.ID,e.type,e.arguments),O[rxt]=e=>t0e.FromTape(e.ID,e.type,e.arguments),O[ixt]=e=>r0e.FromTape(e.ID,e.type,e.arguments),O[nxt]=e=>i0e.FromTape(e.ID,e.type,e.arguments),O[sxt]=e=>n0e.FromTape(e.ID,e.type,e.arguments),O[axt]=e=>s0e.FromTape(e.ID,e.type,e.arguments),O[oxt]=e=>a0e.FromTape(e.ID,e.type,e.arguments),O[lxt]=e=>o0e.FromTape(e.ID,e.type,e.arguments),O[cxt]=e=>l0e.FromTape(e.ID,e.type,e.arguments),O[uxt]=e=>c0e.FromTape(e.ID,e.type,e.arguments),O[hxt]=e=>u0e.FromTape(e.ID,e.type,e.arguments),O[pxt]=e=>h0e.FromTape(e.ID,e.type,e.arguments),O[dxt]=e=>p0e.FromTape(e.ID,e.type,e.arguments),O[fxt]=e=>d0e.FromTape(e.ID,e.type,e.arguments),O[mxt]=e=>f0e.FromTape(e.ID,e.type,e.arguments),O[gxt]=e=>m0e.FromTape(e.ID,e.type,e.arguments),O[vxt]=e=>g0e.FromTape(e.ID,e.type,e.arguments),O[yxt]=e=>v0e.FromTape(e.ID,e.type,e.arguments),O[Txt]=e=>y0e.FromTape(e.ID,e.type,e.arguments),O[Ext]=e=>T0e.FromTape(e.ID,e.type,e.arguments),O[bxt]=e=>E0e.FromTape(e.ID,e.type,e.arguments),O[xxt]=e=>b0e.FromTape(e.ID,e.type,e.arguments),O[Ixt]=e=>x0e.FromTape(e.ID,e.type,e.arguments),O[_xt]=e=>I0e.FromTape(e.ID,e.type,e.arguments),O[Sxt]=e=>_0e.FromTape(e.ID,e.type,e.arguments),O[wxt]=e=>S0e.FromTape(e.ID,e.type,e.arguments),O[Rxt]=e=>w0e.FromTape(e.ID,e.type,e.arguments),O[Mxt]=e=>R0e.FromTape(e.ID,e.type,e.arguments),O[Dxt]=e=>M0e.FromTape(e.ID,e.type,e.arguments),O[Cxt]=e=>D0e.FromTape(e.ID,e.type,e.arguments),O[Axt]=e=>C0e.FromTape(e.ID,e.type,e.arguments),O[Oxt]=e=>A0e.FromTape(e.ID,e.type,e.arguments),O[Pxt]=e=>O0e.FromTape(e.ID,e.type,e.arguments),O[Nxt]=e=>P0e.FromTape(e.ID,e.type,e.arguments),O[Lxt]=e=>N0e.FromTape(e.ID,e.type,e.arguments),O[Fxt]=e=>L0e.FromTape(e.ID,e.type,e.arguments),O[Hxt]=e=>F0e.FromTape(e.ID,e.type,e.arguments),O[Uxt]=e=>H0e.FromTape(e.ID,e.type,e.arguments),O[Bxt]=e=>U0e.FromTape(e.ID,e.type,e.arguments),O[kxt]=e=>B0e.FromTape(e.ID,e.type,e.arguments),O[Gxt]=e=>k0e.FromTape(e.ID,e.type,e.arguments),O[Vxt]=e=>G0e.FromTape(e.ID,e.type,e.arguments),O[zxt]=e=>V0e.FromTape(e.ID,e.type,e.arguments),O[jxt]=e=>z0e.FromTape(e.ID,e.type,e.arguments),O[Wxt]=e=>j0e.FromTape(e.ID,e.type,e.arguments),O[qxt]=e=>W0e.FromTape(e.ID,e.type,e.arguments),O[Yxt]=e=>q0e.FromTape(e.ID,e.type,e.arguments),O[Xxt]=e=>Y0e.FromTape(e.ID,e.type,e.arguments),O[$xt]=e=>X0e.FromTape(e.ID,e.type,e.arguments),O[Kxt]=e=>$0e.FromTape(e.ID,e.type,e.arguments),O[Zxt]=e=>K0e.FromTape(e.ID,e.type,e.arguments),O[Jxt]=e=>Z0e.FromTape(e.ID,e.type,e.arguments),O[Qxt]=e=>J0e.FromTape(e.ID,e.type,e.arguments),O[eIt]=e=>Q0e.FromTape(e.ID,e.type,e.arguments),O[tIt]=e=>eve.FromTape(e.ID,e.type,e.arguments),O[rIt]=e=>tve.FromTape(e.ID,e.type,e.arguments),O[iIt]=e=>rve.FromTape(e.ID,e.type,e.arguments),O[nIt]=e=>ive.FromTape(e.ID,e.type,e.arguments),O[sIt]=e=>nve.FromTape(e.ID,e.type,e.arguments),O[aIt]=e=>sve.FromTape(e.ID,e.type,e.arguments),O[oIt]=e=>ave.FromTape(e.ID,e.type,e.arguments),O[lIt]=e=>ove.FromTape(e.ID,e.type,e.arguments),O[cIt]=e=>lve.FromTape(e.ID,e.type,e.arguments),O[uIt]=e=>cve.FromTape(e.ID,e.type,e.arguments),O[hIt]=e=>uve.FromTape(e.ID,e.type,e.arguments),O[pIt]=e=>hve.FromTape(e.ID,e.type,e.arguments),O[dIt]=e=>pve.FromTape(e.ID,e.type,e.arguments),O[fIt]=e=>dve.FromTape(e.ID,e.type,e.arguments),O[mIt]=e=>fve.FromTape(e.ID,e.type,e.arguments),O[gIt]=e=>mve.FromTape(e.ID,e.type,e.arguments),O[vIt]=e=>gve.FromTape(e.ID,e.type,e.arguments),O[yIt]=e=>vve.FromTape(e.ID,e.type,e.arguments),O[TIt]=e=>yve.FromTape(e.ID,e.type,e.arguments),O[EIt]=e=>Tve.FromTape(e.ID,e.type,e.arguments),O[bIt]=e=>Eve.FromTape(e.ID,e.type,e.arguments),O[xIt]=e=>bve.FromTape(e.ID,e.type,e.arguments),O[IIt]=e=>xve.FromTape(e.ID,e.type,e.arguments),O[_It]=e=>Ive.FromTape(e.ID,e.type,e.arguments),O[SIt]=e=>_ve.FromTape(e.ID,e.type,e.arguments),O[wIt]=e=>Sve.FromTape(e.ID,e.type,e.arguments),O[RIt]=e=>wve.FromTape(e.ID,e.type,e.arguments),O[MIt]=e=>Rve.FromTape(e.ID,e.type,e.arguments),O[DIt]=e=>Mve.FromTape(e.ID,e.type,e.arguments),O[CIt]=e=>Dve.FromTape(e.ID,e.type,e.arguments),O[AIt]=e=>Cve.FromTape(e.ID,e.type,e.arguments),O[OIt]=e=>Ave.FromTape(e.ID,e.type,e.arguments),O[PIt]=e=>Ove.FromTape(e.ID,e.type,e.arguments),O[NIt]=e=>Pve.FromTape(e.ID,e.type,e.arguments),O[LIt]=e=>Nve.FromTape(e.ID,e.type,e.arguments),O[FIt]=e=>Lve.FromTape(e.ID,e.type,e.arguments),O[HIt]=e=>Fve.FromTape(e.ID,e.type,e.arguments),O[UIt]=e=>Hve.FromTape(e.ID,e.type,e.arguments),O[BIt]=e=>Uve.FromTape(e.ID,e.type,e.arguments),O[kIt]=e=>Bve.FromTape(e.ID,e.type,e.arguments),O[GIt]=e=>kve.FromTape(e.ID,e.type,e.arguments),O[VIt]=e=>Gve.FromTape(e.ID,e.type,e.arguments),O[zIt]=e=>Vve.FromTape(e.ID,e.type,e.arguments),O[jIt]=e=>zve.FromTape(e.ID,e.type,e.arguments),O[WIt]=e=>jve.FromTape(e.ID,e.type,e.arguments),O[qIt]=e=>Wve.FromTape(e.ID,e.type,e.arguments),O[YIt]=e=>qve.FromTape(e.ID,e.type,e.arguments),O[XIt]=e=>Yve.FromTape(e.ID,e.type,e.arguments),O[$It]=e=>Xve.FromTape(e.ID,e.type,e.arguments),O[KIt]=e=>$ve.FromTape(e.ID,e.type,e.arguments),O[ZIt]=e=>Kve.FromTape(e.ID,e.type,e.arguments),O[JIt]=e=>Zve.FromTape(e.ID,e.type,e.arguments),O[QIt]=e=>Jve.FromTape(e.ID,e.type,e.arguments),O[e_t]=e=>Qve.FromTape(e.ID,e.type,e.arguments),O[t_t]=e=>eye.FromTape(e.ID,e.type,e.arguments),O[r_t]=e=>tye.FromTape(e.ID,e.type,e.arguments),O[i_t]=e=>rye.FromTape(e.ID,e.type,e.arguments),O[n_t]=e=>iye.FromTape(e.ID,e.type,e.arguments),O[s_t]=e=>nye.FromTape(e.ID,e.type,e.arguments),O[a_t]=e=>sye.FromTape(e.ID,e.type,e.arguments),O[o_t]=e=>aye.FromTape(e.ID,e.type,e.arguments),O[l_t]=e=>oye.FromTape(e.ID,e.type,e.arguments),O[c_t]=e=>lye.FromTape(e.ID,e.type,e.arguments),O[u_t]=e=>cye.FromTape(e.ID,e.type,e.arguments),O[h_t]=e=>uye.FromTape(e.ID,e.type,e.arguments),O[p_t]=e=>hye.FromTape(e.ID,e.type,e.arguments),O[d_t]=e=>pye.FromTape(e.ID,e.type,e.arguments),O[f_t]=e=>dye.FromTape(e.ID,e.type,e.arguments),O[m_t]=e=>fye.FromTape(e.ID,e.type,e.arguments),O[g_t]=e=>mye.FromTape(e.ID,e.type,e.arguments),O[v_t]=e=>gye.FromTape(e.ID,e.type,e.arguments),O[y_t]=e=>vye.FromTape(e.ID,e.type,e.arguments),O[T_t]=e=>yye.FromTape(e.ID,e.type,e.arguments),O[E_t]=e=>Tye.FromTape(e.ID,e.type,e.arguments),O[b_t]=e=>Eye.FromTape(e.ID,e.type,e.arguments),O[x_t]=e=>bye.FromTape(e.ID,e.type,e.arguments),O[I_t]=e=>xye.FromTape(e.ID,e.type,e.arguments),O[__t]=e=>Iye.FromTape(e.ID,e.type,e.arguments),O[S_t]=e=>_ye.FromTape(e.ID,e.type,e.arguments),O[w_t]=e=>Sye.FromTape(e.ID,e.type,e.arguments),O[R_t]=e=>wye.FromTape(e.ID,e.type,e.arguments),O[M_t]=e=>Rye.FromTape(e.ID,e.type,e.arguments),O[D_t]=e=>Mye.FromTape(e.ID,e.type,e.arguments),O[C_t]=e=>Dye.FromTape(e.ID,e.type,e.arguments),O[A_t]=e=>Cye.FromTape(e.ID,e.type,e.arguments),O[O_t]=e=>Aye.FromTape(e.ID,e.type,e.arguments),O[P_t]=e=>Oye.FromTape(e.ID,e.type,e.arguments),O[N_t]=e=>Pye.FromTape(e.ID,e.type,e.arguments),O[L_t]=e=>Nye.FromTape(e.ID,e.type,e.arguments),O[F_t]=e=>Lye.FromTape(e.ID,e.type,e.arguments),O[H_t]=e=>Fye.FromTape(e.ID,e.type,e.arguments),O[U_t]=e=>Hye.FromTape(e.ID,e.type,e.arguments),O[B_t]=e=>Uye.FromTape(e.ID,e.type,e.arguments),O[k_t]=e=>Bye.FromTape(e.ID,e.type,e.arguments),O[G_t]=e=>kye.FromTape(e.ID,e.type,e.arguments),O[V_t]=e=>Gye.FromTape(e.ID,e.type,e.arguments),O[z_t]=e=>Vye.FromTape(e.ID,e.type,e.arguments),O[j_t]=e=>zye.FromTape(e.ID,e.type,e.arguments),O[W_t]=e=>jye.FromTape(e.ID,e.type,e.arguments),O[q_t]=e=>Wye.FromTape(e.ID,e.type,e.arguments),O[Y_t]=e=>qye.FromTape(e.ID,e.type,e.arguments),O[X_t]=e=>Yye.FromTape(e.ID,e.type,e.arguments),O[$_t]=e=>Xye.FromTape(e.ID,e.type,e.arguments),O[K_t]=e=>$ye.FromTape(e.ID,e.type,e.arguments),O[Z_t]=e=>Kye.FromTape(e.ID,e.type,e.arguments),O[J_t]=e=>Zye.FromTape(e.ID,e.type,e.arguments),O[Q_t]=e=>Jye.FromTape(e.ID,e.type,e.arguments),O[eSt]=e=>Qye.FromTape(e.ID,e.type,e.arguments),O[tSt]=e=>eTe.FromTape(e.ID,e.type,e.arguments),O[rSt]=e=>tTe.FromTape(e.ID,e.type,e.arguments),O[iSt]=e=>rTe.FromTape(e.ID,e.type,e.arguments),O[nSt]=e=>iTe.FromTape(e.ID,e.type,e.arguments),O[sSt]=e=>nTe.FromTape(e.ID,e.type,e.arguments),O[aSt]=e=>sTe.FromTape(e.ID,e.type,e.arguments),O[oSt]=e=>aTe.FromTape(e.ID,e.type,e.arguments),O[lSt]=e=>oTe.FromTape(e.ID,e.type,e.arguments),O[cSt]=e=>lTe.FromTape(e.ID,e.type,e.arguments),O[uSt]=e=>cTe.FromTape(e.ID,e.type,e.arguments),O[hSt]=e=>uTe.FromTape(e.ID,e.type,e.arguments),O[pSt]=e=>hTe.FromTape(e.ID,e.type,e.arguments),O[dSt]=e=>pTe.FromTape(e.ID,e.type,e.arguments),O[fSt]=e=>dTe.FromTape(e.ID,e.type,e.arguments),O[mSt]=e=>fTe.FromTape(e.ID,e.type,e.arguments),O[gSt]=e=>mTe.FromTape(e.ID,e.type,e.arguments),O[vSt]=e=>gTe.FromTape(e.ID,e.type,e.arguments),O[ySt]=e=>vTe.FromTape(e.ID,e.type,e.arguments),O[TSt]=e=>yTe.FromTape(e.ID,e.type,e.arguments),O[ESt]=e=>TTe.FromTape(e.ID,e.type,e.arguments),O[bSt]=e=>ETe.FromTape(e.ID,e.type,e.arguments),O[xSt]=e=>bTe.FromTape(e.ID,e.type,e.arguments),O[ISt]=e=>xTe.FromTape(e.ID,e.type,e.arguments),O[_St]=e=>ITe.FromTape(e.ID,e.type,e.arguments),O[SSt]=e=>_Te.FromTape(e.ID,e.type,e.arguments),O[wSt]=e=>STe.FromTape(e.ID,e.type,e.arguments),O[RSt]=e=>wTe.FromTape(e.ID,e.type,e.arguments),O[MSt]=e=>RTe.FromTape(e.ID,e.type,e.arguments),O[DSt]=e=>MTe.FromTape(e.ID,e.type,e.arguments),O[CSt]=e=>DTe.FromTape(e.ID,e.type,e.arguments),O[ASt]=e=>CTe.FromTape(e.ID,e.type,e.arguments),O[OSt]=e=>ATe.FromTape(e.ID,e.type,e.arguments),O[PSt]=e=>OTe.FromTape(e.ID,e.type,e.arguments),O[NSt]=e=>PTe.FromTape(e.ID,e.type,e.arguments),O[LSt]=e=>NTe.FromTape(e.ID,e.type,e.arguments),O[FSt]=e=>LTe.FromTape(e.ID,e.type,e.arguments),O[HSt]=e=>FTe.FromTape(e.ID,e.type,e.arguments),O[USt]=e=>HTe.FromTape(e.ID,e.type,e.arguments),O[BSt]=e=>UTe.FromTape(e.ID,e.type,e.arguments),O[kSt]=e=>BTe.FromTape(e.ID,e.type,e.arguments),O[GSt]=e=>kTe.FromTape(e.ID,e.type,e.arguments),O[VSt]=e=>GTe.FromTape(e.ID,e.type,e.arguments),O[zSt]=e=>VTe.FromTape(e.ID,e.type,e.arguments),O[jSt]=e=>zTe.FromTape(e.ID,e.type,e.arguments),O[WSt]=e=>jTe.FromTape(e.ID,e.type,e.arguments),O[qSt]=e=>WTe.FromTape(e.ID,e.type,e.arguments),O[YSt]=e=>qTe.FromTape(e.ID,e.type,e.arguments),O[XSt]=e=>YTe.FromTape(e.ID,e.type,e.arguments),O[$St]=e=>XTe.FromTape(e.ID,e.type,e.arguments),O[KSt]=e=>$Te.FromTape(e.ID,e.type,e.arguments),O[ZSt]=e=>KTe.FromTape(e.ID,e.type,e.arguments),O[JSt]=e=>ZTe.FromTape(e.ID,e.type,e.arguments),O[QSt]=e=>JTe.FromTape(e.ID,e.type,e.arguments),O[ewt]=e=>QTe.FromTape(e.ID,e.type,e.arguments),O[twt]=e=>eEe.FromTape(e.ID,e.type,e.arguments),O[rwt]=e=>tEe.FromTape(e.ID,e.type,e.arguments),O[iwt]=e=>rEe.FromTape(e.ID,e.type,e.arguments),O[nwt]=e=>iEe.FromTape(e.ID,e.type,e.arguments),O[swt]=e=>nEe.FromTape(e.ID,e.type,e.arguments),O[awt]=e=>sEe.FromTape(e.ID,e.type,e.arguments),O[owt]=e=>aEe.FromTape(e.ID,e.type,e.arguments),O[lwt]=e=>oEe.FromTape(e.ID,e.type,e.arguments),O[cwt]=e=>lEe.FromTape(e.ID,e.type,e.arguments),O[uwt]=e=>cEe.FromTape(e.ID,e.type,e.arguments),O[hwt]=e=>uEe.FromTape(e.ID,e.type,e.arguments),O[pwt]=e=>hEe.FromTape(e.ID,e.type,e.arguments),O[dwt]=e=>pEe.FromTape(e.ID,e.type,e.arguments),O[fwt]=e=>dEe.FromTape(e.ID,e.type,e.arguments),O[mwt]=e=>fEe.FromTape(e.ID,e.type,e.arguments),O[gwt]=e=>mEe.FromTape(e.ID,e.type,e.arguments),O[vwt]=e=>gEe.FromTape(e.ID,e.type,e.arguments),O[ywt]=e=>vEe.FromTape(e.ID,e.type,e.arguments),O[Twt]=e=>yEe.FromTape(e.ID,e.type,e.arguments),O[Ewt]=e=>TEe.FromTape(e.ID,e.type,e.arguments),O[bwt]=e=>EEe.FromTape(e.ID,e.type,e.arguments),O[xwt]=e=>bEe.FromTape(e.ID,e.type,e.arguments),O[Iwt]=e=>xEe.FromTape(e.ID,e.type,e.arguments),O[_wt]=e=>IEe.FromTape(e.ID,e.type,e.arguments),O[Swt]=e=>_Ee.FromTape(e.ID,e.type,e.arguments),O[wwt]=e=>SEe.FromTape(e.ID,e.type,e.arguments),O[Rwt]=e=>wEe.FromTape(e.ID,e.type,e.arguments),O[Mwt]=e=>REe.FromTape(e.ID,e.type,e.arguments),O[Dwt]=e=>MEe.FromTape(e.ID,e.type,e.arguments),O[Cwt]=e=>DEe.FromTape(e.ID,e.type,e.arguments),O[Awt]=e=>CEe.FromTape(e.ID,e.type,e.arguments),O[Owt]=e=>AEe.FromTape(e.ID,e.type,e.arguments),O[Pwt]=e=>OEe.FromTape(e.ID,e.type,e.arguments),O[Nwt]=e=>PEe.FromTape(e.ID,e.type,e.arguments),O[Lwt]=e=>NEe.FromTape(e.ID,e.type,e.arguments),O[Fwt]=e=>LEe.FromTape(e.ID,e.type,e.arguments),O[Hwt]=e=>FEe.FromTape(e.ID,e.type,e.arguments),O[Uwt]=e=>HEe.FromTape(e.ID,e.type,e.arguments),O[Bwt]=e=>UEe.FromTape(e.ID,e.type,e.arguments),O[kwt]=e=>BEe.FromTape(e.ID,e.type,e.arguments),O[Gwt]=e=>kEe.FromTape(e.ID,e.type,e.arguments),O[Vwt]=e=>GEe.FromTape(e.ID,e.type,e.arguments),O[zwt]=e=>VEe.FromTape(e.ID,e.type,e.arguments),O[jwt]=e=>zEe.FromTape(e.ID,e.type,e.arguments),O[Wwt]=e=>jEe.FromTape(e.ID,e.type,e.arguments),O[qwt]=e=>WEe.FromTape(e.ID,e.type,e.arguments),O[Ywt]=e=>qEe.FromTape(e.ID,e.type,e.arguments),O[Xwt]=e=>YEe.FromTape(e.ID,e.type,e.arguments),O[$wt]=e=>XEe.FromTape(e.ID,e.type,e.arguments),O[Kwt]=e=>$Ee.FromTape(e.ID,e.type,e.arguments),O[Zwt]=e=>KEe.FromTape(e.ID,e.type,e.arguments),O[Jwt]=e=>ZEe.FromTape(e.ID,e.type,e.arguments),O[Qwt]=e=>JEe.FromTape(e.ID,e.type,e.arguments),O[eRt]=e=>QEe.FromTape(e.ID,e.type,e.arguments),O[tRt]=e=>e1e.FromTape(e.ID,e.type,e.arguments),O[rRt]=e=>t1e.FromTape(e.ID,e.type,e.arguments),O[iRt]=e=>r1e.FromTape(e.ID,e.type,e.arguments),O[nRt]=e=>i1e.FromTape(e.ID,e.type,e.arguments),O[sRt]=e=>n1e.FromTape(e.ID,e.type,e.arguments),O[aRt]=e=>s1e.FromTape(e.ID,e.type,e.arguments),O[oRt]=e=>a1e.FromTape(e.ID,e.type,e.arguments),O[lRt]=e=>o1e.FromTape(e.ID,e.type,e.arguments),O[cRt]=e=>l1e.FromTape(e.ID,e.type,e.arguments),O[uRt]=e=>c1e.FromTape(e.ID,e.type,e.arguments),O[hRt]=e=>u1e.FromTape(e.ID,e.type,e.arguments),O[pRt]=e=>h1e.FromTape(e.ID,e.type,e.arguments),O[dRt]=e=>p1e.FromTape(e.ID,e.type,e.arguments),O[fRt]=e=>d1e.FromTape(e.ID,e.type,e.arguments),O[mRt]=e=>f1e.FromTape(e.ID,e.type,e.arguments),O[gRt]=e=>m1e.FromTape(e.ID,e.type,e.arguments),O[vRt]=e=>g1e.FromTape(e.ID,e.type,e.arguments),O[yRt]=e=>v1e.FromTape(e.ID,e.type,e.arguments),O[TRt]=e=>y1e.FromTape(e.ID,e.type,e.arguments),O[ERt]=e=>T1e.FromTape(e.ID,e.type,e.arguments),O[bRt]=e=>E1e.FromTape(e.ID,e.type,e.arguments),O[xRt]=e=>b1e.FromTape(e.ID,e.type,e.arguments),O[IRt]=e=>x1e.FromTape(e.ID,e.type,e.arguments),O[_Rt]=e=>I1e.FromTape(e.ID,e.type,e.arguments),O[SRt]=e=>_1e.FromTape(e.ID,e.type,e.arguments),O[wRt]=e=>S1e.FromTape(e.ID,e.type,e.arguments),O[RRt]=e=>w1e.FromTape(e.ID,e.type,e.arguments),O[MRt]=e=>R1e.FromTape(e.ID,e.type,e.arguments),O[DRt]=e=>M1e.FromTape(e.ID,e.type,e.arguments),O[CRt]=e=>D1e.FromTape(e.ID,e.type,e.arguments),O[ARt]=e=>C1e.FromTape(e.ID,e.type,e.arguments),O[ORt]=e=>A1e.FromTape(e.ID,e.type,e.arguments),O[PRt]=e=>O1e.FromTape(e.ID,e.type,e.arguments),O[NRt]=e=>P1e.FromTape(e.ID,e.type,e.arguments),O[LRt]=e=>N1e.FromTape(e.ID,e.type,e.arguments),O[FRt]=e=>L1e.FromTape(e.ID,e.type,e.arguments),O[HRt]=e=>F1e.FromTape(e.ID,e.type,e.arguments),O[URt]=e=>H1e.FromTape(e.ID,e.type,e.arguments),O[BRt]=e=>U1e.FromTape(e.ID,e.type,e.arguments),O[kRt]=e=>B1e.FromTape(e.ID,e.type,e.arguments),O[GRt]=e=>k1e.FromTape(e.ID,e.type,e.arguments),O[VRt]=e=>G1e.FromTape(e.ID,e.type,e.arguments),O[zRt]=e=>V1e.FromTape(e.ID,e.type,e.arguments),O[jRt]=e=>z1e.FromTape(e.ID,e.type,e.arguments),O[WRt]=e=>j1e.FromTape(e.ID,e.type,e.arguments),O[qRt]=e=>W1e.FromTape(e.ID,e.type,e.arguments),O[YRt]=e=>q1e.FromTape(e.ID,e.type,e.arguments),O[XRt]=e=>Y1e.FromTape(e.ID,e.type,e.arguments),O[$Rt]=e=>X1e.FromTape(e.ID,e.type,e.arguments),O[KRt]=e=>$1e.FromTape(e.ID,e.type,e.arguments),O[ZRt]=e=>K1e.FromTape(e.ID,e.type,e.arguments),O[JRt]=e=>Z1e.FromTape(e.ID,e.type,e.arguments),O[QRt]=e=>J1e.FromTape(e.ID,e.type,e.arguments),O[eMt]=e=>Q1e.FromTape(e.ID,e.type,e.arguments),O[tMt]=e=>ebe.FromTape(e.ID,e.type,e.arguments),O[rMt]=e=>tbe.FromTape(e.ID,e.type,e.arguments),O[iMt]=e=>rbe.FromTape(e.ID,e.type,e.arguments),O[nMt]=e=>ibe.FromTape(e.ID,e.type,e.arguments),O[pA]=e=>nbe.FromTape(e.ID,e.type,e.arguments),O[sMt]=e=>sbe.FromTape(e.ID,e.type,e.arguments),O[aMt]=e=>abe.FromTape(e.ID,e.type,e.arguments),O[oMt]=e=>obe.FromTape(e.ID,e.type,e.arguments),O[lMt]=e=>lbe.FromTape(e.ID,e.type,e.arguments),O[cMt]=e=>cbe.FromTape(e.ID,e.type,e.arguments),O[uMt]=e=>ube.FromTape(e.ID,e.type,e.arguments),O[hMt]=e=>hbe.FromTape(e.ID,e.type,e.arguments),O[pMt]=e=>pbe.FromTape(e.ID,e.type,e.arguments),O[dMt]=e=>dbe.FromTape(e.ID,e.type,e.arguments),O[fMt]=e=>fbe.FromTape(e.ID,e.type,e.arguments),O[mMt]=e=>mbe.FromTape(e.ID,e.type,e.arguments),O[gMt]=e=>gbe.FromTape(e.ID,e.type,e.arguments),O[vMt]=e=>vbe.FromTape(e.ID,e.type,e.arguments),O[yMt]=e=>ybe.FromTape(e.ID,e.type,e.arguments),O[TMt]=e=>Tbe.FromTape(e.ID,e.type,e.arguments),O[EMt]=e=>Ebe.FromTape(e.ID,e.type,e.arguments),O[bMt]=e=>bbe.FromTape(e.ID,e.type,e.arguments),O[xMt]=e=>xbe.FromTape(e.ID,e.type,e.arguments),O[IMt]=e=>Ibe.FromTape(e.ID,e.type,e.arguments),O[_Mt]=e=>_be.FromTape(e.ID,e.type,e.arguments),O[SMt]=e=>Sbe.FromTape(e.ID,e.type,e.arguments),O[wMt]=e=>wbe.FromTape(e.ID,e.type,e.arguments),O[RMt]=e=>Rbe.FromTape(e.ID,e.type,e.arguments),O[MMt]=e=>Mbe.FromTape(e.ID,e.type,e.arguments),O[DMt]=e=>Dbe.FromTape(e.ID,e.type,e.arguments),O[CMt]=e=>Cbe.FromTape(e.ID,e.type,e.arguments),O[AMt]=e=>Abe.FromTape(e.ID,e.type,e.arguments),O[OMt]=e=>Obe.FromTape(e.ID,e.type,e.arguments),O[PMt]=e=>Pbe.FromTape(e.ID,e.type,e.arguments),O[NMt]=e=>Nbe.FromTape(e.ID,e.type,e.arguments),O[LMt]=e=>Lbe.FromTape(e.ID,e.type,e.arguments),O[FMt]=e=>Fbe.FromTape(e.ID,e.type,e.arguments),O[HMt]=e=>Hbe.FromTape(e.ID,e.type,e.arguments),O[UMt]=e=>Ube.FromTape(e.ID,e.type,e.arguments),O[BMt]=e=>Bbe.FromTape(e.ID,e.type,e.arguments),O[kMt]=e=>kbe.FromTape(e.ID,e.type,e.arguments),O[GMt]=e=>Gbe.FromTape(e.ID,e.type,e.arguments),O[VMt]=e=>Vbe.FromTape(e.ID,e.type,e.arguments),O[zMt]=e=>zbe.FromTape(e.ID,e.type,e.arguments),O[jMt]=e=>jbe.FromTape(e.ID,e.type,e.arguments),O[WMt]=e=>Wbe.FromTape(e.ID,e.type,e.arguments),O[qMt]=e=>qbe.FromTape(e.ID,e.type,e.arguments),O[YMt]=e=>Ybe.FromTape(e.ID,e.type,e.arguments),O[XMt]=e=>Xbe.FromTape(e.ID,e.type,e.arguments),O[$Mt]=e=>$be.FromTape(e.ID,e.type,e.arguments),O[KMt]=e=>Kbe.FromTape(e.ID,e.type,e.arguments),O[ZMt]=e=>Zbe.FromTape(e.ID,e.type,e.arguments),O[JMt]=e=>Jbe.FromTape(e.ID,e.type,e.arguments),O[QMt]=e=>Qbe.FromTape(e.ID,e.type,e.arguments),O[eDt]=e=>exe.FromTape(e.ID,e.type,e.arguments),O[tDt]=e=>txe.FromTape(e.ID,e.type,e.arguments),O[rDt]=e=>rxe.FromTape(e.ID,e.type,e.arguments),O[iDt]=e=>ixe.FromTape(e.ID,e.type,e.arguments),O[nDt]=e=>nxe.FromTape(e.ID,e.type,e.arguments),O[sDt]=e=>sxe.FromTape(e.ID,e.type,e.arguments),O[aDt]=e=>axe.FromTape(e.ID,e.type,e.arguments),O[oDt]=e=>oxe.FromTape(e.ID,e.type,e.arguments),O[lDt]=e=>lxe.FromTape(e.ID,e.type,e.arguments),O[zk]=e=>cxe.FromTape(e.ID,e.type,e.arguments),O[cDt]=e=>uxe.FromTape(e.ID,e.type,e.arguments),O[uDt]=e=>hxe.FromTape(e.ID,e.type,e.arguments),O[hDt]=e=>pxe.FromTape(e.ID,e.type,e.arguments),O[pDt]=e=>dxe.FromTape(e.ID,e.type,e.arguments),O[dDt]=e=>fxe.FromTape(e.ID,e.type,e.arguments),O[fDt]=e=>mxe.FromTape(e.ID,e.type,e.arguments),O[mDt]=e=>gxe.FromTape(e.ID,e.type,e.arguments),O[gDt]=e=>vxe.FromTape(e.ID,e.type,e.arguments),O[vDt]=e=>yxe.FromTape(e.ID,e.type,e.arguments),O[yDt]=e=>Txe.FromTape(e.ID,e.type,e.arguments),O[TDt]=e=>Exe.FromTape(e.ID,e.type,e.arguments),O[EDt]=e=>bxe.FromTape(e.ID,e.type,e.arguments),O[bDt]=e=>xxe.FromTape(e.ID,e.type,e.arguments),O[xDt]=e=>Ixe.FromTape(e.ID,e.type,e.arguments),O[jk]=e=>_xe.FromTape(e.ID,e.type,e.arguments),O[IDt]=e=>Sxe.FromTape(e.ID,e.type,e.arguments),O[_Dt]=e=>wxe.FromTape(e.ID,e.type,e.arguments),O[SDt]=e=>Rxe.FromTape(e.ID,e.type,e.arguments),O[wDt]=e=>Mxe.FromTape(e.ID,e.type,e.arguments),O[RDt]=e=>Dxe.FromTape(e.ID,e.type,e.arguments),O[MDt]=e=>Cxe.FromTape(e.ID,e.type,e.arguments),O[DDt]=e=>Axe.FromTape(e.ID,e.type,e.arguments),O[CDt]=e=>Oxe.FromTape(e.ID,e.type,e.arguments),O[ADt]=e=>Pxe.FromTape(e.ID,e.type,e.arguments),O[Wk]=e=>Nxe.FromTape(e.ID,e.type,e.arguments),O[ODt]=e=>Lxe.FromTape(e.ID,e.type,e.arguments),O[PDt]=e=>Fxe.FromTape(e.ID,e.type,e.arguments),O[NDt]=e=>Hxe.FromTape(e.ID,e.type,e.arguments),O[LDt]=e=>Uxe.FromTape(e.ID,e.type,e.arguments),O[FDt]=e=>Bxe.FromTape(e.ID,e.type,e.arguments),O[HDt]=e=>kxe.FromTape(e.ID,e.type,e.arguments),O[qk]=e=>Gxe.FromTape(e.ID,e.type,e.arguments),O[UDt]=e=>Vxe.FromTape(e.ID,e.type,e.arguments),O[Yk]=e=>zxe.FromTape(e.ID,e.type,e.arguments),O[BDt]=e=>jxe.FromTape(e.ID,e.type,e.arguments),O[kDt]=e=>Wxe.FromTape(e.ID,e.type,e.arguments),O[GDt]=e=>qxe.FromTape(e.ID,e.type,e.arguments),O[VDt]=e=>Yxe.FromTape(e.ID,e.type,e.arguments),O[zDt]=e=>Xxe.FromTape(e.ID,e.type,e.arguments),O[jDt]=e=>$xe.FromTape(e.ID,e.type,e.arguments),O[WDt]=e=>Kxe.FromTape(e.ID,e.type,e.arguments),O[qDt]=e=>Zxe.FromTape(e.ID,e.type,e.arguments),O[YDt]=e=>Jxe.FromTape(e.ID,e.type,e.arguments),O[XDt]=e=>Qxe.FromTape(e.ID,e.type,e.arguments),O[$Dt]=e=>eIe.FromTape(e.ID,e.type,e.arguments),O[KDt]=e=>tIe.FromTape(e.ID,e.type,e.arguments),O[ZDt]=e=>rIe.FromTape(e.ID,e.type,e.arguments),O[JDt]=e=>iIe.FromTape(e.ID,e.type,e.arguments),O[QDt]=e=>nIe.FromTape(e.ID,e.type,e.arguments),O[eCt]=e=>sIe.FromTape(e.ID,e.type,e.arguments),O[tCt]=e=>aIe.FromTape(e.ID,e.type,e.arguments),O[rCt]=e=>oIe.FromTape(e.ID,e.type,e.arguments),O[iCt]=e=>lIe.FromTape(e.ID,e.type,e.arguments),O[nCt]=e=>cIe.FromTape(e.ID,e.type,e.arguments),O[sCt]=e=>uIe.FromTape(e.ID,e.type,e.arguments),O[aCt]=e=>hIe.FromTape(e.ID,e.type,e.arguments),O[oCt]=e=>pIe.FromTape(e.ID,e.type,e.arguments),O[lCt]=e=>dIe.FromTape(e.ID,e.type,e.arguments),O[cCt]=e=>fIe.FromTape(e.ID,e.type,e.arguments),O[uCt]=e=>mIe.FromTape(e.ID,e.type,e.arguments),O[hCt]=e=>gIe.FromTape(e.ID,e.type,e.arguments),O[pCt]=e=>vIe.FromTape(e.ID,e.type,e.arguments),O[dCt]=e=>yIe.FromTape(e.ID,e.type,e.arguments),O[fCt]=e=>TIe.FromTape(e.ID,e.type,e.arguments),O[mCt]=e=>EIe.FromTape(e.ID,e.type,e.arguments),O[gCt]=e=>bIe.FromTape(e.ID,e.type,e.arguments),O[vCt]=e=>xIe.FromTape(e.ID,e.type,e.arguments),O[yCt]=e=>IIe.FromTape(e.ID,e.type,e.arguments),O[TCt]=e=>_Ie.FromTape(e.ID,e.type,e.arguments),O[ECt]=e=>SIe.FromTape(e.ID,e.type,e.arguments),O[bCt]=e=>wIe.FromTape(e.ID,e.type,e.arguments),O[xCt]=e=>RIe.FromTape(e.ID,e.type,e.arguments),O[ICt]=e=>MIe.FromTape(e.ID,e.type,e.arguments),O[_Ct]=e=>DIe.FromTape(e.ID,e.type,e.arguments),O[SCt]=e=>CIe.FromTape(e.ID,e.type,e.arguments),O[wCt]=e=>AIe.FromTape(e.ID,e.type,e.arguments),O[RCt]=e=>OIe.FromTape(e.ID,e.type,e.arguments),O[MCt]=e=>PIe.FromTape(e.ID,e.type,e.arguments),O[DCt]=e=>NIe.FromTape(e.ID,e.type,e.arguments),O[CCt]=e=>LIe.FromTape(e.ID,e.type,e.arguments),O[ACt]=e=>FIe.FromTape(e.ID,e.type,e.arguments),O[OCt]=e=>HIe.FromTape(e.ID,e.type,e.arguments),O[PCt]=e=>UIe.FromTape(e.ID,e.type,e.arguments),O[NCt]=e=>BIe.FromTape(e.ID,e.type,e.arguments),O[LCt]=e=>kIe.FromTape(e.ID,e.type,e.arguments),O[FCt]=e=>GIe.FromTape(e.ID,e.type,e.arguments),O[HCt]=e=>VIe.FromTape(e.ID,e.type,e.arguments),O[UCt]=e=>zIe.FromTape(e.ID,e.type,e.arguments),O[BCt]=e=>jIe.FromTape(e.ID,e.type,e.arguments),O[kCt]=e=>WIe.FromTape(e.ID,e.type,e.arguments),O[GCt]=e=>qIe.FromTape(e.ID,e.type,e.arguments),O[VCt]=e=>YIe.FromTape(e.ID,e.type,e.arguments),O[zCt]=e=>XIe.FromTape(e.ID,e.type,e.arguments),O[jCt]=e=>$Ie.FromTape(e.ID,e.type,e.arguments),O[WCt]=e=>KIe.FromTape(e.ID,e.type,e.arguments),O[qCt]=e=>ZIe.FromTape(e.ID,e.type,e.arguments),O[YCt]=e=>JIe.FromTape(e.ID,e.type,e.arguments),O[XCt]=e=>QIe.FromTape(e.ID,e.type,e.arguments),O[$Ct]=e=>e_e.FromTape(e.ID,e.type,e.arguments),O[KCt]=e=>t_e.FromTape(e.ID,e.type,e.arguments),O[ZCt]=e=>r_e.FromTape(e.ID,e.type,e.arguments),O[JCt]=e=>i_e.FromTape(e.ID,e.type,e.arguments),O[QCt]=e=>n_e.FromTape(e.ID,e.type,e.arguments),O[eAt]=e=>s_e.FromTape(e.ID,e.type,e.arguments),O[tAt]=e=>a_e.FromTape(e.ID,e.type,e.arguments),O[rAt]=e=>o_e.FromTape(e.ID,e.type,e.arguments),O[iAt]=e=>l_e.FromTape(e.ID,e.type,e.arguments),O[nAt]=e=>c_e.FromTape(e.ID,e.type,e.arguments),O[sAt]=e=>u_e.FromTape(e.ID,e.type,e.arguments),O[aAt]=e=>h_e.FromTape(e.ID,e.type,e.arguments),O[oAt]=e=>p_e.FromTape(e.ID,e.type,e.arguments),O[lAt]=e=>d_e.FromTape(e.ID,e.type,e.arguments),O[cAt]=e=>f_e.FromTape(e.ID,e.type,e.arguments),O[uAt]=e=>m_e.FromTape(e.ID,e.type,e.arguments),O[hAt]=e=>g_e.FromTape(e.ID,e.type,e.arguments),O[pAt]=e=>v_e.FromTape(e.ID,e.type,e.arguments),O[dAt]=e=>y_e.FromTape(e.ID,e.type,e.arguments),O[fAt]=e=>T_e.FromTape(e.ID,e.type,e.arguments),O[mAt]=e=>E_e.FromTape(e.ID,e.type,e.arguments),O[gAt]=e=>b_e.FromTape(e.ID,e.type,e.arguments),O[vAt]=e=>x_e.FromTape(e.ID,e.type,e.arguments),O[yAt]=e=>I_e.FromTape(e.ID,e.type,e.arguments),O[TAt]=e=>__e.FromTape(e.ID,e.type,e.arguments),O[EAt]=e=>S_e.FromTape(e.ID,e.type,e.arguments),O[bAt]=e=>w_e.FromTape(e.ID,e.type,e.arguments),O[xAt]=e=>R_e.FromTape(e.ID,e.type,e.arguments),O[IAt]=e=>M_e.FromTape(e.ID,e.type,e.arguments),O[_At]=e=>D_e.FromTape(e.ID,e.type,e.arguments),O[SAt]=e=>C_e.FromTape(e.ID,e.type,e.arguments),O[wAt]=e=>A_e.FromTape(e.ID,e.type,e.arguments),O[RAt]=e=>O_e.FromTape(e.ID,e.type,e.arguments),O[MAt]=e=>P_e.FromTape(e.ID,e.type,e.arguments),O[DAt]=e=>N_e.FromTape(e.ID,e.type,e.arguments),O[CAt]=e=>L_e.FromTape(e.ID,e.type,e.arguments),O[AAt]=e=>F_e.FromTape(e.ID,e.type,e.arguments),O[OAt]=e=>H_e.FromTape(e.ID,e.type,e.arguments),O[PAt]=e=>U_e.FromTape(e.ID,e.type,e.arguments),O[NAt]=e=>B_e.FromTape(e.ID,e.type,e.arguments),O[LAt]=e=>k_e.FromTape(e.ID,e.type,e.arguments),O[FAt]=e=>G_e.FromTape(e.ID,e.type,e.arguments),O[HAt]=e=>V_e.FromTape(e.ID,e.type,e.arguments),O[UAt]=e=>z_e.FromTape(e.ID,e.type,e.arguments),O[BAt]=e=>j_e.FromTape(e.ID,e.type,e.arguments),O[kAt]=e=>W_e.FromTape(e.ID,e.type,e.arguments),O[GAt]=e=>q_e.FromTape(e.ID,e.type,e.arguments),O[VAt]=e=>Y_e.FromTape(e.ID,e.type,e.arguments),O[zAt]=e=>X_e.FromTape(e.ID,e.type,e.arguments),O[jAt]=e=>$_e.FromTape(e.ID,e.type,e.arguments),O[WAt]=e=>K_e.FromTape(e.ID,e.type,e.arguments),O[qAt]=e=>Z_e.FromTape(e.ID,e.type,e.arguments),O[YAt]=e=>J_e.FromTape(e.ID,e.type,e.arguments),O[XAt]=e=>Q_e.FromTape(e.ID,e.type,e.arguments),O[$At]=e=>eSe.FromTape(e.ID,e.type,e.arguments),O[KAt]=e=>tSe.FromTape(e.ID,e.type,e.arguments),O[ZAt]=e=>rSe.FromTape(e.ID,e.type,e.arguments),O[JAt]=e=>iSe.FromTape(e.ID,e.type,e.arguments),O[QAt]=e=>nSe.FromTape(e.ID,e.type,e.arguments),O[eOt]=e=>sSe.FromTape(e.ID,e.type,e.arguments),O[tOt]=e=>aSe.FromTape(e.ID,e.type,e.arguments),O[rOt]=e=>oSe.FromTape(e.ID,e.type,e.arguments),O[iOt]=e=>lSe.FromTape(e.ID,e.type,e.arguments),O[nOt]=e=>cSe.FromTape(e.ID,e.type,e.arguments),O[sOt]=e=>uSe.FromTape(e.ID,e.type,e.arguments),O[aOt]=e=>hSe.FromTape(e.ID,e.type,e.arguments),O[oOt]=e=>pSe.FromTape(e.ID,e.type,e.arguments),O[lOt]=e=>dSe.FromTape(e.ID,e.type,e.arguments),O[cOt]=e=>fSe.FromTape(e.ID,e.type,e.arguments),O[uOt]=e=>mSe.FromTape(e.ID,e.type,e.arguments),O[hOt]=e=>gSe.FromTape(e.ID,e.type,e.arguments),O[pOt]=e=>vSe.FromTape(e.ID,e.type,e.arguments),O[dOt]=e=>ySe.FromTape(e.ID,e.type,e.arguments),O[fOt]=e=>TSe.FromTape(e.ID,e.type,e.arguments),O[mOt]=e=>ESe.FromTape(e.ID,e.type,e.arguments),O[gOt]=e=>bSe.FromTape(e.ID,e.type,e.arguments),O[vOt]=e=>xSe.FromTape(e.ID,e.type,e.arguments),O[yOt]=e=>ISe.FromTape(e.ID,e.type,e.arguments),O[TOt]=e=>_Se.FromTape(e.ID,e.type,e.arguments),O[EOt]=e=>SSe.FromTape(e.ID,e.type,e.arguments),O[bOt]=e=>wSe.FromTape(e.ID,e.type,e.arguments),O[xOt]=e=>RSe.FromTape(e.ID,e.type,e.arguments),O[IOt]=e=>MSe.FromTape(e.ID,e.type,e.arguments),O[_Ot]=e=>DSe.FromTape(e.ID,e.type,e.arguments),O[SOt]=e=>CSe.FromTape(e.ID,e.type,e.arguments),O[wOt]=e=>ASe.FromTape(e.ID,e.type,e.arguments),O[ROt]=e=>OSe.FromTape(e.ID,e.type,e.arguments),O[MOt]=e=>PSe.FromTape(e.ID,e.type,e.arguments),O[DOt]=e=>NSe.FromTape(e.ID,e.type,e.arguments),O[COt]=e=>LSe.FromTape(e.ID,e.type,e.arguments),O[AOt]=e=>FSe.FromTape(e.ID,e.type,e.arguments),O[OOt]=e=>HSe.FromTape(e.ID,e.type,e.arguments),O[POt]=e=>USe.FromTape(e.ID,e.type,e.arguments),O[NOt]=e=>BSe.FromTape(e.ID,e.type,e.arguments),O[LOt]=e=>kSe.FromTape(e.ID,e.type,e.arguments),O[FOt]=e=>GSe.FromTape(e.ID,e.type,e.arguments),O[HOt]=e=>VSe.FromTape(e.ID,e.type,e.arguments),O[UOt]=e=>zSe.FromTape(e.ID,e.type,e.arguments),O[BOt]=e=>jSe.FromTape(e.ID,e.type,e.arguments),O[kOt]=e=>WSe.FromTape(e.ID,e.type,e.arguments),O[GOt]=e=>qSe.FromTape(e.ID,e.type,e.arguments),O[VOt]=e=>YSe.FromTape(e.ID,e.type,e.arguments),O[zOt]=e=>XSe.FromTape(e.ID,e.type,e.arguments),O[jOt]=e=>$Se.FromTape(e.ID,e.type,e.arguments),O[WOt]=e=>KSe.FromTape(e.ID,e.type,e.arguments),O[qOt]=e=>ZSe.FromTape(e.ID,e.type,e.arguments),O[YOt]=e=>JSe.FromTape(e.ID,e.type,e.arguments),O[XOt]=e=>QSe.FromTape(e.ID,e.type,e.arguments),O[$Ot]=e=>ewe.FromTape(e.ID,e.type,e.arguments),O[KOt]=e=>twe.FromTape(e.ID,e.type,e.arguments),O[ZOt]=e=>rwe.FromTape(e.ID,e.type,e.arguments),O[JOt]=e=>iwe.FromTape(e.ID,e.type,e.arguments),O[QOt]=e=>nwe.FromTape(e.ID,e.type,e.arguments),O[e3t]=e=>swe.FromTape(e.ID,e.type,e.arguments),O[t3t]=e=>awe.FromTape(e.ID,e.type,e.arguments),O[r3t]=e=>owe.FromTape(e.ID,e.type,e.arguments),O[i3t]=e=>lwe.FromTape(e.ID,e.type,e.arguments),O[n3t]=e=>cwe.FromTape(e.ID,e.type,e.arguments),O[s3t]=e=>uwe.FromTape(e.ID,e.type,e.arguments),O[a3t]=e=>hwe.FromTape(e.ID,e.type,e.arguments),O[o3t]=e=>pwe.FromTape(e.ID,e.type,e.arguments),O[l3t]=e=>dwe.FromTape(e.ID,e.type,e.arguments),O[c3t]=e=>fwe.FromTape(e.ID,e.type,e.arguments),O[u3t]=e=>mwe.FromTape(e.ID,e.type,e.arguments),O[h3t]=e=>gwe.FromTape(e.ID,e.type,e.arguments),O[p3t]=e=>vwe.FromTape(e.ID,e.type,e.arguments),O[d3t]=e=>ywe.FromTape(e.ID,e.type,e.arguments),O[f3t]=e=>Twe.FromTape(e.ID,e.type,e.arguments),O[m3t]=e=>Ewe.FromTape(e.ID,e.type,e.arguments),O[g3t]=e=>bwe.FromTape(e.ID,e.type,e.arguments),O[v3t]=e=>xwe.FromTape(e.ID,e.type,e.arguments),O[y3t]=e=>Iwe.FromTape(e.ID,e.type,e.arguments),O[T3t]=e=>_we.FromTape(e.ID,e.type,e.arguments),O[E3t]=e=>Swe.FromTape(e.ID,e.type,e.arguments),O[b3t]=e=>wwe.FromTape(e.ID,e.type,e.arguments),O[x3t]=e=>Rwe.FromTape(e.ID,e.type,e.arguments),O[I3t]=e=>Mwe.FromTape(e.ID,e.type,e.arguments),O[_3t]=e=>Dwe.FromTape(e.ID,e.type,e.arguments),O[S3t]=e=>Cwe.FromTape(e.ID,e.type,e.arguments),O[w3t]=e=>Awe.FromTape(e.ID,e.type,e.arguments),O[R3t]=e=>Owe.FromTape(e.ID,e.type,e.arguments),O[M3t]=e=>Pwe.FromTape(e.ID,e.type,e.arguments),O[D3t]=e=>Nwe.FromTape(e.ID,e.type,e.arguments),O[C3t]=e=>Lwe.FromTape(e.ID,e.type,e.arguments),O[A3t]=e=>Fwe.FromTape(e.ID,e.type,e.arguments),O[O3t]=e=>Hwe.FromTape(e.ID,e.type,e.arguments),O[P3t]=e=>Uwe.FromTape(e.ID,e.type,e.arguments),O[N3t]=e=>Bwe.FromTape(e.ID,e.type,e.arguments),O[L3t]=e=>kwe.FromTape(e.ID,e.type,e.arguments),O[F3t]=e=>Gwe.FromTape(e.ID,e.type,e.arguments),O[H3t]=e=>Vwe.FromTape(e.ID,e.type,e.arguments),O[U3t]=e=>zwe.FromTape(e.ID,e.type,e.arguments),O[B3t]=e=>jwe.FromTape(e.ID,e.type,e.arguments),O[k3t]=e=>Wwe.FromTape(e.ID,e.type,e.arguments);O[G3t]=e=>qwe.FromTape(e.ID,e.type,e.arguments),O[V3t]=e=>Ywe.FromTape(e.ID,e.type,e.arguments),O[z3t]=e=>Xwe.FromTape(e.ID,e.type,e.arguments),O[j3t]=e=>$we.FromTape(e.ID,e.type,e.arguments),O[W3t]=e=>Kwe.FromTape(e.ID,e.type,e.arguments),O[q3t]=e=>Zwe.FromTape(e.ID,e.type,e.arguments),O[Y3t]=e=>Jwe.FromTape(e.ID,e.type,e.arguments),O[X3t]=e=>Qwe.FromTape(e.ID,e.type,e.arguments),O[$3t]=e=>eRe.FromTape(e.ID,e.type,e.arguments),O[K3t]=e=>tRe.FromTape(e.ID,e.type,e.arguments),O[Z3t]=e=>rRe.FromTape(e.ID,e.type,e.arguments),O[J3t]=e=>iRe.FromTape(e.ID,e.type,e.arguments),O[Q3t]=e=>nRe.FromTape(e.ID,e.type,e.arguments),O[ePt]=e=>sRe.FromTape(e.ID,e.type,e.arguments),O[tPt]=e=>aRe.FromTape(e.ID,e.type,e.arguments),O[rPt]=e=>oRe.FromTape(e.ID,e.type,e.arguments);var Jg=class{constructor(e){this.value=e}};Jg.EMAIL="EMAIL",Jg.FAX="FAX",Jg.PHONE="PHONE",Jg.POST="POST",Jg.VERBAL="VERBAL",Jg.USERDEFINED="USERDEFINED",Jg.NOTDEFINED="NOTDEFINED";var dn=class{constructor(e){this.value=e}};dn.DEAD_LOAD_G="DEAD_LOAD_G",dn.COMPLETION_G1="COMPLETION_G1",dn.LIVE_LOAD_Q="LIVE_LOAD_Q",dn.SNOW_S="SNOW_S",dn.WIND_W="WIND_W",dn.PRESTRESSING_P="PRESTRESSING_P",dn.SETTLEMENT_U="SETTLEMENT_U",dn.TEMPERATURE_T="TEMPERATURE_T",dn.EARTHQUAKE_E="EARTHQUAKE_E",dn.FIRE="FIRE",dn.IMPULSE="IMPULSE",dn.IMPACT="IMPACT",dn.TRANSPORT="TRANSPORT",dn.ERECTION="ERECTION",dn.PROPPING="PROPPING",dn.SYSTEM_IMPERFECTION="SYSTEM_IMPERFECTION",dn.SHRINKAGE="SHRINKAGE",dn.CREEP="CREEP",dn.LACK_OF_FIT="LACK_OF_FIT",dn.BUOYANCY="BUOYANCY",dn.ICE="ICE",dn.CURRENT="CURRENT",dn.WAVE="WAVE",dn.RAIN="RAIN",dn.BRAKES="BRAKES",dn.USERDEFINED="USERDEFINED",dn.NOTDEFINED="NOTDEFINED";var sI=class{constructor(e){this.value=e}};sI.PERMANENT_G="PERMANENT_G",sI.VARIABLE_Q="VARIABLE_Q",sI.EXTRAORDINARY_A="EXTRAORDINARY_A",sI.USERDEFINED="USERDEFINED",sI.NOTDEFINED="NOTDEFINED";var Qg=class{constructor(e){this.value=e}};Qg.ELECTRICACTUATOR="ELECTRICACTUATOR",Qg.HANDOPERATEDACTUATOR="HANDOPERATEDACTUATOR",Qg.HYDRAULICACTUATOR="HYDRAULICACTUATOR",Qg.PNEUMATICACTUATOR="PNEUMATICACTUATOR",Qg.THERMOSTATICACTUATOR="THERMOSTATICACTUATOR",Qg.USERDEFINED="USERDEFINED",Qg.NOTDEFINED="NOTDEFINED";var aI=class{constructor(e){this.value=e}};aI.OFFICE="OFFICE",aI.SITE="SITE",aI.HOME="HOME",aI.DISTRIBUTIONPOINT="DISTRIBUTIONPOINT",aI.USERDEFINED="USERDEFINED";var oI=class{constructor(e){this.value=e}};oI.CONSTANTFLOW="CONSTANTFLOW",oI.VARIABLEFLOWPRESSUREDEPENDANT="VARIABLEFLOWPRESSUREDEPENDANT",oI.VARIABLEFLOWPRESSUREINDEPENDANT="VARIABLEFLOWPRESSUREINDEPENDANT",oI.USERDEFINED="USERDEFINED",oI.NOTDEFINED="NOTDEFINED";var vT=class{constructor(e){this.value=e}};vT.DIFFUSER="DIFFUSER",vT.GRILLE="GRILLE",vT.LOUVRE="LOUVRE",vT.REGISTER="REGISTER",vT.USERDEFINED="USERDEFINED",vT.NOTDEFINED="NOTDEFINED";var Fc=class{constructor(e){this.value=e}};Fc.FIXEDPLATECOUNTERFLOWEXCHANGER="FIXEDPLATECOUNTERFLOWEXCHANGER",Fc.FIXEDPLATECROSSFLOWEXCHANGER="FIXEDPLATECROSSFLOWEXCHANGER",Fc.FIXEDPLATEPARALLELFLOWEXCHANGER="FIXEDPLATEPARALLELFLOWEXCHANGER",Fc.ROTARYWHEEL="ROTARYWHEEL",Fc.RUNAROUNDCOILLOOP="RUNAROUNDCOILLOOP",Fc.HEATPIPE="HEATPIPE",Fc.TWINTOWERENTHALPYRECOVERYLOOPS="TWINTOWERENTHALPYRECOVERYLOOPS",Fc.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS="THERMOSIPHONSEALEDTUBEHEATEXCHANGERS",Fc.THERMOSIPHONCOILTYPEHEATEXCHANGERS="THERMOSIPHONCOILTYPEHEATEXCHANGERS",Fc.USERDEFINED="USERDEFINED",Fc.NOTDEFINED="NOTDEFINED";var Lf=class{constructor(e){this.value=e}};Lf.BELL="BELL",Lf.BREAKGLASSBUTTON="BREAKGLASSBUTTON",Lf.LIGHT="LIGHT",Lf.MANUALPULLBOX="MANUALPULLBOX",Lf.SIREN="SIREN",Lf.WHISTLE="WHISTLE",Lf.USERDEFINED="USERDEFINED",Lf.NOTDEFINED="NOTDEFINED";var Vde=class{constructor(e){this.value=e}};Vde.USERDEFINED="USERDEFINED",Vde.NOTDEFINED="NOTDEFINED";var lI=class{constructor(e){this.value=e}};lI.IN_PLANE_LOADING_2D="IN_PLANE_LOADING_2D",lI.OUT_PLANE_LOADING_2D="OUT_PLANE_LOADING_2D",lI.LOADING_3D="LOADING_3D",lI.USERDEFINED="USERDEFINED",lI.NOTDEFINED="NOTDEFINED";var yT=class{constructor(e){this.value=e}};yT.FIRST_ORDER_THEORY="FIRST_ORDER_THEORY",yT.SECOND_ORDER_THEORY="SECOND_ORDER_THEORY",yT.THIRD_ORDER_THEORY="THIRD_ORDER_THEORY",yT.FULL_NONLINEAR_THEORY="FULL_NONLINEAR_THEORY",yT.USERDEFINED="USERDEFINED",yT.NOTDEFINED="NOTDEFINED";var dA=class{constructor(e){this.value=e}};dA.ADD="ADD",dA.DIVIDE="DIVIDE",dA.MULTIPLY="MULTIPLY",dA.SUBTRACT="SUBTRACT";var Xk=class{constructor(e){this.value=e}};Xk.SITE="SITE",Xk.FACTORY="FACTORY",Xk.NOTDEFINED="NOTDEFINED";var Xo=class{constructor(e){this.value=e}};Xo.AMPLIFIER="AMPLIFIER",Xo.CAMERA="CAMERA",Xo.DISPLAY="DISPLAY",Xo.MICROPHONE="MICROPHONE",Xo.PLAYER="PLAYER",Xo.PROJECTOR="PROJECTOR",Xo.RECEIVER="RECEIVER",Xo.SPEAKER="SPEAKER",Xo.SWITCHER="SWITCHER",Xo.TELEPHONE="TELEPHONE",Xo.TUNER="TUNER",Xo.USERDEFINED="USERDEFINED",Xo.NOTDEFINED="NOTDEFINED";var TT=class{constructor(e){this.value=e}};TT.POLYLINE_FORM="POLYLINE_FORM",TT.CIRCULAR_ARC="CIRCULAR_ARC",TT.ELLIPTIC_ARC="ELLIPTIC_ARC",TT.PARABOLIC_ARC="PARABOLIC_ARC",TT.HYPERBOLIC_ARC="HYPERBOLIC_ARC",TT.UNSPECIFIED="UNSPECIFIED";var Hc=class{constructor(e){this.value=e}};Hc.PLANE_SURF="PLANE_SURF",Hc.CYLINDRICAL_SURF="CYLINDRICAL_SURF",Hc.CONICAL_SURF="CONICAL_SURF",Hc.SPHERICAL_SURF="SPHERICAL_SURF",Hc.TOROIDAL_SURF="TOROIDAL_SURF",Hc.SURF_OF_REVOLUTION="SURF_OF_REVOLUTION",Hc.RULED_SURF="RULED_SURF",Hc.GENERALISED_CONE="GENERALISED_CONE",Hc.QUADRIC_SURF="QUADRIC_SURF",Hc.SURF_OF_LINEAR_EXTRUSION="SURF_OF_LINEAR_EXTRUSION",Hc.UNSPECIFIED="UNSPECIFIED";var po=class{constructor(e){this.value=e}};po.BEAM="BEAM",po.JOIST="JOIST",po.HOLLOWCORE="HOLLOWCORE",po.LINTEL="LINTEL",po.SPANDREL="SPANDREL",po.T_BEAM="T_BEAM",po.GIRDER_SEGMENT="GIRDER_SEGMENT",po.DIAPHRAGM="DIAPHRAGM",po.PIERCAP="PIERCAP",po.HATSTONE="HATSTONE",po.CORNICE="CORNICE",po.EDGEBEAM="EDGEBEAM",po.USERDEFINED="USERDEFINED",po.NOTDEFINED="NOTDEFINED";var cI=class{constructor(e){this.value=e}};cI.FIXED_MOVEMENT="FIXED_MOVEMENT",cI.GUIDED_LONGITUDINAL="GUIDED_LONGITUDINAL",cI.GUIDED_TRANSVERSAL="GUIDED_TRANSVERSAL",cI.FREE_MOVEMENT="FREE_MOVEMENT",cI.NOTDEFINED="NOTDEFINED";var Ku=class{constructor(e){this.value=e}};Ku.CYLINDRICAL="CYLINDRICAL",Ku.SPHERICAL="SPHERICAL",Ku.ELASTOMERIC="ELASTOMERIC",Ku.POT="POT",Ku.GUIDE="GUIDE",Ku.ROCKER="ROCKER",Ku.ROLLER="ROLLER",Ku.DISK="DISK",Ku.USERDEFINED="USERDEFINED",Ku.NOTDEFINED="NOTDEFINED";var Zu=class{constructor(e){this.value=e}};Zu.GREATERTHAN="GREATERTHAN",Zu.GREATERTHANOREQUALTO="GREATERTHANOREQUALTO",Zu.LESSTHAN="LESSTHAN",Zu.LESSTHANOREQUALTO="LESSTHANOREQUALTO",Zu.EQUALTO="EQUALTO",Zu.NOTEQUALTO="NOTEQUALTO",Zu.INCLUDES="INCLUDES",Zu.NOTINCLUDES="NOTINCLUDES",Zu.INCLUDEDIN="INCLUDEDIN",Zu.NOTINCLUDEDIN="NOTINCLUDEDIN";var fA=class{constructor(e){this.value=e}};fA.WATER="WATER",fA.STEAM="STEAM",fA.USERDEFINED="USERDEFINED",fA.NOTDEFINED="NOTDEFINED";var $k=class{constructor(e){this.value=e}};$k.UNION="UNION",$k.INTERSECTION="INTERSECTION",$k.DIFFERENCE="DIFFERENCE";var Bl=class{constructor(e){this.value=e}};Bl.ABUTMENT="ABUTMENT",Bl.DECK="DECK",Bl.DECK_SEGMENT="DECK_SEGMENT",Bl.FOUNDATION="FOUNDATION",Bl.PIER="PIER",Bl.PIER_SEGMENT="PIER_SEGMENT",Bl.PYLON="PYLON",Bl.SUBSTRUCTURE="SUBSTRUCTURE",Bl.SUPERSTRUCTURE="SUPERSTRUCTURE",Bl.SURFACESTRUCTURE="SURFACESTRUCTURE",Bl.USERDEFINED="USERDEFINED",Bl.NOTDEFINED="NOTDEFINED";var Ju=class{constructor(e){this.value=e}};Ju.ARCHED="ARCHED",Ju.CABLE_STAYED="CABLE_STAYED",Ju.CANTILEVER="CANTILEVER",Ju.CULVERT="CULVERT",Ju.FRAMEWORK="FRAMEWORK",Ju.GIRDER="GIRDER",Ju.SUSPENSION="SUSPENSION",Ju.TRUSS="TRUSS",Ju.USERDEFINED="USERDEFINED",Ju.NOTDEFINED="NOTDEFINED";var uI=class{constructor(e){this.value=e}};uI.INSULATION="INSULATION",uI.PRECASTPANEL="PRECASTPANEL",uI.APRON="APRON",uI.USERDEFINED="USERDEFINED",uI.NOTDEFINED="NOTDEFINED";var e0=class{constructor(e){this.value=e}};e0.COMPLEX="COMPLEX",e0.ELEMENT="ELEMENT",e0.PARTIAL="PARTIAL",e0.PROVISIONFORVOID="PROVISIONFORVOID",e0.PROVISIONFORSPACE="PROVISIONFORSPACE",e0.USERDEFINED="USERDEFINED",e0.NOTDEFINED="NOTDEFINED";var Qu=class{constructor(e){this.value=e}};Qu.FENESTRATION="FENESTRATION",Qu.FOUNDATION="FOUNDATION",Qu.LOADBEARING="LOADBEARING",Qu.OUTERSHELL="OUTERSHELL",Qu.SHADING="SHADING",Qu.TRANSPORT="TRANSPORT",Qu.REINFORCING="REINFORCING",Qu.PRESTRESSING="PRESTRESSING",Qu.USERDEFINED="USERDEFINED",Qu.NOTDEFINED="NOTDEFINED";var zde=class{constructor(e){this.value=e}};zde.USERDEFINED="USERDEFINED",zde.NOTDEFINED="NOTDEFINED";var ET=class{constructor(e){this.value=e}};ET.BEND="BEND",ET.CROSS="CROSS",ET.REDUCER="REDUCER",ET.TEE="TEE",ET.USERDEFINED="USERDEFINED",ET.NOTDEFINED="NOTDEFINED";var bT=class{constructor(e){this.value=e}};bT.CABLELADDERSEGMENT="CABLELADDERSEGMENT",bT.CABLETRAYSEGMENT="CABLETRAYSEGMENT",bT.CABLETRUNKINGSEGMENT="CABLETRUNKINGSEGMENT",bT.CONDUITSEGMENT="CONDUITSEGMENT",bT.USERDEFINED="USERDEFINED",bT.NOTDEFINED="NOTDEFINED";var t0=class{constructor(e){this.value=e}};t0.CONNECTOR="CONNECTOR",t0.ENTRY="ENTRY",t0.EXIT="EXIT",t0.JUNCTION="JUNCTION",t0.TRANSITION="TRANSITION",t0.USERDEFINED="USERDEFINED",t0.NOTDEFINED="NOTDEFINED";var xT=class{constructor(e){this.value=e}};xT.BUSBARSEGMENT="BUSBARSEGMENT",xT.CABLESEGMENT="CABLESEGMENT",xT.CONDUCTORSEGMENT="CONDUCTORSEGMENT",xT.CORESEGMENT="CORESEGMENT",xT.USERDEFINED="USERDEFINED",xT.NOTDEFINED="NOTDEFINED";var mA=class{constructor(e){this.value=e}};mA.WELL="WELL",mA.CAISSON="CAISSON",mA.USERDEFINED="USERDEFINED",mA.NOTDEFINED="NOTDEFINED";var hI=class{constructor(e){this.value=e}};hI.NOCHANGE="NOCHANGE",hI.MODIFIED="MODIFIED",hI.ADDED="ADDED",hI.DELETED="DELETED",hI.NOTDEFINED="NOTDEFINED";var pI=class{constructor(e){this.value=e}};pI.AIRCOOLED="AIRCOOLED",pI.WATERCOOLED="WATERCOOLED",pI.HEATRECOVERY="HEATRECOVERY",pI.USERDEFINED="USERDEFINED",pI.NOTDEFINED="NOTDEFINED";var jde=class{constructor(e){this.value=e}};jde.USERDEFINED="USERDEFINED",jde.NOTDEFINED="NOTDEFINED";var Vp=class{constructor(e){this.value=e}};Vp.DXCOOLINGCOIL="DXCOOLINGCOIL",Vp.ELECTRICHEATINGCOIL="ELECTRICHEATINGCOIL",Vp.GASHEATINGCOIL="GASHEATINGCOIL",Vp.HYDRONICCOIL="HYDRONICCOIL",Vp.STEAMHEATINGCOIL="STEAMHEATINGCOIL",Vp.WATERCOOLINGCOIL="WATERCOOLINGCOIL",Vp.WATERHEATINGCOIL="WATERHEATINGCOIL",Vp.USERDEFINED="USERDEFINED",Vp.NOTDEFINED="NOTDEFINED";var r0=class{constructor(e){this.value=e}};r0.COLUMN="COLUMN",r0.PILASTER="PILASTER",r0.PIERSTEM="PIERSTEM",r0.PIERSTEM_SEGMENT="PIERSTEM_SEGMENT",r0.STANDCOLUMN="STANDCOLUMN",r0.USERDEFINED="USERDEFINED",r0.NOTDEFINED="NOTDEFINED";var fo=class{constructor(e){this.value=e}};fo.ANTENNA="ANTENNA",fo.COMPUTER="COMPUTER",fo.FAX="FAX",fo.GATEWAY="GATEWAY",fo.MODEM="MODEM",fo.NETWORKAPPLIANCE="NETWORKAPPLIANCE",fo.NETWORKBRIDGE="NETWORKBRIDGE",fo.NETWORKHUB="NETWORKHUB",fo.PRINTER="PRINTER",fo.REPEATER="REPEATER",fo.ROUTER="ROUTER",fo.SCANNER="SCANNER",fo.USERDEFINED="USERDEFINED",fo.NOTDEFINED="NOTDEFINED";var Wde=class{constructor(e){this.value=e}};Wde.P_COMPLEX="P_COMPLEX",Wde.Q_COMPLEX="Q_COMPLEX";var ks=class{constructor(e){this.value=e}};ks.DYNAMIC="DYNAMIC",ks.RECIPROCATING="RECIPROCATING",ks.ROTARY="ROTARY",ks.SCROLL="SCROLL",ks.TROCHOIDAL="TROCHOIDAL",ks.SINGLESTAGE="SINGLESTAGE",ks.BOOSTER="BOOSTER",ks.OPENTYPE="OPENTYPE",ks.HERMETIC="HERMETIC",ks.SEMIHERMETIC="SEMIHERMETIC",ks.WELDEDSHELLHERMETIC="WELDEDSHELLHERMETIC",ks.ROLLINGPISTON="ROLLINGPISTON",ks.ROTARYVANE="ROTARYVANE",ks.SINGLESCREW="SINGLESCREW",ks.TWINSCREW="TWINSCREW",ks.USERDEFINED="USERDEFINED",ks.NOTDEFINED="NOTDEFINED";var zp=class{constructor(e){this.value=e}};zp.AIRCOOLED="AIRCOOLED",zp.EVAPORATIVECOOLED="EVAPORATIVECOOLED",zp.WATERCOOLED="WATERCOOLED",zp.WATERCOOLEDBRAZEDPLATE="WATERCOOLEDBRAZEDPLATE",zp.WATERCOOLEDSHELLCOIL="WATERCOOLEDSHELLCOIL",zp.WATERCOOLEDSHELLTUBE="WATERCOOLEDSHELLTUBE",zp.WATERCOOLEDTUBEINTUBE="WATERCOOLEDTUBEINTUBE",zp.USERDEFINED="USERDEFINED",zp.NOTDEFINED="NOTDEFINED";var gA=class{constructor(e){this.value=e}};gA.ATPATH="ATPATH",gA.ATSTART="ATSTART",gA.ATEND="ATEND",gA.NOTDEFINED="NOTDEFINED";var dI=class{constructor(e){this.value=e}};dI.HARD="HARD",dI.SOFT="SOFT",dI.ADVISORY="ADVISORY",dI.USERDEFINED="USERDEFINED",dI.NOTDEFINED="NOTDEFINED";var eh=class{constructor(e){this.value=e}};eh.DEMOLISHING="DEMOLISHING",eh.EARTHMOVING="EARTHMOVING",eh.ERECTING="ERECTING",eh.HEATING="HEATING",eh.LIGHTING="LIGHTING",eh.PAVING="PAVING",eh.PUMPING="PUMPING",eh.TRANSPORTING="TRANSPORTING",eh.USERDEFINED="USERDEFINED",eh.NOTDEFINED="NOTDEFINED";var Uc=class{constructor(e){this.value=e}};Uc.AGGREGATES="AGGREGATES",Uc.CONCRETE="CONCRETE",Uc.DRYWALL="DRYWALL",Uc.FUEL="FUEL",Uc.GYPSUM="GYPSUM",Uc.MASONRY="MASONRY",Uc.METAL="METAL",Uc.PLASTIC="PLASTIC",Uc.WOOD="WOOD",Uc.NOTDEFINED="NOTDEFINED",Uc.USERDEFINED="USERDEFINED";var vA=class{constructor(e){this.value=e}};vA.ASSEMBLY="ASSEMBLY",vA.FORMWORK="FORMWORK",vA.USERDEFINED="USERDEFINED",vA.NOTDEFINED="NOTDEFINED";var i0=class{constructor(e){this.value=e}};i0.FLOATING="FLOATING",i0.PROGRAMMABLE="PROGRAMMABLE",i0.PROPORTIONAL="PROPORTIONAL",i0.MULTIPOSITION="MULTIPOSITION",i0.TWOPOSITION="TWOPOSITION",i0.USERDEFINED="USERDEFINED",i0.NOTDEFINED="NOTDEFINED";var yA=class{constructor(e){this.value=e}};yA.ACTIVE="ACTIVE",yA.PASSIVE="PASSIVE",yA.USERDEFINED="USERDEFINED",yA.NOTDEFINED="NOTDEFINED";var fI=class{constructor(e){this.value=e}};fI.NATURALDRAFT="NATURALDRAFT",fI.MECHANICALINDUCEDDRAFT="MECHANICALINDUCEDDRAFT",fI.MECHANICALFORCEDDRAFT="MECHANICALFORCEDDRAFT",fI.USERDEFINED="USERDEFINED",fI.NOTDEFINED="NOTDEFINED";var qde=class{constructor(e){this.value=e}};qde.USERDEFINED="USERDEFINED",qde.NOTDEFINED="NOTDEFINED";var jp=class{constructor(e){this.value=e}};jp.BUDGET="BUDGET",jp.COSTPLAN="COSTPLAN",jp.ESTIMATE="ESTIMATE",jp.TENDER="TENDER",jp.PRICEDBILLOFQUANTITIES="PRICEDBILLOFQUANTITIES",jp.UNPRICEDBILLOFQUANTITIES="UNPRICEDBILLOFQUANTITIES",jp.SCHEDULEOFRATES="SCHEDULEOFRATES",jp.USERDEFINED="USERDEFINED",jp.NOTDEFINED="NOTDEFINED";var $o=class{constructor(e){this.value=e}};$o.CEILING="CEILING",$o.FLOORING="FLOORING",$o.CLADDING="CLADDING",$o.ROOFING="ROOFING",$o.MOLDING="MOLDING",$o.SKIRTINGBOARD="SKIRTINGBOARD",$o.INSULATION="INSULATION",$o.MEMBRANE="MEMBRANE",$o.SLEEVING="SLEEVING",$o.WRAPPING="WRAPPING",$o.COPING="COPING",$o.USERDEFINED="USERDEFINED",$o.NOTDEFINED="NOTDEFINED";var TA=class{constructor(e){this.value=e}};TA.OFFICE="OFFICE",TA.SITE="SITE",TA.USERDEFINED="USERDEFINED",TA.NOTDEFINED="NOTDEFINED";var Yde=class{constructor(e){this.value=e}};Yde.USERDEFINED="USERDEFINED",Yde.NOTDEFINED="NOTDEFINED";var EA=class{constructor(e){this.value=e}};EA.LINEAR="LINEAR",EA.LOG_LINEAR="LOG_LINEAR",EA.LOG_LOG="LOG_LOG",EA.NOTDEFINED="NOTDEFINED";var Ko=class{constructor(e){this.value=e}};Ko.BACKDRAFTDAMPER="BACKDRAFTDAMPER",Ko.BALANCINGDAMPER="BALANCINGDAMPER",Ko.BLASTDAMPER="BLASTDAMPER",Ko.CONTROLDAMPER="CONTROLDAMPER",Ko.FIREDAMPER="FIREDAMPER",Ko.FIRESMOKEDAMPER="FIRESMOKEDAMPER",Ko.FUMEHOODEXHAUST="FUMEHOODEXHAUST",Ko.GRAVITYDAMPER="GRAVITYDAMPER",Ko.GRAVITYRELIEFDAMPER="GRAVITYRELIEFDAMPER",Ko.RELIEFDAMPER="RELIEFDAMPER",Ko.SMOKEDAMPER="SMOKEDAMPER",Ko.USERDEFINED="USERDEFINED",Ko.NOTDEFINED="NOTDEFINED";var mI=class{constructor(e){this.value=e}};mI.MEASURED="MEASURED",mI.PREDICTED="PREDICTED",mI.SIMULATED="SIMULATED",mI.USERDEFINED="USERDEFINED",mI.NOTDEFINED="NOTDEFINED";var dr=class{constructor(e){this.value=e}};dr.ANGULARVELOCITYUNIT="ANGULARVELOCITYUNIT",dr.AREADENSITYUNIT="AREADENSITYUNIT",dr.COMPOUNDPLANEANGLEUNIT="COMPOUNDPLANEANGLEUNIT",dr.DYNAMICVISCOSITYUNIT="DYNAMICVISCOSITYUNIT",dr.HEATFLUXDENSITYUNIT="HEATFLUXDENSITYUNIT",dr.INTEGERCOUNTRATEUNIT="INTEGERCOUNTRATEUNIT",dr.ISOTHERMALMOISTURECAPACITYUNIT="ISOTHERMALMOISTURECAPACITYUNIT",dr.KINEMATICVISCOSITYUNIT="KINEMATICVISCOSITYUNIT",dr.LINEARVELOCITYUNIT="LINEARVELOCITYUNIT",dr.MASSDENSITYUNIT="MASSDENSITYUNIT",dr.MASSFLOWRATEUNIT="MASSFLOWRATEUNIT",dr.MOISTUREDIFFUSIVITYUNIT="MOISTUREDIFFUSIVITYUNIT",dr.MOLECULARWEIGHTUNIT="MOLECULARWEIGHTUNIT",dr.SPECIFICHEATCAPACITYUNIT="SPECIFICHEATCAPACITYUNIT",dr.THERMALADMITTANCEUNIT="THERMALADMITTANCEUNIT",dr.THERMALCONDUCTANCEUNIT="THERMALCONDUCTANCEUNIT",dr.THERMALRESISTANCEUNIT="THERMALRESISTANCEUNIT",dr.THERMALTRANSMITTANCEUNIT="THERMALTRANSMITTANCEUNIT",dr.VAPORPERMEABILITYUNIT="VAPORPERMEABILITYUNIT",dr.VOLUMETRICFLOWRATEUNIT="VOLUMETRICFLOWRATEUNIT",dr.ROTATIONALFREQUENCYUNIT="ROTATIONALFREQUENCYUNIT",dr.TORQUEUNIT="TORQUEUNIT",dr.MOMENTOFINERTIAUNIT="MOMENTOFINERTIAUNIT",dr.LINEARMOMENTUNIT="LINEARMOMENTUNIT",dr.LINEARFORCEUNIT="LINEARFORCEUNIT",dr.PLANARFORCEUNIT="PLANARFORCEUNIT",dr.MODULUSOFELASTICITYUNIT="MODULUSOFELASTICITYUNIT",dr.SHEARMODULUSUNIT="SHEARMODULUSUNIT",dr.LINEARSTIFFNESSUNIT="LINEARSTIFFNESSUNIT",dr.ROTATIONALSTIFFNESSUNIT="ROTATIONALSTIFFNESSUNIT",dr.MODULUSOFSUBGRADEREACTIONUNIT="MODULUSOFSUBGRADEREACTIONUNIT",dr.ACCELERATIONUNIT="ACCELERATIONUNIT",dr.CURVATUREUNIT="CURVATUREUNIT",dr.HEATINGVALUEUNIT="HEATINGVALUEUNIT",dr.IONCONCENTRATIONUNIT="IONCONCENTRATIONUNIT",dr.LUMINOUSINTENSITYDISTRIBUTIONUNIT="LUMINOUSINTENSITYDISTRIBUTIONUNIT",dr.MASSPERLENGTHUNIT="MASSPERLENGTHUNIT",dr.MODULUSOFLINEARSUBGRADEREACTIONUNIT="MODULUSOFLINEARSUBGRADEREACTIONUNIT",dr.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT="MODULUSOFROTATIONALSUBGRADEREACTIONUNIT",dr.PHUNIT="PHUNIT",dr.ROTATIONALMASSUNIT="ROTATIONALMASSUNIT",dr.SECTIONAREAINTEGRALUNIT="SECTIONAREAINTEGRALUNIT",dr.SECTIONMODULUSUNIT="SECTIONMODULUSUNIT",dr.SOUNDPOWERLEVELUNIT="SOUNDPOWERLEVELUNIT",dr.SOUNDPOWERUNIT="SOUNDPOWERUNIT",dr.SOUNDPRESSURELEVELUNIT="SOUNDPRESSURELEVELUNIT",dr.SOUNDPRESSUREUNIT="SOUNDPRESSUREUNIT",dr.TEMPERATUREGRADIENTUNIT="TEMPERATUREGRADIENTUNIT",dr.TEMPERATURERATEOFCHANGEUNIT="TEMPERATURERATEOFCHANGEUNIT",dr.THERMALEXPANSIONCOEFFICIENTUNIT="THERMALEXPANSIONCOEFFICIENTUNIT",dr.WARPINGCONSTANTUNIT="WARPINGCONSTANTUNIT",dr.WARPINGMOMENTUNIT="WARPINGMOMENTUNIT",dr.USERDEFINED="USERDEFINED";var Xde=class{constructor(e){this.value=e}};Xde.POSITIVE="POSITIVE",Xde.NEGATIVE="NEGATIVE";var IT=class{constructor(e){this.value=e}};IT.ANCHORPLATE="ANCHORPLATE",IT.BRACKET="BRACKET",IT.SHOE="SHOE",IT.EXPANSION_JOINT_DEVICE="EXPANSION_JOINT_DEVICE",IT.USERDEFINED="USERDEFINED",IT.NOTDEFINED="NOTDEFINED";var th=class{constructor(e){this.value=e}};th.FORMEDDUCT="FORMEDDUCT",th.INSPECTIONCHAMBER="INSPECTIONCHAMBER",th.INSPECTIONPIT="INSPECTIONPIT",th.MANHOLE="MANHOLE",th.METERCHAMBER="METERCHAMBER",th.SUMP="SUMP",th.TRENCH="TRENCH",th.VALVECHAMBER="VALVECHAMBER",th.USERDEFINED="USERDEFINED",th.NOTDEFINED="NOTDEFINED";var _T=class{constructor(e){this.value=e}};_T.CABLE="CABLE",_T.CABLECARRIER="CABLECARRIER",_T.DUCT="DUCT",_T.PIPE="PIPE",_T.USERDEFINED="USERDEFINED",_T.NOTDEFINED="NOTDEFINED";var Pr=class{constructor(e){this.value=e}};Pr.AIRCONDITIONING="AIRCONDITIONING",Pr.AUDIOVISUAL="AUDIOVISUAL",Pr.CHEMICAL="CHEMICAL",Pr.CHILLEDWATER="CHILLEDWATER",Pr.COMMUNICATION="COMMUNICATION",Pr.COMPRESSEDAIR="COMPRESSEDAIR",Pr.CONDENSERWATER="CONDENSERWATER",Pr.CONTROL="CONTROL",Pr.CONVEYING="CONVEYING",Pr.DATA="DATA",Pr.DISPOSAL="DISPOSAL",Pr.DOMESTICCOLDWATER="DOMESTICCOLDWATER",Pr.DOMESTICHOTWATER="DOMESTICHOTWATER",Pr.DRAINAGE="DRAINAGE",Pr.EARTHING="EARTHING",Pr.ELECTRICAL="ELECTRICAL",Pr.ELECTROACOUSTIC="ELECTROACOUSTIC",Pr.EXHAUST="EXHAUST",Pr.FIREPROTECTION="FIREPROTECTION",Pr.FUEL="FUEL",Pr.GAS="GAS",Pr.HAZARDOUS="HAZARDOUS",Pr.HEATING="HEATING",Pr.LIGHTING="LIGHTING",Pr.LIGHTNINGPROTECTION="LIGHTNINGPROTECTION",Pr.MUNICIPALSOLIDWASTE="MUNICIPALSOLIDWASTE",Pr.OIL="OIL",Pr.OPERATIONAL="OPERATIONAL",Pr.POWERGENERATION="POWERGENERATION",Pr.RAINWATER="RAINWATER",Pr.REFRIGERATION="REFRIGERATION",Pr.SECURITY="SECURITY",Pr.SEWAGE="SEWAGE",Pr.SIGNAL="SIGNAL",Pr.STORMWATER="STORMWATER",Pr.TELEPHONE="TELEPHONE",Pr.TV="TV",Pr.VACUUM="VACUUM",Pr.VENT="VENT",Pr.VENTILATION="VENTILATION",Pr.WASTEWATER="WASTEWATER",Pr.WATERSUPPLY="WATERSUPPLY",Pr.USERDEFINED="USERDEFINED",Pr.NOTDEFINED="NOTDEFINED";var ST=class{constructor(e){this.value=e}};ST.PUBLIC="PUBLIC",ST.RESTRICTED="RESTRICTED",ST.CONFIDENTIAL="CONFIDENTIAL",ST.PERSONAL="PERSONAL",ST.USERDEFINED="USERDEFINED",ST.NOTDEFINED="NOTDEFINED";var gI=class{constructor(e){this.value=e}};gI.DRAFT="DRAFT",gI.FINALDRAFT="FINALDRAFT",gI.FINAL="FINAL",gI.REVISION="REVISION",gI.NOTDEFINED="NOTDEFINED";var Wp=class{constructor(e){this.value=e}};Wp.SWINGING="SWINGING",Wp.DOUBLE_ACTING="DOUBLE_ACTING",Wp.SLIDING="SLIDING",Wp.FOLDING="FOLDING",Wp.REVOLVING="REVOLVING",Wp.ROLLINGUP="ROLLINGUP",Wp.FIXEDPANEL="FIXEDPANEL",Wp.USERDEFINED="USERDEFINED",Wp.NOTDEFINED="NOTDEFINED";var bA=class{constructor(e){this.value=e}};bA.LEFT="LEFT",bA.MIDDLE="MIDDLE",bA.RIGHT="RIGHT",bA.NOTDEFINED="NOTDEFINED";var qp=class{constructor(e){this.value=e}};qp.ALUMINIUM="ALUMINIUM",qp.HIGH_GRADE_STEEL="HIGH_GRADE_STEEL",qp.STEEL="STEEL",qp.WOOD="WOOD",qp.ALUMINIUM_WOOD="ALUMINIUM_WOOD",qp.ALUMINIUM_PLASTIC="ALUMINIUM_PLASTIC",qp.PLASTIC="PLASTIC",qp.USERDEFINED="USERDEFINED",qp.NOTDEFINED="NOTDEFINED";var As=class{constructor(e){this.value=e}};As.SINGLE_SWING_LEFT="SINGLE_SWING_LEFT",As.SINGLE_SWING_RIGHT="SINGLE_SWING_RIGHT",As.DOUBLE_DOOR_SINGLE_SWING="DOUBLE_DOOR_SINGLE_SWING",As.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT="DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT",As.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT="DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT",As.DOUBLE_SWING_LEFT="DOUBLE_SWING_LEFT",As.DOUBLE_SWING_RIGHT="DOUBLE_SWING_RIGHT",As.DOUBLE_DOOR_DOUBLE_SWING="DOUBLE_DOOR_DOUBLE_SWING",As.SLIDING_TO_LEFT="SLIDING_TO_LEFT",As.SLIDING_TO_RIGHT="SLIDING_TO_RIGHT",As.DOUBLE_DOOR_SLIDING="DOUBLE_DOOR_SLIDING",As.FOLDING_TO_LEFT="FOLDING_TO_LEFT",As.FOLDING_TO_RIGHT="FOLDING_TO_RIGHT",As.DOUBLE_DOOR_FOLDING="DOUBLE_DOOR_FOLDING",As.REVOLVING="REVOLVING",As.ROLLINGUP="ROLLINGUP",As.USERDEFINED="USERDEFINED",As.NOTDEFINED="NOTDEFINED";var vI=class{constructor(e){this.value=e}};vI.DOOR="DOOR",vI.GATE="GATE",vI.TRAPDOOR="TRAPDOOR",vI.USERDEFINED="USERDEFINED",vI.NOTDEFINED="NOTDEFINED";var ps=class{constructor(e){this.value=e}};ps.SINGLE_SWING_LEFT="SINGLE_SWING_LEFT",ps.SINGLE_SWING_RIGHT="SINGLE_SWING_RIGHT",ps.DOUBLE_DOOR_SINGLE_SWING="DOUBLE_DOOR_SINGLE_SWING",ps.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT="DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT",ps.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT="DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT",ps.DOUBLE_SWING_LEFT="DOUBLE_SWING_LEFT",ps.DOUBLE_SWING_RIGHT="DOUBLE_SWING_RIGHT",ps.DOUBLE_DOOR_DOUBLE_SWING="DOUBLE_DOOR_DOUBLE_SWING",ps.SLIDING_TO_LEFT="SLIDING_TO_LEFT",ps.SLIDING_TO_RIGHT="SLIDING_TO_RIGHT",ps.DOUBLE_DOOR_SLIDING="DOUBLE_DOOR_SLIDING",ps.FOLDING_TO_LEFT="FOLDING_TO_LEFT",ps.FOLDING_TO_RIGHT="FOLDING_TO_RIGHT",ps.DOUBLE_DOOR_FOLDING="DOUBLE_DOOR_FOLDING",ps.REVOLVING="REVOLVING",ps.ROLLINGUP="ROLLINGUP",ps.SWING_FIXED_LEFT="SWING_FIXED_LEFT",ps.SWING_FIXED_RIGHT="SWING_FIXED_RIGHT",ps.USERDEFINED="USERDEFINED",ps.NOTDEFINED="NOTDEFINED";var Yp=class{constructor(e){this.value=e}};Yp.BEND="BEND",Yp.CONNECTOR="CONNECTOR",Yp.ENTRY="ENTRY",Yp.EXIT="EXIT",Yp.JUNCTION="JUNCTION",Yp.OBSTRUCTION="OBSTRUCTION",Yp.TRANSITION="TRANSITION",Yp.USERDEFINED="USERDEFINED",Yp.NOTDEFINED="NOTDEFINED";var xA=class{constructor(e){this.value=e}};xA.RIGIDSEGMENT="RIGIDSEGMENT",xA.FLEXIBLESEGMENT="FLEXIBLESEGMENT",xA.USERDEFINED="USERDEFINED",xA.NOTDEFINED="NOTDEFINED";var yI=class{constructor(e){this.value=e}};yI.FLATOVAL="FLATOVAL",yI.RECTANGULAR="RECTANGULAR",yI.ROUND="ROUND",yI.USERDEFINED="USERDEFINED",yI.NOTDEFINED="NOTDEFINED";var Os=class{constructor(e){this.value=e}};Os.DISHWASHER="DISHWASHER",Os.ELECTRICCOOKER="ELECTRICCOOKER",Os.FREESTANDINGELECTRICHEATER="FREESTANDINGELECTRICHEATER",Os.FREESTANDINGFAN="FREESTANDINGFAN",Os.FREESTANDINGWATERHEATER="FREESTANDINGWATERHEATER",Os.FREESTANDINGWATERCOOLER="FREESTANDINGWATERCOOLER",Os.FREEZER="FREEZER",Os.FRIDGE_FREEZER="FRIDGE_FREEZER",Os.HANDDRYER="HANDDRYER",Os.KITCHENMACHINE="KITCHENMACHINE",Os.MICROWAVE="MICROWAVE",Os.PHOTOCOPIER="PHOTOCOPIER",Os.REFRIGERATOR="REFRIGERATOR",Os.TUMBLEDRYER="TUMBLEDRYER",Os.VENDINGMACHINE="VENDINGMACHINE",Os.WASHINGMACHINE="WASHINGMACHINE",Os.USERDEFINED="USERDEFINED",Os.NOTDEFINED="NOTDEFINED";var wT=class{constructor(e){this.value=e}};wT.CONSUMERUNIT="CONSUMERUNIT",wT.DISTRIBUTIONBOARD="DISTRIBUTIONBOARD",wT.MOTORCONTROLCENTRE="MOTORCONTROLCENTRE",wT.SWITCHBOARD="SWITCHBOARD",wT.USERDEFINED="USERDEFINED",wT.NOTDEFINED="NOTDEFINED";var n0=class{constructor(e){this.value=e}};n0.BATTERY="BATTERY",n0.CAPACITORBANK="CAPACITORBANK",n0.HARMONICFILTER="HARMONICFILTER",n0.INDUCTORBANK="INDUCTORBANK",n0.UPS="UPS",n0.USERDEFINED="USERDEFINED",n0.NOTDEFINED="NOTDEFINED";var TI=class{constructor(e){this.value=e}};TI.CHP="CHP",TI.ENGINEGENERATOR="ENGINEGENERATOR",TI.STANDALONE="STANDALONE",TI.USERDEFINED="USERDEFINED",TI.NOTDEFINED="NOTDEFINED";var s0=class{constructor(e){this.value=e}};s0.DC="DC",s0.INDUCTION="INDUCTION",s0.POLYPHASE="POLYPHASE",s0.RELUCTANCESYNCHRONOUS="RELUCTANCESYNCHRONOUS",s0.SYNCHRONOUS="SYNCHRONOUS",s0.USERDEFINED="USERDEFINED",s0.NOTDEFINED="NOTDEFINED";var EI=class{constructor(e){this.value=e}};EI.TIMECLOCK="TIMECLOCK",EI.TIMEDELAY="TIMEDELAY",EI.RELAY="RELAY",EI.USERDEFINED="USERDEFINED",EI.NOTDEFINED="NOTDEFINED";var Qs=class{constructor(e){this.value=e}};Qs.ACCESSORY_ASSEMBLY="ACCESSORY_ASSEMBLY",Qs.ARCH="ARCH",Qs.BEAM_GRID="BEAM_GRID",Qs.BRACED_FRAME="BRACED_FRAME",Qs.GIRDER="GIRDER",Qs.REINFORCEMENT_UNIT="REINFORCEMENT_UNIT",Qs.RIGID_FRAME="RIGID_FRAME",Qs.SLAB_FIELD="SLAB_FIELD",Qs.TRUSS="TRUSS",Qs.ABUTMENT="ABUTMENT",Qs.PIER="PIER",Qs.PYLON="PYLON",Qs.CROSS_BRACING="CROSS_BRACING",Qs.DECK="DECK",Qs.USERDEFINED="USERDEFINED",Qs.NOTDEFINED="NOTDEFINED";var Kk=class{constructor(e){this.value=e}};Kk.COMPLEX="COMPLEX",Kk.ELEMENT="ELEMENT",Kk.PARTIAL="PARTIAL";var IA=class{constructor(e){this.value=e}};IA.EXTERNALCOMBUSTION="EXTERNALCOMBUSTION",IA.INTERNALCOMBUSTION="INTERNALCOMBUSTION",IA.USERDEFINED="USERDEFINED",IA.NOTDEFINED="NOTDEFINED";var Bc=class{constructor(e){this.value=e}};Bc.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER="DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER",Bc.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER="DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER",Bc.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER="DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER",Bc.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER="DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER",Bc.DIRECTEVAPORATIVEAIRWASHER="DIRECTEVAPORATIVEAIRWASHER",Bc.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER="INDIRECTEVAPORATIVEPACKAGEAIRCOOLER",Bc.INDIRECTEVAPORATIVEWETCOIL="INDIRECTEVAPORATIVEWETCOIL",Bc.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER="INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER",Bc.INDIRECTDIRECTCOMBINATION="INDIRECTDIRECTCOMBINATION",Bc.USERDEFINED="USERDEFINED",Bc.NOTDEFINED="NOTDEFINED";var Ff=class{constructor(e){this.value=e}};Ff.DIRECTEXPANSION="DIRECTEXPANSION",Ff.DIRECTEXPANSIONSHELLANDTUBE="DIRECTEXPANSIONSHELLANDTUBE",Ff.DIRECTEXPANSIONTUBEINTUBE="DIRECTEXPANSIONTUBEINTUBE",Ff.DIRECTEXPANSIONBRAZEDPLATE="DIRECTEXPANSIONBRAZEDPLATE",Ff.FLOODEDSHELLANDTUBE="FLOODEDSHELLANDTUBE",Ff.SHELLANDCOIL="SHELLANDCOIL",Ff.USERDEFINED="USERDEFINED",Ff.NOTDEFINED="NOTDEFINED";var RT=class{constructor(e){this.value=e}};RT.EVENTRULE="EVENTRULE",RT.EVENTMESSAGE="EVENTMESSAGE",RT.EVENTTIME="EVENTTIME",RT.EVENTCOMPLEX="EVENTCOMPLEX",RT.USERDEFINED="USERDEFINED",RT.NOTDEFINED="NOTDEFINED";var bI=class{constructor(e){this.value=e}};bI.STARTEVENT="STARTEVENT",bI.ENDEVENT="ENDEVENT",bI.INTERMEDIATEEVENT="INTERMEDIATEEVENT",bI.USERDEFINED="USERDEFINED",bI.NOTDEFINED="NOTDEFINED";var MT=class{constructor(e){this.value=e}};MT.EXTERNAL="EXTERNAL",MT.EXTERNAL_EARTH="EXTERNAL_EARTH",MT.EXTERNAL_WATER="EXTERNAL_WATER",MT.EXTERNAL_FIRE="EXTERNAL_FIRE",MT.USERDEFINED="USERDEFINED",MT.NOTDEFINED="NOTDEFINED";var Xp=class{constructor(e){this.value=e}};Xp.CENTRIFUGALFORWARDCURVED="CENTRIFUGALFORWARDCURVED",Xp.CENTRIFUGALRADIAL="CENTRIFUGALRADIAL",Xp.CENTRIFUGALBACKWARDINCLINEDCURVED="CENTRIFUGALBACKWARDINCLINEDCURVED",Xp.CENTRIFUGALAIRFOIL="CENTRIFUGALAIRFOIL",Xp.TUBEAXIAL="TUBEAXIAL",Xp.VANEAXIAL="VANEAXIAL",Xp.PROPELLORAXIAL="PROPELLORAXIAL",Xp.USERDEFINED="USERDEFINED",Xp.NOTDEFINED="NOTDEFINED";var xI=class{constructor(e){this.value=e}};xI.GLUE="GLUE",xI.MORTAR="MORTAR",xI.WELD="WELD",xI.USERDEFINED="USERDEFINED",xI.NOTDEFINED="NOTDEFINED";var Hf=class{constructor(e){this.value=e}};Hf.AIRPARTICLEFILTER="AIRPARTICLEFILTER",Hf.COMPRESSEDAIRFILTER="COMPRESSEDAIRFILTER",Hf.ODORFILTER="ODORFILTER",Hf.OILFILTER="OILFILTER",Hf.STRAINER="STRAINER",Hf.WATERFILTER="WATERFILTER",Hf.USERDEFINED="USERDEFINED",Hf.NOTDEFINED="NOTDEFINED";var a0=class{constructor(e){this.value=e}};a0.BREECHINGINLET="BREECHINGINLET",a0.FIREHYDRANT="FIREHYDRANT",a0.HOSEREEL="HOSEREEL",a0.SPRINKLER="SPRINKLER",a0.SPRINKLERDEFLECTOR="SPRINKLERDEFLECTOR",a0.USERDEFINED="USERDEFINED",a0.NOTDEFINED="NOTDEFINED";var _A=class{constructor(e){this.value=e}};_A.SOURCE="SOURCE",_A.SINK="SINK",_A.SOURCEANDSINK="SOURCEANDSINK",_A.NOTDEFINED="NOTDEFINED";var rh=class{constructor(e){this.value=e}};rh.PRESSUREGAUGE="PRESSUREGAUGE",rh.THERMOMETER="THERMOMETER",rh.AMMETER="AMMETER",rh.FREQUENCYMETER="FREQUENCYMETER",rh.POWERFACTORMETER="POWERFACTORMETER",rh.PHASEANGLEMETER="PHASEANGLEMETER",rh.VOLTMETER_PEAK="VOLTMETER_PEAK",rh.VOLTMETER_RMS="VOLTMETER_RMS",rh.USERDEFINED="USERDEFINED",rh.NOTDEFINED="NOTDEFINED";var DT=class{constructor(e){this.value=e}};DT.ENERGYMETER="ENERGYMETER",DT.GASMETER="GASMETER",DT.OILMETER="OILMETER",DT.WATERMETER="WATERMETER",DT.USERDEFINED="USERDEFINED",DT.NOTDEFINED="NOTDEFINED";var o0=class{constructor(e){this.value=e}};o0.CAISSON_FOUNDATION="CAISSON_FOUNDATION",o0.FOOTING_BEAM="FOOTING_BEAM",o0.PAD_FOOTING="PAD_FOOTING",o0.PILE_CAP="PILE_CAP",o0.STRIP_FOOTING="STRIP_FOOTING",o0.USERDEFINED="USERDEFINED",o0.NOTDEFINED="NOTDEFINED";var $p=class{constructor(e){this.value=e}};$p.CHAIR="CHAIR",$p.TABLE="TABLE",$p.DESK="DESK",$p.BED="BED",$p.FILECABINET="FILECABINET",$p.SHELF="SHELF",$p.SOFA="SOFA",$p.USERDEFINED="USERDEFINED",$p.NOTDEFINED="NOTDEFINED";var SA=class{constructor(e){this.value=e}};SA.TERRAIN="TERRAIN",SA.SOIL_BORING_POINT="SOIL_BORING_POINT",SA.USERDEFINED="USERDEFINED",SA.NOTDEFINED="NOTDEFINED";var Kp=class{constructor(e){this.value=e}};Kp.GRAPH_VIEW="GRAPH_VIEW",Kp.SKETCH_VIEW="SKETCH_VIEW",Kp.MODEL_VIEW="MODEL_VIEW",Kp.PLAN_VIEW="PLAN_VIEW",Kp.REFLECTED_PLAN_VIEW="REFLECTED_PLAN_VIEW",Kp.SECTION_VIEW="SECTION_VIEW",Kp.ELEVATION_VIEW="ELEVATION_VIEW",Kp.USERDEFINED="USERDEFINED",Kp.NOTDEFINED="NOTDEFINED";var $de=class{constructor(e){this.value=e}};$de.GLOBAL_COORDS="GLOBAL_COORDS",$de.LOCAL_COORDS="LOCAL_COORDS";var CT=class{constructor(e){this.value=e}};CT.RECTANGULAR="RECTANGULAR",CT.RADIAL="RADIAL",CT.TRIANGULAR="TRIANGULAR",CT.IRREGULAR="IRREGULAR",CT.USERDEFINED="USERDEFINED",CT.NOTDEFINED="NOTDEFINED";var wA=class{constructor(e){this.value=e}};wA.PLATE="PLATE",wA.SHELLANDTUBE="SHELLANDTUBE",wA.USERDEFINED="USERDEFINED",wA.NOTDEFINED="NOTDEFINED";var Oa=class{constructor(e){this.value=e}};Oa.STEAMINJECTION="STEAMINJECTION",Oa.ADIABATICAIRWASHER="ADIABATICAIRWASHER",Oa.ADIABATICPAN="ADIABATICPAN",Oa.ADIABATICWETTEDELEMENT="ADIABATICWETTEDELEMENT",Oa.ADIABATICATOMIZING="ADIABATICATOMIZING",Oa.ADIABATICULTRASONIC="ADIABATICULTRASONIC",Oa.ADIABATICRIGIDMEDIA="ADIABATICRIGIDMEDIA",Oa.ADIABATICCOMPRESSEDAIRNOZZLE="ADIABATICCOMPRESSEDAIRNOZZLE",Oa.ASSISTEDELECTRIC="ASSISTEDELECTRIC",Oa.ASSISTEDNATURALGAS="ASSISTEDNATURALGAS",Oa.ASSISTEDPROPANE="ASSISTEDPROPANE",Oa.ASSISTEDBUTANE="ASSISTEDBUTANE",Oa.ASSISTEDSTEAM="ASSISTEDSTEAM",Oa.USERDEFINED="USERDEFINED",Oa.NOTDEFINED="NOTDEFINED";var AT=class{constructor(e){this.value=e}};AT.CYCLONIC="CYCLONIC",AT.GREASE="GREASE",AT.OIL="OIL",AT.PETROL="PETROL",AT.USERDEFINED="USERDEFINED",AT.NOTDEFINED="NOTDEFINED";var OT=class{constructor(e){this.value=e}};OT.INTERNAL="INTERNAL",OT.EXTERNAL="EXTERNAL",OT.EXTERNAL_EARTH="EXTERNAL_EARTH",OT.EXTERNAL_WATER="EXTERNAL_WATER",OT.EXTERNAL_FIRE="EXTERNAL_FIRE",OT.NOTDEFINED="NOTDEFINED";var II=class{constructor(e){this.value=e}};II.ASSETINVENTORY="ASSETINVENTORY",II.SPACEINVENTORY="SPACEINVENTORY",II.FURNITUREINVENTORY="FURNITUREINVENTORY",II.USERDEFINED="USERDEFINED",II.NOTDEFINED="NOTDEFINED";var RA=class{constructor(e){this.value=e}};RA.DATA="DATA",RA.POWER="POWER",RA.USERDEFINED="USERDEFINED",RA.NOTDEFINED="NOTDEFINED";var MA=class{constructor(e){this.value=e}};MA.UNIFORM_KNOTS="UNIFORM_KNOTS",MA.QUASI_UNIFORM_KNOTS="QUASI_UNIFORM_KNOTS",MA.PIECEWISE_BEZIER_KNOTS="PIECEWISE_BEZIER_KNOTS",MA.UNSPECIFIED="UNSPECIFIED";var ns=class{constructor(e){this.value=e}};ns.ADMINISTRATION="ADMINISTRATION",ns.CARPENTRY="CARPENTRY",ns.CLEANING="CLEANING",ns.CONCRETE="CONCRETE",ns.DRYWALL="DRYWALL",ns.ELECTRIC="ELECTRIC",ns.FINISHING="FINISHING",ns.FLOORING="FLOORING",ns.GENERAL="GENERAL",ns.HVAC="HVAC",ns.LANDSCAPING="LANDSCAPING",ns.MASONRY="MASONRY",ns.PAINTING="PAINTING",ns.PAVING="PAVING",ns.PLUMBING="PLUMBING",ns.ROOFING="ROOFING",ns.SITEGRADING="SITEGRADING",ns.STEELWORK="STEELWORK",ns.SURVEYING="SURVEYING",ns.USERDEFINED="USERDEFINED",ns.NOTDEFINED="NOTDEFINED";var kc=class{constructor(e){this.value=e}};kc.COMPACTFLUORESCENT="COMPACTFLUORESCENT",kc.FLUORESCENT="FLUORESCENT",kc.HALOGEN="HALOGEN",kc.HIGHPRESSUREMERCURY="HIGHPRESSUREMERCURY",kc.HIGHPRESSURESODIUM="HIGHPRESSURESODIUM",kc.LED="LED",kc.METALHALIDE="METALHALIDE",kc.OLED="OLED",kc.TUNGSTENFILAMENT="TUNGSTENFILAMENT",kc.USERDEFINED="USERDEFINED",kc.NOTDEFINED="NOTDEFINED";var Zk=class{constructor(e){this.value=e}};Zk.AXIS1="AXIS1",Zk.AXIS2="AXIS2",Zk.AXIS3="AXIS3";var DA=class{constructor(e){this.value=e}};DA.TYPE_A="TYPE_A",DA.TYPE_B="TYPE_B",DA.TYPE_C="TYPE_C",DA.NOTDEFINED="NOTDEFINED";var Gc=class{constructor(e){this.value=e}};Gc.COMPACTFLUORESCENT="COMPACTFLUORESCENT",Gc.FLUORESCENT="FLUORESCENT",Gc.HIGHPRESSUREMERCURY="HIGHPRESSUREMERCURY",Gc.HIGHPRESSURESODIUM="HIGHPRESSURESODIUM",Gc.LIGHTEMITTINGDIODE="LIGHTEMITTINGDIODE",Gc.LOWPRESSURESODIUM="LOWPRESSURESODIUM",Gc.LOWVOLTAGEHALOGEN="LOWVOLTAGEHALOGEN",Gc.MAINVOLTAGEHALOGEN="MAINVOLTAGEHALOGEN",Gc.METALHALIDE="METALHALIDE",Gc.TUNGSTENFILAMENT="TUNGSTENFILAMENT",Gc.NOTDEFINED="NOTDEFINED";var _I=class{constructor(e){this.value=e}};_I.POINTSOURCE="POINTSOURCE",_I.DIRECTIONSOURCE="DIRECTIONSOURCE",_I.SECURITYLIGHTING="SECURITYLIGHTING",_I.USERDEFINED="USERDEFINED",_I.NOTDEFINED="NOTDEFINED";var SI=class{constructor(e){this.value=e}};SI.LOAD_GROUP="LOAD_GROUP",SI.LOAD_CASE="LOAD_CASE",SI.LOAD_COMBINATION="LOAD_COMBINATION",SI.USERDEFINED="USERDEFINED",SI.NOTDEFINED="NOTDEFINED";var wI=class{constructor(e){this.value=e}};wI.LOGICALAND="LOGICALAND",wI.LOGICALOR="LOGICALOR",wI.LOGICALXOR="LOGICALXOR",wI.LOGICALNOTAND="LOGICALNOTAND",wI.LOGICALNOTOR="LOGICALNOTOR";var Zo=class{constructor(e){this.value=e}};Zo.ANCHORBOLT="ANCHORBOLT",Zo.BOLT="BOLT",Zo.DOWEL="DOWEL",Zo.NAIL="NAIL",Zo.NAILPLATE="NAILPLATE",Zo.RIVET="RIVET",Zo.SCREW="SCREW",Zo.SHEARCONNECTOR="SHEARCONNECTOR",Zo.STAPLE="STAPLE",Zo.STUDSHEARCONNECTOR="STUDSHEARCONNECTOR",Zo.COUPLER="COUPLER",Zo.USERDEFINED="USERDEFINED",Zo.NOTDEFINED="NOTDEFINED";var l0=class{constructor(e){this.value=e}};l0.AIRSTATION="AIRSTATION",l0.FEEDAIRUNIT="FEEDAIRUNIT",l0.OXYGENGENERATOR="OXYGENGENERATOR",l0.OXYGENPLANT="OXYGENPLANT",l0.VACUUMSTATION="VACUUMSTATION",l0.USERDEFINED="USERDEFINED",l0.NOTDEFINED="NOTDEFINED";var Is=class{constructor(e){this.value=e}};Is.BRACE="BRACE",Is.CHORD="CHORD",Is.COLLAR="COLLAR",Is.MEMBER="MEMBER",Is.MULLION="MULLION",Is.PLATE="PLATE",Is.POST="POST",Is.PURLIN="PURLIN",Is.RAFTER="RAFTER",Is.STRINGER="STRINGER",Is.STRUT="STRUT",Is.STUD="STUD",Is.STIFFENING_RIB="STIFFENING_RIB",Is.ARCH_SEGMENT="ARCH_SEGMENT",Is.SUSPENSION_CABLE="SUSPENSION_CABLE",Is.SUSPENDER="SUSPENDER",Is.STAY_CABLE="STAY_CABLE",Is.USERDEFINED="USERDEFINED",Is.NOTDEFINED="NOTDEFINED";var RI=class{constructor(e){this.value=e}};RI.BELTDRIVE="BELTDRIVE",RI.COUPLING="COUPLING",RI.DIRECTDRIVE="DIRECTDRIVE",RI.USERDEFINED="USERDEFINED",RI.NOTDEFINED="NOTDEFINED";var iPt=class{constructor(e){this.value=e}};iPt.NULL="NULL";var Uf=class{constructor(e){this.value=e}};Uf.PRODUCT="PRODUCT",Uf.PROCESS="PROCESS",Uf.CONTROL="CONTROL",Uf.RESOURCE="RESOURCE",Uf.ACTOR="ACTOR",Uf.GROUP="GROUP",Uf.PROJECT="PROJECT",Uf.NOTDEFINED="NOTDEFINED";var Jo=class{constructor(e){this.value=e}};Jo.CODECOMPLIANCE="CODECOMPLIANCE",Jo.CODEWAIVER="CODEWAIVER",Jo.DESIGNINTENT="DESIGNINTENT",Jo.EXTERNAL="EXTERNAL",Jo.HEALTHANDSAFETY="HEALTHANDSAFETY",Jo.MERGECONFLICT="MERGECONFLICT",Jo.MODELVIEW="MODELVIEW",Jo.PARAMETER="PARAMETER",Jo.REQUIREMENT="REQUIREMENT",Jo.SPECIFICATION="SPECIFICATION",Jo.TRIGGERCONDITION="TRIGGERCONDITION",Jo.USERDEFINED="USERDEFINED",Jo.NOTDEFINED="NOTDEFINED";var Zp=class{constructor(e){this.value=e}};Zp.ASSIGNEE="ASSIGNEE",Zp.ASSIGNOR="ASSIGNOR",Zp.LESSEE="LESSEE",Zp.LESSOR="LESSOR",Zp.LETTINGAGENT="LETTINGAGENT",Zp.OWNER="OWNER",Zp.TENANT="TENANT",Zp.USERDEFINED="USERDEFINED",Zp.NOTDEFINED="NOTDEFINED";var CA=class{constructor(e){this.value=e}};CA.OPENING="OPENING",CA.RECESS="RECESS",CA.USERDEFINED="USERDEFINED",CA.NOTDEFINED="NOTDEFINED";var c0=class{constructor(e){this.value=e}};c0.AUDIOVISUALOUTLET="AUDIOVISUALOUTLET",c0.COMMUNICATIONSOUTLET="COMMUNICATIONSOUTLET",c0.POWEROUTLET="POWEROUTLET",c0.DATAOUTLET="DATAOUTLET",c0.TELEPHONEOUTLET="TELEPHONEOUTLET",c0.USERDEFINED="USERDEFINED",c0.NOTDEFINED="NOTDEFINED";var Kde=class{constructor(e){this.value=e}};Kde.USERDEFINED="USERDEFINED",Kde.NOTDEFINED="NOTDEFINED";var MI=class{constructor(e){this.value=e}};MI.GRILL="GRILL",MI.LOUVER="LOUVER",MI.SCREEN="SCREEN",MI.USERDEFINED="USERDEFINED",MI.NOTDEFINED="NOTDEFINED";var DI=class{constructor(e){this.value=e}};DI.ACCESS="ACCESS",DI.BUILDING="BUILDING",DI.WORK="WORK",DI.USERDEFINED="USERDEFINED",DI.NOTDEFINED="NOTDEFINED";var Jk=class{constructor(e){this.value=e}};Jk.PHYSICAL="PHYSICAL",Jk.VIRTUAL="VIRTUAL",Jk.NOTDEFINED="NOTDEFINED";var PT=class{constructor(e){this.value=e}};PT.CAST_IN_PLACE="CAST_IN_PLACE",PT.COMPOSITE="COMPOSITE",PT.PRECAST_CONCRETE="PRECAST_CONCRETE",PT.PREFAB_STEEL="PREFAB_STEEL",PT.USERDEFINED="USERDEFINED",PT.NOTDEFINED="NOTDEFINED";var Bf=class{constructor(e){this.value=e}};Bf.BORED="BORED",Bf.DRIVEN="DRIVEN",Bf.JETGROUTING="JETGROUTING",Bf.COHESION="COHESION",Bf.FRICTION="FRICTION",Bf.SUPPORT="SUPPORT",Bf.USERDEFINED="USERDEFINED",Bf.NOTDEFINED="NOTDEFINED";var Jp=class{constructor(e){this.value=e}};Jp.BEND="BEND",Jp.CONNECTOR="CONNECTOR",Jp.ENTRY="ENTRY",Jp.EXIT="EXIT",Jp.JUNCTION="JUNCTION",Jp.OBSTRUCTION="OBSTRUCTION",Jp.TRANSITION="TRANSITION",Jp.USERDEFINED="USERDEFINED",Jp.NOTDEFINED="NOTDEFINED";var u0=class{constructor(e){this.value=e}};u0.CULVERT="CULVERT",u0.FLEXIBLESEGMENT="FLEXIBLESEGMENT",u0.RIGIDSEGMENT="RIGIDSEGMENT",u0.GUTTER="GUTTER",u0.SPOOL="SPOOL",u0.USERDEFINED="USERDEFINED",u0.NOTDEFINED="NOTDEFINED";var Vc=class{constructor(e){this.value=e}};Vc.CURTAIN_PANEL="CURTAIN_PANEL",Vc.SHEET="SHEET",Vc.FLANGE_PLATE="FLANGE_PLATE",Vc.WEB_PLATE="WEB_PLATE",Vc.STIFFENER_PLATE="STIFFENER_PLATE",Vc.GUSSET_PLATE="GUSSET_PLATE",Vc.COVER_PLATE="COVER_PLATE",Vc.SPLICE_PLATE="SPLICE_PLATE",Vc.BASE_PLATE="BASE_PLATE",Vc.USERDEFINED="USERDEFINED",Vc.NOTDEFINED="NOTDEFINED";var Qk=class{constructor(e){this.value=e}};Qk.CURVE3D="CURVE3D",Qk.PCURVE_S1="PCURVE_S1",Qk.PCURVE_S2="PCURVE_S2";var Qp=class{constructor(e){this.value=e}};Qp.ADVICE_CAUTION="ADVICE_CAUTION",Qp.ADVICE_NOTE="ADVICE_NOTE",Qp.ADVICE_WARNING="ADVICE_WARNING",Qp.CALIBRATION="CALIBRATION",Qp.DIAGNOSTIC="DIAGNOSTIC",Qp.SHUTDOWN="SHUTDOWN",Qp.STARTUP="STARTUP",Qp.USERDEFINED="USERDEFINED",Qp.NOTDEFINED="NOTDEFINED";var Zde=class{constructor(e){this.value=e}};Zde.CURVE="CURVE",Zde.AREA="AREA";var h0=class{constructor(e){this.value=e}};h0.CHANGEORDER="CHANGEORDER",h0.MAINTENANCEWORKORDER="MAINTENANCEWORKORDER",h0.MOVEORDER="MOVEORDER",h0.PURCHASEORDER="PURCHASEORDER",h0.WORKORDER="WORKORDER",h0.USERDEFINED="USERDEFINED",h0.NOTDEFINED="NOTDEFINED";var Jde=class{constructor(e){this.value=e}};Jde.PROJECTED_LENGTH="PROJECTED_LENGTH",Jde.TRUE_LENGTH="TRUE_LENGTH";var AA=class{constructor(e){this.value=e}};AA.BLISTER="BLISTER",AA.DEVIATOR="DEVIATOR",AA.USERDEFINED="USERDEFINED",AA.NOTDEFINED="NOTDEFINED";var kf=class{constructor(e){this.value=e}};kf.PSET_TYPEDRIVENONLY="PSET_TYPEDRIVENONLY",kf.PSET_TYPEDRIVENOVERRIDE="PSET_TYPEDRIVENOVERRIDE",kf.PSET_OCCURRENCEDRIVEN="PSET_OCCURRENCEDRIVEN",kf.PSET_PERFORMANCEDRIVEN="PSET_PERFORMANCEDRIVEN",kf.QTO_TYPEDRIVENONLY="QTO_TYPEDRIVENONLY",kf.QTO_TYPEDRIVENOVERRIDE="QTO_TYPEDRIVENOVERRIDE",kf.QTO_OCCURRENCEDRIVEN="QTO_OCCURRENCEDRIVEN",kf.NOTDEFINED="NOTDEFINED";var NT=class{constructor(e){this.value=e}};NT.ELECTRONIC="ELECTRONIC",NT.ELECTROMAGNETIC="ELECTROMAGNETIC",NT.RESIDUALCURRENT="RESIDUALCURRENT",NT.THERMAL="THERMAL",NT.USERDEFINED="USERDEFINED",NT.NOTDEFINED="NOTDEFINED";var ed=class{constructor(e){this.value=e}};ed.CIRCUITBREAKER="CIRCUITBREAKER",ed.EARTHLEAKAGECIRCUITBREAKER="EARTHLEAKAGECIRCUITBREAKER",ed.EARTHINGSWITCH="EARTHINGSWITCH",ed.FUSEDISCONNECTOR="FUSEDISCONNECTOR",ed.RESIDUALCURRENTCIRCUITBREAKER="RESIDUALCURRENTCIRCUITBREAKER",ed.RESIDUALCURRENTSWITCH="RESIDUALCURRENTSWITCH",ed.VARISTOR="VARISTOR",ed.USERDEFINED="USERDEFINED",ed.NOTDEFINED="NOTDEFINED";var td=class{constructor(e){this.value=e}};td.CIRCULATOR="CIRCULATOR",td.ENDSUCTION="ENDSUCTION",td.SPLITCASE="SPLITCASE",td.SUBMERSIBLEPUMP="SUBMERSIBLEPUMP",td.SUMPPUMP="SUMPPUMP",td.VERTICALINLINE="VERTICALINLINE",td.VERTICALTURBINE="VERTICALTURBINE",td.USERDEFINED="USERDEFINED",td.NOTDEFINED="NOTDEFINED";var CI=class{constructor(e){this.value=e}};CI.HANDRAIL="HANDRAIL",CI.GUARDRAIL="GUARDRAIL",CI.BALUSTRADE="BALUSTRADE",CI.USERDEFINED="USERDEFINED",CI.NOTDEFINED="NOTDEFINED";var OA=class{constructor(e){this.value=e}};OA.STRAIGHT="STRAIGHT",OA.SPIRAL="SPIRAL",OA.USERDEFINED="USERDEFINED",OA.NOTDEFINED="NOTDEFINED";var Gf=class{constructor(e){this.value=e}};Gf.STRAIGHT_RUN_RAMP="STRAIGHT_RUN_RAMP",Gf.TWO_STRAIGHT_RUN_RAMP="TWO_STRAIGHT_RUN_RAMP",Gf.QUARTER_TURN_RAMP="QUARTER_TURN_RAMP",Gf.TWO_QUARTER_TURN_RAMP="TWO_QUARTER_TURN_RAMP",Gf.HALF_TURN_RAMP="HALF_TURN_RAMP",Gf.SPIRAL_RAMP="SPIRAL_RAMP",Gf.USERDEFINED="USERDEFINED",Gf.NOTDEFINED="NOTDEFINED";var Vf=class{constructor(e){this.value=e}};Vf.DAILY="DAILY",Vf.WEEKLY="WEEKLY",Vf.MONTHLY_BY_DAY_OF_MONTH="MONTHLY_BY_DAY_OF_MONTH",Vf.MONTHLY_BY_POSITION="MONTHLY_BY_POSITION",Vf.BY_DAY_COUNT="BY_DAY_COUNT",Vf.BY_WEEKDAY_COUNT="BY_WEEKDAY_COUNT",Vf.YEARLY_BY_DAY_OF_MONTH="YEARLY_BY_DAY_OF_MONTH",Vf.YEARLY_BY_POSITION="YEARLY_BY_POSITION";var AI=class{constructor(e){this.value=e}};AI.KILOPOINT="KILOPOINT",AI.MILEPOINT="MILEPOINT",AI.STATION="STATION",AI.USERDEFINED="USERDEFINED",AI.NOTDEFINED="NOTDEFINED";var ih=class{constructor(e){this.value=e}};ih.BLINN="BLINN",ih.FLAT="FLAT",ih.GLASS="GLASS",ih.MATT="MATT",ih.METAL="METAL",ih.MIRROR="MIRROR",ih.PHONG="PHONG",ih.PLASTIC="PLASTIC",ih.STRAUSS="STRAUSS",ih.NOTDEFINED="NOTDEFINED";var nh=class{constructor(e){this.value=e}};nh.MAIN="MAIN",nh.SHEAR="SHEAR",nh.LIGATURE="LIGATURE",nh.STUD="STUD",nh.PUNCHING="PUNCHING",nh.EDGE="EDGE",nh.RING="RING",nh.ANCHORING="ANCHORING",nh.USERDEFINED="USERDEFINED",nh.NOTDEFINED="NOTDEFINED";var Qde=class{constructor(e){this.value=e}};Qde.PLAIN="PLAIN",Qde.TEXTURED="TEXTURED";var zc=class{constructor(e){this.value=e}};zc.ANCHORING="ANCHORING",zc.EDGE="EDGE",zc.LIGATURE="LIGATURE",zc.MAIN="MAIN",zc.PUNCHING="PUNCHING",zc.RING="RING",zc.SHEAR="SHEAR",zc.STUD="STUD",zc.SPACEBAR="SPACEBAR",zc.USERDEFINED="USERDEFINED",zc.NOTDEFINED="NOTDEFINED";var efe=class{constructor(e){this.value=e}};efe.USERDEFINED="USERDEFINED",efe.NOTDEFINED="NOTDEFINED";var Fn=class{constructor(e){this.value=e}};Fn.SUPPLIER="SUPPLIER",Fn.MANUFACTURER="MANUFACTURER",Fn.CONTRACTOR="CONTRACTOR",Fn.SUBCONTRACTOR="SUBCONTRACTOR",Fn.ARCHITECT="ARCHITECT",Fn.STRUCTURALENGINEER="STRUCTURALENGINEER",Fn.COSTENGINEER="COSTENGINEER",Fn.CLIENT="CLIENT",Fn.BUILDINGOWNER="BUILDINGOWNER",Fn.BUILDINGOPERATOR="BUILDINGOPERATOR",Fn.MECHANICALENGINEER="MECHANICALENGINEER",Fn.ELECTRICALENGINEER="ELECTRICALENGINEER",Fn.PROJECTMANAGER="PROJECTMANAGER",Fn.FACILITIESMANAGER="FACILITIESMANAGER",Fn.CIVILENGINEER="CIVILENGINEER",Fn.COMMISSIONINGENGINEER="COMMISSIONINGENGINEER",Fn.ENGINEER="ENGINEER",Fn.OWNER="OWNER",Fn.CONSULTANT="CONSULTANT",Fn.CONSTRUCTIONMANAGER="CONSTRUCTIONMANAGER",Fn.FIELDCONSTRUCTIONMANAGER="FIELDCONSTRUCTIONMANAGER",Fn.RESELLER="RESELLER",Fn.USERDEFINED="USERDEFINED";var Pa=class{constructor(e){this.value=e}};Pa.FLAT_ROOF="FLAT_ROOF",Pa.SHED_ROOF="SHED_ROOF",Pa.GABLE_ROOF="GABLE_ROOF",Pa.HIP_ROOF="HIP_ROOF",Pa.HIPPED_GABLE_ROOF="HIPPED_GABLE_ROOF",Pa.GAMBREL_ROOF="GAMBREL_ROOF",Pa.MANSARD_ROOF="MANSARD_ROOF",Pa.BARREL_ROOF="BARREL_ROOF",Pa.RAINBOW_ROOF="RAINBOW_ROOF",Pa.BUTTERFLY_ROOF="BUTTERFLY_ROOF",Pa.PAVILION_ROOF="PAVILION_ROOF",Pa.DOME_ROOF="DOME_ROOF",Pa.FREEFORM="FREEFORM",Pa.USERDEFINED="USERDEFINED",Pa.NOTDEFINED="NOTDEFINED";var ea=class{constructor(e){this.value=e}};ea.EXA="EXA",ea.PETA="PETA",ea.TERA="TERA",ea.GIGA="GIGA",ea.MEGA="MEGA",ea.KILO="KILO",ea.HECTO="HECTO",ea.DECA="DECA",ea.DECI="DECI",ea.CENTI="CENTI",ea.MILLI="MILLI",ea.MICRO="MICRO",ea.NANO="NANO",ea.PICO="PICO",ea.FEMTO="FEMTO",ea.ATTO="ATTO";var Yi=class{constructor(e){this.value=e}};Yi.AMPERE="AMPERE",Yi.BECQUEREL="BECQUEREL",Yi.CANDELA="CANDELA",Yi.COULOMB="COULOMB",Yi.CUBIC_METRE="CUBIC_METRE",Yi.DEGREE_CELSIUS="DEGREE_CELSIUS",Yi.FARAD="FARAD",Yi.GRAM="GRAM",Yi.GRAY="GRAY",Yi.HENRY="HENRY",Yi.HERTZ="HERTZ",Yi.JOULE="JOULE",Yi.KELVIN="KELVIN",Yi.LUMEN="LUMEN",Yi.LUX="LUX",Yi.METRE="METRE",Yi.MOLE="MOLE",Yi.NEWTON="NEWTON",Yi.OHM="OHM",Yi.PASCAL="PASCAL",Yi.RADIAN="RADIAN",Yi.SECOND="SECOND",Yi.SIEMENS="SIEMENS",Yi.SIEVERT="SIEVERT",Yi.SQUARE_METRE="SQUARE_METRE",Yi.STERADIAN="STERADIAN",Yi.TESLA="TESLA",Yi.VOLT="VOLT",Yi.WATT="WATT",Yi.WEBER="WEBER";var kl=class{constructor(e){this.value=e}};kl.BATH="BATH",kl.BIDET="BIDET",kl.CISTERN="CISTERN",kl.SHOWER="SHOWER",kl.SINK="SINK",kl.SANITARYFOUNTAIN="SANITARYFOUNTAIN",kl.TOILETPAN="TOILETPAN",kl.URINAL="URINAL",kl.WASHHANDBASIN="WASHHANDBASIN",kl.WCSEAT="WCSEAT",kl.USERDEFINED="USERDEFINED",kl.NOTDEFINED="NOTDEFINED";var tfe=class{constructor(e){this.value=e}};tfe.UNIFORM="UNIFORM",tfe.TAPERED="TAPERED";var En=class{constructor(e){this.value=e}};En.COSENSOR="COSENSOR",En.CO2SENSOR="CO2SENSOR",En.CONDUCTANCESENSOR="CONDUCTANCESENSOR",En.CONTACTSENSOR="CONTACTSENSOR",En.FIRESENSOR="FIRESENSOR",En.FLOWSENSOR="FLOWSENSOR",En.FROSTSENSOR="FROSTSENSOR",En.GASSENSOR="GASSENSOR",En.HEATSENSOR="HEATSENSOR",En.HUMIDITYSENSOR="HUMIDITYSENSOR",En.IDENTIFIERSENSOR="IDENTIFIERSENSOR",En.IONCONCENTRATIONSENSOR="IONCONCENTRATIONSENSOR",En.LEVELSENSOR="LEVELSENSOR",En.LIGHTSENSOR="LIGHTSENSOR",En.MOISTURESENSOR="MOISTURESENSOR",En.MOVEMENTSENSOR="MOVEMENTSENSOR",En.PHSENSOR="PHSENSOR",En.PRESSURESENSOR="PRESSURESENSOR",En.RADIATIONSENSOR="RADIATIONSENSOR",En.RADIOACTIVITYSENSOR="RADIOACTIVITYSENSOR",En.SMOKESENSOR="SMOKESENSOR",En.SOUNDSENSOR="SOUNDSENSOR",En.TEMPERATURESENSOR="TEMPERATURESENSOR",En.WINDSENSOR="WINDSENSOR",En.USERDEFINED="USERDEFINED",En.NOTDEFINED="NOTDEFINED";var LT=class{constructor(e){this.value=e}};LT.START_START="START_START",LT.START_FINISH="START_FINISH",LT.FINISH_START="FINISH_START",LT.FINISH_FINISH="FINISH_FINISH",LT.USERDEFINED="USERDEFINED",LT.NOTDEFINED="NOTDEFINED";var OI=class{constructor(e){this.value=e}};OI.JALOUSIE="JALOUSIE",OI.SHUTTER="SHUTTER",OI.AWNING="AWNING",OI.USERDEFINED="USERDEFINED",OI.NOTDEFINED="NOTDEFINED";var Gl=class{constructor(e){this.value=e}};Gl.P_SINGLEVALUE="P_SINGLEVALUE",Gl.P_ENUMERATEDVALUE="P_ENUMERATEDVALUE",Gl.P_BOUNDEDVALUE="P_BOUNDEDVALUE",Gl.P_LISTVALUE="P_LISTVALUE",Gl.P_TABLEVALUE="P_TABLEVALUE",Gl.P_REFERENCEVALUE="P_REFERENCEVALUE",Gl.Q_LENGTH="Q_LENGTH",Gl.Q_AREA="Q_AREA",Gl.Q_VOLUME="Q_VOLUME",Gl.Q_COUNT="Q_COUNT",Gl.Q_WEIGHT="Q_WEIGHT",Gl.Q_TIME="Q_TIME";var sh=class{constructor(e){this.value=e}};sh.FLOOR="FLOOR",sh.ROOF="ROOF",sh.LANDING="LANDING",sh.BASESLAB="BASESLAB",sh.APPROACH_SLAB="APPROACH_SLAB",sh.PAVING="PAVING",sh.WEARING="WEARING",sh.SIDEWALK="SIDEWALK",sh.USERDEFINED="USERDEFINED",sh.NOTDEFINED="NOTDEFINED";var PA=class{constructor(e){this.value=e}};PA.SOLARCOLLECTOR="SOLARCOLLECTOR",PA.SOLARPANEL="SOLARPANEL",PA.USERDEFINED="USERDEFINED",PA.NOTDEFINED="NOTDEFINED";var NA=class{constructor(e){this.value=e}};NA.CONVECTOR="CONVECTOR",NA.RADIATOR="RADIATOR",NA.USERDEFINED="USERDEFINED",NA.NOTDEFINED="NOTDEFINED";var p0=class{constructor(e){this.value=e}};p0.SPACE="SPACE",p0.PARKING="PARKING",p0.GFA="GFA",p0.INTERNAL="INTERNAL",p0.EXTERNAL="EXTERNAL",p0.USERDEFINED="USERDEFINED",p0.NOTDEFINED="NOTDEFINED";var ah=class{constructor(e){this.value=e}};ah.CONSTRUCTION="CONSTRUCTION",ah.FIRESAFETY="FIRESAFETY",ah.LIGHTING="LIGHTING",ah.OCCUPANCY="OCCUPANCY",ah.SECURITY="SECURITY",ah.THERMAL="THERMAL",ah.TRANSPORT="TRANSPORT",ah.VENTILATION="VENTILATION",ah.USERDEFINED="USERDEFINED",ah.NOTDEFINED="NOTDEFINED";var PI=class{constructor(e){this.value=e}};PI.BIRDCAGE="BIRDCAGE",PI.COWL="COWL",PI.RAINWATERHOPPER="RAINWATERHOPPER",PI.USERDEFINED="USERDEFINED",PI.NOTDEFINED="NOTDEFINED";var d0=class{constructor(e){this.value=e}};d0.STRAIGHT="STRAIGHT",d0.WINDER="WINDER",d0.SPIRAL="SPIRAL",d0.CURVED="CURVED",d0.FREEFORM="FREEFORM",d0.USERDEFINED="USERDEFINED",d0.NOTDEFINED="NOTDEFINED";var ta=class{constructor(e){this.value=e}};ta.STRAIGHT_RUN_STAIR="STRAIGHT_RUN_STAIR",ta.TWO_STRAIGHT_RUN_STAIR="TWO_STRAIGHT_RUN_STAIR",ta.QUARTER_WINDING_STAIR="QUARTER_WINDING_STAIR",ta.QUARTER_TURN_STAIR="QUARTER_TURN_STAIR",ta.HALF_WINDING_STAIR="HALF_WINDING_STAIR",ta.HALF_TURN_STAIR="HALF_TURN_STAIR",ta.TWO_QUARTER_WINDING_STAIR="TWO_QUARTER_WINDING_STAIR",ta.TWO_QUARTER_TURN_STAIR="TWO_QUARTER_TURN_STAIR",ta.THREE_QUARTER_WINDING_STAIR="THREE_QUARTER_WINDING_STAIR",ta.THREE_QUARTER_TURN_STAIR="THREE_QUARTER_TURN_STAIR",ta.SPIRAL_STAIR="SPIRAL_STAIR",ta.DOUBLE_RETURN_STAIR="DOUBLE_RETURN_STAIR",ta.CURVED_RUN_STAIR="CURVED_RUN_STAIR",ta.TWO_CURVED_RUN_STAIR="TWO_CURVED_RUN_STAIR",ta.USERDEFINED="USERDEFINED",ta.NOTDEFINED="NOTDEFINED";var NI=class{constructor(e){this.value=e}};NI.READWRITE="READWRITE",NI.READONLY="READONLY",NI.LOCKED="LOCKED",NI.READWRITELOCKED="READWRITELOCKED",NI.READONLYLOCKED="READONLYLOCKED";var rd=class{constructor(e){this.value=e}};rd.CONST="CONST",rd.LINEAR="LINEAR",rd.POLYGONAL="POLYGONAL",rd.EQUIDISTANT="EQUIDISTANT",rd.SINUS="SINUS",rd.PARABOLA="PARABOLA",rd.DISCRETE="DISCRETE",rd.USERDEFINED="USERDEFINED",rd.NOTDEFINED="NOTDEFINED";var f0=class{constructor(e){this.value=e}};f0.RIGID_JOINED_MEMBER="RIGID_JOINED_MEMBER",f0.PIN_JOINED_MEMBER="PIN_JOINED_MEMBER",f0.CABLE="CABLE",f0.TENSION_MEMBER="TENSION_MEMBER",f0.COMPRESSION_MEMBER="COMPRESSION_MEMBER",f0.USERDEFINED="USERDEFINED",f0.NOTDEFINED="NOTDEFINED";var FT=class{constructor(e){this.value=e}};FT.CONST="CONST",FT.BILINEAR="BILINEAR",FT.DISCRETE="DISCRETE",FT.ISOCONTOUR="ISOCONTOUR",FT.USERDEFINED="USERDEFINED",FT.NOTDEFINED="NOTDEFINED";var LI=class{constructor(e){this.value=e}};LI.BENDING_ELEMENT="BENDING_ELEMENT",LI.MEMBRANE_ELEMENT="MEMBRANE_ELEMENT",LI.SHELL="SHELL",LI.USERDEFINED="USERDEFINED",LI.NOTDEFINED="NOTDEFINED";var LA=class{constructor(e){this.value=e}};LA.PURCHASE="PURCHASE",LA.WORK="WORK",LA.USERDEFINED="USERDEFINED",LA.NOTDEFINED="NOTDEFINED";var HT=class{constructor(e){this.value=e}};HT.MARK="MARK",HT.TAG="TAG",HT.TREATMENT="TREATMENT",HT.DEFECT="DEFECT",HT.USERDEFINED="USERDEFINED",HT.NOTDEFINED="NOTDEFINED";var e8=class{constructor(e){this.value=e}};e8.POSITIVE="POSITIVE",e8.NEGATIVE="NEGATIVE",e8.BOTH="BOTH";var jc=class{constructor(e){this.value=e}};jc.CONTACTOR="CONTACTOR",jc.DIMMERSWITCH="DIMMERSWITCH",jc.EMERGENCYSTOP="EMERGENCYSTOP",jc.KEYPAD="KEYPAD",jc.MOMENTARYSWITCH="MOMENTARYSWITCH",jc.SELECTORSWITCH="SELECTORSWITCH",jc.STARTER="STARTER",jc.SWITCHDISCONNECTOR="SWITCHDISCONNECTOR",jc.TOGGLESWITCH="TOGGLESWITCH",jc.USERDEFINED="USERDEFINED",jc.NOTDEFINED="NOTDEFINED";var FA=class{constructor(e){this.value=e}};FA.PANEL="PANEL",FA.WORKSURFACE="WORKSURFACE",FA.USERDEFINED="USERDEFINED",FA.NOTDEFINED="NOTDEFINED";var id=class{constructor(e){this.value=e}};id.BASIN="BASIN",id.BREAKPRESSURE="BREAKPRESSURE",id.EXPANSION="EXPANSION",id.FEEDANDEXPANSION="FEEDANDEXPANSION",id.PRESSUREVESSEL="PRESSUREVESSEL",id.STORAGE="STORAGE",id.VESSEL="VESSEL",id.USERDEFINED="USERDEFINED",id.NOTDEFINED="NOTDEFINED";var t8=class{constructor(e){this.value=e}};t8.ELAPSEDTIME="ELAPSEDTIME",t8.WORKTIME="WORKTIME",t8.NOTDEFINED="NOTDEFINED";var mo=class{constructor(e){this.value=e}};mo.ATTENDANCE="ATTENDANCE",mo.CONSTRUCTION="CONSTRUCTION",mo.DEMOLITION="DEMOLITION",mo.DISMANTLE="DISMANTLE",mo.DISPOSAL="DISPOSAL",mo.INSTALLATION="INSTALLATION",mo.LOGISTIC="LOGISTIC",mo.MAINTENANCE="MAINTENANCE",mo.MOVE="MOVE",mo.OPERATION="OPERATION",mo.REMOVAL="REMOVAL",mo.RENOVATION="RENOVATION",mo.USERDEFINED="USERDEFINED",mo.NOTDEFINED="NOTDEFINED";var FI=class{constructor(e){this.value=e}};FI.COUPLER="COUPLER",FI.FIXED_END="FIXED_END",FI.TENSIONING_END="TENSIONING_END",FI.USERDEFINED="USERDEFINED",FI.NOTDEFINED="NOTDEFINED";var m0=class{constructor(e){this.value=e}};m0.DUCT="DUCT",m0.COUPLER="COUPLER",m0.GROUTING_DUCT="GROUTING_DUCT",m0.TRUMPET="TRUMPET",m0.DIABOLO="DIABOLO",m0.USERDEFINED="USERDEFINED",m0.NOTDEFINED="NOTDEFINED";var UT=class{constructor(e){this.value=e}};UT.BAR="BAR",UT.COATED="COATED",UT.STRAND="STRAND",UT.WIRE="WIRE",UT.USERDEFINED="USERDEFINED",UT.NOTDEFINED="NOTDEFINED";var HA=class{constructor(e){this.value=e}};HA.LEFT="LEFT",HA.RIGHT="RIGHT",HA.UP="UP",HA.DOWN="DOWN";var g0=class{constructor(e){this.value=e}};g0.CONTINUOUS="CONTINUOUS",g0.DISCRETE="DISCRETE",g0.DISCRETEBINARY="DISCRETEBINARY",g0.PIECEWISEBINARY="PIECEWISEBINARY",g0.PIECEWISECONSTANT="PIECEWISECONSTANT",g0.PIECEWISECONTINUOUS="PIECEWISECONTINUOUS",g0.NOTDEFINED="NOTDEFINED";var v0=class{constructor(e){this.value=e}};v0.CURRENT="CURRENT",v0.FREQUENCY="FREQUENCY",v0.INVERTER="INVERTER",v0.RECTIFIER="RECTIFIER",v0.VOLTAGE="VOLTAGE",v0.USERDEFINED="USERDEFINED",v0.NOTDEFINED="NOTDEFINED";var UA=class{constructor(e){this.value=e}};UA.DISCONTINUOUS="DISCONTINUOUS",UA.CONTINUOUS="CONTINUOUS",UA.CONTSAMEGRADIENT="CONTSAMEGRADIENT",UA.CONTSAMEGRADIENTSAMECURVATURE="CONTSAMEGRADIENTSAMECURVATURE";var BT=class{constructor(e){this.value=e}};BT.BIQUADRATICPARABOLA="BIQUADRATICPARABOLA",BT.BLOSSCURVE="BLOSSCURVE",BT.CLOTHOIDCURVE="CLOTHOIDCURVE",BT.COSINECURVE="COSINECURVE",BT.CUBICPARABOLA="CUBICPARABOLA",BT.SINECURVE="SINECURVE";var y0=class{constructor(e){this.value=e}};y0.ELEVATOR="ELEVATOR",y0.ESCALATOR="ESCALATOR",y0.MOVINGWALKWAY="MOVINGWALKWAY",y0.CRANEWAY="CRANEWAY",y0.LIFTINGGEAR="LIFTINGGEAR",y0.USERDEFINED="USERDEFINED",y0.NOTDEFINED="NOTDEFINED";var r8=class{constructor(e){this.value=e}};r8.CARTESIAN="CARTESIAN",r8.PARAMETER="PARAMETER",r8.UNSPECIFIED="UNSPECIFIED";var i8=class{constructor(e){this.value=e}};i8.FINNED="FINNED",i8.USERDEFINED="USERDEFINED",i8.NOTDEFINED="NOTDEFINED";var Xi=class{constructor(e){this.value=e}};Xi.ABSORBEDDOSEUNIT="ABSORBEDDOSEUNIT",Xi.AMOUNTOFSUBSTANCEUNIT="AMOUNTOFSUBSTANCEUNIT",Xi.AREAUNIT="AREAUNIT",Xi.DOSEEQUIVALENTUNIT="DOSEEQUIVALENTUNIT",Xi.ELECTRICCAPACITANCEUNIT="ELECTRICCAPACITANCEUNIT",Xi.ELECTRICCHARGEUNIT="ELECTRICCHARGEUNIT",Xi.ELECTRICCONDUCTANCEUNIT="ELECTRICCONDUCTANCEUNIT",Xi.ELECTRICCURRENTUNIT="ELECTRICCURRENTUNIT",Xi.ELECTRICRESISTANCEUNIT="ELECTRICRESISTANCEUNIT",Xi.ELECTRICVOLTAGEUNIT="ELECTRICVOLTAGEUNIT",Xi.ENERGYUNIT="ENERGYUNIT",Xi.FORCEUNIT="FORCEUNIT",Xi.FREQUENCYUNIT="FREQUENCYUNIT",Xi.ILLUMINANCEUNIT="ILLUMINANCEUNIT",Xi.INDUCTANCEUNIT="INDUCTANCEUNIT",Xi.LENGTHUNIT="LENGTHUNIT",Xi.LUMINOUSFLUXUNIT="LUMINOUSFLUXUNIT",Xi.LUMINOUSINTENSITYUNIT="LUMINOUSINTENSITYUNIT",Xi.MAGNETICFLUXDENSITYUNIT="MAGNETICFLUXDENSITYUNIT",Xi.MAGNETICFLUXUNIT="MAGNETICFLUXUNIT",Xi.MASSUNIT="MASSUNIT",Xi.PLANEANGLEUNIT="PLANEANGLEUNIT",Xi.POWERUNIT="POWERUNIT",Xi.PRESSUREUNIT="PRESSUREUNIT",Xi.RADIOACTIVITYUNIT="RADIOACTIVITYUNIT",Xi.SOLIDANGLEUNIT="SOLIDANGLEUNIT",Xi.THERMODYNAMICTEMPERATUREUNIT="THERMODYNAMICTEMPERATUREUNIT",Xi.TIMEUNIT="TIMEUNIT",Xi.VOLUMEUNIT="VOLUMEUNIT",Xi.USERDEFINED="USERDEFINED";var oh=class{constructor(e){this.value=e}};oh.ALARMPANEL="ALARMPANEL",oh.CONTROLPANEL="CONTROLPANEL",oh.GASDETECTIONPANEL="GASDETECTIONPANEL",oh.INDICATORPANEL="INDICATORPANEL",oh.MIMICPANEL="MIMICPANEL",oh.HUMIDISTAT="HUMIDISTAT",oh.THERMOSTAT="THERMOSTAT",oh.WEATHERSTATION="WEATHERSTATION",oh.USERDEFINED="USERDEFINED",oh.NOTDEFINED="NOTDEFINED";var T0=class{constructor(e){this.value=e}};T0.AIRHANDLER="AIRHANDLER",T0.AIRCONDITIONINGUNIT="AIRCONDITIONINGUNIT",T0.DEHUMIDIFIER="DEHUMIDIFIER",T0.SPLITSYSTEM="SPLITSYSTEM",T0.ROOFTOPUNIT="ROOFTOPUNIT",T0.USERDEFINED="USERDEFINED",T0.NOTDEFINED="NOTDEFINED";var Hn=class{constructor(e){this.value=e}};Hn.AIRRELEASE="AIRRELEASE",Hn.ANTIVACUUM="ANTIVACUUM",Hn.CHANGEOVER="CHANGEOVER",Hn.CHECK="CHECK",Hn.COMMISSIONING="COMMISSIONING",Hn.DIVERTING="DIVERTING",Hn.DRAWOFFCOCK="DRAWOFFCOCK",Hn.DOUBLECHECK="DOUBLECHECK",Hn.DOUBLEREGULATING="DOUBLEREGULATING",Hn.FAUCET="FAUCET",Hn.FLUSHING="FLUSHING",Hn.GASCOCK="GASCOCK",Hn.GASTAP="GASTAP",Hn.ISOLATING="ISOLATING",Hn.MIXING="MIXING",Hn.PRESSUREREDUCING="PRESSUREREDUCING",Hn.PRESSURERELIEF="PRESSURERELIEF",Hn.REGULATING="REGULATING",Hn.SAFETYCUTOFF="SAFETYCUTOFF",Hn.STEAMTRAP="STEAMTRAP",Hn.STOPCOCK="STOPCOCK",Hn.USERDEFINED="USERDEFINED",Hn.NOTDEFINED="NOTDEFINED";var zf=class{constructor(e){this.value=e}};zf.BENDING_YIELD="BENDING_YIELD",zf.SHEAR_YIELD="SHEAR_YIELD",zf.AXIAL_YIELD="AXIAL_YIELD",zf.FRICTION="FRICTION",zf.VISCOUS="VISCOUS",zf.RUBBER="RUBBER",zf.USERDEFINED="USERDEFINED",zf.NOTDEFINED="NOTDEFINED";var HI=class{constructor(e){this.value=e}};HI.COMPRESSION="COMPRESSION",HI.SPRING="SPRING",HI.BASE="BASE",HI.USERDEFINED="USERDEFINED",HI.NOTDEFINED="NOTDEFINED";var jf=class{constructor(e){this.value=e}};jf.CUTOUT="CUTOUT",jf.NOTCH="NOTCH",jf.HOLE="HOLE",jf.MITER="MITER",jf.CHAMFER="CHAMFER",jf.EDGE="EDGE",jf.USERDEFINED="USERDEFINED",jf.NOTDEFINED="NOTDEFINED";var Vl=class{constructor(e){this.value=e}};Vl.MOVABLE="MOVABLE",Vl.PARAPET="PARAPET",Vl.PARTITIONING="PARTITIONING",Vl.PLUMBINGWALL="PLUMBINGWALL",Vl.SHEAR="SHEAR",Vl.SOLIDWALL="SOLIDWALL",Vl.STANDARD="STANDARD",Vl.POLYGONAL="POLYGONAL",Vl.ELEMENTEDWALL="ELEMENTEDWALL",Vl.RETAININGWALL="RETAININGWALL",Vl.USERDEFINED="USERDEFINED",Vl.NOTDEFINED="NOTDEFINED";var nd=class{constructor(e){this.value=e}};nd.FLOORTRAP="FLOORTRAP",nd.FLOORWASTE="FLOORWASTE",nd.GULLYSUMP="GULLYSUMP",nd.GULLYTRAP="GULLYTRAP",nd.ROOFDRAIN="ROOFDRAIN",nd.WASTEDISPOSALUNIT="WASTEDISPOSALUNIT",nd.WASTETRAP="WASTETRAP",nd.USERDEFINED="USERDEFINED",nd.NOTDEFINED="NOTDEFINED";var go=class{constructor(e){this.value=e}};go.SIDEHUNGRIGHTHAND="SIDEHUNGRIGHTHAND",go.SIDEHUNGLEFTHAND="SIDEHUNGLEFTHAND",go.TILTANDTURNRIGHTHAND="TILTANDTURNRIGHTHAND",go.TILTANDTURNLEFTHAND="TILTANDTURNLEFTHAND",go.TOPHUNG="TOPHUNG",go.BOTTOMHUNG="BOTTOMHUNG",go.PIVOTHORIZONTAL="PIVOTHORIZONTAL",go.PIVOTVERTICAL="PIVOTVERTICAL",go.SLIDINGHORIZONTAL="SLIDINGHORIZONTAL",go.SLIDINGVERTICAL="SLIDINGVERTICAL",go.REMOVABLECASEMENT="REMOVABLECASEMENT",go.FIXEDCASEMENT="FIXEDCASEMENT",go.OTHEROPERATION="OTHEROPERATION",go.NOTDEFINED="NOTDEFINED";var kT=class{constructor(e){this.value=e}};kT.LEFT="LEFT",kT.MIDDLE="MIDDLE",kT.RIGHT="RIGHT",kT.BOTTOM="BOTTOM",kT.TOP="TOP",kT.NOTDEFINED="NOTDEFINED";var Wf=class{constructor(e){this.value=e}};Wf.ALUMINIUM="ALUMINIUM",Wf.HIGH_GRADE_STEEL="HIGH_GRADE_STEEL",Wf.STEEL="STEEL",Wf.WOOD="WOOD",Wf.ALUMINIUM_WOOD="ALUMINIUM_WOOD",Wf.PLASTIC="PLASTIC",Wf.OTHER_CONSTRUCTION="OTHER_CONSTRUCTION",Wf.NOTDEFINED="NOTDEFINED";var Wc=class{constructor(e){this.value=e}};Wc.SINGLE_PANEL="SINGLE_PANEL",Wc.DOUBLE_PANEL_VERTICAL="DOUBLE_PANEL_VERTICAL",Wc.DOUBLE_PANEL_HORIZONTAL="DOUBLE_PANEL_HORIZONTAL",Wc.TRIPLE_PANEL_VERTICAL="TRIPLE_PANEL_VERTICAL",Wc.TRIPLE_PANEL_BOTTOM="TRIPLE_PANEL_BOTTOM",Wc.TRIPLE_PANEL_TOP="TRIPLE_PANEL_TOP",Wc.TRIPLE_PANEL_LEFT="TRIPLE_PANEL_LEFT",Wc.TRIPLE_PANEL_RIGHT="TRIPLE_PANEL_RIGHT",Wc.TRIPLE_PANEL_HORIZONTAL="TRIPLE_PANEL_HORIZONTAL",Wc.USERDEFINED="USERDEFINED",Wc.NOTDEFINED="NOTDEFINED";var UI=class{constructor(e){this.value=e}};UI.WINDOW="WINDOW",UI.SKYLIGHT="SKYLIGHT",UI.LIGHTDOME="LIGHTDOME",UI.USERDEFINED="USERDEFINED",UI.NOTDEFINED="NOTDEFINED";var qc=class{constructor(e){this.value=e}};qc.SINGLE_PANEL="SINGLE_PANEL",qc.DOUBLE_PANEL_VERTICAL="DOUBLE_PANEL_VERTICAL",qc.DOUBLE_PANEL_HORIZONTAL="DOUBLE_PANEL_HORIZONTAL",qc.TRIPLE_PANEL_VERTICAL="TRIPLE_PANEL_VERTICAL",qc.TRIPLE_PANEL_BOTTOM="TRIPLE_PANEL_BOTTOM",qc.TRIPLE_PANEL_TOP="TRIPLE_PANEL_TOP",qc.TRIPLE_PANEL_LEFT="TRIPLE_PANEL_LEFT",qc.TRIPLE_PANEL_RIGHT="TRIPLE_PANEL_RIGHT",qc.TRIPLE_PANEL_HORIZONTAL="TRIPLE_PANEL_HORIZONTAL",qc.USERDEFINED="USERDEFINED",qc.NOTDEFINED="NOTDEFINED";var BI=class{constructor(e){this.value=e}};BI.FIRSTSHIFT="FIRSTSHIFT",BI.SECONDSHIFT="SECONDSHIFT",BI.THIRDSHIFT="THIRDSHIFT",BI.USERDEFINED="USERDEFINED",BI.NOTDEFINED="NOTDEFINED";var kI=class{constructor(e){this.value=e}};kI.ACTUAL="ACTUAL",kI.BASELINE="BASELINE",kI.PLANNED="PLANNED",kI.USERDEFINED="USERDEFINED",kI.NOTDEFINED="NOTDEFINED";var GI=class{constructor(e){this.value=e}};GI.ACTUAL="ACTUAL",GI.BASELINE="BASELINE",GI.PLANNED="PLANNED",GI.USERDEFINED="USERDEFINED",GI.NOTDEFINED="NOTDEFINED";var rfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.PredefinedType=l,this.Status=h,this.LongDescription=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new rfe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.PredefinedType),e.push(this.Status),e.push(this.LongDescription),e}},ife=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.TheActor=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new ife(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.TheActor),e}},nfe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Role=i,this.UserDefinedRole=r,this.Description=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new nfe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Role),e.push(this.UserDefinedRole),e.push(this.Description),e}},sfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new sfe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},afe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new afe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},ofe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Purpose=i,this.Description=r,this.UserDefinedPurpose=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new ofe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Purpose),e.push(this.Description),e.push(this.UserDefinedPurpose),e}},lfe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Outer=i}static FromTape(e,t,i){let r=0,n=i[r++];return new lfe(e,t,n)}ToTape(){let e=[];return e.push(this.Outer),e}},cfe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Outer=i,this.Voids=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new cfe(e,t,n,s)}ToTape(){let e=[];return e.push(this.Outer),e.push(this.Voids),e}},ufe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Bounds=i,this.FaceSurface=r,this.SameSense=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new ufe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Bounds),e.push(this.FaceSurface),e.push(this.SameSense),e}},hfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new hfe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},pfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new pfe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},dfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new dfe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},ffe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new ffe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},mfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new mfe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},gfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new gfe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},vfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new vfe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},yfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new yfe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Tfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Axis=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Tfe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Axis),e.push(this.PredefinedType),e}},Efe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.StartDistAlong=i,this.Segments=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new Efe(e,t,n,s)}ToTape(){let e=[];return e.push(this.StartDistAlong),e.push(this.Segments),e}},bfe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.TangentialContinuity=i,this.StartTag=r,this.EndTag=n,this.CurveGeometry=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new bfe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.TangentialContinuity),e.push(this.StartTag),e.push(this.EndTag),e.push(this.CurveGeometry),e}},xfe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.TangentialContinuity=i,this.StartTag=r,this.EndTag=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new xfe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.TangentialContinuity),e.push(this.StartTag),e.push(this.EndTag),e}},Ife=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.TangentialContinuity=i,this.StartTag=r,this.EndTag=n,this.StartDistAlong=s,this.HorizontalLength=a,this.StartHeight=o,this.StartGradient=l,this.Radius=h,this.IsConvex=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Ife(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.TangentialContinuity),e.push(this.StartTag),e.push(this.EndTag),e.push(this.StartDistAlong),e.push(this.HorizontalLength),e.push(this.StartHeight),e.push(this.StartGradient),e.push(this.Radius),e.push(this.IsConvex),e}},_fe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.TangentialContinuity=i,this.StartTag=r,this.EndTag=n,this.StartDistAlong=s,this.HorizontalLength=a,this.StartHeight=o,this.StartGradient=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new _fe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.TangentialContinuity),e.push(this.StartTag),e.push(this.EndTag),e.push(this.StartDistAlong),e.push(this.HorizontalLength),e.push(this.StartHeight),e.push(this.StartGradient),e}},Sfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.TangentialContinuity=i,this.StartTag=r,this.EndTag=n,this.StartDistAlong=s,this.HorizontalLength=a,this.StartHeight=o,this.StartGradient=l,this.ParabolaConstant=h,this.IsConvex=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Sfe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.TangentialContinuity),e.push(this.StartTag),e.push(this.EndTag),e.push(this.StartDistAlong),e.push(this.HorizontalLength),e.push(this.StartHeight),e.push(this.StartGradient),e.push(this.ParabolaConstant),e.push(this.IsConvex),e}},wfe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Segments=i}static FromTape(e,t,i){let r=0,n=i[r++];return new wfe(e,t,n)}ToTape(){let e=[];return e.push(this.Segments),e}},Rfe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.TangentialContinuity=i,this.StartTag=r,this.EndTag=n,this.StartDistAlong=s,this.HorizontalLength=a,this.StartHeight=o,this.StartGradient=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new Rfe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.TangentialContinuity),e.push(this.StartTag),e.push(this.EndTag),e.push(this.StartDistAlong),e.push(this.HorizontalLength),e.push(this.StartHeight),e.push(this.StartGradient),e}},Mfe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Horizontal=i,this.Vertical=r,this.Tag=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new Mfe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Horizontal),e.push(this.Vertical),e.push(this.Tag),e}},Dfe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new Dfe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e}},Cfe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.OuterBoundary=i,this.InnerBoundaries=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new Cfe(e,t,n,s)}ToTape(){let e=[];return e.push(this.OuterBoundary),e.push(this.InnerBoundaries),e}},Afe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.ApplicationDeveloper=i,this.Version=r,this.ApplicationFullName=n,this.ApplicationIdentifier=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new Afe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.ApplicationDeveloper),e.push(this.Version),e.push(this.ApplicationFullName),e.push(this.ApplicationIdentifier),e}},Ofe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.AppliedValue=n,this.UnitBasis=s,this.ApplicableDate=a,this.FixedUntilDate=o,this.Category=l,this.Condition=h,this.ArithmeticOperator=u,this.Components=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Ofe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.AppliedValue),e.push(this.UnitBasis),e.push(this.ApplicableDate),e.push(this.FixedUntilDate),e.push(this.Category),e.push(this.Condition),e.push(this.ArithmeticOperator),e.push(this.Components),e}},Pfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.Identifier=i,this.Name=r,this.Description=n,this.TimeOfApproval=s,this.Status=a,this.Level=o,this.Qualifier=l,this.RequestingApproval=h,this.GivingApproval=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Pfe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.Identifier),e.push(this.Name),e.push(this.Description),e.push(this.TimeOfApproval),e.push(this.Status),e.push(this.Level),e.push(this.Qualifier),e.push(this.RequestingApproval),e.push(this.GivingApproval),e}},Nfe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.RelatingApproval=n,this.RelatedApprovals=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new Nfe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.RelatingApproval),e.push(this.RelatedApprovals),e}},Lfe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.OuterCurve=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new Lfe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.OuterCurve),e}},Ffe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Curve=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new Ffe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Curve),e}},Hfe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.OuterCurve=n,this.InnerCurves=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new Hfe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.OuterCurve),e.push(this.InnerCurves),e}},Ufe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.OriginalValue=l,this.CurrentValue=h,this.TotalReplacementCost=u,this.Owner=c,this.User=p,this.ResponsiblePerson=d,this.IncorporationDate=f,this.DepreciatedValue=m}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++];return new Ufe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.OriginalValue),e.push(this.CurrentValue),e.push(this.TotalReplacementCost),e.push(this.Owner),e.push(this.User),e.push(this.ResponsiblePerson),e.push(this.IncorporationDate),e.push(this.DepreciatedValue),e}},Bfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m,g){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.BottomFlangeWidth=s,this.OverallDepth=a,this.WebThickness=o,this.BottomFlangeThickness=l,this.BottomFlangeFilletRadius=h,this.TopFlangeWidth=u,this.TopFlangeThickness=c,this.TopFlangeFilletRadius=p,this.BottomFlangeEdgeRadius=d,this.BottomFlangeSlope=f,this.TopFlangeEdgeRadius=m,this.TopFlangeSlope=g}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++],v=i[r++];return new Bfe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.BottomFlangeWidth),e.push(this.OverallDepth),e.push(this.WebThickness),e.push(this.BottomFlangeThickness),e.push(this.BottomFlangeFilletRadius),e.push(this.TopFlangeWidth),e.push(this.TopFlangeThickness),e.push(this.TopFlangeFilletRadius),e.push(this.BottomFlangeEdgeRadius),e.push(this.BottomFlangeSlope),e.push(this.TopFlangeEdgeRadius),e.push(this.TopFlangeSlope),e}},kfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new kfe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Gfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Gfe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Vfe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Location=i,this.Axis=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new Vfe(e,t,n,s)}ToTape(){let e=[];return e.push(this.Location),e.push(this.Axis),e}},zfe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Location=i,this.RefDirection=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new zfe(e,t,n,s)}ToTape(){let e=[];return e.push(this.Location),e.push(this.RefDirection),e}},jfe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Location=i,this.Axis=r,this.RefDirection=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new jfe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Location),e.push(this.Axis),e.push(this.RefDirection),e}},Wfe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Degree=i,this.ControlPointsList=r,this.CurveForm=n,this.ClosedCurve=s,this.SelfIntersect=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Wfe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Degree),e.push(this.ControlPointsList),e.push(this.CurveForm),e.push(this.ClosedCurve),e.push(this.SelfIntersect),e}},qfe=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.Degree=i,this.ControlPointsList=r,this.CurveForm=n,this.ClosedCurve=s,this.SelfIntersect=a,this.KnotMultiplicities=o,this.Knots=l,this.KnotSpec=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new qfe(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.Degree),e.push(this.ControlPointsList),e.push(this.CurveForm),e.push(this.ClosedCurve),e.push(this.SelfIntersect),e.push(this.KnotMultiplicities),e.push(this.Knots),e.push(this.KnotSpec),e}},Yfe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.UDegree=i,this.VDegree=r,this.ControlPointsList=n,this.SurfaceForm=s,this.UClosed=a,this.VClosed=o,this.SelfIntersect=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new Yfe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.UDegree),e.push(this.VDegree),e.push(this.ControlPointsList),e.push(this.SurfaceForm),e.push(this.UClosed),e.push(this.VClosed),e.push(this.SelfIntersect),e}},Xfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.UDegree=i,this.VDegree=r,this.ControlPointsList=n,this.SurfaceForm=s,this.UClosed=a,this.VClosed=o,this.SelfIntersect=l,this.UMultiplicities=h,this.VMultiplicities=u,this.UKnots=c,this.VKnots=p,this.KnotSpec=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new Xfe(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.UDegree),e.push(this.VDegree),e.push(this.ControlPointsList),e.push(this.SurfaceForm),e.push(this.UClosed),e.push(this.VClosed),e.push(this.SelfIntersect),e.push(this.UMultiplicities),e.push(this.VMultiplicities),e.push(this.UKnots),e.push(this.VKnots),e.push(this.KnotSpec),e}},$fe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new $fe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Kfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Kfe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Zfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Zfe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Jfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Jfe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Qfe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Qfe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},eme=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.RepeatS=i,this.RepeatT=r,this.Mode=n,this.TextureTransform=s,this.Parameter=a,this.RasterFormat=o,this.RasterCode=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new eme(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.RepeatS),e.push(this.RepeatT),e.push(this.Mode),e.push(this.TextureTransform),e.push(this.Parameter),e.push(this.RasterFormat),e.push(this.RasterCode),e}},tme=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Position=i,this.XLength=r,this.YLength=n,this.ZLength=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new tme(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Position),e.push(this.XLength),e.push(this.YLength),e.push(this.ZLength),e}},rme=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new rme(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},ime=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new ime(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},nme=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Operator=i,this.FirstOperand=r,this.SecondOperand=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new nme(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Operator),e.push(this.FirstOperand),e.push(this.SecondOperand),e}},sme=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Operator=i,this.FirstOperand=r,this.SecondOperand=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new sme(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Operator),e.push(this.FirstOperand),e.push(this.SecondOperand),e}},ame=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Name=i}static FromTape(e,t,i){let r=0,n=i[r++];return new ame(e,t,n)}ToTape(){let e=[];return e.push(this.Name),e}},ome=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Segments=i,this.SelfIntersect=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new ome(e,t,n,s)}ToTape(){let e=[];return e.push(this.Segments),e.push(this.SelfIntersect),e}},lme=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Name=i,this.TranslationalStiffnessByLengthX=r,this.TranslationalStiffnessByLengthY=n,this.TranslationalStiffnessByLengthZ=s,this.RotationalStiffnessByLengthX=a,this.RotationalStiffnessByLengthY=o,this.RotationalStiffnessByLengthZ=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new lme(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Name),e.push(this.TranslationalStiffnessByLengthX),e.push(this.TranslationalStiffnessByLengthY),e.push(this.TranslationalStiffnessByLengthZ),e.push(this.RotationalStiffnessByLengthX),e.push(this.RotationalStiffnessByLengthY),e.push(this.RotationalStiffnessByLengthZ),e}},cme=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.TranslationalStiffnessByAreaX=r,this.TranslationalStiffnessByAreaY=n,this.TranslationalStiffnessByAreaZ=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new cme(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.TranslationalStiffnessByAreaX),e.push(this.TranslationalStiffnessByAreaY),e.push(this.TranslationalStiffnessByAreaZ),e}},ume=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Name=i,this.TranslationalStiffnessX=r,this.TranslationalStiffnessY=n,this.TranslationalStiffnessZ=s,this.RotationalStiffnessX=a,this.RotationalStiffnessY=o,this.RotationalStiffnessZ=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new ume(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Name),e.push(this.TranslationalStiffnessX),e.push(this.TranslationalStiffnessY),e.push(this.TranslationalStiffnessZ),e.push(this.RotationalStiffnessX),e.push(this.RotationalStiffnessY),e.push(this.RotationalStiffnessZ),e}},hme=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.Name=i,this.TranslationalStiffnessX=r,this.TranslationalStiffnessY=n,this.TranslationalStiffnessZ=s,this.RotationalStiffnessX=a,this.RotationalStiffnessY=o,this.RotationalStiffnessZ=l,this.WarpingStiffness=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new hme(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.Name),e.push(this.TranslationalStiffnessX),e.push(this.TranslationalStiffnessY),e.push(this.TranslationalStiffnessZ),e.push(this.RotationalStiffnessX),e.push(this.RotationalStiffnessY),e.push(this.RotationalStiffnessZ),e.push(this.WarpingStiffness),e}},pme=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new pme(e,t)}ToTape(){return[]}},dme=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new dme(e,t)}ToTape(){return[]}},fme=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Corner=i,this.XDim=r,this.YDim=n,this.ZDim=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new fme(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Corner),e.push(this.XDim),e.push(this.YDim),e.push(this.ZDim),e}},mme=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.BaseSurface=i,this.AgreementFlag=r,this.Enclosure=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new mme(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.BaseSurface),e.push(this.AgreementFlag),e.push(this.Enclosure),e}},gme=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=h,this.CompositionType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new gme(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.LongName),e.push(this.CompositionType),e.push(this.PredefinedType),e}},vme=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=h,this.CompositionType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new vme(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.LongName),e.push(this.CompositionType),e.push(this.PredefinedType),e}},yme=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=h,this.CompositionType=u,this.ElevationOfRefHeight=c,this.ElevationOfTerrain=p,this.BuildingAddress=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new yme(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.LongName),e.push(this.CompositionType),e.push(this.ElevationOfRefHeight),e.push(this.ElevationOfTerrain),e.push(this.BuildingAddress),e}},Tme=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Tme(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},Eme=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Eme(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},bme=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new bme(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},xme=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new xme(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Ime=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Ime(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},_me=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new _me(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},Sme=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=h,this.CompositionType=u,this.Elevation=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Sme(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.LongName),e.push(this.CompositionType),e.push(this.Elevation),e}},wme=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.PredefinedType=o,this.LongName=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new wme(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.PredefinedType),e.push(this.LongName),e}},Rme=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Rme(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Mme=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Mme(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Dme=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.Depth=s,this.Width=a,this.WallThickness=o,this.Girth=l,this.InternalFilletRadius=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Dme(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.Depth),e.push(this.Width),e.push(this.WallThickness),e.push(this.Girth),e.push(this.InternalFilletRadius),e}},Cme=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Cme(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Ame=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Ame(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Ome=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Ome(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Pme=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Pme(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Nme=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Nme(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Lme=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Lme(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Fme=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Fme(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Hme=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Hme(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Ume=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Ume(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Bme=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Bme(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},kme=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Coordinates=i}static FromTape(e,t,i){let r=0,n=i[r++];return new kme(e,t,n)}ToTape(){let e=[];return e.push(this.Coordinates),e}},Gme=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new Gme(e,t)}ToTape(){return[]}},Vme=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.CoordList=i,this.TagList=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new Vme(e,t,n,s)}ToTape(){let e=[];return e.push(this.CoordList),e.push(this.TagList),e}},zme=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.CoordList=i,this.TagList=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new zme(e,t,n,s)}ToTape(){let e=[];return e.push(this.CoordList),e.push(this.TagList),e}},jme=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Axis1=i,this.Axis2=r,this.LocalOrigin=n,this.Scale=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new jme(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Axis1),e.push(this.Axis2),e.push(this.LocalOrigin),e.push(this.Scale),e}},Wme=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Axis1=i,this.Axis2=r,this.LocalOrigin=n,this.Scale=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new Wme(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Axis1),e.push(this.Axis2),e.push(this.LocalOrigin),e.push(this.Scale),e}},qme=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Axis1=i,this.Axis2=r,this.LocalOrigin=n,this.Scale=s,this.Scale2=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new qme(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Axis1),e.push(this.Axis2),e.push(this.LocalOrigin),e.push(this.Scale),e.push(this.Scale2),e}},Yme=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Axis1=i,this.Axis2=r,this.LocalOrigin=n,this.Scale=s,this.Axis3=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Yme(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Axis1),e.push(this.Axis2),e.push(this.LocalOrigin),e.push(this.Scale),e.push(this.Axis3),e}},Xme=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Axis1=i,this.Axis2=r,this.LocalOrigin=n,this.Scale=s,this.Axis3=a,this.Scale2=o,this.Scale3=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new Xme(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Axis1),e.push(this.Axis2),e.push(this.LocalOrigin),e.push(this.Scale),e.push(this.Axis3),e.push(this.Scale2),e.push(this.Scale3),e}},$me=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Curve=n,this.Thickness=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new $me(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Curve),e.push(this.Thickness),e}},Kme=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Kme(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Zme=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Zme(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Jme=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Jme(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Qme=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Qme(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},ege=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Position=i,this.Radius=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new ege(e,t,n,s)}ToTape(){let e=[];return e.push(this.Position),e.push(this.Radius),e}},tge=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.Radius=s,this.WallThickness=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new tge(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.Radius),e.push(this.WallThickness),e}},rge=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.Radius=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new rge(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.Radius),e}},ige=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.StartPoint=i,this.StartDirection=r,this.SegmentLength=n,this.Radius=s,this.IsCCW=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new ige(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.StartPoint),e.push(this.StartDirection),e.push(this.SegmentLength),e.push(this.Radius),e.push(this.IsCCW),e}},nge=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new nge(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},sge=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new sge(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},age=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Source=i,this.Edition=r,this.EditionDate=n,this.Name=s,this.Description=a,this.Location=o,this.ReferenceTokens=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new age(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Source),e.push(this.Edition),e.push(this.EditionDate),e.push(this.Name),e.push(this.Description),e.push(this.Location),e.push(this.ReferenceTokens),e}},oge=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.Location=i,this.Identification=r,this.Name=n,this.ReferencedSource=s,this.Description=a,this.Sort=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new oge(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.Location),e.push(this.Identification),e.push(this.Name),e.push(this.ReferencedSource),e.push(this.Description),e.push(this.Sort),e}},lge=class{constructor(e,t,i){this.expressID=e,this.type=t,this.CfsFaces=i}static FromTape(e,t,i){let r=0,n=i[r++];return new lge(e,t,n)}ToTape(){let e=[];return e.push(this.CfsFaces),e}},cge=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new cge(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},uge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new uge(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},hge=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Red=r,this.Green=n,this.Blue=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new hge(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Red),e.push(this.Green),e.push(this.Blue),e}},pge=class{constructor(e,t,i){this.expressID=e,this.type=t,this.ColourList=i}static FromTape(e,t,i){let r=0,n=i[r++];return new pge(e,t,n)}ToTape(){let e=[];return e.push(this.ColourList),e}},dge=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Name=i}static FromTape(e,t,i){let r=0,n=i[r++];return new dge(e,t,n)}ToTape(){let e=[];return e.push(this.Name),e}},fge=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new fge(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},mge=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new mge(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},gge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new gge(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},vge=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new vge(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},yge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new yge(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Tge=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.UsageName=n,this.HasProperties=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new Tge(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.UsageName),e.push(this.HasProperties),e}},Ege=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.UsageName=a,this.TemplateType=o,this.HasPropertyTemplates=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new Ege(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.UsageName),e.push(this.TemplateType),e.push(this.HasPropertyTemplates),e}},bge=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Segments=i,this.SelfIntersect=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new bge(e,t,n,s)}ToTape(){let e=[];return e.push(this.Segments),e.push(this.SelfIntersect),e}},xge=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Segments=i,this.SelfIntersect=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new xge(e,t,n,s)}ToTape(){let e=[];return e.push(this.Segments),e.push(this.SelfIntersect),e}},Ige=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Transition=i,this.SameSense=r,this.ParentCurve=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new Ige(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Transition),e.push(this.SameSense),e.push(this.ParentCurve),e}},_ge=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Profiles=n,this.Label=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new _ge(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Profiles),e.push(this.Label),e}},Sge=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Sge(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},wge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new wge(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Rge=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Rge(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Mge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Mge(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Dge=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Position=i}static FromTape(e,t,i){let r=0,n=i[r++];return new Dge(e,t,n)}ToTape(){let e=[];return e.push(this.Position),e}},Cge=class{constructor(e,t,i){this.expressID=e,this.type=t,this.CfsFaces=i}static FromTape(e,t,i){let r=0,n=i[r++];return new Cge(e,t,n)}ToTape(){let e=[];return e.push(this.CfsFaces),e}},Age=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.CurveOnRelatingElement=i,this.CurveOnRelatedElement=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new Age(e,t,n,s)}ToTape(){let e=[];return e.push(this.CurveOnRelatingElement),e.push(this.CurveOnRelatedElement),e}},Oge=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new Oge(e,t)}ToTape(){return[]}},Pge=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.PointOnRelatingElement=i,this.PointOnRelatedElement=r,this.EccentricityInX=n,this.EccentricityInY=s,this.EccentricityInZ=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Pge(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.PointOnRelatingElement),e.push(this.PointOnRelatedElement),e.push(this.EccentricityInX),e.push(this.EccentricityInY),e.push(this.EccentricityInZ),e}},Nge=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.PointOnRelatingElement=i,this.PointOnRelatedElement=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new Nge(e,t,n,s)}ToTape(){let e=[];return e.push(this.PointOnRelatingElement),e.push(this.PointOnRelatedElement),e}},Lge=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.SurfaceOnRelatingElement=i,this.SurfaceOnRelatedElement=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new Lge(e,t,n,s)}ToTape(){let e=[];return e.push(this.SurfaceOnRelatingElement),e.push(this.SurfaceOnRelatedElement),e}},Fge=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.VolumeOnRelatingElement=i,this.VolumeOnRelatedElement=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new Fge(e,t,n,s)}ToTape(){let e=[];return e.push(this.VolumeOnRelatingElement),e.push(this.VolumeOnRelatedElement),e}},Hge=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.ConstraintGrade=n,this.ConstraintSource=s,this.CreatingActor=a,this.CreationTime=o,this.UserDefinedGrade=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new Hge(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.ConstraintGrade),e.push(this.ConstraintSource),e.push(this.CreatingActor),e.push(this.CreationTime),e.push(this.UserDefinedGrade),e}},Uge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=h,this.BaseCosts=u,this.BaseQuantity=c,this.PredefinedType=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new Uge(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.LongDescription),e.push(this.Usage),e.push(this.BaseCosts),e.push(this.BaseQuantity),e.push(this.PredefinedType),e}},Bge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=h,this.ResourceType=u,this.BaseCosts=c,this.BaseQuantity=p,this.PredefinedType=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new Bge(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.Identification),e.push(this.LongDescription),e.push(this.ResourceType),e.push(this.BaseCosts),e.push(this.BaseQuantity),e.push(this.PredefinedType),e}},kge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=h,this.BaseCosts=u,this.BaseQuantity=c,this.PredefinedType=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new kge(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.LongDescription),e.push(this.Usage),e.push(this.BaseCosts),e.push(this.BaseQuantity),e.push(this.PredefinedType),e}},Gge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=h,this.ResourceType=u,this.BaseCosts=c,this.BaseQuantity=p,this.PredefinedType=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new Gge(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.Identification),e.push(this.LongDescription),e.push(this.ResourceType),e.push(this.BaseCosts),e.push(this.BaseQuantity),e.push(this.PredefinedType),e}},Vge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=h,this.BaseCosts=u,this.BaseQuantity=c,this.PredefinedType=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new Vge(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.LongDescription),e.push(this.Usage),e.push(this.BaseCosts),e.push(this.BaseQuantity),e.push(this.PredefinedType),e}},zge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=h,this.ResourceType=u,this.BaseCosts=c,this.BaseQuantity=p,this.PredefinedType=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new zge(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.Identification),e.push(this.LongDescription),e.push(this.ResourceType),e.push(this.BaseCosts),e.push(this.BaseQuantity),e.push(this.PredefinedType),e}},jge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=h,this.BaseCosts=u,this.BaseQuantity=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new jge(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.LongDescription),e.push(this.Usage),e.push(this.BaseCosts),e.push(this.BaseQuantity),e}},Wge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=h,this.ResourceType=u,this.BaseCosts=c,this.BaseQuantity=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new Wge(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.Identification),e.push(this.LongDescription),e.push(this.ResourceType),e.push(this.BaseCosts),e.push(this.BaseQuantity),e}},qge=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.LongName=o,this.Phase=l,this.RepresentationContexts=h,this.UnitsInContext=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new qge(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.LongName),e.push(this.Phase),e.push(this.RepresentationContexts),e.push(this.UnitsInContext),e}},Yge=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Dimensions=i,this.UnitType=r,this.Name=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new Yge(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Dimensions),e.push(this.UnitType),e.push(this.Name),e}},Xge=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Xge(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e}},$ge=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new $ge(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Kge=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Kge(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Zge=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Dimensions=i,this.UnitType=r,this.Name=n,this.ConversionFactor=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new Zge(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Dimensions),e.push(this.UnitType),e.push(this.Name),e.push(this.ConversionFactor),e}},Jge=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Dimensions=i,this.UnitType=r,this.Name=n,this.ConversionFactor=s,this.ConversionOffset=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Jge(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Dimensions),e.push(this.UnitType),e.push(this.Name),e.push(this.ConversionFactor),e.push(this.ConversionOffset),e}},Qge=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Qge(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},e0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new e0e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},t0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new t0e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},r0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new r0e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},i0e=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.SourceCRS=i,this.TargetCRS=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new i0e(e,t,n,s)}ToTape(){let e=[];return e.push(this.SourceCRS),e.push(this.TargetCRS),e}},n0e=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.GeodeticDatum=n,this.VerticalDatum=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new n0e(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.GeodeticDatum),e.push(this.VerticalDatum),e}},s0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.PredefinedType=l,this.CostValues=h,this.CostQuantities=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new s0e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.PredefinedType),e.push(this.CostValues),e.push(this.CostQuantities),e}},a0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.PredefinedType=l,this.Status=h,this.SubmittedOn=u,this.UpdateDate=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new a0e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.PredefinedType),e.push(this.Status),e.push(this.SubmittedOn),e.push(this.UpdateDate),e}},o0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.AppliedValue=n,this.UnitBasis=s,this.ApplicableDate=a,this.FixedUntilDate=o,this.Category=l,this.Condition=h,this.ArithmeticOperator=u,this.Components=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new o0e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.AppliedValue),e.push(this.UnitBasis),e.push(this.ApplicableDate),e.push(this.FixedUntilDate),e.push(this.Category),e.push(this.Condition),e.push(this.ArithmeticOperator),e.push(this.Components),e}},l0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new l0e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},c0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new c0e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},u0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=h,this.BaseCosts=u,this.BaseQuantity=c,this.PredefinedType=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new u0e(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.LongDescription),e.push(this.Usage),e.push(this.BaseCosts),e.push(this.BaseQuantity),e.push(this.PredefinedType),e}},h0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=h,this.ResourceType=u,this.BaseCosts=c,this.BaseQuantity=p,this.PredefinedType=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new h0e(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.Identification),e.push(this.LongDescription),e.push(this.ResourceType),e.push(this.BaseCosts),e.push(this.BaseQuantity),e.push(this.PredefinedType),e}},p0e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Position=i}static FromTape(e,t,i){let r=0,n=i[r++];return new p0e(e,t,n)}ToTape(){let e=[];return e.push(this.Position),e}},d0e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.TreeRootExpression=i}static FromTape(e,t,i){let r=0,n=i[r++];return new d0e(e,t,n)}ToTape(){let e=[];return e.push(this.TreeRootExpression),e}},f0e=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.RelatingMonetaryUnit=n,this.RelatedMonetaryUnit=s,this.ExchangeRate=a,this.RateDateTime=o,this.RateSource=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new f0e(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.RelatingMonetaryUnit),e.push(this.RelatedMonetaryUnit),e.push(this.ExchangeRate),e.push(this.RateDateTime),e.push(this.RateSource),e}},m0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new m0e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},g0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new g0e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},v0e=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new v0e(e,t)}ToTape(){return[]}},y0e=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.BasisSurface=i,this.OuterBoundary=r,this.InnerBoundaries=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new y0e(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.BasisSurface),e.push(this.OuterBoundary),e.push(this.InnerBoundaries),e}},T0e=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.BasisSurface=i,this.Boundaries=r,this.ImplicitOuter=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new T0e(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.BasisSurface),e.push(this.Boundaries),e.push(this.ImplicitOuter),e}},E0e=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.StartPoint=i,this.StartDirection=r,this.SegmentLength=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new E0e(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.StartPoint),e.push(this.StartDirection),e.push(this.SegmentLength),e}},b0e=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.CurveFont=r,this.CurveWidth=n,this.CurveColour=s,this.ModelOrDraughting=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new b0e(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.CurveFont),e.push(this.CurveWidth),e.push(this.CurveColour),e.push(this.ModelOrDraughting),e}},x0e=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Name=i,this.PatternList=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new x0e(e,t,n,s)}ToTape(){let e=[];return e.push(this.Name),e.push(this.PatternList),e}},I0e=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Name=i,this.CurveFont=r,this.CurveFontScaling=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new I0e(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Name),e.push(this.CurveFont),e.push(this.CurveFontScaling),e}},_0e=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.VisibleSegmentLength=i,this.InvisibleSegmentLength=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new _0e(e,t,n,s)}ToTape(){let e=[];return e.push(this.VisibleSegmentLength),e.push(this.InvisibleSegmentLength),e}},S0e=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Position=i,this.Radius=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new S0e(e,t,n,s)}ToTape(){let e=[];return e.push(this.Position),e.push(this.Radius),e}},w0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new w0e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},R0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new R0e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},M0e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new M0e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},D0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new D0e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},C0e=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.ParentProfile=n,this.Operator=s,this.Label=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new C0e(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.ParentProfile),e.push(this.Operator),e.push(this.Label),e}},A0e=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Elements=i,this.UnitType=r,this.UserDefinedType=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new A0e(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Elements),e.push(this.UnitType),e.push(this.UserDefinedType),e}},O0e=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Unit=i,this.Exponent=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new O0e(e,t,n,s)}ToTape(){let e=[];return e.push(this.Unit),e.push(this.Exponent),e}},P0e=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.LengthExponent=i,this.MassExponent=r,this.TimeExponent=n,this.ElectricCurrentExponent=s,this.ThermodynamicTemperatureExponent=a,this.AmountOfSubstanceExponent=o,this.LuminousIntensityExponent=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new P0e(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.LengthExponent),e.push(this.MassExponent),e.push(this.TimeExponent),e.push(this.ElectricCurrentExponent),e.push(this.ThermodynamicTemperatureExponent),e.push(this.AmountOfSubstanceExponent),e.push(this.LuminousIntensityExponent),e}},N0e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.DirectionRatios=i}static FromTape(e,t,i){let r=0,n=i[r++];return new N0e(e,t,n)}ToTape(){let e=[];return e.push(this.DirectionRatios),e}},L0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new L0e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},F0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new F0e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},H0e=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.DistanceAlong=i,this.OffsetLateral=r,this.OffsetVertical=n,this.OffsetLongitudinal=s,this.AlongHorizontal=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new H0e(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.DistanceAlong),e.push(this.OffsetLateral),e.push(this.OffsetVertical),e.push(this.OffsetLongitudinal),e.push(this.AlongHorizontal),e}},U0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new U0e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},B0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new B0e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},k0e=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.LongName=o,this.PredefinedType=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new k0e(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.LongName),e.push(this.PredefinedType),e}},G0e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new G0e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},V0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new V0e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},z0e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new z0e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},j0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new j0e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},W0e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new W0e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},q0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new q0e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},Y0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.FlowDirection=h,this.PredefinedType=u,this.SystemType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Y0e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.FlowDirection),e.push(this.PredefinedType),e.push(this.SystemType),e}},X0e=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.LongName=o,this.PredefinedType=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new X0e(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.LongName),e.push(this.PredefinedType),e}},$0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v){this.expressID=e,this.type=t,this.Identification=i,this.Name=r,this.Description=n,this.Location=s,this.Purpose=a,this.IntendedUse=o,this.Scope=l,this.Revision=h,this.DocumentOwner=u,this.Editors=c,this.CreationTime=p,this.LastRevisionTime=d,this.ElectronicFormat=f,this.ValidFrom=m,this.ValidUntil=g,this.Confidentiality=y,this.Status=v}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++],v=i[r++],T=i[r++],x=i[r++];return new $0e(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T,x)}ToTape(){let e=[];return e.push(this.Identification),e.push(this.Name),e.push(this.Description),e.push(this.Location),e.push(this.Purpose),e.push(this.IntendedUse),e.push(this.Scope),e.push(this.Revision),e.push(this.DocumentOwner),e.push(this.Editors),e.push(this.CreationTime),e.push(this.LastRevisionTime),e.push(this.ElectronicFormat),e.push(this.ValidFrom),e.push(this.ValidUntil),e.push(this.Confidentiality),e.push(this.Status),e}},K0e=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.RelatingDocument=n,this.RelatedDocuments=s,this.RelationshipType=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new K0e(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.RelatingDocument),e.push(this.RelatedDocuments),e.push(this.RelationshipType),e}},Z0e=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Location=i,this.Identification=r,this.Name=n,this.Description=s,this.ReferencedDocument=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Z0e(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Location),e.push(this.Identification),e.push(this.Name),e.push(this.Description),e.push(this.ReferencedDocument),e}},J0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.OverallHeight=u,this.OverallWidth=c,this.PredefinedType=p,this.OperationType=d,this.UserDefinedOperationType=f}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++];return new J0e(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.OverallHeight),e.push(this.OverallWidth),e.push(this.PredefinedType),e.push(this.OperationType),e.push(this.UserDefinedOperationType),e}},Q0e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.LiningDepth=a,this.LiningThickness=o,this.ThresholdDepth=l,this.ThresholdThickness=h,this.TransomThickness=u,this.TransomOffset=c,this.LiningOffset=p,this.ThresholdOffset=d,this.CasingThickness=f,this.CasingDepth=m,this.ShapeAspectStyle=g,this.LiningToPanelOffsetX=y,this.LiningToPanelOffsetY=v}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++],v=i[r++],T=i[r++],x=i[r++];return new Q0e(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T,x)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.LiningDepth),e.push(this.LiningThickness),e.push(this.ThresholdDepth),e.push(this.ThresholdThickness),e.push(this.TransomThickness),e.push(this.TransomOffset),e.push(this.LiningOffset),e.push(this.ThresholdOffset),e.push(this.CasingThickness),e.push(this.CasingDepth),e.push(this.ShapeAspectStyle),e.push(this.LiningToPanelOffsetX),e.push(this.LiningToPanelOffsetY),e}},eve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.PanelDepth=a,this.PanelOperation=o,this.PanelWidth=l,this.PanelPosition=h,this.ShapeAspectStyle=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new eve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.PanelDepth),e.push(this.PanelOperation),e.push(this.PanelWidth),e.push(this.PanelPosition),e.push(this.ShapeAspectStyle),e}},tve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.OverallHeight=u,this.OverallWidth=c,this.PredefinedType=p,this.OperationType=d,this.UserDefinedOperationType=f}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++];return new tve(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.OverallHeight),e.push(this.OverallWidth),e.push(this.PredefinedType),e.push(this.OperationType),e.push(this.UserDefinedOperationType),e}},rve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.OperationType=u,this.ConstructionType=c,this.ParameterTakesPrecedence=p,this.Sizeable=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new rve(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.OperationType),e.push(this.ConstructionType),e.push(this.ParameterTakesPrecedence),e.push(this.Sizeable),e}},ive=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c,this.OperationType=p,this.ParameterTakesPrecedence=d,this.UserDefinedOperationType=f}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++];return new ive(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e.push(this.OperationType),e.push(this.ParameterTakesPrecedence),e.push(this.UserDefinedOperationType),e}},nve=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Name=i}static FromTape(e,t,i){let r=0,n=i[r++];return new nve(e,t,n)}ToTape(){let e=[];return e.push(this.Name),e}},sve=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Name=i}static FromTape(e,t,i){let r=0,n=i[r++];return new sve(e,t,n)}ToTape(){let e=[];return e.push(this.Name),e}},ave=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new ave(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},ove=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new ove(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},lve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new lve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},cve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new cve(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},uve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new uve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},hve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new hve(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},pve=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.EdgeStart=i,this.EdgeEnd=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new pve(e,t,n,s)}ToTape(){let e=[];return e.push(this.EdgeStart),e.push(this.EdgeEnd),e}},dve=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.EdgeStart=i,this.EdgeEnd=r,this.EdgeGeometry=n,this.SameSense=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new dve(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.EdgeStart),e.push(this.EdgeEnd),e.push(this.EdgeGeometry),e.push(this.SameSense),e}},fve=class{constructor(e,t,i){this.expressID=e,this.type=t,this.EdgeList=i}static FromTape(e,t,i){let r=0,n=i[r++];return new fve(e,t,n)}ToTape(){let e=[];return e.push(this.EdgeList),e}},mve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new mve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},gve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new gve(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},vve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new vve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},yve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new yve(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Tve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Tve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Eve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Eve(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},bve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new bve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},xve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new xve(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Ive=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Ive(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},_ve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new _ve(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Sve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Sve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},wve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new wve(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Rve=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Rve(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},Mve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.AssemblyPlace=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Mve(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.AssemblyPlace),e.push(this.PredefinedType),e}},Dve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Dve(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Cve=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Cve(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},Ave=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Ave(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},Ove=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.MethodOfMeasurement=a,this.Quantities=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Ove(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.MethodOfMeasurement),e.push(this.Quantities),e}},Pve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Pve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},Nve=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Position=i}static FromTape(e,t,i){let r=0,n=i[r++];return new Nve(e,t,n)}ToTape(){let e=[];return e.push(this.Position),e}},Lve=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Position=i,this.SemiAxis1=r,this.SemiAxis2=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new Lve(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Position),e.push(this.SemiAxis1),e.push(this.SemiAxis2),e}},Fve=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.SemiAxis1=s,this.SemiAxis2=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Fve(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.SemiAxis1),e.push(this.SemiAxis2),e}},Hve=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Hve(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},Uve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Uve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},Bve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Bve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},kve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new kve(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Gve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Gve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Vve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Vve(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},zve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new zve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},jve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new jve(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Wve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.PredefinedType=h,this.EventTriggerType=u,this.UserDefinedEventTriggerType=c,this.EventOccurenceTime=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new Wve(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.LongDescription),e.push(this.PredefinedType),e.push(this.EventTriggerType),e.push(this.UserDefinedEventTriggerType),e.push(this.EventOccurenceTime),e}},qve=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Name=i,this.DataOrigin=r,this.UserDefinedDataOrigin=n,this.ActualDate=s,this.EarlyDate=a,this.LateDate=o,this.ScheduleDate=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new qve(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Name),e.push(this.DataOrigin),e.push(this.UserDefinedDataOrigin),e.push(this.ActualDate),e.push(this.EarlyDate),e.push(this.LateDate),e.push(this.ScheduleDate),e}},Yve=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=h,this.ProcessType=u,this.PredefinedType=c,this.EventTriggerType=p,this.UserDefinedEventTriggerType=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new Yve(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.Identification),e.push(this.LongDescription),e.push(this.ProcessType),e.push(this.PredefinedType),e.push(this.EventTriggerType),e.push(this.UserDefinedEventTriggerType),e}},Xve=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Properties=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new Xve(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Properties),e}},$ve=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new $ve(e,t)}ToTape(){return[]}},Kve=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Location=i,this.Identification=r,this.Name=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new Kve(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Location),e.push(this.Identification),e.push(this.Name),e}},Zve=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.RelatingReference=n,this.RelatedResourceObjects=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new Zve(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.RelatingReference),e.push(this.RelatedResourceObjects),e}},Jve=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Jve(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.LongName),e.push(this.PredefinedType),e}},Qve=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Qve(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.LongName),e}},eye=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Location=i,this.Identification=r,this.Name=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new eye(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Location),e.push(this.Identification),e.push(this.Name),e}},tye=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Location=i,this.Identification=r,this.Name=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new tye(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Location),e.push(this.Identification),e.push(this.Name),e}},rye=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Location=i,this.Identification=r,this.Name=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new rye(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Location),e.push(this.Identification),e.push(this.Name),e}},iye=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.SweptArea=i,this.Position=r,this.ExtrudedDirection=n,this.Depth=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new iye(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.SweptArea),e.push(this.Position),e.push(this.ExtrudedDirection),e.push(this.Depth),e}},nye=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.SweptArea=i,this.Position=r,this.ExtrudedDirection=n,this.Depth=s,this.EndSweptArea=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new nye(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.SweptArea),e.push(this.Position),e.push(this.ExtrudedDirection),e.push(this.Depth),e.push(this.EndSweptArea),e}},sye=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Bounds=i}static FromTape(e,t,i){let r=0,n=i[r++];return new sye(e,t,n)}ToTape(){let e=[];return e.push(this.Bounds),e}},aye=class{constructor(e,t,i){this.expressID=e,this.type=t,this.FbsmFaces=i}static FromTape(e,t,i){let r=0,n=i[r++];return new aye(e,t,n)}ToTape(){let e=[];return e.push(this.FbsmFaces),e}},oye=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Bound=i,this.Orientation=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new oye(e,t,n,s)}ToTape(){let e=[];return e.push(this.Bound),e.push(this.Orientation),e}},lye=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Bound=i,this.Orientation=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new lye(e,t,n,s)}ToTape(){let e=[];return e.push(this.Bound),e.push(this.Orientation),e}},cye=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Bounds=i,this.FaceSurface=r,this.SameSense=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new cye(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Bounds),e.push(this.FaceSurface),e.push(this.SameSense),e}},uye=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Outer=i}static FromTape(e,t,i){let r=0,n=i[r++];return new uye(e,t,n)}ToTape(){let e=[];return e.push(this.Outer),e}},hye=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Outer=i,this.Voids=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new hye(e,t,n,s)}ToTape(){let e=[];return e.push(this.Outer),e.push(this.Voids),e}},pye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=h,this.CompositionType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new pye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.LongName),e.push(this.CompositionType),e}},dye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=h,this.CompositionType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new dye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.LongName),e.push(this.CompositionType),e}},fye=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Name=i,this.TensionFailureX=r,this.TensionFailureY=n,this.TensionFailureZ=s,this.CompressionFailureX=a,this.CompressionFailureY=o,this.CompressionFailureZ=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new fye(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Name),e.push(this.TensionFailureX),e.push(this.TensionFailureY),e.push(this.TensionFailureZ),e.push(this.CompressionFailureX),e.push(this.CompressionFailureY),e.push(this.CompressionFailureZ),e}},mye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new mye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},gye=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new gye(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},vye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new vye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},yye=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new yye(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Tye=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Tye(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},Eye=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Eye(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},bye=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new bye(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},xye=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Name=i,this.FillStyles=r,this.ModelorDraughting=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new xye(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Name),e.push(this.FillStyles),e.push(this.ModelorDraughting),e}},Iye=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.HatchLineAppearance=i,this.StartOfNextHatchLine=r,this.PointOfReferenceHatchLine=n,this.PatternStart=s,this.HatchLineAngle=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Iye(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.HatchLineAppearance),e.push(this.StartOfNextHatchLine),e.push(this.PointOfReferenceHatchLine),e.push(this.PatternStart),e.push(this.HatchLineAngle),e}},_ye=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.TilingPattern=i,this.Tiles=r,this.TilingScale=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new _ye(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.TilingPattern),e.push(this.Tiles),e.push(this.TilingScale),e}},Sye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Sye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},wye=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new wye(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Rye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Rye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Mye=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Mye(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Dye=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.SweptArea=i,this.Position=r,this.Directrix=n,this.StartParam=s,this.EndParam=a,this.FixedReference=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Dye(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.SweptArea),e.push(this.Position),e.push(this.Directrix),e.push(this.StartParam),e.push(this.EndParam),e.push(this.FixedReference),e}},Cye=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Cye(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},Aye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Aye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},Oye=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Oye(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},Pye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Pye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},Nye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Nye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Lye=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Lye(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Fye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Fye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Hye=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Hye(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Uye=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Uye(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},Bye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Bye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},kye=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new kye(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},Gye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Gye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},Vye=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Vye(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},zye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new zye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},jye=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new jye(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},Wye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Wye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},qye=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new qye(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},Yye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Yye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},Xye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Xye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},$ye=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new $ye(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Kye=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Kye(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},Zye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Zye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},Jye=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Jye(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Qye=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.AssemblyPlace=c,this.PredefinedType=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new Qye(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.AssemblyPlace),e.push(this.PredefinedType),e}},eTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new eTe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},tTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new tTe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},rTe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Elements=i}static FromTape(e,t,i){let r=0,n=i[r++];return new rTe(e,t,n)}ToTape(){let e=[];return e.push(this.Elements),e}},iTe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.ContextIdentifier=i,this.ContextType=r,this.CoordinateSpaceDimension=n,this.Precision=s,this.WorldCoordinateSystem=a,this.TrueNorth=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new iTe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.ContextIdentifier),e.push(this.ContextType),e.push(this.CoordinateSpaceDimension),e.push(this.Precision),e.push(this.WorldCoordinateSystem),e.push(this.TrueNorth),e}},nTe=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new nTe(e,t)}ToTape(){return[]}},sTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.ContextIdentifier=i,this.ContextType=r,this.CoordinateSpaceDimension=n,this.Precision=s,this.WorldCoordinateSystem=a,this.TrueNorth=o,this.ParentContext=l,this.TargetScale=h,this.TargetView=u,this.UserDefinedTargetView=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new sTe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.ContextIdentifier),e.push(this.ContextType),e.push(this.CoordinateSpaceDimension),e.push(this.Precision),e.push(this.WorldCoordinateSystem),e.push(this.TrueNorth),e.push(this.ParentContext),e.push(this.TargetScale),e.push(this.TargetView),e.push(this.UserDefinedTargetView),e}},aTe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Elements=i}static FromTape(e,t,i){let r=0,n=i[r++];return new aTe(e,t,n)}ToTape(){let e=[];return e.push(this.Elements),e}},oTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.UAxes=h,this.VAxes=u,this.WAxes=c,this.PredefinedType=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new oTe(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.UAxes),e.push(this.VAxes),e.push(this.WAxes),e.push(this.PredefinedType),e}},lTe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.AxisTag=i,this.AxisCurve=r,this.SameSense=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new lTe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.AxisTag),e.push(this.AxisCurve),e.push(this.SameSense),e}},cTe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.PlacementRelTo=i,this.PlacementLocation=r,this.PlacementRefDirection=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new cTe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.PlacementRelTo),e.push(this.PlacementLocation),e.push(this.PlacementRefDirection),e}},uTe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new uTe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e}},hTe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.BaseSurface=i,this.AgreementFlag=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new hTe(e,t,n,s)}ToTape(){let e=[];return e.push(this.BaseSurface),e.push(this.AgreementFlag),e}},pTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new pTe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},dTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new dTe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},fTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new fTe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},mTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new mTe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},gTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.OverallWidth=s,this.OverallDepth=a,this.WebThickness=o,this.FlangeThickness=l,this.FilletRadius=h,this.FlangeEdgeRadius=u,this.FlangeSlope=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new gTe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.OverallWidth),e.push(this.OverallDepth),e.push(this.WebThickness),e.push(this.FlangeThickness),e.push(this.FilletRadius),e.push(this.FlangeEdgeRadius),e.push(this.FlangeSlope),e}},vTe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.RepeatS=i,this.RepeatT=r,this.Mode=n,this.TextureTransform=s,this.Parameter=a,this.URLReference=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new vTe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.RepeatS),e.push(this.RepeatT),e.push(this.Mode),e.push(this.TextureTransform),e.push(this.Parameter),e.push(this.URLReference),e}},yTe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.MappedTo=i,this.Opacity=r,this.Colours=n,this.ColourIndex=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new yTe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.MappedTo),e.push(this.Opacity),e.push(this.Colours),e.push(this.ColourIndex),e}},TTe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Points=i,this.Segments=r,this.SelfIntersect=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new TTe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Points),e.push(this.Segments),e.push(this.SelfIntersect),e}},ETe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.CoordIndex=i}static FromTape(e,t,i){let r=0,n=i[r++];return new ETe(e,t,n)}ToTape(){let e=[];return e.push(this.CoordIndex),e}},bTe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.CoordIndex=i,this.InnerCoordIndices=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new bTe(e,t,n,s)}ToTape(){let e=[];return e.push(this.CoordIndex),e.push(this.InnerCoordIndices),e}},xTe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Maps=i,this.MappedTo=r,this.TexCoords=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new xTe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Maps),e.push(this.MappedTo),e.push(this.TexCoords),e}},ITe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Maps=i,this.MappedTo=r,this.TexCoords=n,this.TexCoordIndex=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new ITe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Maps),e.push(this.MappedTo),e.push(this.TexCoords),e.push(this.TexCoordIndex),e}},_Te=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new _Te(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},STe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new STe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},wTe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Curve3D=i,this.AssociatedGeometry=r,this.MasterRepresentation=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new wTe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Curve3D),e.push(this.AssociatedGeometry),e.push(this.MasterRepresentation),e}},RTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.PredefinedType=o,this.Jurisdiction=l,this.ResponsiblePersons=h,this.LastUpdateDate=u,this.CurrentValue=c,this.OriginalValue=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new RTe(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.PredefinedType),e.push(this.Jurisdiction),e.push(this.ResponsiblePersons),e.push(this.LastUpdateDate),e.push(this.CurrentValue),e.push(this.OriginalValue),e}},MTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.StartTime=n,this.EndTime=s,this.TimeSeriesDataType=a,this.DataOrigin=o,this.UserDefinedDataOrigin=l,this.Unit=h,this.Values=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new MTe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.StartTime),e.push(this.EndTime),e.push(this.TimeSeriesDataType),e.push(this.DataOrigin),e.push(this.UserDefinedDataOrigin),e.push(this.Unit),e.push(this.Values),e}},DTe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.TimeStamp=i,this.ListValues=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new DTe(e,t,n,s)}ToTape(){let e=[];return e.push(this.TimeStamp),e.push(this.ListValues),e}},CTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new CTe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},ATe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new ATe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},OTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.Depth=s,this.Width=a,this.Thickness=o,this.FilletRadius=l,this.EdgeRadius=h,this.LegSlope=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new OTe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.Depth),e.push(this.Width),e.push(this.Thickness),e.push(this.FilletRadius),e.push(this.EdgeRadius),e.push(this.LegSlope),e}},PTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=h,this.BaseCosts=u,this.BaseQuantity=c,this.PredefinedType=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new PTe(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.LongDescription),e.push(this.Usage),e.push(this.BaseCosts),e.push(this.BaseQuantity),e.push(this.PredefinedType),e}},NTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=h,this.ResourceType=u,this.BaseCosts=c,this.BaseQuantity=p,this.PredefinedType=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new NTe(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.Identification),e.push(this.LongDescription),e.push(this.ResourceType),e.push(this.BaseCosts),e.push(this.BaseQuantity),e.push(this.PredefinedType),e}},LTe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.DataOrigin=r,this.UserDefinedDataOrigin=n,this.LagValue=s,this.DurationType=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new LTe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.DataOrigin),e.push(this.UserDefinedDataOrigin),e.push(this.LagValue),e.push(this.DurationType),e}},FTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new FTe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},HTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new HTe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},UTe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.Name=i,this.Version=r,this.Publisher=n,this.VersionDate=s,this.Location=a,this.Description=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new UTe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Version),e.push(this.Publisher),e.push(this.VersionDate),e.push(this.Location),e.push(this.Description),e}},BTe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.Location=i,this.Identification=r,this.Name=n,this.Description=s,this.Language=a,this.ReferencedLibrary=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new BTe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.Location),e.push(this.Identification),e.push(this.Name),e.push(this.Description),e.push(this.Language),e.push(this.ReferencedLibrary),e}},kTe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.MainPlaneAngle=i,this.SecondaryPlaneAngle=r,this.LuminousIntensity=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new kTe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.MainPlaneAngle),e.push(this.SecondaryPlaneAngle),e.push(this.LuminousIntensity),e}},GTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new GTe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},VTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new VTe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},zTe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.LightDistributionCurve=i,this.DistributionData=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new zTe(e,t,n,s)}ToTape(){let e=[];return e.push(this.LightDistributionCurve),e.push(this.DistributionData),e}},jTe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.LightColour=r,this.AmbientIntensity=n,this.Intensity=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new jTe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.LightColour),e.push(this.AmbientIntensity),e.push(this.Intensity),e}},WTe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.LightColour=r,this.AmbientIntensity=n,this.Intensity=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new WTe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.LightColour),e.push(this.AmbientIntensity),e.push(this.Intensity),e}},qTe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.LightColour=r,this.AmbientIntensity=n,this.Intensity=s,this.Orientation=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new qTe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.LightColour),e.push(this.AmbientIntensity),e.push(this.Intensity),e.push(this.Orientation),e}},YTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.Name=i,this.LightColour=r,this.AmbientIntensity=n,this.Intensity=s,this.Position=a,this.ColourAppearance=o,this.ColourTemperature=l,this.LuminousFlux=h,this.LightEmissionSource=u,this.LightDistributionDataSource=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new YTe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.Name),e.push(this.LightColour),e.push(this.AmbientIntensity),e.push(this.Intensity),e.push(this.Position),e.push(this.ColourAppearance),e.push(this.ColourTemperature),e.push(this.LuminousFlux),e.push(this.LightEmissionSource),e.push(this.LightDistributionDataSource),e}},XTe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.Name=i,this.LightColour=r,this.AmbientIntensity=n,this.Intensity=s,this.Position=a,this.Radius=o,this.ConstantAttenuation=l,this.DistanceAttenuation=h,this.QuadricAttenuation=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new XTe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.Name),e.push(this.LightColour),e.push(this.AmbientIntensity),e.push(this.Intensity),e.push(this.Position),e.push(this.Radius),e.push(this.ConstantAttenuation),e.push(this.DistanceAttenuation),e.push(this.QuadricAttenuation),e}},$Te=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f){this.expressID=e,this.type=t,this.Name=i,this.LightColour=r,this.AmbientIntensity=n,this.Intensity=s,this.Position=a,this.Radius=o,this.ConstantAttenuation=l,this.DistanceAttenuation=h,this.QuadricAttenuation=u,this.Orientation=c,this.ConcentrationExponent=p,this.SpreadAngle=d,this.BeamWidthAngle=f}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++];return new $Te(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g)}ToTape(){let e=[];return e.push(this.Name),e.push(this.LightColour),e.push(this.AmbientIntensity),e.push(this.Intensity),e.push(this.Position),e.push(this.Radius),e.push(this.ConstantAttenuation),e.push(this.DistanceAttenuation),e.push(this.QuadricAttenuation),e.push(this.Orientation),e.push(this.ConcentrationExponent),e.push(this.SpreadAngle),e.push(this.BeamWidthAngle),e}},KTe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Pnt=i,this.Dir=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new KTe(e,t,n,s)}ToTape(){let e=[];return e.push(this.Pnt),e.push(this.Dir),e}},ZTe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.StartPoint=i,this.StartDirection=r,this.SegmentLength=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new ZTe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.StartPoint),e.push(this.StartDirection),e.push(this.SegmentLength),e}},JTe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.PlacementRelTo=i,this.PlacementMeasuredAlong=r,this.Distance=n,this.Orientation=s,this.CartesianPosition=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new JTe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.PlacementRelTo),e.push(this.PlacementMeasuredAlong),e.push(this.Distance),e.push(this.Orientation),e.push(this.CartesianPosition),e}},QTe=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Axis=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new QTe(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Axis),e}},eEe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.PlacementRelTo=i,this.RelativePlacement=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new eEe(e,t,n,s)}ToTape(){let e=[];return e.push(this.PlacementRelTo),e.push(this.RelativePlacement),e}},tEe=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new tEe(e,t)}ToTape(){return[]}},rEe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Outer=i}static FromTape(e,t,i){let r=0,n=i[r++];return new rEe(e,t,n)}ToTape(){let e=[];return e.push(this.Outer),e}},iEe=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.SourceCRS=i,this.TargetCRS=r,this.Eastings=n,this.Northings=s,this.OrthogonalHeight=a,this.XAxisAbscissa=o,this.XAxisOrdinate=l,this.Scale=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new iEe(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.SourceCRS),e.push(this.TargetCRS),e.push(this.Eastings),e.push(this.Northings),e.push(this.OrthogonalHeight),e.push(this.XAxisAbscissa),e.push(this.XAxisOrdinate),e.push(this.Scale),e}},nEe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.MappingSource=i,this.MappingTarget=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new nEe(e,t,n,s)}ToTape(){let e=[];return e.push(this.MappingSource),e.push(this.MappingTarget),e}},sEe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Category=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new sEe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Category),e}},aEe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.MaterialClassifications=i,this.ClassifiedMaterial=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new aEe(e,t,n,s)}ToTape(){let e=[];return e.push(this.MaterialClassifications),e.push(this.ClassifiedMaterial),e}},oEe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Material=n,this.Fraction=s,this.Category=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new oEe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Material),e.push(this.Fraction),e.push(this.Category),e}},lEe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.MaterialConstituents=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new lEe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.MaterialConstituents),e}},cEe=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new cEe(e,t)}ToTape(){return[]}},uEe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Representations=n,this.RepresentedMaterial=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new uEe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Representations),e.push(this.RepresentedMaterial),e}},hEe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Material=i,this.LayerThickness=r,this.IsVentilated=n,this.Name=s,this.Description=a,this.Category=o,this.Priority=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new hEe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Material),e.push(this.LayerThickness),e.push(this.IsVentilated),e.push(this.Name),e.push(this.Description),e.push(this.Category),e.push(this.Priority),e}},pEe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.MaterialLayers=i,this.LayerSetName=r,this.Description=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new pEe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.MaterialLayers),e.push(this.LayerSetName),e.push(this.Description),e}},dEe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.ForLayerSet=i,this.LayerSetDirection=r,this.DirectionSense=n,this.OffsetFromReferenceLine=s,this.ReferenceExtent=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new dEe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.ForLayerSet),e.push(this.LayerSetDirection),e.push(this.DirectionSense),e.push(this.OffsetFromReferenceLine),e.push(this.ReferenceExtent),e}},fEe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.Material=i,this.LayerThickness=r,this.IsVentilated=n,this.Name=s,this.Description=a,this.Category=o,this.Priority=l,this.OffsetDirection=h,this.OffsetValues=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new fEe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.Material),e.push(this.LayerThickness),e.push(this.IsVentilated),e.push(this.Name),e.push(this.Description),e.push(this.Category),e.push(this.Priority),e.push(this.OffsetDirection),e.push(this.OffsetValues),e}},mEe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Materials=i}static FromTape(e,t,i){let r=0,n=i[r++];return new mEe(e,t,n)}ToTape(){let e=[];return e.push(this.Materials),e}},gEe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Material=n,this.Profile=s,this.Priority=a,this.Category=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new gEe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Material),e.push(this.Profile),e.push(this.Priority),e.push(this.Category),e}},vEe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.MaterialProfiles=n,this.CompositeProfile=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new vEe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.MaterialProfiles),e.push(this.CompositeProfile),e}},yEe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.ForProfileSet=i,this.CardinalPoint=r,this.ReferenceExtent=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new yEe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.ForProfileSet),e.push(this.CardinalPoint),e.push(this.ReferenceExtent),e}},TEe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.ForProfileSet=i,this.CardinalPoint=r,this.ReferenceExtent=n,this.ForProfileEndSet=s,this.CardinalEndPoint=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new TEe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.ForProfileSet),e.push(this.CardinalPoint),e.push(this.ReferenceExtent),e.push(this.ForProfileEndSet),e.push(this.CardinalEndPoint),e}},EEe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Material=n,this.Profile=s,this.Priority=a,this.Category=o,this.OffsetValues=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new EEe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Material),e.push(this.Profile),e.push(this.Priority),e.push(this.Category),e.push(this.OffsetValues),e}},bEe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Properties=n,this.Material=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new bEe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Properties),e.push(this.Material),e}},xEe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.RelatingMaterial=n,this.RelatedMaterials=s,this.Expression=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new xEe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.RelatingMaterial),e.push(this.RelatedMaterials),e.push(this.Expression),e}},IEe=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new IEe(e,t)}ToTape(){return[]}},_Ee=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.ValueComponent=i,this.UnitComponent=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new _Ee(e,t,n,s)}ToTape(){let e=[];return e.push(this.ValueComponent),e.push(this.UnitComponent),e}},SEe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.NominalDiameter=u,this.NominalLength=c,this.PredefinedType=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new SEe(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.NominalDiameter),e.push(this.NominalLength),e.push(this.PredefinedType),e}},wEe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c,this.NominalDiameter=p,this.NominalLength=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new wEe(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e.push(this.NominalDiameter),e.push(this.NominalLength),e}},REe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new REe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},MEe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new MEe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},DEe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new DEe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},CEe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new CEe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},AEe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new AEe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},OEe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.ConstraintGrade=n,this.ConstraintSource=s,this.CreatingActor=a,this.CreationTime=o,this.UserDefinedGrade=l,this.Benchmark=h,this.ValueSource=u,this.DataValue=c,this.ReferencePath=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new OEe(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.ConstraintGrade),e.push(this.ConstraintSource),e.push(this.CreatingActor),e.push(this.CreationTime),e.push(this.UserDefinedGrade),e.push(this.Benchmark),e.push(this.ValueSource),e.push(this.DataValue),e.push(this.ReferencePath),e}},PEe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.ParentProfile=n,this.Operator=s,this.Label=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new PEe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.ParentProfile),e.push(this.Operator),e.push(this.Label),e}},NEe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Currency=i}static FromTape(e,t,i){let r=0,n=i[r++];return new NEe(e,t,n)}ToTape(){let e=[];return e.push(this.Currency),e}},LEe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new LEe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},FEe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new FEe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},HEe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Dimensions=i,this.UnitType=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new HEe(e,t,n,s)}ToTape(){let e=[];return e.push(this.Dimensions),e.push(this.UnitType),e}},UEe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new UEe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e}},BEe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new BEe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e}},kEe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.PlacementRelTo=i}static FromTape(e,t,i){let r=0,n=i[r++];return new kEe(e,t,n)}ToTape(){let e=[];return e.push(this.PlacementRelTo),e}},GEe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.ConstraintGrade=n,this.ConstraintSource=s,this.CreatingActor=a,this.CreationTime=o,this.UserDefinedGrade=l,this.BenchmarkValues=h,this.LogicalAggregator=u,this.ObjectiveQualifier=c,this.UserDefinedQualifier=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new GEe(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.ConstraintGrade),e.push(this.ConstraintSource),e.push(this.CreatingActor),e.push(this.CreationTime),e.push(this.UserDefinedGrade),e.push(this.BenchmarkValues),e.push(this.LogicalAggregator),e.push(this.ObjectiveQualifier),e.push(this.UserDefinedQualifier),e}},VEe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.TheActor=o,this.PredefinedType=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new VEe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.TheActor),e.push(this.PredefinedType),e}},zEe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.BasisCurve=i}static FromTape(e,t,i){let r=0,n=i[r++];return new zEe(e,t,n)}ToTape(){let e=[];return e.push(this.BasisCurve),e}},jEe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.BasisCurve=i,this.Distance=r,this.SelfIntersect=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new jEe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.BasisCurve),e.push(this.Distance),e.push(this.SelfIntersect),e}},WEe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.BasisCurve=i,this.Distance=r,this.SelfIntersect=n,this.RefDirection=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new WEe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.BasisCurve),e.push(this.Distance),e.push(this.SelfIntersect),e.push(this.RefDirection),e}},qEe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.BasisCurve=i,this.OffsetValues=r,this.Tag=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new qEe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.BasisCurve),e.push(this.OffsetValues),e.push(this.Tag),e}},YEe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.CfsFaces=i}static FromTape(e,t,i){let r=0,n=i[r++];return new YEe(e,t,n)}ToTape(){let e=[];return e.push(this.CfsFaces),e}},XEe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new XEe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},$Ee=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new $Ee(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},KEe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Identification=i,this.Name=r,this.Description=n,this.Roles=s,this.Addresses=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new KEe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Identification),e.push(this.Name),e.push(this.Description),e.push(this.Roles),e.push(this.Addresses),e}},ZEe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.RelatingOrganization=n,this.RelatedOrganizations=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new ZEe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.RelatingOrganization),e.push(this.RelatedOrganizations),e}},JEe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.LateralAxisDirection=i,this.VerticalAxisDirection=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new JEe(e,t,n,s)}ToTape(){let e=[];return e.push(this.LateralAxisDirection),e.push(this.VerticalAxisDirection),e}},QEe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.EdgeStart=i,this.EdgeEnd=r,this.EdgeElement=n,this.Orientation=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new QEe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.EdgeStart),e.push(this.EdgeEnd),e.push(this.EdgeElement),e.push(this.Orientation),e}},e1e=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Segments=i,this.SelfIntersect=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new e1e(e,t,n,s)}ToTape(){let e=[];return e.push(this.Segments),e.push(this.SelfIntersect),e}},t1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new t1e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},r1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new r1e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},i1e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.OwningUser=i,this.OwningApplication=r,this.State=n,this.ChangeAction=s,this.LastModifiedDate=a,this.LastModifyingUser=o,this.LastModifyingApplication=l,this.CreationDate=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new i1e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.OwningUser),e.push(this.OwningApplication),e.push(this.State),e.push(this.ChangeAction),e.push(this.LastModifiedDate),e.push(this.LastModifyingUser),e.push(this.LastModifyingApplication),e.push(this.CreationDate),e}},n1e=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new n1e(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e}},s1e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.EdgeList=i}static FromTape(e,t,i){let r=0,n=i[r++];return new s1e(e,t,n)}ToTape(){let e=[];return e.push(this.EdgeList),e}},a1e=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.BasisSurface=i,this.ReferenceCurve=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new a1e(e,t,n,s)}ToTape(){let e=[];return e.push(this.BasisSurface),e.push(this.ReferenceCurve),e}},o1e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LifeCyclePhase=l,this.PredefinedType=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new o1e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.LifeCyclePhase),e.push(this.PredefinedType),e}},l1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.OperationType=a,this.PanelPosition=o,this.FrameDepth=l,this.FrameThickness=h,this.ShapeAspectStyle=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new l1e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.OperationType),e.push(this.PanelPosition),e.push(this.FrameDepth),e.push(this.FrameThickness),e.push(this.ShapeAspectStyle),e}},c1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.PredefinedType=l,this.Status=h,this.LongDescription=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new c1e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.PredefinedType),e.push(this.Status),e.push(this.LongDescription),e}},u1e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.Identification=i,this.FamilyName=r,this.GivenName=n,this.MiddleNames=s,this.PrefixTitles=a,this.SuffixTitles=o,this.Roles=l,this.Addresses=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new u1e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.Identification),e.push(this.FamilyName),e.push(this.GivenName),e.push(this.MiddleNames),e.push(this.PrefixTitles),e.push(this.SuffixTitles),e.push(this.Roles),e.push(this.Addresses),e}},h1e=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.ThePerson=i,this.TheOrganization=r,this.Roles=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new h1e(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.ThePerson),e.push(this.TheOrganization),e.push(this.Roles),e}},p1e=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.HasQuantities=n,this.Discrimination=s,this.Quality=a,this.Usage=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new p1e(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.HasQuantities),e.push(this.Discrimination),e.push(this.Quality),e.push(this.Usage),e}},d1e=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Name=i,this.Description=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new d1e(e,t,n,s)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e}},f1e=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Unit=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new f1e(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Unit),e}},m1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u,this.ConstructionType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new m1e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e.push(this.ConstructionType),e}},g1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new g1e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},v1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new v1e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},y1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new y1e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},T1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new T1e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},E1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new E1e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},b1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.RepeatS=i,this.RepeatT=r,this.Mode=n,this.TextureTransform=s,this.Parameter=a,this.Width=o,this.Height=l,this.ColourComponents=h,this.Pixel=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new b1e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.RepeatS),e.push(this.RepeatT),e.push(this.Mode),e.push(this.TextureTransform),e.push(this.Parameter),e.push(this.Width),e.push(this.Height),e.push(this.ColourComponents),e.push(this.Pixel),e}},x1e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Location=i}static FromTape(e,t,i){let r=0,n=i[r++];return new x1e(e,t,n)}ToTape(){let e=[];return e.push(this.Location),e}},I1e=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.SizeInX=i,this.SizeInY=r,this.Placement=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new I1e(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.SizeInX),e.push(this.SizeInY),e.push(this.Placement),e}},_1e=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.SizeInX=i,this.SizeInY=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new _1e(e,t,n,s)}ToTape(){let e=[];return e.push(this.SizeInX),e.push(this.SizeInY),e}},S1e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Position=i}static FromTape(e,t,i){let r=0,n=i[r++];return new S1e(e,t,n)}ToTape(){let e=[];return e.push(this.Position),e}},w1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new w1e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},R1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new R1e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},M1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new M1e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},D1e=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new D1e(e,t)}ToTape(){return[]}},C1e=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.BasisCurve=i,this.PointParameter=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new C1e(e,t,n,s)}ToTape(){let e=[];return e.push(this.BasisCurve),e.push(this.PointParameter),e}},A1e=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.BasisSurface=i,this.PointParameterU=r,this.PointParameterV=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new A1e(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.BasisSurface),e.push(this.PointParameterU),e.push(this.PointParameterV),e}},O1e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Polygon=i}static FromTape(e,t,i){let r=0,n=i[r++];return new O1e(e,t,n)}ToTape(){let e=[];return e.push(this.Polygon),e}},P1e=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.BaseSurface=i,this.AgreementFlag=r,this.Position=n,this.PolygonalBoundary=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new P1e(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.BaseSurface),e.push(this.AgreementFlag),e.push(this.Position),e.push(this.PolygonalBoundary),e}},N1e=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Coordinates=i,this.Closed=r,this.Faces=n,this.PnIndex=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new N1e(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Coordinates),e.push(this.Closed),e.push(this.Faces),e.push(this.PnIndex),e}},L1e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Points=i}static FromTape(e,t,i){let r=0,n=i[r++];return new L1e(e,t,n)}ToTape(){let e=[];return e.push(this.Points),e}},F1e=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new F1e(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e}},H1e=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new H1e(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e}},U1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.Purpose=i,this.Description=r,this.UserDefinedPurpose=n,this.InternalLocation=s,this.AddressLines=a,this.PostalBox=o,this.Town=l,this.Region=h,this.PostalCode=u,this.Country=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new U1e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.Purpose),e.push(this.Description),e.push(this.UserDefinedPurpose),e.push(this.InternalLocation),e.push(this.AddressLines),e.push(this.PostalBox),e.push(this.Town),e.push(this.Region),e.push(this.PostalCode),e.push(this.Country),e}},B1e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Name=i}static FromTape(e,t,i){let r=0,n=i[r++];return new B1e(e,t,n)}ToTape(){let e=[];return e.push(this.Name),e}},k1e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Name=i}static FromTape(e,t,i){let r=0,n=i[r++];return new k1e(e,t,n)}ToTape(){let e=[];return e.push(this.Name),e}},G1e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Name=i}static FromTape(e,t,i){let r=0,n=i[r++];return new G1e(e,t,n)}ToTape(){let e=[];return e.push(this.Name),e}},V1e=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new V1e(e,t)}ToTape(){return[]}},z1e=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new z1e(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e}},j1e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Name=i}static FromTape(e,t,i){let r=0,n=i[r++];return new j1e(e,t,n)}ToTape(){let e=[];return e.push(this.Name),e}},W1e=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new W1e(e,t)}ToTape(){return[]}},q1e=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.AssignedItems=n,this.Identifier=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new q1e(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.AssignedItems),e.push(this.Identifier),e}},Y1e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.AssignedItems=n,this.Identifier=s,this.LayerOn=a,this.LayerFrozen=o,this.LayerBlocked=l,this.LayerStyles=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Y1e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.AssignedItems),e.push(this.Identifier),e.push(this.LayerOn),e.push(this.LayerFrozen),e.push(this.LayerBlocked),e.push(this.LayerStyles),e}},X1e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Name=i}static FromTape(e,t,i){let r=0,n=i[r++];return new X1e(e,t,n)}ToTape(){let e=[];return e.push(this.Name),e}},$1e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Styles=i}static FromTape(e,t,i){let r=0,n=i[r++];return new $1e(e,t,n)}ToTape(){let e=[];return e.push(this.Styles),e}},K1e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.PredefinedType=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new K1e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.LongDescription),e.push(this.PredefinedType),e}},Z1e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=h,this.ProcessType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Z1e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.Identification),e.push(this.LongDescription),e.push(this.ProcessType),e.push(this.PredefinedType),e}},J1e=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new J1e(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.LongDescription),e}},Q1e=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new Q1e(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e}},ebe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Representations=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new ebe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Representations),e}},tbe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Representations=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new tbe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Representations),e}},rbe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new rbe(e,t,n,s)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e}},ibe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Properties=n,this.ProfileDefinition=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new ibe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Properties),e.push(this.ProfileDefinition),e}},nbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.LongName=o,this.Phase=l,this.RepresentationContexts=h,this.UnitsInContext=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new nbe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.LongName),e.push(this.Phase),e.push(this.RepresentationContexts),e.push(this.UnitsInContext),e}},sbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.LongName=o,this.Phase=l,this.RepresentationContexts=h,this.UnitsInContext=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new sbe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.LongName),e.push(this.Phase),e.push(this.RepresentationContexts),e.push(this.UnitsInContext),e}},abe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.PredefinedType=l,this.Status=h,this.LongDescription=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new abe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.PredefinedType),e.push(this.Status),e.push(this.LongDescription),e}},obe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.GeodeticDatum=n,this.VerticalDatum=s,this.MapProjection=a,this.MapZone=o,this.MapUnit=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new obe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.GeodeticDatum),e.push(this.VerticalDatum),e.push(this.MapProjection),e.push(this.MapZone),e.push(this.MapUnit),e}},lbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new lbe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},cbe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Name=i,this.Description=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new cbe(e,t,n,s)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e}},ube=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new ube(e,t)}ToTape(){return[]}},hbe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.UpperBoundValue=n,this.LowerBoundValue=s,this.Unit=a,this.SetPointValue=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new hbe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.UpperBoundValue),e.push(this.LowerBoundValue),e.push(this.Unit),e.push(this.SetPointValue),e}},pbe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new pbe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e}},dbe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.DependingProperty=n,this.DependantProperty=s,this.Expression=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new dbe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.DependingProperty),e.push(this.DependantProperty),e.push(this.Expression),e}},fbe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.EnumerationValues=n,this.EnumerationReference=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new fbe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.EnumerationValues),e.push(this.EnumerationReference),e}},mbe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Name=i,this.EnumerationValues=r,this.Unit=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new mbe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Name),e.push(this.EnumerationValues),e.push(this.Unit),e}},gbe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.ListValues=n,this.Unit=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new gbe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.ListValues),e.push(this.Unit),e}},vbe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.UsageName=n,this.PropertyReference=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new vbe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.UsageName),e.push(this.PropertyReference),e}},ybe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.HasProperties=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new ybe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.HasProperties),e}},Tbe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new Tbe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e}},Ebe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.TemplateType=a,this.ApplicableEntity=o,this.HasPropertyTemplates=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new Ebe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.TemplateType),e.push(this.ApplicableEntity),e.push(this.HasPropertyTemplates),e}},bbe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.NominalValue=n,this.Unit=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new bbe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.NominalValue),e.push(this.Unit),e}},xbe=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.DefiningValues=n,this.DefinedValues=s,this.Expression=a,this.DefiningUnit=o,this.DefinedUnit=l,this.CurveInterpolation=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new xbe(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.DefiningValues),e.push(this.DefinedValues),e.push(this.Expression),e.push(this.DefiningUnit),e.push(this.DefinedUnit),e.push(this.CurveInterpolation),e}},Ibe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new Ibe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e}},_be=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new _be(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e}},Sbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Sbe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},wbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new wbe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Rbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Rbe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Mbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Mbe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Dbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.ProxyType=h,this.Tag=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Dbe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.ProxyType),e.push(this.Tag),e}},Cbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Cbe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Abe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Abe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Obe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Unit=n,this.AreaValue=s,this.Formula=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Obe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Unit),e.push(this.AreaValue),e.push(this.Formula),e}},Pbe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Unit=n,this.CountValue=s,this.Formula=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Pbe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Unit),e.push(this.CountValue),e.push(this.Formula),e}},Nbe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Unit=n,this.LengthValue=s,this.Formula=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Nbe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Unit),e.push(this.LengthValue),e.push(this.Formula),e}},Lbe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new Lbe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e}},Fbe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Unit=n,this.TimeValue=s,this.Formula=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Fbe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Unit),e.push(this.TimeValue),e.push(this.Formula),e}},Hbe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Unit=n,this.VolumeValue=s,this.Formula=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Hbe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Unit),e.push(this.VolumeValue),e.push(this.Formula),e}},Ube=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.Unit=n,this.WeightValue=s,this.Formula=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Ube(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.Unit),e.push(this.WeightValue),e.push(this.Formula),e}},Bbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Bbe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},kbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new kbe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Gbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Gbe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Vbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Vbe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},zbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new zbe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},jbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new jbe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Wbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.Degree=i,this.ControlPointsList=r,this.CurveForm=n,this.ClosedCurve=s,this.SelfIntersect=a,this.KnotMultiplicities=o,this.Knots=l,this.KnotSpec=h,this.WeightsData=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Wbe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.Degree),e.push(this.ControlPointsList),e.push(this.CurveForm),e.push(this.ClosedCurve),e.push(this.SelfIntersect),e.push(this.KnotMultiplicities),e.push(this.Knots),e.push(this.KnotSpec),e.push(this.WeightsData),e}},qbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f){this.expressID=e,this.type=t,this.UDegree=i,this.VDegree=r,this.ControlPointsList=n,this.SurfaceForm=s,this.UClosed=a,this.VClosed=o,this.SelfIntersect=l,this.UMultiplicities=h,this.VMultiplicities=u,this.UKnots=c,this.VKnots=p,this.KnotSpec=d,this.WeightsData=f}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++];return new qbe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g)}ToTape(){let e=[];return e.push(this.UDegree),e.push(this.VDegree),e.push(this.ControlPointsList),e.push(this.SurfaceForm),e.push(this.UClosed),e.push(this.VClosed),e.push(this.SelfIntersect),e.push(this.UMultiplicities),e.push(this.VMultiplicities),e.push(this.UKnots),e.push(this.VKnots),e.push(this.KnotSpec),e.push(this.WeightsData),e}},Ybe=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.XDim=s,this.YDim=a,this.WallThickness=o,this.InnerFilletRadius=l,this.OuterFilletRadius=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Ybe(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.XDim),e.push(this.YDim),e.push(this.WallThickness),e.push(this.InnerFilletRadius),e.push(this.OuterFilletRadius),e}},Xbe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.XDim=s,this.YDim=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Xbe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.XDim),e.push(this.YDim),e}},$be=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Position=i,this.XLength=r,this.YLength=n,this.Height=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new $be(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Position),e.push(this.XLength),e.push(this.YLength),e.push(this.Height),e}},Kbe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.BasisSurface=i,this.U1=r,this.V1=n,this.U2=s,this.V2=a,this.Usense=o,this.Vsense=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new Kbe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.BasisSurface),e.push(this.U1),e.push(this.V1),e.push(this.U2),e.push(this.V2),e.push(this.Usense),e.push(this.Vsense),e}},Zbe=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.RecurrenceType=i,this.DayComponent=r,this.WeekdayComponent=n,this.MonthComponent=s,this.Position=a,this.Interval=o,this.Occurrences=l,this.TimePeriods=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new Zbe(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.RecurrenceType),e.push(this.DayComponent),e.push(this.WeekdayComponent),e.push(this.MonthComponent),e.push(this.Position),e.push(this.Interval),e.push(this.Occurrences),e.push(this.TimePeriods),e}},Jbe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.TypeIdentifier=i,this.AttributeIdentifier=r,this.InstanceName=n,this.ListPositions=s,this.InnerReference=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new Jbe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.TypeIdentifier),e.push(this.AttributeIdentifier),e.push(this.InstanceName),e.push(this.ListPositions),e.push(this.InnerReference),e}},Qbe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.PredefinedType=h,this.RestartDistance=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Qbe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.PredefinedType),e.push(this.RestartDistance),e}},exe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.StartTime=n,this.EndTime=s,this.TimeSeriesDataType=a,this.DataOrigin=o,this.UserDefinedDataOrigin=l,this.Unit=h,this.TimeStep=u,this.Values=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new exe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.StartTime),e.push(this.EndTime),e.push(this.TimeSeriesDataType),e.push(this.DataOrigin),e.push(this.UserDefinedDataOrigin),e.push(this.Unit),e.push(this.TimeStep),e.push(this.Values),e}},txe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.TotalCrossSectionArea=i,this.SteelGrade=r,this.BarSurface=n,this.EffectiveDepth=s,this.NominalBarDiameter=a,this.BarCount=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new txe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.TotalCrossSectionArea),e.push(this.SteelGrade),e.push(this.BarSurface),e.push(this.EffectiveDepth),e.push(this.NominalBarDiameter),e.push(this.BarCount),e}},rxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.DefinitionType=a,this.ReinforcementSectionDefinitions=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new rxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.DefinitionType),e.push(this.ReinforcementSectionDefinitions),e}},ixe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.SteelGrade=u,this.NominalDiameter=c,this.CrossSectionArea=p,this.BarLength=d,this.PredefinedType=f,this.BarSurface=m}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++];return new ixe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.SteelGrade),e.push(this.NominalDiameter),e.push(this.CrossSectionArea),e.push(this.BarLength),e.push(this.PredefinedType),e.push(this.BarSurface),e}},nxe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m,g,y){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c,this.NominalDiameter=p,this.CrossSectionArea=d,this.BarLength=f,this.BarSurface=m,this.BendingShapeCode=g,this.BendingParameters=y}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++],v=i[r++],T=i[r++];return new nxe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e.push(this.NominalDiameter),e.push(this.CrossSectionArea),e.push(this.BarLength),e.push(this.BarSurface),e.push(this.BendingShapeCode),e.push(this.BendingParameters),e}},sxe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.SteelGrade=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new sxe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.SteelGrade),e}},axe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new axe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},oxe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.SteelGrade=u,this.MeshLength=c,this.MeshWidth=p,this.LongitudinalBarNominalDiameter=d,this.TransverseBarNominalDiameter=f,this.LongitudinalBarCrossSectionArea=m,this.TransverseBarCrossSectionArea=g,this.LongitudinalBarSpacing=y,this.TransverseBarSpacing=v,this.PredefinedType=T}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++],v=i[r++],T=i[r++],x=i[r++],b=i[r++];return new oxe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T,x,b)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.SteelGrade),e.push(this.MeshLength),e.push(this.MeshWidth),e.push(this.LongitudinalBarNominalDiameter),e.push(this.TransverseBarNominalDiameter),e.push(this.LongitudinalBarCrossSectionArea),e.push(this.TransverseBarCrossSectionArea),e.push(this.LongitudinalBarSpacing),e.push(this.TransverseBarSpacing),e.push(this.PredefinedType),e}},lxe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T,x,b){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c,this.MeshLength=p,this.MeshWidth=d,this.LongitudinalBarNominalDiameter=f,this.TransverseBarNominalDiameter=m,this.LongitudinalBarCrossSectionArea=g,this.TransverseBarCrossSectionArea=y,this.LongitudinalBarSpacing=v,this.TransverseBarSpacing=T,this.BendingShapeCode=x,this.BendingParameters=b}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++],v=i[r++],T=i[r++],x=i[r++],b=i[r++],_=i[r++],E=i[r++];return new lxe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T,x,b,_,E)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e.push(this.MeshLength),e.push(this.MeshWidth),e.push(this.LongitudinalBarNominalDiameter),e.push(this.TransverseBarNominalDiameter),e.push(this.LongitudinalBarCrossSectionArea),e.push(this.TransverseBarCrossSectionArea),e.push(this.LongitudinalBarSpacing),e.push(this.TransverseBarSpacing),e.push(this.BendingShapeCode),e.push(this.BendingParameters),e}},cxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingObject=a,this.RelatedObjects=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new cxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingObject),e.push(this.RelatedObjects),e}},uxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new uxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatedObjectsType),e}},hxe=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingActor=l,this.ActingRole=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new hxe(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatedObjectsType),e.push(this.RelatingActor),e.push(this.ActingRole),e}},pxe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingControl=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new pxe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatedObjectsType),e.push(this.RelatingControl),e}},dxe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingGroup=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new dxe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatedObjectsType),e.push(this.RelatingGroup),e}},fxe=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingGroup=l,this.Factor=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new fxe(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatedObjectsType),e.push(this.RelatingGroup),e.push(this.Factor),e}},mxe=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingProcess=l,this.QuantityInProcess=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new mxe(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatedObjectsType),e.push(this.RelatingProcess),e.push(this.QuantityInProcess),e}},gxe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingProduct=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new gxe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatedObjectsType),e.push(this.RelatingProduct),e}},vxe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatedObjectsType=o,this.RelatingResource=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new vxe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatedObjectsType),e.push(this.RelatingResource),e}},yxe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new yxe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e}},Txe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingApproval=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Txe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatingApproval),e}},Exe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingClassification=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Exe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatingClassification),e}},bxe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.Intent=o,this.RelatingConstraint=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new bxe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.Intent),e.push(this.RelatingConstraint),e}},xxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingDocument=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new xxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatingDocument),e}},Ixe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingLibrary=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Ixe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatingLibrary),e}},_xe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingMaterial=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new _xe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatingMaterial),e}},Sxe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new Sxe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e}},wxe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ConnectionGeometry=a,this.RelatingElement=o,this.RelatedElement=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new wxe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ConnectionGeometry),e.push(this.RelatingElement),e.push(this.RelatedElement),e}},Rxe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ConnectionGeometry=a,this.RelatingElement=o,this.RelatedElement=l,this.RelatingPriorities=h,this.RelatedPriorities=u,this.RelatedConnectionType=c,this.RelatingConnectionType=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new Rxe(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ConnectionGeometry),e.push(this.RelatingElement),e.push(this.RelatedElement),e.push(this.RelatingPriorities),e.push(this.RelatedPriorities),e.push(this.RelatedConnectionType),e.push(this.RelatingConnectionType),e}},Mxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingPort=a,this.RelatedElement=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Mxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingPort),e.push(this.RelatedElement),e}},Dxe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingPort=a,this.RelatedPort=o,this.RealizingElement=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new Dxe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingPort),e.push(this.RelatedPort),e.push(this.RealizingElement),e}},Cxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingElement=a,this.RelatedStructuralActivity=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Cxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingElement),e.push(this.RelatedStructuralActivity),e}},Axe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingStructuralMember=a,this.RelatedStructuralConnection=o,this.AppliedCondition=l,this.AdditionalConditions=h,this.SupportedLength=u,this.ConditionCoordinateSystem=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Axe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingStructuralMember),e.push(this.RelatedStructuralConnection),e.push(this.AppliedCondition),e.push(this.AdditionalConditions),e.push(this.SupportedLength),e.push(this.ConditionCoordinateSystem),e}},Oxe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingStructuralMember=a,this.RelatedStructuralConnection=o,this.AppliedCondition=l,this.AdditionalConditions=h,this.SupportedLength=u,this.ConditionCoordinateSystem=c,this.ConnectionConstraint=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new Oxe(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingStructuralMember),e.push(this.RelatedStructuralConnection),e.push(this.AppliedCondition),e.push(this.AdditionalConditions),e.push(this.SupportedLength),e.push(this.ConditionCoordinateSystem),e.push(this.ConnectionConstraint),e}},Pxe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ConnectionGeometry=a,this.RelatingElement=o,this.RelatedElement=l,this.RealizingElements=h,this.ConnectionType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Pxe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ConnectionGeometry),e.push(this.RelatingElement),e.push(this.RelatedElement),e.push(this.RealizingElements),e.push(this.ConnectionType),e}},Nxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedElements=a,this.RelatingStructure=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Nxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedElements),e.push(this.RelatingStructure),e}},Lxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingBuildingElement=a,this.RelatedCoverings=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Lxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingBuildingElement),e.push(this.RelatedCoverings),e}},Fxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingSpace=a,this.RelatedCoverings=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Fxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingSpace),e.push(this.RelatedCoverings),e}},Hxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingContext=a,this.RelatedDefinitions=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Hxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingContext),e.push(this.RelatedDefinitions),e}},Uxe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new Uxe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e}},Bxe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new Bxe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e}},kxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingObject=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new kxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatingObject),e}},Gxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingPropertyDefinition=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Gxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatingPropertyDefinition),e}},Vxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedPropertySets=a,this.RelatingTemplate=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Vxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedPropertySets),e.push(this.RelatingTemplate),e}},zxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedObjects=a,this.RelatingType=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new zxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedObjects),e.push(this.RelatingType),e}},jxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingOpeningElement=a,this.RelatedBuildingElement=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new jxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingOpeningElement),e.push(this.RelatedBuildingElement),e}},Wxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedControlElements=a,this.RelatingFlowElement=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Wxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedControlElements),e.push(this.RelatingFlowElement),e}},qxe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingElement=a,this.RelatedElement=o,this.InterferenceGeometry=l,this.InterferenceType=h,this.ImpliedOrder=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new qxe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingElement),e.push(this.RelatedElement),e.push(this.InterferenceGeometry),e.push(this.InterferenceType),e.push(this.ImpliedOrder),e}},Yxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingObject=a,this.RelatedObjects=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Yxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingObject),e.push(this.RelatedObjects),e}},Xxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingPositioningElement=a,this.RelatedProducts=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Xxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingPositioningElement),e.push(this.RelatedProducts),e}},$xe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingElement=a,this.RelatedFeatureElement=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new $xe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingElement),e.push(this.RelatedFeatureElement),e}},Kxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatedElements=a,this.RelatingStructure=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Kxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatedElements),e.push(this.RelatingStructure),e}},Zxe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingProcess=a,this.RelatedProcess=o,this.TimeLag=l,this.SequenceType=h,this.UserDefinedSequenceType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Zxe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingProcess),e.push(this.RelatedProcess),e.push(this.TimeLag),e.push(this.SequenceType),e.push(this.UserDefinedSequenceType),e}},Jxe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingSystem=a,this.RelatedBuildings=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Jxe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingSystem),e.push(this.RelatedBuildings),e}},Qxe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingSpace=a,this.RelatedBuildingElement=o,this.ConnectionGeometry=l,this.PhysicalOrVirtualBoundary=h,this.InternalOrExternalBoundary=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Qxe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingSpace),e.push(this.RelatedBuildingElement),e.push(this.ConnectionGeometry),e.push(this.PhysicalOrVirtualBoundary),e.push(this.InternalOrExternalBoundary),e}},eIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingSpace=a,this.RelatedBuildingElement=o,this.ConnectionGeometry=l,this.PhysicalOrVirtualBoundary=h,this.InternalOrExternalBoundary=u,this.ParentBoundary=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new eIe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingSpace),e.push(this.RelatedBuildingElement),e.push(this.ConnectionGeometry),e.push(this.PhysicalOrVirtualBoundary),e.push(this.InternalOrExternalBoundary),e.push(this.ParentBoundary),e}},tIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingSpace=a,this.RelatedBuildingElement=o,this.ConnectionGeometry=l,this.PhysicalOrVirtualBoundary=h,this.InternalOrExternalBoundary=u,this.ParentBoundary=c,this.CorrespondingBoundary=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new tIe(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingSpace),e.push(this.RelatedBuildingElement),e.push(this.ConnectionGeometry),e.push(this.PhysicalOrVirtualBoundary),e.push(this.InternalOrExternalBoundary),e.push(this.ParentBoundary),e.push(this.CorrespondingBoundary),e}},rIe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.RelatingBuildingElement=a,this.RelatedOpeningElement=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new rIe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.RelatingBuildingElement),e.push(this.RelatedOpeningElement),e}},iIe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new iIe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e}},nIe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Transition=i,this.SameSense=r,this.ParentCurve=n,this.ParamLength=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new nIe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Transition),e.push(this.SameSense),e.push(this.ParentCurve),e.push(this.ParamLength),e}},sIe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.ContextOfItems=i,this.RepresentationIdentifier=r,this.RepresentationType=n,this.Items=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new sIe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.ContextOfItems),e.push(this.RepresentationIdentifier),e.push(this.RepresentationType),e.push(this.Items),e}},aIe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.ContextIdentifier=i,this.ContextType=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new aIe(e,t,n,s)}ToTape(){let e=[];return e.push(this.ContextIdentifier),e.push(this.ContextType),e}},oIe=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new oIe(e,t)}ToTape(){return[]}},lIe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.MappingOrigin=i,this.MappedRepresentation=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new lIe(e,t,n,s)}ToTape(){let e=[];return e.push(this.MappingOrigin),e.push(this.MappedRepresentation),e}},cIe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new cIe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.LongDescription),e}},uIe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.RelatedResourceObjects=n,this.RelatingApproval=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new uIe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.RelatedResourceObjects),e.push(this.RelatingApproval),e}},hIe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.RelatingConstraint=n,this.RelatedResourceObjects=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new hIe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.RelatingConstraint),e.push(this.RelatedResourceObjects),e}},pIe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Name=i,this.Description=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new pIe(e,t,n,s)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e}},dIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T){this.expressID=e,this.type=t,this.Name=i,this.DataOrigin=r,this.UserDefinedDataOrigin=n,this.ScheduleWork=s,this.ScheduleUsage=a,this.ScheduleStart=o,this.ScheduleFinish=l,this.ScheduleContour=h,this.LevelingDelay=u,this.IsOverAllocated=c,this.StatusTime=p,this.ActualWork=d,this.ActualUsage=f,this.ActualStart=m,this.ActualFinish=g,this.RemainingWork=y,this.RemainingUsage=v,this.Completion=T}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++],v=i[r++],T=i[r++],x=i[r++],b=i[r++];return new dIe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T,x,b)}ToTape(){let e=[];return e.push(this.Name),e.push(this.DataOrigin),e.push(this.UserDefinedDataOrigin),e.push(this.ScheduleWork),e.push(this.ScheduleUsage),e.push(this.ScheduleStart),e.push(this.ScheduleFinish),e.push(this.ScheduleContour),e.push(this.LevelingDelay),e.push(this.IsOverAllocated),e.push(this.StatusTime),e.push(this.ActualWork),e.push(this.ActualUsage),e.push(this.ActualStart),e.push(this.ActualFinish),e.push(this.RemainingWork),e.push(this.RemainingUsage),e.push(this.Completion),e}},fIe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.SweptArea=i,this.Position=r,this.Axis=n,this.Angle=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new fIe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.SweptArea),e.push(this.Position),e.push(this.Axis),e.push(this.Angle),e}},mIe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.SweptArea=i,this.Position=r,this.Axis=n,this.Angle=s,this.EndSweptArea=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new mIe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.SweptArea),e.push(this.Position),e.push(this.Axis),e.push(this.Angle),e.push(this.EndSweptArea),e}},gIe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Position=i,this.Height=r,this.BottomRadius=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new gIe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Position),e.push(this.Height),e.push(this.BottomRadius),e}},vIe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Position=i,this.Height=r,this.Radius=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new vIe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Position),e.push(this.Height),e.push(this.Radius),e}},yIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new yIe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},TIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new TIe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},EIe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new EIe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e}},bIe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.XDim=s,this.YDim=a,this.RoundingRadius=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new bIe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.XDim),e.push(this.YDim),e.push(this.RoundingRadius),e}},xIe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Dimensions=i,this.UnitType=r,this.Prefix=n,this.Name=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new xIe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Dimensions),e.push(this.UnitType),e.push(this.Prefix),e.push(this.Name),e}},IIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new IIe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},_Ie=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new _Ie(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},SIe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Name=i,this.DataOrigin=r,this.UserDefinedDataOrigin=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new SIe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Name),e.push(this.DataOrigin),e.push(this.UserDefinedDataOrigin),e}},wIe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Curve3D=i,this.AssociatedGeometry=r,this.MasterRepresentation=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new wIe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Curve3D),e.push(this.AssociatedGeometry),e.push(this.MasterRepresentation),e}},RIe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.SectionType=i,this.StartProfile=r,this.EndProfile=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new RIe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.SectionType),e.push(this.StartProfile),e.push(this.EndProfile),e}},MIe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.LongitudinalStartPosition=i,this.LongitudinalEndPosition=r,this.TransversePosition=n,this.ReinforcementRole=s,this.SectionDefinition=a,this.CrossSectionReinforcementDefinitions=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new MIe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.LongitudinalStartPosition),e.push(this.LongitudinalEndPosition),e.push(this.TransversePosition),e.push(this.ReinforcementRole),e.push(this.SectionDefinition),e.push(this.CrossSectionReinforcementDefinitions),e}},DIe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Directrix=i,this.CrossSections=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new DIe(e,t,n,s)}ToTape(){let e=[];return e.push(this.Directrix),e.push(this.CrossSections),e}},CIe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Directrix=i,this.CrossSections=r,this.CrossSectionPositions=n,this.FixedAxisVertical=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new CIe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Directrix),e.push(this.CrossSections),e.push(this.CrossSectionPositions),e.push(this.FixedAxisVertical),e}},AIe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.SpineCurve=i,this.CrossSections=r,this.CrossSectionPositions=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new AIe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.SpineCurve),e.push(this.CrossSections),e.push(this.CrossSectionPositions),e}},OIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new OIe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},PIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new PIe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},NIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new NIe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},LIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new LIe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},FIe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.ShapeRepresentations=i,this.Name=r,this.Description=n,this.ProductDefinitional=s,this.PartOfProductDefinitionShape=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new FIe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.ShapeRepresentations),e.push(this.Name),e.push(this.Description),e.push(this.ProductDefinitional),e.push(this.PartOfProductDefinitionShape),e}},HIe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.ContextOfItems=i,this.RepresentationIdentifier=r,this.RepresentationType=n,this.Items=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new HIe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.ContextOfItems),e.push(this.RepresentationIdentifier),e.push(this.RepresentationType),e.push(this.Items),e}},UIe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.ContextOfItems=i,this.RepresentationIdentifier=r,this.RepresentationType=n,this.Items=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new UIe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.ContextOfItems),e.push(this.RepresentationIdentifier),e.push(this.RepresentationType),e.push(this.Items),e}},BIe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.SbsmBoundary=i}static FromTape(e,t,i){let r=0,n=i[r++];return new BIe(e,t,n)}ToTape(){let e=[];return e.push(this.SbsmBoundary),e}},kIe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Name=i,this.Description=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new kIe(e,t,n,s)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e}},GIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.TemplateType=a,this.PrimaryMeasureType=o,this.SecondaryMeasureType=l,this.Enumerators=h,this.PrimaryUnit=u,this.SecondaryUnit=c,this.Expression=p,this.AccessState=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new GIe(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.TemplateType),e.push(this.PrimaryMeasureType),e.push(this.SecondaryMeasureType),e.push(this.Enumerators),e.push(this.PrimaryUnit),e.push(this.SecondaryUnit),e.push(this.Expression),e.push(this.AccessState),e}},VIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=h,this.CompositionType=u,this.RefLatitude=c,this.RefLongitude=p,this.RefElevation=d,this.LandTitleNumber=f,this.SiteAddress=m}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++];return new VIe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.LongName),e.push(this.CompositionType),e.push(this.RefLatitude),e.push(this.RefLongitude),e.push(this.RefElevation),e.push(this.LandTitleNumber),e.push(this.SiteAddress),e}},zIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new zIe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},jIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new jIe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},WIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new WIe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},qIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new qIe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},YIe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.SlippageX=r,this.SlippageY=n,this.SlippageZ=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new YIe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.SlippageX),e.push(this.SlippageY),e.push(this.SlippageZ),e}},XIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new XIe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},$Ie=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new $Ie(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},KIe=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new KIe(e,t)}ToTape(){return[]}},ZIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=h,this.CompositionType=u,this.PredefinedType=c,this.ElevationWithFlooring=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new ZIe(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.LongName),e.push(this.CompositionType),e.push(this.PredefinedType),e.push(this.ElevationWithFlooring),e}},JIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new JIe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},QIe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new QIe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},e_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c,this.LongName=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new e_e(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e.push(this.LongName),e}},t_e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new t_e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.LongName),e}},r_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new r_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},i_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=h,this.CompositionType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new i_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.LongName),e.push(this.CompositionType),e}},n_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new n_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e}},s_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.LongName=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new s_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.LongName),e.push(this.PredefinedType),e}},a_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c,this.LongName=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new a_e(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e.push(this.LongName),e}},o_e=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Position=i,this.Radius=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new o_e(e,t,n,s)}ToTape(){let e=[];return e.push(this.Position),e.push(this.Radius),e}},l_e=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Position=i,this.Radius=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new l_e(e,t,n,s)}ToTape(){let e=[];return e.push(this.Position),e.push(this.Radius),e}},c_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new c_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},u_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new u_e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},h_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new h_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},p_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.NumberOfRisers=u,this.NumberOfTreads=c,this.RiserHeight=p,this.TreadLength=d,this.PredefinedType=f}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++];return new p_e(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.NumberOfRisers),e.push(this.NumberOfTreads),e.push(this.RiserHeight),e.push(this.TreadLength),e.push(this.PredefinedType),e}},d_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new d_e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},f_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new f_e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},m_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=h,this.GlobalOrLocal=u,this.DestabilizingLoad=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new m_e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedLoad),e.push(this.GlobalOrLocal),e.push(this.DestabilizingLoad),e}},g_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=h,this.GlobalOrLocal=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new g_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedLoad),e.push(this.GlobalOrLocal),e}},v_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.PredefinedType=o,this.OrientationOf2DPlane=l,this.LoadedBy=h,this.HasResults=u,this.SharedPlacement=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new v_e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.PredefinedType),e.push(this.OrientationOf2DPlane),e.push(this.LoadedBy),e.push(this.HasResults),e.push(this.SharedPlacement),e}},y_e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedCondition=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new y_e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedCondition),e}},T_e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Name=i}static FromTape(e,t,i){let r=0,n=i[r++];return new T_e(e,t,n)}ToTape(){let e=[];return e.push(this.Name),e}},E_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=h,this.GlobalOrLocal=u,this.DestabilizingLoad=c,this.ProjectedOrTrue=p,this.PredefinedType=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new E_e(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedLoad),e.push(this.GlobalOrLocal),e.push(this.DestabilizingLoad),e.push(this.ProjectedOrTrue),e.push(this.PredefinedType),e}},b_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedCondition=h,this.Axis=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new b_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedCondition),e.push(this.Axis),e}},x_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.PredefinedType=h,this.Axis=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new x_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.PredefinedType),e.push(this.Axis),e}},I_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.PredefinedType=h,this.Axis=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new I_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.PredefinedType),e.push(this.Axis),e}},__e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=h,this.GlobalOrLocal=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new __e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedLoad),e.push(this.GlobalOrLocal),e.push(this.PredefinedType),e}},S_e=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new S_e(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e}},w_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=h,this.GlobalOrLocal=u,this.DestabilizingLoad=c,this.ProjectedOrTrue=p,this.PredefinedType=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new w_e(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedLoad),e.push(this.GlobalOrLocal),e.push(this.DestabilizingLoad),e.push(this.ProjectedOrTrue),e.push(this.PredefinedType),e}},R_e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Name=i}static FromTape(e,t,i){let r=0,n=i[r++];return new R_e(e,t,n)}ToTape(){let e=[];return e.push(this.Name),e}},M_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.PredefinedType=o,this.ActionType=l,this.ActionSource=h,this.Coefficient=u,this.Purpose=c,this.SelfWeightCoefficients=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new M_e(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.PredefinedType),e.push(this.ActionType),e.push(this.ActionSource),e.push(this.Coefficient),e.push(this.Purpose),e.push(this.SelfWeightCoefficients),e}},D_e=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Name=i,this.Values=r,this.Locations=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new D_e(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Values),e.push(this.Locations),e}},C_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.PredefinedType=o,this.ActionType=l,this.ActionSource=h,this.Coefficient=u,this.Purpose=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new C_e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.PredefinedType),e.push(this.ActionType),e.push(this.ActionSource),e.push(this.Coefficient),e.push(this.Purpose),e}},A_e=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Name=i,this.LinearForceX=r,this.LinearForceY=n,this.LinearForceZ=s,this.LinearMomentX=a,this.LinearMomentY=o,this.LinearMomentZ=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new A_e(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Name),e.push(this.LinearForceX),e.push(this.LinearForceY),e.push(this.LinearForceZ),e.push(this.LinearMomentX),e.push(this.LinearMomentY),e.push(this.LinearMomentZ),e}},O_e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Name=i}static FromTape(e,t,i){let r=0,n=i[r++];return new O_e(e,t,n)}ToTape(){let e=[];return e.push(this.Name),e}},P_e=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.PlanarForceX=r,this.PlanarForceY=n,this.PlanarForceZ=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new P_e(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.PlanarForceX),e.push(this.PlanarForceY),e.push(this.PlanarForceZ),e}},N_e=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Name=i,this.DisplacementX=r,this.DisplacementY=n,this.DisplacementZ=s,this.RotationalDisplacementRX=a,this.RotationalDisplacementRY=o,this.RotationalDisplacementRZ=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new N_e(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Name),e.push(this.DisplacementX),e.push(this.DisplacementY),e.push(this.DisplacementZ),e.push(this.RotationalDisplacementRX),e.push(this.RotationalDisplacementRY),e.push(this.RotationalDisplacementRZ),e}},L_e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.Name=i,this.DisplacementX=r,this.DisplacementY=n,this.DisplacementZ=s,this.RotationalDisplacementRX=a,this.RotationalDisplacementRY=o,this.RotationalDisplacementRZ=l,this.Distortion=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new L_e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.Name),e.push(this.DisplacementX),e.push(this.DisplacementY),e.push(this.DisplacementZ),e.push(this.RotationalDisplacementRX),e.push(this.RotationalDisplacementRY),e.push(this.RotationalDisplacementRZ),e.push(this.Distortion),e}},F_e=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.Name=i,this.ForceX=r,this.ForceY=n,this.ForceZ=s,this.MomentX=a,this.MomentY=o,this.MomentZ=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new F_e(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.Name),e.push(this.ForceX),e.push(this.ForceY),e.push(this.ForceZ),e.push(this.MomentX),e.push(this.MomentY),e.push(this.MomentZ),e}},H_e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.Name=i,this.ForceX=r,this.ForceY=n,this.ForceZ=s,this.MomentX=a,this.MomentY=o,this.MomentZ=l,this.WarpingMoment=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new H_e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.Name),e.push(this.ForceX),e.push(this.ForceY),e.push(this.ForceZ),e.push(this.MomentX),e.push(this.MomentY),e.push(this.MomentZ),e.push(this.WarpingMoment),e}},U_e=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Name=i}static FromTape(e,t,i){let r=0,n=i[r++];return new U_e(e,t,n)}ToTape(){let e=[];return e.push(this.Name),e}},B_e=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.DeltaTConstant=r,this.DeltaTY=n,this.DeltaTZ=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new B_e(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.DeltaTConstant),e.push(this.DeltaTY),e.push(this.DeltaTZ),e}},k_e=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new k_e(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e}},G_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=h,this.GlobalOrLocal=u,this.DestabilizingLoad=c,this.ProjectedOrTrue=p,this.PredefinedType=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new G_e(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedLoad),e.push(this.GlobalOrLocal),e.push(this.DestabilizingLoad),e.push(this.ProjectedOrTrue),e.push(this.PredefinedType),e}},V_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=h,this.GlobalOrLocal=u,this.DestabilizingLoad=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new V_e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedLoad),e.push(this.GlobalOrLocal),e.push(this.DestabilizingLoad),e}},z_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedCondition=h,this.ConditionCoordinateSystem=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new z_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedCondition),e.push(this.ConditionCoordinateSystem),e}},j_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=h,this.GlobalOrLocal=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new j_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedLoad),e.push(this.GlobalOrLocal),e}},W_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=h,this.GlobalOrLocal=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new W_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedLoad),e.push(this.GlobalOrLocal),e}},q_e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.TheoryType=o,this.ResultForLoadGroup=l,this.IsLinear=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new q_e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.TheoryType),e.push(this.ResultForLoadGroup),e.push(this.IsLinear),e}},Y_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=h,this.GlobalOrLocal=u,this.DestabilizingLoad=c,this.ProjectedOrTrue=p,this.PredefinedType=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new Y_e(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedLoad),e.push(this.GlobalOrLocal),e.push(this.DestabilizingLoad),e.push(this.ProjectedOrTrue),e.push(this.PredefinedType),e}},X_e=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedCondition=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new X_e(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedCondition),e}},$_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.PredefinedType=h,this.Thickness=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new $_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.PredefinedType),e.push(this.Thickness),e}},K_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.PredefinedType=h,this.Thickness=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new K_e(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.PredefinedType),e.push(this.Thickness),e}},Z_e=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.AppliedLoad=h,this.GlobalOrLocal=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Z_e(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.AppliedLoad),e.push(this.GlobalOrLocal),e.push(this.PredefinedType),e}},J_e=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.ContextOfItems=i,this.RepresentationIdentifier=r,this.RepresentationType=n,this.Items=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new J_e(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.ContextOfItems),e.push(this.RepresentationIdentifier),e.push(this.RepresentationType),e.push(this.Items),e}},Q_e=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Item=i,this.Styles=r,this.Name=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new Q_e(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Item),e.push(this.Styles),e.push(this.Name),e}},eSe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.ContextOfItems=i,this.RepresentationIdentifier=r,this.RepresentationType=n,this.Items=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new eSe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.ContextOfItems),e.push(this.RepresentationIdentifier),e.push(this.RepresentationType),e.push(this.Items),e}},tSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Usage=h,this.BaseCosts=u,this.BaseQuantity=c,this.PredefinedType=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new tSe(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.LongDescription),e.push(this.Usage),e.push(this.BaseCosts),e.push(this.BaseQuantity),e.push(this.PredefinedType),e}},rSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=h,this.ResourceType=u,this.BaseCosts=c,this.BaseQuantity=p,this.PredefinedType=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new rSe(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.Identification),e.push(this.LongDescription),e.push(this.ResourceType),e.push(this.BaseCosts),e.push(this.BaseQuantity),e.push(this.PredefinedType),e}},iSe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.EdgeStart=i,this.EdgeEnd=r,this.ParentEdge=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new iSe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.EdgeStart),e.push(this.EdgeEnd),e.push(this.ParentEdge),e}},nSe=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new nSe(e,t)}ToTape(){return[]}},sSe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Curve3D=i,this.AssociatedGeometry=r,this.MasterRepresentation=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new sSe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Curve3D),e.push(this.AssociatedGeometry),e.push(this.MasterRepresentation),e}},aSe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.SweptArea=i,this.Position=r,this.Directrix=n,this.StartParam=s,this.EndParam=a,this.ReferenceSurface=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new aSe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.SweptArea),e.push(this.Position),e.push(this.Directrix),e.push(this.StartParam),e.push(this.EndParam),e.push(this.ReferenceSurface),e}},oSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new oSe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},lSe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.SweptCurve=i,this.Position=r,this.ExtrudedDirection=n,this.Depth=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new lSe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.SweptCurve),e.push(this.Position),e.push(this.ExtrudedDirection),e.push(this.Depth),e}},cSe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.SweptCurve=i,this.Position=r,this.AxisPosition=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new cSe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.SweptCurve),e.push(this.Position),e.push(this.AxisPosition),e}},uSe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.Name=i,this.SurfaceReinforcement1=r,this.SurfaceReinforcement2=n,this.ShearReinforcement=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new uSe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.Name),e.push(this.SurfaceReinforcement1),e.push(this.SurfaceReinforcement2),e.push(this.ShearReinforcement),e}},hSe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Name=i,this.Side=r,this.Styles=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new hSe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Side),e.push(this.Styles),e}},pSe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.DiffuseTransmissionColour=i,this.DiffuseReflectionColour=r,this.TransmissionColour=n,this.ReflectanceColour=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new pSe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.DiffuseTransmissionColour),e.push(this.DiffuseReflectionColour),e.push(this.TransmissionColour),e.push(this.ReflectanceColour),e}},dSe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.RefractionIndex=i,this.DispersionFactor=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new dSe(e,t,n,s)}ToTape(){let e=[];return e.push(this.RefractionIndex),e.push(this.DispersionFactor),e}},fSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.SurfaceColour=i,this.Transparency=r,this.DiffuseColour=n,this.TransmissionColour=s,this.DiffuseTransmissionColour=a,this.ReflectionColour=o,this.SpecularColour=l,this.SpecularHighlight=h,this.ReflectanceMethod=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new fSe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.SurfaceColour),e.push(this.Transparency),e.push(this.DiffuseColour),e.push(this.TransmissionColour),e.push(this.DiffuseTransmissionColour),e.push(this.ReflectionColour),e.push(this.SpecularColour),e.push(this.SpecularHighlight),e.push(this.ReflectanceMethod),e}},mSe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.SurfaceColour=i,this.Transparency=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new mSe(e,t,n,s)}ToTape(){let e=[];return e.push(this.SurfaceColour),e.push(this.Transparency),e}},gSe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Textures=i}static FromTape(e,t,i){let r=0,n=i[r++];return new gSe(e,t,n)}ToTape(){let e=[];return e.push(this.Textures),e}},vSe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.RepeatS=i,this.RepeatT=r,this.Mode=n,this.TextureTransform=s,this.Parameter=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new vSe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.RepeatS),e.push(this.RepeatT),e.push(this.Mode),e.push(this.TextureTransform),e.push(this.Parameter),e}},ySe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.SweptArea=i,this.Position=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new ySe(e,t,n,s)}ToTape(){let e=[];return e.push(this.SweptArea),e.push(this.Position),e}},TSe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Directrix=i,this.Radius=r,this.InnerRadius=n,this.StartParam=s,this.EndParam=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new TSe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Directrix),e.push(this.Radius),e.push(this.InnerRadius),e.push(this.StartParam),e.push(this.EndParam),e}},ESe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.Directrix=i,this.Radius=r,this.InnerRadius=n,this.StartParam=s,this.EndParam=a,this.FilletRadius=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new ESe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.Directrix),e.push(this.Radius),e.push(this.InnerRadius),e.push(this.StartParam),e.push(this.EndParam),e.push(this.FilletRadius),e}},bSe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.SweptCurve=i,this.Position=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new bSe(e,t,n,s)}ToTape(){let e=[];return e.push(this.SweptCurve),e.push(this.Position),e}},xSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new xSe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},ISe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new ISe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},_Se=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new _Se(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e}},SSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new SSe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},wSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new wSe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},RSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.Depth=s,this.FlangeWidth=a,this.WebThickness=o,this.FlangeThickness=l,this.FilletRadius=h,this.FlangeEdgeRadius=u,this.WebEdgeRadius=c,this.WebSlope=p,this.FlangeSlope=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new RSe(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.Depth),e.push(this.FlangeWidth),e.push(this.WebThickness),e.push(this.FlangeThickness),e.push(this.FilletRadius),e.push(this.FlangeEdgeRadius),e.push(this.WebEdgeRadius),e.push(this.WebSlope),e.push(this.FlangeSlope),e}},MSe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Name=i,this.Rows=r,this.Columns=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new MSe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Rows),e.push(this.Columns),e}},DSe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Identifier=i,this.Name=r,this.Description=n,this.Unit=s,this.ReferencePath=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new DSe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Identifier),e.push(this.Name),e.push(this.Description),e.push(this.Unit),e.push(this.ReferencePath),e}},CSe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.RowCells=i,this.IsHeading=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new CSe(e,t,n,s)}ToTape(){let e=[];return e.push(this.RowCells),e.push(this.IsHeading),e}},ASe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new ASe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},OSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new OSe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},PSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.LongDescription=l,this.Status=h,this.WorkMethod=u,this.IsMilestone=c,this.Priority=p,this.TaskTime=d,this.PredefinedType=f}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++];return new PSe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.LongDescription),e.push(this.Status),e.push(this.WorkMethod),e.push(this.IsMilestone),e.push(this.Priority),e.push(this.TaskTime),e.push(this.PredefinedType),e}},NSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T,x,b){this.expressID=e,this.type=t,this.Name=i,this.DataOrigin=r,this.UserDefinedDataOrigin=n,this.DurationType=s,this.ScheduleDuration=a,this.ScheduleStart=o,this.ScheduleFinish=l,this.EarlyStart=h,this.EarlyFinish=u,this.LateStart=c,this.LateFinish=p,this.FreeFloat=d,this.TotalFloat=f,this.IsCritical=m,this.StatusTime=g,this.ActualDuration=y,this.ActualStart=v,this.ActualFinish=T,this.RemainingTime=x,this.Completion=b}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++],v=i[r++],T=i[r++],x=i[r++],b=i[r++],_=i[r++],E=i[r++];return new NSe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T,x,b,_,E)}ToTape(){let e=[];return e.push(this.Name),e.push(this.DataOrigin),e.push(this.UserDefinedDataOrigin),e.push(this.DurationType),e.push(this.ScheduleDuration),e.push(this.ScheduleStart),e.push(this.ScheduleFinish),e.push(this.EarlyStart),e.push(this.EarlyFinish),e.push(this.LateStart),e.push(this.LateFinish),e.push(this.FreeFloat),e.push(this.TotalFloat),e.push(this.IsCritical),e.push(this.StatusTime),e.push(this.ActualDuration),e.push(this.ActualStart),e.push(this.ActualFinish),e.push(this.RemainingTime),e.push(this.Completion),e}},LSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T,x,b,_){this.expressID=e,this.type=t,this.Name=i,this.DataOrigin=r,this.UserDefinedDataOrigin=n,this.DurationType=s,this.ScheduleDuration=a,this.ScheduleStart=o,this.ScheduleFinish=l,this.EarlyStart=h,this.EarlyFinish=u,this.LateStart=c,this.LateFinish=p,this.FreeFloat=d,this.TotalFloat=f,this.IsCritical=m,this.StatusTime=g,this.ActualDuration=y,this.ActualStart=v,this.ActualFinish=T,this.RemainingTime=x,this.Completion=b,this.Recurrence=_}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++],v=i[r++],T=i[r++],x=i[r++],b=i[r++],_=i[r++],E=i[r++],w=i[r++];return new LSe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T,x,b,_,E,w)}ToTape(){let e=[];return e.push(this.Name),e.push(this.DataOrigin),e.push(this.UserDefinedDataOrigin),e.push(this.DurationType),e.push(this.ScheduleDuration),e.push(this.ScheduleStart),e.push(this.ScheduleFinish),e.push(this.EarlyStart),e.push(this.EarlyFinish),e.push(this.LateStart),e.push(this.LateFinish),e.push(this.FreeFloat),e.push(this.TotalFloat),e.push(this.IsCritical),e.push(this.StatusTime),e.push(this.ActualDuration),e.push(this.ActualStart),e.push(this.ActualFinish),e.push(this.RemainingTime),e.push(this.Completion),e.push(this.Recurrence),e}},FSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=h,this.ProcessType=u,this.PredefinedType=c,this.WorkMethod=p}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++];return new FSe(e,t,n,s,a,o,l,h,u,c,p,d,f)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.Identification),e.push(this.LongDescription),e.push(this.ProcessType),e.push(this.PredefinedType),e.push(this.WorkMethod),e}},HSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.Purpose=i,this.Description=r,this.UserDefinedPurpose=n,this.TelephoneNumbers=s,this.FacsimileNumbers=a,this.PagerNumber=o,this.ElectronicMailAddresses=l,this.WWWHomePageURL=h,this.MessagingIDs=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new HSe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.Purpose),e.push(this.Description),e.push(this.UserDefinedPurpose),e.push(this.TelephoneNumbers),e.push(this.FacsimileNumbers),e.push(this.PagerNumber),e.push(this.ElectronicMailAddresses),e.push(this.WWWHomePageURL),e.push(this.MessagingIDs),e}},USe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.SteelGrade=u,this.PredefinedType=c,this.NominalDiameter=p,this.CrossSectionArea=d,this.TensionForce=f,this.PreStress=m,this.FrictionCoefficient=g,this.AnchorageSlip=y,this.MinCurvatureRadius=v}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++],v=i[r++],T=i[r++],x=i[r++];return new USe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T,x)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.SteelGrade),e.push(this.PredefinedType),e.push(this.NominalDiameter),e.push(this.CrossSectionArea),e.push(this.TensionForce),e.push(this.PreStress),e.push(this.FrictionCoefficient),e.push(this.AnchorageSlip),e.push(this.MinCurvatureRadius),e}},BSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.SteelGrade=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new BSe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.SteelGrade),e.push(this.PredefinedType),e}},kSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new kSe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},GSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.SteelGrade=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new GSe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.SteelGrade),e.push(this.PredefinedType),e}},VSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new VSe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},zSe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c,this.NominalDiameter=p,this.CrossSectionArea=d,this.SheathDiameter=f}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++];return new zSe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e.push(this.NominalDiameter),e.push(this.CrossSectionArea),e.push(this.SheathDiameter),e}},jSe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Coordinates=i}static FromTape(e,t,i){let r=0,n=i[r++];return new jSe(e,t,n)}ToTape(){let e=[];return e.push(this.Coordinates),e}},WSe=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new WSe(e,t)}ToTape(){return[]}},qSe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Literal=i,this.Placement=r,this.Path=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new qSe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Literal),e.push(this.Placement),e.push(this.Path),e}},YSe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Literal=i,this.Placement=r,this.Path=n,this.Extent=s,this.BoxAlignment=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new YSe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Literal),e.push(this.Placement),e.push(this.Path),e.push(this.Extent),e.push(this.BoxAlignment),e}},XSe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Name=i,this.TextCharacterAppearance=r,this.TextStyle=n,this.TextFontStyle=s,this.ModelOrDraughting=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new XSe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Name),e.push(this.TextCharacterAppearance),e.push(this.TextStyle),e.push(this.TextFontStyle),e.push(this.ModelOrDraughting),e}},$Se=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.Name=i,this.FontFamily=r,this.FontStyle=n,this.FontVariant=s,this.FontWeight=a,this.FontSize=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new $Se(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.Name),e.push(this.FontFamily),e.push(this.FontStyle),e.push(this.FontVariant),e.push(this.FontWeight),e.push(this.FontSize),e}},KSe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Colour=i,this.BackgroundColour=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new KSe(e,t,n,s)}ToTape(){let e=[];return e.push(this.Colour),e.push(this.BackgroundColour),e}},ZSe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.TextIndent=i,this.TextAlign=r,this.TextDecoration=n,this.LetterSpacing=s,this.WordSpacing=a,this.TextTransform=o,this.LineHeight=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new ZSe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.TextIndent),e.push(this.TextAlign),e.push(this.TextDecoration),e.push(this.LetterSpacing),e.push(this.WordSpacing),e.push(this.TextTransform),e.push(this.LineHeight),e}},JSe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Maps=i}static FromTape(e,t,i){let r=0,n=i[r++];return new JSe(e,t,n)}ToTape(){let e=[];return e.push(this.Maps),e}},QSe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Maps=i,this.Mode=r,this.Parameter=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new QSe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Maps),e.push(this.Mode),e.push(this.Parameter),e}},ewe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Maps=i,this.Vertices=r,this.MappedTo=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new ewe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Maps),e.push(this.Vertices),e.push(this.MappedTo),e}},twe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Coordinates=i}static FromTape(e,t,i){let r=0,n=i[r++];return new twe(e,t,n)}ToTape(){let e=[];return e.push(this.Coordinates),e}},rwe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.TexCoordsList=i}static FromTape(e,t,i){let r=0,n=i[r++];return new rwe(e,t,n)}ToTape(){let e=[];return e.push(this.TexCoordsList),e}},iwe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.StartTime=i,this.EndTime=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new iwe(e,t,n,s)}ToTape(){let e=[];return e.push(this.StartTime),e.push(this.EndTime),e}},nwe=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.Name=i,this.Description=r,this.StartTime=n,this.EndTime=s,this.TimeSeriesDataType=a,this.DataOrigin=o,this.UserDefinedDataOrigin=l,this.Unit=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new nwe(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.Name),e.push(this.Description),e.push(this.StartTime),e.push(this.EndTime),e.push(this.TimeSeriesDataType),e.push(this.DataOrigin),e.push(this.UserDefinedDataOrigin),e.push(this.Unit),e}},swe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.ListValues=i}static FromTape(e,t,i){let r=0,n=i[r++];return new swe(e,t,n)}ToTape(){let e=[];return e.push(this.ListValues),e}},awe=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new awe(e,t)}ToTape(){return[]}},owe=class{constructor(e,t,i,r,n,s){this.expressID=e,this.type=t,this.ContextOfItems=i,this.RepresentationIdentifier=r,this.RepresentationType=n,this.Items=s}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++];return new owe(e,t,n,s,a,o)}ToTape(){let e=[];return e.push(this.ContextOfItems),e.push(this.RepresentationIdentifier),e.push(this.RepresentationType),e.push(this.Items),e}},lwe=class{constructor(e,t,i,r,n){this.expressID=e,this.type=t,this.Position=i,this.MajorRadius=r,this.MinorRadius=n}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++];return new lwe(e,t,n,s,a)}ToTape(){let e=[];return e.push(this.Position),e.push(this.MajorRadius),e.push(this.MinorRadius),e}},cwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new cwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},uwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new uwe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},hwe=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.StartPoint=i,this.StartDirection=r,this.SegmentLength=n,this.StartRadius=s,this.EndRadius=a,this.IsStartRadiusCCW=o,this.IsEndRadiusCCW=l,this.TransitionCurveType=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new hwe(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.StartPoint),e.push(this.StartDirection),e.push(this.SegmentLength),e.push(this.StartRadius),e.push(this.EndRadius),e.push(this.IsStartRadiusCCW),e.push(this.IsEndRadiusCCW),e.push(this.TransitionCurveType),e}},pwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new pwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},dwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new dwe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},fwe=class{constructor(e,t,i,r,n,s,a,o,l){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.BottomXDim=s,this.TopXDim=a,this.YDim=o,this.TopXOffset=l}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++];return new fwe(e,t,n,s,a,o,l,h,u)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.BottomXDim),e.push(this.TopXDim),e.push(this.YDim),e.push(this.TopXOffset),e}},mwe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.Coordinates=i,this.Normals=r,this.Closed=n,this.CoordIndex=s,this.PnIndex=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new mwe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.Coordinates),e.push(this.Normals),e.push(this.Closed),e.push(this.CoordIndex),e.push(this.PnIndex),e}},gwe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.Coordinates=i,this.Normals=r,this.Closed=n,this.CoordIndex=s,this.PnIndex=a,this.Flags=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new gwe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.Coordinates),e.push(this.Normals),e.push(this.Closed),e.push(this.CoordIndex),e.push(this.PnIndex),e.push(this.Flags),e}},vwe=class{constructor(e,t,i,r,n,s,a){this.expressID=e,this.type=t,this.BasisCurve=i,this.Trim1=r,this.Trim2=n,this.SenseAgreement=s,this.MasterRepresentation=a}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++];return new vwe(e,t,n,s,a,o,l)}ToTape(){let e=[];return e.push(this.BasisCurve),e.push(this.Trim1),e.push(this.Trim2),e.push(this.SenseAgreement),e.push(this.MasterRepresentation),e}},ywe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new ywe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Twe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Twe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Ewe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new Ewe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e}},bwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=h,this.ProcessType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new bwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.Identification),e.push(this.LongDescription),e.push(this.ProcessType),e}},xwe=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new xwe(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e}},Iwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.Identification=l,this.LongDescription=h,this.ResourceType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Iwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.Identification),e.push(this.LongDescription),e.push(this.ResourceType),e}},_we=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.Depth=s,this.FlangeWidth=a,this.WebThickness=o,this.FlangeThickness=l,this.FilletRadius=h,this.EdgeRadius=u,this.FlangeSlope=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new _we(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.Depth),e.push(this.FlangeWidth),e.push(this.WebThickness),e.push(this.FlangeThickness),e.push(this.FilletRadius),e.push(this.EdgeRadius),e.push(this.FlangeSlope),e}},Swe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.Units=i}static FromTape(e,t,i){let r=0,n=i[r++];return new Swe(e,t,n)}ToTape(){let e=[];return e.push(this.Units),e}},wwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new wwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Rwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Rwe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Mwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Mwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Dwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Dwe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Cwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Cwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Awe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Awe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Owe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.Orientation=i,this.Magnitude=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new Owe(e,t,n,s)}ToTape(){let e=[];return e.push(this.Orientation),e.push(this.Magnitude),e}},Pwe=class{constructor(e,t){this.expressID=e,this.type=t}static FromTape(e,t,i){return new Pwe(e,t)}ToTape(){return[]}},Nwe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.LoopVertex=i}static FromTape(e,t,i){let r=0,n=i[r++];return new Nwe(e,t,n)}ToTape(){let e=[];return e.push(this.LoopVertex),e}},Lwe=class{constructor(e,t,i){this.expressID=e,this.type=t,this.VertexGeometry=i}static FromTape(e,t,i){let r=0,n=i[r++];return new Lwe(e,t,n)}ToTape(){let e=[];return e.push(this.VertexGeometry),e}},Fwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Fwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Hwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Hwe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Uwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Uwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Bwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Bwe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},kwe=class{constructor(e,t,i,r,n,s,a,o,l,h){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++];return new kwe(e,t,n,s,a,o,l,h,u,c)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e}},Gwe=class{constructor(e,t,i,r){this.expressID=e,this.type=t,this.IntersectingAxes=i,this.OffsetDistances=r}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++];return new Gwe(e,t,n,s)}ToTape(){let e=[];return e.push(this.IntersectingAxes),e.push(this.OffsetDistances),e}},Vwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Vwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},zwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new zwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},jwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new jwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Wwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Wwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},qwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new qwe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},Ywe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Ywe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.PredefinedType),e}},Xwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++];return new Xwe(e,t,n,s,a,o,l,h,u,c,p,d)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e}},$we=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.OverallHeight=u,this.OverallWidth=c,this.PredefinedType=p,this.PartitioningType=d,this.UserDefinedPartitioningType=f}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++];return new $we(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.OverallHeight),e.push(this.OverallWidth),e.push(this.PredefinedType),e.push(this.PartitioningType),e.push(this.UserDefinedPartitioningType),e}},Kwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m,g,y){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.LiningDepth=a,this.LiningThickness=o,this.TransomThickness=l,this.MullionThickness=h,this.FirstTransomOffset=u,this.SecondTransomOffset=c,this.FirstMullionOffset=p,this.SecondMullionOffset=d,this.ShapeAspectStyle=f,this.LiningOffset=m,this.LiningToPanelOffsetX=g,this.LiningToPanelOffsetY=y}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++],v=i[r++],T=i[r++];return new Kwe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y,v,T)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.LiningDepth),e.push(this.LiningThickness),e.push(this.TransomThickness),e.push(this.MullionThickness),e.push(this.FirstTransomOffset),e.push(this.SecondTransomOffset),e.push(this.FirstMullionOffset),e.push(this.SecondMullionOffset),e.push(this.ShapeAspectStyle),e.push(this.LiningOffset),e.push(this.LiningToPanelOffsetX),e.push(this.LiningToPanelOffsetY),e}},Zwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.OperationType=a,this.PanelPosition=o,this.FrameDepth=l,this.FrameThickness=h,this.ShapeAspectStyle=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new Zwe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.OperationType),e.push(this.PanelPosition),e.push(this.FrameDepth),e.push(this.FrameThickness),e.push(this.ShapeAspectStyle),e}},Jwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.ObjectPlacement=o,this.Representation=l,this.Tag=h,this.OverallHeight=u,this.OverallWidth=c,this.PredefinedType=p,this.PartitioningType=d,this.UserDefinedPartitioningType=f}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++];return new Jwe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.ObjectPlacement),e.push(this.Representation),e.push(this.Tag),e.push(this.OverallHeight),e.push(this.OverallWidth),e.push(this.PredefinedType),e.push(this.PartitioningType),e.push(this.UserDefinedPartitioningType),e}},Qwe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ConstructionType=u,this.OperationType=c,this.ParameterTakesPrecedence=p,this.Sizeable=d}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++];return new Qwe(e,t,n,s,a,o,l,h,u,c,p,d,f,m)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ConstructionType),e.push(this.OperationType),e.push(this.ParameterTakesPrecedence),e.push(this.Sizeable),e}},eRe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ApplicableOccurrence=a,this.HasPropertySets=o,this.RepresentationMaps=l,this.Tag=h,this.ElementType=u,this.PredefinedType=c,this.PartitioningType=p,this.ParameterTakesPrecedence=d,this.UserDefinedPartitioningType=f}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++];return new eRe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ApplicableOccurrence),e.push(this.HasPropertySets),e.push(this.RepresentationMaps),e.push(this.Tag),e.push(this.ElementType),e.push(this.PredefinedType),e.push(this.PartitioningType),e.push(this.ParameterTakesPrecedence),e.push(this.UserDefinedPartitioningType),e}},tRe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.WorkingTimes=l,this.ExceptionTimes=h,this.PredefinedType=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new tRe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.WorkingTimes),e.push(this.ExceptionTimes),e.push(this.PredefinedType),e}},rRe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.CreationDate=l,this.Creators=h,this.Purpose=u,this.Duration=c,this.TotalFloat=p,this.StartTime=d,this.FinishTime=f}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++];return new rRe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.CreationDate),e.push(this.Creators),e.push(this.Purpose),e.push(this.Duration),e.push(this.TotalFloat),e.push(this.StartTime),e.push(this.FinishTime),e}},iRe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.CreationDate=l,this.Creators=h,this.Purpose=u,this.Duration=c,this.TotalFloat=p,this.StartTime=d,this.FinishTime=f,this.PredefinedType=m}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++];return new iRe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.CreationDate),e.push(this.Creators),e.push(this.Purpose),e.push(this.Duration),e.push(this.TotalFloat),e.push(this.StartTime),e.push(this.FinishTime),e.push(this.PredefinedType),e}},nRe=class{constructor(e,t,i,r,n,s,a,o,l,h,u,c,p,d,f,m){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.Identification=o,this.CreationDate=l,this.Creators=h,this.Purpose=u,this.Duration=c,this.TotalFloat=p,this.StartTime=d,this.FinishTime=f,this.PredefinedType=m}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++],d=i[r++],f=i[r++],m=i[r++],g=i[r++],y=i[r++];return new nRe(e,t,n,s,a,o,l,h,u,c,p,d,f,m,g,y)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.Identification),e.push(this.CreationDate),e.push(this.Creators),e.push(this.Purpose),e.push(this.Duration),e.push(this.TotalFloat),e.push(this.StartTime),e.push(this.FinishTime),e.push(this.PredefinedType),e}},sRe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.Name=i,this.DataOrigin=r,this.UserDefinedDataOrigin=n,this.RecurrencePattern=s,this.Start=a,this.Finish=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new sRe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.Name),e.push(this.DataOrigin),e.push(this.UserDefinedDataOrigin),e.push(this.RecurrencePattern),e.push(this.Start),e.push(this.Finish),e}},aRe=class{constructor(e,t,i,r,n,s,a,o,l,h,u){this.expressID=e,this.type=t,this.ProfileType=i,this.ProfileName=r,this.Position=n,this.Depth=s,this.FlangeWidth=a,this.WebThickness=o,this.FlangeThickness=l,this.FilletRadius=h,this.EdgeRadius=u}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],p=i[r++];return new aRe(e,t,n,s,a,o,l,h,u,c,p)}ToTape(){let e=[];return e.push(this.ProfileType),e.push(this.ProfileName),e.push(this.Position),e.push(this.Depth),e.push(this.FlangeWidth),e.push(this.WebThickness),e.push(this.FlangeThickness),e.push(this.FilletRadius),e.push(this.EdgeRadius),e}},oRe=class{constructor(e,t,i,r,n,s,a,o){this.expressID=e,this.type=t,this.GlobalId=i,this.OwnerHistory=r,this.Name=n,this.Description=s,this.ObjectType=a,this.LongName=o}static FromTape(e,t,i){let r=0,n=i[r++],s=i[r++],a=i[r++],o=i[r++],l=i[r++],h=i[r++];return new oRe(e,t,n,s,a,o,l,h)}ToTape(){let e=[];return e.push(this.GlobalId),e.push(this.OwnerHistory),e.push(this.Name),e.push(this.Description),e.push(this.ObjectType),e.push(this.LongName),e}},kde=rEt(),n8=class{constructor(){this.wasmModule=void 0,this.fs=void 0}Init(){return eEt(this,null,(function*(){kde?(this.wasmModule=yield kde({noInitialRun:!0}),this.fs=this.wasmModule.FS):console.error("Could not find wasm module at './web-ifc' from web-ifc-api.ts")}))}OpenModel(e,t){this.wasmModule.FS_createDataFile("/","filename",e,!0,!0,!0);let i=Bde({COORDINATE_TO_ORIGIN:!1,USE_FAST_BOOLS:!1,CIRCLE_SEGMENTS_LOW:5,CIRCLE_SEGMENTS_MEDIUM:8,CIRCLE_SEGMENTS_HIGH:12},t),r=this.wasmModule.OpenModel(i);return this.wasmModule.FS_unlink("/filename"),r}CreateModel(e){let t=Bde({COORDINATE_TO_ORIGIN:!1,USE_FAST_BOOLS:!1,CIRCLE_SEGMENTS_LOW:5,CIRCLE_SEGMENTS_MEDIUM:8,CIRCLE_SEGMENTS_HIGH:12},e);return this.wasmModule.CreateModel(t)}ExportFileAsIFC(e){this.wasmModule.ExportFileAsIFC(e);let t=this.fs.readFile("/export.ifc");return this.wasmModule.FS_unlink("/export.ifc"),t}GetGeometry(e,t){return this.wasmModule.GetGeometry(e,t)}GetLine(e,t,i=!1){let r=this.GetRawLineData(e,t),n=O[r.type](r);return i&&this.FlattenLine(e,n),n}WriteLine(e,t){Object.keys(t).forEach((i=>{let r=t[i];if(r&&void 0!==r.expressID)this.WriteLine(e,r),t[i]={type:5,value:r.expressID};else if(Array.isArray(r)&&r.length>0)for(let n=0;n{let r=t[i];if(r&&5===r.type)t[i]=this.GetLine(e,r.value,!0);else if(Array.isArray(r)&&r.length>0&&5===r[0].type)for(let n=0;nzo(e,t),cRe=(e,t)=>new Wt(new Float32Array(e),t),nPt=(e,t)=>new Wt(new Uint32Array(e),t),s8="default",zl={aggregates:{name:zk,relating:"RelatingObject",related:"RelatedObjects",key:"children"},spatial:{name:Wk,relating:"RelatingStructure",related:"RelatedElements",key:"children"},psets:{name:qk,relating:"RelatingPropertyDefinition",related:"RelatedObjects",key:"hasPsets"},materials:{name:jk,relating:"RelatingMaterial",related:"RelatedObjects",key:"hasMaterial"},type:{name:Yk,relating:"RelatingType",related:"RelatedObjects",key:"hasType"}},a8=class{constructor(e,t){this.state=e,this.BVH=t,this.loadedModels=0,this.currentWebIfcID=-1,this.currentModelID=-1}parse(e){return ht(this,null,(function*(){return void 0===this.state.api.wasmModule&&(yield this.state.api.Init()),this.newIfcModel(e),this.loadedModels++,this.loadAllGeometry()}))}newIfcModel(e){let t=new Uint8Array(e);this.currentWebIfcID=this.state.api.OpenModel(t,this.state.webIfcSettings),this.currentModelID=this.state.useJSON?this.loadedModels:this.currentWebIfcID,this.state.models[this.currentModelID]={modelID:this.currentModelID,mesh:{},items:{},types:{},jsonData:{}}}loadAllGeometry(){return this.saveAllPlacedGeometriesByMaterial(),this.generateAllGeometriesByMaterial()}generateAllGeometriesByMaterial(){let{geometry:e,materials:t}=this.getGeometryAndMaterials();this.BVH.applyThreeMeshBVH(e);let i=new rt(e,t);return i.modelID=this.currentModelID,this.state.models[this.currentModelID].mesh=i,i}getGeometryAndMaterials(){let e=this.state.models[this.currentModelID].items,t=[],i=[];for(let r in e){i.push(e[r].material);let n=Object.values(e[r].geometries);t.push(GT(n))}return{geometry:GT(t,!0),materials:i}}saveAllPlacedGeometriesByMaterial(){let e=this.state.api.LoadAllGeometry(this.currentWebIfcID);for(let t=0;t0?GT(e,t):new lt}isConfigValid(e){return this.isValid(e.scene)&&this.isValid(e.modelID)&&this.isValid(e.ids)&&this.isValid(e.removePrevious)}isValid(e){return null!=e}getGeomAndMat(e){let t=[],i=[];for(let r in e){let n=Object.values(e[r].geometries);n.length&&(i.push(e[r].material),n.length>1?t.push(GT(n)):t.push(...n))}return{geomsByMaterial:t,materials:i}}updatePreviousSelection(e,t){let i=this.selected[this.matID(t)];if(!i)return this.newSelectionGroup(t);e.remove(i.mesh),t.removePrevious?i.ids=new Set(t.ids):t.ids.forEach((e=>i.ids.add(e)))}newSelectionGroup(e){this.selected[this.matID(e)]={ids:new Set(e.ids),mesh:{}}}isPreviousSelection(e){if(!this.selected[this.matID(e)])return!1;if(this.containsIds(e))return!0;let t=this.selected[this.matID(e)].ids;return JSON.stringify(e.ids)===JSON.stringify(t)}containsIds(e){let t=e.ids,i=Array.from(this.selected[this.matID(e)].ids);return t.every((r=0,e=>r=i.indexOf(e,r)+1));var r}addToPreviousSelection(e){let t=this.selected[this.matID(e)],i=this.filter(e),r=Object.values(i).map((e=>Object.values(e.geometries))).flat(),n=t.mesh.geometry;t.mesh.geometry=GT([n,...r]),e.ids.forEach((e=>t.ids.add(e)))}filter(e){let t=this.selected[this.matID(e)].ids,i=this.state.models[e.modelID].items,r={};for(let e in i)r[e]={material:i[e].material,geometries:this.filterGeometries(t,i[e].geometries)};return r}filterGeometries(e,t){let i=Array.from(e);return Object.keys(t).filter((e=>i.includes(parseInt(e,10)))).reduce(((e,i)=>Dn(Br({},e),{[i]:t[i]})),{})}isEasySelection(e){let t=this.matID(e);if(!e.removePrevious&&!this.isDefaultMat(e)&&this.selected[t])return!0}isDefaultMat(e){return this.matIDNoConfig(e.modelID)===this.matID(e)}matID(e){let t;return t=e.material&&e.material.uuid||s8,t.concat(" - ").concat(e.modelID.toString())}matIDNoConfig(e,t){let i=s8;return t&&(i=t.uuid),i.concat(" - ").concat(e.toString())}},f8={103090709:"IFCPROJECT",4097777520:"IFCSITE",4031249490:"IFCBUILDING",3124254112:"IFCBUILDINGSTOREY",3856911033:"IFCSPACE",1674181508:"IFCANNOTATION",25142252:"IFCCONTROLLER",32344328:"IFCBOILER",76236018:"IFCLAMP",90941305:"IFCPUMP",177149247:"IFCAIRTERMINALBOX",182646315:"IFCFLOWINSTRUMENT",263784265:"IFCFURNISHINGELEMENT",264262732:"IFCELECTRICGENERATOR",277319702:"IFCAUDIOVISUALAPPLIANCE",310824031:"IFCPIPEFITTING",331165859:"IFCSTAIR",342316401:"IFCDUCTFITTING",377706215:"IFCMECHANICALFASTENER",395920057:"IFCDOOR",402227799:"IFCELECTRICMOTOR",413509423:"IFCSYSTEMFURNITUREELEMENT",484807127:"IFCEVAPORATOR",486154966:"IFCWINDOWSTANDARDCASE",629592764:"IFCLIGHTFIXTURE",630975310:"IFCUNITARYCONTROLELEMENT",635142910:"IFCCABLECARRIERFITTING",639361253:"IFCCOIL",647756555:"IFCFASTENER",707683696:"IFCFLOWSTORAGEDEVICE",738039164:"IFCPROTECTIVEDEVICE",753842376:"IFCBEAM",812556717:"IFCTANK",819412036:"IFCFILTER",843113511:"IFCCOLUMN",862014818:"IFCELECTRICDISTRIBUTIONBOARD",900683007:"IFCFOOTING",905975707:"IFCCOLUMNSTANDARDCASE",926996030:"IFCVOIDINGFEATURE",979691226:"IFCREINFORCINGBAR",987401354:"IFCFLOWSEGMENT",1003880860:"IFCELECTRICTIMECONTROL",1051757585:"IFCCABLEFITTING",1052013943:"IFCDISTRIBUTIONCHAMBERELEMENT",1062813311:"IFCDISTRIBUTIONCONTROLELEMENT",1073191201:"IFCMEMBER",1095909175:"IFCBUILDINGELEMENTPROXY",1156407060:"IFCPLATESTANDARDCASE",1162798199:"IFCSWITCHINGDEVICE",1329646415:"IFCSHADINGDEVICE",1335981549:"IFCDISCRETEACCESSORY",1360408905:"IFCDUCTSILENCER",1404847402:"IFCSTACKTERMINAL",1426591983:"IFCFIRESUPPRESSIONTERMINAL",1437502449:"IFCMEDICALDEVICE",1509553395:"IFCFURNITURE",1529196076:"IFCSLAB",1620046519:"IFCTRANSPORTELEMENT",1634111441:"IFCAIRTERMINAL",1658829314:"IFCENERGYCONVERSIONDEVICE",1677625105:"IFCCIVILELEMENT",1687234759:"IFCPILE",1904799276:"IFCELECTRICAPPLIANCE",1911478936:"IFCMEMBERSTANDARDCASE",1945004755:"IFCDISTRIBUTIONELEMENT",1973544240:"IFCCOVERING",1999602285:"IFCSPACEHEATER",2016517767:"IFCROOF",2056796094:"IFCAIRTOAIRHEATRECOVERY",2058353004:"IFCFLOWCONTROLLER",2068733104:"IFCHUMIDIFIER",2176052936:"IFCJUNCTIONBOX",2188021234:"IFCFLOWMETER",2223149337:"IFCFLOWTERMINAL",2262370178:"IFCRAILING",2272882330:"IFCCONDENSER",2295281155:"IFCPROTECTIVEDEVICETRIPPINGUNIT",2320036040:"IFCREINFORCINGMESH",2347447852:"IFCTENDONANCHOR",2391383451:"IFCVIBRATIONISOLATOR",2391406946:"IFCWALL",2474470126:"IFCMOTORCONNECTION",2769231204:"IFCVIRTUALELEMENT",2814081492:"IFCENGINE",2906023776:"IFCBEAMSTANDARDCASE",2938176219:"IFCBURNER",2979338954:"IFCBUILDINGELEMENTPART",3024970846:"IFCRAMP",3026737570:"IFCTUBEBUNDLE",3027962421:"IFCSLABSTANDARDCASE",3040386961:"IFCDISTRIBUTIONFLOWELEMENT",3053780830:"IFCSANITARYTERMINAL",3079942009:"IFCOPENINGSTANDARDCASE",3087945054:"IFCALARM",3101698114:"IFCSURFACEFEATURE",3127900445:"IFCSLABELEMENTEDCASE",3132237377:"IFCFLOWMOVINGDEVICE",3171933400:"IFCPLATE",3221913625:"IFCCOMMUNICATIONSAPPLIANCE",3242481149:"IFCDOORSTANDARDCASE",3283111854:"IFCRAMPFLIGHT",3296154744:"IFCCHIMNEY",3304561284:"IFCWINDOW",3310460725:"IFCELECTRICFLOWSTORAGEDEVICE",3319311131:"IFCHEATEXCHANGER",3415622556:"IFCFAN",3420628829:"IFCSOLARDEVICE",3493046030:"IFCGEOGRAPHICELEMENT",3495092785:"IFCCURTAINWALL",3508470533:"IFCFLOWTREATMENTDEVICE",3512223829:"IFCWALLSTANDARDCASE",3518393246:"IFCDUCTSEGMENT",3571504051:"IFCCOMPRESSOR",3588315303:"IFCOPENINGELEMENT",3612865200:"IFCPIPESEGMENT",3640358203:"IFCCOOLINGTOWER",3651124850:"IFCPROJECTIONELEMENT",3694346114:"IFCOUTLET",3747195512:"IFCEVAPORATIVECOOLER",3758799889:"IFCCABLECARRIERSEGMENT",3824725483:"IFCTENDON",3825984169:"IFCTRANSFORMER",3902619387:"IFCCHILLER",4074379575:"IFCDAMPER",4086658281:"IFCSENSOR",4123344466:"IFCELEMENTASSEMBLY",4136498852:"IFCCOOLEDBEAM",4156078855:"IFCWALLELEMENTEDCASE",4175244083:"IFCINTERCEPTOR",4207607924:"IFCVALVE",4217484030:"IFCCABLESEGMENT",4237592921:"IFCWASTETERMINAL",4252922144:"IFCSTAIRFLIGHT",4278956645:"IFCFLOWFITTING",4288193352:"IFCACTUATOR",4292641817:"IFCUNITARYEQUIPMENT",3009204131:"IFCGRID"},sPt={3821786052:"IFCACTIONREQUEST",2296667514:"IFCACTOR",3630933823:"IFCACTORROLE",4288193352:"IFCACTUATOR",2874132201:"IFCACTUATORTYPE",618182010:"IFCADDRESS",1635779807:"IFCADVANCEDBREP",2603310189:"IFCADVANCEDBREPWITHVOIDS",3406155212:"IFCADVANCEDFACE",1634111441:"IFCAIRTERMINAL",177149247:"IFCAIRTERMINALBOX",1411407467:"IFCAIRTERMINALBOXTYPE",3352864051:"IFCAIRTERMINALTYPE",2056796094:"IFCAIRTOAIRHEATRECOVERY",1871374353:"IFCAIRTOAIRHEATRECOVERYTYPE",3087945054:"IFCALARM",3001207471:"IFCALARMTYPE",325726236:"IFCALIGNMENT",749761778:"IFCALIGNMENT2DHORIZONTAL",3199563722:"IFCALIGNMENT2DHORIZONTALSEGMENT",2483840362:"IFCALIGNMENT2DSEGMENT",3379348081:"IFCALIGNMENT2DVERSEGCIRCULARARC",3239324667:"IFCALIGNMENT2DVERSEGLINE",4263986512:"IFCALIGNMENT2DVERSEGPARABOLICARC",53199957:"IFCALIGNMENT2DVERTICAL",2029264950:"IFCALIGNMENT2DVERTICALSEGMENT",3512275521:"IFCALIGNMENTCURVE",1674181508:"IFCANNOTATION",669184980:"IFCANNOTATIONFILLAREA",639542469:"IFCAPPLICATION",411424972:"IFCAPPLIEDVALUE",130549933:"IFCAPPROVAL",3869604511:"IFCAPPROVALRELATIONSHIP",3798115385:"IFCARBITRARYCLOSEDPROFILEDEF",1310608509:"IFCARBITRARYOPENPROFILEDEF",2705031697:"IFCARBITRARYPROFILEDEFWITHVOIDS",3460190687:"IFCASSET",3207858831:"IFCASYMMETRICISHAPEPROFILEDEF",277319702:"IFCAUDIOVISUALAPPLIANCE",1532957894:"IFCAUDIOVISUALAPPLIANCETYPE",4261334040:"IFCAXIS1PLACEMENT",3125803723:"IFCAXIS2PLACEMENT2D",2740243338:"IFCAXIS2PLACEMENT3D",1967976161:"IFCBSPLINECURVE",2461110595:"IFCBSPLINECURVEWITHKNOTS",2887950389:"IFCBSPLINESURFACE",167062518:"IFCBSPLINESURFACEWITHKNOTS",753842376:"IFCBEAM",2906023776:"IFCBEAMSTANDARDCASE",819618141:"IFCBEAMTYPE",4196446775:"IFCBEARING",3649138523:"IFCBEARINGTYPE",616511568:"IFCBLOBTEXTURE",1334484129:"IFCBLOCK",32344328:"IFCBOILER",231477066:"IFCBOILERTYPE",3649129432:"IFCBOOLEANCLIPPINGRESULT",2736907675:"IFCBOOLEANRESULT",4037036970:"IFCBOUNDARYCONDITION",1136057603:"IFCBOUNDARYCURVE",1560379544:"IFCBOUNDARYEDGECONDITION",3367102660:"IFCBOUNDARYFACECONDITION",1387855156:"IFCBOUNDARYNODECONDITION",2069777674:"IFCBOUNDARYNODECONDITIONWARPING",1260505505:"IFCBOUNDEDCURVE",4182860854:"IFCBOUNDEDSURFACE",2581212453:"IFCBOUNDINGBOX",2713105998:"IFCBOXEDHALFSPACE",644574406:"IFCBRIDGE",963979645:"IFCBRIDGEPART",4031249490:"IFCBUILDING",3299480353:"IFCBUILDINGELEMENT",2979338954:"IFCBUILDINGELEMENTPART",39481116:"IFCBUILDINGELEMENTPARTTYPE",1095909175:"IFCBUILDINGELEMENTPROXY",1909888760:"IFCBUILDINGELEMENTPROXYTYPE",1950629157:"IFCBUILDINGELEMENTTYPE",3124254112:"IFCBUILDINGSTOREY",1177604601:"IFCBUILDINGSYSTEM",2938176219:"IFCBURNER",2188180465:"IFCBURNERTYPE",2898889636:"IFCCSHAPEPROFILEDEF",635142910:"IFCCABLECARRIERFITTING",395041908:"IFCCABLECARRIERFITTINGTYPE",3758799889:"IFCCABLECARRIERSEGMENT",3293546465:"IFCCABLECARRIERSEGMENTTYPE",1051757585:"IFCCABLEFITTING",2674252688:"IFCCABLEFITTINGTYPE",4217484030:"IFCCABLESEGMENT",1285652485:"IFCCABLESEGMENTTYPE",3999819293:"IFCCAISSONFOUNDATION",3203706013:"IFCCAISSONFOUNDATIONTYPE",1123145078:"IFCCARTESIANPOINT",574549367:"IFCCARTESIANPOINTLIST",1675464909:"IFCCARTESIANPOINTLIST2D",2059837836:"IFCCARTESIANPOINTLIST3D",59481748:"IFCCARTESIANTRANSFORMATIONOPERATOR",3749851601:"IFCCARTESIANTRANSFORMATIONOPERATOR2D",3486308946:"IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM",3331915920:"IFCCARTESIANTRANSFORMATIONOPERATOR3D",1416205885:"IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM",3150382593:"IFCCENTERLINEPROFILEDEF",3902619387:"IFCCHILLER",2951183804:"IFCCHILLERTYPE",3296154744:"IFCCHIMNEY",2197970202:"IFCCHIMNEYTYPE",2611217952:"IFCCIRCLE",2937912522:"IFCCIRCLEHOLLOWPROFILEDEF",1383045692:"IFCCIRCLEPROFILEDEF",1062206242:"IFCCIRCULARARCSEGMENT2D",1677625105:"IFCCIVILELEMENT",3893394355:"IFCCIVILELEMENTTYPE",747523909:"IFCCLASSIFICATION",647927063:"IFCCLASSIFICATIONREFERENCE",2205249479:"IFCCLOSEDSHELL",639361253:"IFCCOIL",2301859152:"IFCCOILTYPE",776857604:"IFCCOLOURRGB",3285139300:"IFCCOLOURRGBLIST",3264961684:"IFCCOLOURSPECIFICATION",843113511:"IFCCOLUMN",905975707:"IFCCOLUMNSTANDARDCASE",300633059:"IFCCOLUMNTYPE",3221913625:"IFCCOMMUNICATIONSAPPLIANCE",400855858:"IFCCOMMUNICATIONSAPPLIANCETYPE",2542286263:"IFCCOMPLEXPROPERTY",3875453745:"IFCCOMPLEXPROPERTYTEMPLATE",3732776249:"IFCCOMPOSITECURVE",15328376:"IFCCOMPOSITECURVEONSURFACE",2485617015:"IFCCOMPOSITECURVESEGMENT",1485152156:"IFCCOMPOSITEPROFILEDEF",3571504051:"IFCCOMPRESSOR",3850581409:"IFCCOMPRESSORTYPE",2272882330:"IFCCONDENSER",2816379211:"IFCCONDENSERTYPE",2510884976:"IFCCONIC",370225590:"IFCCONNECTEDFACESET",1981873012:"IFCCONNECTIONCURVEGEOMETRY",2859738748:"IFCCONNECTIONGEOMETRY",45288368:"IFCCONNECTIONPOINTECCENTRICITY",2614616156:"IFCCONNECTIONPOINTGEOMETRY",2732653382:"IFCCONNECTIONSURFACEGEOMETRY",775493141:"IFCCONNECTIONVOLUMEGEOMETRY",1959218052:"IFCCONSTRAINT",3898045240:"IFCCONSTRUCTIONEQUIPMENTRESOURCE",2185764099:"IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE",1060000209:"IFCCONSTRUCTIONMATERIALRESOURCE",4105962743:"IFCCONSTRUCTIONMATERIALRESOURCETYPE",488727124:"IFCCONSTRUCTIONPRODUCTRESOURCE",1525564444:"IFCCONSTRUCTIONPRODUCTRESOURCETYPE",2559216714:"IFCCONSTRUCTIONRESOURCE",2574617495:"IFCCONSTRUCTIONRESOURCETYPE",3419103109:"IFCCONTEXT",3050246964:"IFCCONTEXTDEPENDENTUNIT",3293443760:"IFCCONTROL",25142252:"IFCCONTROLLER",578613899:"IFCCONTROLLERTYPE",2889183280:"IFCCONVERSIONBASEDUNIT",2713554722:"IFCCONVERSIONBASEDUNITWITHOFFSET",4136498852:"IFCCOOLEDBEAM",335055490:"IFCCOOLEDBEAMTYPE",3640358203:"IFCCOOLINGTOWER",2954562838:"IFCCOOLINGTOWERTYPE",1785450214:"IFCCOORDINATEOPERATION",1466758467:"IFCCOORDINATEREFERENCESYSTEM",3895139033:"IFCCOSTITEM",1419761937:"IFCCOSTSCHEDULE",602808272:"IFCCOSTVALUE",1973544240:"IFCCOVERING",1916426348:"IFCCOVERINGTYPE",3295246426:"IFCCREWRESOURCE",1815067380:"IFCCREWRESOURCETYPE",2506170314:"IFCCSGPRIMITIVE3D",2147822146:"IFCCSGSOLID",539742890:"IFCCURRENCYRELATIONSHIP",3495092785:"IFCCURTAINWALL",1457835157:"IFCCURTAINWALLTYPE",2601014836:"IFCCURVE",2827736869:"IFCCURVEBOUNDEDPLANE",2629017746:"IFCCURVEBOUNDEDSURFACE",1186437898:"IFCCURVESEGMENT2D",3800577675:"IFCCURVESTYLE",1105321065:"IFCCURVESTYLEFONT",2367409068:"IFCCURVESTYLEFONTANDSCALING",3510044353:"IFCCURVESTYLEFONTPATTERN",1213902940:"IFCCYLINDRICALSURFACE",4074379575:"IFCDAMPER",3961806047:"IFCDAMPERTYPE",3426335179:"IFCDEEPFOUNDATION",1306400036:"IFCDEEPFOUNDATIONTYPE",3632507154:"IFCDERIVEDPROFILEDEF",1765591967:"IFCDERIVEDUNIT",1045800335:"IFCDERIVEDUNITELEMENT",2949456006:"IFCDIMENSIONALEXPONENTS",32440307:"IFCDIRECTION",1335981549:"IFCDISCRETEACCESSORY",2635815018:"IFCDISCRETEACCESSORYTYPE",1945343521:"IFCDISTANCEEXPRESSION",1052013943:"IFCDISTRIBUTIONCHAMBERELEMENT",1599208980:"IFCDISTRIBUTIONCHAMBERELEMENTTYPE",562808652:"IFCDISTRIBUTIONCIRCUIT",1062813311:"IFCDISTRIBUTIONCONTROLELEMENT",2063403501:"IFCDISTRIBUTIONCONTROLELEMENTTYPE",1945004755:"IFCDISTRIBUTIONELEMENT",3256556792:"IFCDISTRIBUTIONELEMENTTYPE",3040386961:"IFCDISTRIBUTIONFLOWELEMENT",3849074793:"IFCDISTRIBUTIONFLOWELEMENTTYPE",3041715199:"IFCDISTRIBUTIONPORT",3205830791:"IFCDISTRIBUTIONSYSTEM",1154170062:"IFCDOCUMENTINFORMATION",770865208:"IFCDOCUMENTINFORMATIONRELATIONSHIP",3732053477:"IFCDOCUMENTREFERENCE",395920057:"IFCDOOR",2963535650:"IFCDOORLININGPROPERTIES",1714330368:"IFCDOORPANELPROPERTIES",3242481149:"IFCDOORSTANDARDCASE",526551008:"IFCDOORSTYLE",2323601079:"IFCDOORTYPE",445594917:"IFCDRAUGHTINGPREDEFINEDCOLOUR",4006246654:"IFCDRAUGHTINGPREDEFINEDCURVEFONT",342316401:"IFCDUCTFITTING",869906466:"IFCDUCTFITTINGTYPE",3518393246:"IFCDUCTSEGMENT",3760055223:"IFCDUCTSEGMENTTYPE",1360408905:"IFCDUCTSILENCER",2030761528:"IFCDUCTSILENCERTYPE",3900360178:"IFCEDGE",476780140:"IFCEDGECURVE",1472233963:"IFCEDGELOOP",1904799276:"IFCELECTRICAPPLIANCE",663422040:"IFCELECTRICAPPLIANCETYPE",862014818:"IFCELECTRICDISTRIBUTIONBOARD",2417008758:"IFCELECTRICDISTRIBUTIONBOARDTYPE",3310460725:"IFCELECTRICFLOWSTORAGEDEVICE",3277789161:"IFCELECTRICFLOWSTORAGEDEVICETYPE",264262732:"IFCELECTRICGENERATOR",1534661035:"IFCELECTRICGENERATORTYPE",402227799:"IFCELECTRICMOTOR",1217240411:"IFCELECTRICMOTORTYPE",1003880860:"IFCELECTRICTIMECONTROL",712377611:"IFCELECTRICTIMECONTROLTYPE",1758889154:"IFCELEMENT",4123344466:"IFCELEMENTASSEMBLY",2397081782:"IFCELEMENTASSEMBLYTYPE",1623761950:"IFCELEMENTCOMPONENT",2590856083:"IFCELEMENTCOMPONENTTYPE",1883228015:"IFCELEMENTQUANTITY",339256511:"IFCELEMENTTYPE",2777663545:"IFCELEMENTARYSURFACE",1704287377:"IFCELLIPSE",2835456948:"IFCELLIPSEPROFILEDEF",1658829314:"IFCENERGYCONVERSIONDEVICE",2107101300:"IFCENERGYCONVERSIONDEVICETYPE",2814081492:"IFCENGINE",132023988:"IFCENGINETYPE",3747195512:"IFCEVAPORATIVECOOLER",3174744832:"IFCEVAPORATIVECOOLERTYPE",484807127:"IFCEVAPORATOR",3390157468:"IFCEVAPORATORTYPE",4148101412:"IFCEVENT",211053100:"IFCEVENTTIME",4024345920:"IFCEVENTTYPE",297599258:"IFCEXTENDEDPROPERTIES",4294318154:"IFCEXTERNALINFORMATION",3200245327:"IFCEXTERNALREFERENCE",1437805879:"IFCEXTERNALREFERENCERELATIONSHIP",1209101575:"IFCEXTERNALSPATIALELEMENT",2853485674:"IFCEXTERNALSPATIALSTRUCTUREELEMENT",2242383968:"IFCEXTERNALLYDEFINEDHATCHSTYLE",1040185647:"IFCEXTERNALLYDEFINEDSURFACESTYLE",3548104201:"IFCEXTERNALLYDEFINEDTEXTFONT",477187591:"IFCEXTRUDEDAREASOLID",2804161546:"IFCEXTRUDEDAREASOLIDTAPERED",2556980723:"IFCFACE",2047409740:"IFCFACEBASEDSURFACEMODEL",1809719519:"IFCFACEBOUND",803316827:"IFCFACEOUTERBOUND",3008276851:"IFCFACESURFACE",807026263:"IFCFACETEDBREP",3737207727:"IFCFACETEDBREPWITHVOIDS",24185140:"IFCFACILITY",1310830890:"IFCFACILITYPART",4219587988:"IFCFAILURECONNECTIONCONDITION",3415622556:"IFCFAN",346874300:"IFCFANTYPE",647756555:"IFCFASTENER",2489546625:"IFCFASTENERTYPE",2827207264:"IFCFEATUREELEMENT",2143335405:"IFCFEATUREELEMENTADDITION",1287392070:"IFCFEATUREELEMENTSUBTRACTION",738692330:"IFCFILLAREASTYLE",374418227:"IFCFILLAREASTYLEHATCHING",315944413:"IFCFILLAREASTYLETILES",819412036:"IFCFILTER",1810631287:"IFCFILTERTYPE",1426591983:"IFCFIRESUPPRESSIONTERMINAL",4222183408:"IFCFIRESUPPRESSIONTERMINALTYPE",2652556860:"IFCFIXEDREFERENCESWEPTAREASOLID",2058353004:"IFCFLOWCONTROLLER",3907093117:"IFCFLOWCONTROLLERTYPE",4278956645:"IFCFLOWFITTING",3198132628:"IFCFLOWFITTINGTYPE",182646315:"IFCFLOWINSTRUMENT",4037862832:"IFCFLOWINSTRUMENTTYPE",2188021234:"IFCFLOWMETER",3815607619:"IFCFLOWMETERTYPE",3132237377:"IFCFLOWMOVINGDEVICE",1482959167:"IFCFLOWMOVINGDEVICETYPE",987401354:"IFCFLOWSEGMENT",1834744321:"IFCFLOWSEGMENTTYPE",707683696:"IFCFLOWSTORAGEDEVICE",1339347760:"IFCFLOWSTORAGEDEVICETYPE",2223149337:"IFCFLOWTERMINAL",2297155007:"IFCFLOWTERMINALTYPE",3508470533:"IFCFLOWTREATMENTDEVICE",3009222698:"IFCFLOWTREATMENTDEVICETYPE",900683007:"IFCFOOTING",1893162501:"IFCFOOTINGTYPE",263784265:"IFCFURNISHINGELEMENT",4238390223:"IFCFURNISHINGELEMENTTYPE",1509553395:"IFCFURNITURE",1268542332:"IFCFURNITURETYPE",3493046030:"IFCGEOGRAPHICELEMENT",4095422895:"IFCGEOGRAPHICELEMENTTYPE",987898635:"IFCGEOMETRICCURVESET",3448662350:"IFCGEOMETRICREPRESENTATIONCONTEXT",2453401579:"IFCGEOMETRICREPRESENTATIONITEM",4142052618:"IFCGEOMETRICREPRESENTATIONSUBCONTEXT",3590301190:"IFCGEOMETRICSET",3009204131:"IFCGRID",852622518:"IFCGRIDAXIS",178086475:"IFCGRIDPLACEMENT",2706460486:"IFCGROUP",812098782:"IFCHALFSPACESOLID",3319311131:"IFCHEATEXCHANGER",1251058090:"IFCHEATEXCHANGERTYPE",2068733104:"IFCHUMIDIFIER",1806887404:"IFCHUMIDIFIERTYPE",1484403080:"IFCISHAPEPROFILEDEF",3905492369:"IFCIMAGETEXTURE",3570813810:"IFCINDEXEDCOLOURMAP",2571569899:"IFCINDEXEDPOLYCURVE",178912537:"IFCINDEXEDPOLYGONALFACE",2294589976:"IFCINDEXEDPOLYGONALFACEWITHVOIDS",1437953363:"IFCINDEXEDTEXTUREMAP",2133299955:"IFCINDEXEDTRIANGLETEXTUREMAP",4175244083:"IFCINTERCEPTOR",3946677679:"IFCINTERCEPTORTYPE",3113134337:"IFCINTERSECTIONCURVE",2391368822:"IFCINVENTORY",3741457305:"IFCIRREGULARTIMESERIES",3020489413:"IFCIRREGULARTIMESERIESVALUE",2176052936:"IFCJUNCTIONBOX",4288270099:"IFCJUNCTIONBOXTYPE",572779678:"IFCLSHAPEPROFILEDEF",3827777499:"IFCLABORRESOURCE",428585644:"IFCLABORRESOURCETYPE",1585845231:"IFCLAGTIME",76236018:"IFCLAMP",1051575348:"IFCLAMPTYPE",2655187982:"IFCLIBRARYINFORMATION",3452421091:"IFCLIBRARYREFERENCE",4162380809:"IFCLIGHTDISTRIBUTIONDATA",629592764:"IFCLIGHTFIXTURE",1161773419:"IFCLIGHTFIXTURETYPE",1566485204:"IFCLIGHTINTENSITYDISTRIBUTION",1402838566:"IFCLIGHTSOURCE",125510826:"IFCLIGHTSOURCEAMBIENT",2604431987:"IFCLIGHTSOURCEDIRECTIONAL",4266656042:"IFCLIGHTSOURCEGONIOMETRIC",1520743889:"IFCLIGHTSOURCEPOSITIONAL",3422422726:"IFCLIGHTSOURCESPOT",1281925730:"IFCLINE",3092502836:"IFCLINESEGMENT2D",388784114:"IFCLINEARPLACEMENT",1154579445:"IFCLINEARPOSITIONINGELEMENT",2624227202:"IFCLOCALPLACEMENT",1008929658:"IFCLOOP",1425443689:"IFCMANIFOLDSOLIDBREP",3057273783:"IFCMAPCONVERSION",2347385850:"IFCMAPPEDITEM",1838606355:"IFCMATERIAL",1847130766:"IFCMATERIALCLASSIFICATIONRELATIONSHIP",3708119e3:"IFCMATERIALCONSTITUENT",2852063980:"IFCMATERIALCONSTITUENTSET",760658860:"IFCMATERIALDEFINITION",2022407955:"IFCMATERIALDEFINITIONREPRESENTATION",248100487:"IFCMATERIALLAYER",3303938423:"IFCMATERIALLAYERSET",1303795690:"IFCMATERIALLAYERSETUSAGE",1847252529:"IFCMATERIALLAYERWITHOFFSETS",2199411900:"IFCMATERIALLIST",2235152071:"IFCMATERIALPROFILE",164193824:"IFCMATERIALPROFILESET",3079605661:"IFCMATERIALPROFILESETUSAGE",3404854881:"IFCMATERIALPROFILESETUSAGETAPERING",552965576:"IFCMATERIALPROFILEWITHOFFSETS",3265635763:"IFCMATERIALPROPERTIES",853536259:"IFCMATERIALRELATIONSHIP",1507914824:"IFCMATERIALUSAGEDEFINITION",2597039031:"IFCMEASUREWITHUNIT",377706215:"IFCMECHANICALFASTENER",2108223431:"IFCMECHANICALFASTENERTYPE",1437502449:"IFCMEDICALDEVICE",1114901282:"IFCMEDICALDEVICETYPE",1073191201:"IFCMEMBER",1911478936:"IFCMEMBERSTANDARDCASE",3181161470:"IFCMEMBERTYPE",3368373690:"IFCMETRIC",2998442950:"IFCMIRROREDPROFILEDEF",2706619895:"IFCMONETARYUNIT",2474470126:"IFCMOTORCONNECTION",977012517:"IFCMOTORCONNECTIONTYPE",1918398963:"IFCNAMEDUNIT",3888040117:"IFCOBJECT",219451334:"IFCOBJECTDEFINITION",3701648758:"IFCOBJECTPLACEMENT",2251480897:"IFCOBJECTIVE",4143007308:"IFCOCCUPANT",590820931:"IFCOFFSETCURVE",3388369263:"IFCOFFSETCURVE2D",3505215534:"IFCOFFSETCURVE3D",2485787929:"IFCOFFSETCURVEBYDISTANCES",2665983363:"IFCOPENSHELL",3588315303:"IFCOPENINGELEMENT",3079942009:"IFCOPENINGSTANDARDCASE",4251960020:"IFCORGANIZATION",1411181986:"IFCORGANIZATIONRELATIONSHIP",643959842:"IFCORIENTATIONEXPRESSION",1029017970:"IFCORIENTEDEDGE",144952367:"IFCOUTERBOUNDARYCURVE",3694346114:"IFCOUTLET",2837617999:"IFCOUTLETTYPE",1207048766:"IFCOWNERHISTORY",2529465313:"IFCPARAMETERIZEDPROFILEDEF",2519244187:"IFCPATH",1682466193:"IFCPCURVE",2382730787:"IFCPERFORMANCEHISTORY",3566463478:"IFCPERMEABLECOVERINGPROPERTIES",3327091369:"IFCPERMIT",2077209135:"IFCPERSON",101040310:"IFCPERSONANDORGANIZATION",3021840470:"IFCPHYSICALCOMPLEXQUANTITY",2483315170:"IFCPHYSICALQUANTITY",2226359599:"IFCPHYSICALSIMPLEQUANTITY",1687234759:"IFCPILE",1158309216:"IFCPILETYPE",310824031:"IFCPIPEFITTING",804291784:"IFCPIPEFITTINGTYPE",3612865200:"IFCPIPESEGMENT",4231323485:"IFCPIPESEGMENTTYPE",597895409:"IFCPIXELTEXTURE",2004835150:"IFCPLACEMENT",603570806:"IFCPLANARBOX",1663979128:"IFCPLANAREXTENT",220341763:"IFCPLANE",3171933400:"IFCPLATE",1156407060:"IFCPLATESTANDARDCASE",4017108033:"IFCPLATETYPE",2067069095:"IFCPOINT",4022376103:"IFCPOINTONCURVE",1423911732:"IFCPOINTONSURFACE",2924175390:"IFCPOLYLOOP",2775532180:"IFCPOLYGONALBOUNDEDHALFSPACE",2839578677:"IFCPOLYGONALFACESET",3724593414:"IFCPOLYLINE",3740093272:"IFCPORT",1946335990:"IFCPOSITIONINGELEMENT",3355820592:"IFCPOSTALADDRESS",759155922:"IFCPREDEFINEDCOLOUR",2559016684:"IFCPREDEFINEDCURVEFONT",3727388367:"IFCPREDEFINEDITEM",3778827333:"IFCPREDEFINEDPROPERTIES",3967405729:"IFCPREDEFINEDPROPERTYSET",1775413392:"IFCPREDEFINEDTEXTFONT",677532197:"IFCPRESENTATIONITEM",2022622350:"IFCPRESENTATIONLAYERASSIGNMENT",1304840413:"IFCPRESENTATIONLAYERWITHSTYLE",3119450353:"IFCPRESENTATIONSTYLE",2417041796:"IFCPRESENTATIONSTYLEASSIGNMENT",2744685151:"IFCPROCEDURE",569719735:"IFCPROCEDURETYPE",2945172077:"IFCPROCESS",4208778838:"IFCPRODUCT",673634403:"IFCPRODUCTDEFINITIONSHAPE",2095639259:"IFCPRODUCTREPRESENTATION",3958567839:"IFCPROFILEDEF",2802850158:"IFCPROFILEPROPERTIES",103090709:"IFCPROJECT",653396225:"IFCPROJECTLIBRARY",2904328755:"IFCPROJECTORDER",3843373140:"IFCPROJECTEDCRS",3651124850:"IFCPROJECTIONELEMENT",2598011224:"IFCPROPERTY",986844984:"IFCPROPERTYABSTRACTION",871118103:"IFCPROPERTYBOUNDEDVALUE",1680319473:"IFCPROPERTYDEFINITION",148025276:"IFCPROPERTYDEPENDENCYRELATIONSHIP",4166981789:"IFCPROPERTYENUMERATEDVALUE",3710013099:"IFCPROPERTYENUMERATION",2752243245:"IFCPROPERTYLISTVALUE",941946838:"IFCPROPERTYREFERENCEVALUE",1451395588:"IFCPROPERTYSET",3357820518:"IFCPROPERTYSETDEFINITION",492091185:"IFCPROPERTYSETTEMPLATE",3650150729:"IFCPROPERTYSINGLEVALUE",110355661:"IFCPROPERTYTABLEVALUE",3521284610:"IFCPROPERTYTEMPLATE",1482703590:"IFCPROPERTYTEMPLATEDEFINITION",738039164:"IFCPROTECTIVEDEVICE",2295281155:"IFCPROTECTIVEDEVICETRIPPINGUNIT",655969474:"IFCPROTECTIVEDEVICETRIPPINGUNITTYPE",1842657554:"IFCPROTECTIVEDEVICETYPE",3219374653:"IFCPROXY",90941305:"IFCPUMP",2250791053:"IFCPUMPTYPE",2044713172:"IFCQUANTITYAREA",2093928680:"IFCQUANTITYCOUNT",931644368:"IFCQUANTITYLENGTH",2090586900:"IFCQUANTITYSET",3252649465:"IFCQUANTITYTIME",2405470396:"IFCQUANTITYVOLUME",825690147:"IFCQUANTITYWEIGHT",2262370178:"IFCRAILING",2893384427:"IFCRAILINGTYPE",3024970846:"IFCRAMP",3283111854:"IFCRAMPFLIGHT",2324767716:"IFCRAMPFLIGHTTYPE",1469900589:"IFCRAMPTYPE",1232101972:"IFCRATIONALBSPLINECURVEWITHKNOTS",683857671:"IFCRATIONALBSPLINESURFACEWITHKNOTS",2770003689:"IFCRECTANGLEHOLLOWPROFILEDEF",3615266464:"IFCRECTANGLEPROFILEDEF",2798486643:"IFCRECTANGULARPYRAMID",3454111270:"IFCRECTANGULARTRIMMEDSURFACE",3915482550:"IFCRECURRENCEPATTERN",2433181523:"IFCREFERENCE",4021432810:"IFCREFERENT",3413951693:"IFCREGULARTIMESERIES",1580146022:"IFCREINFORCEMENTBARPROPERTIES",3765753017:"IFCREINFORCEMENTDEFINITIONPROPERTIES",979691226:"IFCREINFORCINGBAR",2572171363:"IFCREINFORCINGBARTYPE",3027567501:"IFCREINFORCINGELEMENT",964333572:"IFCREINFORCINGELEMENTTYPE",2320036040:"IFCREINFORCINGMESH",2310774935:"IFCREINFORCINGMESHTYPE",160246688:"IFCRELAGGREGATES",3939117080:"IFCRELASSIGNS",1683148259:"IFCRELASSIGNSTOACTOR",2495723537:"IFCRELASSIGNSTOCONTROL",1307041759:"IFCRELASSIGNSTOGROUP",1027710054:"IFCRELASSIGNSTOGROUPBYFACTOR",4278684876:"IFCRELASSIGNSTOPROCESS",2857406711:"IFCRELASSIGNSTOPRODUCT",205026976:"IFCRELASSIGNSTORESOURCE",1865459582:"IFCRELASSOCIATES",4095574036:"IFCRELASSOCIATESAPPROVAL",919958153:"IFCRELASSOCIATESCLASSIFICATION",2728634034:"IFCRELASSOCIATESCONSTRAINT",982818633:"IFCRELASSOCIATESDOCUMENT",3840914261:"IFCRELASSOCIATESLIBRARY",2655215786:"IFCRELASSOCIATESMATERIAL",826625072:"IFCRELCONNECTS",1204542856:"IFCRELCONNECTSELEMENTS",3945020480:"IFCRELCONNECTSPATHELEMENTS",4201705270:"IFCRELCONNECTSPORTTOELEMENT",3190031847:"IFCRELCONNECTSPORTS",2127690289:"IFCRELCONNECTSSTRUCTURALACTIVITY",1638771189:"IFCRELCONNECTSSTRUCTURALMEMBER",504942748:"IFCRELCONNECTSWITHECCENTRICITY",3678494232:"IFCRELCONNECTSWITHREALIZINGELEMENTS",3242617779:"IFCRELCONTAINEDINSPATIALSTRUCTURE",886880790:"IFCRELCOVERSBLDGELEMENTS",2802773753:"IFCRELCOVERSSPACES",2565941209:"IFCRELDECLARES",2551354335:"IFCRELDECOMPOSES",693640335:"IFCRELDEFINES",1462361463:"IFCRELDEFINESBYOBJECT",4186316022:"IFCRELDEFINESBYPROPERTIES",307848117:"IFCRELDEFINESBYTEMPLATE",781010003:"IFCRELDEFINESBYTYPE",3940055652:"IFCRELFILLSELEMENT",279856033:"IFCRELFLOWCONTROLELEMENTS",427948657:"IFCRELINTERFERESELEMENTS",3268803585:"IFCRELNESTS",1441486842:"IFCRELPOSITIONS",750771296:"IFCRELPROJECTSELEMENT",1245217292:"IFCRELREFERENCEDINSPATIALSTRUCTURE",4122056220:"IFCRELSEQUENCE",366585022:"IFCRELSERVICESBUILDINGS",3451746338:"IFCRELSPACEBOUNDARY",3523091289:"IFCRELSPACEBOUNDARY1STLEVEL",1521410863:"IFCRELSPACEBOUNDARY2NDLEVEL",1401173127:"IFCRELVOIDSELEMENT",478536968:"IFCRELATIONSHIP",816062949:"IFCREPARAMETRISEDCOMPOSITECURVESEGMENT",1076942058:"IFCREPRESENTATION",3377609919:"IFCREPRESENTATIONCONTEXT",3008791417:"IFCREPRESENTATIONITEM",1660063152:"IFCREPRESENTATIONMAP",2914609552:"IFCRESOURCE",2943643501:"IFCRESOURCEAPPROVALRELATIONSHIP",1608871552:"IFCRESOURCECONSTRAINTRELATIONSHIP",2439245199:"IFCRESOURCELEVELRELATIONSHIP",1042787934:"IFCRESOURCETIME",1856042241:"IFCREVOLVEDAREASOLID",3243963512:"IFCREVOLVEDAREASOLIDTAPERED",4158566097:"IFCRIGHTCIRCULARCONE",3626867408:"IFCRIGHTCIRCULARCYLINDER",2016517767:"IFCROOF",2781568857:"IFCROOFTYPE",2341007311:"IFCROOT",2778083089:"IFCROUNDEDRECTANGLEPROFILEDEF",448429030:"IFCSIUNIT",3053780830:"IFCSANITARYTERMINAL",1768891740:"IFCSANITARYTERMINALTYPE",1054537805:"IFCSCHEDULINGTIME",2157484638:"IFCSEAMCURVE",2042790032:"IFCSECTIONPROPERTIES",4165799628:"IFCSECTIONREINFORCEMENTPROPERTIES",1862484736:"IFCSECTIONEDSOLID",1290935644:"IFCSECTIONEDSOLIDHORIZONTAL",1509187699:"IFCSECTIONEDSPINE",4086658281:"IFCSENSOR",1783015770:"IFCSENSORTYPE",1329646415:"IFCSHADINGDEVICE",4074543187:"IFCSHADINGDEVICETYPE",867548509:"IFCSHAPEASPECT",3982875396:"IFCSHAPEMODEL",4240577450:"IFCSHAPEREPRESENTATION",4124623270:"IFCSHELLBASEDSURFACEMODEL",3692461612:"IFCSIMPLEPROPERTY",3663146110:"IFCSIMPLEPROPERTYTEMPLATE",4097777520:"IFCSITE",1529196076:"IFCSLAB",3127900445:"IFCSLABELEMENTEDCASE",3027962421:"IFCSLABSTANDARDCASE",2533589738:"IFCSLABTYPE",2609359061:"IFCSLIPPAGECONNECTIONCONDITION",3420628829:"IFCSOLARDEVICE",1072016465:"IFCSOLARDEVICETYPE",723233188:"IFCSOLIDMODEL",3856911033:"IFCSPACE",1999602285:"IFCSPACEHEATER",1305183839:"IFCSPACEHEATERTYPE",3812236995:"IFCSPACETYPE",1412071761:"IFCSPATIALELEMENT",710998568:"IFCSPATIALELEMENTTYPE",2706606064:"IFCSPATIALSTRUCTUREELEMENT",3893378262:"IFCSPATIALSTRUCTUREELEMENTTYPE",463610769:"IFCSPATIALZONE",2481509218:"IFCSPATIALZONETYPE",451544542:"IFCSPHERE",4015995234:"IFCSPHERICALSURFACE",1404847402:"IFCSTACKTERMINAL",3112655638:"IFCSTACKTERMINALTYPE",331165859:"IFCSTAIR",4252922144:"IFCSTAIRFLIGHT",1039846685:"IFCSTAIRFLIGHTTYPE",338393293:"IFCSTAIRTYPE",682877961:"IFCSTRUCTURALACTION",3544373492:"IFCSTRUCTURALACTIVITY",2515109513:"IFCSTRUCTURALANALYSISMODEL",1179482911:"IFCSTRUCTURALCONNECTION",2273995522:"IFCSTRUCTURALCONNECTIONCONDITION",1004757350:"IFCSTRUCTURALCURVEACTION",4243806635:"IFCSTRUCTURALCURVECONNECTION",214636428:"IFCSTRUCTURALCURVEMEMBER",2445595289:"IFCSTRUCTURALCURVEMEMBERVARYING",2757150158:"IFCSTRUCTURALCURVEREACTION",3136571912:"IFCSTRUCTURALITEM",1807405624:"IFCSTRUCTURALLINEARACTION",2162789131:"IFCSTRUCTURALLOAD",385403989:"IFCSTRUCTURALLOADCASE",3478079324:"IFCSTRUCTURALLOADCONFIGURATION",1252848954:"IFCSTRUCTURALLOADGROUP",1595516126:"IFCSTRUCTURALLOADLINEARFORCE",609421318:"IFCSTRUCTURALLOADORRESULT",2668620305:"IFCSTRUCTURALLOADPLANARFORCE",2473145415:"IFCSTRUCTURALLOADSINGLEDISPLACEMENT",1973038258:"IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION",1597423693:"IFCSTRUCTURALLOADSINGLEFORCE",1190533807:"IFCSTRUCTURALLOADSINGLEFORCEWARPING",2525727697:"IFCSTRUCTURALLOADSTATIC",3408363356:"IFCSTRUCTURALLOADTEMPERATURE",530289379:"IFCSTRUCTURALMEMBER",1621171031:"IFCSTRUCTURALPLANARACTION",2082059205:"IFCSTRUCTURALPOINTACTION",734778138:"IFCSTRUCTURALPOINTCONNECTION",1235345126:"IFCSTRUCTURALPOINTREACTION",3689010777:"IFCSTRUCTURALREACTION",2986769608:"IFCSTRUCTURALRESULTGROUP",3657597509:"IFCSTRUCTURALSURFACEACTION",1975003073:"IFCSTRUCTURALSURFACECONNECTION",3979015343:"IFCSTRUCTURALSURFACEMEMBER",2218152070:"IFCSTRUCTURALSURFACEMEMBERVARYING",603775116:"IFCSTRUCTURALSURFACEREACTION",2830218821:"IFCSTYLEMODEL",3958052878:"IFCSTYLEDITEM",3049322572:"IFCSTYLEDREPRESENTATION",148013059:"IFCSUBCONTRACTRESOURCE",4095615324:"IFCSUBCONTRACTRESOURCETYPE",2233826070:"IFCSUBEDGE",2513912981:"IFCSURFACE",699246055:"IFCSURFACECURVE",2028607225:"IFCSURFACECURVESWEPTAREASOLID",3101698114:"IFCSURFACEFEATURE",2809605785:"IFCSURFACEOFLINEAREXTRUSION",4124788165:"IFCSURFACEOFREVOLUTION",2934153892:"IFCSURFACEREINFORCEMENTAREA",1300840506:"IFCSURFACESTYLE",3303107099:"IFCSURFACESTYLELIGHTING",1607154358:"IFCSURFACESTYLEREFRACTION",1878645084:"IFCSURFACESTYLERENDERING",846575682:"IFCSURFACESTYLESHADING",1351298697:"IFCSURFACESTYLEWITHTEXTURES",626085974:"IFCSURFACETEXTURE",2247615214:"IFCSWEPTAREASOLID",1260650574:"IFCSWEPTDISKSOLID",1096409881:"IFCSWEPTDISKSOLIDPOLYGONAL",230924584:"IFCSWEPTSURFACE",1162798199:"IFCSWITCHINGDEVICE",2315554128:"IFCSWITCHINGDEVICETYPE",2254336722:"IFCSYSTEM",413509423:"IFCSYSTEMFURNITUREELEMENT",1580310250:"IFCSYSTEMFURNITUREELEMENTTYPE",3071757647:"IFCTSHAPEPROFILEDEF",985171141:"IFCTABLE",2043862942:"IFCTABLECOLUMN",531007025:"IFCTABLEROW",812556717:"IFCTANK",5716631:"IFCTANKTYPE",3473067441:"IFCTASK",1549132990:"IFCTASKTIME",2771591690:"IFCTASKTIMERECURRING",3206491090:"IFCTASKTYPE",912023232:"IFCTELECOMADDRESS",3824725483:"IFCTENDON",2347447852:"IFCTENDONANCHOR",3081323446:"IFCTENDONANCHORTYPE",3663046924:"IFCTENDONCONDUIT",2281632017:"IFCTENDONCONDUITTYPE",2415094496:"IFCTENDONTYPE",2387106220:"IFCTESSELLATEDFACESET",901063453:"IFCTESSELLATEDITEM",4282788508:"IFCTEXTLITERAL",3124975700:"IFCTEXTLITERALWITHEXTENT",1447204868:"IFCTEXTSTYLE",1983826977:"IFCTEXTSTYLEFONTMODEL",2636378356:"IFCTEXTSTYLEFORDEFINEDFONT",1640371178:"IFCTEXTSTYLETEXTMODEL",280115917:"IFCTEXTURECOORDINATE",1742049831:"IFCTEXTURECOORDINATEGENERATOR",2552916305:"IFCTEXTUREMAP",1210645708:"IFCTEXTUREVERTEX",3611470254:"IFCTEXTUREVERTEXLIST",1199560280:"IFCTIMEPERIOD",3101149627:"IFCTIMESERIES",581633288:"IFCTIMESERIESVALUE",1377556343:"IFCTOPOLOGICALREPRESENTATIONITEM",1735638870:"IFCTOPOLOGYREPRESENTATION",1935646853:"IFCTOROIDALSURFACE",3825984169:"IFCTRANSFORMER",1692211062:"IFCTRANSFORMERTYPE",2595432518:"IFCTRANSITIONCURVESEGMENT2D",1620046519:"IFCTRANSPORTELEMENT",2097647324:"IFCTRANSPORTELEMENTTYPE",2715220739:"IFCTRAPEZIUMPROFILEDEF",2916149573:"IFCTRIANGULATEDFACESET",1229763772:"IFCTRIANGULATEDIRREGULARNETWORK",3593883385:"IFCTRIMMEDCURVE",3026737570:"IFCTUBEBUNDLE",1600972822:"IFCTUBEBUNDLETYPE",1628702193:"IFCTYPEOBJECT",3736923433:"IFCTYPEPROCESS",2347495698:"IFCTYPEPRODUCT",3698973494:"IFCTYPERESOURCE",427810014:"IFCUSHAPEPROFILEDEF",180925521:"IFCUNITASSIGNMENT",630975310:"IFCUNITARYCONTROLELEMENT",3179687236:"IFCUNITARYCONTROLELEMENTTYPE",4292641817:"IFCUNITARYEQUIPMENT",1911125066:"IFCUNITARYEQUIPMENTTYPE",4207607924:"IFCVALVE",728799441:"IFCVALVETYPE",1417489154:"IFCVECTOR",2799835756:"IFCVERTEX",2759199220:"IFCVERTEXLOOP",1907098498:"IFCVERTEXPOINT",1530820697:"IFCVIBRATIONDAMPER",3956297820:"IFCVIBRATIONDAMPERTYPE",2391383451:"IFCVIBRATIONISOLATOR",3313531582:"IFCVIBRATIONISOLATORTYPE",2769231204:"IFCVIRTUALELEMENT",891718957:"IFCVIRTUALGRIDINTERSECTION",926996030:"IFCVOIDINGFEATURE",2391406946:"IFCWALL",4156078855:"IFCWALLELEMENTEDCASE",3512223829:"IFCWALLSTANDARDCASE",1898987631:"IFCWALLTYPE",4237592921:"IFCWASTETERMINAL",1133259667:"IFCWASTETERMINALTYPE",3304561284:"IFCWINDOW",336235671:"IFCWINDOWLININGPROPERTIES",512836454:"IFCWINDOWPANELPROPERTIES",486154966:"IFCWINDOWSTANDARDCASE",1299126871:"IFCWINDOWSTYLE",4009809668:"IFCWINDOWTYPE",4088093105:"IFCWORKCALENDAR",1028945134:"IFCWORKCONTROL",4218914973:"IFCWORKPLAN",3342526732:"IFCWORKSCHEDULE",1236880293:"IFCWORKTIME",2543172580:"IFCZSHAPEPROFILEDEF",1033361043:"IFCZONE"},l8=class{constructor(e){this.state=e}getExpressId(e,t){if(!e.index)return;let i=e.index.array;return e.attributes[uRe].getX(i[3*t])}getItemProperties(e,t,i=!1){return this.state.useJSON?Br({},this.state.models[e].jsonData[t]):this.state.api.GetLine(e,t,i)}getAllItemsOfType(e,t,i){return this.state.useJSON?this.getAllItemsOfTypeJSON(e,t,i):this.getAllItemsOfTypeWebIfcAPI(e,t,i)}getPropertySets(e,t,i=!1){return this.state.useJSON?this.getPropertyJSON(e,t,i,zl.psets):this.getPropertyWebIfcAPI(e,t,i,zl.psets)}getTypeProperties(e,t,i=!1){return this.state.useJSON?this.getPropertyJSON(e,t,i,zl.type):this.getPropertyWebIfcAPI(e,t,i,zl.type)}getMaterialsProperties(e,t,i=!1){return this.state.useJSON?this.getPropertyJSON(e,t,i,zl.materials):this.getPropertyWebIfcAPI(e,t,i,zl.materials)}getSpatialStructure(e){return this.state.useJSON?this.getSpatialStructureJSON(e):this.getSpatialStructureWebIfcAPI(e)}getSpatialStructureJSON(e){let t=this.getSpatialTreeChunks(e),i=this.getAllItemsOfTypeJSON(e,pA,!1)[0],r=this.newIfcProject(i);return this.getSpatialNode(e,r,t),Br({},r)}getSpatialStructureWebIfcAPI(e){let t=this.getSpatialTreeChunks(e),i=this.state.api.GetLineIDsWithType(e,pA).get(0),r=this.newIfcProject(i);return this.getSpatialNode(e,r,t),r}getAllItemsOfTypeJSON(e,t,i){let r=this.state.models[e].jsonData,n=sPt[t];if(!n)throw new Error(`Type not found: ${t}`);return this.filterJSONItemsByType(r,n,i)}filterJSONItemsByType(e,t,i){let r=[];return Object.keys(e).forEach((n=>{let s=parseInt(n);e[s].type.toUpperCase()===t&&r.push(i?Br({},e[s]):s)})),r}getItemsByIDJSON(e,t){let i=this.state.models[e].jsonData,r=[];return t.forEach((e=>r.push(Br({},i[e])))),r}getPropertyJSON(e,t,i=!1,r){let n=this.getAllRelatedItemsOfTypeJSON(e,t,r),s=this.getItemsByIDJSON(e,n);return i&&s.forEach((t=>this.getJSONReferencesRecursively(e,t))),s}getJSONReferencesRecursively(e,t){if(null==t)return;let i=Object.keys(t);for(let r=0;r(5===t.type&&(t=this.getItemsByIDJSON(e,[t.value])[0],this.getJSONReferencesRecursively(e,t)),t)))}getPropertyWebIfcAPI(e,t,i=!1,r){return this.getAllRelatedItemsOfTypeWebIfcAPI(e,t,r).map((t=>this.state.api.GetLine(e,t,i)))}getAllItemsOfTypeWebIfcAPI(e,t,i){let r=[],n=this.state.api.GetLineIDsWithType(e,t);for(let e=0;ethis.state.api.GetLine(e,t))):r}newIfcProject(e){return{expressID:e,type:"IFCPROJECT",children:[]}}getSpatialTreeChunks(e){let t={};return this.state.useJSON?(this.getChunksJSON(e,t,zl.aggregates),this.getChunksJSON(e,t,zl.spatial)):(this.getChunksWebIfcAPI(e,t,zl.aggregates),this.getChunksWebIfcAPI(e,t,zl.spatial)),t}getChunksJSON(e,t,i){this.getAllItemsOfTypeJSON(e,i.name,!0).forEach((e=>{this.saveChunk(t,i,e)}))}getChunksWebIfcAPI(e,t,i){let r=this.state.api.GetLineIDsWithType(e,i.name);for(let n=0;ne.value));null==e[r]?e[r]=n:e[r]=e[r].concat(n)}getSpatialNode(e,t,i){this.getChildren(e,t,i,zl.aggregates),this.getChildren(e,t,i,zl.spatial)}getChildren(e,t,i,r){let n=i[t.expressID];null!=n&&(t[r.key]=n.map((t=>{let r=this.newNode(e,t);return this.getSpatialNode(e,r,i),r})))}newNode(e,t){return{expressID:t,type:this.getNodeType(e,t),children:[]}}getNodeType(e,t){if(this.state.useJSON)return this.state.models[e].jsonData[t].type;let i=this.state.models[e].types[t];return f8[i]}getAllRelatedItemsOfTypeJSON(e,t,i){let r=this.getAllItemsOfTypeJSON(e,i.name,!0),n=[];return r.forEach((e=>{this.isRelated(t,e,i)&&this.getRelated(e,i,n)})),n}getAllRelatedItemsOfTypeWebIfcAPI(e,t,i){let r=this.state.api.GetLineIDsWithType(e,i.name),n=[];for(let s=0;si.push(e.value))):i.push(r.value)}isRelated(e,t,i){let r=t[i.related];return Array.isArray(r)?r.map((e=>e.value)).includes(e):r.value===e}},c8=class{constructor(e){this.state=e}getAllTypes(){for(let e in this.state.models){let t=this.state.models[e].types;0==Object.keys(t).length&&this.getAllTypesOfModel(parseInt(e))}}getAllTypesOfModel(e){let t=Object.keys(f8).map((e=>parseInt(e))),i=this.state.models[e].types;t.forEach((t=>{let r=this.state.api.GetLineIDsWithType(e,t);for(let e=0;e{r[e]&&n.push(...r[e])}));let s=this.getCoordinates(e),a=this.modelCoordinates[e];i?n.forEach((e=>s.set([0,0,0],e))):n.forEach((e=>s.set([a[e],a[e+1],a[e+2]],e))),this.getAttributes(e).position.needsUpdate=!0}showAllItems(e){this.modelCoordinates[e]&&(this.resetCoordinates(e),this.getAttributes(e).position.needsUpdate=!0)}hideAllItems(e){this.getCoordinates(e).fill(0),this.getAttributes(e).position.needsUpdate=!0}initializeCoordinates(e){let t=this.getCoordinates(e);this.modelCoordinates[e]||(this.modelCoordinates[e]=new Float32Array(t))}resetCoordinates(e){let t=this.modelCoordinates[e];this.getCoordinates(e).set(t)}getCoordinates(e){return this.getAttributes(e).position.array}getAttributes(e){return this.state.models[e].mesh.geometry.attributes}},d8=class{constructor(){this.state={models:[],api:new n8,useJSON:!1},this.BVH=new h8,this.parser=new a8(this.state,this.BVH),this.subsets=new o8(this.state,this.BVH),this.properties=new l8(this.state),this.types=new c8(this.state),this.hider=new p8(this.state)}parse(e){return ht(this,null,(function*(){let t=yield this.parser.parse(e);this.state.useJSON?this.disposeMemory():this.types.getAllTypes(),this.hider.processCoordinates(t.modelID);let i=new u8(t.geometry,t.material);return i.setIFCManager(this),i}))}setWasmPath(e){this.state.api.SetWasmPath(e)}applyWebIfcConfig(e){this.state.webIfcSettings=e}useJSONData(e=!0){this.state.useJSON=e,this.disposeMemory()}addModelJSONData(e,t){let i=this.state.models[e];i&&(i.jsonData=t)}disposeMemory(){this.state.api=null,this.state.api=new n8}setupThreeMeshBVH(e,t,i){this.BVH.initializeMeshBVH(e,t,i)}close(e,t){this.state.api.CloseModel(e),t&&t.remove(this.state.models[e].mesh),delete this.state.models[e]}getExpressId(e,t){return this.properties.getExpressId(e,t)}getAllItemsOfType(e,t,i){return this.properties.getAllItemsOfType(e,t,i)}getItemProperties(e,t,i=!1){return this.properties.getItemProperties(e,t,i)}getPropertySets(e,t,i=!1){return this.properties.getPropertySets(e,t,i)}getTypeProperties(e,t,i=!1){return this.properties.getTypeProperties(e,t,i)}getMaterialsProperties(e,t,i=!1){return this.properties.getMaterialsProperties(e,t,i)}getIfcType(e,t){let i=this.state.models[e].types[t];return f8[i]}getSpatialStructure(e){return this.properties.getSpatialStructure(e)}getSubset(e,t){return this.subsets.getSubset(e,t)}removeSubset(e,t,i){this.subsets.removeSubset(e,t,i)}createSubset(e){return this.subsets.createSubset(e)}hideItems(e,t){this.hider.hideItems(e,t)}hideAllItems(e){this.hider.hideAllItems(e)}showItems(e,t){this.hider.showItems(e,t)}showAllItems(e){this.hider.showAllItems(e)}},BA=class extends ci{constructor(e){super(e),this.ifcManager=new d8}load(e,t,i,r){let n=this,s=new ui(n.manager);s.setPath(n.path),s.setResponseType("arraybuffer"),s.setRequestHeader(n.requestHeader),s.setWithCredentials(n.withCredentials),s.load(e,(function(i){return ht(this,null,(function*(){try{if("string"==typeof i)throw new Error("IFC files must be given as a buffer!");t(yield n.parse(i))}catch(t){r?r(t):console.error(t),n.manager.itemError(e)}}))}),i,r)}parse(e){return this.ifcManager.parse(e)}},kA=class extends ci{constructor(e){super(e)}load(e,t,i,r){let n=this,s=""===this.path?Bs.extractUrlBase(e):this.path,a=new ui(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(i){try{t(n.parse(i,s))}catch(t){r?r(t):console.error(t),n.manager.itemError(e)}}),i,r)}setMaterialOptions(e){return this.materialOptions=e,this}parse(e,t){let i=e.split("\n"),r={},n=/\s+/,s={};for(let e=0;e=0?t.substring(0,a):t;o=o.toLowerCase();let l=a>=0?t.substring(a+1):"";if(l=l.trim(),"newmtl"===o)r={name:l},s[l]=r;else if("ka"===o||"kd"===o||"ks"===o||"ke"===o){let e=l.split(n,3);r[o]=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])]}else r[o]=l}let a=new m8(this.resourcePath||t,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(s),a}},m8=class{constructor(e="",t={}){this.baseUrl=e,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=void 0!==this.options.side?this.options.side:tn,this.wrap=void 0!==this.options.wrap?this.options.wrap:vn}setCrossOrigin(e){return this.crossOrigin=e,this}setManager(e){this.manager=e}setMaterials(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(e){if(!this.options)return e;let t={};for(let i in e){let r=e[i],n={};t[i]=n;for(let e in r){let t=!0,i=r[e],s=e.toLowerCase();switch(s){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(i=[i[0]/255,i[1]/255,i[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===i[0]&&0===i[1]&&0===i[2]&&(t=!1)}t&&(n[s]=i)}}return t}preload(){for(let e in this.materialsInfo)this.create(e)}getIndex(e){return this.nameLookup[e]}getAsArray(){let e=0;for(let t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray}create(e){return void 0===this.materials[e]&&this.createMaterial_(e),this.materials[e]}createMaterial_(e){let t=this,i=this.materialsInfo[e],r={name:e,side:this.side};function n(e,i){if(r[e])return;let n=t.getTextureParams(i,r),s=t.loadTexture(function(e,t){return"string"!=typeof t||""===t?"":/^https?:\/\//i.test(t)?t:e+t}(t.baseUrl,n.url));s.repeat.copy(n.scale),s.offset.copy(n.offset),s.wrapS=t.wrap,s.wrapT=t.wrap,("map"===e||"emissiveMap"===e)&&(s.encoding=gr),r[e]=s}for(let e in i){let t,s=i[e];if(""!==s)switch(e.toLowerCase()){case"kd":r.color=(new je).fromArray(s).convertSRGBToLinear();break;case"ks":r.specular=(new je).fromArray(s).convertSRGBToLinear();break;case"ke":r.emissive=(new je).fromArray(s).convertSRGBToLinear();break;case"map_kd":n("map",s);break;case"map_ks":n("specularMap",s);break;case"map_ke":n("emissiveMap",s);break;case"norm":n("normalMap",s);break;case"map_bump":case"bump":n("bumpMap",s);break;case"map_d":n("alphaMap",s),r.transparent=!0;break;case"ns":r.shininess=parseFloat(s);break;case"d":t=parseFloat(s),t<1&&(r.opacity=t,r.transparent=!0);break;case"tr":t=parseFloat(s),this.options&&this.options.invertTrProperty&&(t=1-t),t>0&&(r.opacity=1-t,r.transparent=!0)}}return this.materials[e]=new Es(r),this.materials[e]}getTextureParams(e,t){let i,r={scale:new le(1,1),offset:new le(0,0)},n=e.split(/\s+/);return i=n.indexOf("-bm"),i>=0&&(t.bumpScale=parseFloat(n[i+1]),n.splice(i,2)),i=n.indexOf("-s"),i>=0&&(r.scale.set(parseFloat(n[i+1]),parseFloat(n[i+2])),n.splice(i,4)),i=n.indexOf("-o"),i>=0&&(r.offset.set(parseFloat(n[i+1]),parseFloat(n[i+2])),n.splice(i,4)),r.url=n.join(" ").trim(),r}loadTexture(e,t,i,r,n){let s=void 0!==this.manager?this.manager:ao,a=s.getHandler(e);null===a&&(a=new bs(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);let o=a.load(e,i,r,n);return void 0!==t&&(o.mapping=t),o}},oPt=/^[og]\s*(.+)?/,lPt=/^mtllib /,cPt=/^usemtl /,uPt=/^usemap /,hRe=/\s+/,pRe=new A,g8=new A,dRe=new A,fRe=new A,jl=new A,GA=new je;function hPt(){let e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);let i=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,t){let i=this._finalize(!1);i&&(i.inherited||i.groupCount<=0)&&this.materials.splice(i.index,1);let r={index:this.materials.length,name:e||"",mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==i?i.smooth:this.smooth,groupStart:void 0!==i?i.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){let t={index:"number"==typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){let t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(let e=this.materials.length-1;e>=0;e--)this.materials[e].groupCount<=0&&this.materials.splice(e,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},i&&i.name&&"function"==typeof i.clone){let e=i.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){let i=parseInt(e,10);return 3*(i>=0?i-1:i+t/3)},parseNormalIndex:function(e,t){let i=parseInt(e,10);return 3*(i>=0?i-1:i+t/3)},parseUVIndex:function(e,t){let i=parseInt(e,10);return 2*(i>=0?i-1:i+t/2)},addVertex:function(e,t,i){let r=this.vertices,n=this.object.geometry.vertices;n.push(r[e+0],r[e+1],r[e+2]),n.push(r[t+0],r[t+1],r[t+2]),n.push(r[i+0],r[i+1],r[i+2])},addVertexPoint:function(e){let t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){let t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,i){let r=this.normals,n=this.object.geometry.normals;n.push(r[e+0],r[e+1],r[e+2]),n.push(r[t+0],r[t+1],r[t+2]),n.push(r[i+0],r[i+1],r[i+2])},addFaceNormal:function(e,t,i){let r=this.vertices,n=this.object.geometry.normals;pRe.fromArray(r,e),g8.fromArray(r,t),dRe.fromArray(r,i),jl.subVectors(dRe,g8),fRe.subVectors(pRe,g8),jl.cross(fRe),jl.normalize(),n.push(jl.x,jl.y,jl.z),n.push(jl.x,jl.y,jl.z),n.push(jl.x,jl.y,jl.z)},addColor:function(e,t,i){let r=this.colors,n=this.object.geometry.colors;void 0!==r[e]&&n.push(r[e+0],r[e+1],r[e+2]),void 0!==r[t]&&n.push(r[t+0],r[t+1],r[t+2]),void 0!==r[i]&&n.push(r[i+0],r[i+1],r[i+2])},addUV:function(e,t,i){let r=this.uvs,n=this.object.geometry.uvs;n.push(r[e+0],r[e+1]),n.push(r[t+0],r[t+1]),n.push(r[i+0],r[i+1])},addDefaultUV:function(){let e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){let t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,i,r,n,s,a,o,l){let h=this.vertices.length,u=this.parseVertexIndex(e,h),c=this.parseVertexIndex(t,h),p=this.parseVertexIndex(i,h);if(this.addVertex(u,c,p),this.addColor(u,c,p),void 0!==a&&""!==a){let e=this.normals.length;u=this.parseNormalIndex(a,e),c=this.parseNormalIndex(o,e),p=this.parseNormalIndex(l,e),this.addNormal(u,c,p)}else this.addFaceNormal(u,c,p);if(void 0!==r&&""!==r){let e=this.uvs.length;u=this.parseUVIndex(r,e),c=this.parseUVIndex(n,e),p=this.parseUVIndex(s,e),this.addUV(u,c,p),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";let t=this.vertices.length;for(let i=0,r=e.length;i=7?(GA.setRGB(parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6])).convertSRGBToLinear(),t.colors.push(GA.r,GA.g,GA.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]));break;case"vt":t.uvs.push(parseFloat(e[1]),parseFloat(e[2]))}}else if("f"===s){let e=n.slice(1).trim().split(hRe),i=[];for(let t=0,r=e.length;t0){let e=r.split("/");i.push(e)}}let r=i[0];for(let e=1,n=i.length-1;e1){let e=r[1].trim().toLowerCase();t.object.smooth="0"!==e&&"off"!==e}else t.object.smooth=!0;let e=t.object.currentMaterial();e&&(e.smooth=t.object.smooth)}else{if("\0"===n)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+n+'"')}}t.finalize();let n=new ur;if(n.materialLibraries=[].concat(t.materialLibraries),!0==!(1===t.objects.length&&0===t.objects[0].geometry.vertices.length))for(let e=0,i=t.objects.length;e0&&h.setAttribute("normal",new dt(r.normals,3)),r.colors.length>0&&(l=!0,h.setAttribute("color",new dt(r.colors,3))),!0===r.hasUVIndices&&h.setAttribute("uv",new dt(r.uvs,2));let u,c=[];for(let e=0,i=s.length;e1){for(let e=0,t=s.length;e0){let e=new jn({size:1,sizeAttenuation:!1}),i=new lt;i.setAttribute("position",new dt(t.vertices,3)),t.colors.length>0&&void 0!==t.colors[0]&&(i.setAttribute("color",new dt(t.colors,3)),e.vertexColors=!0);let r=new nn(i,e);n.add(r)}return n}},zA=new je,jA=class extends ci{constructor(e){super(e),this.propertyNameMapping={},this.customPropertyMapping={}}load(e,t,i,r){let n=this,s=new ui(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,(function(i){try{t(n.parse(i))}catch(t){r?r(t):console.error(t),n.manager.itemError(e)}}),i,r)}setPropertyNameMapping(e){this.propertyNameMapping=e}setCustomPropertyNameMapping(e){this.customPropertyMapping=e}parse(e){function t(e){let t="",i=0,r=/^ply([\s\S]*)end_header(\r\n|\r|\n)/.exec(e);null!==r&&(t=r[1],i=new Blob([r[0]]).size);let n,s={comments:[],elements:[],headerLength:i,objInfo:""},a=t.split(/\r\n|\r|\n/);function o(e,t){let i={type:e[0]};return"list"===i.type?(i.name=e[3],i.countType=e[1],i.itemType=e[2]):i.name=e[1],i.name in t&&(i.name=t[i.name]),i}for(let e=0;ee.name));function i(e){for(let i=0,r=e.length;i=d.count&&(c++,p=0,d=t.elements[c],f=s(d.properties));let n=r(d.properties,i);l(a,d.name,n,f),p++}return o(a)}function o(e){let t=new lt;e.indices.length>0&&t.setIndex(e.indices),t.setAttribute("position",new dt(e.vertices,3)),e.normals.length>0&&t.setAttribute("normal",new dt(e.normals,3)),e.uvs.length>0&&t.setAttribute("uv",new dt(e.uvs,2)),e.colors.length>0&&t.setAttribute("color",new dt(e.colors,3)),e.faceVertexUvs.length>0&&(t=t.toNonIndexed(),t.setAttribute("uv",new dt(e.faceVertexUvs,2)));for(let i of Object.keys(p.customPropertyMapping))e[i].length>0&&t.setAttribute(i,new dt(e[i],p.customPropertyMapping[i].length));return t.computeBoundingSphere(),t}function l(e,t,i,r){if("vertex"===t){e.vertices.push(i[r.attrX],i[r.attrY],i[r.attrZ]),null!==r.attrNX&&null!==r.attrNY&&null!==r.attrNZ&&e.normals.push(i[r.attrNX],i[r.attrNY],i[r.attrNZ]),null!==r.attrS&&null!==r.attrT&&e.uvs.push(i[r.attrS],i[r.attrT]),null!==r.attrR&&null!==r.attrG&&null!==r.attrB&&(zA.setRGB(i[r.attrR]/255,i[r.attrG]/255,i[r.attrB]/255).convertSRGBToLinear(),e.colors.push(zA.r,zA.g,zA.b));for(let t of Object.keys(p.customPropertyMapping))for(let r of p.customPropertyMapping[t])e[t].push(i[r])}else if("face"===t){let t=i.vertex_indices||i.vertex_index,r=i.texcoord;3===t.length?(e.indices.push(t[0],t[1],t[2]),r&&6===r.length&&(e.faceVertexUvs.push(r[0],r[1]),e.faceVertexUvs.push(r[2],r[3]),e.faceVertexUvs.push(r[4],r[5]))):4===t.length&&(e.indices.push(t[0],t[1],t[3]),e.indices.push(t[1],t[2],t[3]))}}function h(e,t){let i={},r=0;for(let n=0;ne.getInt8(t),size:1};case"uint8":case"uchar":return{read:t=>e.getUint8(t),size:1};case"int16":case"short":return{read:t=>e.getInt16(t,i),size:2};case"uint16":case"ushort":return{read:t=>e.getUint16(t,i),size:2};case"int32":case"int":return{read:t=>e.getInt32(t,i),size:4};case"uint32":case"uint":return{read:t=>e.getUint32(t,i),size:4};case"float32":case"float":return{read:t=>e.getFloat32(t,i),size:4};case"float64":case"double":return{read:t=>e.getFloat64(t,i),size:8}}}for(let n=0,s=e.length;n>5&31)/31,r=(e>>10&31)/31)}for(let s=1;s<=3;s++){let a=l+12*s,o=3*e*3+3*(s-1);d[o]=h.getFloat32(a,!0),d[o+1]=h.getFloat32(a+4,!0),d[o+2]=h.getFloat32(a+8,!0),f[o]=u,f[o+1]=p,f[o+2]=m,c&&(n[o]=t,n[o+1]=i,n[o+2]=r)}}return p.setAttribute("position",new Wt(d,3)),p.setAttribute("normal",new Wt(f,3)),c&&(p.setAttribute("color",new Wt(n,3)),p.hasColors=!0,p.alpha=l),p}(i):function(e){let t,i=new lt,r=/solid([\s\S]*?)endsolid/g,n=/facet([\s\S]*?)endfacet/g,s=0,a=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,o=new RegExp("vertex"+a+a+a,"g"),l=new RegExp("normal"+a+a+a,"g"),h=[],u=[],c=new A,p=0,d=0,f=0;for(;null!==(t=r.exec(e));){d=f;let e=t[0];for(;null!==(t=n.exec(e));){let e=0,i=0,r=t[0];for(;null!==(t=l.exec(r));)c.x=parseFloat(t[1]),c.y=parseFloat(t[2]),c.z=parseFloat(t[3]),i++;for(;null!==(t=o.exec(r));)h.push(parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3])),u.push(c.x,c.y,c.z),e++,f++;1!==i&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+s),3!==e&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+s),s++}let r=d,a=f-d;i.addGroup(r,a,p),p++}return i.setAttribute("position",new dt(h,3)),i.setAttribute("normal",new dt(u,3)),i}("string"!=typeof(r=e)?(new TextDecoder).decode(r):r);var r}},kMe=kn(ARe(),1),HRe="3.7.2",bPt=HRe,xPt="function"==typeof atob,IPt="function"==typeof btoa,jT="function"==typeof Buffer,ORe="function"==typeof TextDecoder?new TextDecoder:void 0,PRe="function"==typeof TextEncoder?new TextEncoder:void 0,_Pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",VI=Array.prototype.slice.call(_Pt),KA=(e=>{let t={};return VI.forEach(((e,i)=>t[e]=i)),t})(),SPt=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Gs=String.fromCharCode.bind(String),NRe="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(e,t=(e=>e))=>new Uint8Array(Array.prototype.slice.call(e,0).map(t)),URe=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")),BRe=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),kRe=e=>{let t,i,r,n,s="",a=e.length%3;for(let a=0;a255||(r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=i<<16|r<<8|n,s+=VI[t>>18&63]+VI[t>>12&63]+VI[t>>6&63]+VI[63&t]}return a?s.slice(0,a-3)+"===".substring(a):s},R8=IPt?e=>btoa(e):jT?e=>Buffer.from(e,"binary").toString("base64"):kRe,S8=jT?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let i=0,r=e.length;it?URe(S8(e)):S8(e),wPt=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Gs(192|t>>>6)+Gs(128|63&t):Gs(224|t>>>12&15)+Gs(128|t>>>6&63)+Gs(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Gs(240|t>>>18&7)+Gs(128|t>>>12&63)+Gs(128|t>>>6&63)+Gs(128|63&t)},RPt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,GRe=e=>e.replace(RPt,wPt),LRe=jT?e=>Buffer.from(e,"utf8").toString("base64"):PRe?e=>S8(PRe.encode(e)):e=>R8(GRe(e)),zT=(e,t=!1)=>t?URe(LRe(e)):LRe(e),FRe=e=>zT(e,!0),MPt=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,DPt=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return Gs(55296+(t>>>10))+Gs(56320+(1023&t));case 3:return Gs((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return Gs((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},VRe=e=>e.replace(MPt,DPt),zRe=e=>{if(e=e.replace(/\s+/g,""),!SPt.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,i,r,n="";for(let s=0;s>16&255):64===r?Gs(t>>16&255,t>>8&255):Gs(t>>16&255,t>>8&255,255&t);return n},M8=xPt?e=>atob(BRe(e)):jT?e=>Buffer.from(e,"base64").toString("binary"):zRe,jRe=jT?e=>NRe(Buffer.from(e,"base64")):e=>NRe(M8(e),(e=>e.charCodeAt(0))),WRe=e=>jRe(qRe(e)),CPt=jT?e=>Buffer.from(e,"base64").toString("utf8"):ORe?e=>ORe.decode(jRe(e)):e=>VRe(M8(e)),qRe=e=>BRe(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),w8=e=>CPt(qRe(e)),APt=e=>{if("string"!=typeof e)return!1;let t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},YRe=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),XRe=function(){let e=(e,t)=>Object.defineProperty(String.prototype,e,YRe(t));e("fromBase64",(function(){return w8(this)})),e("toBase64",(function(e){return zT(this,e)})),e("toBase64URI",(function(){return zT(this,!0)})),e("toBase64URL",(function(){return zT(this,!0)})),e("toUint8Array",(function(){return WRe(this)}))},$Re=function(){let e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,YRe(t));e("toBase64",(function(e){return ZA(this,e)})),e("toBase64URI",(function(){return ZA(this,!0)})),e("toBase64URL",(function(){return ZA(this,!0)}))},OPt=()=>{XRe(),$Re()},KRe={version:HRe,VERSION:bPt,atob:M8,atobPolyfill:zRe,btoa:R8,btoaPolyfill:kRe,fromBase64:w8,toBase64:zT,encode:zT,encodeURI:FRe,encodeURL:FRe,utob:GRe,btou:VRe,decode:w8,isValid:APt,fromUint8Array:ZA,toUint8Array:WRe,extendString:XRe,extendUint8Array:$Re,extendBuiltins:OPt},Xl=kn(fMe(),1),JA=class extends Mp{constructor(e,t={}){let i=t.font;if(void 0===i)super();else{let r=i.generateShapes(e,t.size);t.depth=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),super(r,t)}this.type="TextGeometry"}},QA="BYLAYER",D8="BYBLOCK",mMe=(e=>(e[e.Mesh=-1]="Mesh",e[e.MeshWithPattern=0]="MeshWithPattern",e[e.LineWithWidth=1]="LineWithWidth",e[e.Line=2]="Line",e[e.LineWithPattern=3]="LineWithPattern",e[e.Point=4]="Point",e[e.Text=5]="Text",e))(mMe||{}),E0=["INSERT","DIMENSION"],sEr=kn(EMe(),1),eO=[0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10000384,10000460,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510016,8755276,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019648,7510092,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529280,6264908,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,38912,5019724,32512,4161343,19456,2509862,65343,8388511,52275,6737023,38950,5019743,32543,4161359,19475,2509871,65407,8388543,52326,6737049,38988,5019762,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39026,5019781,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39064,5019800,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29336,5014936,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19608,5010072,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9880,5005208,8063,4149119,4940,2502476,255,8355839,204,6710988,152,5000344,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490520,6245528,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980888,7490712,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471256,8735896,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,9961624,9981080,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,9961586,9981061,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,9961548,9981042,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,9961510,9981023,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215],WT=class{constructor(){this.pointer=0,this.eof=!1}},bMe=1e3,$I=class extends WT{constructor(e){super(),this.int8Array=new Int8Array(bMe),this.caches=new Map,this.reader=new Af(e);let t=this.reader.readBytes(22),i="";for(let e=0;e<18;e++)i+=String.fromCharCode(t[e]);if("AutoCAD Binary DXF"!=i)throw new Error("Invalid DXF file")}next(){if(!this.hasNext())throw this.eof?new Error("Cannot call 'next' after EOF group has been read"):new Error("Unexpected end of input: EOF group not read before end of file.");let e={code:this.reader.readInt16()};return e.value=this.parseGroupValue(e.code),0===e.code&&"EOF"===e.value&&(this.eof=!0),this.lastReadGroup=e,e}hasNext(){return!this.eof&&!this.reader.IsEnd()}isEOF(){return this.eof}parseGroupValue(e){if(e>=0&&e<=9)return this.readNullTerminatedString();if(e>=10&&e<=59)return this.reader.readFloat64();if(e>=60&&e<=79)return this.reader.readInt16();if(e>=90&&e<=99)return this.reader.readInt32();if(e>=100&&e<=109)return this.readNullTerminatedString();if(e>=110&&e<=149)return this.reader.readFloat64();if(e>=160&&e<=169)return this.reader.readInt64();if(e>=170&&e<=179)return this.reader.readInt16();if(e>=210&&e<=239)return this.reader.readFloat64();if(e>=270&&e<=289)return this.reader.readInt16();if(e>=290&&e<=299)return this.reader.readInt8()>0;if(e>=300&&e<=309)return this.readNullTerminatedString();if(e>=310&&e<=319){return xMe(this.ReadBinaryData())}if(e>=320&&e<=369)return this.readNullTerminatedString();if(e>=370&&e<=389)return this.reader.readInt16();if(e>=390&&e<=399)return this.readNullTerminatedString();if(e>=400&&e<=409)return this.reader.readInt16();if(e>=410&&e<=419)return this.readNullTerminatedString();if(e>=420&&e<=429)return this.reader.readInt32();if(e>=430&&e<=439)return this.readNullTerminatedString();if(e>=440&&e<=459)return this.reader.readInt32();if(e>=460&&e<=469)return this.reader.readFloat64();if(e>=470&&e<=481)return this.readNullTerminatedString();if(999===e)throw new Error("The comment group 999, is not used in binary DXF files at byte address!");if(1004===e){return xMe(this.ReadBinaryData())}return e>=1e3&&e<=1009?this.readNullTerminatedString():e>=1010&&e<=1059?this.reader.readFloat64():e>=1060&&e<=1070?this.reader.readInt16():1071===e?this.reader.readInt32():void ne.warn(`[DxfBinReader] Invalid code '${e}' at byte address ${this.reader.getPosition()}`)}readNullTerminatedString(){var e;this.decoder||(this.decoder=new TextDecoder("utf-8"));let t=0,i=this.reader.readInt8();for(;0!==i;)this.int8Array[t++]=i,i=this.reader.readInt8();if(0===t)return"";if(t>bMe)return ne.warn(`[DxfBinReader] Failed to read string! The number of bytes is ${t} !`),"";let r=this.int8Array.subarray(0,t),n=r.toString();if(this.caches.get(n))return this.caches.get(n);let s=null==(e=this.decoder)?void 0:e.decode(r);return this.caches.set(n,s),s}ReadBinaryData(){let e=this.reader.readUint8();return this.reader.readBytes(e)}};function xMe(e){return Array.prototype.map.call(e,(e=>("00"+e.toString(16)).slice(-2))).join("")}var qT=class extends WT{constructor(e){super(),this.data=e}next(){if(!this.hasNext())throw this.eof?new Error("Cannot call 'next' after EOF group has been read"):new Error("Unexpected end of input: EOF group not read before end of file. Ended on code "+this.data[this.pointer]);let e={code:parseInt(this.data[this.pointer])};return this.pointer++,e.value=jPt(e.code,this.data[this.pointer].trim()),this.pointer++,0===e.code&&"EOF"===e.value&&(this.eof=!0),this.lastReadGroup=e,e}hasNext(){return!(this.eof||this.pointer>this.data.length-2)}isEOF(){return this.eof}};function jPt(e,t){return e>=0&&e<=9?t:e>=10&&e<=59?parseFloat(t):e>=60&&e<=99?parseInt(t):e>=100&&e<=109?t:e>=110&&e<=149?parseFloat(t):e>=160&&e<=179?parseInt(t):e>=210&&e<=239?parseFloat(t):e>=270&&e<=289?parseInt(t):e>=290&&e<=299?WPt(t):e>=300&&e<=369?t:e>=370&&e<=389?parseInt(t):e>=390&&e<=399?t:e>=400&&e<=409?parseInt(t):e>=410&&e<=419?t:e>=420&&e<=429?parseInt(t):e>=430&&e<=439?t:e>=440&&e<=459?parseInt(t):e>=460&&e<=469?parseFloat(t):e>=470&&e<=481||999===e||e>=1e3&&e<=1009?t:e>=1010&&e<=1059?parseFloat(t):e>=1060&&e<=1071?parseInt(t):(ne.info("WARNING: Group code does not have a defined type: %j",{code:e,value:t}),t)}function WPt(e){if("0"===e)return!1;if("1"===e)return!0;throw TypeError("String '"+e+"' cannot be cast to Boolean type")}var SMe=kn(ql(),1),qPt="OriginalHandle",YPt="OriginalType",XPt="Outlines",IMe=["PROXY","REGION","INSERT","HATCH"];function b0(e){return eO[e]}function vt(e){let t={},i=e.lastReadGroup,r=i.code;if(t.x=i.value,r+=10,i=e.next(),i.code!=r)throw new Error(`Expected code for point value to be ${r} but got ${i.code}`);return t.y=i.value,r+=10,i=e.next(),i.code!=r||(t.z=i.value,e.next()),t}function _Me(e,t){let i=e.lastReadGroup,r=[];for(let n=0;n<16;n++){if(i.code!==t)throw new Error(`Expected code for matrix value to be ${t} but got ${i.code}`);r.push(i.value),i=e.next()}return r}function fr(e,t){switch(t.code){case 0:e.type=t.value;break;case 5:e.handle=t.value;break;case 6:e.lineType=t.value.toUpperCase();break;case 8:e.layer=t.value;break;case 48:e.lineTypeScale=t.value,e.lineTypeScale<=0&&(e.lineTypeScale=1);break;case 60:e.visible=0===t.value;break;case 62:e.isTrueColor||(e.colorIndex=t.value,e.colorIndex<0&&ne.warn("[DxfParser] a negative value of colorIndex indicates that the layer is turned off"),e.color=b0(Math.abs(t.value)));break;case 67:e.inPaperSpace=0!==t.value;break;case 100:case 1001:break;case 330:e.ownerHandle=t.value;break;case 347:e.materialObjectHandle=t.value;break;case 370:e.lineweight=t.value;break;case 410:e.layoutName=t.value;break;case 420:e.isTrueColor=!0,e.color=t.value;break;case 1e3:if(t.value&&t.value.includes(qPt)){let i=t.value.split(":").map((e=>e.trim()));e.extendedData||(e.extendedData={}),e.extendedData.originalHandle=i[1]}if(e.extendedData&&e.extendedData.outlines)try{e.extendedData.outlines=JSON.parse(t.value||"[]")}catch(t){e.extendedData.outlines=void 0}if(t.value&&t.value.includes(XPt)&&(e.extendedData||(e.extendedData={}),e.extendedData.outlines=[]),t.value&&t.value.includes(YPt)){let i=t.value.split(":").map((e=>e.trim()));e.extendedData||(e.extendedData={}),e.extendedData.originalType=i[1]}break;default:return!1}return!0}function lh(e,t){switch(t.code){case 0:e.type=t.value;break;case 5:e.handle=t.value;break;case 330:e.ownerHandle=t.value;break;case 1e3:case 1001:break;default:return!1}return!0}var ZI=class{constructor(){this.ForEntityName="3DFACE"}parseEntity(e,t){let i={type:t.value,vertices:[]};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 70:if(0!==t.value){let e=Math.log2(t.value)-1;i.vertices.splice(e,1)}t=e.next();break;case 10:i.vertices=$Pt(e,t),t=e.lastReadGroup;break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}};function $Pt(e,t){let i=[],r=!1,n=!1;for(let s=0;s<=4;s++){let s={};for(;!e.isEOF()&&0!==t.code&&!n;){switch(t.code){case 10:case 11:case 12:case 13:if(r){n=!0;continue}s.x=t.value,r=!0;break;case 20:case 21:case 22:case 23:s.y=t.value;break;case 30:case 31:case 32:case 33:s.z=t.value;break;default:return i}t=e.next()}(0,SMe.isEmpty)(s)||i.push(s),r=!1,n=!1}return i}var JI=class{constructor(){this.ForEntityName="ARC"}parseEntity(e,t){let i={type:t.value};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 10:i.center=vt(e),t=e.lastReadGroup;break;case 40:i.radius=t.value,t=e.next();break;case 50:i.startAngle=Math.PI/180*t.value,t=e.next();break;case 51:i.endAngle=Math.PI/180*t.value,i.angleLength=i.endAngle-i.startAngle,t=e.next();break;case 210:i.extrusionDirectionX=t.value,t=e.next();break;case 220:i.extrusionDirectionY=t.value,t=e.next();break;case 230:i.extrusionDirectionZ=t.value,t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},QI=class{constructor(){this.ForEntityName="ATTDEF"}parseEntity(e,t){let i={type:t.value,xScale:1,textStyle:"STANDARD"};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 1:i.text=t.value,t=e.next();break;case 2:i.tag=t.value,t=e.next();break;case 3:i.prompt=t.value,t=e.next();break;case 7:i.textStyle=t.value,t=e.next();break;case 10:i.startPoint=vt(e),t=e.lastReadGroup;break;case 11:i.endPoint=vt(e),t=e.lastReadGroup;break;case 39:i.thickness=t.value,t=e.next();break;case 40:i.textHeight=t.value,t=e.next();break;case 41:i.xScale=t.value,t=e.next();break;case 50:i.rotation=t.value,t=e.next();break;case 51:i.obliqueAngle=t.value,t=e.next();break;case 70:i.invisible=!!(1&t.value),i.constant=!!(2&t.value),i.verificationRequired=!!(4&t.value),i.preset=!!(8&t.value),t=e.next();break;case 71:i.backwards=!!(2&t.value),i.mirrored=!!(4&t.value),t=e.next();break;case 72:i.horizontalJustification=t.value,t=e.next();break;case 73:i.fieldLength=t.value,t=e.next();break;case 74:i.verticalJustification=t.value,t=e.next();break;case 100:t=e.next();break;case 210:i.extrusionDirectionX=t.value,t=e.next();break;case 220:i.extrusionDirectionY=t.value,t=e.next();break;case 230:i.extrusionDirectionZ=t.value,t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},e_=class{constructor(){this.ForEntityName="ATTRIB"}parseEntity(e,t){let i={type:t.value,xScale:1,textStyle:"STANDARD"};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 1:i.text=t.value,t=e.next();break;case 2:i.tag=t.value,t=e.next();break;case 3:i.prompt=t.value,t=e.next();break;case 7:i.textStyle=t.value,t=e.next();break;case 10:i.startPoint=vt(e),t=e.lastReadGroup;break;case 11:i.endPoint=vt(e),t=e.lastReadGroup;break;case 39:i.thickness=t.value,t=e.next();break;case 40:i.textHeight=t.value,t=e.next();break;case 41:i.xScale=t.value,t=e.next();break;case 50:i.rotation=t.value,t=e.next();break;case 51:i.obliqueAngle=t.value,t=e.next();break;case 70:i.invisible=!!(1&t.value),i.constant=!!(2&t.value),i.verificationRequired=!!(4&t.value),i.preset=!!(8&t.value),t=e.next();break;case 71:i.backwards=!!(2&t.value),i.mirrored=!!(4&t.value),t=e.next();break;case 72:i.horizontalJustification=t.value,t=e.next();break;case 73:i.fieldLength=t.value,t=e.next();break;case 74:i.verticalJustification=t.value,t=e.next();break;case 100:t=e.next();break;case 210:i.extrusionDirectionX=t.value,t=e.next();break;case 220:i.extrusionDirectionY=t.value,t=e.next();break;case 230:i.extrusionDirectionZ=t.value,t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},t_=class{constructor(){this.ForEntityName="CIRCLE"}parseEntity(e,t){let i={type:t.value};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 10:i.center=vt(e),t=e.lastReadGroup;break;case 40:i.radius=t.value,t=e.next();break;case 50:i.startAngle=Math.PI/180*t.value,t=e.next();break;case 51:let r=Math.PI/180*t.value;r=0&&i.push({angle:e,origin:n,delta:s,dashPattern:o})}return i}function e2t(e,t){let i=[],r=t.next();for(;i.length0&&(i.colorIndex=t.value,i.color=b0(Math.abs(t.value)))))}t=e.next();break;default:fr(i,t),t=e.next()}return i}};function t2t(e){switch(e){case 40:return"DIMSCALE";case 41:return"DIMASZ";case 42:return"DIMEXO";case 44:return"DIMEXE";case 75:return"DIMSE1";case 76:return"DIMSE2";case 77:return"DIMTAD";case 140:return"DIMTXT";case 144:return"DIMLFAC";case 147:return"DIMGAP";case 176:return"DIMCLRD";case 178:return"DIMCLRT";case 271:return"DIMDEC";case 341:return"DIMLDRBLK";default:return null}}var o_=class{constructor(){this.ForEntityName="LINE"}parseEntity(e,t){let i={type:t.value,vertices:[]};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 10:i.vertices.unshift(vt(e)),t=e.lastReadGroup;break;case 11:i.vertices.push(vt(e)),t=e.lastReadGroup;break;case 210:i.extrusionDirection=vt(e),t=e.lastReadGroup;break;case 100:t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},l_=class{constructor(){this.ForEntityName="LWPOLYLINE"}parseEntity(e,t){let i={type:t.value,vertices:[]},r=0;for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 38:i.elevation=t.value,t=e.next();break;case 39:i.thickness=t.value,t=e.next();break;case 70:i.shape=1==(1&t.value),i.hasContinuousLinetypePattern=128==(128&t.value),t=e.next();break;case 90:r=t.value,t=e.next();break;case 10:i.vertices.push(...r2t(r,e)),t=e.lastReadGroup;break;case 43:0!==t.value&&(i.constantWidth=t.value),t=e.next();break;case 210:i.extrusionDirectionX=t.value,t=e.next();break;case 220:i.extrusionDirectionY=t.value,t=e.next();break;case 230:i.extrusionDirectionZ=t.value,t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}};function r2t(e,t){if(!e||e<=0)throw Error("n must be greater than 0 verticies");let i=[],r=!1,n=!1,s=t.lastReadGroup,a={};for(;!t.isEOF()&&0!==s.code&&!n;)switch(s.code){case 10:if(r){n=!0;continue}a.x=s.value,r=!0,s=t.next();break;case 20:a.y=s.value,s=t.next();break;case 30:a.z=s.value,s=t.next();break;case 40:a.startWidth=s.value,s=t.next();break;case 41:a.endWidth=s.value,s=t.next();break;case 42:0!=s.value&&(a.bulge=s.value),s=t.next();break;default:return r&&i.push(a),i}return i.push(a),r=!1,n=!1,i}var c_=class{constructor(){this.ForEntityName="MULTILEADER"}parseEntity(e,t){let i={type:t.value};function r(){for(;!e.isEOF();)switch(t.code){case 40:i.contextData.contentScale=t.value,t=e.next();break;case 10:i.contextData.contentBasePosition=vt(e),t=e.lastReadGroup;break;case 145:i.contextData.landingGap=t.value,t=e.next();break;case 290:i.contextData.hasMText=t.value,t=e.next();break;case 304:i.contextData.defaultTextContents=t.value,t=e.next();break;case 11:i.contextData.textNormalDirection=vt(e),t=e.lastReadGroup;break;case 12:i.contextData.textLocation=vt(e),t=e.lastReadGroup;break;case 13:i.contextData.textDirection=vt(e),t=e.lastReadGroup;break;case 140:i.contextData.arrowHeadSize=t.value,t=e.next();break;case 41:i.contextData.textHeight=t.value,t=e.next();break;case 42:i.contextData.textRotation=t.value,t=e.next();break;case 43:i.contextData.textWidth=t.value,t=e.next();break;case 44:default:t=e.next();break;case 45:i.contextData.textLineSpacingFactor=t.value,t=e.next();break;case 90:i.contextData.textColor=t.value,t=e.next();break;case 170:i.contextData.textLineSpacingStyle=t.value,t=e.next();break;case 171:i.contextData.textAttachment=t.value,t=e.next();break;case 172:i.contextData.textFlowDirection=t.value,t=e.next();break;case 141:i.contextData.textBackgroundScaleFactor=t.value,t=e.next();break;case 92:i.contextData.textBackgroundTransparency=t.value,t=e.next();break;case 291:i.contextData.textBackgroundColorOn=t.value,t=e.next();break;case 292:i.contextData.textBackgroundFillOn=t.value,t=e.next();break;case 293:i.contextData.textUseAutoHeight=t.value,t=e.next();break;case 173:i.contextData.textColumnType=t.value,t=e.next();break;case 142:i.contextData.textColumnWidth=t.value,t=e.next();break;case 143:i.contextData.textColumnGutterWidth=t.value,t=e.next();break;case 144:i.contextData.textColumnHeight=t.value,t=e.next();break;case 295:i.contextData.textUseWordBreak=t.value,t=e.next();break;case 296:i.contextData.hasBlock=t.value,t=e.next();break;case 341:i.contextData.blockContentId=t.value,t=e.next();break;case 14:i.contextData.blockContentNormalDirection=vt(e),t=e.lastReadGroup;break;case 15:i.contextData.blockContentPosition=vt(e),t=e.lastReadGroup;break;case 16:i.contextData.blockContentScale=t.value,t=e.next();break;case 46:i.contextData.blockContentRotation=t.value,t=e.next();break;case 93:i.contextData.blockContentColor=t.value,t=e.next();break;case 47:i.contextData.blockTransformationMatrix=_Me(e,47),t=e.lastReadGroup;break;case 110:i.contextData.planeOriginPoint=vt(e),t=e.lastReadGroup;break;case 111:i.contextData.planeXAxisDirection=vt(e),t=e.lastReadGroup;break;case 112:i.contextData.planeYAxisDirection=vt(e),t=e.lastReadGroup;break;case 297:i.contextData.planeNormalReversed=t.value,t=e.next();break;case 301:return;case 302:n(),t=e.lastReadGroup}}function n(){let r={leaderLines:[]};for(i.contextData.leaders.push(r);!e.isEOF();)switch(t.code){case 290:r.hasSetLastLeaderLinePoint=t.value,t=e.next();break;case 291:r.hasSetDoglegVector=t.value,t=e.next();break;case 10:r.lastLeaderLinePoint=vt(e),t=e.lastReadGroup;break;case 11:r.doglegVector=vt(e),t=e.lastReadGroup;break;case 90:r.leaderBranchIndex=t.value,t=e.next();break;case 40:r.doglegLength=t.value,t=e.next();break;case 303:return;case 304:s(),t=e.lastReadGroup;break;default:t=e.next()}}function s(){let r={vertices:[[]]};for(i.contextData.leaders[i.contextData.leaders.length-1].leaderLines.push(r);!e.isEOF();)switch(t.code){case 10:r.vertices[0].push(vt(e)),t=e.lastReadGroup;break;case 305:return;default:t=e.next()}}return i.contextData={leaders:[]},t=e.next(),function(){for(;!e.isEOF();)switch(t.code){case 0:return;case 340:i.leaderStyleId=t.value,t=e.next();break;case 170:i.leaderLineType=t.value,t=e.next();break;case 91:i.leaderLineColor=t.value,t=e.next();break;case 341:i.leaderLineTypeId=t.value,t=e.next();break;case 171:i.leaderLineWeight=t.value,t=e.next();break;case 41:i.doglegLength=t.value,t=e.next();break;case 290:i.enableLanding=t.value,t=e.next();break;case 291:i.enableDogLeg=t.value,t=e.next();break;case 342:i.arrowHeadId=t.value,t=e.next();break;case 42:i.arrowHeadSize=t.value,t=e.next();break;case 172:i.contentType=t.value,t=e.next();break;case 173:case 95:i.textLeftAttachmentType=t.value,t=e.next();break;case 174:i.textAngleType=t.value,t=e.next();break;case 175:i.textAlignmentType=t.value,t=e.next();break;case 343:i.textStyleId=t.value,t=e.next();break;case 92:i.textColor=t.value,t=e.next();break;case 292:i.enableFrameText=t.value,t=e.next();break;case 344:i.blockContentId=t.value,t=e.next();break;case 93:i.blockContentColor=t.value,t=e.next();break;case 10:i.blockContentScale=vt(e),t=e.lastReadGroup;break;case 43:i.blockContentRotation=t.value,t=e.next();break;case 176:i.blockContentConnectionType=t.value,t=e.next();break;case 293:i.enableAnotationScale=t.value,t=e.next();break;case 94:i.arrowHeadIndex=t.value,t=e.next();break;case 177:i.blockAttributeIndex=t.value,t=e.next();break;case 44:i.blockAttributeWidth=t.value,t=e.next();break;case 302:i.blockAttributeTextString=t.value,t=e.next();break;case 294:i.textDirectionNegative=t.value,t=e.next();break;case 178:i.textAlignInIPE=t.value,t=e.next();break;case 179:i.textAttachmentPoint=t.value,t=e.next();break;case 271:i.textAttachmentDirectionMText=t.value,t=e.next();break;case 272:i.textAttachmentDirectionBottom=t.value,t=e.next();break;case 273:i.textAttachmentDirectionTop=t.value,t=e.next();break;case 300:r(),t=e.lastReadGroup;break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}}(),i}},u_=class{constructor(){this.ForEntityName="MTEXT"}parseEntity(e,t){let i={type:t.value};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 3:case 1:i.text?i.text+=t.value:i.text=t.value,t=e.next();break;case 10:i.position=vt(e),t=e.lastReadGroup;break;case 7:i.textStyle=t.value,t=e.next();break;case 44:i.lineSpaceFactor=t.value,t=e.next();break;case 11:i.directionVector=vt(e),t=e.lastReadGroup;break;case 40:i.height=t.value,t=e.next();break;case 41:i.width=t.value,t=e.next();break;case 50:i.rotation=t.value,t=e.next();break;case 71:i.attachmentPoint=t.value,t=e.next();break;case 72:i.drawingDirection=t.value,t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},h_=class{constructor(){this.ForEntityName="OLE2FRAME"}parseEntity(e,t){let i={type:t.value,binaryData:""};for(t=e.next();"OLE"!==t.value&&0!==t.code;)switch(t.code){case 3:i.documentType=t.value,t=e.next();break;case 70:i.version=t.value,t=e.next();break;case 10:i.leftUpX=t.value,t=e.next();break;case 20:i.leftUpY=t.value,t=e.next();break;case 30:i.leftUpZ=t.value,t=e.next();break;case 11:i.rightDownX=t.value,t=e.next();break;case 21:i.rightDownY=t.value,t=e.next();break;case 31:i.rightDownZ=t.value,t=e.next();break;case 90:i.lengthOfBinaryData=t.value,t=e.next();break;case 310:i.binaryData+=t.value,t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},p_=class{constructor(){this.ForEntityName="POINT"}parseEntity(e,t){let i={type:t.value};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 10:i.position=vt(e),t=e.lastReadGroup;break;case 39:i.thickness=t.value,t=e.next();break;case 210:i.extrusionDirection=vt(e),t=e.lastReadGroup;break;case 100:t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},d_=class{constructor(){this.ForEntityName="VERTEX"}parseEntity(e,t){var i={type:t.value};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 10:i.x=t.value,t=e.next();break;case 20:i.y=t.value,t=e.next();break;case 30:i.z=t.value,t=e.next();break;case 40:case 41:case 50:t=e.next();break;case 42:0!=t.value&&(i.bulge=t.value),t=e.next();break;case 70:i.curveFittingVertex=0!=(1&t.value),i.curveFitTangent=0!=(2&t.value),i.splineVertex=0!=(8&t.value),i.splineControlPoint=0!=(16&t.value),i.threeDPolylineVertex=0!=(32&t.value),i.threeDPolylineMesh=0!=(64&t.value),i.polyfaceMeshVertex=0!=(128&t.value),t=e.next();break;case 71:i.faceA=t.value,t=e.next();break;case 72:i.faceB=t.value,t=e.next();break;case 73:i.faceC=t.value,t=e.next();break;case 74:i.faceD=t.value,t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},f_=class{constructor(){this.ForEntityName="POLYLINE"}parseEntity(e,t){var i={type:t.value,vertices:[]};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 10:case 20:case 30:case 40:case 41:case 71:case 72:case 73:case 74:case 75:t=e.next();break;case 39:t=e.next(),i.thickness=t.value;break;case 70:i.shape=0!=(1&t.value),i.includesCurveFitVertices=0!=(2&t.value),i.includesSplineFitVertices=0!=(4&t.value),i.is3dPolyline=0!=(8&t.value),i.is3dPolygonMesh=0!=(16&t.value),i.is3dPolygonMeshClosed=0!=(32&t.value),i.isPolyfaceMesh=0!=(64&t.value),i.hasContinuousLinetypePattern=0!=(128&t.value),t=e.next();break;case 210:i.extrusionDirection=vt(e),t=e.lastReadGroup;break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i.vertices=i2t(e,t),i}};function i2t(e,t){let i=new d_,r=[];for(;!e.isEOF();)if(0===t.code)if("VERTEX"===t.value)r.push(i.parseEntity(e,t)),t=e.lastReadGroup;else if("SEQEND"===t.value){n2t(e,t);break}return r}function n2t(e,t){let i={type:t.value};for(t=e.next();!e.isEOF()&&0!==t.code;)if(101===t.code)for(;0!=t.code;)t=e.next();else fr(i,t),t=e.next();return i}var m_=class{constructor(){this.ForEntityName="RAY"}parseEntity(e,t){let i={type:t.value,vertices:[]};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 10:i.vertices.unshift(vt(e)),t=e.lastReadGroup;break;case 11:i.directionVector=vt(e),t=e.lastReadGroup;break;case 100:t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},g_=class{constructor(){this.ForEntityName="REGION"}parseEntity(e,t){let i={type:t.value};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 70:i.modelerVersion=t.value,t=e.next();break;case 1:i.proprietaryData=t.value,t=e.next();break;case 3:i.proprietaryData+=t.value,t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},v_=class{constructor(){this.ForEntityName="SEQEND"}parseEntity(e,t){let i={type:t.value};for(t=e.next();!e.isEOF()&&0!==t.code;)if(-2===t.code);else fr(i,t),t=e.next();return i}},y_=class{constructor(){this.ForEntityName="SOLID"}parseEntity(e,t){let i={type:t.value,points:[]};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 10:i.points[0]=vt(e),t=e.lastReadGroup;break;case 11:i.points[1]=vt(e),t=e.lastReadGroup;break;case 12:i.points[2]=vt(e),t=e.lastReadGroup;break;case 13:i.points[3]=vt(e),t=e.lastReadGroup;break;case 210:i.extrusionDirection=vt(e),t=e.lastReadGroup;break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},T_=class{constructor(){this.ForEntityName="SPLINE"}parseEntity(e,t){let i={type:t.value};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 10:i.controlPoints||(i.controlPoints=[]),i.controlPoints.push(vt(e)),t=e.lastReadGroup;break;case 11:i.fitPoints||(i.fitPoints=[]),i.fitPoints.push(vt(e)),t=e.lastReadGroup;break;case 12:i.startTangent=vt(e),t=e.lastReadGroup;break;case 13:i.endTangent=vt(e),t=e.lastReadGroup;break;case 40:i.knotValues||(i.knotValues=[]),i.knotValues.push(t.value),t=e.next();break;case 70:1&t.value&&(i.closed=!0),2&t.value&&(i.periodic=!0),4&t.value&&(i.rational=!0),8&t.value&&(i.planar=!0),16&t.value&&(i.planar=!0,i.linear=!0),t=e.next();break;case 71:i.degreeOfSplineCurve=t.value,t=e.next();break;case 72:i.numberOfKnots=t.value,t=e.next();break;case 73:i.numberOfControlPoints=t.value,t=e.next();break;case 74:i.numberOfFitPoints=t.value,t=e.next();break;case 210:i.normalVector=vt(e),t=e.lastReadGroup;break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},E_=class{constructor(){this.ForEntityName="TEXT"}parseEntity(e,t){let i={type:t.value};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 10:i.startPoint=vt(e),t=e.lastReadGroup;break;case 11:i.endPoint=vt(e),t=e.lastReadGroup;break;case 40:i.textHeight=t.value,t=e.next();break;case 41:i.xScale=t.value,t=e.next();break;case 50:i.rotation=t.value,t=e.next();break;case 1:i.text=t.value,t=e.next();break;case 72:i.halign=t.value,t=e.next();break;case 73:i.valign=t.value,t=e.next();break;case 7:i.textStyle=t.value,t=e.next();break;case 71:i.mirrored=t.value,t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},b_=class{constructor(){this.ForEntityName="VIEWPORT"}parseEntity(e,t){let i={type:t.value};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 68:i.viewportStatus=t.value,t=e.next();break;case 40:i.width_paperSpace=t.value,t=e.next();break;case 41:i.height_paperSpace=t.value,t=e.next();break;case 69:i.viewportId=t.value,t=e.next();break;case 10:i.centerPoint=vt(e),t=e.lastReadGroup;break;case 12:i.centerPoint_dcs=vt(e),t=e.lastReadGroup;break;case 13:i.snapBasePoint_dcs=vt(e),t=e.lastReadGroup;break;case 14:i.snapSpacing_dcs=vt(e),t=e.lastReadGroup;break;case 15:i.gridSpacing_dcs=vt(e),t=e.lastReadGroup;break;case 16:i.viewDirection=vt(e),t=e.lastReadGroup;break;case 17:i.viewTarget=vt(e),t=e.lastReadGroup;break;case 42:i.perspectiveLens=t.value,t=e.next();break;case 43:i.frontClippingPlaneZ=t.value,t=e.next();break;case 44:i.backClippingPlaneZ=t.value,t=e.next();break;case 45:i.viewHeight=t.value,t=e.next();break;case 50:i.snapAngle=t.value,t=e.next();break;case 51:i.viewTwistAngle=t.value,t=e.next();break;case 72:i.circleZoomPercent=t.value,t=e.next();break;case 331:i.frozenLayerHandles=i.frozenLayerHandles||[],i.frozenLayerHandles.push(t.value),t=e.next();break;case 90:i.viewportStatusFlags=t.value,t=e.next();break;case 340:i.viewportClippingBoundaryhandleId=t.value,t=e.next();break;case 1:i.plotStyleSheetName=t.value,t=e.next();break;case 281:i.renderMode=t.value,t=e.next();break;case 71:i.viewportFlag_ucs=t.value,t=e.next();break;case 74:i.ucsIcon=t.value,t=e.next();break;case 110:i.ucsOrigin=vt(e),t=e.lastReadGroup;break;case 111:i.ucsXAxis=vt(e),t=e.lastReadGroup;break;case 112:i.ucsYAxis=vt(e),t=e.lastReadGroup;break;case 345:i.ucsTableRecordHandle=t.value,t=e.next();break;case 346:i.baseUcsTableRecordHandle=t.value,t=e.next();break;case 79:i.orthographicType=t.value,t=e.next();break;case 146:i.elevation=t.value,t=e.next();break;case 170:i.shadePlotMode=t.value,t=e.next();break;case 61:i.frequency=t.value,t=e.next();break;case 292:i.lightingFlag=t.value,t=e.next();break;case 282:i.lightingType=t.value,t=e.next();break;case 141:i.viewBrightness=t.value,t=e.next();break;case 142:i.viewContrast=t.value,t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},x_=class{constructor(){this.ForEntityName="XLINE"}parseEntity(e,t){let i={type:t.value,vertices:[]};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 10:i.vertices.unshift(vt(e)),t=e.lastReadGroup;break;case 11:i.directionVector=vt(e),t=e.lastReadGroup;break;case 100:t=e.next();break;case 101:for(;0!=t.code;)t=e.next();break;default:fr(i,t),t=e.next()}return i}},tO=class{constructor(){this.ForObjectName="DICTIONARY"}parseObject(e,t){let i={type:t.value},r=[],n=[];for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 280:i.isHardOwner=1===t.value,t=e.next();break;case 281:i.cloningFlag=t.value,t=e.next();break;case 3:r.push(t.value),t=e.next();break;case 350:case 360:n.push(t.value),t=e.next();break;case 100:case 102:t=e.next();break;default:lh(i,t),t=e.next()}if(r.length!==n.length)throw new Error("The number of Dictionary entries does not match !");return i.entries={},r.forEach(((e,t)=>{i.entries[n[t]]=e})),i}},rO=class{constructor(){this.ForObjectName="LAYOUT"}parseObject(e,t){let i={type:t.value};for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 100:t=e.next();break;case 1:i.layoutName=t.value,t=e.next();break;case 70:i.flag=t.value,t=e.next();break;case 71:i.tabOrder=t.value,t=e.next();break;case 76:i.orthographicType=t.value,t=e.next();break;case 10:i.minLimit=vt(e),t=e.lastReadGroup;break;case 11:i.maxLimit=vt(e),t=e.lastReadGroup;break;case 12:i.basePoint=vt(e),t=e.lastReadGroup;break;case 13:i.origin=vt(e),t=e.lastReadGroup;break;case 14:i.minExtent=vt(e),t=e.lastReadGroup;break;case 15:i.maxExtent=vt(e),t=e.lastReadGroup;break;case 16:i.XAxis=vt(e),t=e.lastReadGroup;break;case 17:i.YAxis=vt(e),t=e.lastReadGroup;break;case 146:i.elevation=t.value,t=e.next();break;case 331:i.viewportHandle=t.value,t=e.next();break;default:lh(i,t),t=e.next()}return i.blockTableHandle=i.ownerHandle,i}},iO=class{constructor(){this.ForObjectName="SORTENTSTABLE"}parseObject(e,t){let i={type:t.value},r=!1;i.sortEntsObject={},i.sortEntsObject.entityHandles=[];let n=[];for(t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 5:r?(n.push(t.value),i.sortEntsObject.entityHandles.push(n),n=[]):i.handle=t.value,t=e.next();break;case 100:t=e.next(),r=!0;break;case 102:t=e.next();break;case 330:r?i.sortEntsObject.ownerHandle=t.value:i.ownerHandle=t.value,t=e.next();break;case 331:n.push(t.value),t=e.next();break;default:lh(i,t),t=e.next()}return i}},nO=class{constructor(){this.ForObjectName="SPATIAL_FILTER"}parseObject(e,t){let i,r,n={type:t.value};for(n.vertices=[],t=e.next();!e.isEOF()&&0!==t.code;)switch(t.code){case 11:n.origin=vt(e),t=e.lastReadGroup;break;case 70:n.numberOfPointsOnClipBoundary=t.value,2===n.numberOfPointsOnClipBoundary?(t=e.next(),i=vt(e),t=e.lastReadGroup,r=vt(e),t=e.lastReadGroup,n.vertices.push(i,{x:r.x,y:i.y},r,{x:i.x,y:r.y},i)):n.numberOfPointsOnClipBoundary>2?(n.vertices=s2t(n.numberOfPointsOnClipBoundary,e),t=e.lastReadGroup):t=e.next();break;case 71:n.clipBoundaryVisible=1===t.value,t=e.next();break;case 72:n.frontClippingPlaneFlag=1===t.value,t=e.next(),n.frontClippingPlaneFlag&&40===t.code&&(n.frontClippingPlaneDistance=t.value,t=e.next());break;case 73:n.backClippingPlaneFlag=1===t.value,t=e.next(),n.backClippingPlaneFlag&&41===t.code&&(n.backClippingPlaneDistance=t.value,t=e.next());break;case 100:case 102:t=e.next();break;case 210:n.extrusionDirectionX=t.value,t=e.next();break;case 220:n.extrusionDirectionY=t.value,t=e.next();break;case 230:n.extrusionDirectionZ=t.value,t=e.next();break;case 40:n.invertBlockMatrix=wMe(e,40),n.matrix=wMe(e,40),t=e.lastReadGroup;break;default:lh(n,t),t=e.next()}return n}};function s2t(e,t){t.next();let i=[];for(;i.length{e.on("data",(e=>{t+=e})),e.on("end",(()=>{try{r(i.parse(t))}catch(e){n(e)}})),e.on("error",(e=>{n(e)}))}))}_parse(e){let t={},i=0;if(!e.hasNext())throw Error("Empty file");let r,n=this;function s(){let t=null,i=null,n={};for(r=e.next();;){if(el(r,0,"ENDSEC")){t&&(n[t]=i);break}9===r.code?(t&&(n[t]=i),t=r.value):10===r.code?i={x:r.value}:20===r.code?i.y=r.value:30===r.code?i.z=r.value:i=r.value,r=e.next()}return r=e.next(),n}function a(){let t={};for(r=e.next();"EOF"!==r.value&&!el(r,0,"ENDSEC");)if(el(r,0,"BLOCK")){ne.trace("block {");let e=o();ne.trace("}"),m(e),e.name?t[e.name]=e:ne.error(`[DxfParser] Block with handle '${e.handle}' is missing a name, ignored!`)}else sd(r),r=e.next();return t}function o(){let t={};for(r=e.next();"EOF"!==r.value;){switch(r.code){case 1:t.xrefPath=r.value,r=e.next();break;case 2:t.name=r.value,r=e.next();break;case 3:t.name2=r.value,r=e.next();break;case 4:t.description=r.value,r=e.next();break;case 5:t.handle=r.value,r=e.next();break;case 8:t.layer=r.value,r=e.next();break;case 10:t.position=f(r),r=e.lastReadGroup;break;case 67:t.paperSpace=!(!r.value||1!==r.value),r=e.next();break;case 70:t.blockType=r.value,r=e.next();break;case 100:r=e.next();break;case 330:t.ownerHandle=r.value,r=e.next();break;case 0:if("ENDBLK"==r.value)break;t.entities=p(!0);break;default:sd(r),r=e.next()}if(el(r,0,"ENDBLK")){r=e.next();break}}return t}function l(){let t={};for(r=e.next();"EOF"!==r.value&&!el(r,0,"ENDSEC");)el(r,0,"TABLE")?(r=e.next(),c[r.value]?(ne.trace(r.value+" Table {"),t[c[r.value].tableName]=u(r),ne.trace("}")):ne.trace("Unhandled Table "+r.value)):r=e.next();return r=e.next(),t}let h="ENDTAB";function u(t){let i=c[t.value],n={},s=0;for(r=e.next();!el(r,0,h);)switch(r.code){case 5:n.handle=r.value,r=e.next();break;case 330:n.ownerHandle=r.value,r=e.next();break;case 100:"AcDbSymbolTable"===r.value||sd(r),r=e.next();break;case 70:s=r.value,r=e.next();break;case 0:r.value===i.dxfSymbolName?n[i.tableRecordsProperty]=i.parseTableRecords():(sd(r),r=e.next());break;default:sd(r),r=e.next()}let a=n[i.tableRecordsProperty];if(a){let e=a.constructor===Array?a.length:"object"==typeof a?Object.keys(a).length:void 0;s!==e&&ne.warn(`[DxfParser] Parsed ${e} ${i.dxfSymbolName}s but expected ${s}`)}return r=e.next(),n}let c={VPORT:{tableRecordsProperty:"viewPorts",tableName:"viewPort",dxfSymbolName:"VPORT",parseTableRecords:function(){let t=[],i={};for(ne.trace("ViewPort {"),r=e.next();!el(r,0,h);)switch(r.code){case 2:i.name=r.value,r=e.next();break;case 10:i.lowerLeftCorner=f(r),r=e.lastReadGroup;break;case 11:i.upperRightCorner=f(r),r=e.lastReadGroup;break;case 12:i.center=f(r),r=e.lastReadGroup;break;case 13:i.snapBasePoint=f(r),r=e.lastReadGroup;break;case 14:i.snapSpacing=f(r),r=e.lastReadGroup;break;case 15:i.gridSpacing=f(r),r=e.lastReadGroup;break;case 16:i.viewDirectionFromTarget=f(r),r=e.lastReadGroup;break;case 17:i.viewTarget=f(r),r=e.lastReadGroup;break;case 40:case 45:i.viewHeight=r.value,r=e.next();break;case 41:i.aspectRatio=r.value,r=e.next();break;case 42:i.lensLength=r.value,r=e.next();break;case 43:i.frontClippingPlane=r.value,r=e.next();break;case 44:i.backClippingPlane=r.value,r=e.next();break;case 50:i.snapRotationAngle=r.value,r=e.next();break;case 51:i.viewTwistAngle=r.value,r=e.next();break;case 79:i.orthographicType=r.value,r=e.next();break;case 110:i.ucsOrigin=f(r),r=e.lastReadGroup;break;case 111:i.ucsXAxis=f(r),r=e.lastReadGroup;break;case 112:i.ucsYAxis=f(r),r=e.lastReadGroup;break;case 281:i.renderMode=r.value,r=e.next();break;case 282:i.defaultLightingType=r.value,r=e.next();break;case 292:i.defaultLightingOn=r.value,r=e.next();break;case 330:i.ownerHandle=r.value,r=e.next();break;case 63:case 421:case 431:i.ambientColor=r.value,r=e.next();break;case 0:"VPORT"===r.value&&(ne.trace("}"),t.push(i),ne.trace("ViewPort {"),i={},r=e.next());break;default:sd(r),r=e.next()}return ne.trace("}"),t.push(i),t}},LTYPE:{tableRecordsProperty:"lineTypes",tableName:"lineType",dxfSymbolName:"LTYPE",parseTableRecords:function(){let t={},i={},s=0,a="",o=!1;for(ne.trace("LType {"),r=e.next();!el(r,0,"ENDTAB");)switch(r.code){case 2:i.name=r.value.toUpperCase(),a=i.name,r=e.next();break;case 3:i.description=r.value,r=e.next();break;case 9:case 44:case 45:case 46:case 70:case 75:default:r=e.next();break;case 40:i.patternLength=r.value,r=e.next();break;case 49:let l=r.value;o&&(l=Math.abs(l),o=!1),i.pattern.push(l),r=e.next();break;case 73:s=r.value,s>0&&(i.pattern=[]),r=e.next();break;case 74:0!==r.value&&(o=!0,n.unsupportedLineTypes[i.name]?n.unsupportedLineTypes[i.name]++:n.unsupportedLineTypes[i.name]=1),r=e.next();break;case 0:ne.trace("}"),s>0&&s!==i.pattern.length&&ne.warn("[DxfParser] lengths do not match on LTYPE pattern"),t[a]=i,i={},ne.trace("LType {"),r=e.next()}return ne.trace("}"),t[a]=i,t}},LAYER:{tableRecordsProperty:"layers",tableName:"layer",dxfSymbolName:"LAYER",parseTableRecords:function(){let t,i={},n={};for(ne.trace("Layer {"),r=e.next();!el(r,0,"ENDTAB");)switch(r.code){case 2:n.name=r.value,t=r.value,r=e.next();break;case 5:n.handle=r.value,r=e.next();break;case 62:n.visible=r.value>=0,n.colorIndex=Math.abs(r.value),n.color=c2t(n.colorIndex),r=e.next();break;case 70:n.flag=r.value,n.frozen=(1&n.flag)>0,r=e.next();break;case 420:n.color=Math.abs(r.value),r=e.next();break;case 6:n.lineType=r.value.toUpperCase(),r=e.next();break;case 370:n.lineweight=r.value,r=e.next();break;case 0:"LAYER"===r.value&&(ne.trace("}"),t&&(i[t]=n),ne.trace("Layer {"),n={},t=void 0,r=e.next());break;default:sd(r),r=e.next()}return ne.trace("}"),t&&(i[t]=n),i}},BLOCK_RECORD:{tableRecordsProperty:"blockRecords",tableName:"blockRecord",dxfSymbolName:"BLOCK_RECORD",parseTableRecords:function(){let t,i={},s={};for(ne.trace("BlockRecord {"),r=e.next();!el(r,0,"ENDTAB");)switch(r.code){case 5:s.handle=r.value,r=e.next();break;case 330:s.ownerHandle=r.value,r=e.next();break;case 2:s.blockName=r.value,t=s.blockName,r=e.next();break;case 340:s.layoutHandle=r.value,r=e.next();break;case 70:s.blockInsertUnits=r.value,r=e.next();break;case 280:s.blockExplodability=r.value,r=e.next();break;case 281:s.blockScalability=r.value,r=e.next();break;case 310:s.bitmap=r.value,r=e.next();break;case 0:if("BLOCK_RECORD"===r.value){ne.trace("}"),t&&(i[t]=s);let a=s.layoutHandle;t&&a&&a.length>0&&"0"!==a&&(n._layoutBlocks[a]=s),ne.trace("BlockRecord {"),s={},t=void 0,r=e.next()}else sd(r),r=e.next();break;default:sd(r),r=e.next()}ne.trace("}"),t&&(i[t]=s);let a=s.layoutHandle;return t&&a&&a.length>0&&"0"!==a&&(n._layoutBlocks[a]=s),i}},STYLE:{tableRecordsProperty:"styles",tableName:"style",dxfSymbolName:"STYLE",parseTableRecords:function(){let t,i={},n={};for(ne.trace("Style {"),r=e.next();!el(r,0,"ENDTAB");)switch(r.code){case 2:n.styleName=r.value,t=r.value,r=e.next();break;case 3:n.fontFile=r.value,r=e.next();break;case 4:n.bigFontFile=r.value,r=e.next();break;case 5:n.handle=r.value,r=e.next();break;case 7:n.textStyle=r.value,r=e.next();break;case 40:n.textHeight=r.value,r=e.next();break;case 41:n.xScale=r.value,r=e.next();break;case 42:n.priorTextHeight=r.value,r=e.next();break;case 50:n.rotation=r.value,r=e.next();break;case 70:default:r=e.next();break;case 71:n.mirroreType=r.value,r=e.next();break;case 330:n.ownerHandle=r.value,r=e.next();break;case 0:"STYLE"===r.value&&(ne.trace("}"),t&&(i[t]=n),ne.trace("Style {"),n={},t=void 0,r=e.next())}return ne.trace("}"),t&&(i[t]=n),i}},DIMSTYLE:{tableRecordsProperty:"dimStyles",tableName:"dimStyle",dxfSymbolName:"DIMSTYLE",parseTableRecords:function(){let t,i={},n={};for(ne.trace("DimStyle {"),r=e.next();!el(r,0,"ENDTAB");)switch(r.code){case 2:n.styleName=r.value,t=r.value,r=e.next();break;case 40:n.DIMSCALE=r.value,r=e.next();break;case 41:n.DIMASZ=r.value,r=e.next();break;case 42:n.DIMEXO=r.value,r=e.next();break;case 44:n.DIMEXE=r.value,r=e.next();break;case 75:n.DIMSE1=r.value,r=e.next();break;case 76:n.DIMSE2=r.value,r=e.next();break;case 77:n.DIMTAD=r.value,r=e.next();break;case 140:n.DIMTXT=r.value,r=e.next();break;case 144:n.DIMLFAC=r.value,r=e.next();break;case 147:n.DIMGAP=r.value,r=e.next();break;case 176:n.DIMCLRD=r.value,r=e.next();break;case 178:n.DIMCLRT=r.value,r=e.next();break;case 271:n.DIMDEC=r.value,r=e.next();break;case 341:n.DIMLDRBLK=r.value,r=e.next();break;case 70:default:r=e.next();break;case 0:"DIMSTYLE"===r.value&&(ne.trace("}"),t&&(i[t]=n),ne.trace("DimStyle {"),n={},t=void 0,r=e.next())}return ne.trace("}"),t&&(i[t]=n),i}}};function p(t){let i=[],s=t?"ENDBLK":"ENDSEC";for(t||(r=e.next());;)if(0===r.code){if(r.value===s)break;let t=n._entityHandlers[r.value];if(null==t){let t=r.value;n.unhandledEntities[t]||(n.unhandledEntities[t]=0),n.unhandledEntities[t]++,r=e.next();continue}{ne.trace(r.value+" {");let n=t.parseEntity(e,r);n&&(n.layer||(n.layer="0"),void 0===n.colorIndex&&(n.colorIndex=256),n.lineType||(n.lineType=QA)),r=e.lastReadGroup,ne.trace("}"),m(n),i.push(n)}}else r=e.next();return"ENDSEC"==s&&(r=e.next()),i}function d(){let t={};for(r=e.next();"EOF"!==r.value;)if(0===r.code){if("ENDSEC"===r.value)break;let i=n._objectHandlers[r.value];if(null==i){let t=r.value;n.unhandledObjects[t]||(n.unhandledObjects[t]=0),n.unhandledObjects[t]++,r=e.next();continue}{ne.trace(r.value+" {");let n=i.parseObject(e,r),s=r.value;r=e.lastReadGroup,ne.trace("}"),m(n),t[s]||(t[s]=[]),t[s].push(n)}}else r=e.next();return r=e.next(),t.LAYOUT&&(Object.keys(n._layoutBlocks).length!==t.LAYOUT.length&&ne.warn("[DxfParser] The number of layout and block associations does not match!"),t.LAYOUT.forEach((e=>{n._layoutBlocks[e.handle]&&(e.associatedBlockName=n._layoutBlocks[e.handle].blockName)})),t.LAYOUT.sort(((e,t)=>e.tabOrder-t.tabOrder))),t}function f(t){let i={},r=t.code;if(i.x=t.value,r+=10,(t=e.next()).code!=r)throw new Error(`Expected code for point value to be ${r} but got ${t.code}.`);return i.y=t.value,r+=10,(t=e.next()).code!=r||(i.z=t.value,t=e.next()),i}function m(e){if(!e)throw new TypeError("entity cannot be undefined or null");e.handle||(e.handle=(i++).toString())}return function(){for(r=e.next();999===r.code;)r=e.next();for(;!e.isEOF();)if(0===r.code&&"SECTION"===r.value){if(r=e.next(),2!==r.code){ne.error("Unexpected code %s after 0:SECTION",RMe(r)),r=e.next();continue}if("HEADER"===r.value)ne.trace("> HEADER"),t.header=s(),ne.trace("<");else if("TABLES"===r.value)ne.trace("> TABLES"),t.tables=l(),ne.trace("<");else if("BLOCKS"===r.value)ne.trace("> BLOCKS"),t.blocks=a(),ne.trace("<");else if("ENTITIES"===r.value)ne.trace("> ENTITIES"),t.entities=p(!1),ne.trace("<");else if("OBJECTS"===r.value)ne.trace("> OBJECTS"),t.objects=d(),ne.trace("<");else if("EOF"===r.value)ne.trace("EOF");else{let e=r.value;n.unhandledSections[e]?n.unhandledSections[e]++:n.unhandledSections[e]=1}}else r=e.next();n.unhandledSections={},n.unhandledEntities={},n.unhandledObjects={},n.unsupportedLineTypes={}}(),t}splitByLineSeparator(e){let t=[],i=0;for(let r=0,n=e.length;r(e.Added="Added",e.Removed="Removed",e.Modified="Modified",e.NoChange="NoChange",e))(L8||{}),Vs=1,aO=class{constructor(e,t){if(this.changes={},this.comparedBlocks=new Map,this.isComparingBlock=!1,this.isComparingDimension=!1,this.dxf1=e,this.dxf2=t,!e||!t)throw new Error("Invalid dxf data to compare!")}getLayerFrozen(e,t){var i,r,n;let s=null==(r=null==(i=e.tables)?void 0:i.layer)?void 0:r.layers;return s&&(null==(n=s[t.layer])?void 0:n.frozen)}compare(e){return ht(this,null,(function*(){this.changes={};let t=[],i=new Map;return this.dxf1.entities.forEach((e=>{if(!0!==e.inPaperSpace){let i=!0===this.getLayerFrozen(this.dxf1,e);!aO.ignoreEntityTypes.includes(e.type)&&!i&&t.push(e)}})),this.dxf2.entities.forEach((e=>{if(!0!==e.inPaperSpace){let t=!0===this.getLayerFrozen(this.dxf2,e);!aO.ignoreEntityTypes.includes(e.type)&&!t&&i.set(e.handle,e)}})),yield this.compareEntities(t,i,void 0,e),Promise.resolve(this.changes)}))}isDimensionBlock(e){return e.includes("*D")}compareInsertOrDemensionEntities(e,t,i,r){if(!e.block||!t.block)return;let n,s=e.block;if(this.isComparingBlock=!0,this.isDimensionBlock(s)){let i=this.dxf1.blocks[e.block],r=this.dxf2.blocks[t.block],a=Date.now();this.isComparingDimension=!0,n=this.compareBlock(i,r),this.isComparingDimension=!1,ne.debug(`[DxfCompare] compare block: ${s} cost ${(Date.now()-a)/1e3}s`)}else{if(!this.comparedBlocks.has(s)){let e=this.dxf1.blocks[s],t=this.dxf2.blocks[s],i=Date.now(),r=this.compareBlock(e,t);this.comparedBlocks.set(s,r),ne.debug(`[DxfCompare] compare block: ${s} cost ${(Date.now()-i)/1e3}s`)}n=this.comparedBlocks.get(s)}return null==n||n.forEach((t=>{if(t.parentHandles||(t.parentHandles=[]),i&&r)"Added"===t.type?t.parentHandles.push(r):"Removed"===t.type&&t.parentHandles.push(i);else{let i=[...t.parentHandles,e.handle];("Added"===t.type||"Removed"===t.type)&&(this.changes[Vs]=Dn(Br({id:Vs},t),{parentHandles:i})),Vs++}})),!i&&!r&&(this.isComparingBlock=!1),n}compareBlock(e,t){var i,r;let n=[],s=[];null==(i=null==e?void 0:e.entities)||i.forEach((e=>{"ATTDEF"!==e.type&&!this.bIgnoreChildEntitiesOriginalType(e)&&n.push(e)})),null==(r=null==t?void 0:t.entities)||r.forEach((e=>{"ATTDEF"!==e.type&&!this.bIgnoreChildEntitiesOriginalType(e)&&s.push(e)}));let a=[],o=[];for(let e=0;e0&&a.push(...n),i=!1,s.splice(e--,1);break}i=!1,s.splice(e--,1);break}i=!0}i&&(a.push({type:"Removed",handle:t.handle}),o.push(t.handle))}return s.forEach((e=>{o.includes(e.handle)||a.push({type:"Added",handle:e.handle})})),a}compareEntities(e,t,i,r){return ht(this,null,(function*(){var n,s;let a=e.length,o=Math.round(Math.pow(a,.5)),l=Date.now(),h=e=>ht(this,null,(function*(){if(r&&(e%o==0||e===a-1)){r(new ProgressEvent("compareProgress",{loaded:e+1,total:a}));let t=500,i=Date.now();(i-l>t||e===a-1)&&(yield xs.sleep(0),l=i)}}));for(let r=0;r\n\n // Clamp [0..1] range\n #define saturate(a) clamp(a, 0.0, 1.0)\n\n const float EPS = 0.000001;\n\n vec2 getWorldScale() {\n return vec2(length(modelMatrix[0].xyz), length(modelMatrix[1].xyz));\n }\n\n vec2 rotate(vec2 st, float rotation) {\n const float PI = 3.1415926;\n float angle = rotation * PI/180.0;\n float sine = sin(angle), cosine = cos(angle);\n return vec2(cosine * st.x - sine * st.y, cosine * st.y + sine * st.x);\n }\n\n vec2 translate(vec2 samplePosition, vec2 offset) {\n //move samplepoint in the opposite direction that we want to move shapes in\n return samplePosition - offset;\n }\n\n vec2 scale(vec2 samplePosition, float scale) {\n return samplePosition / scale;\n }\n\n float sdfLine(vec2 st, vec2 a, vec2 b) {\n vec2 ap = st - a;\n vec2 ab = b - a;\n return abs(((ap.x * ab.y) - (ab.x * ap.y))) / length(ab);\n }\n\n float drawSpaceLine(vec2 st, float distanceBetweenLines, float thick) {\n float dist = sdfLine(st , vec2(0.0, 0.0) , vec2(1.0, 0.0));\n \n //vec2 tt = dFdy(st);\n //float scale = (abs(tt.x)+abs(tt.y))/2.0;\n //float scale = length(fwidth(st)) * 0.5;\n // close to a pixel\n //float thick = 2.0;\n //thick = (thick * 0.5 - 0.5) * scale;\n\n float lineDistance = abs(fract(dist / distanceBetweenLines + 0.5) - 0.5) * distanceBetweenLines;\n //float distanceChange = fwidth(dist) * 0.5;\n //float thresold = smoothstep(thick - distanceChange, thick + distanceChange, lineDistance);\n //float thresold = step(thick,lineDistance);\n // remove gradient\n float thresold = step(thick,lineDistance);\n\n return saturate(thresold);\n }\n\n float drawSolidLine(PatternLine patternLine, float thick) {\n vec2 origin = patternLine.origin;\n vec2 delta = patternLine.delta;\n float distanceBetweenLines = length(delta);\n\n origin = rotate(origin,u_patternAngle);\n vec2 st = rotate(v_pos.xy - origin, -(patternLine.angle + u_patternAngle));\n\n return drawSpaceLine(st, distanceBetweenLines , thick);\n }\n\n int getPatternIndex(PatternLine patternLine, float u ) {\n u = mod(u, patternLine.patternLength);\n float distance = 0.0;\n\n #pragma unroll_loop_start\n for(int i = 1; i < patternLine.patternSum.length(); i++){\n if(u < patternLine.patternSum[i]) {\n distance = u - patternLine.patternSum[i-1];\n return i - 1;\n }\n }\n #pragma unroll_loop_end\n\n return -1;\n }\n\n float drawDashedLine(PatternLine patternLine, float thick){\n float thresold = 1.0;\n vec2 origin = patternLine.origin;\n vec2 delta = patternLine.delta; \n float distanceBetweenLines = length(delta.y);\n\n origin = rotate(origin, u_patternAngle);\n vec2 st = rotate(v_pos.xy - origin, -(patternLine.angle + u_patternAngle));\n\n float offsetX = st.y * delta.x/delta.y;\n float u = st.x - offsetX;\n int index = getPatternIndex(patternLine, u);\n if(index < 0){\n return thresold;\n }\n\n float size = patternLine.pattern[index];\n if(size >= 0.0) {\n thresold = drawSpaceLine(st, distanceBetweenLines , thick);\n }\n \n return thresold;\n }\n\n float drawLine(PatternLine patternLine, float thick) {\n float t = 0.0;\n if(patternLine.patternLength > 0.0) {\n t = drawDashedLine(patternLine, thick);\n } else {\n t = drawSolidLine(patternLine, thick);\n }\n return t;\n }\n\n void main() {\n #include \n \n if(u_cameraZoom < EPS){\n gl_FragColor = vec4(u_color, 1.0);\n return;\n }\n\n vec2 worldScale = getWorldScale();\n float averageScale = (abs(worldScale.x) + abs(worldScale.y))/2.0;\n float thick = (0.7 / averageScale) / u_cameraZoom;\n\n float total = 0.0;\n\n#if ${e.length} > 1\n #pragma unroll_loop_start\n for (int i = 0; i < u_patternLines.length(); i++) {\n PatternLine pl = u_patternLines[i];\n float t = drawLine(pl, thick);\n total += (1.0 - t);\n }\n #pragma unroll_loop_end\n#else\n float t = drawLine(u_patternLines[0], thick);\n total += (1.0 - t);\n#endif\n\n total = saturate(total);\n if (total < 0.01) {\n discard;\n }\n\n gl_FragColor = vec4(u_color * total, 1.0);\n }\n `;return new Yt({uniforms:n,vertexShader:"\n varying vec3 v_pos;\n\n #include \n void main() {\n //vec4 worldPosition = modelMatrix * vec4(position, 1.0);\n v_pos = position;\n\n #include \n #include \n #include \n }",fragmentShader:s,clipping:!0})}qn.ENTITY_COLOR_ADDED=65280,qn.ENTITY_COLOR_REMOVED=16711680,qn.ENTITY_COLOR_NO_CHANGE=10066329,qn.ENTITY_COLOR_MARKUP=16744231,qn.ignoreEntityTypes=["ATTRIB","SEQEND"];var oO=class{static createLineShaderMaterial(e,t,i,r,n){let s=0,a=[];for(let t=0;t\n\n vec2 getWorldScale() {\n return vec2(length(modelMatrix[0].xyz), length(modelMatrix[1].xyz));\n }\n\n void main() {\n\n #include \n\n // vec2 worldScale = getWorldScale();\n // float averageScale = (abs(worldScale.x) + abs(worldScale.y))/2.0;\n // When zoomed out to a certain extent, it is displayed as a solid line.\n if(patternLength * u_viewportScale * u_cameraZoom/1.5 < 1.0){\n gl_FragColor = vec4(u_color, opacity);\n return;\n }\n\n float pos = mod(vLineDistance, patternLength * u_viewportScale);\n\n for ( int i = 0; i < ${e.length}; i++ ) {\n pos = pos - abs(pattern[i] * u_viewportScale);\n if ( pos < 0.0 ) {\n if ( pattern[i] > 0.0 ) {\n gl_FragColor = vec4(u_color, opacity);\n break;\n }\n discard;\n }\n }\n }`;return new Yt({uniforms:o,vertexShader:"\n attribute float lineDistance;\n varying float vLineDistance;\n\n #include \n\n void main() {\n vLineDistance = lineDistance;\n\n #include \n #include \n #include \n }",fragmentShader:l,clipping:!0})}},B8={};QS(B8,{default:()=>U8});var H8={};QS(H8,{default:()=>F8});var F8=(e,t)=>void 0===t||0==+t?Math.round(e):(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!=0?NaN:(e=e.toString().split("e"),+((e=(e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t)))).toString().split("e"))[0]+"e"+(e[1]?+e[1]+t:t)))),U8=(e,t,i,r,n)=>{let s=i.length,a=i[0].length;if(e<0||e>1)throw new Error("t out of bounds [0,1]: "+e);if(t<1)throw new Error("degree must be at least 1 (linear)");if(t>s-1)throw new Error("degree must be less than or equal to point count - 1");if(r){if(r.length!==s+t+1)throw new Error("bad knot vector length")}else{r=[];for(let e=0;e=r[o]&&e<=r[o+1]);o++);let c,p=[];for(let e=0;eo-t-1+i;n--){c=(e-r[n])/(r[n+t+1-i]-r[n]);for(let e=0;e{if(!e)return[];e=e.replace(/%%(.)/g,((e,t)=>u2t[t]||t));let i,r=null==t?void 0:t.encoding,n=r instanceof TextDecoder?r:void 0,s="",a=[],o=e=>{s&&(a.push(s),s=""),a.push(e)};for(let t=0;t(e=d2t(e),t?f2t(e,t):e),d2t=e=>e.replace(/\\[uU]\+([0-9a-fA-F]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))),f2t=(e,t)=>{let i=t instanceof TextDecoder?t:new TextDecoder(t);return e.replace(/\\[mM]\+[0|1]([0-9a-fA-F]{2})([0-9a-fA-F]{2})/g,((e,r,n)=>(i=i||new TextDecoder(t)).decode(new Uint8Array([parseInt(r,16),parseInt(n,16)]))))},cO=(e,t)=>{let i=0,r={text:""},n=[r],s=(e=p2t(e,null==t?void 0:t.encoding)).matchAll(/%%(\d\d\d|.)/g);for(let t of s){r.text+=e.slice(i,t.index);let s=t[1].toLowerCase(),a=h2t[s];a?r.text+=a:3===s.length?r.text+=String.fromCodePoint(+s):"k"===s||"o"===s||"u"===s?(r=Dn(Br({},r),{text:""}),r[s]?delete r[s]:r[s]=1,n.push(r)):r.text+=s,i=t.index+t[0].length}return r.text+=e.slice(i),n.filter((e=>e.text))},k8=(e=>(e.Unitless="Unitless",e.Inches="Inches",e.Feet="Feet",e.Millimeters="Millimeters",e.Centimeters="Centimeters",e.Meters="Meters",e))(k8||{}),DMe=e=>"Unitless"===e?1:"Inches"===e?.0254:"Feet"===e?.3048:"Millimeters"===e?.001:"Centimeters"===e?.01:("Meters"===e||console.warn(`[Units] Unsupported unit '${e}', will return 1 for unit scale.`),1),G8=(e,t)=>DMe(e)/DMe(t),XT="0.2.25",CMe="VERSION",g2t=()=>window.localStorage.getItem(CMe),v2t=()=>{window.localStorage.setItem(CMe,XT)},AMe=()=>g2t()!==XT&&(v2t(),!0),$T=class{constructor(){this.DATABASE_NAME="gemini_viewer_db",this.TABLES=[{name:"viewpoint",options:{keyPath:"id",autoIncrement:!0},indexArray:[]},{name:"annotation",options:{keyPath:"id",autoIncrement:!0},indexArray:[]},{name:"dxfdata",options:{keyPath:"dxfDataId",autoIncrement:!1},indexArray:[]},{name:"fontdata",options:{keyPath:"url",autoIncrement:!0},indexArray:[]}],this.db=void 0}static instance(){return $T._instance||($T._instance=new $T),$T._instance}getDatabase(){return ht(this,null,(function*(){let e=yield this.getDB(this.DATABASE_NAME);return this.db||(e.close(),AMe()&&(yield this.deleteDataBase(this.DATABASE_NAME)),e=yield this.getUpgradedDB(e)),e.onclose=()=>{this.db=void 0,ne.debug(`[DB] Db ${e.name} is closed.`)},e.onerror=t=>{this.db=void 0,ne.debug(`[DB] Db ${e.name} encountered error.`,t)},e.onabort=t=>{this.db=void 0,ne.debug(`[DB] Db ${e.name} aborted.`,t)},e.onversionchange=e=>{ne.debug("onversionchange",e)},this.db=e,Promise.resolve(this.db)}))}closeDatabase(){this.db&&this.db.close()}deleteDataBase(e){return new Promise(((t,i)=>{let r=window.indexedDB.deleteDatabase(e);r.onerror=e=>{ne.debug(e),i(e)},r.onsuccess=i=>{let r=i.target;ne.debug(`[DB] Db ${e} delete old version ${i.oldVersion}.`),t(r)}}))}getDB(e){return ht(this,null,(function*(){return new Promise(((t,i)=>{let r=window.indexedDB.open(e);r.onerror=i,r.onsuccess=e=>{let i=e.target.result;ne.debug(`[DB] Db ${i.name} opened (version ${i.version}).`),t(i)}}))}))}getUpgradedDB(e){return ht(this,null,(function*(){return new Promise(((t,i)=>{ne.debug(`[DB] Upgrading db ${e.name} (version ${e.version})`);let r=window.indexedDB.open(e.name,e.version+1);r.onerror=i,r.onblocked=e=>{ne.debug("onblocked",e)},r.onupgradeneeded=e=>{e.target.transaction.oncomplete=()=>{ne.debug(`[DB] Upgrade is done (new version: ${t.version}).`)};let t=e.target.result,i=[];for(let e=0;e0&&Promise.all(i).then((()=>{ne.debug(`[DB] All(${i.length}) tables created.`)}))},r.onsuccess=e=>{let i=e.target.result;ne.debug(`[DB] Db ${i.name} opened (version ${i.version}).`),t(i)}}))}))}createTable(e,t,i,r){return ht(this,null,(function*(){return new Promise((n=>{let s=e.createObjectStore(t,i);r&&r.forEach((e=>{s.createIndex(e.name,e.fields,{unique:e.unique})})),ne.debug(`[DB] Table ${t} created.`),n(e)}))}))}},ss=$T;ss._instance=void 0;var ch=class{constructor(){if(this.db=void 0,this.isCreatingTable=!1,-1===ss.instance().TABLES.findIndex((e=>e.name===this.tableName())))throw new Error(`Make sure to add table '${this.tableName()}' to IndexedDbManager.TABLES!`)}tableName(){throw new Error("Derived class have to override 'tableName', and set a proper table name!")}add(e,t,i){let r=this.tableName();ss.instance().getDatabase().then((n=>{let s=n.transaction([r],"readwrite").objectStore(r).add(e);s.onsuccess=t,s.onerror=i})).finally((()=>{ss.instance().closeDatabase()})).catch((e=>{i&&i(e)}))}save(e,t,i){let r=this.tableName();ss.instance().getDatabase().then((n=>{let s=n.transaction([r],"readwrite").objectStore(r).put(e);s.onsuccess=t,s.onerror=i})).finally((()=>{ss.instance().closeDatabase()}))}delete(e,t,i){let r=this.tableName();ss.instance().getDatabase().then((n=>{let s=n.transaction([r],"readwrite").objectStore(r).delete(e);s.onsuccess=t,s.onerror=i})).finally((()=>{ss.instance().closeDatabase()}))}update(){ss.instance().getDatabase().then((()=>{}))}query(e,t){let i=this.tableName();ss.instance().getDatabase().then((r=>{let n=r.transaction([i],"readonly").objectStore(i).openCursor();n.onsuccess=t=>{let i=t.target.result;i&&i.continue(),e&&e(i)},n.onerror=t})).finally((()=>{ss.instance().closeDatabase()}))}queryAll(e,t){let i=this.tableName();ss.instance().getDatabase().then((r=>{let n=r.transaction([i],"readonly").objectStore(i).getAll();n.onsuccess=t=>{e&&e(n.result)},n.onerror=t})).finally((()=>{ss.instance().closeDatabase()}))}clearAll(e,t){let i=this.tableName();ss.instance().getDatabase().then((r=>{let n=r.transaction([i],"readwrite").objectStore(i).clear();n.onsuccess=t=>{e&&e(t)},n.onerror=e=>{t&&t(e)}})).finally((()=>{ss.instance().closeDatabase()}))}},KT=class extends ch{tableName(){return"annotation"}static instance(){return KT._instance||(KT._instance=new KT),KT._instance}query(e,t,i){let r=[];super.query((i=>{i?!i.value||i.value.projectId!==e||r.push(i.value):t&&t(r)}),(e=>{console.log(e)}))}},V8=KT;V8._instance=void 0;var ZT=class extends ch{tableName(){return"viewpoint"}static instance(){return ZT._instance||(ZT._instance=new ZT),ZT._instance}query(e,t,i){let r=[];super.query((i=>{i?!i.value||i.value.projectId!==e||r.push(i.value):t&&t(r)}),(e=>{i&&i(),console.log(e)}))}},z8=ZT;z8._instance=void 0;var JT=class extends ch{tableName(){return"dxfdata"}static instance(){return JT._instance||(JT._instance=new JT),JT._instance}query(e,t,i){let r=[],n=this.tableName();ss.instance().getDatabase().then((s=>{let a=s.transaction([n],"readonly").objectStore(n).get(e);a.onerror=e=>{i&&i(e),ne.info("[DxfDataTable] Failed to query !",e)},a.onsuccess=()=>{a.result&&r.push(a.result),t&&t(r)}})).finally((()=>{ss.instance().closeDatabase()}))}},QT=JT;QT._instance=void 0;var _0=class extends ch{tableName(){return"fontdata"}static instance(){return _0._instance||(_0._instance=new _0),_0._instance}query(e,t,i){let r;super.query((i=>{i?!i.value||i.value.url!==e||(r=i.value):t&&t(r)}),(e=>{i&&i(),console.log(e)}))}queryAll(){return ht(this,null,(function*(){return new Promise(((e,t)=>{U7(_0.prototype,this,"queryAll").call(this,(t=>{e(t)}),(e=>{t(e)}))}))}))}},uh=_0;uh._instance=void 0;var hO,OMe=(e=>(e[e.Horizontal=0]="Horizontal",e[e.Vertical=1]="Vertical",e[e.All=2]="All",e))(OMe||{}),S0=(e=>(e[e.Shapes=0]="Shapes",e[e.Bigfont=1]="Bigfont",e[e.Unifont=2]="Unifont",e))(S0||{}),uO=12,ad=class extends Qa{constructor(e,t){super(),this.width=0,this.lastPoint=e,this.polyLines=t,this.width=this.calcWidth(t)}offset(e){let t=[];for(let i=0;i>8}}return t.subarray(0,i)}var T2t="啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽劲荆兢觉决诀绝均菌钧军君峻俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座锕嗳嫒瑷暧霭谙铵鹌媪骜鳌钯呗钣鸨龅鹎贲锛荜哔滗铋筚跸苄缏笾骠飑飙镖镳鳔傧缤槟殡膑镔髌鬓禀饽钹鹁钸骖黪恻锸侪钗冁谄谶蒇忏婵骣觇禅镡伥苌怅阊鲳砗伧谌榇碜龀枨柽铖铛饬鸱铳俦帱雠刍绌蹰钏怆缍鹑辍龊鹚苁骢枞辏撺锉鹾哒鞑骀绐殚赕瘅箪谠砀裆焘镫籴诋谛绨觌镝巅钿癫铫鲷鲽铤铥岽鸫窦渎椟牍笃黩簖怼镦炖趸铎谔垩阏轭锇锷鹗颚颛鳄诶迩铒鸸鲕钫鲂绯镄鲱偾沣凫驸绂绋赙麸鲋鳆钆赅尴擀绀戆睾诰缟锆纥镉颍亘赓绠鲠诟缑觏诂毂钴锢鸪鹄鹘鸹掴诖掼鹳鳏犷匦刿妫桧鲑鳜衮绲鲧埚呙帼椁蝈铪阚绗颉灏颢诃阖蛎黉讧荭闳鲎浒鹕骅桦铧奂缳锾鲩鳇诙荟哕浍缋珲晖诨馄阍钬镬讦诘荠叽哜骥玑觊齑矶羁虿跻霁鲚鲫郏浃铗镓蛲谏缣戋戬睑鹣笕鲣鞯绛缰挢峤鹪鲛疖颌鲒卺荩馑缙赆觐刭泾迳弪胫靓阄鸠鹫讵屦榉飓钜锔窭龃锩镌隽谲珏皲剀垲忾恺铠锴龛闶钪铐骒缂轲钶锞颔龈铿喾郐哙脍狯髋诓诳邝圹纩贶匮蒉愦聩篑阃锟鲲蛴崃徕涞濑赉睐铼癞籁岚榄斓镧褴阆锒唠崂铑铹痨鳓诔缧俪郦坜苈莅蓠呖逦骊缡枥栎轹砺锂鹂疠粝跞雳鲡鳢蔹奁潋琏殓裢裣鲢魉缭钌鹩蔺廪檩辚躏绫棂蛏鲮浏骝绺镏鹨茏泷珑栊胧砻偻蒌喽嵝镂瘘耧蝼髅垆撸噜闾泸渌栌橹轳辂辘氇胪鸬鹭舻鲈脔娈栾鸾銮囵荦猡泺椤脶镙榈褛锊呒唛嬷杩劢缦镘颡鳗麽扪焖懑钔芈谧猕祢渑腼黾缈缪闵缗谟蓦馍殁镆钼铙讷铌鲵辇鲶茑袅陧蘖嗫颟蹑苎咛聍侬哝驽钕傩讴怄瓯蹒疱辔纰罴铍谝骈缥嫔钋镤镨蕲骐绮桤碛颀颃鳍佥荨悭骞缱椠钤嫱樯戗炝锖锵镪羟跄诮谯荞缲硗跷惬锲箧锓揿鲭茕蛱巯赇虮鳅诎岖阒觑鸲诠绻辁铨阕阙悫荛娆桡饪轫嵘蝾缛铷颦蚬飒毵糁缫啬铯穑铩鲨酾讪姗骟钐鳝垧殇觞厍滠畲诜谂渖谥埘莳弑轼贳铈鲥绶摅纾闩铄厮驷缌锶鸶薮馊飕锼谡稣谇荪狲唢睃闼铊鳎钛鲐昙钽锬顸傥饧铴镗韬铽缇鹈阗粜龆鲦恸钭钍抟饨箨鼍娲腽纨绾辋诿帏闱沩涠玮韪炜鲔阌莴龌邬庑怃妩骛鹉鹜饩阋玺觋硖苋莶藓岘猃娴鹇痫蚝籼跹芗饷骧缃飨哓潇骁绡枭箫亵撷绁缬陉荥馐鸺诩顼谖铉镟谑泶鳕埙浔鲟垭娅桠氩厣赝俨兖谳恹闫酽魇餍鼹炀轺鹞鳐靥谒邺晔烨诒呓峄饴怿驿缢轶贻钇镒镱瘗舣铟瘾茔莺萦蓥撄嘤滢潆璎鹦瘿颏罂镛莸铕鱿伛俣谀谕蓣嵛饫阈妪纡觎欤钰鹆鹬龉橼鸢鼋钺郓芸恽愠纭韫殒氲瓒趱錾驵赜啧帻箦谮缯谵诏钊谪辄鹧浈缜桢轸赈祯鸩诤峥钲铮筝骘栉栀轵轾贽鸷蛳絷踬踯觯锺纣绉伫槠铢啭馔颞骓缒诼镯谘缁辎赀眦锱龇鲻偬诹驺鲰镞缵躜鳟讠谫郄勐凼坂垅垴埯埝苘荬荮莜莼菰藁揸吒吣咔咝咴噘噼嚯幞岙嵴彷徼犸狍馀馇馓馕愣憷懔丬溆滟溷漤潴澹甯纟绔绱珉枧桊桉槔橥轱轷赍肷胨飚煳煅熘愍淼砜磙眍钚钷铘铞锃锍锎锏锘锝锪锫锿镅镎镢镥镩镲稆鹋鹛鹱疬疴痖癯裥襁耢颥螨麴鲅鲆鲇鲞鲴鲺鲼鳊鳋鳘鳙鞒鞴齄",NMe="啊阿埃挨哎唉哀皚癌藹矮艾礙愛隘鞍氨安俺按暗岸胺案骯昂盎凹敖熬翺襖傲奧懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙壩霸罷爸白柏百擺佰敗拜稗斑班搬扳般頒板版扮拌伴瓣半辦絆邦幫梆榜膀綁棒磅蚌鎊傍謗苞胞包褒剝薄雹保堡飽寶抱報暴豹鮑爆杯碑悲卑北輩背貝鋇倍狽備憊焙被奔苯本笨崩繃甭泵蹦迸逼鼻比鄙筆彼碧蓖蔽畢斃毖幣庇痹閉敝弊必辟壁臂避陛鞭邊編貶扁便變卞辨辯辮遍標彪膘表鱉憋別癟彬斌瀕濱賓擯兵冰柄丙秉餅炳病並玻菠播撥缽波博勃搏鉑箔伯帛舶脖膊渤泊駁捕蔔哺補埠不布步簿部怖擦猜裁材才財睬踩采彩菜蔡餐參蠶殘慚慘燦蒼艙倉滄藏操糙槽曹草廁策側冊測層蹭插叉茬茶查碴搽察岔差詫拆柴豺攙摻蟬饞讒纏鏟產闡顫昌猖場嘗常長償腸廠敞暢唱倡超抄鈔朝嘲潮巢吵炒車扯撤掣徹澈郴臣辰塵晨忱沈陳趁襯撐稱城橙成呈乘程懲澄誠承逞騁秤吃癡持匙池遲弛馳恥齒侈尺赤翅斥熾充沖蟲崇寵抽酬疇躊稠愁籌仇綢瞅醜臭初出櫥廚躇鋤雛滁除楚礎儲矗搐觸處揣川穿椽傳船喘串瘡窗幢床闖創吹炊捶錘垂春椿醇唇淳純蠢戳綽疵茨磁雌辭慈瓷詞此刺賜次聰蔥囪匆從叢湊粗醋簇促躥篡竄摧崔催脆瘁粹淬翠村存寸磋撮搓措挫錯搭達答瘩打大呆歹傣戴帶殆代貸袋待逮怠耽擔丹單鄲撣膽旦氮但憚淡誕彈蛋當擋黨蕩檔刀搗蹈倒島禱導到稻悼道盜德得的蹬燈登等瞪凳鄧堤低滴迪敵笛狄滌翟嫡抵底地蒂第帝弟遞締顛掂滇碘點典靛墊電佃甸店惦奠澱殿碉叼雕雕刁掉吊釣調跌爹碟蝶叠諜疊丁盯叮釘頂鼎錠定訂丟東冬董懂動棟侗恫凍洞兜抖鬥陡豆逗痘都督毒犢獨讀堵睹賭杜鍍肚度渡妒端短鍛段斷緞堆兌隊對墩噸蹲敦頓囤鈍盾遁掇哆多奪垛躲朵跺舵剁惰墮蛾峨鵝俄額訛娥惡厄扼遏鄂餓恩而兒耳爾餌洱二貳發罰筏伐乏閥法琺藩帆番翻樊礬釩繁凡煩反返範販犯飯泛坊芳方肪房防妨仿訪紡放菲非啡飛肥匪誹吠肺廢沸費芬酚吩氛分紛墳焚汾粉奮份忿憤糞豐封楓蜂峰鋒風瘋烽逢馮縫諷奉鳳佛否夫敷膚孵扶拂輻幅氟符伏俘服浮涪福袱弗甫撫輔俯釜斧脯腑府腐赴副覆賦復傅付阜父腹負富訃附婦縛咐噶嘎該改概鈣蓋溉幹甘桿柑竿肝趕感稈敢贛岡剛鋼缸肛綱崗港杠篙臯高膏羔糕搞鎬稿告哥歌擱戈鴿胳疙割革葛格蛤閣隔鉻個各給根跟耕更庚羹埂耿梗工攻功恭龔供躬公宮弓鞏汞拱貢共鉤勾溝茍狗垢構購夠辜菇咕箍估沽孤姑鼓古蠱骨谷股故顧固雇刮瓜剮寡掛褂乖拐怪棺關官冠觀管館罐慣灌貫光廣逛瑰規圭矽歸龜閨軌鬼詭癸桂櫃跪貴劊輥滾棍鍋郭國果裹過哈骸孩海氦亥害駭酣憨邯韓含涵寒函喊罕翰撼捍旱憾悍焊汗漢夯杭航壕嚎豪毫郝好耗號浩呵喝荷菏核禾和何合盒貉閡河涸赫褐鶴賀嘿黑痕很狠恨哼亨橫衡恒轟哄烘虹鴻洪宏弘紅喉侯猴吼厚候後呼乎忽瑚壺葫胡蝴狐糊湖弧虎唬護互滬戶花嘩華猾滑畫劃化話槐徊懷淮壞歡環桓還緩換患喚瘓豢煥渙宦幻荒慌黃磺蝗簧皇凰惶煌晃幌恍謊灰揮輝徽恢蛔回毀悔慧卉惠晦賄穢會燴匯諱誨繪葷昏婚魂渾混豁活夥火獲或惑霍貨禍擊圾基機畸稽積箕肌饑跡激譏雞姬績緝吉極棘輯籍集及急疾汲即嫉級擠幾脊己薊技冀季伎祭劑悸濟寄寂計記既忌際繼紀嘉枷夾佳家加莢頰賈甲鉀假稼價架駕嫁殲監堅尖箋間煎兼肩艱奸緘繭檢柬堿鹼揀撿簡儉剪減薦檻鑒踐賤見鍵箭件健艦劍餞漸濺澗建僵姜將漿江疆蔣槳獎講匠醬降蕉椒礁焦膠交郊澆驕嬌嚼攪鉸矯僥腳狡角餃繳絞剿教酵轎較叫窖揭接皆稭街階截劫節莖睛晶鯨京驚精粳經井警景頸靜境敬鏡徑痙靖竟競凈炯窘揪究糾玖韭久灸九酒廄救舊臼舅咎就疚鞠拘狙疽居駒菊局咀矩舉沮聚拒據巨具距踞鋸俱句懼炬劇捐鵑娟倦眷卷絹撅攫抉掘倔爵桔傑捷睫竭潔結解姐戒藉芥界借介疥誡屆巾筋斤金今津襟緊錦僅謹進靳晉禁近燼浸盡勁荊兢覺決訣絕均菌鈞軍君峻俊竣浚郡駿喀咖卡咯開揩楷凱慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕顆科殼咳可渴克刻客課肯啃墾懇坑吭空恐孔控摳口扣寇枯哭窟苦酷庫褲誇垮挎跨胯塊筷儈快寬款匡筐狂框礦眶曠況虧盔巋窺葵奎魁傀饋愧潰坤昆捆困括擴廓闊垃拉喇蠟臘辣啦萊來賴藍婪欄攔籃闌蘭瀾讕攬覽懶纜爛濫瑯榔狼廊郎朗浪撈勞牢老佬姥酪烙澇勒樂雷鐳蕾磊累儡壘擂肋類淚棱楞冷厘梨犁黎籬貍離漓理李裏鯉禮莉荔吏栗麗厲勵礫歷利傈例俐痢立粒瀝隸力璃哩倆聯蓮連鐮廉憐漣簾斂臉鏈戀煉練糧涼梁粱良兩輛量晾亮諒撩聊僚療燎寥遼潦了撂鐐廖料列裂烈劣獵琳林磷霖臨鄰鱗淋凜賃吝拎玲菱零齡鈴伶羚淩靈陵嶺領另令溜琉榴硫餾留劉瘤流柳六龍聾嚨籠窿隆壟攏隴樓婁摟簍漏陋蘆盧顱廬爐擄鹵虜魯麓碌露路賂鹿潞祿錄陸戮驢呂鋁侶旅履屢縷慮氯律率濾綠巒攣孿灤卵亂掠略掄輪倫侖淪綸論蘿螺羅邏鑼籮騾裸落洛駱絡媽麻瑪碼螞馬罵嘛嗎埋買麥賣邁脈瞞饅蠻滿蔓曼慢漫謾芒茫盲氓忙莽貓茅錨毛矛鉚卯茂冒帽貌貿麽玫枚梅酶黴煤沒眉媒鎂每美昧寐妹媚門悶們萌蒙檬盟錳猛夢孟瞇醚靡糜迷謎彌米秘覓泌蜜密冪棉眠綿冕免勉娩緬面苗描瞄藐秒渺廟妙蔑滅民抿皿敏憫閩明螟鳴銘名命謬摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌謀牟某拇牡畝姆母墓暮幕募慕木目睦牧穆拿哪吶鈉那娜納氖乃奶耐奈南男難囊撓腦惱鬧淖呢餒內嫩能妮霓倪泥尼擬妳匿膩逆溺蔫拈年碾攆撚念娘釀鳥尿捏聶孽嚙鑷鎳涅您檸獰凝寧擰濘牛扭鈕紐膿濃農弄奴努怒女暖虐瘧挪懦糯諾哦歐鷗毆藕嘔偶漚啪趴爬帕怕琶拍排牌徘湃派攀潘盤磐盼畔判叛乓龐旁耪胖拋咆刨炮袍跑泡呸胚培裴賠陪配佩沛噴盆砰抨烹澎彭蓬棚硼篷膨朋鵬捧碰坯砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬篇偏片騙飄漂瓢票撇瞥拼頻貧品聘乒坪蘋萍平憑瓶評屏坡潑頗婆破魄迫粕剖撲鋪仆莆葡菩蒲埔樸圃普浦譜曝瀑期欺棲戚妻七淒漆柒沏其棋奇歧畦崎臍齊旗祈祁騎起豈乞企啟契砌器氣迄棄汽泣訖掐洽牽扡釬鉛千遷簽仟謙乾黔錢鉗前潛遣淺譴塹嵌欠歉槍嗆腔羌墻薔強搶橇鍬敲悄橋瞧喬僑巧鞘撬翹峭俏竅切茄且怯竊欽侵親秦琴勤芹擒禽寢沁青輕氫傾卿清擎晴氰情頃請慶瓊窮秋丘邱球求囚酋泅趨區蛆曲軀屈驅渠取娶齲趣去圈顴權醛泉全痊拳犬券勸缺炔瘸卻鵲榷確雀裙群然燃冉染瓤壤攘嚷讓饒擾繞惹熱壬仁人忍韌任認刃妊紉扔仍日戎茸蓉榮融熔溶容絨冗揉柔肉茹蠕儒孺如辱乳汝入褥軟阮蕊瑞銳閏潤若弱撒灑薩腮鰓塞賽三三傘散桑嗓喪搔騷掃嫂瑟色澀森僧莎砂殺剎沙紗傻啥煞篩曬珊苫杉山刪煽衫閃陜擅贍膳善汕扇繕墑傷商賞晌上尚裳梢捎稍燒芍勺韶少哨邵紹奢賒蛇舌舍赦攝射懾涉社設砷申呻伸身深娠紳神沈審嬸甚腎慎滲聲生甥牲升繩省盛剩勝聖師失獅施濕詩屍虱十石拾時什食蝕實識史矢使屎駛始式示士世柿事拭誓逝勢是嗜噬適仕侍釋飾氏市恃室視試收手首守壽授售受瘦獸蔬樞梳殊抒輸叔舒淑疏書贖孰熟薯暑曙署蜀黍鼠屬術述樹束戍豎墅庶數漱恕刷耍摔衰甩帥栓拴霜雙爽誰水睡稅吮瞬順舜說碩朔爍斯撕嘶思私司絲死肆寺嗣四伺似飼巳松聳慫頌送宋訟誦搜艘擻嗽蘇酥俗素速粟僳塑溯宿訴肅酸蒜算雖隋隨綏髓碎歲穗遂隧祟孫損筍蓑梭唆縮瑣索鎖所塌他它她塔獺撻蹋踏胎苔擡臺泰酞太態汰坍攤貪癱灘壇檀痰潭譚談坦毯袒碳探嘆炭湯塘搪堂棠膛唐糖倘躺淌趟燙掏濤滔絳萄桃逃淘陶討套特藤騰疼謄梯剔踢銻提題蹄啼體替嚏惕涕剃屜天添填田甜恬舔腆挑條迢眺跳貼鐵帖廳聽烴汀廷停亭庭挺艇通桐酮瞳同銅彤童桶捅筒統痛偷投頭透凸禿突圖徒途塗屠土吐兔湍團推頹腿蛻褪退吞屯臀拖托脫鴕陀馱駝橢妥拓唾挖哇蛙窪娃瓦襪歪外豌彎灣玩頑丸烷完碗挽晚皖惋宛婉萬腕汪王亡枉網往旺望忘妄威巍微危韋違桅圍唯惟為濰維葦萎委偉偽尾緯未蔚味畏胃餵魏位渭謂尉慰衛瘟溫蚊文聞紋吻穩紊問嗡翁甕撾蝸渦窩我斡臥握沃巫嗚鎢烏汙誣屋無蕪梧吾吳毋武五捂午舞伍侮塢戊霧晤物勿務悟誤昔熙析西硒矽晰嘻吸錫犧稀息希悉膝夕惜熄烯溪汐犀檄襲席習媳喜銑洗系隙戲細瞎蝦匣霞轄暇峽俠狹下廈夏嚇掀鍁先仙鮮纖鹹賢銜舷閑涎弦嫌顯險現獻縣腺餡羨憲陷限線相廂鑲香箱襄湘鄉翔祥詳想響享項巷橡像向象蕭硝霄削哮囂銷消宵淆曉小孝校肖嘯笑效楔些歇蠍鞋協挾攜邪斜脅諧寫械卸蟹懈泄瀉謝屑薪芯鋅欣辛新忻心信釁星腥猩惺興刑型形邢行醒幸杏性姓兄兇胸匈洶雄熊休修羞朽嗅銹秀袖繡墟戌需虛噓須徐許蓄酗敘旭序畜恤絮婿緒續軒喧宣懸旋玄選癬眩絢靴薛學穴雪血勛熏循旬詢尋馴巡殉汛訓訊遜迅壓押鴉鴨呀丫芽牙蚜崖衙涯雅啞亞訝焉咽閹煙淹鹽嚴研蜒巖延言顏閻炎沿奄掩眼衍演艷堰燕厭硯雁唁彥焰宴諺驗殃央鴦秧楊揚佯瘍羊洋陽氧仰癢養樣漾邀腰妖瑤搖堯遙窯謠姚咬舀藥要耀椰噎耶爺野冶也頁掖業葉曳腋夜液壹壹醫揖銥依伊衣頤夷遺移儀胰疑沂宜姨彜椅蟻倚已乙矣以藝抑易邑屹億役臆逸肄疫亦裔意毅憶義益溢詣議誼譯異翼翌繹茵蔭因殷音陰姻吟銀淫寅飲尹引隱印英櫻嬰鷹應纓瑩螢營熒蠅迎贏盈影穎硬映喲擁傭臃癰庸雍踴蛹詠泳湧永恿勇用幽優悠憂尤由郵鈾猶油遊酉有友右佑釉誘又幼迂淤於盂榆虞愚輿余俞逾魚愉渝漁隅予娛雨與嶼禹宇語羽玉域芋郁籲遇喻峪禦愈欲獄育譽浴寓裕預豫馭鴛淵冤元垣袁原援轅園員圓猿源緣遠苑願怨院曰約越躍鑰嶽粵月悅閱耘雲鄖勻隕允運蘊醞暈韻孕匝砸雜栽哉災宰載再在咱攢暫贊贓臟葬遭糟鑿藻棗早澡蚤躁噪造皂竈燥責擇則澤賊怎增憎曾贈紮喳渣劄軋鍘閘眨柵榨咋乍炸詐摘齋宅窄債寨瞻氈詹粘沾盞斬輾嶄展蘸棧占戰站湛綻樟章彰漳張掌漲杖丈帳賬仗脹瘴障招昭找沼趙照罩兆肇召遮折哲蟄轍者鍺蔗這浙珍斟真甄砧臻貞針偵枕疹診震振鎮陣蒸掙睜征猙爭怔整拯正政幀癥鄭證芝枝支吱蜘知肢脂汁之織職直植殖執值侄址指止趾只旨紙誌摯擲至致置幟峙制智秩稚質炙痔滯治窒中盅忠鐘衷終種腫重仲眾舟周州洲謅粥軸肘帚咒皺宙晝驟珠株蛛朱豬諸誅逐竹燭煮拄矚囑主著柱助蛀貯鑄築住註祝駐抓爪拽專磚轉撰賺篆樁莊裝妝撞壯狀椎錐追贅墜綴諄準捉拙卓桌琢茁酌啄著灼濁茲咨資姿滋淄孜紫仔籽滓子自漬字鬃棕蹤宗綜總縱鄒走奏揍租足卒族祖詛阻組鉆纂嘴醉最罪尊遵昨左佐柞做作坐座錒噯嬡璦曖靄諳銨鵪媼驁鰲鈀唄鈑鴇齙鵯賁錛蓽嗶潷鉍篳蹕芐緶籩驃颮飆鏢鑣鰾儐繽檳殯臏鑌髕鬢稟餑鈸鵓鈽驂黲惻鍤儕釵囅諂讖蕆懺嬋驏覘禪鐔倀萇悵閶鯧硨傖諶櫬磣齔棖檉鋮鐺飭鴟銃儔幬讎芻絀躕釧愴綞鶉輟齪鶿蓯驄樅輳攛銼鹺噠韃駘紿殫賧癉簞讜碭襠燾鐙糴詆諦綈覿鏑巔鈿癲銚鯛鰈鋌銩崠鶇竇瀆櫝牘篤黷籪懟鐓燉躉鐸諤堊閼軛鋨鍔鶚顎顓鱷誒邇鉺鴯鮞鈁魴緋鐨鯡僨灃鳧駙紱紼賻麩鮒鰒釓賅尷搟紺戇睪誥縞鋯紇鎘潁亙賡綆鯁詬緱覯詁轂鈷錮鴣鵠鶻鴰摑詿摜鸛鰥獷匭劌媯檜鮭鱖袞緄鯀堝咼幗槨蟈鉿闞絎頡灝顥訶闔蠣黌訌葒閎鱟滸鶘驊樺鏵奐繯鍰鯇鰉詼薈噦澮繢琿暉諢餛閽鈥鑊訐詰薺嘰嚌驥璣覬齏磯羈蠆躋霽鱭鯽郟浹鋏鎵蟯諫縑戔戩瞼鶼筧鰹韉絳韁撟嶠鷦鮫癤頜鮚巹藎饉縉贐覲剄涇逕弳脛靚鬮鳩鷲詎屨櫸颶鉅鋦窶齟錈鐫雋譎玨皸剴塏愾愷鎧鍇龕閌鈧銬騍緙軻鈳錁頷齦鏗嚳鄶噲膾獪髖誆誑鄺壙纊貺匱蕢憒聵簣閫錕鯤蠐崍徠淶瀨賚睞錸癩籟嵐欖斕鑭襤閬鋃嘮嶗銠鐒癆鰳誄縲儷酈壢藶蒞蘺嚦邐驪縭櫪櫟轢礪鋰鸝癘糲躒靂鱺鱧蘞奩瀲璉殮褳襝鰱魎繚釕鷯藺廩檁轔躪綾欞蟶鯪瀏騮綹鎦鷚蘢瀧瓏櫳朧礱僂蔞嘍嶁鏤瘺耬螻髏壚擼嚕閭瀘淥櫨櫓轤輅轆氌臚鸕鷺艫鱸臠孌欒鸞鑾圇犖玀濼欏腡鏍櫚褸鋝嘸嘜嬤榪勱縵鏝顙鰻麼捫燜懣鍆羋謐獼禰澠靦黽緲繆閔緡謨驀饃歿鏌鉬鐃訥鈮鯢輦鯰蔦裊隉蘗囁顢躡苧嚀聹儂噥駑釹儺謳慪甌蹣皰轡紕羆鈹諞駢縹嬪釙鏷鐠蘄騏綺榿磧頎頏鰭僉蕁慳騫繾槧鈐嬙檣戧熗錆鏘鏹羥蹌誚譙蕎繰磽蹺愜鍥篋鋟撳鯖煢蛺巰賕蟣鰍詘嶇闃覷鴝詮綣輇銓闋闕愨蕘嬈橈飪軔嶸蠑縟銣顰蜆颯毿糝繅嗇銫穡鎩鯊釃訕姍騸釤鱔坰殤觴厙灄畬詵諗瀋謚塒蒔弒軾貰鈰鰣綬攄紓閂鑠廝駟緦鍶鷥藪餿颼鎪謖穌誶蓀猻嗩脧闥鉈鰨鈦鮐曇鉭錟頇儻餳鐋鏜韜鋱緹鵜闐糶齠鰷慟鈄釷摶飩籜鼉媧膃紈綰輞諉幃闈溈潿瑋韙煒鮪閿萵齷鄔廡憮嫵騖鵡鶩餼鬩璽覡硤莧薟蘚峴獫嫻鷴癇蠔秈躚薌餉驤緗饗嘵瀟驍綃梟簫褻擷紲纈陘滎饈鵂詡頊諼鉉鏇謔澩鱈塤潯鱘埡婭椏氬厴贗儼兗讞懨閆釅魘饜鼴煬軺鷂鰩靨謁鄴曄燁詒囈嶧飴懌驛縊軼貽釔鎰鐿瘞艤銦癮塋鶯縈鎣攖嚶瀅瀠瓔鸚癭頦罌鏞蕕銪魷傴俁諛諭蕷崳飫閾嫗紆覦歟鈺鵒鷸齬櫞鳶黿鉞鄆蕓惲慍紜韞殞氳瓚趲鏨駔賾嘖幘簀譖繒譫詔釗謫輒鷓湞縝楨軫賑禎鴆諍崢鉦錚箏騭櫛梔軹輊贄鷙螄縶躓躑觶鍾紂縐佇櫧銖囀饌顳騅縋諑鐲諮緇輜貲眥錙齜鯔傯諏騶鯫鏃纘躦鱒訁譾郤猛氹阪壟堖垵墊檾蕒葤蓧蒓菇槁摣咤唚哢噝噅撅劈謔襆嶴脊仿僥獁麅餘餷饊饢楞怵懍爿漵灩混濫瀦淡寧糸絝緔瑉梘棬案橰櫫軲軤賫膁腖飈糊煆溜湣渺碸滾瞘鈈鉕鋣銱鋥鋶鐦鐧鍩鍀鍃錇鎄鎇鎿鐝鑥鑹鑔穭鶓鶥鸌癧屙瘂臒襇繈耮顬蟎麯鮁鮃鮎鯗鯝鯴鱝鯿鰠鰵鱅鞽韝齇";function LMe(e){return T2t.charAt(NMe.indexOf(e.charAt(0)))}var cbr=new RegExp("[一-龥]+");function FMe(e){return NMe.includes(e)}var pi=class{static GetBytes(e){switch(typeof e){case"string":{let t=new Uint16Array(e.length);for(let i=0;i4294967295?((t=new Float64Array(1))[0]=e,new Uint8Array(t.buffer)):function(t){return t[0]=e,new Uint8Array(t.buffer)}(new Int32Array(1)):function(t){return t[0]=e,new Uint8Array(t.buffer)}(new Float64Array(1));case"boolean":return function(t){return t[0]=Number(e),t}(new Uint8Array(1));default:if(e instanceof Array){let t=[];for(let i=0;ie.length&&(i-=t);let r="";for(let n=0;ne.length&&(i-=t);let r=new Uint8Array(i);for(let n=0;n1&&(n.push(s.slice()),s=[]);break;case 3:l++,i/=t[l];break;case 4:l++,i*=t[l];break;case 5:if(4===a.length)throw"The position stack is only four locations deep";a.push(r);break;case 6:r=a.pop(),s.length>1&&(n.push(s.slice()),s=[]),o&&s.push(r.clone());break;case 7:{let a,o=0,h=i*e.baseUp,u=r.clone();switch(s.length>1&&(n.push(s.slice()),s=[]),e.type){case 0:l++,o=t[l];break;case 1:l++,o=t[l],0==o&&(l++,o=pi.ToUInt16(new Uint8Array([t[l++],t[l++]]),0),u.x=t[l++]*i,u.y=t[l++]*i,h=t[l]*i);break;case 2:l+=2,o=pi.ToUInt16(new Uint8Array([t[l-1],t[l]]),0)}0!==o&&(a=e.getGraphicTextShape(o,h,u),a&&(n.push(...a.polyLines.slice()),r=a.lastPoint.clone()))}break;case 8:{let e=new le;e.x=pi.byteTosbyte(t[++l]),e.y=pi.byteTosbyte(t[++l]),r.add(e.multiplyScalar(i)),o&&s.push(r.clone())}break;case 9:for(;;){let e=new le;if(e.x=pi.byteTosbyte(t[++l]),e.y=pi.byteTosbyte(t[++l]),0==e.x&&0==e.y)break;r.add(e.multiplyScalar(i)),o&&s.push(r.clone())}break;case 10:{let e=t[++l]*i,n=pi.byteTosbyte(t[++l]),a=(112&n)>>4,h=7&n;0==h&&(h=8);let u=Math.PI/4,c=u*h,p=qf.CICLESPAN;n<0&&(p=-p,c=-c);let d=u*a,f=d+c,m=r.clone().sub(new le(Math.cos(d)*e,Math.sin(d)*e));if(r=m.clone().add(new le(Math.cos(f)*e,Math.sin(f)*e)),o){let t=d,i=!0;for(;i&&(t+=p,n>=0&&tf);)s.push(m.clone().add(new le(e*Math.cos(t),e*Math.sin(t))));s.push(r.clone())}}break;case 11:{let e=t[++l],n=t[++l],a=(255*t[++l]+t[++l])*i,h=pi.byteTosbyte(t[++l]),u=(112&h)>>4,c=7&h;0==c&&(c=8),0!=n&&c--;let p=Math.PI/4,d=p*c,f=qf.CICLESPAN,m=1;h<0&&(f=-f,d=-d,m=-1);let g=p*u,y=g+d;g+=p*e/256*m,y+=p*n/256*m;let v=r.clone().sub(new le(a*Math.cos(g),a*Math.sin(g)));if(r=v.clone().add(new le(a*Math.cos(y),a*Math.sin(y))),o){let e=g,t=!0;for(;t&&(e+=f,h>0&&ey);)s.push(v.clone().add(new le(a*Math.cos(e),a*Math.sin(e))));s.push(r.clone())}}break;case 12:{let e=new le;e.x=pi.byteTosbyte(t[++l])*i,e.y=pi.byteTosbyte(t[++l])*i;let n=pi.byteTosbyte(t[++l]);n<-127&&(n=-127),o&&(0==n?s.push(r.clone().add(e)):s.push(qf._generateArcPoints(r,e,n/127))),r.add(e)}break;case 13:for(;;){let e=new le;if(e.x=pi.byteTosbyte(t[++l])*i,e.y=pi.byteTosbyte(t[++l])*i,0==e.x&&0==e.y)break;let n=pi.byteTosbyte(t[++l]);n<-127&&(n=-127),o&&(0==n?s.push(r.clone().add(e)):s.push(qf._generateArcPoints(r.clone(),e,n/127))),r.add(e)}break;case 14:l=qf.skipCode(e,t,++l);break;default:if(h>15){let e=(240&h)>>4,t=15&h,n=new le;switch(t){case 0:n.x=1;break;case 1:n.x=1,n.y=.5;break;case 2:n.x=1,n.y=1;break;case 3:n.x=.5,n.y=1;break;case 4:n.y=1;break;case 5:n.x=-.5,n.y=1;break;case 6:n.x=-1,n.y=1;break;case 7:n.x=-1,n.y=.5;break;case 8:n.x=-1;break;case 9:n.x=-1,n.y=-.5;break;case 10:n.x=-1,n.y=-1;break;case 11:n.x=-.5,n.y=-1;break;case 12:n.y=-1;break;case 13:n.x=.5,n.y=-1;break;case 14:n.x=1,n.y=-1;break;case 15:n.x=1,n.y=-.5}r.add(n.multiplyScalar(e*i)),o&&s.push(r.clone())}}}return new ad(r,n)}static skipCode(e,t,i){switch(t[i]){case 0:case 1:case 2:case 5:case 6:case 14:default:break;case 3:case 4:i++;break;case 7:switch(e.type){case 0:i++;break;case 1:0==t[++i]&&(i+=6);break;case 2:i+=2}break;case 8:case 10:i+=2;break;case 9:for(;;){let e=t[++i],r=t[++i];if(0==e&&0==r)break}break;case 11:i+=5;break;case 12:i+=3;break;case 13:for(;;){let e=t[++i],r=t[++i];if(0==e&&0==r)break;t[++i]}}return i}static _generateArcPoints(e,t,i){let r=e.clone().add(t),n=i<0;i=Math.abs(i);let s=t.length()/2,a=s*i,o=2*Math.atan(1/i),l=new le(t.y,-t.x);l.normalize(),l.multiplyScalar(a);let h=Math.abs(s/Math.sin(o/2)),u=e.add(t.divideScalar(2));!1!==n?u.add(l):u.sub(l);let c=e.sub(u),p=r.sub(u),d=Math.atan2(c.y,c.x),f=Math.atan2(p.y,p.x),m=qf.CICLESPAN;n?(m=-m,df&&(d-=2*Math.PI);let g=d;for(;;){if(g+=m,!n&&gf)return u.add(new le(h*Math.cos(g),h*Math.sin(g)));break}return r}},Yl=qf;Yl.stopFlag="0x00",Yl.FILE_STOP_FLAG=["\r","\n",""],Yl.CICLESPAN=Math.PI/18;var pO={130:[[[5,0],[5,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]]],131:[[[3,0],[7,0]],[[5,0],[5,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]]],132:[[[3,0],[7,0]],[[4,0],[4,9.5]],[[6,0],[6,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]]],133:[[[3,0],[7,0]],[[4,0],[4,9.5]],[[6,0],[6,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]],[[3,9.5],[7,9.5]]],134:[[[3,0],[7,0]],[[5,0],[5,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]],[[12,10],[9,10],[9,6]],[[9,8],[11,8]]],135:[[[3,0],[7,0]],[[4,0],[4,9.5]],[[6,0],[6,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]],[[12,10],[9,10],[9,6]],[[9,8],[11,8]]],136:[[[3,0],[7,0]],[[4,0],[4,9.5]],[[6,0],[6,9.5]],[[4,7.1],[2.6,6.6],[2.1,6.2],[1.7,5.4],[1.6,4],[2.1,3],[2.6,2.6],[3.9,2.2],[6.1,2.2],[7.5,2.6],[8,3.1],[8.4,3.9],[8.4,5.2],[7.9,6.1],[7.5,6.6],[6.1,7.1],[4,7.1]],[[3,9.5],[7,9.5]],[[12,10],[9,10],[9,6]],[[9,8],[11,8]]],178:[[[1.142,9.285],[1.142,9.428],[1.285,9.714],[1.428,9.857],[1.714,10],[2.285,10],[2.571,9.857],[2.714,9.714],[2.857,9.428],[2.857,9.142],[2.714,8.857],[2.428,8.428],[1,7],[3,7]]],8960:[[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]],[[0,0],[8,8]]],20393:[[[0,0],[0,6.666]],[[0,4.761],[1.428,6.19],[2.38,6.666],[3.809,6.666],[4.761,6.19],[5.238,4.761],[5.238,0]],[[5.238,4.761],[6.666,6.19],[7.619,6.666],[9.047,6.666],[10,6.19],[10.476,4.761],[10.476,0]],[[11.142,9.285],[11.142,9.428],[11.285,9.714],[11.428,9.857],[11.714,10],[12.285,10],[12.571,9.857],[12.714,9.714],[12.857,9.428],[12.857,9.142],[12.714,8.857],[12.428,8.428],[11,7],[13,7]]],41123:[],55714:[[[2,5.9],[2.6,6.1],[3.4,7],[3.4,1]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],55970:[[[2.3,5.6],[2.3,5.9],[2.6,6.4],[2.9,6.7],[3.4,7],[4.6,7],[5.1,6.7],[5.4,6.4],[5.7,5.9],[5.7,5.3],[5.4,4.7],[4.9,3.9],[2,1],[6,1]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],56226:[[[2.6,7],[5.7,7],[4,4.7],[4.9,4.7],[5.4,4.4],[5.7,4.1],[6,3.3],[6,2.7],[5.7,1.9],[5.1,1.3],[4.3,1],[3.4,1],[2.6,1.3],[2.3,1.6],[2,2.1]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],56482:[[[4.9,7],[2,3],[6.3,3]],[[4.9,7],[4.9,1]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],56738:[[[5.4,7],[2.6,7],[2.3,4.4],[2.6,4.7],[3.4,5],[4.3,5],[5.1,4.7],[5.7,4.1],[6,3.3],[6,2.7],[5.7,1.9],[5.1,1.3],[4.3,1],[3.4,1],[2.6,1.3],[2.3,1.6],[2,2.1]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],56994:[[[5.4,6.1],[5.1,6.7],[4.3,7],[3.7,7],[2.9,6.7],[2.3,5.9],[2,4.4],[2,3],[2.3,1.9],[2.9,1.3],[3.7,1],[4,1],[4.9,1.3],[5.4,1.9],[5.7,2.7],[5.7,3],[5.4,3.9],[4.9,4.4],[4,4.7],[3.7,4.7],[2.9,4.4],[2.3,3.9],[2,3]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],57250:[[[2,7],[6,7],[3.1,1]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],57506:[[[3.4,7],[2.6,6.7],[2.3,6.1],[2.3,5.6],[2.6,5],[3.1,4.7],[4.3,4.4],[5.1,4.1],[5.7,3.6],[6,3],[6,2.1],[5.7,1.6],[5.4,1.3],[4.6,1],[3.4,1],[2.6,1.3],[2.3,1.6],[2,2.1],[2,3],[2.3,3.6],[2.9,4.1],[3.7,4.4],[4.9,4.7],[5.4,5],[5.7,5.6],[5.7,6.1],[5.4,6.7],[4.6,7],[3.4,7]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],57762:[[[5.7,5],[5.4,4.1],[4.9,3.6],[4,3.3],[3.7,3.3],[2.9,3.6],[2.3,4.1],[2,5],[2,5.3],[2.3,6.1],[2.9,6.7],[3.7,7],[4,7],[4.9,6.7],[5.4,6.1],[5.7,5],[5.7,3.6],[5.4,2.1],[4.9,1.3],[4,1],[3.4,1],[2.6,1.3],[2.3,1.9]],[[2.9,8],[1.7,7.4],[.6,6.3],[0,4.6],[0,3.4],[.6,1.7],[1.7,.6],[2.9,0],[4.6,0],[5.7,.6],[6.9,1.7],[7.4,3.4],[7.4,4.6],[6.9,6.3],[5.7,7.4],[4.6,8],[2.9,8]]],60070:[[[0,6],[10,6],[10,4]]],60326:[[[0,7],[0,5],[10,5]]]},dO=new Pi,Yf=class{constructor(e){this.type=1,this.info="",this.orientation=0,this.baseUp=0,this.baseDown=0,this.fileHeader="",this.fileVersion="",this.datas={},this.graphicData=new Map,this.url=e}getGraphicDataByCode(e,t){if(0===e)return;let i=this.datas;if(!this.graphicData.has(e)){if(!i[e]){if(pO[e]){let i=[];for(let t=0;tnew le(e[0],e[1]))));let r=new ad(new le,i),n=t/uO;return dO.identity().scale(n,n),r.transform(dO)}return}{let t=i[e],r=uO/this.baseUp,n=Yl.parserCode(this,t,r);this.graphicData.set(e,n)}}if(this.graphicData.has(e)){let i=t/uO;return dO.identity().scale(i,i),this.graphicData.get(e).transform(dO)}}getGraphicTextShape(e,t,i){var r;return null==(r=this.getGraphicDataByCode(e,t))?void 0:r.offset(i)}getFontFile(){return{url:this.url,type:this.type,datas:this.datas,info:this.info,orientation:this.orientation,baseUp:this.baseUp,baseDown:this.baseDown,fileHeader:this.fileHeader,fileVersion:this.fileVersion}}setFontFile(e){this.url=e.url,this.type=e.type,this.datas=e.datas,this.info=e.info,this.orientation=e.orientation,this.baseUp=e.baseUp,this.baseDown=e.baseDown,this.fileHeader=e.fileHeader,this.fileVersion=e.fileVersion}releaseFontData(){this.datas={},this.graphicData.clear()}setFontDataToIndexedDb(){return ht(this,null,(function*(){let e=this.getFontFile();return new Promise(((t,i)=>{uh.instance().save(e,(()=>{console.log(`[FontFile] Saved '${this.url}' (${this.fileHeader}) to indexedDb`),t()}),(e=>i(`[FontFile] Failed to save '${this.url}' (${this.fileHeader}) to indexedDb! ${e}`)))}))}))}getFontDataByIndexedDb(){return ht(this,null,(function*(){return new Promise(((e,t)=>{uh.instance().query(this.url,(t=>{e(t)}),(()=>t("[FontFile] Failed to get FontData from IndexedDB")))}))}))}},I_=class extends Yf{constructor(e){super(e),this.isExtend=!1,this.type=1}init(e){pi.ToInt16(e.readBytes(2),0);let t=pi.ToInt16(e.readBytes(2),0),i=pi.ToInt16(e.readBytes(2),0);for(let t=0;t>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:t+=String.fromCharCode(r);break;case 12:case 13:n=e[i++],t+=String.fromCharCode((31&r)<<6|63&n);break;case 14:n=e[i++],s=e[i++],t+=String.fromCharCode((15&r)<<12|(63&n)<<6|(63&s)<<0)}return t}var __=class extends Yf{constructor(e){super(e),this.type=0}init(e){e.readBytes(2),e.readBytes(2);let t=pi.ToInt16(e.readBytes(2),0),i=[];for(let r=0;rs){c?(u+=p.width+n,c=!1):(c=!0,u=0,h-=r+i),fO.set(u,h);let e=p.offset(fO);o.push(e),!c&&(u+=p.width+n)}else{fO.set(u,h);let e=p.offset(fO);o.push(e),u+=p.width+n}else this.addUnsupportedChar(l)}c=!1,u=0,h-=r+i}return o}getNotFoundTextShape(e){let t=Yl.getCode("?");return this.getGraphicDataByCode(t,e)}generateShapes(e,t=mO.DEFAULT_SIZE,i=0,r=0,n=0){return this.getGraphicData(e,t,i,r,n)}addUnsupportedChar(e){this.unsupportedChars[e]||(this.unsupportedChars[e]=0),this.unsupportedChars[e]++}static checkFontIsLoaded(e){return ht(this,null,(function*(){if(!wi.isBrowser)return!1;let t=!1,i=yield uh.instance().queryAll();if(i.length!==e.length)return!1;for(let r=0;re.setFontDataToIndexedDb()));return yield Promise.all(e).then((()=>{ne.debug("[ShxFont] Saves font data to IndexDB")}))}))}getFontData(){return ht(this,null,(function*(){if(wi.isBrowser){let e=yield uh.instance().queryAll(),t=[],i=new Map;for(let r=0;r{let i=this.parse(e);t&&t(i)})).catch((e=>{r&&r(e)}))}loadFile(e,t){return ht(this,null,(function*(){return new Promise(((i,r)=>{let n=new ui(this.manager);n.setResponseType("arraybuffer"),n.load(e,(t=>{i({url:e,arrayBuffer:t})}),t,(e=>{r(e)}))}))}))}loadAsync(e,t){return ht(this,null,(function*(){return Array.isArray(e)||(e=[e]),(yield Yc.checkFontIsLoaded(e))?Promise.resolve(new Yc):new Promise(((i,r)=>{this.load(e,i,t,r)}))}))}parse(e){return new Yc(e)}static isShxFile(e){var t;return"shx"===(null==(t=e.split(".").pop())?void 0:t.toLowerCase())}},Xf=new A(1,0,0),Y8=new A(0,1,0),gO=new A(0,0,1),HMe=new A(0,0,0),$f=0,b2t="CONTINUOUS",X8=new jn({color:$f}),Na=new vr({color:$f}),w_=new or({color:$f}),UMe=new Be,$8=new Be,Xc=new Be,ds=new A,R_=new A,M_=new le,BMe=new Hr,x2t=e=>void 0!==e.viewDirectionFromTarget,I2t=e=>{if(e){let t=e.match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(t&&t.length>0){let i=t[1],r=e.replace("data:"+i+";","").split(",");if(r&&2===r.length&&"base64"===r[0]){let e=r[1];return KRe.decode(e)}}}return null},eE={Math:{}};eE.Math.angle2=function(e,t){let i=new le(e.x,e.y),r=new le(t.x,t.y);return r.sub(i),r.normalize(),r.y<0?-Math.acos(r.x):Math.acos(r.x)},eE.Math.polar=function(e,t,i){return{x:e.x+t*Math.cos(i),y:e.y+t*Math.sin(i)}};var _2t=(e,t,i,r)=>{let n=e?new le(e.x,e.y):new le(0,0),s=t?new le(t.x,t.y):new le(1,0);i=i||1;let a=4*Math.atan(i),o=n.distanceTo(s)/2/Math.sin(a/2),l=eE.Math.polar(e,o,eE.Math.angle2(n,s)+(Math.PI/2-a/2));r=r||Math.max(Math.abs(Math.ceil(a/(Math.PI/18))),6);let h=eE.Math.angle2(l,n),u=a/r,c=[];c.push(new A(n.x,n.y,0));for(let e=1;e<=r-1;e++){let t=eE.Math.polar(l,Math.abs(o),h+u*e);c.push(new A(t.x,t.y,0))}return c},S2t=(e,t,i,r=2*e.length,n)=>{let s=[],a=e.map((e=>[e.x,e.y]));for(let e=0;e<1;e+=1/r){let r=U8(e,t,a,i,n);s.push(new A(r[0],r[1],0))}return s},K8=(e,t=!1)=>{let i=[],r=e.length;for(let n=0;n{let t=[];return e.faceA&&t.push(e.faceA),e.faceB&&t.push(e.faceB),e.faceC&&t.push(e.faceC),e.faceD&&t.push(e.faceD),t},R2t=e=>{let t=[],i=[];e.forEach((e=>{e.polyfaceMeshVertex&&(e.threeDPolylineMesh?t.push(new A(e.x,e.y,e.z)):i.push(w2t(e)))}));let r=[];for(let e=0;e=t.length||i<0){a=!1;break}s.push(t[i])}!a||0===s.length||(s.push(s[0]),r.push(s))}return r},Ri=class extends ci{constructor(e=!1,t=!0){super(),this.timer=Date.now(),this.ignorePaperSpace=!1,this.angBase=0,this.angDir=0,this.header=void 0,this.pointsMaterials={},this.lineBasicMaterials={},this.lineShaderMaterials={},this.meshBasicMaterials={},this.meshTextureMaterials={},this.hatchShaderMaterials=[],this.entityCount=0,this.curveCount=0,this.averageCurveSize=0,this.enableRenderOrder=!1,this.enableLocalCache=!0,this.enableReleaseData=!0,this.enableMerge=!0,this.enableSimplify=!0,this.enableRTC=!0,this.enableWidthLine=!1,this.dxfDataId=void 0,this.compareContext=void 0,this.statsInfo={unsupportedEntity:{},unsupportedEntityTypes:{},unsupportedTextStyles:{},unsupportedHatchPatterns:{},invisibleEntities:{},ignoredFrozenLayersAndEntityCount:{},ignoredInserts:{},entityTypesAndMeshCount:{},ignoredPaperSpaceEntityTypesAndCount:{},rebasedEntityCount:0},this.blockReferencesCache={},this.blockRecordsCache=void 0,this.entitiesCache=void 0,this.blocksCache=void 0,this.dictionaryOwnerHandleAndSpatialFilterHandlesCache=void 0,this.spatialFiltersCache=void 0,this.entityThreejsCache=void 0,this.entityTypesAndTimes=void 0,this.nonSnapableTypes=new Set(["ATTDEF","ATTRIB","LEADER","MTEXT","MULTILEADER","OLE2FRAME","TEXT"]),this.entityHandlesWithRenderOrder={},this.addViewport=(e,t)=>{if("VIEWPORT"===e.type){t[e.ownerHandle]||(t[e.ownerHandle]=[]);let i=e;t[e.ownerHandle].push(i)}},Ri.abortJobs=!1,this.ignorePaperSpace=e,this.enableLocalCache=t,this.pointsMaterials[$f]=X8,this.lineBasicMaterials[$f]=Na,this.meshBasicMaterials[$f]=w_}setFont(e){return this.font=e,this}download(e,t){return ht(this,null,(function*(){let i=I2t(e);if(!i){let r=Date.now(),n=new ui(this.manager);n.setResponseType("arraybuffer"),n.setPath(this.path),i=yield n.loadAsync(e,t),ne.info(`[DxfLoader] ${e} dxf file downloaded in ${(Date.now()-r)/1e3}s`)}return i}))}load(e,t,i){return ht(this,null,(function*(){return this.enableLocalCache&&t&&(t=t.trim()).length>0&&(this.dxfDataId=t),this.loadAsync(e,i)}))}loadAsync(e,t){return ht(this,null,(function*(){let i=(e,i,r)=>{let n=100*e.loaded/e.total;n=n*(r-i)/100+i,t&&t(new ProgressEvent(e.type,{loaded:n,total:100}))},r=e=>i(e,10,100);if(wi.isBrowser&&this.enableLocalCache&&this.dxfDataId){let e;try{if(this.timer=Date.now(),e=yield this.getDxfDataFromIndexedDb(this.dxfDataId),e){ne.info(`[DxfLoader] Loaded DxfData from indexedDb in ${(Date.now()-this.timer)/1e3}s`);let t=yield this.loadEntities(e,r);return Promise.resolve(t)}}catch(e){ne.warn("[DxfLoader] Failed to parse data from indexedDb",e)}}let n=yield this.parse(e,(e=>i(e,0,50)));return yield this.loadEntities(n,(e=>i(e,50,100)))}))}parse(e,t){return ht(this,null,(function*(){let i=e=>{t&&t(new ProgressEvent("",{loaded:e,total:100}))},r=yield this.download(e,(e=>((e,i,r)=>{let n=100*e.loaded/e.total;n=n*(r-i)/100+i,n>r&&(ne.warn("[DxfLoader] Invalid ProgressEvent:",e),n=r),t&&t(new ProgressEvent(e.type,{loaded:n,total:100}))})(e,0,40)));if(!r)return Promise.reject(`[DxfLoader] Failed to download ${e}`);if(Ri.abortJobs)return Promise.reject("[DXFLoader] Job aborted");this.timer=Date.now(),ne.info("[DxfLoader] Start parsing...");let n=(new I0).parseSync(r);if(i(80),ne.info(`[DxfLoader] Parsed in ${(Date.now()-this.timer)/1e3}s, creating entities...`),Ri.abortJobs)return Promise.reject("[DXFLoader] Job aborted");if(n&&(n.objects.LAYOUT||(ne.warn("[DxfLoader] No layout defined! Will add a default 'Model' layout!"),n.objects.LAYOUT=[{layoutName:Ri.MODEL_LAYOUT_NAME}]),wi.isBrowser&&this.enableLocalCache&&this.dxfDataId)){let e=Date.now();try{yield this.setDxfDataToIndexedDb(this.dxfDataId,n),ne.info(`[DxfLoader] Saved to indexedDb in ${(Date.now()-e)/1e3}s`)}catch(e){ne.warn(`[DxfLoader] Failed to save '${this.dxfDataId}' to indexedDb!`,e)}}return i(100),n}))}parseHeader(e){if(!e)return void ne.error("[DxfLoader]: Invalid header!");this.header=e;let t=e.$ACADVER.toString();"AC1032"!==t&&ne.warn(`[DxfLoader] Unexpected version: ${t}. But we'll try to continue.`),this.angBase=e.$ANGBASE||0,this.angDir=e.$ANGDIR||0}loadEntities(e,t){return ht(this,null,(function*(){let i=Date.now();this.parseHeader(e.header),this.enableRenderOrder&&(this.initRenderOrderInfo(e),this.enableMerge=!1);let r=0,n=e.entities.length;this.entityCount=n,Object.keys(e.blocks).forEach((t=>{var i;this.entityCount+=(null==(i=e.blocks[t].entities)?void 0:i.length)||0}));let s=Math.round(Math.pow(n,.5)),a=Date.now(),o=e=>ht(this,null,(function*(){if(t&&(e%s==0||e===n-1)){t(new ProgressEvent("parseProgress",{loaded:e+1,total:n}));let i=500,r=Date.now();(r-a>i||e===n-1)&&(yield xs.sleep(0),a=r)}})),l={};e.objects.LAYOUT.forEach((e=>{let t=e;l[t.layoutName]=t}));let h={},u=e=>{let t=e.userData.layerName,i=h[t];i||(i=[],h[t]=i),i.push(e)},c={},p={},d=new ur;ei.setSharedVariablesOfObject(d);for(let t=0;te.name===s));a||(a=new ur,ei.setSharedVariablesOfObject(a),a.name=s,a.userData.isLayoutLevelObject=!0,d.add(a)),r++,p[s]||(p[s]={object:a,layerObjects:{}});let h,f=p[s];if(s!==Ri.MODEL_LAYOUT_NAME){let e=l[s];e.directAssociatedLeafObjectSet||(e.directAssociatedLeafObjectSet=new Set),h=e.directAssociatedLeafObjectSet}if(this.enableMerge&&n.geometry){ei.setSharedVariablesOfObject(n);let t=n.userData.layerName;!1===this.getLayerVisible(e,t)&&(n.visible=!1),f.layerObjects[t]||(f.layerObjects[t]=[]),f.layerObjects[t].push(n)}else a.add(n),n.traverse((t=>{if(ei.setSharedVariablesOfObject(t),t.geometry){let i=t.userData.layerName;!1===this.getLayerVisible(e,i)&&(t.visible=!1),u(t),h&&h.add(t)}}));yield o(t)}e.objects.LAYOUT.forEach((t=>{let i=t,r=i.layoutName;if(this.ignorePaperSpace&&r!==Ri.MODEL_LAYOUT_NAME)return;let n=i.associatedBlockName,s=e.blocks[n];s&&this.drawLayout(s,e,i,d,h,c)})),ne.debug(`[DxfLoader] Drew entities in ${(Date.now()-i)/1e3}s`);for(let e in p){let t,i=p[e],r=i.object;if(e!==Ri.MODEL_LAYOUT_NAME){let i=l[e];i.directAssociatedLeafObjectSet||(i.directAssociatedLeafObjectSet=new Set),t=i.directAssociatedLeafObjectSet}for(let e in i.layerObjects){let n=i.layerObjects[e],s=qi.deepMerge(n,void 0,!1,!1,!0),a=s.added,o=s.removed;if(o.length!==n.length){let e=o;o.length>=100&&(e=new Set(o));let i=t=>Array.isArray(e)?e.indexOf(t)>=0:e.has(t);for(let e=0,s=n.length;e{f+=e})),this.enableRTC&&ne.debug(`[DxfLoader] Totally rebased ${this.statsInfo.rebasedEntityCount}(out of ${f}) entities`),this.enableMerge){let e=qi.mergeInfo;ne.debug(`[DxfLoader] Inner merged ${e.removedObjects} objects to ${e.mergedMeshes} meshes, ${e.mergedLines} lines, ${e.mergedPoints} points, ${e.mergedUnknownTypeObjects?e.mergedUnknownTypeObjects+" unknown type,":""} in ${e.elapsedTime/1e3}s`)}let m=(e,t,...i)=>{Object.keys(t).length};m(0,this.statsInfo.unsupportedEntityTypes),m(0,this.statsInfo.unsupportedTextStyles),m(0,this.statsInfo.unsupportedHatchPatterns),m(0,this.statsInfo.invisibleEntities),m(0,this.statsInfo.ignoredFrozenLayersAndEntityCount),m(0,this.statsInfo.ignoredInserts),this.ignorePaperSpace&&m(0,this.statsInfo.ignoredPaperSpaceEntityTypesAndCount),this.font&&this.font.unsupportedChars&&m(0,this.font.unsupportedChars),this.enableReleaseData&&(this.releaseCachedData(),this.releaseDxfData(e)),ne.info(`[DxfLoader] loadEntities() done in ${(Date.now()-i)/1e3}s`);let g=Dn(Br({},e),{threejsObject:d,layersAndThreejsObjects:h,loadedEntityCount:r,layoutViewportsMap:c});return Promise.resolve(g)}))}loadEntitiesForCompare(e,t,i,r){return ht(this,null,(function*(){let n=e.entities.length,s=t.entities.length,a=()=>ht(this,null,(function*(){var a;let o=this.compareContext,l=o.isTheFirstFile,h=l?e:t,u=new ur,c=l?n:s,p=h.entities.length;this.entityCount=p,Object.keys(h.blocks).forEach((e=>{var t;this.entityCount+=(null==(t=h.blocks[e].entities)?void 0:t.length)||0}));let d=Math.round(Math.pow(c,.5)),f=Date.now(),m=e=>ht(this,null,(function*(){if(r&&(e%d==0||e===c-1)){let t=e+1;l||(t+=n),r(new ProgressEvent("parseProgress",{loaded:t,total:n+s}));let i=500,a=Date.now();(a-f>i||e===c-1)&&(yield xs.sleep(0),f=a)}}));this.parseHeader(h.header);let g={};for(let e=0;e{if(e.geometry){let t=e.userData.layerName;!1===this.getLayerVisible(h,t)&&(e.visible=!1);let i=g[t];i||(i=[],g[t]=i),i.push(e)}})),yield m(e)}let y=h;y.threejsObject=u,u.updateMatrixWorld(!0),y.layersAndThreejsObjects=g,y.layoutViewportsMap={},l&&(o.preservedHandles||(o.preservedHandles=new Set));for(let e in i){let t=i[e];l&&("Added"===t.type||"Modified"===t.type)&&(null==(a=o.preservedHandles)||a.add(t.handle),t.parentHandles&&t.parentHandles.forEach((e=>{var t;return null==(t=o.preservedHandles)?void 0:t.add(e)})));let r=this.entityThreejsCache&&this.entityThreejsCache[t.handle];t.parentHandles&&(r=this.entityThreejsCache&&this.entityThreejsCache[t.parentHandles[t.parentHandles.length-1]]),r&&(r=this.setObjectColorByChange(r,t)),"NoChange"!==t.type&&r&&("Added"===t.type?!l&&(t.box=(new Dt).setFromObject(r)):"Removed"===t.type?l&&(t.box=(new Dt).setFromObject(r)):"Modified"===t.type&&(t.box?t.box.union((new Dt).setFromObject(r)):t.box=(new Dt).setFromObject(r)))}Ri.merge(y)})),o=Date.now();this.compareContext={changes:i,isTheFirstFile:!0},_t.printMemory("Before loading entities for first dxf"),yield a(),ne.info(`[DxfLoader] loadEntities for first dxf in ${(Date.now()-o)/1e3}s`),_t.printMemory("After loading entities for first dxf"),this.releaseCachedData(!1),this.releaseDxfData(e),_t.printMemory("Before loading entities for second dxf"),o=Date.now(),this.compareContext.isTheFirstFile=!1,yield a(),ne.info(`[DxfLoader] loadEntities for second dxf in ${(Date.now()-o)/1e3}s`);for(let e of Object.values(i))e.box||delete i[e.handle];this.compareContext.preservedHandles=void 0,this.enableReleaseData&&(this.releaseCachedData(),this.releaseDxfData(t)),_t.printMemory("After loading entities for second dxf")}))}setObjectColorByChange(e,t){let i=(e,t)=>{e.traverse((e=>{if(e.material)if(e.material instanceof vr)e.material=this.getLineBasicMaterial(t);else if(e.material instanceof or)e.material=this.getMeshBasicMaterial(t);else if(e.material instanceof jn)e.material=this.getPointsMaterial(t);else if(e.material instanceof Yt){let i=e.material.clone();this.updateMaterialUniforms(i),i.uniforms.u_color.value.set(t),e.material=i}}))},r=(e=>{var t;let i=qn.ENTITY_COLOR_NO_CHANGE;return"Added"===e.type?i=qn.ENTITY_COLOR_ADDED:"Removed"===e.type?i=qn.ENTITY_COLOR_REMOVED:"Modified"===e.type&&(i=null!=(t=this.compareContext)&&t.isTheFirstFile?qn.ENTITY_COLOR_REMOVED:qn.ENTITY_COLOR_ADDED),i})(t);return e.traverse((n=>{t.parentHandles?n.userData&&n.userData.handle&&n.userData.handle===t.handle&&(i(n,r),e=n):i(n,r)})),e}releaseCachedData(e=!0){e&&(this.pointsMaterials={},this.lineBasicMaterials={},this.lineShaderMaterials={},this.meshBasicMaterials={},this.meshTextureMaterials={},this.hatchShaderMaterials=[]),this.header=void 0,this.blockReferencesCache={},this.blockRecordsCache=void 0,this.blocksCache=void 0,this.entitiesCache=void 0,this.dictionaryOwnerHandleAndSpatialFilterHandlesCache=void 0,this.spatialFiltersCache=void 0,this.entityThreejsCache=void 0,this.entityTypesAndTimes=void 0,this.entityHandlesWithRenderOrder={},this.statsInfo={unsupportedEntity:{},unsupportedEntityTypes:{},unsupportedTextStyles:{},unsupportedHatchPatterns:{},invisibleEntities:{},ignoredFrozenLayersAndEntityCount:{},ignoredInserts:{},entityTypesAndMeshCount:{},ignoredPaperSpaceEntityTypesAndCount:{},rebasedEntityCount:0}}releaseEntity(e){e.vertices&&(e.vertices=void 0),e.knotValues&&(e.knotValues=void 0),e.controlPoints&&(e.controlPoints=void 0),e.binaryData&&(e.binaryData=void 0),e.text&&(e.text=void 0),e.extendedData&&(e.extendedData=void 0),e.contextData&&(e.contextData=void 0);let t=e;t.boundaryPaths&&(t.boundaryPaths=[]),t.patternLines&&(t.patternLines=void 0)}releaseDxfData(e){delete e.objects.DICTIONARY,delete e.objects.SORTENTSTABLE,delete e.objects.XRECORD,delete e.tables.dimStyle,delete e.tables.lineType,delete e.tables.style,delete e.tables.blockRecord,e.entities=[],e.blocks={}}drawEntity(e,t,i,r=!1){if(this.compareContext&&this.compareContext.preservedHandles&&this.compareContext.preservedHandles.has(e.handle)&&E0.includes(e.type)&&(r=!0),!r&&this.compareContext&&this.compareContext.preservedHandles&&!E0.includes(e.type)&&!this.compareContext.preservedHandles.has(e.handle)&&(!i||i&&!this.compareContext.preservedHandles.has(i.handle)))return;if(!0===this.getLayerFrozen(t,e)){let t=e.layer;return this.statsInfo.ignoredFrozenLayersAndEntityCount[t]||(this.statsInfo.ignoredFrozenLayersAndEntityCount[t]=0),void this.statsInfo.ignoredFrozenLayersAndEntityCount[t]++}if(!1===e.visible||e.invisible)return this.statsInfo.invisibleEntities[e.type]||(this.statsInfo.invisibleEntities[e.type]=0),void this.statsInfo.invisibleEntities[e.type]++;if(this.ignorePaperSpace&&e.inPaperSpace)return this.statsInfo.ignoredPaperSpaceEntityTypesAndCount[e.type]||(this.statsInfo.ignoredPaperSpaceEntityTypesAndCount[e.type]=0),void this.statsInfo.ignoredPaperSpaceEntityTypesAndCount[e.type]++;this.entityThreejsCache||(this.entityThreejsCache={});let n,s=Date.now(),a=!1;if(!this.compareContext&&this.entityThreejsCache[e.handle])n=this.entityThreejsCache[e.handle].clone(),a=!0;else if(!this.statsInfo.unsupportedEntity[e.handle]){if("CIRCLE"===e.type||"ARC"===e.type)n=this.drawArc(e,t,i);else if("LINE"===e.type||"POLYLINE"===e.type)n=this.drawLine(e);else if("XLINE"===e.type)n=this.drawXLine(e);else if("SEQEND"!==e.type)if("RAY"===e.type)n=this.drawRay(e);else if("LWPOLYLINE"===e.type)n=this.drawLWPolyline(e,t,i);else if("3DFACE"===e.type)n=this.draw3DFace(e);else if("TEXT"===e.type)n=this.drawText(e,t,i);else if("SOLID"===e.type)n=this.drawSolid(e,t,i);else if("POINT"===e.type)n=this.drawPoint(e,t,i);else if("INSERT"===e.type)n=this.drawInsert(e,t,r);else if("SPLINE"===e.type)n=this.drawSpline(e,i);else if("MTEXT"===e.type)n=this.drawMText(e,t,i);else if("ELLIPSE"===e.type)n=this.drawEllipse(e,t,i);else if("DIMENSION"===e.type)n=this.drawDimension(e,t);else if("REGION"!==e.type)if("ATTDEF"===e.type)n=this.drawAttDef(e,t,i);else if("ATTRIB"===e.type){if(!i)for(let r=0;r{ei.setSharedVariablesOfObject(n),n.matrixAutoUpdate=!1,n.updateMatrix(),n.geometry&&(!1===s&&(n.userData.layerVisible=!1),n.userData.layerName=r,this.setMaterial(n,e,t,i))})),a||(this.nonSnapableTypes.has(e.type)&&n.traverse((e=>{e.layers.set(10)})),this.enableRenderOrder&&(this.entityHandlesWithRenderOrder[e.handle]?n.renderOrder=parseInt(this.entityHandlesWithRenderOrder[e.handle],16)+.1:n.renderOrder=parseInt(e.handle,16)))}return E0.includes(e.type)||(this.entityTypesAndTimes||(this.entityTypesAndTimes={}),this.entityTypesAndTimes[e.type]||(this.entityTypesAndTimes[e.type]={createCount:0,totalTime:0,averageTime:0}),this.entityTypesAndTimes[e.type].createCount++,this.entityTypesAndTimes[e.type].totalTime+=Date.now()-s),n?this.statsInfo.entityTypesAndMeshCount[e.type]?this.statsInfo.entityTypesAndMeshCount[e.type]++:this.statsInfo.entityTypesAndMeshCount[e.type]=1:(this.statsInfo.unsupportedEntityTypes[e.type]?this.statsInfo.unsupportedEntityTypes[e.type]++:this.statsInfo.unsupportedEntityTypes[e.type]=1,E0.includes(e.type)||(this.statsInfo.unsupportedEntity[e.handle]?this.statsInfo.unsupportedEntity[e.handle]++:this.statsInfo.unsupportedEntity[e.handle]=1)),n}drawEllipse(e,t,i){if(!e.majorAxisEndPoint||!e.center||void 0===e.axisRatio||void 0===e.startAngle||void 0===e.endAngle)return;let r=e.startAngle,n=e.endAngle;if(e.extrusionDirection&&e.extrusionDirection.z<0&&(r=2*Math.PI-e.endAngle,n=2*Math.PI-e.startAngle),sr.areNumbersEqual(r,n,1e-5))return void ne.warn("[DxfLoader] Ellipse entity (handle '%s') contains the same start and end angle, ignored!",e.handle);let s=n-r;for(;s>2*Math.PI;)s-=2*Math.PI;Math.abs(s)<=1e-5&&(n=sr.floorNumber(r+2*Math.PI,5));let a=Math.sqrt(Math.pow(e.majorAxisEndPoint.x,2)+Math.pow(e.majorAxisEndPoint.y,2)),o=a*e.axisRatio,l=Math.atan2(e.majorAxisEndPoint.y,e.majorAxisEndPoint.x),h=new wp(e.center.x,e.center.y,a,o,r,n,!1,l),u=1,c=i;null!=c&&c.xScale&&null!=c&&c.yScale&&(u=Math.max(Math.abs(c.xScale),Math.abs(c.yScale)));let p=this.getDivision(r,n,Math.max(a,o)*u),d=h.getPoints(p),f=[],m=d.length;for(let e=0;e{e.geometry&&e.geometry.translate(u,c,0)})),e.rotation&&(a.rotation.z=e.rotation*Math.PI/180),e.directionVector){let t=e.directionVector,i=new A(t.x,t.y,t.z),r=i.clone().cross(Xf),n=new A(1,0,0).angleTo(i);a.rotateZ(r.z>0?-n:n)}return s.lineLength>1?a.position.y-=o.y+s.style.textHeight:a.position.y-=o.y,a}getMTextGroup(e,t,i,r,n){var s;if(0===e.length)return;let a=(n?n.style.textHeight:t.textHeight)||0;if(t.textStyle){let e=i.tables.style.styles[t.textStyle];a=a||e.textHeight}let o=a/1.5,l=a/2,h=new ur;for(let a=0;a{n&&n[n.length-1]&&n[n.length-1].colorIndex===e.colorIndex?n[n.length-1].text+=e.text:n.push(e)})),r=e.lineLength}else if("object"==typeof a)if(a.S&&3===a.S.length){let e=a.S[0]+"/"+a.S[2],t=this.getTextLineNum(e);n&&n[n.length-1]&&void 0===n[n.length-1].colorIndex?n[n.length-1].text+=e:n.push({text:a.S[0]+"/"+a.S[2],lineNum:r}),r+=t}else if(void 0!==a.C&&(s++,"string"==typeof e[s])){let t=this.getTextLineNum(e[s]);n&&n[n.length-1]&&n[n.length-1].colorIndex===a.C?n[n.length-1].text+=e[s]:n.push({colorIndex:a.C,text:e[s],lineNum:r}),r+=t}}return{text:n,lineLength:r,style:i}}getTextLineNum(e){let t=e.match(new RegExp("\\n","g"));return t?t.length:0}draw3DFace(e){if(!e.vertices||0===e.vertices.length)return void ne.warn("[DxfLoader] Entity is missing vertices:",e.handle);let t=e.vertices.map((e=>new A(e.x,e.y,e.z)));if(0===t.length)return;sr.areVector3sEqual(t[0],t[t.length-1])||t.push(t[0]);let i=new A,r=!1;this.enableRTC&&(r=kt.checkAndRebasePositionsOnRTC(t,i));let n=(new lt).setFromPoints(t),s=new Ir(n,Na);return r&&(this.setRTCUserData(s),s.position.x+=i.x,s.position.y+=i.y),s.renderOrder=2,s}drawSpline(e,t){if(!e.controlPoints||!e.degreeOfSplineCurve||!e.knotValues)return;let i=1/0,r=1/0,n=-1/0,s=-1/0;for(let t of e.controlPoints)t.xn&&(n=t.x),t.y>s&&(s=t.y);let a=1,o=t;null!=o&&o.xScale&&null!=o&&o.yScale&&(a=Math.max(Math.abs(o.xScale),Math.abs(o.yScale)));let l=Math.max(n-i,s-r),h=this.getBSplineInterpolationsPerSplineSegment(e.controlPoints.length,l*a),u=S2t(e.controlPoints,e.degreeOfSplineCurve,e.knotValues,h),c=new A,p=!1;this.enableRTC&&(p=kt.checkAndRebasePositionsOnRTC(u,c));let d=kt.getAdjacentNonRepeatPoints(u);if(d.length<2)return void ne.warn("[DxfLoader] Spline entity (handle '%s') contains less than 2 points, ignored!",e.handle);let f=(new lt).setFromPoints(d),m=new Ir(f,Na);return p&&(this.setRTCUserData(m),m.position.x+=c.x,m.position.y+=c.y),m}drawXLine(e){if(!e.vertices||0===e.vertices.length)return void ne.warn("[DxfLoader] Entity is missing vertices:",e.handle);let t=_t.arrayOrObjectToVector3(e.directionVector),i=new A(e.vertices[0].x,e.vertices[0].y,0),r=[];if(r.push(t.clone().multiplyScalar(-1e6).add(i)),r.push(t.clone().multiplyScalar(1e6).add(i)),0===r.length)return;let n=new A,s=!1;this.enableRTC&&(s=kt.checkAndRebasePositionsOnRTC(r,n));let a=(new lt).setFromPoints(r),o=new Ir(a,Na);return s&&(this.setRTCUserData(o),o.position.x+=n.x,o.position.y+=n.y),o.renderOrder=2,o}drawRay(e){if(!e.vertices||0===e.vertices.length)return void ne.warn("[DxfLoader] Entity is missing vertices:",e.handle);let t=_t.arrayOrObjectToVector3(e.directionVector),i=e.vertices.map((e=>new A(e.x,e.y,0)));if(i.push(t.multiplyScalar(1e6).add(i[0])),0===i.length)return;let r=new A,n=!1;this.enableRTC&&(n=kt.checkAndRebasePositionsOnRTC(i,r));let s=(new lt).setFromPoints(i),a=new Ir(s,Na);return n&&(this.setRTCUserData(a),a.position.x+=r.x,a.position.y+=r.y),a.renderOrder=2,a}drawLine(e){if(!e.vertices||0===e.vertices.length)return void ne.warn("[DxfLoader] Entity is missing vertices:",e.handle);let t=[];if(e.isPolyfaceMesh)t=R2t(e.vertices);else{let i=K8(e.vertices,e.shape);e.shape&&i.length>0&&i.push(i[0]),i.length>0&&(t=[i])}if(0===t.length)return;let i=[];for(let e=0;e0){if(this.enableRTC){let e=0;t.forEach((t=>{t.forEach((t=>{n.add(t),e++}))})),n.divideScalar(e),s=kt.shouldRebasePositionOnRTC(n)}let e=[],i=[],a=0,o=0,l=0,h=0;t.forEach((t=>{for(let r=0;r0&&i.push(a+r-1,a+r);a=t.length}));let u=(new lt).setFromPoints(e);u.setIndex(i),r=new li(u,Na)}if(i.length>0){this.enableRTC&&(s=kt.checkAndRebasePositionsOnRTC(i,n));let e=(new lt).setFromPoints(i);r=new nn(e,X8)}return r?(s&&(this.setRTCUserData(r),r.position.x+=n.x,r.position.y+=n.y),r):void 0}drawLWPolyline(e,t,i){var r;if(!e.vertices||e.vertices.length<2)return void ne.warn("[DxfLoader] Invalid LWPolyline entity (handle '%s'), ignored!",e.handle);let n=e;if(void 0!==n.extrusionDirectionX&&void 0!==n.extrusionDirectionY&&void 0!==n.extrusionDirectionZ){ds.set(n.extrusionDirectionX,n.extrusionDirectionY,n.extrusionDirectionZ);let e=Ri.getOcsMatrix(ds).invert(),t=0;void 0!==n.elevation&&n.elevation>0&&(t=n.elevation),n.vertices.forEach((i=>{let r=ds.set(i.x,i.y,t).applyMatrix4(e);i.x=r.x,i.y=r.y}))}let s=K8(e.vertices,e.shape);if(e.shape&&s.length>0&&!sr.areVector3sEqual(s[0],s[s.length-1])&&s.push(s[0]),s.length<2)return void ne.warn("[DxfLoader] Invalid LWPolyline entity (handle '%s'), ignored!",e.handle);null!=(r=e.extendedData)&&r.outlines&&e.extendedData.outlines.forEach((e=>{let t=e.map((e=>new A(e[0],e[1],0)));sr.areVectorsClose(t[0],t[t.length-1])||t.push(t[0]),s.push(...t)}));let a=new A,o=!1;this.enableRTC&&(o=kt.checkAndRebasePositionsOnRTC(s,a));let l,h=kt.getAdjacentNonRepeatPoints(s);if(!(h.length<2)){if(this.enableWidthLine&&void 0!==n.constantWidth&&n.constantWidth>1){let r=t.tables.lineType.lineTypes[this.getLineType(e,t,i)];if(!r||!r.pattern||0===r.pattern.length){let t=kt.convertWidthLineToMeshGeometry(h,n.constantWidth);if(t){let e=new rt(t,w_);l=new ur,l.add(e);let i=ei.createOutlineSync(t,e.matrix,Na);i.layers.set(10),l.add(i)}else ne.warn("[DxfLoader] Failed to convert width line to mesh geometry: %s ",e.handle)}}return l||(l=new Ir((new lt).setFromPoints(h),Na)),o&&(this.setRTCUserData(l),l.position.x+=a.x,l.position.y+=a.y,l.position.z+=a.z),l}ne.warn("[DxfLoader] Invalid LWPolyline entity (handle '%s'), ignored!",e.handle)}drawMLeader(e,t,i){var r,n,s,a,o,l,h,u;let c=t.tables.dimStyle.dimStyles[e.dimensionStyle]||this.getDefaultDimensionStyle(t),p=null==(r=e.contextData)?void 0:r.defaultTextContents;if(!p)return;let d=new ur,f=lO(p),m=this.mtextContentAndFormattingToTextAndStyle(f,e),g=this.getMTextGroup(m.text,e,t,i,m);if(g){null!=(n=e.contextData)&&n.textLocation&&(g.position.x+=e.contextData.textLocation.x,g.position.y+=e.contextData.textLocation.y);let t=(null==(s=e.contextData)?void 0:s.textWidth)||1;switch(m.style.horizontalAlignment){case"left":default:break;case"center":t&&(g.position.x+=t/2);break;case"right":t&&(g.position.x+=t)}let i=(new Dt).setFromObject(g).getSize(ds),r=i.x,h=i.y,u=0,c=0;switch(null==(a=e.contextData)?void 0:a.textAttachment){case 1:u=0,c=0;break;case 2:u-=r/2,c=0;break;case 3:u-=r,c=0;break;case 4:u=0,c+=h/2;break;case 5:u-=r/2,c+=h/2;break;case 6:u-=r,c+=h/2;break;case 7:u=0,c+=h;break;case 8:u-=r/2,c+=h;break;case 9:u-=r,c+=h;break;default:return}if(g.traverse((e=>{e.geometry&&e.geometry.translate(u,c,0)})),null!=(o=e.contextData)&&o.textRotation&&(g.rotation.z=e.contextData.textRotation*Math.PI/180),null!=(l=e.contextData)&&l.textDirection){let t=e.contextData.textDirection,i=new A(t.x,t.y,t.z),r=i.clone().cross(new A(1,0,0)),n=new A(1,0,0).angleTo(i);g.rotateZ(r.z>0?-n:n)}g.renderOrder=5,d.add(g)}if(0===e.leaderLineType)return g;{let i=[],r=null==(h=e.contextData)?void 0:h.leaders[0];if(!r)return d;let n=r.lastLeaderLinePoint;if(e.enableDogLeg){let e=new A(n.x,n.y,n.z),t=r.doglegLength,s=new A(r.doglegVector.x,r.doglegVector.y,r.doglegVector.z).multiplyScalar(t),a=e.clone().add(s);i.push(a,e)}let s=(null==(u=e.contextData)?void 0:u.leaders[0].leaderLines)||[];for(let r=0;rnew A(e.x,e.y,e.z))),o=new A(n.x,n.y,n.z);for(let e=0;e0?(l.add(p),qi.merge(l,!1),l):p}drawDefaultLeadArrow(e,t,i,r){let n=i*(e.x-t.x),s=i*(e.y-t.y),a=s,o=-n,l=new A(t.x+n+a/6,t.y+s+o/6,0),h=new A(t.x+n-a/6,t.y+s-o/6,0);r.push(t,l),r.push(t,h),r.push(l,h)}getBlockByHandle(e,t){if(!this.blocksCache){this.blocksCache={};for(let t in e){let i=e[t];this.blocksCache[i.ownerHandle]||(this.blocksCache[i.ownerHandle]=i)}}return this.blocksCache[t]}static transformAngleByOcsMatrix(e,t){let i=ds.set(1*Math.cos(t),1*Math.sin(t),0).applyMatrix4(e);return Math.atan2(i.y,i.x)}static getArcAnglesByOcsMatrix(e,t,i){let r,n=sr.getArcAngleSpanRad(t,i),s=Ri.transformAngleByOcsMatrix(e,t),a=Ri.transformAngleByOcsMatrix(e,i);if(sr.areNumbersClose(n,Math.PI)){n=1;let i=Ri.transformAngleByOcsMatrix(e,t+n);r=sr.getArcAngleSpanRad(s,i)}else{if(sr.areNumbersClose(n,2*Math.PI))return[s,s+2*Math.PI];r=sr.getArcAngleSpanRad(s,a)}return sr.areNumbersClose(n,r,1e-8)?[s,a]:[a,s]}drawArc(e,t,i){var r,n,s;if(!e.radius||e.radius<.001)return void ne.warn(`[DxfLoader] The radius of arc (handle '${e.handle}') is undefined, ignored!`);if(!e.radius||e.radius<.001)return void ne.warn(`[DxfLoader] The radius of arc (handle '${e.handle}') is too small, ignored!`);let a=new A(0,0,1);void 0!==e.extrusionDirectionX&&void 0!==e.extrusionDirectionY&&void 0!==e.extrusionDirectionZ&&a.set(e.extrusionDirectionX,e.extrusionDirectionY,e.extrusionDirectionZ);let o,l,h=Ri.getOcsMatrix(a);if("CIRCLE"===e.type)o=e.startAngle||0,l=o+2*Math.PI;else{if(null==e.startAngle||null==e.endAngle||(o=e.startAngle,l=e.endAngle,sr.areNumbersEqual(o,l,.001)))return;if(!sr.areNumbersClose(sr.getArcAngleSpanRad(o,l),2*Math.PI)){let e=Ri.getArcAnglesByOcsMatrix(h,o,l);o=e[0],l=e[1]}}let u=new xg(0,0,e.radius,o,l,0!==this.angBase),c=1,p=i;null!=p&&p.xScale&&null!=p&&p.yScale&&(c=Math.max(Math.abs(p.xScale),Math.abs(p.yScale)));let d=this.getDivision(o,l,e.radius*c),f=u.getPoints(d),m=new A,g=!1;this.enableRTC&&(g=kt.checkAndRebasePositionsOnRTC(f,m));let y=(new lt).setFromPoints(f),v=new Ir(y,Na),T=new A;e.center&&(T.x=e.center.x,T.y=e.center.y);let x=new A(null==(r=e.center)?void 0:r.x,null==(n=e.center)?void 0:n.y,null==(s=e.center)?void 0:s.z).applyMatrix4(h.invert());return T.x=x.x,T.y=x.y,v.position.copy(T),g?(this.setRTCUserData(v),v.position.x+=m.x,v.position.y+=m.y):kt.shouldRebasePositionOnRTC(v.position)&&this.setRTCUserData(v),v}addTriangleFacingCamera(e,t,i,r){let n=new A,s=new A;n.subVectors(i,t),s.subVectors(r,t),n.cross(s);let a=new A(t.x,t.y,t.z),o=new A(i.x,i.y,i.z),l=new A(r.x,r.y,r.z);n.z<0?e.push(l,o,a):e.push(a,o,l)}drawSolid(e,t,i){let r=e.points;if(!r||r.length<4)return;if(e.extrusionDirection&&e.extrusionDirection.z){ds.set(0,0,e.extrusionDirection.z);let t=Ri.getOcsMatrix(ds).invert();r.forEach((e=>{let i=ds.set(e.x,e.y,0).applyMatrix4(t);e.x=i.x,e.y=i.y}))}let n=[],s=[];this.addTriangleFacingCamera(n,r[0],r[1],r[2]),s.push(0,1,2),this.addTriangleFacingCamera(n,r[1],r[2],r[3]),s.push(3,4,5);let a=new A,o=!1;this.enableRTC&&(o=kt.checkAndRebasePositionsOnRTC(n,a));let l=(new lt).setFromPoints(n);l.setIndex(s);let h=new rt(l,w_);return o&&(this.setRTCUserData(h),h.position.x+=a.x,h.position.y+=a.y),h}getDefaultTextStyle(e){return e.tables.style.styles.STANDARD||e.tables.style.styles.Standard||{}}getDefaultDimensionStyle(e){return e.tables.dimStyle.dimStyles.STANDARD||e.tables.dimStyle.dimStyles.Standard||{}}getTextEncoding(e){return e.bigFontFile&&e.bigFontFile.toUpperCase().startsWith("GB")?"gbk":"utf8"}getTextMesh(e,t,i,r,n){if(!e)return;t.textStyle&&(this.statsInfo.unsupportedTextStyles[t.textStyle]||(this.statsInfo.unsupportedTextStyles[t.textStyle]=0),this.statsInfo.unsupportedTextStyles[t.textStyle]++);let s,a=(n?n.style.textHeight:t.textHeight)||0,o=.67,l={_TCH_DIM:1.45};if(t.textStyle&&l[t.textStyle]&&(o=l[t.textStyle]),t.xScale&&(o*=t.xScale),t.textStyle){let e=i.tables.style.styles[t.textStyle];o*=(null==e?void 0:e.xScale)||1,a=a||e.textHeight}let h=0;if(t.width&&(h=t.width/o+2),t.contextData&&t.contextData.textWidth&&t.contextData.textHeighte.toThreeGeometry())));r.scale(o,1,1),s=new li(r,Na)}else if(this.font instanceof Zg){let t={font:this.font,height:0,size:a||12,curveSegments:3,bevelSegments:3},i=new JA(e,t);s=new rt(i,w_)}return s}transformTextMesh(e,t){let i=(new Dt).setFromObject(t).getSize(ds),{halign:r,valign:n}=e,s=e.width||i.x,a=i.y;if(void 0===r&&void 0===n&&e.startPoint||[3,5].includes(r)&&e.startPoint?(t.position.x+=e.startPoint.x,t.position.y+=e.startPoint.y,t.position.z+=e.startPoint.z):e.endPoint&&(t.position.x+=e.endPoint.x,t.position.y+=e.endPoint.y,t.position.z+=e.endPoint.z),3!==r&&5!==r){if(e.rotation){let i=e.rotation*Math.PI/180;t.rotateZ(i)}2===e.mirrored?t.rotateY(Math.PI):4===e.mirrored&&t.rotateX(Math.PI)}switch(r){case 0:default:break;case 1:t.translateX(-s/2);break;case 2:t.translateX(-s);break;case 3:if(e.startPoint&&e.endPoint){let i=new A(e.startPoint.x,e.startPoint.y,e.startPoint.z),r=new A(e.endPoint.x,e.endPoint.y,e.endPoint.z),n=(new A).subVectors(i,r),a=n.length()/s;t.scale.multiplyScalar(a);let o=n.clone().cross(Xf),l=n.angleTo(Xf);t.rotateZ(o.z>0?Math.PI-l:l-Math.PI),(2===e.mirrored||4===e.mirrored)&&t.rotateX(Math.PI)}break;case 4:t.translateX(-s/2),t.translateY(-a/2);break;case 5:if(e.startPoint&&e.endPoint){let i=new A(e.startPoint.x,e.startPoint.y,e.startPoint.z),r=new A(e.endPoint.x,e.endPoint.y,e.endPoint.z),n=(new A).subVectors(i,r),a=n.length()/s;t.scale.setX(a);let o=n.clone().cross(Xf),l=n.angleTo(Xf);t.rotateZ(o.z>0?Math.PI-l:l-Math.PI),(2===e.mirrored||4===e.mirrored)&&t.rotateX(Math.PI)}}switch(n){case 0:case 1:default:break;case 2:t.translateY(-a/2);break;case 3:t.translateY(-a)}return t.position.z=0,t}drawText(e,t,i){let r=e.text;if(!r||!this.font)return;let n=t.tables.style.styles[e.textStyle]||this.getDefaultTextStyle(t);r=cO(r,{encoding:this.getTextEncoding(n)}).map((e=>e.text)).join("");let s=this.getTextMesh(r,e,t,i);if(!s)return;let a=s.geometry;if(s instanceof rt&&!a.getIndex()){let e=a.getAttribute("position"),t=[];for(let i=0;ie.text)).join();let n=this.getTextMesh(r,e,t,i);if(!n)return;let s=n.geometry;if(s.hasAttribute("uv")&&s.deleteAttribute("uv"),s.hasAttribute("normal")&&s.deleteAttribute("normal"),this.transformTextMesh(e,n),kt.shouldRebasePositionOnRTC(n.position))this.setRTCUserData(n);else{let e=kt.caculateGeometryCenter(s);e&&kt.shouldRebasePositionOnRTC(e)&&this.setRTCUserData(n)}return n}drawAttrib(e,t,i){let r=e.text;if(!r||!this.font)return;r=cO(r).map((e=>e.text)).join();let n=this.getTextMesh(r,e,t,i);if(!n)return;let s=n.geometry;if(s.hasAttribute("uv")&&s.deleteAttribute("uv"),s.hasAttribute("normal")&&s.deleteAttribute("normal"),this.transformTextMesh(e,n),kt.shouldRebasePositionOnRTC(n.position))this.setRTCUserData(n);else{let e=kt.caculateGeometryCenter(s);e&&kt.shouldRebasePositionOnRTC(e)&&this.setRTCUserData(n)}return n}drawPoint(e,t,i){if(!e.position)return;let r=new lt,n=[new A(e.position.x,e.position.y,e.position.z)];ds.set(0,0,0);let s=ds,a=!1;this.enableRTC&&(a=kt.checkAndRebasePositionsOnRTC(n,s)),r.setFromPoints(n);let o=new nn(r,X8);return a&&(this.setRTCUserData(o),o.position.x+=s.x,o.position.y+=s.y),o}drawDimension(e,t){if(!e.block)return;let i=t.blocks[e.block];if(!i||!i.entities)return;let r=t.tables.dimStyle.dimStyles[e.dimStyleName]||this.getDefaultDimensionStyle(t);r&&r.DIMCLRD>0&&(e.colorIndex=r.DIMCLRD,e.color=b0(e.colorIndex));let n=new ur;for(let r=0;r`,n.userData.entityType=e.type;let s=null==e?void 0:e.insertionPoint;return s&&(n.position.x+=s.x,n.position.y+=s.y),kt.shouldRebasePositionOnRTC(n.position)&&this.setRTCUserData(n),n}drawInsert(e,t,i=!1){if(!e.block)return;let r=t.blocks[e.block];if(!r.entities)return;e.blockPosition=r.position;let n=new ur;for(let s=0;s`,n.userData.entityType=e.type,null!=e&&e.blockPosition&&(n.position.x-=e.blockPosition.x,n.position.y-=e.blockPosition.y,n.updateMatrix());let s=ds.set(1,1,1);e.xScale&&(s.x=e.xScale),e.yScale&&(s.y=e.yScale);let a=new xr;e.rotation&&(a.z=e.rotation*Math.PI/180),BMe.setFromEuler(a,!1);let o=R_.set(0,0,0);e.position&&(o.x=e.position.x,o.y=e.position.y),Xc.compose(o,BMe,s),e.extrusionDirection&&e.extrusionDirection.z<0&&Xc.premultiply(UMe.identity().makeScale(-1,1,1)),$8.copy(n.matrix),n.applyMatrix4(Xc),kt.shouldRebasePositionOnRTC(n.position)&&this.setRTCUserData(n);let l=this.findSpatialFilterByHandle(e.handle,t);if(l){let t=this.drawSpatialFilter(l),i=l;i&&i.clipPolylines&&i.clipPolylines.length>0&&(n.userData.spatialFilterHandle=l.handle,this.cloneMaterialsForSpatialFilter(n),t&&t.applyMatrix4($8.invert()),ne.debug("[DxfLoader] Spatial filter:",e.associatedSpatialFilter))}return n}drawSpatialFilter(e){let t=e;if(t.threejsObject)return t.threejsObject.clone();let i=e.invertBlockMatrix;Xc.set(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],0,0,0,1);let r=[];e.vertices.forEach((e=>{r.push(new A(e.x,e.y,0))}));let n={polyline:[],bConcave:!1,bReversed:!1};if(2===e.numberOfPointsOnClipBoundary)n.polyline=r;else{let t=e.numberOfPointsOnClipBoundary,i=3;if(te;n--){let o=r[n];if(sr.areVector3sEqual(i,o)&&e+10)break;s.push(i)}if(a>0)for(let e=a+1;e{o.push(new le(e.x,e.y)),l.push([e.x,e.y])})),!kt.isConvex(o)){ne.warn(`[DxfLoader] Concave polygon is not supported for spatial filter (handle '${e.handle}'), converting to convex polygon!`);let t=(0,kMe.default)(l,1/0);s=[],t.forEach((e=>{s.push(new A(e[0],e[1],0))}))}sr.areVector3sEqual(s[0],s[s.length-1])||s.push(s[0]),n.polyline=s,n.bReversed=a>0}return this.enableReleaseData&&(e.vertices=[],e.matrix=[],e.invertBlockMatrix=[]),t.localMatrix=Xc.clone(),t.clipPolylines=[],void t.clipPolylines.push(n)}drawLayout(e,t,i,r,n,s){if(!e.entities)return;let a;if(i.layoutName!==Ri.MODEL_LAYOUT_NAME){let e=i;e.directAssociatedLeafObjectSet||(e.directAssociatedLeafObjectSet=new Set),a=e.directAssociatedLeafObjectSet}let o=new ur;ei.setSharedVariablesOfObject(o);for(let i=0;i{if(e.geometry){let i=e.userData.layerName;!1===this.getLayerVisible(t,i)&&(e.visible=!1);let r=n[i];r||(r=[],n[i]=r),r.push(e),a&&a.add(e)}})))}if(0===o.children.length)return;o.userData.layerName=e.layer;let l=i.layoutName,h=r.children.find((e=>e.name===l));h||(h=new ur,ei.setSharedVariablesOfObject(h),h.name=l,h.userData.isLayoutLevelObject=!0,r.add(h)),h.add(o),e.position&&o.position.set(e.position.x,e.position.y,e.position.z||0),o.matrixAutoUpdate=!1,o.updateMatrix()}convertEdgeToPoints(e){let t=[];switch(e.type){case 1:{let i=e;t.push(new le(i.startPoint.x,i.startPoint.y)),t.push(new le(i.endPoint.x,i.endPoint.y));break}case 2:{let i=e,r=i.startAngle*_r.DEG2RAD,n=i.endAngle*_r.DEG2RAD;i.bCounterclockwise||(r=2*Math.PI-r,n=2*Math.PI-n);let s=new xg(i.center.x,i.center.y,i.radius,r,n,!i.bCounterclockwise),a=this.getDivision(r,n,i.radius);t.push(...s.getPoints(a));break}case 3:{let i=e,r=Math.sqrt(Math.pow(i.majorAxisEndPoint.x,2)+Math.pow(i.majorAxisEndPoint.y,2)),n=r*i.minorRatio,s=Math.atan2(i.majorAxisEndPoint.y,i.majorAxisEndPoint.x),a=i.startAngle*_r.DEG2RAD,o=i.endAngle*_r.DEG2RAD;i.bCounterclockwise||(a=2*Math.PI-a,o=2*Math.PI-o);let l=new wp(i.center.x,i.center.y,r,n,a,o,!i.bCounterclockwise,s),h=this.getDivision(a,o,Math.max(r,n));t.push(...l.getPoints(h));break}case 4:{let i=e;t.push(...i.controlPoints);break}case 0:{let i=e;t.push(...K8(i.points,i.isClosed));break}}return t}drawHatch(e,t,i){var r;let n=e;if(0==n.boundaryPaths.length)return;let s=[],a=[],o=[];if(n.boundaryPaths.forEach(((e,t)=>{if(this.IsfilteredByPathTypeFlag(e.pathTypeFlag)){let i="[DxfLoader] The %d path type flag is filtered at the %dth boundrayPath (hatch handle '%s')";return void ne.info(i,e.pathTypeFlag,t,n.handle)}let i=e.edges;if(0===i.length)return;let r=[];for(let e=0;e31&&!(e=>{for(let t=1;tnew le(_t.roundNumber(e.x,7),_t.roundNumber(e.y,7))));if((null==l?void 0:l.length)>0){s.push(l);let e=(new rs).setFromPoints(l);a.push(e);let t=e.getSize(M_),i=t.x*t.y;o.push({area:i,index:s.length-1})}})),0===s.length)return;let l=new le,h=this.checkAndRebasePolygonsOnRTC(s,l);o.sort(((e,t)=>e.area-t.area));let u=[];o.forEach((e=>{u.push(e.index)}));let c,p=this.buildContainHierarchyTree(s,a,u),d=[];if(this.buildHatchGeometry(s,p,d),d.length>0&&(c=zo(d)),!c||!c.getIndex()||0===(null==(r=c.getIndex())?void 0:r.count))return void ne.warn("[DxfLoader] Failed to convert hatch boundaries!");let f=new rt(c,w_);f.layers.set(10),this.setHatchMaterial(f,n,t,l,i);let m=f;return h?(this.setRTCUserData(f),m.position.x+=l.x,m.position.y+=l.y):kt.shouldRebasePositionOnRTC(m.position)&&this.setRTCUserData(m),m}drawOle2frame(e,t){let{leftUpX:i,leftUpY:r,rightDownX:n,rightDownY:s}=e;if(!(i&&r&&n&&s))return;let a=[new le(i,r),new le(i,s),new le(n,s),new le(n,r),new le(i,r)],o=new A,l=!1;this.enableRTC&&(l=kt.checkAndRebasePositionsOnRTC(a,o));let h=(new lt).setFromPoints(a),u=this.getLineBasicMaterial(16777215),c=new Ir(h,u);l&&(this.setRTCUserData(c),c.position.x+=o.x,c.position.y+=o.y);let p=new ur;p.add(c);let d,f,m=t.objects.DICTIONARY;for(let t of m){let i=t;for(let t in i.entries)if(i.entries[t]===e.handle){d=t;break}}if(d)if(this.meshTextureMaterials[d])f=this.meshTextureMaterials[d];else for(let e=0;e1?p:c}static getOcsMatrix(e){let t=Xf,i=Y8,r=gO,n=new A(0,1,0),s=new A(0,0,1);return sr.areVectorsClose(e,s)?Xc.identity():(r=e.clone().normalize(),sr.areVectorsClose(r,s)||(t=Math.abs(r.x)<1/64&&Math.abs(r.y)<1/64?n.cross(r).normalize():s.cross(r).normalize(),i=r.clone().cross(t).normalize()),Xc.set(t.x,t.y,t.z,0,i.x,i.y,i.z,0,r.x,r.y,r.z,0,0,0,0,1))}static getDcs2WcsMatrix(e,t){let i;i=x2t(e)?e.viewDirectionFromTarget:e.viewDirection;let r,n,s,a=new A(sr.roundNumber(i.x,7),sr.roundNumber(i.y,7),i.z),o=new A(e.viewTarget.x,e.viewTarget.y,e.viewTarget.z),l=e.viewTwistAngle;s=a.clone().normalize(),r=gO.clone().cross(a),r.length()>0?(r.normalize(),n=s.clone().cross(r)):s.z<0?(r=Xf.clone().negate(),n=Y8,s=gO.clone().negate()):(r=Xf,n=Y8,s=gO);let h=new Be,u=Xc.identity();return u.makeBasis(r,n,s),h.premultiply(u),h.premultiply(Xc.identity().compose(o.clone(),(new Hr).setFromAxisAngle(new A(0,0,1),_r.degToRad(t?l:-l)),new A(1,1,1))),h}getViewportMsToPsMatrix(e){let t=new A(e.centerPoint_dcs.x,e.centerPoint_dcs.y,0),i=new A(e.centerPoint.x,e.centerPoint.y,e.centerPoint.z),r=e.viewHeight/e.height_paperSpace,n=Ri.getDcs2WcsMatrix(e,this.angDir),s=new Be;s.setPosition(HMe.clone().sub(i));let a=UMe.identity();a.scale(ds.set(r,r,r));let o=$8.identity().setPosition(HMe.clone().sub(i));a.premultiply(o.clone().invert()).multiply(o),s.multiply(a);let l=Xc.identity();l.setPosition(t),n.multiply(l);let h=Xc.identity();return s.invert().multiply(h).multiply(n.invert())}drawViewport(e,t,i){let r=e;if("1"==r.viewportId)return e.psBBox=new Dt,void(e.msToPsMatrix=new Be);let n=[],s=r.centerPoint,a=r.width_paperSpace/2,o=r.height_paperSpace/2;n.push(new A(s.x-a,s.y-o,0)),n.push(new A(s.x-a,s.y+o,0)),n.push(new A(s.x+a,s.y+o,0)),n.push(new A(s.x+a,s.y-o,0)),n.push(n[0]),e.psBBox=new Dt(n[0],n[2]),e.msToPsMatrix=this.getViewportMsToPsMatrix(r);let l=new A,h=!1;this.enableRTC&&(h=kt.checkAndRebasePositionsOnRTC(n,l));let u=(new lt).setFromPoints(n),c=new Ir(u,Na);h&&(this.setRTCUserData(c),c.position.x+=l.x,c.position.y+=l.y),c.userData.entityType=e.type;let p=new ur;p.add(c);let d=e.psBBox.clone();d.applyMatrix4(e.msToPsMatrix.clone().invert()),d.min.z=0,d.max.z=0;let f=[];f.push(d.min),f.push(new A(d.min.x,d.max.y,0)),f.push(d.max),f.push(new A(d.max.x,d.min.y,0)),f.push(f[0]);let m=new A,g=!1;this.enableRTC&&(g=kt.checkAndRebasePositionsOnRTC(f,m));let y=(new lt).setFromPoints(f),v=new Ir(y,Na);return g&&(this.setRTCUserData(v),v.position.x+=m.x,v.position.y+=m.y),v.userData.entityType=e.type,v.userData.inPaperSpace=!0,p.add(v),c}getColor(e,t,i){var r,n,s,a,o,l;if(this.compareContext){let t=e.compareChangeType;return"Added"===t?qn.ENTITY_COLOR_ADDED:"Removed"===t?qn.ENTITY_COLOR_REMOVED:"Modified"===t?this.compareContext.isTheFirstFile?qn.ENTITY_COLOR_REMOVED:qn.ENTITY_COLOR_ADDED:qn.ENTITY_COLOR_NO_CHANGE}let h=e;if(h&&h.isGradientColor){let t=h.gradientColors;if(t&&t.length>=2){if(t[0]!==t[1]){let t=`[DxfLoader] Gradient colors are not supported for hatch '${e.handle}', will use the first color!`;ne.warn(t)}return t[0]}}if(e.isTrueColor||e.colorIndex>0&&e.colorIndex<256)return e.color;if(0===e.colorIndex)return i?this.getColor(i,t):null==(n=null==(r=t.tables)?void 0:r.layer)?void 0:n.layers[0].color;if(256===e.colorIndex){let r=null==(a=null==(s=t.tables)?void 0:s.layer)?void 0:a.layers,n=r&&r[e.layer],h=r&&i&&r[i.layer],u=$f;return u=n&&"0"!==n.name?n.color:h?h.color:n?n.color:null==(l=null==(o=t.tables)?void 0:o.layer)?void 0:l.layers[0].color,u}return ne.warn("[DxfLoader] Unknown colorIndex"),$f}getLineType(e,t,i){var r,n;if(i&&"DIMENSION"===i.type)return this.getLineType(i,t);if(e.lineType!==QA&&e.lineType!==D8)return e.lineType;if(e.lineType===D8)return i?this.getLineType(i,t):e.lineType;let s=null==(n=null==(r=t.tables)?void 0:r.layer)?void 0:n.layers,a=b2t;if("0"!==e.layer){let t=s&&s[e.layer];if(t)return t.lineType}else if(i){let e=s&&s[i.layer];if(e)return e.lineType}return a}getLayerName(e,t,i){var r,n;let s=null==(n=null==(r=t.tables)?void 0:r.layer)?void 0:n.layers,a=s&&s[e.layer],o=s&&i&&s[i.layer],l=a.name;return a&&"0"===a.name&&o&&(l=o.name),l||"0"}setMaterial(e,t,i,r){let n=e;if(!n.geometry||(this.setRenderOrderByObjectType(e),"OLE2FRAME"===t.type))return;if("MTEXT"===t.type)return void(e.renderOrder=5);if("HATCH"===t.type)return M_.set(0,0),void this.setHatchMaterial(e,t,i,M_,r);let s,a=this.getColor(t,i,r);if("LWPOLYLINE"===t.type&&(n.isMesh?(s=this.getMeshBasicMaterial(a),e.renderOrder=1):e.userData.isOutline&&(s=this.getLineBasicMaterial(a),e.renderOrder=3),s))n.material=s;else{if("SOLID"===t.type)s=this.getMeshBasicMaterial(a);else if("TEXT"===t.type||"ATTDEF"===t.type||"ATTRIB"===t.type)s=this.getLineBasicMaterial(a),e.renderOrder=5;else if("LEADER"===t.type||"MULTILEADER"===t.type||"VIEWPORT"===t.type)s=this.getLineBasicMaterial(a);else if("POINT"===t.type)s=this.getPointsMaterial(a);else{if(e.material instanceof jn)return s=this.getPointsMaterial(a),void(n.material=s);let o=i.tables.lineType.lineTypes[this.getLineType(t,i,r)],l=t.lineTypeScale||1;o&&o.pattern&&0!==o.pattern.length?(s=this.getLineShaderMaterial(o,a,l),e.renderOrder=3):s=this.getLineBasicMaterial(a)}n.material=s}}setHatchMaterial(e,t,i,r,n){let s=e;if(!s.geometry)return;let a=this.getColor(t,i,n);if(s.isLine)return void(s.material=this.getLineBasicMaterial(a));let o,l=-1;if(t.solidFill)o=this.getMeshBasicMaterial(a);else{if(s.material instanceof Yt){o=s.material;let e=new je(a);s.material.uniforms.u_color.value.equals(e)||(o=s.material.clone(),this.updateMaterialUniforms(o),o.uniforms.u_color.value.set(a))}else o=this.getHatchShaderMaterial(t,a,r);l=0}o||(o=this.getMeshBasicMaterial(a),l=-1),s.material=o,s.renderOrder=l}setRenderOrderByObjectType(e){let t=e,i=0;t.isMesh?i=-1:t.isLine?i=2:t.isPoints&&(i=4),e.renderOrder=i}getPointsMaterial(e){return this.pointsMaterials[e]||(this.pointsMaterials[e]=new jn({size:.2,color:e})),this.pointsMaterials[e]}getLineBasicMaterial(e){return this.lineBasicMaterials[e]||(this.lineBasicMaterials[e]=new vr({color:e})),this.lineBasicMaterials[e]}getLineShaderMaterial(e,t,i){let r=`${e.name}_${t}_${i}`;if(!this.lineShaderMaterials[r]){let n=this.getLineTypeScales(),s=n.ltScale*n.celtScale*i;this.lineShaderMaterials[r]=oO.createLineShaderMaterial(e.pattern,t,s,Ri.viewportScaleUniform,Ri.cameraZoomUniform)}return this.lineShaderMaterials[r]}getMeshBasicMaterial(e){return this.meshBasicMaterials[e]||(this.meshBasicMaterials[e]=new or({color:e})),this.meshBasicMaterials[e]}getHatchShaderMaterial(e,t,i){if(!e.patternLines||e.patternLines.length<1)return;let r=this.findMatchedHatchShaderMaterial(e,t);if(r)return r;let n=2;e.patternLines.forEach((e=>{n=Math.max(e.dashPattern.length,n)}));let s=0,a=[],o=new le;for(let t of e.patternLines){let r=new le(t.origin.x,t.origin.y).sub(i).rotateAround(o,-_r.degToRad(e.patternAngle)),l=new le(t.delta.x,t.delta.y).rotateAround(o,-_r.degToRad(t.angle));if(0===l.y)return void ne.warn("[DxfLoader] delta.y is equal to zero !");let h=t.dashPattern.length,u=!0,c=0;for(let e=0;e0&&(u=!1),c+=Math.abs(i)}let p=u?.05:.005,d=[],f=[],m=0;f[0]=m;for(let e=0;eRi.maxFragmentUniforms){ne.warn("[DxfLoader] There will be warning in fragment shader when number of uniforms exceeds 1024, so extra hatch line patterns are ignored here!");break}a.push(g)}let l=MMe(a,e.patternAngle,Ri.cameraZoomUniform,new je(t));return l.defines={MAX_PATTERN_SEGMENT_COUNT:n},this.hatchShaderMaterials.push({patternLines:e.patternLines,patternAngle:e.patternAngle,color:t,material:l}),l}getDivision(e,t,i){let r=Math.round(5e4/this.entityCount);r=Math.max(r,2),r=Math.min(r,10);let n=5*r,s=2*r;if(this.averageCurveSize){s*=Math.pow(i/this.averageCurveSize,.5),s=Math.max(s,r),s=Math.min(s,n)}let a=t-e;a<0&&(a+=2*Math.PI),s=Math.ceil(s*(a/Math.PI));let o=8;return a<.087?o=2:a<.174?o=3:a<.52?o=4:a<1.57?o=5:a<3.14?o=6:a<4.71&&(o=7),s=Math.max(s,o),this.averageCurveSize=(this.averageCurveSize*this.curveCount+i)/(this.curveCount+1),this.curveCount++,Math.max(s,12)}getBSplineInterpolationsPerSplineSegment(e,t){let i=1;this.averageCurveSize&&(i=Math.pow(t/this.averageCurveSize,.5),i=Math.max(i,.5),i=Math.min(i,2)),this.averageCurveSize=(this.averageCurveSize*this.curveCount+t)/(this.curveCount+1),this.curveCount++;let r=2*e*i;if(e>20){r/=Math.log10(e)}return r}getSimplifyTolerance(){return.03}setDxfDataToIndexedDb(e,t){return ht(this,null,(function*(){let i={dxfDataId:e,dxf:t};return new Promise(((t,r)=>{QT.instance().add(i,(()=>{ne.info(`[DxfLoader] Saved '${e}' to indexedDb`),t()}),(e=>{r(e)}))}))}))}getDxfDataFromIndexedDb(e){return ht(this,null,(function*(){return new Promise(((t,i)=>{QT.instance().query(e,(e=>{e&&e.length>0&&t(e[0].dxf),t(void 0)}),(()=>i()))}))}))}buildContainHierarchyTree(e,t,i){var r;let n=new Map,s=i.length;for(let e=0;e{0===e.children.length?r.push(e.index):n.set(e.index,e.children.map((e=>e.index)))}));let s=e=>{try{let t=new Dp(e);t.hasAttribute("uv")&&t.deleteAttribute("uv"),t.hasAttribute("normal")&&t.deleteAttribute("normal"),i.push(t)}catch(t){ne.warn(`[DxfLoader] triangulate shape error: ${e.getPoints().map((e=>e.toArray())).toString()}`)}};r.forEach((t=>{let i=e[t];if(0===i.length)return;let r=new Qa(i);s(r)}));let a=e=>e.map((e=>e.toArray()));for(let t of n){let i=new Qa(e[t[0]]),r={regions:[],inverted:!1},n=this.findIntersectHole(e,t[1]);n.forEach((t=>{let n={regions:[],inverted:!1};try{t.forEach(((t,s)=>{if(Xl.epsilon(sr.getVector2RelativeEps(e[t][0]),1e-6),0===s)n=Xl.segments({regions:[a(e[t])],inverted:!1});else{let s=Xl.segments({regions:[a(e[t])],inverted:!1}),o=Xl.combine(n,s);r=Xl.polygon(Xl.selectUnion(o)),r.regions.length>0?r.regions.forEach((e=>{if(0===e.length)return;let t=e.map((e=>new le(e[0],e[1])));i.holes.push(new ku(t))})):ne.warn("[DxfLoader] mergedHoles.regions is empty")}}))}catch(e){ne.warn(`[DxfLoader] polybooljs has error: ${e}, epsilon is ${Xl.epsilon()}`)}}));let o=n.flat(2);for(let r=0;r{t.children.forEach((t=>{this.buildHatchGeometry(e,t,i)}))}))}findIntersectHole(e,t){let i=t.length,r=[];for(let n=0;n{e.forEach((e=>{t.add(e),i++}))})),t.divideScalar(i);let r=!1;if(this.enableRTC&&kt.shouldRebasePositionOnRTC(t)){r=!0;for(let i=0;i{i.entries[e]&&"ACAD_SORTENTS"===i.entries[e]&&t.add(e)}))}if(0===t.size)return;let r=e.objects.SORTENTSTABLE;if(r)for(let e=0;eMath.abs(e-t)<1e-5,n=(e,t)=>r(e.angle,t.angle)&&r(e.delta.x,t.delta.x)&&r(e.delta.y,t.delta.y)&&r(e.origin.x,t.origin.x)&&r(e.origin.y,t.origin.y)&&((e,t)=>{if(e.length!==t.length)return!1;for(let i=0;ir.color===t&&r.patternAngle===e.patternAngle&&((e,t)=>{if(e.length!==t.length)return!1;for(let i=0;i{t[e.handle]=e.layoutHandle}))}let i=this.blockRecordsCache[t.ownerHandle];if(i){let t=e.objects.LAYOUT.find((e=>e.handle===i));if(t)return t}if(!this.entitiesCache){this.entitiesCache={};let t=this.entitiesCache;Object.values(e.entities).forEach((e=>{t[e.handle]=e}))}let r=this.entitiesCache[t.ownerHandle];return r?this.getLayout(e,r):(ne.warn("[DxfLoader] Failed to find layout name for entity:",t),e.objects.LAYOUT.find((e=>e.layoutName===Ri.MODEL_LAYOUT_NAME)))}getLayerVisible(e,t){var i,r,n;let s=null==(r=null==(i=e.tables)?void 0:i.layer)?void 0:r.layers;return s&&(null==(n=s[t])?void 0:n.visible)}getLayerFrozen(e,t){var i,r,n;let s=null==(r=null==(i=e.tables)?void 0:i.layer)?void 0:r.layers;return s&&(null==(n=s[t.layer])?void 0:n.frozen)}updateMaterialUniforms(e){e instanceof Yt&&(e.uniforms.u_cameraZoom&&(e.uniforms.u_cameraZoom=Ri.cameraZoomUniform),e.uniforms.u_viewportScale&&(e.uniforms.u_viewportScale=Ri.viewportScaleUniform))}cloneMaterialsForSpatialFilter(e){let t=new Map,i=e=>{let i;return Array.isArray(e)?(i=[],e.forEach((e=>{if(t.has(e.id))i.push(t.get(e.id));else{let r=e.clone();this.updateMaterialUniforms(r),t.set(e.id,r),i.push(r)}}))):e&&(t.has(e.id)?i=t.get(e.id):(i=e.clone(),this.updateMaterialUniforms(i),t.set(e.id,i))),i};e.traverse((e=>{e.material&&(e.material=i(e.material))}))}getLineTypeScales(){let e={ltScale:1,celtScale:1};return this.header&&(e.ltScale=this.header.$LTSCALE||1,e.celtScale=this.header.$CELTSCALE||1),e}static getDxfUnits(e){switch(e||0){case 0:return"Unitless";case 1:return"Inches";case 2:return"Feet";case 4:return"Millimeters";case 5:return"Centimeters";case 6:return"Meters";default:ne.warn(`[DxfLoader] Unsupported $INSUNITS '${e}'`)}return"Unitless"}static computeLineDistance(e){let t=!0===e.isLineSegments,i=e.geometry,r=e.matrixWorld;if(i.index&&(ne.debug(`[DxfLoader] Line with id '${e.id}' contains index buffer, going to convert it to non-indexed.`),i=kt.convertGeometryWithIndexedToNonIndexed(i)),null===i.index){let e=i.attributes.position;if(!e||0===e.count)return;let n=[];if(t)for(let t=0,i=e.count;t{let t=e;t.isLine&&t.material instanceof Yt&&Ri.computeLineDistance(t)})),ne.debug(`[DxfLoader] Computed line distances in ${(Date.now()-t)/1e3}s`)}static merge(e){let t={};e.objects.LAYOUT.forEach((e=>{var i;let r=e;t[r.layoutName]=r,null==(i=r.directAssociatedLeafObjectSet)||i.clear()}));let i=Date.now(),r={},n={},s=0,a=0,o=()=>{let e=Date.now();for(let e in r){let t=r[e];Ri.removeEmptyObjectsFromRemovingMarkedObjects(t.children,t.object),t.children=[]}s=0,a+=Date.now()-e};for(let i in e.layersAndThreejsObjects){let l=e.layersAndThreejsObjects[i];if(l.length<=1)continue;let h=Date.now(),u={};for(let e of l){let t,i=e;for(;i;){if(i.userData.isLayoutLevelObject){t=i;break}i=i.parent}if(!t)continue;let r=t.name;u[r]||(u[r]={object:t,children:[]}),u[r].children.push(e)}let c=[];for(let e in u){let i;if(e!==Ri.MODEL_LAYOUT_NAME){let r=t[e];r.directAssociatedLeafObjectSet||(r.directAssociatedLeafObjectSet=new Set),i=r.directAssociatedLeafObjectSet}let l=u[e],h=qi.deepMerge(l.children,l.object,!1,!1,!0),p=h.added,d=h.removed;r[e]||(r[e]={object:l.object,children:[]}),n[e]||(n[e]={object:l.object,children:[]});let f=d.length>15e3;if(f){let e=Date.now();Ri.removeEmptyObjectsFromRemovingMarkedObjects(d,l.object),a+=Date.now()-e}else s+=d.length;if(d.length===l.children.length)f||d.forEach((t=>{r[e].children.push(t)}));else{let t=d;d.length>=100&&(t=new Set(d));let n=e=>Array.isArray(t)?t.indexOf(e)>=0:t.has(e);for(let t=0;t15e3&&o()}e.layersAndThreejsObjects[i]=c,ne.debug(`[DxfLoader] Merged layer '${i}' in ${(Date.now()-h)/1e3}s`)}s>0&&o();for(let t in n){let i=n[t];e.threejsObject.children.find((e=>e.name===t))||e.threejsObject.add(i.object),i.children.forEach((e=>{i.object.add(e),e.updateWorldMatrix(!1,!1)})),i.children=[]}ne.debug(`[DxfLoader] MergeUtils.deepMerge costed ${qi.mergeInfo.elapsedTime/1e3}s`),ne.debug(`[DxfLoader] The remove operation of deep merge costed ${a/1e3}s`),ne.debug(`[DxfLoader] Deep merge totally costed ${(Date.now()-i)/1e3}s`);let l=qi.mergeInfo;ne.debug(`[DxfLoader] Totally merged ${l.removedObjects} objects to ${l.mergedMeshes} meshes, ${l.mergedLines} lines, ${l.mergedPoints} points, ${l.mergedUnknownTypeObjects?l.mergedUnknownTypeObjects+" unknown type,":""} `)}static statLayoutAndLayerObjects(e){let t=new WeakSet,i=0;for(let r in e.layersAndThreejsObjects)e.layersAndThreejsObjects[r].forEach((e=>{e.geometry&&(i++,t.has(e)?console.warn(e):t.add(e))}));let r=new WeakSet,n=0;if(e.threejsObject.traverse((e=>{e.geometry&&(n++,r.has(e)?console.warn(e):r.add(e))})),i!=n)for(let t in e.layersAndThreejsObjects)e.layersAndThreejsObjects[t].forEach((e=>{e.geometry&&(r.has(e)||console.warn(e))}));ne.info(`[DxfLoader] The count of layer objects is ${i},The count of layout objects is ${n} `)}static removeEmptyObjectsFromRemovingMarkedObjects(e,t){if(0===e.length)return;let i=e=>{let r=[];for(let i of e){i.userData.validCount=0;let e=i.parent;e&&e!==t&&(void 0===e.userData.validCount&&(e.userData.validCount=e.children.length),0==--e.userData.validCount&&r.push(e))}r.length>0&&i(r)};i(e),this.removeEmptyObjectsFromMark(t)}static removeEmptyObjectsFromMark(e){if(0===e.userData.validCount||ei.isEmptyObject(e))return e.removeFromParent(),!0;for(let t=0;t>3]&128>>t)>>7-t}setBit(e,t){var i=e>>3,r=this.u8[i],n=7&e;this.u8[i]=t?r|128>>n:r&~(128>>n)}getInt12(e){var t=e/8|0,i=this.u8[t],r=this.u8[t+1],n=this.u8[t+2],s=e%8,a=8-s,o=Math.min(12-a,8);return(((i&=~(255<>12-s)-2048}setInt12(e,t){var i=e/8|0,r=e%8,n=(t+=2048)<<12-r,s=(16711680&n)>>16,a=(65280&n)>>8,o=255&n,l=8-r,h=Math.min(12-l,8),u=Math.max(12-l-h,0),c=255<>8-(2-n))))<<8)+(r&=255<<8-Math.max(6-s,0))>>10-n)-32}setInt6(e,t){var i=e/8|0,r=e%8,n=(t+=32)<<10-r,s=(65280&n)>>8,a=255&n,o=8-r,l=Math.max(6-o,0),h=(255<>8-(2-r));this.u8[i]=(this.u8[i]&h)+s;var u=~(255<<8-l);this.u8[i+1]=(this.u8[i+1]&u)+a}test(){var e,t,i=new ArrayBuffer(3),r=new R0(i);for(t=0;t<12;t++)for(e=-2048;e<2048;e++)if(r.setInt12(t,e),r.getInt12(t)!=e){console.log("12-bit prob at",t,e),console.log("expected",e,"got",r.getInt12(t));break}for(t=0;t<18;t++)for(e=-32;e<32;e++)if(r.setInt6(t,e),r.getInt6(t)!=e){console.log("6-bit prob at",t,e),console.log("expected",e,"got",r.getInt6(t));break}return r}},GMe=(e=>(e[e.NULL=0]="NULL",e[e.POINT=1]="POINT",e[e.POLYLINE=3]="POLYLINE",e[e.POLYGON=5]="POLYGON",e))(GMe||{}),vO=class{parse(e){var t={},i=new DataView(e),r=0;if(t.fileCode=i.getInt32(r,!1),9994!=t.fileCode)throw new Error("Unknown file code: "+t.fileCode);for(r+=24,t.wordLength=i.getInt32(r,!1),t.byteLength=2*t.wordLength,r+=4,t.version=i.getInt32(r,!0),r+=4,t.shapeType=i.getInt32(r,!0),r+=4,t.minX=i.getFloat64(r,!0),t.minY=i.getFloat64(r+8,!0),t.maxX=i.getFloat64(r+16,!0),t.maxY=i.getFloat64(r+24,!0),t.minZ=i.getFloat64(r+32,!0),t.maxZ=i.getFloat64(r+40,!0),t.minM=i.getFloat64(r+48,!0),t.maxM=i.getFloat64(r+56,!0),r+=64,t.records=[];rn.push(...e)));let s=new lt;s.setFromPoints(e),s.setIndex(n),t.push(s);let a=new lt;e.length>2&&!e[0].equals(e[e.length-1])&&e.push(e[0]),a.setFromPoints(e),i.push(a)}else{let t=new lt;t.setFromPoints(e),i.push(t)}}}var p=new cr;for(r=0;r1023||Math.abs(s-e[o+1])>1023?(i.push(r),a+=1,r=[],n=e[o],s=e[o+1],r.push(n,s),a+=4,o++):(r.push((e[o]-n)/8,(e[o+1]-s)/8),n+=8*((e[o]-n)/8|0),s+=8*((e[o+1]-s)/8|0),a+=2,o++):(i.push(r),t.push(i),i=[],r=[],a+=3);return this.storeDeltas(a,t)}deltaEncode6(e){var t=[],i=[],r=[],n=0,s=0,a=0,o=0;for(a=0;a31||Math.abs(s-e[a+1])>31?(i.push(r),o+=1,r=[],n=e[a],s=e[a+1],r.push(n,s),o+=4,a++):(r.push(e[a]-n,e[a+1]-s),n+=e[a]-n,s+=e[a+1]-s,o+=2,a++):(i.push(r),t.push(i),i=[],r=[],o+=3);return this.storeDeltas6(o,t)}storeDeltas(e,t){for(var i=new ArrayBuffer(e),r=new DataView(i),n=0,s=0;s{this.updateProgress(i,50);let e=(new vO).parse(n.response),r=(new yO).createModel(e);this.updateProgress(i,99),t(r)},n.onerror=r,n.open("GET",e),n.send(null)}))}updateProgress(e,t){if(e){e(new ProgressEvent("progress",{lengthComputable:!0,loaded:t,total:100}))}}},M2t="three/js/libs/draco/gltf/",$c=class{constructor(e){this.manager=e}loadLocalModel(e,t,i){return ht(this,null,(function*(){let r=t.toLowerCase();return r.endsWith("fbx")?this.loadFbx(e,i):r.endsWith("obj")?this.loadObj(e,i):r.endsWith("stl")?this.loadStl(e,i):r.endsWith("ifc")?this.loadIfc(e,i):r.endsWith("shp")?this.loadShp(e,i):r.endsWith("dae")?this.loadDae(e,i):r.endsWith("dxf")?this.loadDxf(e,i):r.endsWith("jpg")||r.endsWith("jpeg")||r.endsWith("png")?this.loadImage(e,i):this.loadGltf(e,i)}))}loadModel(e,t,i){return ht(this,null,(function*(){let r=e;if(!r)return Promise.resolve();let n=(null==t?void 0:t.toLowerCase())||"";if(!n){let e=r.split("?")[0].toLowerCase();if(e){let t=e.lastIndexOf(".");-1!==t&&(n=e.slice(t+1))}}return n.endsWith("fbx")?this.loadFbx(r,i):n.endsWith("obj")?this.loadObj(r,i):n.endsWith("stl")?this.loadStl(r,i):n.endsWith("ifc")?this.loadIfc(r,i):n.endsWith("shp")?this.loadShp(r,i):n.endsWith("dae")?this.loadDae(r,i):n.endsWith("dxf")?this.loadDxf(r,i):n.endsWith("jpg")||n.endsWith("jpeg")||n.endsWith("png")?this.loadImage(r,i):this.loadGltf(r,i)}))}loadGltf(e,t){return ht(this,null,(function*(){let i=this.getGltfLoader();-1!==e.indexOf("#")&&console.warn(`[LoadingHelper] '#' is not allowed in filename ${e}`),e=e.replace(/#/g,encodeURIComponent("#"));let r=yield i.loadAsync(e,t);return Promise.resolve(r.scene)}))}parseGltf(e,t,i,r){return this.getGltfLoader().parse(e,t,(e=>i(e.scene)),r)}loadFbx(e,t){return ht(this,null,(function*(){let i=yield new lA(this.manager).loadAsync(e,t);return Promise.resolve(i)}))}loadObj(e,t){return ht(this,null,(function*(){let i=new VA(this.manager),r=new kA(this.manager),n=e.replace(".obj",".mtl"),s=yield r.loadAsync(n,t);s.preload(),i.setMaterials(s);let a=yield i.loadAsync(e,t);return Promise.resolve(a)}))}loadStl(e,t){return ht(this,null,(function*(){let i=yield new WA(this.manager).loadAsync(e,t);return Promise.resolve(new rt(i))}))}loadIfc(e,t){return ht(this,null,(function*(){let i=new BA(this.manager),r=i.ifcManager;r&&"function"==typeof r.setWasmPath&&r.setWasmPath("../three/js/libs/ifc/");let n=yield i.loadAsync(e,t);return Promise.resolve(n.mesh)}))}loadShp(e,t){return ht(this,null,(function*(){let i=new TO;return new Promise(((r,n)=>{i.load(e,(e=>{r(e)}),t,(e=>{n(e)}))}))}))}loadDae(e,t){return ht(this,null,(function*(){let i=yield new nA(this.manager).loadAsync(e,t);return Promise.resolve(i.scene)}))}loadDxf(e,t){return ht(this,null,(function*(){this.font||console.warn("[LoadingHelper] Should set font first!");let i=new Er;try{let r=yield i.loadAsync(e,t);return Promise.resolve(r.threejsObject)}catch(e){let t=new ErrorEvent("");return Promise.reject(t)}}))}loadPly(e,t){return ht(this,null,(function*(){let i=yield new jA(this.manager).loadAsync(e,t);return Promise.resolve(new rt(i))}))}loadImage(e,t){return ht(this,null,(function*(){let i=yield new bs(this.manager).loadAsync(e,t);if(!i)return Promise.reject("Failed to load image!");let r=i.image,n=r&&r.height||10,s=r&&r.width||10;n*=10/s,s=10;let a=new or({map:i,side:gi,transparent:!0}),o=new ts(s,n),l=new rt(o,a);return Promise.resolve(l)}))}loadDxfDataAsync(e,t,i,r,n,s){return ht(this,null,(function*(){var a;this.font||console.warn("[LoadingHelper] Should set font first!");let o=new Er(n,s);return o.setFont(this.font),o.manager.onLoad=()=>{r&&r()},this.font&&this.font.getFontData&&(yield null==(a=this.font)?void 0:a.getFontData()),o.load(e,t,i)}))}setFont(e){this.font=e}getGltfLoader(){if(!this.gltfLoader){this.gltfLoader=new $u(this.manager);let e=new sA(this.manager);e.setDecoderPath(M2t),this.gltfLoader.setDRACOLoader(e)}return this.gltfLoader}},tE=class{constructor(e){this.running=!1,this.workers=[];let t=1;e?t=e:window.navigator&&(t=Math.max(t,window.navigator.hardwareConcurrency-1));for(let e=0;e{let r=this.workers.length,n=e.length,s=[],a=Math.floor(n/r),o=n%r,l=0,h=0;for(let i=0;i=h)break;ne.debug("startIndex: "+l+" endIndex: "+h),s.push(r.generate(e.slice(l,h),t))}Promise.allSettled(s).then((()=>{this.running=!1,i()}))}));ne.warn("[BVHHelper] Worker has been disposed.")}}))}dispose(){for(let e=0;e{e.traverse((e=>{let r=e;if(r.isMesh&&r.geometry&&qi.isMergedMesh(r)&&!(r instanceof rn)){if(i.has(r.geometry.id))return;r.geometry.index&&t.saveOriginalIndex&&(r.geometry.userData.originalIndex=r.geometry.index.array.slice()),r.geometry.boundsTree=new Pc(r.geometry,t),i.add(r.geometry.id)}}))}))}static createMeshBvhAsync(e,t={}){let i=new Set,r=[];e.forEach((e=>{e.traverse((e=>{let t=e;if(t.isMesh&&t.geometry&&qi.isMergedMesh(t)&&!(t instanceof rn)){if(i.has(t.geometry.id))return;r.push(t.geometry),i.add(t.geometry.id)}}))}));let n=new tE;n.generate(r,t).then((()=>{n.dispose()}))}},D2t=(e=>(e[e.NONE=-1]="NONE",e[e.ROTATE=0]="ROTATE",e[e.DOLLY=1]="DOLLY",e[e.PAN=2]="PAN",e[e.TOUCH_ROTATE=3]="TOUCH_ROTATE",e[e.TOUCH_DOLLY=4]="TOUCH_DOLLY",e))(D2t||{}),C2t=(e=>(e.LEFT="ArrowLeft",e.UP="ArrowUp",e.RIGHT="ArrowRight",e.BOTTOM="ArrowDown",e))(C2t||{});function rE(e){return{type:e}}var hh={movable:!1,startDistBetweenFingers:0,scale:1},iE=2*Math.PI,VMe=1e-6,EO=class extends Bo{constructor(e,t,i=!1){super(),this.enabled=!0,this.target=new A,this.enableZoom=!1,this.enablePan=!1,this.enableRotate=!0,this.state=-1,this.rotateSpeed=1,this.zoomSpeed=1,this.panSpeed=1,this.scale=1,this.minZoom=0,this.maxZoom=1/0,this.screenSpacePanning=!0,this.autoRotate=!0,this.autoRotateSpeed=2,this.enableDamping=!1,this.dampingFactor=.05,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minDistance=0,this.maxDistance=1/0,this.keyPanSpeed=7,this.minFov=50,this.maxFov=95,this.zoomChanged=!1,this.panOffset=new A,this.pointerPositions={},this.rotateStart=new le,this.rotateEnd=new le,this.rotateDelta=new le,this.dollyStart=new le,this.dollyEnd=new le,this.dollyDelta=new le,this.panStart=new le,this.panEnd=new le,this.panDelta=new le,this.pointers=[],this.spherical=new ff,this.sphericalDelta=new ff,this.update=function(e){let t=new A,i=new A,r=new Hr;return function(){let n=e.quat,s=n.clone().invert(),a=e.object.position;t.copy(a).sub(e.target),t.applyQuaternion(n),e.spherical.setFromVector3(t),e.autoRotate&&-1===e.state&&(e.isVRMode?e.sphericalDelta.theta+=iE/60/60*e.autoRotateSpeed:e.sphericalDelta.theta-=iE/60/60*e.autoRotateSpeed),e.enableDamping?(e.spherical.theta+=e.sphericalDelta.theta*e.dampingFactor,e.spherical.phi+=e.sphericalDelta.phi*e.dampingFactor):(e.spherical.theta+=e.sphericalDelta.theta,e.spherical.phi+=e.sphericalDelta.phi);let o=e.minAzimuthAngle,l=e.maxAzimuthAngle;return isFinite(o)&&isFinite(l)&&(o<-Math.PI?o+=iE:o>Math.PI&&(o-=iE),l<-Math.PI?l+=iE:l>Math.PI&&(l-=iE),e.spherical.theta=o<=l?Math.max(o,Math.min(l,e.spherical.theta)):e.spherical.theta>(o+l)/2?Math.max(o,e.spherical.theta):Math.min(l,e.spherical.theta)),e.spherical.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,e.spherical.phi)),e.spherical.makeSafe(),e.spherical.radius*=e.scale,e.spherical.radius=Math.max(e.minDistance,Math.min(e.maxDistance,e.spherical.radius)),!0===e.enableDamping?e.target.addScaledVector(e.panOffset,e.dampingFactor):e.target.add(e.panOffset),t.setFromSpherical(e.spherical),t.applyQuaternion(s),a.copy(e.target).add(t),e.object.lookAt(e.target),!0===e.enableDamping?(e.sphericalDelta.theta*=1-e.dampingFactor,e.sphericalDelta.phi*=1-e.dampingFactor,e.panOffset.multiplyScalar(1-e.dampingFactor)):(e.sphericalDelta.set(0,0,0),e.panOffset.set(0,0,0)),e.scale=1,!!(e.zoomChanged||i.distanceToSquared(e.object.position)>VMe||8*(1-r.dot(e.object.quaternion))>VMe)&&(e.dispatchEvent(rE("change")),i.copy(e.object.position),r.copy(e.object.quaternion),e.zoomChanged=!1,!0)}}(this),this.onContextMenu=function(e){return t=>{!1!==e.enabled&&t.preventDefault()}}(this),this.onPointerDown=function(e){return t=>{!1!==e.enabled&&(0===e.pointers.length&&(e.domElement.setPointerCapture(t.pointerId),e.domElement.addEventListener("pointermove",e.onPointerMove),e.domElement.addEventListener("pointerup",e.onPointerUp)),e.addPointer(t),"touch"===t.pointerType?e.onTouchStart(t):e.onMouseDown(t))}}(this),this.onPointerMove=function(e){return t=>{!1!==e.enabled&&("touch"===t.pointerType?e.onTouchMove(t):e.onMouseMove(t))}}(this),this.onPointerUp=function(e){return t=>{e.removePointer(t),0===e.pointers.length&&(e.domElement.releasePointerCapture(t.pointerId),e.domElement.removeEventListener("pointermove",e.onPointerMove),e.domElement.removeEventListener("pointerup",e.onPointerUp)),"touch"===t.pointerType&&e.handlerTouchEnd(t),e.dispatchEvent(rE("end")),e.state=-1}}(this),this.onPointerCancel=function(e){return t=>{e.removePointer(t),e.handlerTouchEnd(t)}}(this),this.onMouseWheel=function(e){return t=>{!1===e.enabled||!1===e.enableZoom||-1!==e.state||(t.preventDefault(),t.stopPropagation(),e.dispatchEvent(rE("start")),e.handleMouseWheel(t),e.dispatchEvent(rE("end")))}}(this),this.pan=function(e){let t=new A;return function(i,r){let n=e.domElement;if(e.object instanceof Xr){let s=e.object.position;t.copy(s).sub(e.target);let a=t.length();a*=Math.tan(e.object.fov/2*Math.PI/180),e.panLeft(2*i*a/n.clientHeight,e.object.matrix),e.panUp(2*r*a/n.clientHeight,e.object.matrix)}else console.warn("WARNING: VRControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1}}(this),this.panLeft=function(e){let t=new A;return function(i,r){t.setFromMatrixColumn(r,0),t.multiplyScalar(-i),e.panOffset.add(t)}}(this),this.panUp=function(e){let t=new A;return function(i,r){!0===e.screenSpacePanning?t.setFromMatrixColumn(r,1):(t.setFromMatrixColumn(r,0),t.crossVectors(e.object.up,t)),t.multiplyScalar(i),e.panOffset.add(t)}}(this),this.onKeyDown=e=>{!1===this.enabled||!1===this.enablePan||this.handleKeyDown(e)},this.object=e,this.domElement=t,this.isVRMode=i,this.quat=(new Hr).setFromUnitVectors(this.object.up,new A(0,1,0)),this.domElement&&this.domElement.style&&(this.domElement.style.touchAction="none"),this.domElement.addEventListener("contextmenu",this.onContextMenu),this.domElement.addEventListener("pointerdown",this.onPointerDown),this.domElement.addEventListener("pointercancel",this.onPointerCancel),this.domElement.addEventListener("wheel",this.onMouseWheel,{passive:!1}),this.update()}dispose(){this.domElement.removeEventListener("contextmenu",this.onContextMenu),this.domElement.removeEventListener("pointerdown",this.onPointerDown),this.domElement.removeEventListener("pointercancel",this.onPointerCancel),this.domElement.removeEventListener("wheel",this.onMouseWheel),this.domElement.removeEventListener("pointermove",this.onPointerMove),this.domElement.removeEventListener("pointerup",this.onPointerUp),this.domElementKeyEvents&&this.domElementKeyEvents.removeEventListener("keydown",this.onKeyDown)}addPointer(e){this.pointers.push(e)}removePointer(e){delete this.pointerPositions[e.pointerId];for(let t=0;t0&&this.dollyOut(t),this.update()}handleMouseDownRotate(e){this.rotateStart.set(e.clientX,e.clientY)}handleMouseDownDolly(e){this.dollyStart.set(e.clientX,e.clientY)}handleMouseDownPan(e){this.panStart.set(e.clientX,e.clientY)}handleTouchStartRotate(){if(1===this.pointers.length)this.rotateStart.set(this.pointers[0].pageX,this.pointers[0].pageY);else{let e=.5*(this.pointers[0].pageX+this.pointers[1].pageX),t=.5*(this.pointers[0].pageY+this.pointers[1].pageY);this.rotateStart.set(e,t)}}handleTouchStartDolly(e){if(e.length<2)return;let t=e[0],i=e[1];hh.startDistBetweenFingers=this.getDist([t.pageX,t.pageY],[i.pageX,i.pageY]),hh.movable=!0,hh.scale=1}updateRotate(){let e=this.isVRMode,t=this.sphericalDelta;this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart).multiplyScalar(this.rotateSpeed);let i=this.domElement;e?(t.theta+=2*Math.PI*this.rotateDelta.x/i.clientHeight,t.phi+=2*Math.PI*this.rotateDelta.y/i.clientHeight):(t.theta-=2*Math.PI*this.rotateDelta.x/i.clientHeight,t.phi-=2*Math.PI*this.rotateDelta.y/i.clientHeight),this.rotateStart.copy(this.rotateEnd)}handleMouseMoveRotate(e){this.rotateEnd.set(e.clientX,e.clientY),this.updateRotate()}dollyOut(e){this.object instanceof Xr?this.scale/=e:(console.warn("WARNING: VRControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}dollyIn(e){this.object instanceof Xr?this.scale*=e:(console.warn("WARNING: VRControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}handleMouseMoveDolly(e){this.dollyEnd.set(e.clientX,e.clientY),this.dollyDelta.subVectors(this.dollyEnd,this.dollyStart);let t=Math.pow(.95,this.zoomSpeed);this.dollyDelta.y>0?this.dollyOut(t):this.dollyIn(t),this.dollyStart.copy(this.dollyEnd)}handleMouseMovePan(e){this.panEnd.set(e.clientX,e.clientY),this.panDelta.subVectors(this.panEnd,this.panStart).multiplyScalar(this.panSpeed),this.pan(this.panDelta.x,this.panDelta.y),this.panStart.copy(this.panEnd)}getSecondPointerPosition(e){let t=e.pointerId===this.pointers[0].pointerId?this.pointers[1]:this.pointers[0];return this.pointerPositions[t.pointerId]}handleTouchMoveRotate(e){if(1==this.pointers.length)this.rotateEnd.set(e.pageX,e.pageY);else{let t=this.getSecondPointerPosition(e),i=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this.rotateEnd.set(i,r)}this.updateRotate()}updateFov(e){var t;let i=this.object;if(!(i&&i instanceof Xr))return void console.warn("WARNING: VRControls.js encountered an unknown camera type - updateFov disabled.");let r=this.minFov,n=this.maxFov,s=e=>{let t=i.fov+e;t=Math.min(t,n),t=Math.max(t,r),i.fov!==t&&(i.fov=t,i.updateProjectionMatrix(),this.dispatchEvent({type:"change"}))},a=e/20;for(let e=0;e<20;++e)setTimeout((()=>s(a)),5*e);this.autoRotate&&(null==(t=this.controlsHelper)||t.delayAutoRotate())}handleTouchMoveDolly(e){if(!hh.movable||this.pointers.length<2)return;let t=this.getSecondPointerPosition(e),i=[e.pageX,e.pageY],r=[t.x,t.y],n=hh.startDistBetweenFingers,s=this.getDist(i,r);if(!n||!s||Math.abs(n-s)<10)return;let a=s/n;console.log(a);a=Math.min(a,3),a=Math.max(a,1/3);let o=a-hh.scale;if(Math.abs(o)<.05)return;let l=0;l=o>0?10*-o:10*(hh.scale/a-1),this.updateFov(l),hh.scale=a}handleKeyDown(e){let t=!1;switch(e.code){case"ArrowUp":this.pan(0,this.keyPanSpeed),t=!0;break;case"ArrowDown":this.pan(0,-this.keyPanSpeed),t=!0;break;case"ArrowLeft":this.pan(this.keyPanSpeed,0),t=!0;break;case"ArrowRight":this.pan(-this.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),this.update())}listenToKeyEvents(e){e.addEventListener("keydown",this.onKeyDown),this.domElementKeyEvents=e}},M0=class extends Ks{constructor(e){super(),this.enable=!0,this.mouseDownPositionX=0,this.mouseDownPositionY=0,this.downClickTime=0,this.upClickTime=0,this.handleClick=e=>{if(!this.enable)return;this.stop(e);let t=this.getBaseEvent(e);this.dispatchEvent("click",t)},this.handlePointerDown=e=>{if(!this.enable)return;this.stop(e);let t,i=this.getBaseEvent(e);this.mouseDownPositionX=i.x,this.mouseDownPositionY=i.y,this.downClickTime=i.timestamp,0===i.button&&this.downClickTime-this.upClickTime<300&&(t&&clearTimeout(t),t=setTimeout((()=>{this.dispatchEvent("dblclick",i)}),300)),this.dispatchEvent("pointerdown",i),"touch"===e.pointerType?this.dispatchEvent("touchstart",i):this.dispatchEvent("mousedown",i)},this.handlePointerMove=e=>{if(!this.enable)return;this.stop(e);let t=this.getBaseEvent(e);(Math.abs(t.x-this.mouseDownPositionX)>5||Math.abs(t.y-this.mouseDownPositionY)>5)&&(this.dispatchEvent("pointermove",t),"touch"===e.pointerType?this.dispatchEvent("touchmove",t):this.dispatchEvent("mousemove",t))},this.handlePointerUp=e=>{if(!this.enable)return;this.stop(e);let t=this.getBaseEvent(e);this.upClickTime=t.timestamp,this.dispatchEvent("pointerup",t),"touch"===e.pointerType?this.dispatchEvent("touchend",t):this.dispatchEvent("mouseup",t),this.mouseDownPositionX=-1,this.mouseDownPositionY=-1},this.handlePointerCancel=e=>{this.enable&&(this.stop(e),this.dispatchEvent("pointercancel",this.getBaseEvent(e)))},this.handleMouseWheel=e=>{this.enable&&(this.stop(e),this.dispatchEvent("wheel",this.getBaseEvent(e)))},this.handleContextMenu=e=>{if(this.enable)return this.stop(e),this.dispatchEvent("contextmenu",this.getBaseEvent(e)),!1},this.handlePointerEnter=e=>{this.enable&&(this.stop(e),this.dispatchEvent("pointerenter",this.getBaseEvent(e)))},this.handlePointerLeave=e=>{this.enable&&(this.stop(e),this.dispatchEvent("pointerleave",this.getBaseEvent(e)))},this.handleResize=e=>{this.enable&&(this.stop(e),this.dispatchEvent("resize",this.getBaseEvent(e)))},this.handleKeydown=e=>{this.enable&&this.dispatchEvent("keydown",this.getBaseEvent(e))},this.handleKeyup=e=>{this.enable&&this.dispatchEvent("keyup",this.getBaseEvent(e))},this.style={},this.element=e,this.bindEvents()}setEnable(e){this.enable=e}setCursor(e){this.element.style&&(this.element.style.cursor=e||"default")}bindEvents(){this.element.style.touchAction="none",this.element.style.userSelect="none",this.element.style.webkitUserSelect="none",this.element.addEventListener("click",this.handleClick),this.element.addEventListener("pointerdown",this.handlePointerDown),this.element.addEventListener("pointermove",this.handlePointerMove),this.element.addEventListener("pointerup",this.handlePointerUp),this.element.addEventListener("pointercancel",this.handlePointerCancel),this.element.addEventListener("pointerenter",this.handlePointerEnter),this.element.addEventListener("pointerleave",this.handlePointerLeave),this.element.addEventListener("contextmenu",this.handleContextMenu),this.element.addEventListener("wheel",this.handleMouseWheel),window.addEventListener("resize",this.handleResize),window.addEventListener("keydown",this.handleKeydown),window.addEventListener("keyup",this.handleKeyup)}unBindEvents(){this.element.removeEventListener("pointerdown",this.handlePointerDown),this.element.removeEventListener("pointermove",this.handlePointerMove),this.element.removeEventListener("pointerup",this.handlePointerUp),this.element.removeEventListener("pointerenter",this.handlePointerEnter),this.element.removeEventListener("pointerleave",this.handlePointerLeave),this.element.removeEventListener("contextmenu",this.handleContextMenu),this.element.removeEventListener("wheel",this.handleMouseWheel),window.removeEventListener("resize",this.handleResize),window.removeEventListener("keydown",this.handleKeydown),window.removeEventListener("keyup",this.handleKeyup),this.element.style.touchAction="",this.element.style.userSelect="",this.element.style.webkitUserSelect=""}getBaseEvent(e){let t={x:0,y:0,pageX:0,pageY:0,clientX:0,clientY:0,deltaX:0,deltaY:0,movementX:0,movementY:0,deltaMode:0,pointerId:0,timestamp:0,buttons:0,pointerType:"mouse",altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1};if(t.timestamp=e.timeStamp,bO(e,"clientX"))if(t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.clientX=e.clientX,t.clientY=e.clientY,t.button=e.button,bO(e,"pointerId")){t.pointerType=e.pointerType,t.buttons=e.buttons,t.pageX=e.pageX,t.pageY=e.pageY,t.pointerId=e.pointerId;let i=Ci.getScreenPointByEvent(e,this.element);t.x=i.x,t.y=i.y,t.movementX=e.movementX,t.movementY=e.movementY}else bO(e,"deltaX")&&(t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY);else bO(e,"code")&&(t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.metaKey=e.metaKey,t.code=e.code);return t}stop(e){e.preventDefault(),e.stopPropagation()}getBoundingClientRect(){return this.element.getBoundingClientRect()}};function bO(e,t){return void 0!==e[t]}var Dr={LEFT:1,RIGHT:2,MIDDLE:4},et=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768});function Kf(e){return e.isPerspectiveCamera}function ph(e){return e.isOrthographicCamera}var D0=2*Math.PI,Z8=Math.PI/2,nE=Math.PI/180;function C0(e,t,i){return Math.max(t,Math.min(i,e))}function Sn(e,t=1e-5){return Math.abs(e)0==d>u&&(d=u,i.value=(d-u)/s),d}function Q8(e,t,i,r,n=1/0,s,a){let o=2/(r=Math.max(1e-4,r)),l=o*s,h=1/(1+l+.48*l*l+.235*l*l*l),u=t.x,c=t.y,p=t.z,d=e.x-u,f=e.y-c,m=e.z-p,g=u,y=c,v=p,T=n*r,x=d*d+f*f+m*m;if(x>T*T){let e=Math.sqrt(x);d=d/e*T,f=f/e*T,m=m/e*T}u=e.x-d,c=e.y-f,p=e.z-m;let b=(i.x+o*d)*s,_=(i.y+o*f)*s,E=(i.z+o*m)*s;i.x=(i.x-o*b)*h,i.y=(i.y-o*_)*h,i.z=(i.z-o*E)*h,a.x=u+(d+b)*h,a.y=c+(f+_)*h,a.z=p+(m+E)*h;let w=g-e.x,S=y-e.y,I=v-e.z;return w*(a.x-g)+S*(a.y-y)+I*(a.z-v)>0&&(a.x=g,a.y=y,a.z=v,i.x=(a.x-g)/s,i.y=(a.y-y)/s,i.z=(a.z-v)/s),a}function xO(e,t){t.set(0,0),e.forEach((e=>{t.x+=e.clientX,t.y+=e.clientY})),t.x/=e.length,t.y/=e.length}function IO(e,t){return!!ph(e)&&(console.warn(`${t} is not supported in OrthographicCamera`),!0)}var Cr,zMe,wO,eG,yo,Nr,an,oE,dh,fh,A0,jMe,WMe,Kc,C_,lE,qMe,tG,YMe,rG,iG,RO,_O=class{constructor(){this._listeners={}}addEventListener(e,t){let i=this._listeners;void 0===i[e]&&(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)}hasEventListener(e,t){let i=this._listeners;return void 0!==i[e]&&-1!==i[e].indexOf(t)}removeEventListener(e,t){let i=this._listeners[e];if(void 0!==i){let e=i.indexOf(t);-1!==e&&i.splice(e,1)}}removeAllEventListeners(e){e?Array.isArray(this._listeners[e])&&(this._listeners[e].length=0):this._listeners={}}dispatchEvent(e){let t=this._listeners[e.type];if(void 0!==t){e.target=this;let i=t.slice(0);for(let t=0,r=i.length;t{},this._enabled=!0,this._state=et.NONE,this._viewport=null,this._dollyControlAmount=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=wi.isBrowser?new DOMRect:{x:0,y:0,width:0,height:0,left:0,right:0,top:0,bottom:0},this._activePointers=[],this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new Cr.Vector3,this._focalOffsetVelocity=new Cr.Vector3,this._zoomVelocity={value:0},this._truckInternal=(e,t,i)=>{if(Kf(this._camera)){let r=Nr.copy(this._camera.position).sub(this._target),n=this._camera.getEffectiveFOV()*nE,s=r.length()*Math.tan(.5*n),a=this.truckSpeed*e*s/this._elementRect.height,o=this.truckSpeed*t*s/this._elementRect.height;this.verticalDragToForward?(i?this.setFocalOffset(this._focalOffsetEnd.x+a,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(a,0,!0),this.forward(-o,!0)):i?this.setFocalOffset(this._focalOffsetEnd.x+a,this._focalOffsetEnd.y+o,this._focalOffsetEnd.z,!0):this.truck(a,o,!0)}else if(ph(this._camera)){let r=this._camera,n=e*(r.right-r.left)/r.zoom/this._elementRect.width,s=t*(r.top-r.bottom)/r.zoom/this._elementRect.height;i?this.setFocalOffset(this._focalOffsetEnd.x+n,this._focalOffsetEnd.y+s,this._focalOffsetEnd.z,!0):this.truck(n,s,!0)}},this._rotateInternal=(e,t)=>{let i=D0*this.azimuthRotateSpeed*e/this._elementRect.height,r=D0*this.polarRotateSpeed*t/this._elementRect.height;this.rotate(i,r,!0)},this._dollyInternal=(e,t,i)=>{let r=Math.pow(.95,-e*this.dollySpeed),n=this._sphericalEnd.radius*r,s=this._sphericalEnd.radius,a=s*(e>=0?-1:1);this.dollyTo(n),this.infinityDolly&&(n{let r=Math.pow(.95,e*this.dollySpeed),n=this._zoomEnd;this.zoomTo(this._zoom*r),this.dollyToCursor&&(this._dollyControlAmount+=this._zoomEnd-n,this._dollyControlCoord.set(t,i))},void 0===Cr&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=(new Cr.Quaternion).setFromUnitVectors(this._camera.up,wO),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=et.NONE,this._target=new Cr.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new Cr.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=(new Cr.Spherical).setFromVector3(Nr.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._nearPlaneCorners=[new Cr.Vector3,new Cr.Vector3,new Cr.Vector3,new Cr.Vector3],this._updateNearPlaneCorners(),this._boundary=new Cr.Box3(new Cr.Vector3(-1/0,-1/0,-1/0),new Cr.Vector3(1/0,1/0,1/0)),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlAmount=0,this._dollyControlCoord=new Cr.Vector2,this.mouseButtons={left:et.ROTATE,middle:et.DOLLY,right:et.TRUCK,wheel:Kf(this._camera)?et.DOLLY:ph(this._camera)?et.ZOOM:et.NONE},this.touches={one:et.TOUCH_ROTATE,two:Kf(this._camera)?et.TOUCH_DOLLY_TRUCK:ph(this._camera)?et.TOUCH_ZOOM_TRUCK:et.NONE,three:et.TOUCH_TRUCK};let i=new Cr.Vector2,r=new Cr.Vector2,n=new Cr.Vector2,s=e=>{if(!this._enabled||!this._domElement)return;let t="mouse"!==e.pointerType?null:(e.buttons&Dr.LEFT)===Dr.LEFT?Dr.LEFT:(e.buttons&Dr.MIDDLE)===Dr.MIDDLE?Dr.MIDDLE:(e.buttons&Dr.RIGHT)===Dr.RIGHT?Dr.RIGHT:null;if(null!==t){let e=this._findPointerByMouseButton(t);e&&this._activePointers.splice(this._activePointers.indexOf(e),1)}let i={pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,deltaX:0,deltaY:0,mouseButton:t};this._activePointers.push(i),this._domElement.removeEventListener("pointermove",o),this._domElement.removeEventListener("pointerup",h),this._domElement.addEventListener("pointermove",o),this._domElement.addEventListener("pointerup",h),f(e)},a=e=>{if(!this._enabled||!this._domElement)return;let t=(e.buttons&Dr.LEFT)===Dr.LEFT?Dr.LEFT:(e.buttons&Dr.MIDDLE)===Dr.MIDDLE?Dr.MIDDLE:(e.buttons&Dr.RIGHT)===Dr.RIGHT?Dr.RIGHT:null;if(null!==t){let e=this._findPointerByMouseButton(t);e&&this._activePointers.splice(this._activePointers.indexOf(e),1)}let i={pointerId:0,clientX:e.clientX,clientY:e.clientY,deltaX:0,deltaY:0,mouseButton:(e.buttons&Dr.LEFT)===Dr.LEFT?Dr.LEFT:(e.buttons&Dr.MIDDLE)===Dr.LEFT?Dr.MIDDLE:(e.buttons&Dr.RIGHT)===Dr.LEFT?Dr.RIGHT:null};this._activePointers.push(i),this._domElement.removeEventListener("mousemove",l),this._domElement.removeEventListener("mouseup",u),this._domElement.addEventListener("mousemove",l),this._domElement.addEventListener("mouseup",u),f(e)},o=e=>{let t=e.pointerId,i=this._findPointerById(t);if(i){if(i.clientX=e.clientX,i.clientY=e.clientY,i.deltaX=e.movementX,i.deltaY=e.movementY,"touch"===e.pointerType)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else this._state=0,(e.buttons&Dr.LEFT)===Dr.LEFT&&(this._state=this._state|this.mouseButtons.left),(e.buttons&Dr.MIDDLE)===Dr.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(e.buttons&Dr.RIGHT)===Dr.RIGHT&&(this._state=this._state|this.mouseButtons.right);m()}},l=e=>{let t=this._findPointerById(0);t&&(t.clientX=e.clientX,t.clientY=e.clientY,t.deltaX=e.movementX,t.deltaY=e.movementY,this._state=0,(e.buttons&Dr.LEFT)===Dr.LEFT&&(this._state=this._state|this.mouseButtons.left),(e.buttons&Dr.MIDDLE)===Dr.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(e.buttons&Dr.RIGHT)===Dr.RIGHT&&(this._state=this._state|this.mouseButtons.right),m())},h=e=>{let t=e.pointerId,i=this._findPointerById(t);if(i&&this._activePointers.splice(this._activePointers.indexOf(i),1),"touch"===e.pointerType)switch(this._activePointers.length){case 0:this._state=et.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else this._state=et.NONE;g()},u=()=>{let e=this._findPointerById(0);e&&this._activePointers.splice(this._activePointers.indexOf(e),1),this._state=et.NONE,g()},c=-1,p=e=>{if(!this._enabled||this.mouseButtons.wheel===et.NONE)return;if(this.dollyToCursor||this.mouseButtons.wheel===et.ROTATE||this.mouseButtons.wheel===et.TRUCK){let e=performance.now();c-e<1e3&&this._getClientRect(this._elementRect),c=e}let t=A2t?-1:-3,i=1===e.deltaMode?e.deltaY/t:e.deltaY/(10*t),r=this.dollyToCursor?(e.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,n=this.dollyToCursor?(e.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case et.ROTATE:this._rotateInternal(e.deltaX,e.deltaY),this._isUserControllingRotate=!0;break;case et.TRUCK:this._truckInternal(e.deltaX,e.deltaY,!1),this._isUserControllingTruck=!0;break;case et.OFFSET:this._truckInternal(e.deltaX,e.deltaY,!0),this._isUserControllingOffset=!0;break;case et.DOLLY:this._dollyInternal(-i,r,n),this._isUserControllingDolly=!0;break;case et.ZOOM:this._zoomInternal(-i,r,n),this._isUserControllingZoom=!0}this.dispatchEvent({type:"control"})},d=e=>{if(this._domElement&&this._enabled&&this.mouseButtons.right===Zf.ACTION.NONE){let t=e instanceof PointerEvent?e.pointerId:(MouseEvent,0),i=this._findPointerById(t);return i&&this._activePointers.splice(this._activePointers.indexOf(i),1),this._domElement.removeEventListener("pointermove",o),this._domElement.removeEventListener("pointerup",h),this._domElement.removeEventListener("mousemove",l),void this._domElement.removeEventListener("mouseup",u)}},f=e=>{if(this._enabled){if(xO(this._activePointers,yo),this._getClientRect(this._elementRect),i.copy(yo),r.copy(yo),this._activePointers.length>=2){let e=yo.x-this._activePointers[1].clientX,t=yo.y-this._activePointers[1].clientY,i=Math.sqrt(e*e+t*t);n.set(0,i);let s=.5*(this._activePointers[0].clientX+this._activePointers[1].clientX),a=.5*(this._activePointers[0].clientY+this._activePointers[1].clientY);r.set(s,a)}if("pointerType"in e&&"touch"===e.pointerType)switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three}else this._state=0,(e.buttons&Dr.LEFT)===Dr.LEFT&&(this._state=this._state|this.mouseButtons.left),(e.buttons&Dr.MIDDLE)===Dr.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(e.buttons&Dr.RIGHT)===Dr.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&et.ROTATE)===et.ROTATE||(this._state&et.TOUCH_ROTATE)===et.TOUCH_ROTATE||(this._state&et.TOUCH_DOLLY_ROTATE)===et.TOUCH_DOLLY_ROTATE||(this._state&et.TOUCH_ZOOM_ROTATE)===et.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&et.TRUCK)===et.TRUCK||(this._state&et.TOUCH_TRUCK)===et.TOUCH_TRUCK||(this._state&et.TOUCH_DOLLY_TRUCK)===et.TOUCH_DOLLY_TRUCK||(this._state&et.TOUCH_ZOOM_TRUCK)===et.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&et.DOLLY)===et.DOLLY||(this._state&et.TOUCH_DOLLY)===et.TOUCH_DOLLY||(this._state&et.TOUCH_DOLLY_TRUCK)===et.TOUCH_DOLLY_TRUCK||(this._state&et.TOUCH_DOLLY_OFFSET)===et.TOUCH_DOLLY_OFFSET||(this._state&et.TOUCH_DOLLY_ROTATE)===et.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&et.ZOOM)===et.ZOOM||(this._state&et.TOUCH_ZOOM)===et.TOUCH_ZOOM||(this._state&et.TOUCH_ZOOM_TRUCK)===et.TOUCH_ZOOM_TRUCK||(this._state&et.TOUCH_ZOOM_OFFSET)===et.TOUCH_ZOOM_OFFSET||(this._state&et.TOUCH_ZOOM_ROTATE)===et.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&et.OFFSET)===et.OFFSET||(this._state&et.TOUCH_OFFSET)===et.TOUCH_OFFSET||(this._state&et.TOUCH_DOLLY_OFFSET)===et.TOUCH_DOLLY_OFFSET||(this._state&et.TOUCH_ZOOM_OFFSET)===et.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})}},m=()=>{if(!this._enabled)return;xO(this._activePointers,yo);let e=!!wi.isBrowser&&(this._domElement&&document.pointerLockElement===this._domElement),t=e?-this._activePointers[0].deltaX:r.x-yo.x,s=e?-this._activePointers[0].deltaY:r.y-yo.y;if(r.copy(yo),((this._state&et.ROTATE)===et.ROTATE||(this._state&et.TOUCH_ROTATE)===et.TOUCH_ROTATE||(this._state&et.TOUCH_DOLLY_ROTATE)===et.TOUCH_DOLLY_ROTATE||(this._state&et.TOUCH_ZOOM_ROTATE)===et.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(t,s),this._isUserControllingRotate=!0),(this._state&et.DOLLY)===et.DOLLY||(this._state&et.ZOOM)===et.ZOOM){let e=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,t=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&et.DOLLY)===et.DOLLY?(this._dollyInternal(s*SO,e,t),this._isUserControllingDolly=!0):(this._zoomInternal(s*SO,e,t),this._isUserControllingZoom=!0)}if((this._state&et.TOUCH_DOLLY)===et.TOUCH_DOLLY||(this._state&et.TOUCH_ZOOM)===et.TOUCH_ZOOM||(this._state&et.TOUCH_DOLLY_TRUCK)===et.TOUCH_DOLLY_TRUCK||(this._state&et.TOUCH_ZOOM_TRUCK)===et.TOUCH_ZOOM_TRUCK||(this._state&et.TOUCH_DOLLY_OFFSET)===et.TOUCH_DOLLY_OFFSET||(this._state&et.TOUCH_ZOOM_OFFSET)===et.TOUCH_ZOOM_OFFSET||(this._state&et.TOUCH_DOLLY_ROTATE)===et.TOUCH_DOLLY_ROTATE||(this._state&et.TOUCH_ZOOM_ROTATE)===et.TOUCH_ZOOM_ROTATE){let e=yo.x-this._activePointers[1].clientX,t=yo.y-this._activePointers[1].clientY,i=Math.sqrt(e*e+t*t),s=n.y-i;n.set(0,i);let a=this.dollyToCursor?(r.x-this._elementRect.x)/this._elementRect.width*2-1:0,o=this.dollyToCursor?(r.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&et.TOUCH_DOLLY)===et.TOUCH_DOLLY||(this._state&et.TOUCH_DOLLY_ROTATE)===et.TOUCH_DOLLY_ROTATE||(this._state&et.TOUCH_DOLLY_TRUCK)===et.TOUCH_DOLLY_TRUCK||(this._state&et.TOUCH_DOLLY_OFFSET)===et.TOUCH_DOLLY_OFFSET?(this._dollyInternal(s*SO,a,o),this._isUserControllingDolly=!0):(this._zoomInternal(s*SO,a,o),this._isUserControllingZoom=!0)}((this._state&et.TRUCK)===et.TRUCK||(this._state&et.TOUCH_TRUCK)===et.TOUCH_TRUCK||(this._state&et.TOUCH_DOLLY_TRUCK)===et.TOUCH_DOLLY_TRUCK||(this._state&et.TOUCH_ZOOM_TRUCK)===et.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(t,s,!1),this._isUserControllingTruck=!0),((this._state&et.OFFSET)===et.OFFSET||(this._state&et.TOUCH_OFFSET)===et.TOUCH_OFFSET||(this._state&et.TOUCH_DOLLY_OFFSET)===et.TOUCH_DOLLY_OFFSET||(this._state&et.TOUCH_ZOOM_OFFSET)===et.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(t,s,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},g=()=>{xO(this._activePointers,yo),r.copy(yo),0===this._activePointers.length&&this._domElement&&(this._domElement.removeEventListener("pointermove",o),this._domElement.removeEventListener("mousemove",l),this._domElement.removeEventListener("pointerup",h),this._domElement.removeEventListener("mouseup",u),this.dispatchEvent({type:"controlend"}))};this._addAllEventListeners=e=>{this._domElement=e,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",s),O2t&&this._domElement.addEventListener("mousedown",a),this._domElement.addEventListener("pointercancel",h),this._domElement.addEventListener("wheel",p),this._domElement.addEventListener("contextmenu",d)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",s),this._domElement.removeEventListener("mousedown",a),this._domElement.removeEventListener("pointercancel",h),this._domElement.removeEventListener("wheel",p),this._domElement.removeEventListener("contextmenu",d),this._domElement.removeEventListener("pointermove",o),this._domElement.removeEventListener("mousemove",l),this._domElement.removeEventListener("pointerup",h),this._domElement.removeEventListener("mouseup",u))},this.cancel=()=>{this._state!==et.NONE&&(this._state=et.NONE,this._activePointers.length=0,g())},t&&this.connect(t),this.update(0)}static install(e){Cr=e.THREE,zMe=Object.freeze(new Cr.Vector3(0,0,0)),wO=Object.freeze(new Cr.Vector3(0,1,0)),eG=Object.freeze(new Cr.Vector3(0,0,1)),yo=new Cr.Vector2,Nr=new Cr.Vector3,an=new Cr.Vector3,oE=new Cr.Vector3,dh=new Cr.Vector3,fh=new Cr.Vector3,A0=new Cr.Vector3,jMe=new Cr.Vector3,WMe=new Cr.Vector3,Kc=new Cr.Spherical,C_=new Cr.Spherical,lE=new Cr.Box3,qMe=new Cr.Box3,tG=new Cr.Sphere,YMe=new Cr.Quaternion,rG=new Cr.Quaternion,iG=new Cr.Matrix4,RO=new Cr.Raycaster}static get ACTION(){return et}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,i=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,i)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,i=!1){this._isUserControllingRotate=!1;let r=C0(e,this.minAzimuthAngle,this.maxAzimuthAngle),n=C0(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=r,this._sphericalEnd.phi=n,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,i||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);let s=!i||wn(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&wn(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(s)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){this._isUserControllingDolly=!1;let i=this._sphericalEnd.radius,r=C0(e,this.minDistance,this.maxDistance);if(this.colliderMeshes.length>=1){let e=this._collisionTest(),t=wn(e,this._spherical.radius);if(!(i>r)&&t)return Promise.resolve();this._sphericalEnd.radius=Math.min(r,e)}else this._sphericalEnd.radius=r;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);let n=!t||wn(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(n)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=C0(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);let i=!t||wn(this._zoom,this._zoomEnd,this.restThreshold);return this._createOnRestPromise(i)}pan(e,t,i=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,i)}truck(e,t,i=!1){this._camera.updateMatrix(),dh.setFromMatrixColumn(this._camera.matrix,0),fh.setFromMatrixColumn(this._camera.matrix,1),dh.multiplyScalar(e),fh.multiplyScalar(-t);let r=Nr.copy(dh).add(fh),n=an.copy(this._targetEnd).add(r);return this.moveTo(n.x,n.y,n.z,i)}forward(e,t=!1){Nr.setFromMatrixColumn(this._camera.matrix,0),Nr.crossVectors(this._camera.up,Nr),Nr.multiplyScalar(e);let i=an.copy(this._targetEnd).add(Nr);return this.moveTo(i.x,i.y,i.z,t)}elevate(e,t=!1){return Nr.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+Nr.x,this._targetEnd.y+Nr.y,this._targetEnd.z+Nr.z,t)}moveTo(e,t,i,r=!1){this._isUserControllingTruck=!1;let n=Nr.set(e,t,i).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,n,this.boundaryFriction),this._needsUpdate=!0,r||this._target.copy(this._targetEnd);let s=!r||wn(this._target.x,this._targetEnd.x,this.restThreshold)&&wn(this._target.y,this._targetEnd.y,this.restThreshold)&&wn(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(s)}lookInDirectionOf(e,t,i,r=!1){let n=Nr.set(e,t,i).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(n.x,n.y,n.z,r)}fitToBox(e,t,{cover:i=!1,paddingLeft:r=0,paddingRight:n=0,paddingBottom:s=0,paddingTop:a=0}={}){let o=[],l=e.isBox3?lE.copy(e):lE.setFromObject(e);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());let h=J8(this._sphericalEnd.theta,Z8),u=J8(this._sphericalEnd.phi,Z8);o.push(this.rotateTo(h,u,t));let c=Nr.setFromSpherical(this._sphericalEnd).normalize(),p=YMe.setFromUnitVectors(c,eG),d=wn(Math.abs(c.y),1);d&&p.multiply(rG.setFromAxisAngle(wO,h)),p.multiply(this._yAxisUpSpaceInverse);let f=qMe.makeEmpty();an.copy(l.min).applyQuaternion(p),f.expandByPoint(an),an.copy(l.min).setX(l.max.x).applyQuaternion(p),f.expandByPoint(an),an.copy(l.min).setY(l.max.y).applyQuaternion(p),f.expandByPoint(an),an.copy(l.max).setZ(l.min.z).applyQuaternion(p),f.expandByPoint(an),an.copy(l.min).setZ(l.max.z).applyQuaternion(p),f.expandByPoint(an),an.copy(l.max).setY(l.min.y).applyQuaternion(p),f.expandByPoint(an),an.copy(l.max).setX(l.min.x).applyQuaternion(p),f.expandByPoint(an),an.copy(l.max).applyQuaternion(p),f.expandByPoint(an),f.min.x-=r,f.min.y-=s,f.max.x+=n,f.max.y+=a,p.setFromUnitVectors(eG,c),d&&p.premultiply(rG.invert()),p.premultiply(this._yAxisUpSpace);let m=f.getSize(Nr),g=f.getCenter(an).applyQuaternion(p);if(Kf(this._camera)){let e=this.getDistanceToFitBox(m.x,m.y,m.z,i);o.push(this.moveTo(g.x,g.y,g.z,t)),o.push(this.dollyTo(e,t)),o.push(this.setFocalOffset(0,0,0,t))}else if(ph(this._camera)){let e=this._camera,r=e.right-e.left,n=e.top-e.bottom,s=i?Math.max(r/m.x,n/m.y):Math.min(r/m.x,n/m.y);o.push(this.moveTo(g.x,g.y,g.z,t)),o.push(this.zoomTo(s,t)),o.push(this.setFocalOffset(0,0,0,t))}return Promise.all(o)}fitToSphere(e,t){let i=[],r=e instanceof Cr.Sphere?tG.copy(e):Zf.createBoundingSphere(e,tG);if(i.push(this.moveTo(r.center.x,r.center.y,r.center.z,t)),Kf(this._camera)){let e=this.getDistanceToFitSphere(r.radius);i.push(this.dollyTo(e,t))}else if(ph(this._camera)){let e=this._camera.right-this._camera.left,n=this._camera.top-this._camera.bottom,s=2*r.radius,a=Math.min(e/s,n/s);i.push(this.zoomTo(a,t))}return i.push(this.setFocalOffset(0,0,0,t)),Promise.all(i)}setLookAt(e,t,i,r,n,s,a=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1;let o=an.set(r,n,s),l=Nr.set(e,t,i);this._targetEnd.copy(o),this._sphericalEnd.setFromVector3(l.sub(o).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,a||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));let h=!a||wn(this._target.x,this._targetEnd.x,this.restThreshold)&&wn(this._target.y,this._targetEnd.y,this.restThreshold)&&wn(this._target.z,this._targetEnd.z,this.restThreshold)&&wn(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&wn(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&wn(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(h)}lerpLookAt(e,t,i,r,n,s,a,o,l,h,u,c,p,d=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1;let f=Nr.set(r,n,s),m=an.set(e,t,i);Kc.setFromVector3(m.sub(f).applyQuaternion(this._yAxisUpSpace));let g=oE.set(h,u,c),y=an.set(a,o,l);C_.setFromVector3(y.sub(g).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(f.lerp(g,p));let v=C_.theta-Kc.theta,T=C_.phi-Kc.phi,x=C_.radius-Kc.radius;this._sphericalEnd.set(Kc.radius+x*p,Kc.phi+T*p,Kc.theta+v*p),this.normalizeRotations(),this._needsUpdate=!0,d||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));let b=!d||wn(this._target.x,this._targetEnd.x,this.restThreshold)&&wn(this._target.y,this._targetEnd.y,this.restThreshold)&&wn(this._target.z,this._targetEnd.z,this.restThreshold)&&wn(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&wn(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&wn(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(b)}setPosition(e,t,i,r=!1){return this.setLookAt(e,t,i,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,r)}setTarget(e,t,i,r=!1){let n=this.getPosition(Nr),s=this.setLookAt(n.x,n.y,n.z,e,t,i,r);return this._sphericalEnd.phi=C0(this.polarAngle,this.minPolarAngle,this.maxPolarAngle),s}setFocalOffset(e,t,i,r=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,i),this._needsUpdate=!0,r||this._focalOffset.copy(this._focalOffsetEnd);let n=!r||wn(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&wn(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&wn(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}setOrbitPoint(e,t,i){this._camera.updateMatrixWorld(),dh.setFromMatrixColumn(this._camera.matrixWorldInverse,0),fh.setFromMatrixColumn(this._camera.matrixWorldInverse,1),A0.setFromMatrixColumn(this._camera.matrixWorldInverse,2);let r=Nr.set(e,t,i),n=r.distanceTo(this._camera.position),s=r.sub(this._camera.position);dh.multiplyScalar(s.x),fh.multiplyScalar(s.y),A0.multiplyScalar(s.z),Nr.copy(dh).add(fh).add(A0),Nr.z=Nr.z+n,this.dollyTo(n,!1),this.setFocalOffset(-Nr.x,Nr.y,-Nr.z,!1),this.moveTo(e,t,i,!1)}setBoundary(e){if(!e)return this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),void(this._needsUpdate=!0);this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,i,r){null!==e?(this._viewport=this._viewport||new Cr.Vector4,"number"==typeof e?this._viewport.set(e,t,i,r):this._viewport.copy(e)):this._viewport=null}getDistanceToFitBox(e,t,i,r=!1){if(IO(this._camera,"getDistanceToFitBox"))return this._spherical.radius;let n=e/t,s=this._camera.getEffectiveFOV()*nE,a=this._camera.aspect;return.5*((r?n>a:nt.pointerId===e))}_findPointerByMouseButton(e){return this._activePointers.find((t=>t.mouseButton===e))}_encloseToBoundary(e,t,i){let r=t.lengthSq();if(0===r)return e;let n=an.copy(t).add(e),s=this._boundary.clampPoint(n,oE).sub(n),a=s.lengthSq();if(0===a)return e.add(t);if(a===r)return e;if(0===i)return e.add(t).add(s);{let r=1+i*a/t.dot(s);return e.add(an.copy(t).multiplyScalar(r)).add(s.multiplyScalar(1-i))}}_updateNearPlaneCorners(){if(Kf(this._camera)){let e=this._camera,t=e.near,i=e.getEffectiveFOV()*nE,r=Math.tan(.5*i)*t,n=r*e.aspect;this._nearPlaneCorners[0].set(-n,-r,0),this._nearPlaneCorners[1].set(n,-r,0),this._nearPlaneCorners[2].set(n,r,0),this._nearPlaneCorners[3].set(-n,r,0)}else if(ph(this._camera)){let e=this._camera,t=1/e.zoom,i=e.left*t,r=e.right*t,n=e.top*t,s=e.bottom*t;this._nearPlaneCorners[0].set(i,n,0),this._nearPlaneCorners[1].set(r,n,0),this._nearPlaneCorners[2].set(r,s,0),this._nearPlaneCorners[3].set(i,s,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||IO(this._camera,"_collisionTest"))return e;let t=Nr.setFromSpherical(this._spherical).divideScalar(this._spherical.radius);iG.lookAt(zMe,t,this._camera.up);for(let i=0;i<4;i++){let r=an.copy(this._nearPlaneCorners[i]);r.applyMatrix4(iG);let n=oE.addVectors(this._target,r);RO.set(n,t),RO.far=this._spherical.radius+1;let s=RO.intersectObjects(this.colliderMeshes);0!==s.length&&s[0].distance{let t=()=>{this.removeEventListener("rest",t),e()};this.addEventListener("rest",t)})))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new Cr.Sphere){let i=t,r=i.center;lE.makeEmpty(),e.traverseVisible((e=>{e.isMesh&&lE.expandByObject(e)})),lE.getCenter(r);let n=0;return e.traverseVisible((e=>{if(!e.isMesh)return;let t=e,i=t.geometry.clone();if(i.applyMatrix4(t.matrixWorld),i.isBufferGeometry){let e=i.attributes.position;for(let t=0,i=e.count;t{if(this.enabled){switch(e.code){case this.keys.up:e.ctrlKey||e.metaKey||e.shiftKey?(this._rotateInternal(0,1),this._isUserControllingRotate=!0):(this._truckInternal(0,this.keyTruckSpeed,!1),this._isUserControllingTruck=!0);break;case this.keys.bottom:e.ctrlKey||e.metaKey||e.shiftKey?(this._rotateInternal(0,-1),this._isUserControllingRotate=!0):(this._truckInternal(0,-this.keyTruckSpeed,!1),this._isUserControllingTruck=!0);break;case this.keys.left:e.ctrlKey||e.metaKey||e.shiftKey?(this._rotateInternal(1,0),this._isUserControllingRotate=!0):(this._truckInternal(this.keyTruckSpeed,0,!1),this._isUserControllingTruck=!0);break;case this.keys.right:e.ctrlKey||e.metaKey||e.shiftKey?(this._rotateInternal(-1,0),this._isUserControllingRotate=!0):(this._truckInternal(-this.keyTruckSpeed,0,!1),this._isUserControllingTruck=!0)}this.dispatchEvent({type:"control"})}},this.onKeyUp=e=>{this.dispatchEvent({type:"controlend"})},this.dollySpeedBackup=this.dollySpeed,this.azimuthRotateSpeedBackup=this.azimuthRotateSpeed,this.polarRotateSpeedBackup=this.polarRotateSpeed,this.truckSpeedBackup=this.truckSpeed}get enableZoom(){return!!this.dollySpeed}set enableZoom(e){e?this.dollySpeed=this.dollySpeedBackup:(this.dollySpeedBackup=this.dollySpeed,this.dollySpeed=0)}get enableRotate(){return!!this.azimuthRotateSpeed||!!this.polarRotateSpeed}set enableRotate(e){e?(this.azimuthRotateSpeed=this.azimuthRotateSpeedBackup,this.polarRotateSpeed=this.polarRotateSpeedBackup):(this.azimuthRotateSpeedBackup=this.azimuthRotateSpeed,this.polarRotateSpeedBackup=this.polarRotateSpeed,this.azimuthRotateSpeed=0,this.polarRotateSpeed=0)}get enableTruck(){return!!this.truckSpeed}set enableTruck(e){e?this.truckSpeed=this.truckSpeedBackup:(this.truckSpeedBackup=this.truckSpeed,this.truckSpeed=0)}listenToKeyEvents(){var e,t;null==(e=this._domElement)||e.addEventListener("keydown",this.onKeyDown),null==(t=this._domElement)||t.addEventListener("keyup",this.onKeyUp)}stopListenToKeyEvents(){var e,t;null==(e=this._domElement)||e.removeEventListener("keydown",this.onKeyDown),null==(t=this._domElement)||t.removeEventListener("keyup",this.onKeyUp)}dispose(){super.dispose(),this.stopListenToKeyEvents()}},XMe=class{constructor(e,t,i,r,n){this.targetPixelHeight=100,this.canvasHeight=800,this.camera=e,this.object=i,this.targetPixelHeight=r,this.canvasHeight=n,this.adjustSize(),t.addEventListener("update",(()=>{this.adjustSize()}))}adjustSize(){let e=new Dt;if(this.object.updateMatrix(),e.expandByObject(this.object),!e)return;let t=e.max.x-e.min.x,i=this.camera.position.distanceTo(this.object.position),r=P2t(t,i,this.canvasHeight);if(Math.abs(r-this.targetPixelHeight)<5)return;let n=this.object.scale.x;n*=this.targetPixelHeight/r,this.object.scale.set(n,n,n),this.object.updateMatrix()}},P2t=(e,t,i=800,r=45)=>{let n=r*(Math.PI/180);return i*(e/(2*Math.tan(n/2)*t))},tl=class extends Aa{constructor(e){super(_t.guid()),this.needsFrustumCulled=!1,this.snapType="Dot",this.snapLineVisible=!1,this.snapType=e,this.drawSnapFunctions={Dot:this.drawDot.bind(this),Square:this.drawSquare.bind(this),Cross:this.drawCross.bind(this),Triangle:this.drawTriangle.bind(this),Perpendicular:this.drawPerpendicular.bind(this)}}setSnapLineVisible(e){this.snapLineVisible=e}draw(e,t){this.osnapInfo&&(this.snapLineVisible&&this.drawSnapLine(e,t),e.save(),e.fillStyle=tl.FILL_COLOR,e.strokeStyle=tl.LINE_COLOR,e.lineWidth=tl.LINE_WIDTH,e.beginPath(),this.drawSnapFunctions[this.snapType](e,t),MO&&this.drawDebug(e,t),e.closePath(),e.fill(),e.stroke(),e.restore())}drawDebug(e,t){null==MO||MO.forEach((i=>{let r=this.transToScreenCoord(i.start,t),n=this.transToScreenCoord(i.end,t);e.moveTo(r.x,r.y),e.lineTo(n.x,n.y)}))}drawSelect(e,t){}isPointInPath(e){return!1}drawSnapLine(e,t){e.save(),e.strokeStyle=tl.SNAP_LINE_COLOR,e.lineWidth=tl.LINE_WIDTH;let i=this.transToScreenCoord(this.osnapInfo.line.start,t),r=this.transToScreenCoord(this.osnapInfo.line.end,t);e.moveTo(i.x,i.y),e.lineTo(r.x,r.y),e.stroke(),e.restore()}drawDot(e,t){let i=this.transToScreenCoord(this.osnapInfo.point,t);e.arc(i.x,i.y,tl.SNAP_ICON_SIZE/3,0,2*Math.PI)}drawSquare(e,t){let i=this.transToScreenCoord(this.osnapInfo.point,t),r=tl.SNAP_ICON_SIZE/1.2,n=tl.SNAP_ICON_SIZE/1.2;e.rect(i.x-r/2,i.y-n/2,r,n)}drawTriangle(e,t){let i=this.transToScreenCoord(this.osnapInfo.point,t),r=tl.SNAP_ICON_SIZE/1.2/2,n=new le(0,-r).add(i),s=new le(-.87*r,r/2).add(i),a=new le(.87*r,r/2).add(i);e.moveTo(n.x,n.y),e.lineTo(s.x,s.y),e.lineTo(a.x,a.y),e.closePath()}drawCross(e,t){let i=this.transToScreenCoord(this.osnapInfo.point,t),r=tl.SNAP_ICON_SIZE/1.2/2,n=new le(-r,-r).add(i),s=new le(r,r).add(i),a=new le(r,-r).add(i),o=new le(-r,r).add(i);e.moveTo(n.x,n.y),e.lineTo(s.x,s.y),e.moveTo(a.x,a.y),e.lineTo(o.x,o.y)}drawPerpendicular(e,t){let i=this.transToScreenCoord(this.osnapInfo.point,t),r=tl.SNAP_ICON_SIZE/1.2/2;[new le(0,0).add(i),new le(-r,0).add(i),new le(0,0).add(i),new le(0,r).add(i),new le(r,r).add(i),new le(-r,r).add(i),new le(-r,r).add(i),new le(-r,-r).add(i)].forEach(((t,i)=>{0===i?e.moveTo(t.x,t.y):e.lineTo(t.x,t.y)}))}update(e){this.osnapInfo=e}getClassType(){return"SnapDrawable"}},rl=tl;rl.LINE_COLOR="rgba(255, 240, 0, 0.8)",rl.FILL_COLOR="rgba(135, 206, 250, 0.5)",rl.SNAP_LINE_COLOR="rgba(255, 240, 0, 0.3)",rl.LINE_WIDTH=2.5,rl.SNAP_ICON_SIZE=10,wr._registerDrawableClass(rl);var N2t=(e=>(e[e.None=0]="None",e[e.PointOnLine=1]="PointOnLine",e[e.StartPoint=2]="StartPoint",e[e.EndPoint=4]="EndPoint",e[e.MiddlePoint=8]="MiddlePoint",e[e.FootOfPerpendicular=16]="FootOfPerpendicular",e[e.Intersection=32]="Intersection",e))(N2t||{}),L2t=1e-5,DO=class{constructor(e){var t;this.drawableList=new Xu("snap"),this.markers={},this.activeOSnapType=0,this.snapTolerance=1,this.overlayRender=e,null==(t=this.overlayRender)||t.addDrawableList(this.drawableList),this.initOSnapMarkers()}initOSnapMarkers(){let e=new rl("Square"),t=new rl("Triangle"),i=new rl("Dot"),r=new rl("Cross"),n=new rl("Perpendicular");this.markers[2]=e,this.markers[4]=e,this.markers[8]=t,this.markers[1]=i,this.markers[32]=r,this.markers[16]=n,Object.values(this.markers).forEach((e=>{e.visible=!1,this.drawableList.addDrawable(e)}))}updateSnapTolerance(e){this.snapTolerance=e}getSnapTolerance(){return this.snapTolerance}getMarker(e){return this.markers[e]}deactivate(){this.activeOSnapType&&(this.markers[this.activeOSnapType].visible=!1),this.activeOSnapType=0}destroy(){}handleSnap(e,t,i,r){if(null==t||!t.length)return void this.activateMarker(0);let n=this.getInteractionLines(e,t);if(n){let t=this.getSnapInfo(e,n,r);return t&&0!==t.type?(this.activateMarker(t.type,i,t),t.point):void this.activateMarker(0)}this.activateMarker(0)}activateMarker(e,t=!1,i){var r;this.activeOSnapType&&(this.markers[this.activeOSnapType].visible=!1),this.activeOSnapType=e;let n=this.markers[e];n&&i&&(n.setSnapLineVisible(t),n.update(i),n.visible=!0),null==(r=this.overlayRender)||r.render()}getFootOfPerpendicular(e,t,i=L2t){let{start:r,end:n}=t,s=r.x-n.x,a=r.y-n.y,o=r.z-n.z;if(r.distanceTo(n)t.type-e.type)),n[0]}},nG=kn(ql(),1),mh=class{constructor(e,t,i){this.follow=e=>{let{x:t,y:i}=Ci.getScreenPointByEvent(e,this.parentNode);this.node.style.left=t+15+"px",this.node.style.top=i-30+"px"},this.show=()=>this.node.hasAttribute("hidden")&&this.node.removeAttribute("hidden"),this.hide=()=>!this.node.hasAttribute("hidden")&&this.node.setAttribute("hidden",""),this.destroy=()=>{this.target?this.target.removeEventListener(Mf,this.follow):document.removeEventListener(Mf,this.follow),this.parentNode.removeChild(this.node)},this.node=document.createElement("div"),this.node.id=e,t&&this.node.append(t),this.childNode=document.createElement("div"),this.target=null==i?void 0:i.target,this.parentNode=(null==i?void 0:i.parentNode)||document.body,null!=i&&i.followPointer&&(this.node.classList.add("follow-tooltip"),this.target?this.target.addEventListener(Mf,this.follow):document.addEventListener(Mf,this.follow)),this.parentNode.appendChild(this.node),(null==i||!i.showOnCreate)&&this.node.setAttribute("hidden","")}setContent(e){this.node.textContent&&(this.node.textContent=null),(0,nG.forEach)(this.node.children,(e=>{this.node.removeChild(e)})),this.node.append(e),this.node.appendChild(this.childNode)}updateChildContent(e){this.childNode.textContent&&(this.childNode.textContent=null),(0,nG.forEach)(this.childNode.children,(e=>{this.childNode.removeChild(e)})),this.childNode.append(e)}},CO=class{constructor(e){this.mouseDown=!1,this.mouseMove=!1,this.mouseDownPositionX=-1,this.mouseDownPositionY=-1,this.tempEnableRotate=!1,this.actived=!1,this.isResolvedOrRejected=!1,this.mousedown=e=>{var t,i;if(0===e.button){this.mouseDown=!0;let r=new le(e.x,e.y);this.mouseDownPositionX=r.x,this.mouseDownPositionY=r.y,null==(t=this.tooltip)||t.hide(),null==(i=this.tooltip)||i.destroy(),this.tooltip=void 0}},this.mousemove=e=>{if(!this.mouseDown)return;let t=new le(e.x,e.y);if(this.mouseDownPositionX>=0&&this.mouseDownPositionY>=0&&(Math.abs(t.x-this.mouseDownPositionX)>=5||Math.abs(t.y-this.mouseDownPositionY)>=5)){this.mouseMove=!0;let e=new le(Math.min(this.mouseDownPositionX,t.x),Math.min(this.mouseDownPositionY,t.y)),i=new le(Math.max(this.mouseDownPositionX,t.x),Math.max(this.mouseDownPositionY,t.y));this.drawRect(e,i)}},this.mouseup=e=>{if(this.mouseDown&&this.mouseMove){let t=new le(e.x,e.y),i=new le(Math.min(this.mouseDownPositionX,t.x),Math.min(this.mouseDownPositionY,t.y)),r=new le(Math.max(this.mouseDownPositionX,t.x),Math.max(this.mouseDownPositionY,t.y)),n=new rs(i,r);this.deactivate(),this.setRectDomVisible(!1),this.resolve&&(this.resolve(n),this.isResolvedOrRejected=!0)}this.mouseDown=!1,this.mouseMove=!1,this.mouseDownPositionX=-1,this.mouseDownPositionY=-1},this.viewer=e,this.input=e.getInputManager()}get viewerContainer(){return this.viewer.viewerContainer}isActived(){return this.actived}activate(){var e;if(this.isActived())return void(this.reject&&(this.reject("BoxSelectHelper is already actived!"),this.isResolvedOrRejected=!0));this.actived=!0,this.input.addEventListener("pointerdown",this.mousedown),this.input.addEventListener("pointermove",this.mousemove),this.input.addEventListener("pointerup",this.mouseup);let t=this.viewer.controls;this.tempKey=t.mouseButtons.left,this.tempEnableRotate=t.enableRotate,t.mouseButtons.left=et.NONE,t.enableRotate=!1;let i=this.viewer.translate;if(i){this.tooltip=new mh("box-select-tooltip",i("Tooltip.boxSelect"),{followPointer:!0,showOnCreate:!0,parentNode:this.viewer.widgetContainer,target:this.viewerContainer});let t=document.getElementById("box-select-tooltip");t&&(t.style.pointerEvents="none");let r=i("Tooltip.boxSelect");r&&this.tooltip&&(null==(e=this.tooltip)||e.setContent(r))}}deactivate(){var e,t;this.actived=!1,this.input.removeEventListener("pointerdown",this.mousedown),this.input.removeEventListener("pointermove",this.mousemove),this.input.removeEventListener("pointerup",this.mouseup),null==(e=this.tooltip)||e.hide(),null==(t=this.tooltip)||t.destroy(),this.tooltip=void 0,this.viewer.controls.mouseButtons.left=this.tempKey,this.viewer.controls.enableRotate=this.tempEnableRotate}drawRect(e,t){this.rectDom||(this.rectDom=document.createElement("div"),this.rectDom.style.cssText=`position: absolute;border: ${CO.BORDER_WIDTH} solid ${CO.BORDER_COLOR};`,this.viewerContainer.appendChild(this.rectDom)),this.setRectDomVisible(!0),this.rectDom.style.left=`${e.x}px`,this.rectDom.style.top=`${e.y}px`;let i=Math.abs(t.x-e.x),r=Math.abs(t.y-e.y);this.rectDom.style.width=`${i}px`,this.rectDom.style.height=`${r}px`}setRectDomVisible(e){this.rectDom&&(this.rectDom.style.display=e?"inline-block":"none")}select(){return ht(this,null,(function*(){return new Promise(((e,t)=>{this.resolve=e,this.reject=t,this.activate()}))}))}destroy(){var e;this.deactivate(),null==(e=this.rectDom)||e.remove(),this.rectDom=void 0,this.isResolvedOrRejected||this.reject&&this.reject("BoxSelectHelper is not done for some reason!")}},Jf=CO;Jf.BORDER_COLOR="#fff000",Jf.BORDER_WIDTH="2px";var $Me=kn(ql(),1),cE=class{constructor(e){this.history=[],this.step=0,this.maxCount=50,this.maxCount=e||this.maxCount}addRecord(e,t){this.history.length===this.maxCount&&this.history.shift(),this.step!==this.history.length&&this.history.splice(this.step),this.history.push({type:e,payload:(0,$Me.cloneDeep)(t)}),this.step++}undo(){if(0!==this.step)return this.step--,this.history[this.step]}redo(){if(this.step!==this.history.length)return this.step++,this.history[this.step-1]}clear(){this.history=[],this.step=0}destroy(){this.clear(),this.maxCount=0}};function Zc(e){return(Zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KMe(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,r=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:{};Kl(this,e),this.init(t,i)}return Zl(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||F2t,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i1?t-1:0),r=1;r-1?e.replace(/###/g,"."):e}function n(){return!e||"string"==typeof e}for(var s="string"!=typeof t?[].concat(t):t.split(".");s.length>1;){if(n())return{};var a=r(s.shift());!e[a]&&i&&(e[a]=new i),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return n()?{}:{obj:e,k:r(s.shift())}}function eDe(e,t,i){var r=hG(e,t,Object);r.obj[r.k]=i}function B2t(e,t,i,r){var n=hG(e,t,Object),s=n.obj,a=n.k;s[a]=s[a]||[],r&&(s[a]=s[a].concat(i)),r||s[a].push(i)}function NO(e,t){var i=hG(e,t),r=i.obj,n=i.k;if(r)return r[n]}function tDe(e,t,i){var r=NO(e,i);return void 0!==r?r:NO(t,i)}function dDe(e,t,i){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?i&&(e[r]=t[r]):dDe(e[r],t[r],i):e[r]=t[r]);return e}function hE(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var k2t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function G2t(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return k2t[e]})):e}var FO="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,V2t=[" ",",","?","!",";"];function z2t(e,t,i){t=t||"",i=i||"";var r=V2t.filter((function(e){return t.indexOf(e)<0&&i.indexOf(e)<0}));if(0===r.length)return!0;var n=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),s=!n.test(e);if(!s){var a=e.indexOf(i);a>0&&!n.test(e.substring(0,a))&&(s=!0)}return s}function rDe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function OO(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(i),n=e,s=0;ss+a;)a++,l=n[o=r.slice(s,s+a).join(i)];if(void 0===l)return;if(t.endsWith(o)){if("string"==typeof l)return l;if(o&&"string"==typeof l[o])return l[o]}var h=r.slice(s+a).join(i);return h?fDe(l,h,i):void 0}n=n[r[s]]}return n}}var q2t=function(e){uE(i,em);var t=j2t(i);function i(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Kl(this,i),r=t.call(this),FO&&em.call(Jc(r)),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return Zl(i,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,s=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];i&&"string"!=typeof i&&(a=a.concat(i)),i&&"string"==typeof i&&(a=a.concat(n?i.split(n):i)),e.indexOf(".")>-1&&(a=e.split("."));var o=NO(this.data,a);return o||!s||"string"!=typeof i?o:fDe(this.data&&this.data[e]&&this.data[e][t],i,n)}},{key:"addResource",value:function(e,t,i,r){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},s=this.options.keySeparator;void 0===s&&(s=".");var a=[e,t];i&&(a=a.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),eDe(this.data,a,r),n.silent||this.emit("added",e,t,i,r)}},{key:"addResources",value:function(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var n in i)("string"==typeof i[n]||"[object Array]"===Object.prototype.toString.apply(i[n]))&&this.addResource(e,t,n,i[n],{silent:!0});r.silent||this.emit("added",e,t,i)}},{key:"addResourceBundle",value:function(e,t,i,r,n){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=i,i=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var o=NO(this.data,a)||{};r?dDe(o,i,n):o=OO(OO({},o),i),eDe(this.data,a,o),s.silent||this.emit("added",e,t,i)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?OO(OO({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),i}(),mDe={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,i,r,n){var s=this;return e.forEach((function(e){s.processors[e]&&(t=s.processors[e].process(t,i,r,n))})),t}};function iDe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function La(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return Kl(this,i),r=t.call(this),FO&&em.call(Jc(r)),U2t(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,Jc(r)),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=yh.create("translator"),r}return Zl(i,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var i=this.resolve(e,t);return i&&void 0!==i.res}},{key:"extractFromKey",value:function(e,t){var i=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,n=t.ns||this.options.defaultNS||[],s=i&&e.indexOf(i)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||z2t(e,i,r));if(s&&!a){var o=e.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:e,namespaces:n};var l=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(l[0])>-1)&&(n=l.shift()),e=l.join(r)}return"string"==typeof n&&(n=[n]),{key:e,namespaces:n}}},{key:"translate",value:function(e,t,r){var n=this;if("object"!==Zc(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),l=o.key,h=o.namespaces,u=h[h.length-1],c=t.lng||this.language,p=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(p){var d=t.nsSeparator||this.options.nsSeparator;return s?(f.res="".concat(u).concat(d).concat(l),f):"".concat(u).concat(d).concat(l)}return s?(f.res=l,f):l}var f=this.resolve(e,t),m=f&&f.res,g=f&&f.usedKey||l,y=f&&f.exactUsedKey||l,v=Object.prototype.toString.apply(m),T=["[object Number]","[object Function]","[object RegExp]"],x=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,_="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(b&&m&&_&&T.indexOf(v)<0&&("string"!=typeof x||"[object Array]"!==v)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,La(La({},t),{},{ns:h})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return s?(f.res=E,f):E}if(a){var w="[object Array]"===v,S=w?[]:{},I=w?y:g;for(var M in m)if(Object.prototype.hasOwnProperty.call(m,M)){var A="".concat(I).concat(a).concat(M);S[M]=this.translate(A,La(La({},t),{joinArrays:!1,ns:h})),S[M]===A&&(S[M]=m[M])}m=S}}else if(b&&"string"==typeof x&&"[object Array]"===v)(m=m.join(x))&&(m=this.extendTranslation(m,e,t,r));else{var D=!1,O=!1,R=void 0!==t.count&&"string"!=typeof t.count,C=i.hasDefaultValue(t),N=R?this.pluralResolver.getSuffix(c,t.count,t):"",P=t["defaultValue".concat(N)]||t.defaultValue;!this.isValidLookup(m)&&C&&(D=!0,m=P),this.isValidLookup(m)||(O=!0,m=l);var L=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,F=L&&O?void 0:m,U=C&&P!==m&&this.options.updateMissing;if(O||D||U){if(this.logger.log(U?"updateKey":"missingKey",c,u,l,U?P:m),a){var k=this.resolve(l,La(La({},t),{},{keySeparator:!1}));k&&k.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var B=[],H=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&H&&H[0])for(var G=0;G1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var l=a.extractFromKey(e,o),h=l.key;i=h;var u=l.namespaces;a.options.fallbackNS&&(u=u.concat(a.options.fallbackNS));var c=void 0!==o.count&&"string"!=typeof o.count,p=c&&!o.ordinal&&0===o.count&&a.pluralResolver.shouldUseIntlApi(),d=void 0!==o.context&&("string"==typeof o.context||"number"==typeof o.context)&&""!==o.context,f=o.lngs?o.lngs:a.languageUtils.toResolveHierarchy(o.lng||a.language,o.fallbackLng);u.forEach((function(e){a.isValidLookup(t)||(s=e,!nDe["".concat(f[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(s)&&(nDe["".concat(f[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(i,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(i){if(!a.isValidLookup(t)){n=i;var s,l=[h];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(l,h,i,e,o);else{var u;c&&(u=a.pluralResolver.getSuffix(i,o.count,o));var f="_zero";if(c&&(l.push(h+u),p&&l.push(h+f)),d){var m="".concat(h).concat(a.options.contextSeparator).concat(o.context);l.push(m),c&&(l.push(m+u),p&&l.push(m+f))}}for(;s=l.pop();)a.isValidLookup(t)||(r=s,t=a.getResource(i,e,s,o))}})))}))}})),{res:t,usedKey:i,exactUsedKey:r,usedLng:n,usedNS:s}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,i,r):this.resourceStore.getResource(e,t,i,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&void 0!==e[i])return!0;return!1}}]),i}();function uG(e){return e.charAt(0).toUpperCase()+e.slice(1)}var $2t=function(){function e(t){Kl(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=yh.create("languageUtils")}return Zl(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],i=e.split("-");return this.options.lowerCaseLng?i=i.map((function(e){return e.toLowerCase()})):2===i.length?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=uG(i[1].toLowerCase()))):3===i.length&&(i[0]=i[0].toLowerCase(),2===i[1].length&&(i[1]=i[1].toUpperCase()),"sgn"!==i[0]&&2===i[2].length&&(i[2]=i[2].toUpperCase()),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=uG(i[1].toLowerCase())),t.indexOf(i[2].toLowerCase())>-1&&(i[2]=uG(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,i=this;return e?(e.forEach((function(e){if(!t){var r=i.formatLanguageCode(e);(!i.options.supportedLngs||i.isSupportedCode(r))&&(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=i.getLanguagePartFromCode(e);if(i.isSupportedCode(r))return t=r;t=i.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}},{key:"toResolveHierarchy",value:function(e,t){var i=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),n=[],s=function(e){e&&(i.isSupportedCode(e)?n.push(e):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(e))):"string"==typeof e&&s(this.formatLanguageCode(e)),r.forEach((function(e){n.indexOf(e)<0&&s(i.formatLanguageCode(e))})),n}}]),e}(),K2t=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Z2t={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},J2t=["v1","v2","v3"],aDe={zero:0,one:1,two:2,few:3,many:4,other:5};function Q2t(){var e={};return K2t.forEach((function(t){t.lngs.forEach((function(i){e[i]={numbers:t.nr,plurals:Z2t[t.fc]}}))})),e}var eNt=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kl(this,e),this.languageUtils=t,this.options=i,this.logger=yh.create("pluralResolver"),(!this.options.compatibilityJSON||"v4"===this.options.compatibilityJSON)&&("undefined"==typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Q2t()}return Zl(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,t);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,i).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,i);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return aDe[e]-aDe[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,i)})):[]}},{key:"getSuffix",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,i);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var i=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),n=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===n?n="plural":1===n&&(n=""));var s=function(){return i.options.prepend&&n.toString()?i.options.prepend+n.toString():n.toString()};return"v1"===this.options.compatibilityJSON?1===n?"":"number"==typeof n?"_plural_".concat(n.toString()):s():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!J2t.includes(this.options.compatibilityJSON)}}]),e}();function oDe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function Qc(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};Kl(this,e),this.logger=yh.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return Zl(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:G2t,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?hE(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?hE(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?hE(t.nestingPrefix):t.nestingPrefixEscaped||hE("$t("),this.nestingSuffix=t.nestingSuffix?hE(t.nestingSuffix):t.nestingSuffixEscaped||hE(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(e,t,i,r){var n,s,a,o=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function h(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(o.formatSeparator)<0){var n=tDe(t,l,e);return o.alwaysFormat?o.format(n,void 0,i,Qc(Qc(Qc({},r),t),{},{interpolationkey:e})):n}var s=e.split(o.formatSeparator),a=s.shift().trim(),h=s.join(o.formatSeparator).trim();return o.format(tDe(t,l,a),h,i,Qc(Qc(Qc({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var c=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return h(e)}},{regex:this.regexp,safeValue:function(e){return o.escapeValue?h(o.escape(e)):h(e)}}].forEach((function(t){for(a=0;n=t.regex.exec(e);){var i=n[1].trim();if(void 0===(s=u(i)))if("function"==typeof c){var l=c(e,n,r);s="string"==typeof l?l:""}else if(r&&r.hasOwnProperty(i))s="";else{if(p){s=n[0];continue}o.logger.warn("missed to pass in variable ".concat(i," for interpolating ").concat(e)),s=""}else"string"!=typeof s&&!o.useRawValueToEscape&&(s=QMe(s));var h=t.safeValue(s);if(e=e.replace(n[0],h),p?(t.regex.lastIndex+=h.length,t.regex.lastIndex-=n[0].length):t.regex.lastIndex=0,++a>=o.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var i,r,n=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=Qc({},s);function o(e,t){var i=this.nestingOptionsSeparator;if(e.indexOf(i)<0)return e;var r=e.split(new RegExp("".concat(i,"[ ]*{"))),n="{".concat(r[1]);e=r[0],n=(n=this.interpolate(n,a)).replace(/'/g,'"');try{a=JSON.parse(n),t&&(a=Qc(Qc({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(i).concat(n)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;i=this.nestingRegexp.exec(e);){var l=[],h=!1;if(-1!==i[0].indexOf(this.formatSeparator)&&!/{.*}/.test(i[1])){var u=i[1].split(this.formatSeparator).map((function(e){return e.trim()}));i[1]=u.shift(),l=u,h=!0}if((r=t(o.call(this,i[1].trim(),a),a))&&i[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=QMe(r)),r||(this.logger.warn("missed to resolve ".concat(i[1]," for nesting ").concat(e)),r=""),h&&(r=l.reduce((function(e,t){return n.format(e,t,s.lng,Qc(Qc({},s),{},{interpolationkey:i[1].trim()}))}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}]),e}();function lDe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function Qf(e){for(var t=1;t-1){var r=e.split("(");t=r[0].toLowerCase().trim();var n=r[1].substring(0,r[1].length-1);if("currency"===t&&n.indexOf(":")<0)i.currency||(i.currency=n.trim());else if("relativetime"===t&&n.indexOf(":")<0)i.range||(i.range=n.trim());else{n.split(";").forEach((function(e){if(e){var t=cG(e.split(":")),r=t[0],n=t.slice(1).join(":");i[r.trim()]||(i[r.trim()]=n.trim()),"false"===n.trim()&&(i[r.trim()]=!1),"true"===n.trim()&&(i[r.trim()]=!0),isNaN(n.trim())||(i[r.trim()]=parseInt(n.trim(),10))}}))}}return{formatName:t,formatOptions:i}}var iNt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Kl(this,e),this.logger=yh.create("formatter"),this.options=t,this.formats={number:function(e,t,i){return new Intl.NumberFormat(t,i).format(e)},currency:function(e,t,i){return new Intl.NumberFormat(t,Qf(Qf({},i),{},{style:"currency"})).format(e)},datetime:function(e,t,i){return new Intl.DateTimeFormat(t,Qf({},i)).format(e)},relativetime:function(e,t,i){return new Intl.RelativeTimeFormat(t,Qf({},i)).format(e,i.range||"day")},list:function(e,t,i){return new Intl.ListFormat(t,Qf({},i)).format(e)}},this.init(t)}return Zl(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},i=t.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"format",value:function(e,t,i,r){var n=this;return t.split(this.formatSeparator).reduce((function(e,t){var s=rNt(t),a=s.formatName,o=s.formatOptions;if(n.formats[a]){var l=e;try{var h=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},u=h.locale||h.lng||r.locale||r.lng||i;l=n.formats[a](e,u,Qf(Qf(Qf({},o),r),h))}catch(e){n.logger.warn(e)}return l}return n.logger.warn("there was no format function for ".concat(a)),e}),e)}}]),e}();function cDe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function uDe(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:{};return Kl(this,i),s=t.call(this),FO&&em.call(Jc(s)),s.backend=e,s.store=r,s.services=n,s.languageUtils=n.languageUtils,s.options=a,s.logger=yh.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=a.maxParallelReads||10,s.readingCalls=0,s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(n,a.backend,a),s}return Zl(i,[{key:"queueLoad",value:function(e,t,i,r){var n=this,s={},a={},o={},l={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var o="".concat(e,"|").concat(t);!i.reload&&n.store.hasResourceBundle(e,t)?n.state[o]=2:n.state[o]<0||(1===n.state[o]?void 0===a[o]&&(a[o]=!0):(n.state[o]=1,r=!1,void 0===a[o]&&(a[o]=!0),void 0===s[o]&&(s[o]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(o[e]=!0)})),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,i){var r=e.split("|"),n=r[0],s=r[1];t&&this.emit("failedLoading",n,s,t),i&&this.store.addResourceBundle(n,s,i),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(i){B2t(i.loaded,[n],s),aNt(i,e),t&&i.errors.push(t),0===i.pendingCount&&!i.done&&(Object.keys(i.loaded).forEach((function(e){a[e]||(a[e]={});var t=Object.keys(a[e]);t.length&&t.forEach((function(i){void 0!==t[i]&&(a[e][i]=!0)}))})),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,i){var r=this,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:i,tried:n,wait:s,callback:a}):(this.readingCalls++,this.backend[i](e,t,(function(o,l){if(o&&l&&n<5)setTimeout((function(){r.read.call(r,e,t,i,n+1,2*s,a)}),s);else{if(r.readingCalls--,r.waitingReads.length>0){var h=r.waitingReads.shift();r.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}a(o,l)}}))):a(null,{})}},{key:"prepareLoading",value:function(e,t){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var s=this.queueLoad(e,t,r,n);if(!s.toLoad.length)return s.pending.length||n(),null;s.toLoad.forEach((function(e){i.loadOne(e)}))}},{key:"load",value:function(e,t,i){this.prepareLoading(e,t,{},i)}},{key:"reload",value:function(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}},{key:"loadOne",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),n=r[0],s=r[1];this.read(n,s,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(i,"loading namespace ").concat(s," for language ").concat(n," failed"),r),!r&&a&&t.logger.log("".concat(i,"loaded namespace ").concat(s," for language ").concat(n),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,i,r,n){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null==i||""===i||(this.backend&&this.backend.create&&this.backend.create(e,t,i,r,null,uDe(uDe({},s),{},{isUpdate:n})),e&&e[0]&&this.store.addResource(e[0],t,i,r))}}]),i}();function lNt(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Zc(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===Zc(e[2])||"object"===Zc(e[3])){var i=e[3]||e[2];Object.keys(i).forEach((function(e){t[e]=i[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,i,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function hDe(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function pDe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function vh(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(Kl(this,i),e=t.call(this),FO&&em.call(Jc(e)),e.options=hDe(r),e.services={},e.logger=yh,e.modules={external:[]},hNt(Jc(e)),n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),O0(e,Jc(e));setTimeout((function(){e.init(r,n)}),0)}return e}return Zl(i,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(i=t,t={}),!t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=lNt();function n(e){return e?"function"==typeof e?new e:e:null}if(this.options=vh(vh(vh({},r),this.options),hDe(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=vh(vh({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var s;this.modules.logger?yh.init(n(this.modules.logger),this.options):yh.init(null,this.options),this.modules.formatter?s=this.modules.formatter:"undefined"!=typeof Intl&&(s=iNt);var a=new $2t(this.options);this.store=new q2t(this.options.resources,this.options);var o=this.services;o.logger=yh,o.resourceStore=this.store,o.languageUtils=a,o.pluralResolver=new eNt(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(o.formatter=n(s),o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new tNt(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new oNt(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var i=arguments.length,r=new Array(i>1?i-1:0),n=1;n1?i-1:0),n=1;n0&&"dev"!==l[0]&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var h=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];h.forEach((function(t){e[t]=function(){var i;return(i=e.store)[t].apply(i,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var i;return(i=e.store)[t].apply(i,arguments),e}}));var c=O_(),p=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),c.resolve(r),i(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?p():setTimeout(p,0),c}},{key:"loadResources",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:PO,r=i,n="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase())return r();var s=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};if(n)a(n);else{var o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);o.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(s,this.options.ns,(function(e){!e&&!t.resolvedLanguage&&t.language&&t.setResolvedLanguage(t.language),r(e)}))}else r(null)}},{key:"reloadResources",value:function(e,t,i){var r=O_();return e||(e=this.languages),t||(t=this.options.ns),i||(i=PO),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),i(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&mDe.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}},{key:"changeLanguage",value:function(e,t){var i=this;this.isLanguageChangingTo=e;var r=O_();this.emit("languageChanging",e);var n=function(e){i.language=e,i.languages=i.services.languageUtils.toResolveHierarchy(e),i.resolvedLanguage=void 0,i.setResolvedLanguage(e)},s=function(s){!e&&!s&&i.services.languageDetector&&(s=[]);var a="string"==typeof s?s:i.services.languageUtils.getBestMatchFromCodes(s);a&&(i.language||n(a),i.translator.language||i.translator.changeLanguage(a),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(a)),i.loadResources(a,(function(e){!function(e,s){s?(n(s),i.translator.changeLanguage(s),i.isLanguageChangingTo=void 0,i.emit("languageChanged",s),i.logger.log("languageChanged",s)):i.isLanguageChangingTo=void 0,r.resolve((function(){return i.t.apply(i,arguments)})),t&&t(e,(function(){return i.t.apply(i,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(s):s(e):s(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,i){var r=this,n=function e(t,n){var s;if("object"!==Zc(n)){for(var a=arguments.length,o=new Array(a>2?a-2:0),l=2;l1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,i){var r=t.services.backendConnector.state["".concat(e,"|").concat(i)];return-1===r||2===r};if(i.precheck){var o=i.precheck(this,a);if(void 0!==o)return o}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!n||a(s,e)))}},{key:"loadNamespaces",value:function(e,t){var i=this,r=O_();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){i.options.ns.indexOf(e)<0&&i.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var i=O_();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],n=e.filter((function(e){return r.indexOf(e)<0}));return n.length?(this.options.preload=r.concat(n),this.loadResources((function(e){i.resolve(),t&&t(e)})),i):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:PO,n=vh(vh(vh({},this.options),t),{isClone:!0}),s=new i(n),a=["store","services","language"];return a.forEach((function(t){s[t]=e[t]})),s.services=vh({},this.services),s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s.translator=new sDe(s.services,s.options),s.translator.on("*",(function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new LO(e,t)}));var Fa=LO.createInstance();Fa.createInstance=LO.createInstance;var USr=Fa.createInstance,BSr=Fa.init,kSr=Fa.loadResources,GSr=Fa.reloadResources,VSr=Fa.use,zSr=Fa.changeLanguage,jSr=Fa.getFixedT,Th=Fa.t,WSr=Fa.exists,qSr=Fa.setDefaultNamespace,YSr=Fa.hasLoadedNamespace,XSr=Fa.loadNamespaces,$Sr=Fa.loadLanguages,pG=Fa,pE=(e=>(e.BaseViewer="BaseViewer",e.BimViewer="BimViewer",e.DxfViewer="DxfViewer",e.VRViewer="BaseViewer",e))(pE||{}),tm=class extends Ks{constructor(e){super(),this.name="BaseViewer",this.translate=this.initLocalization(),this.height=0,this.width=0,this.enableOverlayRenderer=!0,this.viewerCfg=e,this.initLogLevel(),this.initLocalization(),wi.isBrowser&&!e.context&&(this.initViewerContainer(),this.initWidgetContainer())}initLogLevel(){let e=this.viewerCfg.logLevel;e&&lpe(e)}initLocalization(){var e;let t=(null==(e=this.viewerCfg)?void 0:e.language)||"cn";return pG.init({lng:t,debug:!1,resources:{en:{translation:Dpe},cn:{translation:Cpe}}}),pG.t}initViewerContainer(){let e=document.getElementById(this.viewerCfg.containerId);e||(ne.error("[BaseViewer] containerId:",this.viewerCfg.containerId,"is not found in dom tree! will append to document body"),e=document.body);let t=document.createElement("div");t.classList.add("viewer-container"),t.style.cssText="width: 100%; height: 100%; position: absolute; overflow: hidden;",e.appendChild(t),this.width=t.clientWidth,this.height=t.clientHeight,this.viewerContainer=t}initWidgetContainer(){var e;let t=document.createElement("div");t.classList.add("widget-container"),null==(e=this.viewerContainer)||e.appendChild(t),this.widgetContainer=t}destroy(){var e,t,i;null==(e=this.widgetContainer)||e.remove(),this.widgetContainer=void 0,null==(t=this.viewerContainer)||t.remove(),this.viewerContainer=void 0,null==(i=this.scene)||i.clear(),this.scene=void 0,this.renderer&&(this.renderer.domElement.remove(),this.renderer.clear(),this.renderer.dispose(),this.renderer.forceContextLoss(),this.renderer=void 0),this.overlayRender&&(this.overlayRender.destroy(),this.overlayRender=void 0),this.camera=void 0,this.controls&&(this.controls.dispose(),this.controls=void 0),this.groundPlane&&(this.groundPlane.geometry.dispose(),this.groundPlane.clear(),this.groundPlane=void 0)}getInputManager(){return this.inputManager}getViewConfig(){return this.viewerCfg}enableRender(){}getRaycaster(){}getRaycastableObjectsByMouse(e){return[]}getBBox(){}getActiveSection(){}flyTo(e,t){}is3d(){return!0}deactivateMeasurement(){}setMeasurementVisibility(e,t){return!1}screenshot(e){return ht(this,null,(function*(){}))}showStats(){}hideStats(){}},dE=class{constructor(e){this.viewer=e,this.boxSelectHelper=new Jf(e)}get viewerContainer(){return this.viewer.viewerContainer}get camera(){return this.viewer.camera}get raycaster(){return this.viewer.getRaycaster()}activate(){var e;null==(e=this.boxSelectHelper)||e.select().then((e=>{this.handleZoomToRect(e.min,e.max)}))}deactivate(){var e;null==(e=this.boxSelectHelper)||e.deactivate(),this.boxSelectHelper=void 0}pickPositionByScreenPoint(e){let t=Ci.screenPoint2NdcPoint(e,this.camera,this.viewerContainer);this.raycaster.setFromCamera(t,this.camera);let i=[];"BimViewer"===this.viewer.name?i=this.viewer.getRaycastableObjectsByMouse({clientX:e.x,clientY:e.y}):"DxfViewer"===this.viewer.name&&(i=[this.viewer.groundPlane]);let r=this.raycaster.intersectObjects(i)||[];if(r.length>0)return r[0].point}handleZoomToRect(e,t){let i=this.pickPositionByScreenPoint(e),r=this.pickPositionByScreenPoint(t);if(i&&r){let e=new A(Math.min(i.x,r.x),Math.min(i.y,r.y),Math.min(i.z,r.z)),t=new A(Math.max(i.x,r.x),Math.max(i.y,r.y),Math.max(i.z,r.z)),n=new Dt(e,t);this.viewer.zoomToBBox(n)}}destroy(){this.deactivate()}},HO=class extends cE{constructor(e,t){super(t),this.manager=e}undo(){let e=super.undo();switch(null==e?void 0:e.type){case"Add":{let t=this.manager.getMarkupById(e.payload.id);t&&this.manager.removeMarkup(t,!1)}break;case"Remove":{let t=this.manager.createMarkup(e.payload);t&&this.manager.addMarkup(t,!1)}break;case"Update":{let{from:t,to:i}=e.payload,r=this.manager.getMarkupById(t.id);r&&this.manager.updateMarkup(r,t,!1)}}return e}redo(){let e=super.redo();switch(null==e?void 0:e.type){case"Add":{let t=this.manager.createMarkup(e.payload);t&&this.manager.addMarkup(t,!1)}break;case"Remove":{let t=this.manager.getMarkupById(e.payload.id);t&&this.manager.removeMarkup(t,!1)}break;case"Update":{let{from:t,to:i}=e.payload,r=this.manager.getMarkupById(i.id);r&&this.manager.updateMarkup(r,i,!1)}}return e}},gDe=new A,P_=class extends Ks{constructor(e,t){var i;super(),this.drawableList=new Xu("markup"),this.lineWidth=2,this.lineColor="#ff0000",this.fillColor="rgba(255, 0, 0, 0.3)",this.fontSize=20,this.mouseDown=!1,this.mouseDownPositionX=void 0,this.mouseDownPositionY=void 0,this.isDrawing=!1,this.tempPoints=[],this.actived=!1,this.undoRedoHelper=new HO(this),this.mousedown=e=>{var t;let i=this.pickThreejsPositionByMouse(e);if(this.mouseDownPositionX=i.x,this.mouseDownPositionY=i.y,0===e.button&&(this.mouseDown=!0),2===e.button&&(this.creatingShape&&this.tempPoints.length<2?(this.removeMarkup(this.creatingShape,!1),this.creatingShape=void 0):null==(t=this.creatingShape)||t.update(this.tempPoints),this.isDrawing&&this.endDraw(this.creatingShape)),this.selectedShape&&(this.selectedShape.selected=!1,this.selectedShape=void 0,this.render()),!this.isDrawing){let e=this.drawableList.getDrawableByPosition(i);e&&(this.selectedShape=e,e.selected=!0,this.render(),this.textInput&&(this.textInput.style.display="none"))}if(this.isCreateTextMode()&&this.mouseDown&&!this.selectedShape&&((!this.textInitialPosition||this.textInput&&0===this.textInput.value.length)&&(this.textInitialPosition=i.clone()),this.addInput(e.clientX,e.clientY)),this.isCreateLineMode()&&this.mouseDown&&!this.selectedShape){if(this.tempPoints.length>0){let e=this.tempPoints[0];if(gDe.subVectors(e,i).length(){let t=this.pickThreejsPositionByMouse(e);if(this.selectedShape){if(this.mouseDown&&void 0!==this.mouseDownPositionX&&void 0!==this.mouseDownPositionY){this.isEditing()||(this.initialDataForEditing=this.selectedShape.getData());let e=t.x-this.mouseDownPositionX,i=t.y-this.mouseDownPositionY;this.selectedShape.translate(e,i),this.render(),this.mouseDownPositionX=t.x,this.mouseDownPositionY=t.y}}else{if(this.isCreateDotMode())return;if(this.mouseDown&&this.isCreateShapeMode()&&void 0!==this.mouseDownPositionX&&void 0!==this.mouseDownPositionY){let e=new A(this.mouseDownPositionX,this.mouseDownPositionY,0);if(!this.creatingShape){let i=this.creatingShape=this.drawShape(e,t);i&&this.addMarkup(i,!1)}this.creatingShape.update([e,t]),this.isDrawing=!0,this.render()}if(this.isCreateLineMode()&&this.tempPoints.length>0&&this.isDrawing){if(!this.creatingShape){let e=this.creatingShape=this.drawLine([...this.tempPoints,t]);e&&this.addMarkup(e,!1)}let e=this.tempPoints[0];gDe.subVectors(e,t).length(){this.mouseDown=!1,this.selectedShape&&this.isEditing()&&this.endEdit(this.selectedShape),this.isCreateShapeMode()&&this.isDrawing&&this.endDraw(this.creatingShape)},this.keydown=e=>{"Delete"===e.code?this.selectedShape&&this.removeMarkup(this.selectedShape):e.ctrlKey&&"KeyZ"===e.code?this.undo():e.ctrlKey&&"KeyY"===e.code?this.redo():"Escape"===e.code&&this.cancelDraw(this.creatingShape)},this.viewer=e,this.inputManager=t,this.overlayRender=this.viewer.overlayRender,null==(i=this.overlayRender)||i.addDrawableList(this.drawableList)}get viewerCanvas(){var e;return null==(e=this.viewer.renderer)?void 0:e.domElement}get camera(){return this.viewer.camera}get raycaster(){return this.viewer.getRaycaster()}setMarkupVisibility(e,t){let i=this.drawableList.getDrawables().get(e);return!!i&&(i.visible=t,!0)}setMarkupsVisibility(e){this.drawableList.getDrawables().forEach((t=>t.visible=e))}clearAll(){this.drawableList.clear(),this.textInput&&(this.textInput.style.display="none"),this.undoRedoHelper.clear(),this.isDrawing&&this.endDraw(),this.render()}isMarkupActive(){return this.actived}activate(){this.actived=!0,this.inputManager.addEventListener("pointerdown",this.mousedown),this.inputManager.addEventListener("pointermove",this.mousemove),this.inputManager.addEventListener("pointerup",this.mouseup),this.inputManager.addEventListener("keydown",this.keydown);let e=this.viewer.controls;this.tempKey=e.mouseButtons.left,e.mouseButtons.left=et.NONE,this.tempArrowKeys=e.keys,e.keys={},this.render()}deactivate(){this.actived=!1,this.inputManager.removeEventListener("pointerdown",this.mousedown),this.inputManager.removeEventListener("pointermove",this.mousemove),this.inputManager.removeEventListener("pointerup",this.mouseup),this.inputManager.removeEventListener("keydown",this.keydown),this.viewer.controls.mouseButtons.left=this.tempKey,this.viewer.controls.keys=this.tempArrowKeys,this.textInput&&this.textInput.remove(),this.textInput=void 0,this.textInitialPosition=void 0,this.mouseDown=!1,this.selectedShape=void 0,this.tempPoints=[],this.isDrawing=!1,this.creatingShape=void 0}getActiveMarkupType(){return this.type}setDrawType(e){this.type=e,this.endDraw()}setLineWidth(e){this.lineWidth=e}getLineWidth(){return this.lineWidth}setLineColor(e){this.lineColor=e}getLineColor(){return this.lineColor}setFillColor(e){this.fillColor=e}getFillColor(){return this.fillColor}setFontSize(e){this.fontSize=e}getFontSize(){return this.fontSize}pickPositionByScreenPoint(e){let t=new A,i=Ci.screenPoint2NdcPoint(e,this.camera,this.viewerCanvas);this.raycaster.setFromCamera(i,this.camera);let r=this.viewer.scene,n=this.raycaster.intersectObject(this.viewer.groundPlane||r)||[];return n.length>0&&t.copy(n[0].point),t}pickThreejsPositionByMouse(e){return this.pickPositionByScreenPoint(new le(e.x,e.y))}isEditing(){return!!this.initialDataForEditing}endEdit(e){this.undoRedoHelper.addRecord("Update",{from:this.initialDataForEditing,to:e.getData()}),this.initialDataForEditing=void 0}endDraw(e){e&&this.undoRedoHelper.addRecord("Add",e.getData()),this.reset()}cancelDraw(e){e&&this.removeMarkup(e,!1),this.reset()}reset(){this.textInput&&(this.textInput.style.display="none",this.textInput.value=""),this.textInitialPosition=void 0,this.tempPoints=[],this.isDrawing=!1,this.creatingShape=void 0,this.mouseDownPositionX=void 0,this.mouseDownPositionY=void 0,this.render()}render(){var e;null==(e=this.overlayRender)||e.render()}addMarkup(e,t=!0){this.drawableList.addDrawable(e),this.render(),t&&this.undoRedoHelper.addRecord("Add",e.getData())}updateMarkup(e,t,i=!0){this.drawableList.updateDrawable(e,t),this.render(),i&&this.undoRedoHelper.addRecord("Update",e.getData())}removeMarkup(e,t=!0){this.drawableList.removeDrawable(e),this.render(),t&&this.undoRedoHelper.addRecord("Remove",e.getData())}removeMarkupById(e,t=!0){let i=this.getMarkupById(e);return!!i&&(this.drawableList.removeDrawable(i),this.render(),t&&this.undoRedoHelper.addRecord("Remove",i.getData()),!0)}createMarkup(e){return wr.createDrawable(e)}getMarkupById(e){return this.drawableList.getDrawableById(e)}getMarkupData(){return this.drawableList.getDrawableDatas()}setMarkupData(e){this.drawableList.clear(),this.drawableList.setDrawableDatas(e),this.render()}isCreateLineMode(){return["PolylineMarkup","CloudLineMarkup"].includes(this.type)}isCreateDotMode(){return["DotMarkup"].includes(this.type)}isCreateTextMode(){return["TextMarkup"].includes(this.type)}isCreateShapeMode(){return["XMarkup","RectMarkup","CloudRectMarkup","CircleMarkup","EllipseMarkup","ArrowMarkup","DotMarkup"].includes(this.type)}drawShape(e,t){let i=[[e.x,e.y]];return t&&i.push([t.x,t.y]),wr.createDrawable({id:_t.guid(),lineWidth:this.lineWidth,lineColor:this.lineColor,fillColor:this.fillColor,type:this.type,points:i})}drawLine(e){return wr.createDrawable({id:_t.guid(),lineWidth:this.lineWidth,lineColor:this.lineColor,fillColor:this.fillColor,type:this.type,points:e.map((e=>[e.x,e.y]))})}drawText(e,t){return wr.createDrawable({id:_t.guid(),lineWidth:this.lineWidth,lineColor:this.lineColor,fillColor:this.fillColor,fontSize:this.fontSize*this.overlayRender.getPixelSize(1,this.camera),type:this.type,text:t,points:[[e.x,e.y]]})}addInput(e,t){var i;if(!this.textInput){let e,t=document.createElement("textarea");t.style.cssText=`\n position: fixed;\n border: 1px solid red;\n background: transparent;\n outline: none;\n resize: none;\n overflow: hidden;\n z-index: 1000;\n box-sizing: content-box;\n padding: 0px 2px;\n color: ${this.lineColor}`,t.setAttribute("wrap","off"),t.onkeydown=e=>{if("Enter"===e.key){let e=parseInt(t.style.height);t.style.height=`${e+this.fontSize}px`}this.isDrawing=!0},t.onkeyup=t=>{var i;let r=t.target.value,n=(null==(i=this.overlayRender)?void 0:i.measureTextLength(r,`${this.fontSize}px Arial`))||0;n>50&&(e&&clearTimeout(e),e=setTimeout((()=>{t.target.style.width=`${n+4}px`}),0))},t.onchange=e=>{console.log(e)},t.onblur=e=>{let t=e.target.value;if(t.length>0&&this.textInitialPosition){let e=this.creatingShape=this.drawText(this.textInitialPosition,t);e.setTolerance(this.overlayRender.getPixelSize(1,this.camera)),this.addMarkup(e,!1),this.endDraw(this.creatingShape)}},null==(i=this.viewer.viewerContainer)||i.appendChild(t),this.textInput=t}setTimeout((()=>{this.textInput.blur(),this.textInput.focus()}),0),this.textInput.style.width="50px",this.textInput.style.height=`${this.fontSize}px`,this.textInput.style.lineHeight=`${this.fontSize}px`,this.textInput.style.fontSize=`${this.fontSize}px`,this.textInput.style.color=this.lineColor,this.textInput.style.display="inline-block",this.textInput.style.left=e+4+"px",this.textInput.style.top=t-this.fontSize+"px"}undo(){this.undoRedoHelper.undo()}redo(){this.undoRedoHelper.redo()}clearUndoRedo(){this.undoRedoHelper.clear()}destroy(){this.deactivate(),this.clearAll()}},vDe=new A,P0=class extends Aa{constructor(e,t){super(e),this.lineSegments=[],this.boxes=t,this.lineColor="red",this.lineWidth=2,this.calculateCloudLineSegments(t)}calculateCloudLineSegments(e){var t;for(let i=0;it.visible=e)),this.viewer.enableRender()}},Yn=kn(ql(),1);function fE(e){return{all:e=e||new Map,on:function(t,i){var r=e.get(t);r?r.push(i):e.set(t,[i])},off:function(t,i){var r=e.get(t);r&&(i?r.splice(r.indexOf(i)>>>0,1):e.set(t,[]))},emit:function(t,i){var r=e.get(t);r&&r.slice().map((function(e){e(i)})),(r=e.get("*"))&&r.slice().map((function(e){e(t,i)}))}}}var UO=(e=>(e[e.ClickEvent=1]="ClickEvent",e[e.Popup=2]="Popup",e[e.SubMenu=3]="SubMenu",e[e.Switch=4]="Switch",e))(UO||{}),N_=(e=>(e.HomeView="HomeView",e.OrthoMode="OrthoMode",e.Measure="Measure",e.MeasureDistance="MeasureDistance",e.MeasureArea="MeasureArea",e.MeasureAngle="MeasureAngle",e.MeasureCoordinate="MeasureCoordinate",e.MeasureClear="MeasureClear",e.Markup="Markup",e.MarkupArrow="Arrow",e.MarkupRect="Rect",e.MarkupCloudRect="CloudRect",e.MarkupPolyLine="PolyLine",e.MarkupCloudLine="CloudLine",e.MarkupEllipse="Ellipse",e.MarkupCircle="Circle",e.MarkupDot="Dot",e.MarkupText="Text",e.MarkupX="X",e.MarkupStrokeStyle="StrokeStyle",e.MarkupLineWidth="LineWidth",e.MarkupLineWidth2="LineWidth2",e.MarkupLineWidth5="LineWidth5",e.MarkupLineWidth10="LineWidth10",e.MarkupFontSize="FontSize",e.MarkupFontSize14="FontSize14",e.MarkupFontSize18="FontSize18",e.MarkupFontSize24="FontSize24",e.MarkupClear="MarkupClear",e.MarkupQuit="MarkupQuit",e.Section="Section",e.SectionBox="SectionBox",e.SectionPlane="SectionPlane",e.SectionAxis="SectionAxis",e.BimTree="BimTree",e.Viewpoint="Viewpoint",e.Annotation="Annotation",e.Property="Property",e.Settings="Settings",e.Compared="Compared",e.QuitCompare="QuitCompare",e.Fullscreen="FullScreen",e.SceneClear="SceneClear",e.Layers="Layers",e.ZoomToRectangle="ZoomToRectangle",e.Screenshot="GetScreenshot",e))(N_||{}),TDe=[["HomeView","OrthoMode","FullScreen","ZoomToRectangle","GetScreenshot"],["Measure","Markup","Section"],["BimTree","Viewpoint","Annotation","Property","Compared","QuitCompare","Layers"],["Settings"]],Eh=class{constructor(e,t,i=[...TDe]){this.bimViewer=e,this.menuConfig=t,this.groupConfig=i,this.visible=!0,this.menuList=new Map,this.keydown=e=>{this.visible&&"Escape"===e.code&&this.clearActive()},this.init()}init(){var e;let t=document.createElement("div");t.classList.add("toolbar"),this.groupConfig.forEach(((e,i)=>{let r=document.createElement("div");r.classList.add("toolbar-group");let n=document.createElement("div");n.classList.add("toolbar-group-division"),e.forEach((e=>{let t=(0,Yn.get)(this.menuConfig,e);if(t&&!1!==t.visible){let i=this.createToolbarMenu(this.bimViewer,e,t);r.appendChild(i.element)}})),r.hasChildNodes()&&(i&&t.appendChild(n),t.appendChild(r))})),this.element=t,null==(e=this.bimViewer.widgetContainer)||e.appendChild(t),t.oncontextmenu=e=>{e.preventDefault()},window.addEventListener("keydown",this.keydown,!1)}clearActive(){if(this.activateMenuId){let e=this.menuList.get(this.activateMenuId);null==e||e.setActive(!1),this.activateMenuId=void 0}}createToolbarMenu(e,t,i,r){let n=new dG(e,this,t,i,r);if(this.menuList.set(t,n),i.children){let t=document.createElement("div");t.classList.add("toolbar-sub-menu");let r=document.createElement("div");r.classList.add("toolbar-sub-menu-list"),t.appendChild(r),(0,Yn.forIn)(i.children,((t,i)=>{if(t&&!1!==t.visible){let s=this.createToolbarMenu(e,i,t,n);r.appendChild(s.element)}})),n.element.appendChild(t)}return n}updateMenu(e,t){(0,Yn.assign)(this.menuConfig[e],t),this.refresh()}updateMenus(e){(0,Yn.forEach)(e,(({menuId:e,config:t})=>{(0,Yn.assign)(this.menuConfig[e],t)})),this.refresh()}addMenu(e,t,i){if((0,Yn.keys)(this.menuConfig).includes(e))ne.error("[Toolbar]",e,"exists.");else{if((0,Yn.assign)(this.menuConfig,{[e]:t}),i){let[t,r]=i;if(t>this.groupConfig.length-1)this.groupConfig=(0,Yn.concat)(this.groupConfig,[[e]]);else{let i=this.groupConfig[t];this.groupConfig[t]=r>i.length-1?(0,Yn.concat)(i,e):(0,Yn.concat)((0,Yn.take)(i,r),e,(0,Yn.takeRight)(i,i.length-r))}}else this.groupConfig=(0,Yn.concat)(this.groupConfig,[[e]]);this.refresh()}}refresh(){this.destroy(),this.init()}show(){this.element&&(this.element.style.display=""),this.visible=!0}hide(){this.element&&(this.element.style.display="none"),this.visible=!1}destroy(){this.element&&this.element.remove(),this.element=void 0,this.menuList.clear(),window.removeEventListener("keydown",this.keydown,!1)}},dG=class{constructor(e,t,i,r,n){this.bimViewer=e,this.toolbar=t,this.menuId=i,this.eventBus=fE(),this.active=r.defaultActive||!1,this.element=r.customElement&&r.customElement(e,this.menuId,r)||this.createButton(e,this.menuId,r),this.eventBus.on("activeChange",(t=>{t?(this.element.classList.add("active"),(0,Yn.forEach)(r.mutexIds,(e=>{var t;let i=null==(t=this.toolbar)?void 0:t.menuList.get(e);i&&i.active&&i.setActive(!1)})),r.onActive&&r.onActive(e)):(this.element.classList.remove("active"),r.onDeactive&&r.onDeactive(e)),this.element.firstChild instanceof HTMLElement&&LC(this.element.firstChild.classList,r.icon,this.active),n&&n.setActive(t)})),this.element.onclick=t=>{switch(t.stopPropagation(),r.type){case 1:r.onClick&&r.onClick(e,this.toolbar,t);break;case 4:r.onClick&&r.onClick(e,this.toolbar,t),this.active=!this.active,this.toolbar.activateMenuId=this.menuId,this.eventBus.emit("activeChange",this.active)}}}createButton(e,t,i){let r=document.createElement("div");r.id=t,r.classList.add("toolbar-menu"),i.defaultActive&&r.classList.add("active"),i.children&&r.classList.add("toolbar-parent-menu");let{default:n="icon-new",iconFont:s=uo}=i.icon;return r.innerHTML=`
`,r.title=Th(i.menuName),r.innerHTML+=`${r.title}`,r}setActive(e){this.active=e,this.eventBus.emit("activeChange",this.active)}},EDe={Arrow:{menuName:"Toolbar.markupArrow",icon:{default:"icon-arrow",iconFont:"iconfont"},type:4,onActive:e=>{e.activateMarkup("ArrowMarkup")},onDeactive(e){e.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","CloudLine","Ellipse","Circle","Dot","Text","X"]},Rect:{defaultActive:!1,menuName:"Toolbar.markupRect",icon:{default:"icon-rectangle",iconFont:"iconfont"},type:4,onActive:e=>{e.activateMarkup("RectMarkup")},onDeactive(e){e.deactivateMarkup()},mutexIds:["Arrow","CloudRect","PolyLine","CloudLine","Ellipse","Circle","Dot","Text","X"]},CloudRect:{defaultActive:!0,menuName:"Toolbar.markupCloudRect",icon:{default:"icon-cloud",iconFont:"iconfont"},type:4,onActive:e=>{e.activateMarkup("CloudRectMarkup")},onDeactive(e){e.deactivateMarkup()},mutexIds:["Rect","Arrow","PolyLine","CloudLine","Ellipse","Circle","Dot","Text","X"]},PolyLine:{menuName:"Toolbar.markupPolyLine",icon:{default:"icon-polyline",iconFont:"iconfont"},type:4,onActive:e=>{e.activateMarkup("PolylineMarkup")},onDeactive(e){e.deactivateMarkup()},mutexIds:["Rect","Arrow","CloudRect","CloudLine","Ellipse","Circle","Dot","Text","X"]},CloudLine:{menuName:"Toolbar.markupCloudLine",icon:{default:"icon-cloud-segment",iconFont:"iconfont"},type:4,onActive:e=>{e.activateMarkup("CloudLineMarkup")},onDeactive(e){e.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","Arrow","Ellipse","Circle","Dot","Text","X"]},Ellipse:{menuName:"Toolbar.markupEllipse",icon:{default:"icon-oval",iconFont:"iconfont"},type:4,onActive:e=>{e.activateMarkup("EllipseMarkup")},onDeactive(e){e.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","CloudLine","Arrow","Circle","Dot","Text","X"]},Circle:{menuName:"Toolbar.markupCircle",icon:{default:"icon-round",iconFont:"iconfont"},type:4,onActive:e=>{e.activateMarkup("CircleMarkup")},onDeactive(e){e.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","CloudLine","Ellipse","Arrow","Dot","Text","X"]},Dot:{menuName:"Toolbar.markupDot",icon:{default:"icon-round",iconFont:"iconfont"},type:4,onActive:e=>{e.activateMarkup("DotMarkup")},onDeactive(e){e.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","CloudLine","Ellipse","Arrow","Circle","Text","X"]},X:{menuName:"Toolbar.markupX",icon:{default:"icon-cross",iconFont:"iconfont"},type:4,onActive:e=>{e.activateMarkup("XMarkup")},onDeactive(e){e.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","CloudLine","Ellipse","Circle","Dot","Arrow","Text"]},Text:{menuName:"Toolbar.markupText",icon:{default:"icon-text",iconFont:"iconfont"},type:4,onActive:e=>{e.activateMarkup("TextMarkup")},onDeactive(e){e.deactivateMarkup()},mutexIds:["Rect","CloudRect","PolyLine","CloudLine","Ellipse","Circle","Dot","Arrow","X"]},StrokeStyle:{menuName:"Toolbar.markupStroke",icon:{default:"icon-color-red",iconFont:"iconfont"},type:1,onClick:(e,t,i)=>{let r=i.target.parentElement,n=null==r?void 0:r.firstElementChild,s=document.createElement("input");s.setAttribute("type","color"),s.style.position="absolute",s.style.left=`${i.x}px`,s.style.top=`${i.y}px`,s.value=e.getMarkupLineColor(),s.click(),s.oninput=t=>{let i=t.target.value;e.setMarkupLineColor(i),n.style.color=i}}},LineWidth:{menuName:"Toolbar.markupLineWidth",icon:{default:"icon-line",iconFont:"iconfont"},customElement(e,t,i){let r=document.createElement("div");return r.id=t,r.classList.add("toolbar-menu"),i.children&&r.classList.add("toolbar-parent-menu"),r.title=Th(i.menuName),r.innerHTML+=`${r.title}`,r},type:3,children:{LineWidth2:{defaultActive:!0,icon:{default:"icon-line-2",iconFont:"iconfont"},onClick:e=>{e.setMarkupLineWidth(2)},type:4,menuName:"Toolbar.markupLineWidth2",mutexIds:["LineWidth5","LineWidth10"]},LineWidth5:{icon:{default:"icon-line-3",iconFont:"iconfont"},onClick:e=>{e.setMarkupLineWidth(3)},type:4,menuName:"Toolbar.markupLineWidth5",mutexIds:["LineWidth2","LineWidth10"]},LineWidth10:{icon:{default:"icon-line-4",iconFont:"iconfont"},onClick:e=>{e.setMarkupLineWidth(4)},type:4,menuName:"Toolbar.markupLineWidth10",mutexIds:["LineWidth2","LineWidth5"]}}},FontSize:{menuName:"Toolbar.markupFontSize",icon:{default:"icon-font"},customElement(e,t,i){let r=document.createElement("div");return r.id=t,r.classList.add("toolbar-menu"),i.children&&r.classList.add("toolbar-parent-menu"),r.title=Th(i.menuName),r.innerHTML+=`${r.title}`,r},type:3,children:{FontSize14:{icon:{default:"icon-font14",iconFont:"iconfont"},onClick:e=>{e.setMarkupFontSize(14)},type:4,menuName:"",mutexIds:["FontSize18","FontSize24"]},FontSize18:{defaultActive:!0,icon:{default:"icon-font18",iconFont:"iconfont"},onClick:e=>{e.setMarkupFontSize(18)},type:4,menuName:"",mutexIds:["FontSize14","FontSize24"]},FontSize24:{icon:{default:"icon-font24",iconFont:"iconfont"},onClick:e=>{e.setMarkupFontSize(24)},type:4,menuName:"",mutexIds:["FontSize14","FontSize18"]}}},MarkupClear:{icon:{default:"icon-eraser",iconFont:"iconfont"},onClick:e=>{ne.info("[Toolbar]","Clear Markup",e),e.clearMarkups()},type:1,menuName:"Toolbar.clearMarkup"},MarkupQuit:{icon:{default:""},customElement(e,t,i){let r=document.createElement("div");return r.id=t,r.classList.add("toolbar-menu"),i.children&&r.classList.add("toolbar-parent-menu"),r.title=Th(i.menuName),r.innerHTML+=`${r.title}`,r},onClick:(e,t)=>{var i;e.deactivateMarkup(),t.destroy(),null==(i=e.toolbar)||i.show()},type:1,menuName:"Toolbar.quitMarkup"}},pNt=[["Arrow","Rect","CloudRect","PolyLine","Ellipse","Circle","Text","MarkupClear","MarkupQuit"]],BO=class extends Eh{constructor(e,t,i=[...pNt]){super(e,t,i)}},mE=class{constructor(e,t,i=document.body){this.container=i,this.isFollowing=!1,this.diffX=0,this.diffY=0,this.start=e=>{this.isFollowing=!0,this.diffX=e.clientX-this.element.offsetLeft,this.diffY=e.clientY-this.element.offsetTop},this.stop=()=>{this.isFollowing=!1},this.follow=e=>{if(!this.isFollowing)return;let t=e.clientX-this.diffX,i=e.clientY-this.diffY;this.element.style.left=t+"px",this.element.style.top=i+"px"},this.element=document.createElement("div"),this.element.id=e,this.element.classList.add("pop-panel");let r=document.createElement("div");r.classList.add("pop-panel-header"),r.append(t),this.element.appendChild(r),this.header=r;let n=document.createElement("div");n.classList.add("pop-panel-body"),this.element.appendChild(n),this.body=n,r.addEventListener(AB,this.start),r.addEventListener(CB,this.stop),document.body.addEventListener(Mf,this.follow),this.container.appendChild(this.element)}destroy(){document.body.removeEventListener(Mf,this.follow),this.element.removeEventListener(AB,this.start),this.element.removeEventListener(CB,this.stop),this.element.remove()}},Ha=new A(1,0,0),rm=new A(0,1,0),im=new A(0,0,1),bDe=new A(0,1,0),L_=new Be,fG=2,eu=class extends ur{constructor(e=Ha){super(),this.redMaterial=new or({color:16711680,depthTest:!1}),this.greenMaterial=new or({color:65280,depthTest:!1}),this.blueMaterial=new or({color:255,depthTest:!1}),this.highlightMaterial=new or({color:16776960,depthTest:!1}),this.pickableMaterial=new or({color:9807270,depthTest:!1}),this.initIgnoreClipMaterial(),this.initOrUpdateByAxis(e)}initIgnoreClipMaterial(){[this.redMaterial,this.greenMaterial,this.blueMaterial,this.highlightMaterial,this.pickableMaterial].forEach((e=>{e.onBeforeCompile=function(e,t){e.fragmentShader=e.fragmentShader.replace("#include ","").replace("#include ",""),e.vertexShader=e.vertexShader.replace("#include ","").replace("#include ","")}}))}setDirection(e){let t=new Hr;t.setFromUnitVectors(Ha,e),this.applyQuaternion(t)}initOrUpdateByAxis(e){this.clear(),[{actionType:"TranslateX",direction:Ha,material:this.redMaterial},{actionType:"TranslateY",direction:rm,material:this.greenMaterial},{actionType:"TranslateZ",direction:im,material:this.blueMaterial}].forEach((t=>{let{actionType:i,direction:r,material:n}=t,s=this.createTranslateGizmo(i,r,fG,0===r.angleTo(e)?n:this.pickableMaterial);this.add(s)})),[{actionType:"RotateX",direction:Ha,material:this.redMaterial,degree:90},{actionType:"RotateY",direction:rm,material:this.greenMaterial,degree:90},{actionType:"RotateZ",direction:im,material:this.blueMaterial,degree:90}].forEach((t=>{let{actionType:i,direction:r,material:n,degree:s}=t;if(0!==r.angleTo(e)){let e=this.createRotateGizmo(i,r,fG,n,s);this.add(e)}})),this.createSphere(1,this.pickableMaterial)}createTranslateGizmo(e,t,i,r){let n=t.angleTo(bDe),s=bDe.clone().cross(t);L_.makeRotationAxis(s,n);let a=new Rl(i/5,i/5,20*i),o=10*i;a.translate(0,o,0),a.applyMatrix4(L_);let l=new Rl(0,i,3*i),h=2*o;l.translate(0,h,0),l.applyMatrix4(L_);let u=zo([l,a]),c=new rt(u,r);return c.userData.actionType=e,r===this.pickableMaterial&&c.layers.set(11),c}createRotateGizmo(e,t,i,r,n){let s=new A(0,0,1),a=t.clone().cross(s),o=t.angleTo(s);L_.makeRotationAxis(a,o);let l=new Cp(12*i,i/5,8,36,_r.degToRad(n));l.applyMatrix4(L_);let h=new rt(l,r);return h.userData.actionType=e,h}createSphere(e,t){let i=new ro(e,32,16),r=new rt(i,t);r.layers.set(11),this.add(r)}setActiveAxis(e){this.initOrUpdateByAxis(e)}createHoverRotateObjectByAxis(e){let t=Ha;switch(e){case"RotateX":t=Ha;break;case"RotateY":t=rm;break;case"RotateZ":t=im}return this.createRotateGizmo("",t,fG,this.highlightMaterial,360)}setActive(e,t){var i;let r=t.userData.actionType;["RotateX","RotateY","RotateZ"].includes(r)?e?(this.hoverObject=this.createHoverRotateObjectByAxis(r),this.add(this.hoverObject),t.visible=!1):(null==(i=this.hoverObject)||i.removeFromParent(),t.visible=!0,this.hoverObject=void 0):e?(this.originalMaterial=t.material,t.material=this.highlightMaterial):this.originalMaterial&&(t.material=this.originalMaterial)}adjustSize(e){let t=new A;this.getWorldPosition(t);let i=e.position,r=1;e instanceof Ji?r=(e.top-e.bottom)/e.zoom:e instanceof Xr&&(r=t.distanceTo(i)*Math.min(1.9*Math.tan(Math.PI*e.fov/360)/e.zoom,7)),this.scale.set(1,1,1).multiplyScalar(r/180)}},nm=class{constructor(e,t){if(this.mouseDown=!1,this.lastWorldPos=new A,this.mouseMoved=!1,this.dragStarted=!1,this.refrencePlane=new bi,this.isShowSectionPlane=!1,this.mousedown=e=>{0===e.button&&this.camera&&this.selectedObject&&(this.mouseDown=!0)},this.mousemove=e=>{if(this.dragStarted)this.updateRaycasterByMouse(e),this.onDragMove(e);else{this.activateSelectedObject(!1);let t=this.getIntersections(e);t?(this.selectedObject=t.object,this.activateSelectedObject(!0),this.mouseDown&&(this.dragStarted||(this.dragStarted=!0,this.onDragStart(e)))):this.selectedObject=void 0}this.viewer.enableRender()},this.mouseup=e=>{0===e.button&&(this.mouseDown&&this.dragStarted&&(this.onDragEnd(e),this.dragStarted=!1),this.mouseDown=!1,this.selectedObject=void 0)},this.keydown=e=>{"Escape"===e.code&&this.deactivate()},!(e.camera&&e.renderer&&e.controls&&e.scene))throw new Error("Invalid bimViewer!");this.viewer=e,this.inputManager=t,this.scene=e.scene,this.renderer=e.renderer;let i=e.getBBox();if(!i)throw new Error("Need to set sectionBox first!");this.sectionBox=i.clone()}get canvas(){var e;return null==(e=this.viewer.renderer)?void 0:e.domElement}get isActive(){return!!this.raycaster}get camera(){return this.viewer.camera}get controls(){return this.viewer.controls}setGlobalClippingEnable(e){this.clipPlanes&&(e?(this.renderer.localClippingEnabled=!0,this.renderer.clippingPlanes=this.clipPlanes):(this.renderer.localClippingEnabled=!1,this.renderer.clippingPlanes=[]))}activate(){this.inputManager.addEventListener("pointerdown",this.mousedown),this.inputManager.addEventListener("pointermove",this.mousemove),this.inputManager.addEventListener("pointerup",this.mouseup),this.inputManager.addEventListener("keydown",this.keydown),this.raycaster=this.viewer.getRaycaster()}deactivate(){var e;this.inputManager.removeEventListener("pointerdown",this.mousedown),this.inputManager.removeEventListener("pointermove",this.mousemove),this.inputManager.removeEventListener("pointerup",this.mouseup),this.inputManager.removeEventListener("keydown",this.keydown),this.setGlobalClippingEnable(!1),null==(e=this.selectedObject)||e.removeFromParent(),this.selectedObject=void 0,this.dragStarted=!1,this.raycaster=void 0}getIntersections(e){if(!this.raycaster)return;this.updateRaycasterByMouse(e);let t=this.raycaster.intersectObjects(this.getIntersectObjects())||[];return t.find((e=>e.object&&e.object.parent instanceof eu))||t[0]}updateRaycasterByMouse(e){if(!this.raycaster)return;let t=new le(e.x,e.y),i=Ci.screenPoint2NdcPoint(t,this.camera,this.canvas);this.raycaster&&this.raycaster.layers.disable(11),this.raycaster.setFromCamera(i,this.camera)}destroy(){this.deactivate()}},IDe=new Dt,_De=new Hr,kO=class extends rt{constructor(e,t){super(),this.vertices=[],this.actionType=e,this.geometry=new lt,this.vertices=t,this.geometry.setFromPoints(t),this.geometry.setIndex([0,1,2,0,2,3]),this.material=new or({depthTest:!1,color:kO.normalPlaneColor,transparent:!0,opacity:.1,side:gi}),this.createIgnoreClipMateriasl(this.material),this.geometry.computeVertexNormals(),this.edge=this.createEdge(t),this.add(this.edge)}createIgnoreClipMateriasl(e){e.onBeforeCompile=function(e,t){e.fragmentShader=e.fragmentShader.replace("#include ","").replace("#include ",""),e.vertexShader=e.vertexShader.replace("#include ","").replace("#include ","")}}createEdge(e){let t=new lt;t.setFromPoints(e),t.setIndex([0,1,1,2,2,3,3,0]);let i=new vr({color:kO.normalLineColor});this.createIgnoreClipMateriasl(i);let r=new Ir(t,i);return r.layers.set(11),r}update(e){this.geometry.setFromPoints(e),this.geometry.computeBoundingSphere(),this.geometry.computeVertexNormals(),this.edge.geometry.setFromPoints(e),this.vertices=e}rotatePlane(e,t){let i=this.getPlaneCenter();_De.setFromAxisAngle(e,t),this.vertices=this.vertices.map((e=>e.sub(i).applyQuaternion(_De).add(i))),this.update(this.vertices)}setDirection(e){let t=new Hr;t.setFromUnitVectors(Ha,e);let i=this.getPlaneCenter();this.vertices=this.vertices.map((e=>e.sub(i).applyQuaternion(t).add(i))),this.update(this.vertices)}getPlaneNormal(){let[e,t,i]=this.vertices,r=new A;return hn.getNormal(e,t,i,r),r}setActive(e){this.material.opacity=e?.2:.1}getPlaneCenter(){IDe.setFromPoints(this.vertices);let e=new A;return IDe.getCenter(e),e}},on=kO;on.normalPlaneColor=new je(0,.855,.718),on.activePlaneColor=new je(1,1,0),on.normalLineColor=16777215;var SDe=(e=>(e.X="X",e.Y="Y",e.Z="Z",e))(SDe||{}),GO=class extends nm{constructor(e,t){super(e,t),this.activeAxis="X",this.center=new A,this.sectionBox.getCenter(this.center),this.axisInfoMap={X:{normal:new A(1,0,0)},Y:{normal:new A(0,1,0)},Z:{normal:new A(0,0,1)}},this.viewer.addEventListener("RenderAfter",(()=>{var e;this.isActive&&(null==(e=this.gizmo)||e.adjustSize(this.camera))}))}activate(){super.activate(),this.setActiveAxis("X")}deactivate(){var e,t;super.deactivate(),null==(e=this.planeMesh)||e.removeFromParent(),null==(t=this.gizmo)||t.removeFromParent(),this.setGlobalClippingEnable(!1),this.planeMesh=void 0,this.gizmo=void 0}resetSection(){var e,t;null==(e=this.planeMesh)||e.removeFromParent(),null==(t=this.gizmo)||t.removeFromParent(),this.setGlobalClippingEnable(!1),this.planeMesh=void 0,this.gizmo=void 0,this.setActiveAxis("X")}setActiveAxis(e){this.activeAxis=e,this.initOrUpdateGizmo(),this.initOrUpdateSectionPlane(),this.initOrUpdateClipPlane(),this.setGlobalClippingEnable(!0),this.viewer.enableRender()}setSectionVisible(e){this.gizmo&&this.planeMesh&&(this.gizmo.visible=e,this.planeMesh.visible=e),this.isShowSectionPlane=e,this.viewer.enableRender()}initOrUpdateClipPlane(){switch(this.activeAxis){case"X":this.clipPlane=new bi(new A(-1,0,0),this.center.x);break;case"Y":this.clipPlane=new bi(new A(0,-1,0),this.center.y);break;case"Z":this.clipPlane=new bi(new A(0,0,-1),this.center.z)}this.clipPlane&&(this.clipPlanes=[this.clipPlane])}initOrUpdateSectionPlane(){var e;let t=new A;this.sectionBox.getSize(t);let i=t.length(),r=this.center,n=(new Dt).setFromCenterAndSize(r,new A(i,i,i)),{min:s,max:a}=n;switch(null==(e=this.planeMesh)||e.removeFromParent(),this.activeAxis){case"X":this.planeMesh=new on("X",[new A(r.x,a.y,s.z),new A(r.x,a.y,a.z),new A(r.x,s.y,a.z),new A(r.x,s.y,s.z)]);break;case"Y":this.planeMesh=new on("Y",[new A(a.x,r.y,s.z),new A(s.x,r.y,s.z),new A(s.x,r.y,a.z),new A(a.x,r.y,a.z)]);break;case"Z":this.planeMesh=new on("Z",[new A(a.x,a.y,r.z),new A(s.x,a.y,r.z),new A(s.x,s.y,r.z),new A(a.x,s.y,r.z)])}this.planeMesh&&this.scene.add(this.planeMesh),this.viewer.enableRender()}initOrUpdateGizmo(){var e,t;null==(e=this.gizmo)||e.removeFromParent();let i=this.axisInfoMap[this.activeAxis].normal;this.gizmo=new eu,this.gizmo.setDirection(i),this.sectionBox.getCenter(this.gizmo.position),null==(t=this.scene)||t.add(this.gizmo)}onDragStart(e){var t;if(this.selectedObject instanceof on)return;this.controls&&this.dragStarted&&this.selectedObject&&!(this.selectedObject instanceof on)&&(this.controls.enableRotate=!1),ne.info("[AxisPlaneSection] onDragStart:",e);let i=new A;this.sectionBox.getCenter(i),this.refrencePlane.setFromNormalAndCoplanarPoint(this.camera.getWorldDirection(this.refrencePlane.normal),i),null==(t=this.raycaster)||t.ray.intersectPlane(this.refrencePlane,this.lastWorldPos)}onDragMove(e){var t,i,r;if(!this.lastWorldPos||!this.selectedObject||!this.clipPlane||!this.planeMesh||!this.gizmo||this.selectedObject&&this.selectedObject instanceof on)return;let n=new A;null==(t=this.raycaster)||t.ray.intersectPlane(this.refrencePlane,n);let s=this.selectedObject.userData.actionType,a=(new A).subVectors(this.lastWorldPos,this.center).normalize(),o=(new A).subVectors(n,this.center).normalize(),l=(new A).subVectors(n,this.lastWorldPos).projectOnVector(Ha.clone().applyQuaternion(this.gizmo.quaternion)),h=a.angleTo(o),u=(new A).crossVectors(a,o),c=new A;this.sectionBox.getSize(c);let p,d=Math.max(c.x,c.y,c.z);switch(s){case"TranslateX":case"TranslateY":case"TranslateZ":p=(new A).addVectors(this.gizmo.position,l),this.sectionBox.clone().setFromCenterAndSize(this.center,new A(d,d,d)).containsPoint(p)&&(null==(i=this.gizmo)||i.position.add(l),null==(r=this.planeMesh)||r.position.add(l));break;case"RotateX":{let e=Ha.clone().applyQuaternion(this.gizmo.quaternion);u.dot(e)<0&&(h=-h),this.gizmo.rotateX(h),this.planeMesh.rotatePlane(e,h)}break;case"RotateY":{let e=rm.clone().applyQuaternion(this.gizmo.quaternion);u.dot(e)<0&&(h=-h),this.gizmo.rotateY(h),this.planeMesh.rotatePlane(e,h)}break;case"RotateZ":{let e=im.clone().applyQuaternion(this.gizmo.quaternion);u.dot(e)<0&&(h=-h),this.gizmo.rotateZ(h),this.planeMesh.rotatePlane(e,h)}}this.clipPlane.setFromNormalAndCoplanarPoint(this.planeMesh.getPlaneNormal().negate(),this.gizmo.position),this.lastWorldPos=n}onDragEnd(e){this.selectedObject instanceof on||(this.controls&&!this.controls.enableRotate&&(this.controls.enableRotate=!0),this.activateSelectedObject(!1),this.dragStarted=!1,this.selectedObject=void 0,ne.info("[AxisPlaneSection] onDragEnd:",e))}getIntersectObjects(){return this.planeMesh&&this.gizmo?[this.planeMesh,this.gizmo]:[]}activateSelectedObject(e){this.selectedObject&&(this.selectedObject instanceof on?this.selectedObject.setActive(e):this.selectedObject.parent instanceof eu&&this.selectedObject.parent.setActive(e,this.selectedObject))}},VO=class extends mE{constructor(e){super("axis-section-pop-panel","轴向剖切",e.widgetContainer),this.axis="x",this.isVisible=!0,this.keydown=e=>{"Escape"===e.code&&this.destroy()},this.section=e.getActiveSection(),this.createGroupSelectLayout(),this.addGroupSelectItems(),this.createActiveSelectLayout(),this.addActiveItems(),window.addEventListener("keydown",this.keydown)}destroy(){super.destroy(),window.removeEventListener("keydown",this.keydown)}createGroupSelectLayout(){let e=document.createElement("div");e.classList.add("pop-panel-group-select"),this.body.appendChild(e),this.groupSelectNode=e}addGroupSelectItems(){let e=(e,t,i=!1)=>{let r=document.createElement("div");return r.classList.add("pop-panel-item"),r.setAttribute("itemName",e),r.append(t),i&&r.classList.add("active"),this.groupSelectNode&&this.groupSelectNode.appendChild(r),r},t=(e,t)=>s=>{s.stopPropagation(),this.activeItem!==e&&(i.classList.remove("active"),r.classList.remove("active"),n.classList.remove("active"),this.activeItem=e,t.classList.add("active"),this.section.setActiveAxis(e))},i=e("X","X",!0);i.onclick=t("X",i);let r=e("Y","Y");r.onclick=t("Y",r);let n=e("Z","Z");n.onclick=t("Z",n)}createActiveSelectLayout(){let e=document.createElement("div");e.classList.add("pop-panel-active-select"),this.body.appendChild(e),this.activeSelectNode=e}addActiveItems(){let e=(e,t)=>{let i=document.createElement("i");i.classList.add(uo),i.classList.add(t),e.innerHTML="",e.appendChild(i)},t=((t,i,r="")=>{let n=document.createElement("div");return n.classList.add("pop-panel-item"),i&&n.setAttribute("title",i),n.setAttribute("itemName",t),n.setAttribute("isActive","false"),e(n,r),n})("visible","隐藏剖切面","icon-hidesectionplane");t.onclick=()=>{this.isVisible=!this.isVisible,this.isVisible?(e(t,"icon-hidesectionplane"),t.setAttribute("title","隐藏剖切面")):(e(t,"icon-showsectionplane"),t.setAttribute("title","显示剖切面")),this.section.setSectionVisible(this.isVisible)}}},zO=class extends mE{constructor(e){super("pick-section-pop-panel","拾取面剖切",e.widgetContainer),this.isVisible=!0,this.enabled=!0,this.keydown=e=>{"Escape"===e.code&&this.destroy()},this.section=e.getActiveSection(),this.createActiveSelectLayout(),this.addActiveItems(),window.addEventListener("keydown",this.keydown)}destroy(){super.destroy(),window.removeEventListener("keydown",this.keydown)}createActiveSelectLayout(){let e=document.createElement("div");e.classList.add("pop-panel-active-select"),this.body.appendChild(e),this.activeSelectNode=e}addActiveItems(){let e=(e,t)=>{let i=document.createElement("i");i.classList.add(uo),i.classList.add(t),e.innerHTML="",e.appendChild(i)},t=(t,i,r="")=>{let n=document.createElement("div");return n.classList.add("pop-panel-item"),i&&n.setAttribute("title",i),n.setAttribute("itemName",t),n.setAttribute("isActive","false"),e(n,r),n},i=t("visible","隐藏剖切面","icon-hidesectionplane");i.onclick=()=>{this.enabled&&(this.isVisible=!this.isVisible,this.isVisible?(e(i,"icon-hidesectionplane"),i.setAttribute("title","隐藏剖切面")):(e(i,"icon-showsectionplane"),i.setAttribute("title","显示剖切面")),this.section.setSectionVisible(this.isVisible))},this.activeSelectNode&&this.activeSelectNode.appendChild(i),this.visibleNode=i;let r=t("reset","重置","icon-reset");r.onclick=t=>{t.stopPropagation(),this.enabled&&(this.isVisible=!0,e(i,"icon-hidesectionplane"),i.setAttribute("title","隐藏剖切面"),this.section.resetSection())},this.activeSelectNode&&this.activeSelectNode.appendChild(r),this.resetNode=r}enable(){this.enabled=!0,this.visibleNode&&this.visibleNode.classList.remove("disable")}disable(){this.enabled=!1,this.visibleNode&&this.visibleNode.classList.add("disable")}},Ql=(e=>(e.Distance="Distance",e.Area="Area",e.Angle="Angle",e.Coordinate="Coordinate",e))(Ql||{}),tu=class extends Ks{constructor(e,t,i,r,n){super(),this.mouseMoved=!1,this.mouseDowned=!1,this.mouseDownPositionX=-1,this.mouseDownPositionY=-1,this.tempEdgeMaterial=new vr({color:16711680}),this.snapPoint=void 0,this.mousedown=e=>{this.mouseDownPositionX=e.x,this.mouseDownPositionY=e.y,this.mouseMoved=!1,this.mouseDowned=!0},this.mousemove=e=>{if(this.lastMoveEvent=e,this.mouseDownPositionX>=0&&this.mouseDownPositionY>=0&&(Math.abs(e.x-this.mouseDownPositionX)>5||Math.abs(e.y-this.mouseDownPositionY)>5)&&(this.mouseMoved=!0),this.mouseDowned)return;let t=this.getIntersections(e);if(!t.length)return;let i=Date.now();this.handleSnap(t),ne.debug(`[BaseMeasurement] this.handleSnap costs ${(Date.now()-i)/1e3}s`),this.onMouseMove(this.snapPoint),this.viewer.enableRender()},this.mouseup=e=>{0===e.button&&(this.mouseDowned=!1),this.mouseMoved||this.onMouseClick(e)},this.dblclick=()=>{ne.info("[Measure] Double clicked")},this.keydown=e=>{if("Enter"===e.code){let e={x:0,y:0,pageX:0,pageY:0,clientX:0,clientY:0,deltaX:0,deltaY:0,button:2,movementX:0,movementY:0,deltaMode:0,pointerId:0,timestamp:0,buttons:0,pointerType:"mouse",altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1};this.onMouseClick(e)}else"Escape"===e.code&&this.cancel()},this.getIntersections=e=>{if(!this.raycaster)return[];this.raycaster&&this.raycaster.layers.disable(10);let t=this.viewer.getRaycastableObjectsByMouse(e);ne.debug(`[BaseMeasurement] The count of raycastable object is ${t.length}`,t);let i=Date.now(),r=this.raycaster.intersectObjects(t,!0)||[];return ne.debug(`[BaseMeasurement] this.raycaster.intersectObjects costs ${(Date.now()-i)/1e3}s`),this.renderer.clippingPlanes.length>0&&(r=r.filter((e=>this.renderer.clippingPlanes.every((function(t){return t.distanceToPoint(e.point)>0}))))),r},this.type=e,this.viewer=t,this.inputManager=i,this.drawList=r,this.osnapHelper=n}get canvas(){var e;return null==(e=this.viewer.renderer)?void 0:e.domElement}get camera(){return this.viewer.camera}get renderer(){return this.viewer.renderer}get isActive(){return!!this.raycaster}get isMeasuring(){return this.isActive&&!this.completed}activate(){this.inputManager.addEventListener("pointerdown",this.mousedown),this.inputManager.addEventListener("pointermove",this.mousemove),this.inputManager.addEventListener("pointerup",this.mouseup),this.inputManager.addEventListener("dblclick",this.dblclick),this.inputManager.addEventListener("keydown",this.keydown);let e=this.viewer.translate;if(e){this.tooltip=new mh("measure-tooltip",e("Tooltip.measure"),{followPointer:!0,showOnCreate:!0,parentNode:this.viewer.widgetContainer,target:this.canvas});let t=document.getElementById("measure-tooltip");t&&(t.style.pointerEvents="none")}this.setTooltipContent(),this.raycaster=this.viewer.getRaycaster()}deactivate(){var e,t;this.inputManager.removeEventListener("pointerdown",this.mousedown),this.inputManager.removeEventListener("pointermove",this.mousemove),this.inputManager.removeEventListener("pointerup",this.mouseup),this.inputManager.removeEventListener("dblclick",this.dblclick),this.inputManager.removeEventListener("keydown",this.keydown),null==(e=this.tooltip)||e.hide(),null==(t=this.tooltip)||t.destroy(),this.tooltip=void 0,this.raycaster=void 0,this.currentMeasureDrawable&&this.removeDrawable(this.currentMeasureDrawable),this.osnapHelper.deactivate(),this.drawingPoints=void 0,this.currentMeasureDrawable=void 0,this.lastMouseDownPosition=void 0}removeDrawable(e){this.drawList.removeDrawable(e)}clearClickedDrawable(){this.clickedOnMeasurementDrawable&&(this.clickedOnMeasurementDrawable.selected=!1,this.clickedOnMeasurementDrawable=void 0)}onMouseClick(e){let t=Date.now();if(!(this.lastClickTime&&t-this.lastClickTime<500)&&(this.lastClickTime=t,this.clickedOnMeasurementDrawable=void 0,null==this.completed||!0===this.completed)){let t=this.getIntersections(e)[0];if(t){let e=this.drawList.getDrawableByPosition(t.point,this.raycaster);e&&(this.dispatchEvent("clickedonmeasurement",e),this.clickedOnMeasurementDrawable=e)}}}getIntersectsOutline(e){var t,i;let r=[];for(let i=0;ie instanceof nn?0:e instanceof li?2:e instanceof Ir?1:3;n.sort(((t,i)=>{let r=e(t.object),n=e(i.object);return r!==n?r-n:t.distance-i.distance}))}}n=this.getIntersectsOutline(n),ne.debug("[BaseMeasurement] filteredIntersections:",n),this.snapPoint=(null==(i=this.osnapHelper.handleSnap(r,n,this.viewer.is3d(),this.lastMouseDownPosition))?void 0:i.clone())||e[0].point.clone(),this.snapPoint||(this.viewer.is3d()?this.snapPoint=e[0].point:this.snapPoint=r)}};tu.MAX_DISTANCE=5e3;var ia=class extends Aa{constructor(e,t){super(e),this.type="Distance",this.labelBounds=new rs,this.drawing=!1,this.update(t)}setDrawingState(e){this.drawing=e}drawSelect(e,t){let i=this.getVertexs();this.drawPoints(e,t,i)}drawPoints(e,t,i){e.save(),e.fillStyle=ia.MAJOR_COLOR,e.strokeStyle=ia.MINOR_COLOR,e.lineWidth=ia.LINE_WIDTH,e.beginPath(),i.forEach((i=>{let r=this.transToScreenCoord(i,t);e.moveTo(r.x+ia.POINT_RADIUS,r.y),e.arc(r.x,r.y,ia.POINT_RADIUS,0,2*Math.PI)})),e.closePath(),e.fill(),e.stroke(),e.restore()}drawText(e,t){if(!this.label||!this.labelPositon)return;e.font=`${ia.LABEL_FONT_SIZE}px Arial`;let i=1.2*e.measureText(this.label).width,r=1.5*ia.LABEL_FONT_SIZE;this.labelBounds.setFromCenterAndSize(this.labelPositon,new le(i,r)),this.drawRoundRect(e,this.labelPositon.x-i/2,this.labelPositon.y-r/2,i,r,4),e.save(),e.fillStyle=ia.MINOR_COLOR,e.textBaseline="middle",e.textAlign="center",e.fillText(this.label,this.labelPositon.x,this.labelPositon.y),e.restore()}drawRoundRect(e,t,i,r,n,s){r<2*s&&(s=r/2),n<2*s&&(s=n/2),e.save(),e.fillStyle=ia.MAJOR_COLOR,e.strokeStyle=ia.MINOR_COLOR,e.lineWidth=ia.LINE_WIDTH,e.beginPath(),e.moveTo(t+s,i),e.arcTo(t+r,i,t+r,i+n,s),e.arcTo(t+r,i+n,t,i+n,s),e.arcTo(t,i+n,t,i,s),e.arcTo(t,i,t+r,i,s),e.closePath(),e.fill(),this.selected&&e.stroke(),e.restore()}getVertexs(){return this.points}update(e){let{min:t,max:i}=(new Dt).setFromPoints(e);return this.x=t.x,this.y=t.y,this.width=Math.abs(i.x-t.x),this.height=Math.abs(i.y-t.y),this.points=e,this}getBounds(){let e=this.getVertexs();return(new Dt).setFromPoints(e)}getData(){return{id:this.id,type:this.type,points:this.points.map((e=>[e.x,e.y,e.z]))}}setData(e){super.setData(e),this.setLineColor(ia.MAJOR_COLOR),this.setFillColor(ia.AREA_FILL_COLOR),this.setLineWidth(ia.LINE_WIDTH)}isPointInPath(e,t){let i=null==t?void 0:t.ray;if(!i)return!1;let r=3*this.tolerance,n=this.transToScreenCoord(e,t.camera);if(this.labelBounds.containsPoint(n))return!0;let s=new A,a=new A,o=this.points;for(let e=0;e{let n=this.transToScreenCoord(i,t);0===r?e.moveTo(n.x,n.y):e.lineTo(n.x,n.y)})),3===this.points.length){let[i,r,n]=this.points.map((e=>this.transToScreenCoord(e,t))),s=(new le).subVectors(i,r).normalize(),a=(new le).subVectors(n,r).normalize(),o=Math.min(i.distanceTo(r),n.distanceTo(r)),l=s.angle(),h=a.angle();e.moveTo(r.x,r.y),e.arc(r.x,r.y,o/5,l,h,s.cross(a)<0)}e.stroke(),e.restore(),this.drawing&&this.drawPoints(e,t,this.points.slice(0,this.points.length-1)),this.drawText(e,t)}drawText(e,t){if(this.points.length<3)return;let[i,r,n]=this.points,s=this.getAngleBisector(i,r,n),a=this.calculateAngle(i,r,n);this.label=`${Wu(a,2)} ${this.getUnitString()}`;let o=.3*Math.min(i.distanceTo(r),n.distanceTo(r));this.labelPositon=this.transToScreenCoord(r.clone().add(new A(s.x*o,s.y*o,s.z*o)),t),super.drawText(e,t)}getAngleBisector(e,t,i){let r=e,n=t,s=i,a=new A(r.x-n.x,r.y-n.y,r.z-n.z).normalize(),o=new A(s.x-n.x,s.y-n.y,s.z-n.z).normalize();return new A(a.x+o.x,a.y+o.y,a.z+o.z).normalize()}calculateAngle(e,t,i){let r=e,n=t,s=i,a=new A(r.x-n.x,r.y-n.y,r.z-n.z),o=new A(s.x-n.x,s.y-n.y,s.z-n.z);return 180*a.angleTo(o)/Math.PI}getClassType(){return"Angle"}};wr._registerDrawableClass(H_);var jO=class extends tu{constructor(e,t,i,r){super("Angle",e,t,i,r)}onMouseMove(e){this.createOrUpdateAngleMeasureDrawable(e)}onMouseClick(e){var t;if(super.onMouseClick(e),this.clickedOnMeasurementDrawable)return;if(this.drawingPoints||(this.drawingPoints=[]),2===e.button)return this.drawingPoints=void 0,this.currentMeasureDrawable&&(this.removeDrawable(this.currentMeasureDrawable),this.currentMeasureDrawable=void 0),this.mouseDowned=!1,this.mouseMoved=!1,this.completed=void 0,this.snapPoint=void 0,void(this.lastMouseDownPosition=void 0);let i=this.getIntersections(e)[0];if(!i)return;let r=null!=(t=this.snapPoint)?t:null==i?void 0:i.point,n=this.drawingPoints;n.push(r),this.lastMouseDownPosition=r,1===n.length&&(this.dispatchEvent("firstpointpicked"),this.completed=!1),this.createOrUpdateAngleMeasureDrawable(),n.length>=3&&this.complete()}complete(){var e;null==(e=this.currentMeasureDrawable)||e.setDrawingState(!1),this.dispatchEvent("complete",this.currentMeasureDrawable),this.completed=!0,this.currentMeasureDrawable=void 0,this.drawingPoints=void 0,this.lastMouseDownPosition=void 0}cancel(){let e=this.drawingPoints;if(e&&e.length>0){if(e.pop(),0===e.length&&(this.currentMeasureDrawable&&(this.removeDrawable(this.currentMeasureDrawable),this.currentMeasureDrawable=void 0),this.completed=!0),this.lastMoveEvent){let e=this.getIntersections(this.lastMoveEvent)[0];e&&this.onMouseMove(e.point)}}else this.deactivate(),this.dispatchEvent("deactivate",this.type);this.osnapHelper.deactivate(),this.lastMouseDownPosition=void 0}deactivate(){super.deactivate(),this.currentMeasureDrawable&&this.removeDrawable(this.currentMeasureDrawable)}setTooltipContent(){var e;let t=this.viewer.translate;if(!t)return;let i=t("Tooltip.measure");i&&this.tooltip&&(null==(e=this.tooltip)||e.setContent(i))}createOrUpdateAngleMeasureDrawable(e){if(!this.drawingPoints||this.drawingPoints&&this.drawingPoints.length<1)return;let t=[...this.drawingPoints];this.currentMeasureDrawable||(this.currentMeasureDrawable=new H_(_t.guid(),this.drawingPoints),this.drawList.addDrawable(this.currentMeasureDrawable)),e&&t.push(e),this.currentMeasureDrawable.update(t),this.currentMeasureDrawable.setDrawingState(!0)}},U_=class extends Ni{constructor(e,t){super(e,t),this.type="Area",this.update(t)}draw(e,t){let i=this.points;e.save(),e.lineWidth=Ni.LINE_WIDTH,e.strokeStyle=Ni.MAJOR_COLOR,e.fillStyle=Ni.AREA_FILL_COLOR,e.beginPath(),i.forEach(((i,r)=>{let n=this.transToScreenCoord(i,t);0===r?e.moveTo(n.x,n.y):e.lineTo(n.x,n.y)})),e.closePath(),e.fill(),e.stroke(),e.restore(),this.drawing&&this.drawPoints(e,t,this.points.slice(0,this.points.length-1)),this.drawText(e,t)}drawText(e,t){let i=this.points,r=this.calculateArea(i);this.label=`${Wu(r,2)}`,this.labelPositon=this.transToScreenCoord(this.getBarycenter(i),t),super.drawText(e,t)}calculateArea(e){let t=0,i=Cf.getFaces(e);for(let r=0;r{i+=e.x,r+=e.y,n+=e.z})),new A(i/t,r/t,n/t)}isPointInPath(e,t){let i=null==t?void 0:t.ray;if(!i)return!1;let r=this.transToScreenCoord(e,t.camera);if(this.labelBounds.containsPoint(r))return!0;let n=Cf.getFaces(this.points);for(let t=0;t=3&&!Cf.arePointsCoplanar([...r,s])?ne.warn("[Measure] The position is not coplanar with other points"):(r.push(s),this.lastMouseDownPosition=s,1===r.length&&(this.dispatchEvent("firstpointpicked"),this.completed=!1),this.createOrUpdateAreaMeasureDrawable())}complete(){var e;null==(e=this.currentMeasureDrawable)||e.setDrawingState(!1),this.dispatchEvent("complete",this.currentMeasureDrawable),this.completed=!0,this.drawingPoints=void 0,this.currentMeasureDrawable=void 0,this.lastMouseDownPosition=void 0}cancel(){let e=this.drawingPoints;if(e&&e.length>0){if(e.pop(),0===e.length&&(this.currentMeasureDrawable&&(this.removeDrawable(this.currentMeasureDrawable),this.currentMeasureDrawable=void 0),this.completed=!0),this.lastMoveEvent){let e=this.getIntersections(this.lastMoveEvent)[0];e&&this.onMouseMove(e.point)}}else this.deactivate(),this.dispatchEvent("deactivate",this.type);this.osnapHelper.deactivate(),this.lastMouseDownPosition=void 0}deactivate(){super.deactivate(),this.currentMeasureDrawable&&this.removeDrawable(this.currentMeasureDrawable)}setTooltipContent(){var e;let t=this.viewer.translate;if(t){let i=t("Tooltip.areaMeasurement");i&&this.tooltip&&(null==(e=this.tooltip)||e.setContent(i))}}createOrUpdateAreaMeasureDrawable(e){if(!this.drawingPoints||this.drawingPoints&&this.drawingPoints.length<1)return;let t=[...this.drawingPoints];this.currentMeasureDrawable||(this.currentMeasureDrawable=new U_(_t.guid(),this.drawingPoints),this.drawList.addDrawable(this.currentMeasureDrawable)),e&&t.push(e),this.currentMeasureDrawable.update(t),this.currentMeasureDrawable.setDrawingState(!0)}},B_=class extends Ni{constructor(e,t){super(e,t),this.type="Coordinate",this.update(t)}draw(e,t){this.drawText(e,t),e.save(),e.lineWidth=Ni.LINE_WIDTH,e.strokeStyle=Ni.MAJOR_COLOR,e.fillStyle=Ni.AREA_FILL_COLOR;let i=this.points;e.beginPath(),i.forEach((i=>{let r=this.transToScreenCoord(i,t);e.arc(r.x,r.y,Ni.POINT_RADIUS,0,2*Math.PI)})),e.fill(),e.stroke(),e.restore()}drawText(e,t){let i=this.points[0];sr.areNumbersEqual(i.x,0);let r=sr.areNumbersEqual(i.x,0)?0:i.x,n=sr.areNumbersEqual(i.y,0)?0:i.y,s=sr.areNumbersEqual(i.z,0)?0:i.z;this.label=`${Wu(r,2)}, ${Wu(n,2)}, ${Wu(s,2)}`,e.font=`${Ni.LABEL_FONT_SIZE}px Arial`;let a=1.2*e.measureText(this.label).width,o=1.5*Ni.LABEL_FONT_SIZE;this.labelPositon=this.transToScreenCoord(i,t),this.labelPositon.y-=o/2,this.labelBounds.setFromCenterAndSize(this.labelPositon,new le(a,o)),this.drawRoundRect(e,this.labelPositon.x-a/2,this.labelPositon.y-o/2,a,o,4),e.save(),e.fillStyle=Ni.MINOR_COLOR,e.textBaseline="middle",e.textAlign="center",e.fillText(this.label,this.labelPositon.x,this.labelPositon.y),e.restore()}getClassType(){return"Coordinate"}};wr._registerDrawableClass(B_);var qO=class extends tu{constructor(e,t,i,r){super("Coordinate",e,t,i,r)}onMouseMove(e){this.createOrUpdatePointMarker(e)}onMouseClick(e){var t;if(super.onMouseClick(e),this.clickedOnMeasurementDrawable)return;if(this.drawingPoints||(this.drawingPoints=[]),2===e.button)return this.drawingPoints=void 0,this.currentMeasureDrawable&&(this.removeDrawable(this.currentMeasureDrawable),this.currentMeasureDrawable=void 0),this.mouseDowned=!1,this.mouseMoved=!1,this.completed=void 0,this.snapPoint=void 0,void(this.lastMouseDownPosition=void 0);let i=this.getIntersections(e)[0];if(!i)return;let r=null!=(t=this.snapPoint)?t:null==i?void 0:i.point,n=this.drawingPoints;n.push(r),this.lastMouseDownPosition=r,1===n.length&&(this.dispatchEvent("firstpointpicked"),this.completed=!1),this.createOrUpdatePointMarker(r),n.length>=1&&this.complete()}complete(){this.dispatchEvent("complete",this.currentMeasureDrawable),this.completed=!0,this.drawingPoints=void 0,this.currentMeasureDrawable=void 0,this.lastMouseDownPosition=void 0}cancel(){let e=this.drawingPoints;if(e&&e.length>0){if(e.pop(),0===e.length&&(this.completed=!0),this.lastMoveEvent){let e=this.getIntersections(this.lastMoveEvent)[0];e&&this.onMouseMove(e.point)}}else this.deactivate(),this.dispatchEvent("deactivate",this.type);this.osnapHelper.deactivate(),this.drawingPoints=void 0,this.currentMeasureDrawable=void 0,this.lastMouseDownPosition=void 0}setTooltipContent(){var e;let t=this.viewer.translate;if(t){let i=t("Tooltip.measure");i&&this.tooltip&&(null==(e=this.tooltip)||e.setContent(i))}}createOrUpdatePointMarker(e){if(!this.drawingPoints||this.drawingPoints&&this.drawingPoints.length<1)return;let t=[...this.drawingPoints];this.currentMeasureDrawable||(this.currentMeasureDrawable=new B_(_t.guid(),this.drawingPoints),this.currentMeasureDrawable.selected=!0,this.drawList.addDrawable(this.currentMeasureDrawable)),e&&t.push(e),this.currentMeasureDrawable.update(t)}},mG=class extends Ni{constructor(e,t){super(e,t),this.type="Distance",this.update(t)}draw(e,t){let i=this.points;e.save(),e.lineWidth=Ni.LINE_WIDTH,e.strokeStyle=Ni.MAJOR_COLOR,e.beginPath(),i.forEach(((i,r)=>{let n=this.transToScreenCoord(i,t);0===r?e.moveTo(n.x,n.y):e.lineTo(n.x,n.y)})),e.closePath(),e.stroke(),e.restore(),this.drawing?this.drawPoints(e,t,this.points.slice(0,this.points.length-1)):this.selected||this.drawVerticalLine(e,t),this.drawText(e,t)}drawText(e,t){if(this.points.length<2)return;let[i,r]=this.points,n=i.distanceTo(r);this.label=`${Wu(n,2)}`,this.labelPositon=this.transToScreenCoord(i.clone().add(r).divideScalar(2),t),super.drawText(e,t)}drawVerticalLine(e,t){if(this.points.length<2)return;let[i,r]=this.points.map((e=>this.transToScreenCoord(e,t))),[n,s]=this.getShortLineBySegments(i,r),[a,o]=this.getShortLineBySegments(r,i);e.save(),e.lineWidth=Ni.LINE_WIDTH,e.strokeStyle=Ni.MAJOR_COLOR,e.beginPath(),e.moveTo(n.x,n.y),e.lineTo(s.x,s.y),e.moveTo(a.x,a.y),e.lineTo(o.x,o.y),e.stroke(),e.restore()}getShortLineBySegments(e,t){let i=(new le).subVectors(t,e).normalize(),r=mG.SHORT_LINE_LENGTH/2,n=Math.PI/2;return[i.clone().rotateAround(new le,n).normalize().multiplyScalar(r).add(e),i.clone().rotateAround(new le,-n).normalize().multiplyScalar(r).add(e)]}getClassType(){return"Distance"}},gE=mG;gE.SHORT_LINE_LENGTH=12,wr._registerDrawableClass(gE);var na,YO=class extends tu{constructor(e,t,i,r){super("Distance",e,t,i,r)}onMouseMove(e){this.createOrUpdateDistanceMeasureDrawable(e)}onMouseClick(e){var t;if(super.onMouseClick(e),this.clickedOnMeasurementDrawable)return;if(this.drawingPoints||(this.drawingPoints=[]),2===e.button)return this.drawingPoints=void 0,this.currentMeasureDrawable&&(this.removeDrawable(this.currentMeasureDrawable),this.currentMeasureDrawable=void 0),this.mouseDowned=!1,this.mouseMoved=!1,this.completed=void 0,this.snapPoint=void 0,void(this.lastMouseDownPosition=void 0);let i=this.getIntersections(e)[0];if(!i)return;let r=null!=(t=this.snapPoint)?t:null==i?void 0:i.point,n=this.drawingPoints;n.length<2&&n.push(r),this.lastMouseDownPosition=r,1===n.length&&(this.dispatchEvent("firstpointpicked"),this.completed=!1),this.createOrUpdateDistanceMeasureDrawable(),n.length>=2&&this.complete()}complete(){var e;null==(e=this.currentMeasureDrawable)||e.setDrawingState(!1),this.dispatchEvent("complete",this.currentMeasureDrawable),this.completed=!0,this.drawingPoints=void 0,this.currentMeasureDrawable=void 0,this.lastMouseDownPosition=void 0}cancel(){let e=this.drawingPoints;e&&e.length>0?(e.pop(),0===e.length&&(this.completed=!0),this.currentMeasureDrawable&&this.removeDrawable(this.currentMeasureDrawable)):(this.deactivate(),this.dispatchEvent("deactivate",this.type)),this.osnapHelper.deactivate(),this.drawingPoints=void 0,this.currentMeasureDrawable=void 0,this.lastMouseDownPosition=void 0}deactivate(){super.deactivate(),this.currentMeasureDrawable&&this.removeDrawable(this.currentMeasureDrawable)}setTooltipContent(){var e;let t=this.viewer.translate;if(t){let i=t("Tooltip.measure");i&&this.tooltip&&(null==(e=this.tooltip)||e.setContent(i))}}createOrUpdateDistanceMeasureDrawable(e){if(!this.drawingPoints||this.drawingPoints&&this.drawingPoints.length<1)return;let t=[...this.drawingPoints];this.currentMeasureDrawable||(this.currentMeasureDrawable=new gE(_t.guid(),this.drawingPoints),this.drawList.addDrawable(this.currentMeasureDrawable)),e&&t.push(e),this.currentMeasureDrawable.update(t),this.currentMeasureDrawable.setDrawingState(!0)}},XO=class extends cE{constructor(e,t=30){super(t),this.manager=e}undo(){let e=super.undo();switch(null==e?void 0:e.type){case"ADD":{let t=e.payload.id;t&&this.manager.removeMeasurementById(t,!1)}break;case"REMOVE":{let t=e.payload,i=this.manager.createMeasurement(t);this.manager.addMeasurement(i,!1)}}return e}redo(){let e=super.redo();switch(null==e?void 0:e.type){case"ADD":{let t=e.payload,i=this.manager.createMeasurement(t);this.manager.addMeasurement(i,!1)}break;case"REMOVE":{let t=e.payload.id;t&&this.manager.removeMeasurementById(t,!1)}}return e}},ru=class{constructor(e,t){var i;this.selectedMeasurementDrawable=void 0,this.drawableList=new Xu("measure"),this.measurements={},this.activeMeasurementType=void 0,this.undoRedoHelper=new XO(this),this.keydown=e=>{let t,i=this.getActiveMeasurementType();i&&(t=this.measurements[i]);let r=this.selectedMeasurementDrawable;r&&"Delete"===e.code&&(this.removeMeasurement(r),this.activeMeasurementType&&this.measurements[this.activeMeasurementType].clearClickedDrawable()),e.ctrlKey&&"KeyZ"===e.code&&(null!=t&&t.isMeasuring?t.cancel():this.undo()),e.ctrlKey&&"KeyY"===e.code&&(null!=t&&t.isMeasuring||this.redo()),this.viewer.enableRender()},this.viewer=e,this.inputManager=t,this.overlayRender=this.viewer.overlayRender,null==(i=this.overlayRender)||i.addDrawableList(this.drawableList),this.scene=new Pn,this.osnapHelper=new DO(this.overlayRender),this.measurements.Distance=new YO(this.viewer,t,this.drawableList,this.osnapHelper),this.measurements.Area=new WO(this.viewer,t,this.drawableList,this.osnapHelper),this.measurements.Angle=new jO(this.viewer,t,this.drawableList,this.osnapHelper),this.measurements.Coordinate=new qO(this.viewer,t,this.drawableList,this.osnapHelper),this.inputManager.addEventListener("wheel",(()=>{this.updateSnapTolerance()})),this.initEvents()}initEvents(){Object.values(this.measurements).forEach((e=>{e.addEventListener("complete",(e=>{this.undoRedoHelper.addRecord("ADD",e.getData()),this.selectMeasurement(e)})),e.addEventListener("deactivate",(()=>{this.osnapHelper.deactivate(),this.viewer.deactivateMeasurement()})),e.addEventListener("firstpointpicked",(()=>{this.unselectMeasurement()})),e.addEventListener("clickedonmeasurement",(e=>{this.selectMeasurement(e)}))}))}get canvas(){var e;return null==(e=this.viewer.renderer)?void 0:e.domElement}get raycaster(){return this.viewer.getRaycaster()}getPixelSizeInWorldCoord(){let e=this.viewer.camera,{width:t,height:i}=this.canvas,r=0;if("OrthographicCamera"===e.type){let n=e;r=Math.max(n.right-n.left,n.top-n.bottom)/n.zoom/Math.max(t,i)}else if("PerspectiveCamera"===e.type){let t=e,n=this.viewer.cameraCfg,s=n&&_t.arrayToVector3(n.eye),a=n&&_t.arrayToVector3(n.look);r=s.distanceTo(a)*Math.tan(t.fov/2*Math.PI/180)*2/i}return r}addMeasurement(e,t=!0){this.drawableList.addDrawable(e),this.selectedMeasurementDrawable=e,t&&this.undoRedoHelper.addRecord("ADD",e.getData()),this.viewer.enableRender()}createMeasurement(e){return wr.createDrawable(e)}removeMeasurement(e,t=!0){this.drawableList.removeDrawable(e),this.selectedMeasurementDrawable=void 0,t&&this.undoRedoHelper.addRecord("REMOVE",e.getData()),this.viewer.enableRender()}updateSnapTolerance(e=3){let t=this.getPixelSizeInWorldCoord()*e;this.osnapHelper.updateSnapTolerance(t)}activateMeasurement(e){this.activeMeasurementType&&this.deactivateMeasurement(),this.measurements[e]?(this.measurements[e].activate(),this.activeMeasurementType=e,this.updateSnapTolerance()):(this.activeMeasurementType=void 0,ne.error("[Measure] Failed to activate measurement, type:",e)),this.inputManager.addEventListener("keydown",this.keydown)}deactivateMeasurement(){this.unselectMeasurement();let e=this.activeMeasurementType;e&&this.measurements[e].deactivate(),this.activeMeasurementType=void 0,this.inputManager.removeEventListener("keydown",this.keydown)}getActiveMeasurementType(){return this.activeMeasurementType}isMeasurementActive(){let e=this.activeMeasurementType;return e?this.measurements[e].isActive:!!this.getActiveMeasurementType()}getMeasurementsData(){return this.drawableList.getDrawableDatas()}setMeasurementsData(e){this.drawableList.clear(),e.forEach((e=>{this.measurements[e.type]?e.points.length>=2?this.addMeasurement(wr.createDrawable(e),!1):ne.info("[Measure] Invalid points found in MeasurementData:",e):ne.warn("[Measure] Failed to add measurement data for",e)}))}setMeasurementVisibility(e,t){let i=this.drawableList.getDrawables().get(e);return!!i&&(i.visible=t,this.viewer.enableRender(),!0)}setMeasurementsVisibility(e){this.drawableList.getDrawables().forEach((t=>t.visible=e)),this.viewer.enableRender()}clearMeasurements(){this.drawableList.clear(),this.viewer.enableRender()}removeMeasurementById(e,t=!0){let i=this.drawableList.getDrawableById(e);i&&(this.removeMeasurement(i,t),ne.warn("[Measure] Failed to find measurement by id:",e))}selectMeasurementById(e){this.unselectMeasurement();let t=this.drawableList.getDrawableById(e);t&&(t.selected=!0,this.selectedMeasurementDrawable=t),this.viewer.enableRender()}selectMeasurement(e){this.unselectMeasurement(),e.selected=!0,this.selectedMeasurementDrawable=e,this.viewer.enableRender()}unselectMeasurement(){this.selectedMeasurementDrawable&&(this.selectedMeasurementDrawable.selected=!1),this.selectedMeasurementDrawable=void 0,this.viewer.enableRender()}undo(){this.undoRedoHelper.undo()}redo(){this.undoRedoHelper.redo()}clearUndoRedo(){this.undoRedoHelper.clear()}destroy(){var e;this.deactivateMeasurement(),this.clearMeasurements(),this.measurements={},null==(e=this.osnapHelper)||e.destroy(),this.scene.clear(),this.undoRedoHelper.destroy()}},wDe={HomeView:{icon:{default:"icon-home",active:"icon-home-filled"},menuName:"Toolbar.homeView",type:1,onClick:e=>{e.goToHomeView()}},OrthoMode:{icon:{default:"icon-orthomode",active:"icon-orthomode-filled"},menuName:"Toolbar.orthoView",type:4,onActive:e=>{ne.info("[Toolbar]","Enter OrthoMode"),e.setToOrthographicCamera(!0)},onDeactive:e=>{ne.info("[Toolbar]","Exit OrthoMode"),e.setToOrthographicCamera(!1)}},Measure:{icon:{default:"icon-measure",active:"icon-measure-filled"},menuName:"Toolbar.measurement",type:3,children:{MeasureDistance:{icon:{default:"icon-distancemeasure",active:"icon-distancemeasure-filled"},menuName:"Toolbar.distanceMeasurement",onActive:e=>{e.deactivateSection(),e.activateMeasurement("Distance")},onDeactive:e=>{e.deactivateMeasurement()},type:4,mutexIds:["MeasureArea","MeasureAngle","MeasureCoordinate"]},MeasureArea:{icon:{default:"icon-areameasure",active:"icon-areameasure-filled"},onActive:e=>{e.deactivateSection(),e.activateMeasurement("Area")},onDeactive:e=>{e.deactivateMeasurement()},type:4,menuName:"Toolbar.areaMeasurement",mutexIds:["MeasureDistance","MeasureAngle","MeasureCoordinate"]},MeasureAngle:{menuName:"Toolbar.angleMeasurement",icon:{default:"icon-anglemeasure"},type:4,onActive:e=>{e.deactivateSection(),e.activateMeasurement("Angle")},onDeactive:e=>{e.deactivateMeasurement()},mutexIds:["MeasureDistance","MeasureArea","MeasureCoordinate"]},MeasureCoordinate:{menuName:"Toolbar.coordinateMeasurement",icon:{default:"icon-distancemeasure"},type:4,onActive:e=>{e.deactivateSection(),e.activateMeasurement("Coordinate")},onDeactive:e=>{e.deactivateMeasurement()},mutexIds:["MeasureDistance","MeasureArea","MeasureAngle"]},MeasureClear:{icon:{default:"icon-clear",active:"icon-clear-filled"},onClick:e=>{ne.debug("[Toolbar]","Clearing Measure",e),e.clearMeasurements()},type:1,menuName:"Toolbar.clearMeasurement"}},mutexIds:["Section","SectionAxis","SectionBox","SectionPlane"]},Section:{icon:{default:"icon-section",active:"icon-section-filled"},menuName:"Toolbar.section",type:3,children:{SectionAxis:{icon:{default:"icon-sectionplane",active:"icon-sectionplane-filled"},menuName:"Toolbar.axisSection",type:4,onActive:e=>{e.deactivateMeasurement(),e.getMeasurements().forEach((t=>e.setMeasurementVisibility(t.id,!1))),null==na||na.destroy(),e.activateSection("AxisPlaneSection"),na=new VO(e)},onDeactive:e=>{e.getMeasurements().forEach((t=>e.setMeasurementVisibility(t.id,!0))),e.deactivateSection(),null==na||na.destroy(),na=void 0},mutexIds:["SectionBox","SectionPlane"]},SectionPlane:{icon:{default:"icon-choosesectionplane",active:"icon-choosesectionplane-filled"},menuName:"Toolbar.pickSectionPlane",type:4,onActive:e=>{e.deactivateMeasurement(),e.getMeasurements().forEach((t=>e.setMeasurementVisibility(t.id,!1))),null==na||na.destroy(),e.activateSection("PickPlaneSection"),na=new zO(e)},onDeactive:e=>{e.getMeasurements().forEach((t=>e.setMeasurementVisibility(t.id,!0))),e.deactivateSection(),null==na||na.destroy(),na=void 0},mutexIds:["SectionAxis","SectionBox"]},SectionBox:{icon:{default:"icon-sectionbox",active:"icon-sectionbox-filled"},menuName:"Toolbar.sectionBox",type:4,onActive:e=>{e.deactivateMeasurement(),e.getMeasurements().forEach((t=>e.setMeasurementVisibility(t.id,!1))),e.activateSection()},onDeactive:e=>{e.getMeasurements().forEach((t=>e.setMeasurementVisibility(t.id,!0))),e.deactivateSection()},mutexIds:["SectionAxis","SectionPlane"]}},mutexIds:["Measure","MeasureDistance","MeasureArea","MeasureAngle","MeasureCoordinate"]},BimTree:{icon:{default:"icon-bimtree",active:"icon-bimtree-filled"},menuName:"Toolbar.bimTree",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Bim Tree")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Bim Tree")}},Viewpoint:{icon:{default:"icon-viewpoint",active:"icon-viewpoint-filled"},menuName:"Toolbar.viewpoint",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Viewpoint")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Viewpoint")},visible:!1},Annotation:{icon:{default:"icon-annotation",active:"icon-annotation-filled"},menuName:"Toolbar.annotation",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Annotation")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Annotation")},visible:!1},Property:{icon:{default:"icon-property",active:"icon-property-filled"},menuName:"Toolbar.property",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Property")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Property")},visible:!1},Settings:{icon:{default:"icon-settings",active:"icon-settings-filled"},menuName:"Toolbar.settings",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Settings")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Settings")},visible:!1},FullScreen:{icon:{default:"icon-fullscreen",active:"icon-fullscreen-filled"},menuName:"Toolbar.fullscreen",type:4,onClick:(e,t)=>{let i=()=>{let e=null==t?void 0:t.menuList.get("FullScreen");e&&e.setActive(_t.isFullScreen())};_t.isFullScreen()?(_t.exitFullscreen(),window.removeEventListener("resize",i)):_t.fullScreen(e.viewerContainer),window.addEventListener("resize",i)}}},RDe={SceneClear:{icon:{default:"icon-clear",active:"icon-clear-filled"},menuName:"clear",type:1,onClick:()=>{}}},MDe={HomeView:{icon:{default:"icon-zhushitu",active:"icon-zhushitu",iconFont:"iconfont"},menuName:"Toolbar.homeView",type:1,onClick:e=>{e.goToHomeView()}},ZoomToRectangle:{icon:{default:"icon-kuangxuanfangda",active:"icon-kuangxuanfangda",iconFont:"iconfont"},menuName:"Toolbar.zoomToRectangle",type:1,onClick:e=>{e.zoomToRect()}},GetScreenshot:{icon:{default:"icon-frame-clipping",active:"icon-frame-clipping",iconFont:"iconfont"},menuName:"Toolbar.screenshot",type:1,onClick:e=>{e.getScreenshot().then((e=>{ne.info("[Toolbar] getScreenshot() returns:",e),e||ne.error("[Toolbar] Failed to get screenshot!");let t=document.createElement("a");t.href=e,t.download="",t.click()})).catch((e=>{ne.error("[Toolbar] Failed to get screenshot, reason:",e)}))}},Measure:{icon:{default:"icon-celiang1",active:"icon-celiang1",iconFont:"iconfont"},menuName:"Toolbar.measurement",type:3,children:{MeasureDistance:{icon:{default:"icon-distancemeasure",active:"icon-distancemeasure-filled"},menuName:"Toolbar.distanceMeasurement",onActive:e=>{e.activateMeasurement("Distance")},onDeactive:e=>{e.deactivateMeasurement()},type:4,mutexIds:["MeasureArea","MeasureAngle","MeasureCoordinate"]},MeasureArea:{icon:{default:"icon-areameasure",active:"icon-areameasure-filled"},onActive:e=>{e.activateMeasurement("Area")},onDeactive:e=>{e.deactivateMeasurement()},type:4,menuName:"Toolbar.areaMeasurement",mutexIds:["MeasureDistance","MeasureAngle","MeasureCoordinate"]},MeasureAngle:{menuName:"Toolbar.angleMeasurement",icon:{default:"icon-anglemeasure"},type:4,onActive:e=>{e.activateMeasurement("Angle")},onDeactive:e=>{e.deactivateMeasurement()},mutexIds:["MeasureDistance","MeasureArea","MeasureCoordinate"]},MeasureCoordinate:{menuName:"Toolbar.coordinateMeasurement",icon:{default:"icon-distancemeasure"},type:4,onActive:e=>{e.activateMeasurement("Coordinate")},onDeactive:e=>{e.deactivateMeasurement()},visible:!1,mutexIds:["MeasureDistance","MeasureArea","MeasureAngle"]},MeasureClear:{icon:{default:"icon-clear",active:"icon-clear-filled"},onClick:e=>{ne.debug("[Toolbar]","Clearing Measure",e),e.clearMeasurements()},type:1,menuName:"Toolbar.clearMeasurement"}}},Markup:{icon:{default:"icon-tianjiapizhu",iconFont:"iconfont"},menuName:"Toolbar.markup",type:1,onClick:(e,t)=>{e.activateMarkup("CloudRectMarkup"),t.hide(),e.deactivateMeasurement(),new BO(e,Br({},EDe))}},Settings:{icon:{default:"icon-settings",active:"icon-settings-filled"},menuName:"Toolbar.settings",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Settings")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Settings")},visible:!0},Compared:{icon:{default:"icon-compared",iconFont:"iconfont"},menuName:"Toolbar.compared",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Compare")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Compare")},visible:!1},QuitCompare:{icon:{default:"icon-compared",iconFont:"iconfont"},menuName:"Toolbar.quitCompare",type:4,onActive:()=>{ne.info("[Toolbar]","Activate Compare")},onDeactive:()=>{ne.info("[Toolbar]","Deactivate Compare")},visible:!1},Layers:{icon:{default:"icon-tucengkongzhi",active:"icon-tucengkongzhi",iconFont:"iconfont"},menuName:"Toolbar.layers",type:4,onClick:()=>{}},FullScreen:{icon:{default:"icon-quanping",active:"icon-quanping",iconFont:"iconfont"},menuName:"Toolbar.fullscreen",type:4,onClick:(e,t)=>{let i=()=>{let e=null==t?void 0:t.menuList.get("FullScreen");e&&e.setActive(_t.isFullScreen())};_t.isFullScreen()?(_t.exitFullscreen(),window.removeEventListener("resize",i)):_t.fullScreen(e.viewerContainer),window.addEventListener("resize",i)}}},DDe={enableNavCube:!0,enableAxisGizmo:!0,enableToolbar:!0,enableBottomBar:!0,enableContextMenu:!0,enableSpinner:!0,containerId:"myCanvas",units:"meters"},eAr={enableNavCube:!1,enableAxisGizmo:!1,enableToolbar:!1,enableBottomBar:!1,enableContextMenu:!1,containerId:"myCanvas"},k_=class{constructor(e="uploadModelFile"){this.input=document.createElement("input"),this.input.id=e,this.input.type="file",this.input.multiple=!0,this.input.accept=this.formats().map((e=>"."+e)).join(","),this.input.style.display="none",this.input.onchange=e=>{let t=e.target.files;!t||t.length<=0?ne.error("[Uploader] No files to be uploaded!"):this.uploadFiles(t)}}formats(){return ne.warn("[Uploader]: Should call derived class instead!"),[]}uploadFiles(e){ne.warn(`[Uploader]: Should call derived class instead! files: ${e}`)}openFileBrowserToUpload(){this.input.click()}},$O=class extends k_{constructor(e,t){super(t),this.defaultModelConfig={src:"",position:[0,0,0],rotation:[0,0,0],scale:[1,1,1],instantiate:!1,merge:!1},this.viewer=e}formats(){return["gltf","glb","dxf","obj","stl","fbx","ifc","dae","*"]}uploadFiles(e){let t=e.length;if(0===t)return;let i,r,n,s=Br({},this.defaultModelConfig),a=new Map;for(let i=0;i{n&&(i=URL.createObjectURL(n),o.push(i),s.src=n.name)};if(n){l();let e=Bs.extractUrlBase(i);r=new Lp,r.setURLModifier((t=>{let i=decodeURI(t).replace(e,"").replace(/^(\.?\/)/,"");if(a.has(i)){let e=a.get(i),t=URL.createObjectURL(e);return o.push(t),t}return t}))}else n=e[0],l();this.viewer.loadLocalModel(i,s,r,(e=>{let t=Math.floor(100*e.loaded/e.total);ne.info(`[Uploader] Loading ${null==n?void 0:n.name}, ${t}%`)})).then((()=>{ne.info(`[Uploader] Loaded ${null==n?void 0:n.name}`),o.forEach(URL.revokeObjectURL)}))}},CDe=class extends k_{constructor(e,t){super(t),this.defaultModelConfig={src:"",position:[0,0,0],rotation:[0,0,0],scale:[1,1,1],instantiate:!1,merge:!0},this.viewer=e}formats(){return["dxf"]}uploadFiles(e){let t=e=>{let t=(100*e.loaded/e.total).toFixed(1);ne.info(`[Uploader] Progress: ${t}%`)};if(2===e.length){let i=e[0],r=e[1],n=URL.createObjectURL(i),s=URL.createObjectURL(r);this.viewer.compare({src:n,modelId:i.name},{src:s,modelId:r.name},t).then((()=>{this.onSuccess&&this.onSuccess({compare:!0}),ne.debug(`[Uploader] Compared models: ${n}, ${s}`)})).catch((e=>{ne.error(`[Uploader] Failed to compare models: ${n}, ${s}. reason: ${e}`)}))}else{let i=e[0],r=URL.createObjectURL(i),n=Br({},this.defaultModelConfig);n.src=r,n.modelId=i.name;try{this.viewer.loadModelAsync(n,t).then((()=>{this.onSuccess&&this.onSuccess({}),ne.info(`[Uploader] Loaded model '${n.src}'`)}))}catch(e){ne.info(e)}}}},ADe=class extends k_{constructor(e,t){super(t),this.viewer=e}formats(){return["png","jpg","jpeg"]}uploadFiles(e){let t={panoramas:[],id:"viewpoint_1",name:"",position:[0,1,0],initialDirection:[0,0,1]};if(1===e.length){let i=[];i.push(URL.createObjectURL(e[0])),t.panoramas.push({id:"panorama_1",images:i}),this.viewer.setViewpoints([t]),this.viewer.activatePanoramaById(t.id,t.panoramas[0].id)}else if(6===e.length){let i=t=>{let i="";for(let r=0;r({position:new A(e,t,i),rotation:new xr(r,n,s)}),mNt={Front:Dn(Br({},Ps([0,0,1],[0,0,0])),{label:"NavCube.front"}),Right:Dn(Br({},Ps([1,0,0],[0,$i,0])),{label:"NavCube.right"}),Back:Dn(Br({},Ps([0,0,-1],[0,Math.PI,0])),{label:"NavCube.back"}),Left:Dn(Br({},Ps([-1,0,0],[0,-$i,0])),{label:"NavCube.left"}),Top:Dn(Br({},Ps([0,1,0],[-$i,0,0])),{label:"NavCube.top"}),Bottom:Dn(Br({},Ps([0,-1,0],[$i,0,0])),{label:"NavCube.bottom"})},gNt=[Ps([0,1,1],[-vi,0,-$i]),Ps([0,1,-1],[-3*vi,0,-$i]),Ps([0,-1,1],[vi,0,-$i]),Ps([0,-1,-1],[3*vi,0,-$i]),Ps([1,1,0],[-$i,vi,0]),Ps([1,-1,0],[-$i,3*vi,0]),Ps([-1,1,0],[-$i,-vi,0]),Ps([-1,-1,0],[-$i,-3*vi,0]),Ps([1,0,1],[0,vi,0]),Ps([1,0,-1],[0,3*vi,0]),Ps([-1,0,1],[0,-vi,0]),Ps([-1,0,-1],[0,-3*vi,0])],vNt=[{position:new A(1,1,1),rotation:[new xr(-$i,$i,-vi),new xr(-$i,0,vi),new xr(0,0,3*vi)]},{position:new A(1,1,-1),rotation:[new xr(0,$i,3*vi),new xr(-$i,0,3*vi),new xr(0,Math.PI,-3*vi)]},{position:new A(-1,1,-1),rotation:[new xr(Math.PI,-$i,vi),new xr(-$i,0,-3*vi),new xr(0,Math.PI,3*vi)]},{position:new A(-1,1,1),rotation:[new xr(0,-$i,3*vi),new xr(-$i,0,-vi),new xr(0,0,-3*vi)]},{position:new A(1,-1,1),rotation:[new xr(0,$i,-vi),new xr(-$i,Math.PI,-vi),new xr(0,0,vi)]},{position:new A(1,-1,-1),rotation:[new xr(-$i,$i,3*vi),new xr($i,0,vi),new xr(0,Math.PI,-vi)]},{position:new A(-1,-1,1),rotation:[new xr(0,-$i,vi),new xr($i,0,-3*vi),new xr(0,0,-vi)]},{position:new A(-1,-1,-1),rotation:[new xr(0,-$i,-vi),new xr($i,0,-vi),new xr(0,Math.PI,vi)]}],ZO=class extends cr{constructor(e={}){super(),this.NAVCUBE_SIZE=100,this.clickHandler=e.onClick,(0,L0.forEach)(mNt,(e=>{this.createPlane(e)})),(0,L0.forEach)(gNt,(e=>{this.createEdge(e)})),(0,L0.forEach)(vNt,((e,t)=>{this.createCorner(e,t)}))}createPlane(e){let t=e.position.clone().multiplyScalar(this.NAVCUBE_SIZE/2),{rotation:i,label:r}=e,n=document.createElement("div");n.style.width=this.NAVCUBE_SIZE+"px",n.style.height=this.NAVCUBE_SIZE+"px",n.classList.add("navcube-plane"),n.classList.add("outer");let s=document.createElement("div");s.style.width=this.NAVCUBE_SIZE-4+"px",s.style.height=this.NAVCUBE_SIZE-4+"px",s.innerHTML=Th(r),s.classList.add("navcube-plane"),s.classList.add("inner"),n.appendChild(s);let a=new N0(n);a.position.copy(t),a.rotation.copy(i),this.add(a),n.addEventListener("click",(()=>{this.clickHandler&&this.clickHandler(t.clone().normalize(),i)}))}createEdge(e){let t=e.position.clone().multiplyScalar(this.NAVCUBE_SIZE/2),i=document.createElement("div");i.style.width="4px",i.style.height=this.NAVCUBE_SIZE-40+"px",i.style.background=NDe,i.classList.add("navcube-edge");let r=new N0(i);r.position.copy(t),r.rotation.copy(e.rotation),this.add(r),i.addEventListener("click",(()=>{this.clickHandler&&this.clickHandler(t.clone().normalize(),e.rotation)}))}createCorner(e,t){let i=i=>{i.addEventListener("click",(()=>{this.clickHandler&&this.clickHandler(e.position.clone().normalize(),new xr)})),i.addEventListener("mouseenter",(()=>{let e=document.getElementsByClassName("group-"+t);(0,L0.forEach)(e,(e=>{e instanceof HTMLElement&&e.classList.add("highlight")}))})),i.addEventListener("mouseleave",(()=>{let e=document.getElementsByClassName("group-"+t);(0,L0.forEach)(e,(e=>{e instanceof HTMLElement&&e.classList.remove("highlight")}))}))},r=e.position.clone().multiplyScalar(this.NAVCUBE_SIZE/2+.5),n=document.createElement("div");n.style.borderTop=14*Math.sqrt(3)+"px solid #efefef",n.style.borderLeft="14px solid transparent",n.style.borderRight="14px solid transparent",n.classList.add("navcube-corner"),n.classList.add("group-"+t);let s=new N0(n);s.position.copy(r).lerp(e.position,.14);let a=Math.atan2(r.z,r.x);s.rotateY(r.z*r.x<0?Math.PI+a:a);let o=(new xr).setFromVector3(r.clone().normalize());s.rotateX(-o.y),r.y<0&&s.rotateZ(Math.PI),this.add(s);let l=(t,n,s)=>{let a=document.createElement("div");a.style.borderTop=`13px solid ${NDe}`,a.style.borderLeft="13px solid transparent",a.style.borderRight="13px solid transparent",a.classList.add("navcube-corner-plane"),a.classList.add("group-"+n);let o=new N0(a),l=e.position.clone();l.setComponent(s,0),o.position.copy(r).sub(l),o.rotateX(t.x),o.rotateY(t.y),o.rotateZ(t.z),this.add(o),i(a)};(0,L0.forEach)(e.rotation,((e,i)=>{l(e,t,i)})),i(n)}},JO=class{constructor(e,t){this.height=150,this.width=150,this.width=e||this.width,this.height=t||this.height,this.init()}init(){this.initRenderer(),this.initScene(),this.animate()}initRenderer(){this.renderer=new KO,this.renderer.setSize(this.width,this.height),this.renderer.domElement.classList.add("css3d-navcube"),document.body.appendChild(this.renderer.domElement)}initScene(){this.scene=new Pn;let e=window.innerWidth/window.innerHeight,t=200;this.camera=new Ji(t*e/-2,t*e/2,100,-100,1,1e3),this.camera.position.set(-200,200,200),this.scene.add(this.camera);this.navCube=new ZO({onClick:e=>{if(!(this.camera&&e&&this.hostViewer&&this.hostViewer.camera&&this.hostViewer.controls))return;let t=this.hostViewer.controls instanceof $l?this.hostViewer.controls.getTarget(new A):this.hostViewer.controls.target,i=this.hostViewer.camera.position.distanceTo(t);this.hostViewer.flyTo(t.clone().add(e.clone().multiplyScalar(i)),t)}}),this.scene.add(this.navCube)}render(){this.renderer&&this.scene&&this.camera&&(this.update(),this.renderer.render(this.scene,this.camera))}animate(){requestAnimationFrame(this.animate.bind(this)),this.render()}setHostViewer(e){this.hostViewer=e,this.update()}update(){if(!this.hostViewer||!this.hostViewer.camera)return;let e=this.hostViewer.camera;if(e){let t=new A;e.getWorldDirection(t);let i=e.up;this.updateCameraDirection(t,i)}}updateCameraDirection(e,t){if(!this.camera||!e)return;e.normalize();this.camera.position.set(20*-e.x+0,20*-e.y+0,20*-e.z+0),this.camera.lookAt(0,0,0),this.camera.up=t}dispose(){!this.scene||!this.camera||!this.navCube||(this.scene.clear(),this.hostViewer=void 0,this.camera=void 0,this.navCube=void 0,this.scene=void 0)}},yNt=new A(1,0,0),TNt=new A(0,1,0),ENt=new A(0,0,1),QO=class extends nm{constructor(e,t){super(e,t);let{min:i,max:r}=this.sectionBox;this.sectionRange={x:[i.x,r.x],y:[i.y,r.y],z:[i.z,r.z]}}activate(){super.activate(),this.initOrUpdateClipPlane(),this.initOrUpdateVertices(),this.initOrUpdateSectionPlane(),this.setGlobalClippingEnable(!0)}deactivate(){super.deactivate(),this.planesMesh&&this.scene.remove(...this.planesMesh),this.planesMesh=void 0}initOrUpdateVertices(){if(!this.sectionBox)return;let{min:e,max:t}=this.sectionBox;this.vertices=[new A(t.x,t.y,t.z),new A(e.x,t.y,t.z),new A(e.x,e.y,t.z),new A(t.x,e.y,t.z),new A(t.x,t.y,e.z),new A(e.x,t.y,e.z),new A(e.x,e.y,e.z),new A(t.x,e.y,e.z)]}initOrUpdateClipPlane(){let{min:e,max:t}=this.sectionBox;this.clipPlanes?(this.clipPlanes[0].constant=t.x,this.clipPlanes[1].constant=-e.x,this.clipPlanes[2].constant=t.y,this.clipPlanes[3].constant=-e.y,this.clipPlanes[4].constant=t.z,this.clipPlanes[5].constant=-e.z):this.clipPlanes=[new bi(new A(-1,0,0),t.x),new bi(new A(1,0,0),-e.x),new bi(new A(0,-1,0),t.y),new bi(new A(0,1,0),-e.y),new bi(new A(0,0,-1),t.z),new bi(new A(0,0,1),-e.z)],this.renderer.clippingPlanes=this.clipPlanes}initOrUpdateSectionPlane(){let e=this.vertices;if(e){if(this.planesMesh)this.planesMesh[0].update([e[4],e[0],e[3],e[7]]),this.planesMesh[1].update([e[1],e[5],e[6],e[2]]),this.planesMesh[2].update([e[4],e[5],e[1],e[0]]),this.planesMesh[3].update([e[6],e[7],e[3],e[2]]),this.planesMesh[4].update([e[0],e[1],e[2],e[3]]),this.planesMesh[5].update([e[5],e[4],e[7],e[6]]);else{let t=[new on("Right",[e[4],e[0],e[3],e[7]]),new on("Left",[e[1],e[5],e[6],e[2]]),new on("Top",[e[4],e[5],e[1],e[0]]),new on("Bottom",[e[6],e[7],e[3],e[2]]),new on("Front",[e[0],e[1],e[2],e[3]]),new on("Back",[e[5],e[4],e[7],e[6]])];this.planesMesh=t,this.scene.add(...t)}this.viewer.enableRender()}}activateSelectedObject(e){var t;null==(t=this.selectedObject)||t.setActive(e)}onDragStart(e){var t;this.selectedObject&&(this.controls&&this.dragStarted&&(this.controls.enableRotate=!1),ne.info("[ObjectsBoxSection] onDragStart:",e),this.refrencePlane.setFromNormalAndCoplanarPoint(this.camera.getWorldDirection(this.refrencePlane.normal),this.selectedObject.getPlaneCenter()),null==(t=this.raycaster)||t.ray.intersectPlane(this.refrencePlane,this.lastWorldPos))}onDragMove(e){var t;if(!this.lastWorldPos||!this.selectedObject)return;let i=new A;null==(t=this.raycaster)||t.ray.intersectPlane(this.refrencePlane,i);let r=this.selectedObject.actionType;switch(r){case"Top":case"Bottom":this.dragTranslateSectionPlane(TNt,this.lastWorldPos,i,r);break;case"Left":case"Right":this.dragTranslateSectionPlane(yNt,this.lastWorldPos,i,r);break;case"Front":case"Back":this.dragTranslateSectionPlane(ENt,this.lastWorldPos,i,r)}this.lastWorldPos=i}onDragEnd(e){this.controls&&!this.controls.enableRotate&&(this.controls.enableRotate=!0),this.activateSelectedObject(!1),this.dragStarted=!1,this.selectedObject=void 0,ne.info("[ObjectsBoxSection] onDragEnd:",e)}dragTranslateSectionPlane(e,t,i,r){let n,{min:s,max:a}=this.sectionBox,o=i.clone().sub(t).projectOnVector(e);switch(r){case"Top":n=a.y+o.y,this.isInRange(n,this.sectionRange.y)&&(a.y=n);break;case"Bottom":n=s.y+o.y,this.isInRange(n,this.sectionRange.y)&&(s.y=n);break;case"Left":n=s.x+o.x,this.isInRange(n,this.sectionRange.x)&&(s.x=n);break;case"Right":n=a.x+o.x,this.isInRange(n,this.sectionRange.x)&&(a.x=n);break;case"Front":n=a.z+o.z,this.isInRange(n,this.sectionRange.z)&&(a.z=n);break;case"Back":n=s.z+o.z,this.isInRange(n,this.sectionRange.z)&&(s.z=n)}this.initOrUpdateVertices(),this.initOrUpdateSectionPlane(),this.initOrUpdateClipPlane(),this.viewer.enableRender()}isInRange(e,t){return e>t[0]&&et.visible=e)),this.isShowSectionPlane=e,this.viewer.enableRender()}},e3=class extends nm{constructor(e,t){super(e,t),this.mousedown=e=>{var t;if(0===e.button){if(!this.faceInfo){let i=this.pickFace(e);if(i&&i.face){let e=i.face.normal,r=new Pi;e.applyNormalMatrix(r.getNormalMatrix(i.object.matrixWorld)),this.faceInfo={position:i.point,normal:e.normalize()},this.setSection(),null==(t=this.tooltip)||t.hide()}return}this.camera&&this.selectedObject&&(this.mouseDown=!0)}},this.mousemove=e=>{var t,i,r;if(this.faceInfo){if(this.dragStarted)this.updateRaycasterByMouse(e),this.onDragMove(e);else{this.activateSelectedObject(!1);let t=this.getIntersections(e);t?(this.selectedObject=t.object,this.activateSelectedObject(!0),this.mouseDown&&(null==(r=this.selectedObject)?void 0:r.parent)instanceof eu&&(this.dragStarted||(this.dragStarted=!0,this.onDragStart(e)))):this.selectedObject=void 0}this.viewer.enableRender()}else this.pickFace(e)?null==(t=this.tooltip)||t.show():null==(i=this.tooltip)||i.hide()},this.center=new A,this.sectionBox.getCenter(this.center),this.viewer.addEventListener("RenderAfter",(()=>{var e;this.isActive&&(null==(e=this.gizmo)||e.adjustSize(this.camera))}))}activate(){super.activate(),this.tooltip=new mh("pick-section-plane",Th("Tooltip.section"),{parentNode:this.viewer.widgetContainer,followPointer:!0})}deactivate(){var e,t,i;super.deactivate(),null==(e=this.planeMesh)||e.removeFromParent(),null==(t=this.gizmo)||t.removeFromParent(),this.planeMesh=void 0,this.gizmo=void 0,this.faceInfo=void 0,null==(i=this.tooltip)||i.destroy(),this.tooltip=void 0}setSection(){this.initOrUpdateGizmo(),this.initOrUpdateSectionPlane(),this.initOrUpdateClipPlane(),this.setGlobalClippingEnable(!0),this.viewer.enableRender()}resetSection(){var e,t,i;null==(e=this.planeMesh)||e.removeFromParent(),null==(t=this.gizmo)||t.removeFromParent(),this.setGlobalClippingEnable(!1),this.planeMesh=void 0,this.gizmo=void 0,this.faceInfo=void 0,null==(i=this.tooltip)||i.show(),this.viewer.enableRender()}setSectionVisible(e){this.gizmo&&this.planeMesh&&(this.gizmo.visible=e,this.planeMesh.visible=e),this.isShowSectionPlane=e,this.viewer.enableRender()}initOrUpdateClipPlane(){if(!this.faceInfo)return;let{normal:e,position:t}=this.faceInfo;this.clipPlane=(new bi).setFromNormalAndCoplanarPoint(e.clone().negate(),t),this.clipPlane&&(this.clipPlanes=[this.clipPlane])}initOrUpdateSectionPlane(){var e;if(!this.faceInfo)return;let{normal:t,position:i}=this.faceInfo,r=new A;this.sectionBox.getSize(r);let n=r.length(),s=i,a=(new Dt).setFromCenterAndSize(s,new A(n,n,n)),{min:o,max:l}=a;null==(e=this.planeMesh)||e.removeFromParent(),this.planeMesh=new on("Plane",[new A(s.x,l.y,o.z),new A(s.x,l.y,l.z),new A(s.x,o.y,l.z),new A(s.x,o.y,o.z)]),this.planeMesh.setDirection(t),this.planeMesh&&this.scene.add(this.planeMesh),this.viewer.enableRender()}initOrUpdateGizmo(){var e,t;if(!this.faceInfo)return;null==(e=this.gizmo)||e.removeFromParent();let{normal:i,position:r}=this.faceInfo;this.gizmo=new eu,this.gizmo.setDirection(i),this.gizmo.position.copy(r),null==(t=this.scene)||t.add(this.gizmo)}onDragStart(e){var t;if(!this.faceInfo||this.selectedObject instanceof on)return;this.controls&&this.dragStarted&&this.selectedObject&&!(this.selectedObject instanceof on)&&(this.controls.enableRotate=!1),ne.info("[PickPlaneSection] onDragStart:",e);let{position:i}=this.faceInfo;this.refrencePlane.setFromNormalAndCoplanarPoint(this.camera.getWorldDirection(this.refrencePlane.normal),i),null==(t=this.raycaster)||t.ray.intersectPlane(this.refrencePlane,this.lastWorldPos)}onDragMove(e){var t,i,r;if(!this.lastWorldPos||!this.selectedObject||!this.clipPlane||!this.planeMesh||!this.gizmo||!this.faceInfo||this.selectedObject&&this.selectedObject instanceof on)return;let n=new A;null==(t=this.raycaster)||t.ray.intersectPlane(this.refrencePlane,n);let s=this.selectedObject.userData.actionType,{position:a}=this.faceInfo,o=(new A).subVectors(this.lastWorldPos,a).normalize(),l=(new A).subVectors(n,a).normalize(),h=(new A).subVectors(n,this.lastWorldPos).projectOnVector(Ha.clone().applyQuaternion(this.gizmo.quaternion)),u=o.angleTo(l),c=(new A).crossVectors(o,l),p=new A;this.sectionBox.getSize(p);let d,f=Math.max(p.x,p.y,p.z);switch(s){case"TranslateX":case"TranslateY":case"TranslateZ":d=(new A).addVectors(this.gizmo.position,h),this.sectionBox.clone().setFromCenterAndSize(this.center,new A(f,f,f)).containsPoint(d)&&(null==(i=this.gizmo)||i.position.add(h),null==(r=this.planeMesh)||r.position.add(h));break;case"RotateX":{let e=Ha.clone().applyQuaternion(this.gizmo.quaternion);c.dot(e)<0&&(u=-u),this.gizmo.rotateX(u),this.planeMesh.rotatePlane(e,u)}break;case"RotateY":{let e=rm.clone().applyQuaternion(this.gizmo.quaternion);c.dot(e)<0&&(u=-u),this.gizmo.rotateY(u),this.planeMesh.rotatePlane(e,u)}break;case"RotateZ":{let e=im.clone().applyQuaternion(this.gizmo.quaternion);c.dot(e)<0&&(u=-u),this.gizmo.rotateZ(u),this.planeMesh.rotatePlane(e,u)}}this.clipPlane.setFromNormalAndCoplanarPoint(this.planeMesh.getPlaneNormal().negate(),this.gizmo.position),this.lastWorldPos=n}onDragEnd(e){this.selectedObject instanceof on||(this.controls&&!this.controls.enableRotate&&(this.controls.enableRotate=!0),this.activateSelectedObject(!1),this.dragStarted=!1,this.selectedObject=void 0,ne.info("[PickPlaneSection] onDragEnd:",e))}getIntersectObjects(){return this.planeMesh&&this.gizmo?[this.planeMesh,this.gizmo]:[]}activateSelectedObject(e){this.selectedObject&&(this.selectedObject instanceof on?this.selectedObject.setActive(e):this.selectedObject.parent instanceof eu&&this.selectedObject.parent.setActive(e,this.selectedObject))}pickFace(e){if(!this.raycaster)return;let t=new le(e.x,e.y),i=Ci.screenPoint2NdcPoint(t,this.camera,this.canvas);this.raycaster.setFromCamera(i,this.camera);let r=[];return Object.values(this.viewer.loadedModels).forEach((e=>{let t=this.scene&&this.scene.getObjectById(e.id);t&&t.visible&&r.push(t)})),(this.raycaster.intersectObjects(this.viewer.getRaycastableObjectsByMouse(e))||[]).find((e=>{let t=e.object;return t.visible&&(!1!==t.userData.selectable||t instanceof rt)}))}},t3=class{constructor(e,t){this.sections={},this.viewer=e,this.sections.ObjectsBoxSection=new QO(e,t),this.sections.AxisPlaneSection=new GO(e,t),this.sections.PickPlaneSection=new e3(e,t)}get raycaster(){return this.viewer.getRaycaster()}activateSection(e){this.activeSectionType&&this.deactivateSection(),this.activeSectionType=e,this.sections[e].activate()}deactivateSection(){let e=this.activeSectionType;e&&this.sections[e].deactivate(),this.activeSectionType=void 0}resetSection(){}isSectionActive(){let e=this.activeSectionType;return e?this.sections[e].isActive:!!this.getActiveSectionType()}getActiveSectionType(){return this.activeSectionType}getActiveSection(){if(this.activeSectionType)return this.sections[this.activeSectionType]}destroy(){this.deactivateSection(),this.activeSectionType=void 0}};function gG(e){let t;try{t=new URL(e,"http://fakehost.com/")}catch(e){return null}let i=t.pathname.split("/").pop(),r=i.lastIndexOf(".");return-1===r||r===i.length-1?null:i.substring(r+1)}function bNt(e){Promise.resolve().then(e)}var r3=class{constructor(){this.maxSize=800,this.minSize=600,this.unloadPercent=.05,this.itemSet=new Map,this.itemList=[],this.usedSet=new Set,this.callbacks=new Map,this.unloadPriorityCallback=null;let e=this.itemSet;this.defaultPriorityCallback=t=>e.get(t)}isFull(){return this.itemSet.size>=this.maxSize}add(e,t){let i=this.itemSet;if(i.has(e)||this.isFull())return!1;let r=this.usedSet,n=this.itemList,s=this.callbacks;return n.push(e),r.add(e),i.set(e,Date.now()),s.set(e,t),!0}remove(e){let t=this.usedSet,i=this.itemSet,r=this.itemList,n=this.callbacks;if(i.has(e)){n.get(e)(e);let s=r.indexOf(e);return r.splice(s,1),t.delete(e),i.delete(e),n.delete(e),!0}return!1}markUsed(e){let t=this.itemSet,i=this.usedSet;t.has(e)&&!i.has(e)&&(t.set(e,Date.now()),i.add(e))}markAllUnused(){this.usedSet.clear()}unloadUnusedContent(){let e=this.unloadPercent,t=this.minSize,i=this.itemList,r=this.itemSet,n=this.usedSet,s=this.callbacks,a=i.length-n.size,o=i.length-t,l=this.unloadPriorityCallback||this.defaultPriorityCallback;if(o>0&&a>0){i.sort(((e,t)=>{let i=n.has(e),r=n.has(t);return i&&r?0:i||r?i?1:-1:l(t)-l(e)}));let h=Math.min(o,a),u=Math.max(t*e,h*e),c=Math.min(u,a);c=Math.ceil(c);let p=i.splice(0,c);for(let e=0,t=p.length;e{this.scheduled=!1,this.unloadUnusedContent(),e&&this.markAllUnused()})))}},G_=class{constructor(){this.maxJobs=6,this.items=[],this.callbacks=new Map,this.currJobs=0,this.scheduled=!1,this.autoUpdate=!0,this.priorityCallback=()=>{throw new Error("PriorityQueue: PriorityCallback function not defined.")},this.schedulingCallback=e=>{requestAnimationFrame(e)},this._runjobs=()=>{this.tryRunJobs(),this.scheduled=!1}}sort(){let e=this.priorityCallback;this.items.sort(e)}add(e,t){return new Promise(((i,r)=>{let n=this.items,s=this.callbacks;n.push(e),s.set(e,((...e)=>t(...e).then(i).catch(r))),this.autoUpdate&&this.scheduleJobRun()}))}remove(e){let t=this.items,i=this.callbacks,r=t.indexOf(e);-1!==r&&(t.splice(r,1),i.delete(e))}tryRunJobs(){this.sort();let e=this.items,t=this.callbacks,i=this.maxJobs,r=this.currJobs;for(;i>r&&e.length>0;){r++;let i=e.pop(),n=t.get(i);t.delete(i),n(i).then((()=>{this.currJobs--,this.autoUpdate&&this.scheduleJobRun()})).catch((()=>{this.currJobs--,this.autoUpdate&&this.scheduleJobRun()}))}this.currJobs=r}scheduleJobRun(){this.scheduled||(this.schedulingCallback(this._runjobs),this.scheduled=!0)}},xNt=.0033528106647474805,LDe=-(6378137*xNt-6378137);function yG(e){return 3===e||4===e}function F0(e,t){return e.__lastFrameVisited===t&&e.__used}function FDe(e,t){e.__lastFrameVisited!==t&&(e.__lastFrameVisited=t,e.__used=!1,e.__inFrustum=!1,e.__isLeaf=!1,e.__visible=!1,e.__active=!1,e.__error=1/0,e.__distanceFromCamera=1/0,e.__childrenWereVisible=!1,e.__allChildrenLoaded=!1)}function HDe(e,t,i){if(FDe(e,t),e.__used=!0,i.markUsed(e),e.__contentEmpty){let r=e.children;for(let e=0,n=r.length;e0&&e.__depth+1>=s))return!0;let h=!1,u=e.children;for(let e=0,i=u.length;ee.__depth!==t.__depth?e.__depth>t.__depth?-1:1:e.__inFrustum!==t.__inFrustum?e.__inFrustum?1:-1:e.__used!==t.__used?e.__used?1:-1:e.__error!==t.__error?e.__error>t.__error?1:-1:e.__distanceFromCamera!==t.__distanceFromCamera?e.__distanceFromCamera>t.__distanceFromCamera?-1:1:0,INt=e=>1/(e.__depthFromRenderedParent+1),s3=class{get rootTileSet(){let e=this.tileSets[this.rootURL];return!e||e instanceof Promise?null:e}get root(){let e=this.rootTileSet;return e?e.root:null}constructor(e){this.tileSets={},this.rootURL=e,this.fetchOptions={},this.preprocessURL=null;let t=new r3;t.unloadPriorityCallback=INt;let i=new G_;i.maxJobs=4,i.priorityCallback=kDe;let r=new G_;r.maxJobs=1,r.priorityCallback=kDe,this.lruCache=t,this.downloadQueue=i,this.parseQueue=r,this.stats={parsing:0,downloading:0,failed:0,inFrustum:0,used:0,active:0,visible:0},this.frameCount=0,this.errorTarget=6,this.errorThreshold=1/0,this.loadSiblings=!0,this.displayActiveTiles=!1,this.maxDepth=1/0,this.stopAtEmptyTiles=!0}traverse(e,t){let i=this.tileSets[this.rootURL];!i||!i.root||n3(i.root,e,t)}update(){let e=this.stats,t=this.lruCache,i=this.tileSets,r=i[this.rootURL];if(!(this.rootURL in i))return void this.loadRootTileSet(this.rootURL);if(!r||!r.root)return;let n=r.root;e.inFrustum=0,e.used=0,e.active=0,e.visible=0,this.frameCount++,TG(n,this),EG(n,this),bG(n,this),xG(n,this),t.scheduleUnload()}parseTile(e,t,i){return null}disposeTile(e){}preprocessNode(e,t,i){if(e.content&&(!("uri"in e.content)&&"url"in e.content&&(e.content.uri=e.content.url,delete e.content.url),e.content.uri&&(e.content.uri=new URL(e.content.uri,i+"/").toString()),e.content.boundingVolume&&!("box"in e.content.boundingVolume||"sphere"in e.content.boundingVolume||"region"in e.content.boundingVolume)&&delete e.content.boundingVolume),e.parent=t,e.children=e.children||[],e.content&&e.content.uri){let t=gG(e.content.uri),i=Boolean(t&&"json"===t.toLowerCase());e.__externalTileSet=i,e.__contentEmpty=i}else e.__externalTileSet=!1,e.__contentEmpty=!0;e.__distanceFromCamera=1/0,e.__error=1/0,e.__inFrustum=!1,e.__isLeaf=!1,e.__usedLastFrame=!1,e.__used=!1,e.__wasSetVisible=!1,e.__visible=!1,e.__childrenWereVisible=!1,e.__allChildrenLoaded=!1,e.__wasSetActive=!1,e.__active=!1,e.__loadingState=0,e.__loadIndex=0,e.__loadAbort=null,e.__depthFromRenderedParent=-1,null===t?(e.__depth=0,e.refine=e.refine||"REPLACE"):(e.__depth=t.__depth+1,e.refine=e.refine||t.refine)}setTileActive(e,t){}setTileVisible(e,t){}calculateError(e){return 0}tileInView(e){return!0}resetFailedTiles(){let e=this.stats;0!==e.failed&&(this.traverse((e=>{4===e.__loadingState&&(e.__loadingState=0)})),e.failed=0)}fetchTileSet(e,t,i=null){return fetch(e,t).then((t=>{if(t.ok)return t.json();throw new Error(`TilesRenderer: Failed to load tileset "${e}" with status ${t.status} : ${t.statusText}`)})).then((t=>{let r=t.asset.version;console.assert("1.0"===r||"0.0"===r,'asset.version is expected to be a string of "1.0" or "0.0"');let n=e.replace(/\/[^\/]*\/?$/,"");return n=new URL(n,window.location.href).toString(),n3(t.root,((e,t)=>this.preprocessNode(e,t,n)),null,i,i?i.__depth:0),t}))}loadRootTileSet(e){let t=this.tileSets;if(e in t)return t[e]instanceof Error?Promise.reject(t[e]):Promise.resolve(t[e]);{let i=this.fetchTileSet(this.preprocessURL?this.preprocessURL(e):e,this.fetchOptions).then((i=>{t[e]=i}));return i.catch((i=>{console.error(i),t[e]=i})),t[e]=i,i}}requestTileContents(e){if(0!==e.__loadingState)return;let t=this.stats,i=this.lruCache,r=this.downloadQueue,n=this.parseQueue,s=e.__externalTileSet;i.add(e,(e=>{1===e.__loadingState?(e.__loadAbort.abort(),e.__loadAbort=null):s?e.children.length=0:this.disposeTile(e),1===e.__loadingState?t.downloading--:2===e.__loadingState&&t.parsing--,e.__loadingState=0,e.__loadIndex++,n.remove(e),r.remove(e)})),e.__loadIndex++;let a=e.__loadIndex,o=new AbortController,l=o.signal;t.downloading++,e.__loadAbort=o,e.__loadingState=1;let h=s=>{e.__loadIndex===a&&("AbortError"!==s.name?(n.remove(e),r.remove(e),2===e.__loadingState?t.parsing--:1===e.__loadingState&&t.downloading--,t.failed++,console.error(`TilesRenderer : Failed to load tile at url "${e.content.uri}".`),console.error(s),e.__loadingState=4):i.remove(e))};s?r.add(e,(e=>{if(e.__loadIndex!==a)return Promise.resolve();let t=this.preprocessURL?this.preprocessURL(e.content.uri):e.content.uri;return this.fetchTileSet(t,Object.assign({signal:l},this.fetchOptions),e)})).then((i=>{e.__loadIndex===a&&(t.downloading--,e.__loadAbort=null,e.__loadingState=3,e.children.push(i.root))})).catch(h):r.add(e,(e=>{if(e.__loadIndex!==a)return Promise.resolve();let t=this.preprocessURL?this.preprocessURL(e.content.uri):e.content.uri;return fetch(t,Object.assign({signal:l},this.fetchOptions))})).then((t=>{if(e.__loadIndex===a){if(t.ok)return t.arrayBuffer();throw new Error(`Failed to load model with error code ${t.status}`)}})).then((i=>{if(e.__loadIndex===a)return t.downloading--,t.parsing++,e.__loadAbort=null,e.__loadingState=2,n.add(e,(e=>{if(e.__loadIndex!==a)return Promise.resolve();let t=gG(e.content.uri);return this.parseTile(i,e,t)}))})).then((()=>{e.__loadIndex===a&&(t.parsing--,e.__loadingState=3,e.__wasSetVisible&&this.setTileVisible(e,!0),e.__wasSetActive&&this.setTileActive(e,!0))})).catch(h)}dispose(){let e=this.lruCache;this.traverse((t=>{e.remove(t)})),this.stats={parsing:0,downloading:0,failed:0,inFrustum:0,used:0,active:0,visible:0},this.frameCount=0}};function a3(e){return(new TextDecoder).decode(e)}var od=class{constructor(e,t,i,r){this.buffer=e,this.binOffset=t+i,this.binLength=r;let n=null;if(0!==i){let r=new Uint8Array(e,t,i);n=JSON.parse(a3(r))}else n={};this.header=n}getKeys(){return Object.keys(this.header)}getData(e,t,i=null,r=null){let n=this.header;if(!(e in n))return null;let s=n[e];if(s instanceof Object){if(Array.isArray(s))return s;{let n,{buffer:a,binOffset:o,binLength:l}=this,h=s.byteOffset||0,u=s.type||r,c=s.componentType||i;if("type"in s&&r&&s.type!==r)throw new Error("FeatureTable: Specified type does not match expected type.");switch(u){case"SCALAR":n=1;break;case"VEC2":n=2;break;case"VEC3":n=3;break;case"VEC4":n=4;break;default:throw new Error(`FeatureTable : Feature type not provided for "${e}".`)}let p,d=o+h,f=t*n;switch(c){case"BYTE":p=new Int8Array(a,d,f);break;case"UNSIGNED_BYTE":p=new Uint8Array(a,d,f);break;case"SHORT":p=new Int16Array(a,d,f);break;case"UNSIGNED_SHORT":p=new Uint16Array(a,d,f);break;case"INT":p=new Int32Array(a,d,f);break;case"UNSIGNED_INT":p=new Uint32Array(a,d,f);break;case"FLOAT":p=new Float32Array(a,d,f);break;case"DOUBLE":p=new Float64Array(a,d,f);break;default:throw new Error(`FeatureTable : Feature component type not provided for "${e}".`)}if(d+f*p.BYTES_PER_ELEMENT>o+l)throw new Error("FeatureTable: Feature data read outside binary body length.");return p}}return s}},sm=class extends od{constructor(e,t,i,r,n){super(e,i,r,n),this.batchSize=t}getData(e,t=null,i=null){return super.getData(e,this.batchSize,t,i)}},ec=class{constructor(){this.fetchOptions={},this.workingPath=""}load(e){return fetch(e,this.fetchOptions).then((t=>{if(!t.ok)throw new Error(`Failed to load file "${e}" with status ${t.status} : ${t.statusText}`);return t.arrayBuffer()})).then((t=>(""===this.workingPath&&(this.workingPath=this.workingPathForURL(e)),this.parse(t))))}resolveExternalURL(e){return/^[^\\/]/.test(e)?this.workingPath+"/"+e:e}workingPathForURL(e){let t=e.split(/[\\/]/g);return t.pop(),t.join("/")+"/"}parse(e){throw new Error("LoaderBase: Parse not implemented.")}};function iu(e){let t;if(t=e instanceof DataView?e:new DataView(e),"{"===String.fromCharCode(t.getUint8(0)))return null;let i="";for(let e=0;e<4;e++)i+=String.fromCharCode(t.getUint8(e));return i}var o3=class extends ec{parse(e){let t=new DataView(e),i=iu(t);console.assert("b3dm"===i);let r=t.getUint32(4,!0);console.assert(1===r);let n=t.getUint32(8,!0);console.assert(n===e.byteLength);let s=t.getUint32(12,!0),a=t.getUint32(16,!0),o=t.getUint32(20,!0),l=t.getUint32(24,!0),h=e.slice(28,28+s+a),u=new od(h,0,s,a),c=28+s+a,p=e.slice(c,c+o+l),d=new sm(p,u.getData("BATCH_LENGTH"),0,o,l),f=c+o+l;return{version:r,featureTable:u,batchTable:d,glbBytes:new Uint8Array(e,f,n-f)}}},vE=class extends o3{constructor(e=ao){super(),this.manager=e,this.adjustmentTransform=new Be}parse(e){let t=super.parse(e),i=t.glbBytes.slice().buffer;return new Promise(((e,r)=>{let n=this.manager,s=this.fetchOptions,a=n.getHandler("path.gltf")||new $u(n);"include"===s.credentials&&"cors"===s.mode&&a.setCrossOrigin("use-credentials"),"credentials"in s&&a.setWithCredentials("include"===s.credentials),s.headers&&a.setRequestHeader(s.headers);let o=this.workingPath;!/[\\/]$/.test(o)&&o.length&&(o+="/");let l=this.adjustmentTransform;a.parse(i,o,(i=>{let{batchTable:r,featureTable:n}=t,{scene:s}=i,a=n.getData("RTC_CENTER");a&&(s.position.x+=a[0],s.position.y+=a[1],s.position.z+=a[2]),i.scene.updateMatrix(),i.scene.matrix.multiply(l),i.scene.matrix.decompose(i.scene.position,i.scene.quaternion,i.scene.scale),i.batchTable=r,i.featureTable=n,s.batchTable=r,s.featureTable=n,e(i)}),r)}))}},l3=class extends ec{parse(e){let t=new DataView(e),i=iu(t);console.assert("pnts"===i);let r=t.getUint32(4,!0);console.assert(1===r);let n=t.getUint32(8,!0);console.assert(n===e.byteLength);let s=t.getUint32(12,!0),a=t.getUint32(16,!0),o=t.getUint32(20,!0),l=t.getUint32(24,!0),h=e.slice(28,28+s+a),u=new od(h,0,s,a),c=28+s+a,p=e.slice(c,c+o+l),d=new sm(p,u.getData("BATCH_LENGTH")||u.getData("POINTS_LENGTH"),0,o,l);return Promise.resolve({version:r,featureTable:u,batchTable:d})}},yE=class extends l3{constructor(e=ao){super(),this.manager=e}parse(e){return super.parse(e).then((e=>{let{featureTable:t}=e,i=t.getData("POINTS_LENGTH"),r=t.getData("POSITION",i,"FLOAT","VEC3"),n=t.getData("RGB",i,"UNSIGNED_BYTE","VEC3");["QUANTIZED_VOLUME_OFFSET","QUANTIZED_VOLUME_SCALE","CONSTANT_RGBA","BATCH_LENGTH","POSITION_QUANTIZED","RGBA","RGB565","NORMAL","NORMAL_OCT16P"].forEach((e=>{e in t.header&&console.warn(`PNTSLoader: Unsupported FeatureTable feature "${e}" detected.`)}));let s=new lt;s.setAttribute("position",new Wt(r,3,!1));let a=new jn;a.size=2,a.sizeAttenuation=!1,null!==n&&(s.setAttribute("color",new Wt(n,3,!0)),a.vertexColors=!0);let o=new nn(s,a);e.scene=o,e.scene.featureTable=t;let l=t.getData("RTC_CENTER");return l&&(e.scene.position.x+=l[0],e.scene.position.y+=l[1],e.scene.position.z+=l[2]),e}))}},c3=class extends ec{parse(e){let t=new DataView(e),i=iu(t);console.assert("i3dm"===i);let r=t.getUint32(4,!0);console.assert(1===r);let n=t.getUint32(8,!0);console.assert(n===e.byteLength);let s=t.getUint32(12,!0),a=t.getUint32(16,!0),o=t.getUint32(20,!0),l=t.getUint32(24,!0),h=t.getUint32(28,!0),u=e.slice(32,32+s+a),c=new od(u,0,s,a),p=32+s+a,d=e.slice(p,p+o+l),f=new sm(d,c.getData("INSTANCES_LENGTH"),0,o,l),m=p+o+l,g=new Uint8Array(e,m,n-m),y=null,v=null;if(h)y=g,v=Promise.resolve();else{let e=this.resolveExternalURL(a3(g));v=fetch(e,this.fetchOptions).then((t=>{if(!t.ok)throw new Error(`I3DMLoaderBase : Failed to load file "${e}" with status ${t.status} : ${t.statusText}`);return t.arrayBuffer()})).then((e=>{y=new Uint8Array(e)}))}return v.then((()=>({version:r,featureTable:c,batchTable:f,glbBytes:y})))}},GDe=new A,SG=new A,wG=new A,VDe=new A,RG=new Hr,u3=new A,h3=new Be,TE=class extends c3{constructor(e=ao){super(),this.manager=e,this.adjustmentTransform=new Be}resolveExternalURL(e){return this.manager.resolveURL(super.resolveExternalURL(e))}parse(e){return super.parse(e).then((e=>{let{featureTable:t,batchTable:i}=e,r=e.glbBytes.slice().buffer;return new Promise(((e,n)=>{let s=this.fetchOptions,a=this.manager,o=a.getHandler("path.gltf")||new $u(a);"include"===s.credentials&&"cors"===s.mode&&o.setCrossOrigin("use-credentials"),"credentials"in s&&o.setWithCredentials("include"===s.credentials),s.headers&&o.setRequestHeader(s.headers);let l=this.workingPath;/[\\/]$/.test(l)||(l+="/");let h=this.adjustmentTransform;o.parse(r,l,(r=>{let n=t.getData("INSTANCES_LENGTH"),s=t.getData("POSITION",n,"FLOAT","VEC3"),a=t.getData("NORMAL_UP",n,"FLOAT","VEC3"),o=t.getData("NORMAL_RIGHT",n,"FLOAT","VEC3"),l=t.getData("SCALE_NON_UNIFORM",n,"FLOAT","VEC3"),u=t.getData("SCALE",n,"FLOAT","SCALAR");["RTC_CENTER","QUANTIZED_VOLUME_OFFSET","QUANTIZED_VOLUME_SCALE","EAST_NORTH_UP","POSITION_QUANTIZED","NORMAL_UP_OCT32P","NORMAL_RIGHT_OCT32P"].forEach((e=>{e in t.header&&console.warn(`I3DMLoader: Unsupported FeatureTable feature "${e}" detected.`)}));let c=new Map,p=[];r.scene.traverse((e=>{if(e.isMesh){let{geometry:t,material:i}=e,r=new rn(t,i,n);r.position.copy(e.position),r.rotation.copy(e.rotation),r.scale.copy(e.scale),p.push(r),c.set(e,r)}}));let d=new A;for(let e=0;e{let i=t.parent;i&&(i.remove(t),i.add(e),e.updateMatrixWorld(),e.position.copy(d).applyMatrix4(e.matrixWorld))}));for(let e=0;e{let t=new ur;return e.forEach((e=>{t.add(e.scene)})),{tiles:e,scene:t}}))}},f3=class{constructor(){this.name="CESIUM_RTC"}afterRoot(e){if(e.parser.json.extensions&&e.parser.json.extensions.CESIUM_RTC){let{center:t}=e.parser.json.extensions.CESIUM_RTC;t&&(e.scene.position.x+=t[0],e.scene.position.y+=t[1],e.scene.position.z+=t[2])}}},m3=class extends ec{constructor(e=ao){super(),this.manager=e}parse(e){return new Promise(((t,i)=>{let r=this.manager,n=this.fetchOptions,s=r.getHandler("path.gltf")||r.getHandler("path.glb");s||(s=new $u(r),s.register((()=>new f3)),"include"===n.credentials&&"cors"===n.mode&&s.setCrossOrigin("use-credentials"),"credentials"in n&&s.setWithCredentials("include"===n.credentials),n.headers&&s.setRequestHeader(n.headers));let a=s.resourcePath||s.path||this.workingPath;!/[\\/]$/.test(a)&&a.length&&(a+="/"),s.parse(e,a,(e=>{t(e)}),i)}))}},g3=new Be,v3=class extends ur{constructor(e){super(),this.name="TilesRenderer.TilesGroup",this.tilesRenderer=e}raycast(e,t){this.tilesRenderer.optimizeRaycast&&this.tilesRenderer.raycast(e,t)}updateMatrixWorld(e){if(this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldNeedsUpdate||e){null===this.parent?g3.copy(this.matrix):g3.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1;let e=g3.elements,t=this.matrixWorld.elements,i=!1;for(let r=0;r<16;r++){let n=e[r],s=t[r];if(Math.abs(n-s)>Number.EPSILON){i=!0;break}}if(i){this.matrixWorld.copy(g3);let e=this.children;for(let t=0,i=e.length;t=t&&a<=i&&o>=r&&o<=n){let t=SNt(e);c.push(t),this.getCartographicToPosition(a,o,l,t)}}}return c}getBoundingBox(e,t){WDe();let{latStart:i,latEnd:r,lonStart:n,lonEnd:s}=this;if(r-i{Object.getPrototypeOf(e).raycast.call(e,t,i)}))}function AG(e,t,i,r){if(i.has(e)){if(CG(e.cached.scene,r,tc),tc.length>0){tc.length>1&&tc.sort(DG);let e=tc[0];return tc.length=0,e}return null}let n=[],s=e.children;for(let e=0,i=s.length;e1e-6&&console.warn("ThreeTilesRenderer : Non uniform scale used for tile which may cause issues when raycasting.");let t={distance:1/0,tile:null};n.push(t),t.distance=qDe.distanceToSquared(IE.origin)*e*e,t.tile=i}}}n.sort(DG);let a=1/0,o=null;for(let e=0,s=n.length;ea)break;{let e=s.tile,n=e.cached.scene,l=null;if(i.has(e)?(CG(n,r,tc),tc.length>0&&(tc.length>1&&tc.sort(DG),l=tc[0])):l=AG(e,t,i,r),l){let e=l.distance*l.distance;e{e.frustumCulled=e[$De]&&t}))}var W_=class extends s3{get autoDisableRendererCulling(){return this._autoDisableRendererCulling}set autoDisableRendererCulling(e){this._autoDisableRendererCulling!==e&&(super._autoDisableRendererCulling=e,this.forEachLoadedModel((t=>{XDe(t,!e)})))}constructor(...e){super(...e),this.group=new v3(this),this.cameras=[],this.cameraMap=new Map,this.cameraInfo=[],this.activeTiles=new Set,this.visibleTiles=new Set,this._autoDisableRendererCulling=!0,this.optimizeRaycast=!0,this.onLoadTileSet=null,this.onLoadModel=null,this.onDisposeModel=null,this.onTileVisibilityChange=null;let t=new Lp;t.setURLModifier((e=>this.preprocessURL?this.preprocessURL(e):e)),this.manager=t;let i=this;this._overridenRaycast=function(e,t){i.optimizeRaycast||Object.getPrototypeOf(this).raycast.call(this,e,t)}}getBounds(e){if(!this.root)return!1;let t=this.root.cached,i=t.box,r=t.boxTransform;return!!i&&(e.copy(i),e.applyMatrix4(r),!0)}getOrientedBounds(e,t){if(!this.root)return!1;let i=this.root.cached,r=i.box,n=i.boxTransform;return!!r&&(e.copy(r),t.copy(n),!0)}getBoundingSphere(e){if(!this.root)return!1;let t=this.root.cached.sphere;return!!t&&(e.copy(t),!0)}forEachLoadedModel(e){this.traverse((t=>{let i=t.cached.scene;i&&e(i,t)}))}raycast(e,t){if(this.root)if(e.firstHitOnly){let i=AG(this.root,this.group,this.activeTiles,e);i&&t.push(i)}else OG(this.root,this.group,this.activeTiles,e,t)}hasCamera(e){return this.cameraMap.has(e)}setCamera(e){let t=this.cameras,i=this.cameraMap;return!i.has(e)&&(i.set(e,new le),t.push(e),!0)}setResolution(e,t,i){let r=this.cameraMap;return!!r.has(e)&&(t instanceof le?r.get(e).copy(t):r.get(e).set(t,i),!0)}setResolutionFromRenderer(e,t){let i=this.cameraMap;if(!i.has(e))return!1;let r=i.get(e);return t.getSize(r),r.multiplyScalar(t.getPixelRatio()),!0}deleteCamera(e){let t=this.cameras,i=this.cameraMap;if(i.has(e)){let r=t.indexOf(e);return t.splice(r,1),i.delete(e),!0}return!1}fetchTileSet(e,...t){let i=super.fetchTileSet(e,...t);return i.then((t=>{this.onLoadTileSet&&Promise.resolve().then((()=>{this.onLoadTileSet(t,e)}))})),i}update(){let e=this.group,t=this.cameras,i=this.cameraMap,r=this.cameraInfo;if(0===t.length)return void console.warn("TilesRenderer: no cameras defined. Cannot update 3d tiles.");for(;r.length>t.length;)r.pop();for(;r.length1e-6&&console.warn("ThreeTilesRenderer : Non uniform scale used for tile which may cause issues when calculating screen space error.");for(let s=0,a=r.length;se.scene));break}case"pnts":{let t=new yE(a);t.workingPath=n,t.fetchOptions=s,l=t.parse(e).then((e=>e.scene));break}case"i3dm":{let t=new TE(a);t.workingPath=n,t.fetchOptions=s,t.adjustmentTransform.copy(nu),l=t.parse(e).then((e=>e.scene));break}case"cmpt":{let t=new d3(a);t.workingPath=n,t.fetchOptions=s,t.adjustmentTransform.copy(nu),l=t.parse(e).then((e=>e.scene));break}case"gltf":case"glb":let t=new m3(a);t.workingPath=n,t.fetchOptions=s,l=t.parse(e).then((e=>e.scene));break;default:console.warn(`TilesRenderer: Content type "${p}" not supported.`),l=Promise.resolve(null)}return l.then((e=>{if(t._loadIndex!==o)return;e.updateMatrix(),("glb"===p||"gltf"===p)&&e.matrix.multiply(nu),e.matrix.premultiply(c),e.matrix.decompose(e.position,e.quaternion,e.scale),e.traverse((e=>{e[$De]=e.frustumCulled})),XDe(e,!this.autoDisableRendererCulling),u.scene=e,e.traverse((e=>{e.raycast=this._overridenRaycast}));let i=[],r=[],n=[];e.traverse((e=>{if(e.geometry&&r.push(e.geometry),e.material){let t=e.material;i.push(e.material);for(let e in t){let i=t[e];i&&i.isTexture&&n.push(i)}}})),u.materials=i,u.geometry=r,u.textures=n,this.onLoadModel&&this.onLoadModel(e,t)}))}disposeTile(e){let t=e.cached;if(t.scene){let i=t.materials,r=t.geometry,n=t.textures,s=t.scene.parent;for(let e=0,t=r.length;e=s+1e3&&(o.update(1e3*a/(e-s),100),s=e,a=0,h)){var t=performance.memory;h.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){n=this.end()},domElement:t,setMode:r}};X_.Panel=function(e,t,i){var r=1/0,n=0,s=Math.round,a=s(window.devicePixelRatio||1),o=80*a,l=48*a,h=3*a,u=2*a,c=3*a,p=15*a,d=74*a,f=30*a,m=document.createElement("canvas");m.width=o,m.height=l,m.style.cssText="width:80px;height:48px";var g=m.getContext("2d");return g.font="bold "+9*a+"px Helvetica,Arial,sans-serif",g.textBaseline="top",g.fillStyle=i,g.fillRect(0,0,o,l),g.fillStyle=t,g.fillText(e,h,u),g.fillRect(c,p,d,f),g.fillStyle=i,g.globalAlpha=.9,g.fillRect(c,p,d,f),{dom:m,update:function(l,y){r=Math.min(r,l),n=Math.max(n,l),g.fillStyle=i,g.globalAlpha=1,g.fillRect(0,0,o,p),g.fillStyle=t,g.fillText(s(l)+" "+e+" ("+s(r)+"-"+s(n)+")",h,u),g.drawImage(m,c+a,p,d-a,f,c,p,d-a,f),g.fillRect(c+d-a,p,a,f),g.fillStyle=i,g.globalAlpha=.9,g.fillRect(c+d-a,p,a,s((1-l/y)*f))}}};var I3=X_,as=class{constructor(){this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}},MNt=new Ji(-1,1,1,-1,0,1),NG=new lt;NG.setAttribute("position",new dt([-1,3,0,-1,-1,0,3,-1,0],3)),NG.setAttribute("uv",new dt([0,2,0,0,2,0],2));var sa=class{constructor(e){this._mesh=new rt(NG,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,MNt)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}},LG={defines:{KERNEL_SIZE_FLOAT:"25.0",KERNEL_SIZE_INT:"25"},uniforms:{tDiffuse:{value:null},uImageIncrement:{value:new le(.001953125,0)},cKernel:{value:[]}},vertexShader:"\n\n\t\tuniform vec2 uImageIncrement;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv - ( ( KERNEL_SIZE_FLOAT - 1.0 ) / 2.0 ) * uImageIncrement;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float cKernel[ KERNEL_SIZE_INT ];\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform vec2 uImageIncrement;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec2 imageCoord = vUv;\n\t\t\tvec4 sum = vec4( 0.0, 0.0, 0.0, 0.0 );\n\n\t\t\tfor( int i = 0; i < KERNEL_SIZE_INT; i ++ ) {\n\n\t\t\t\tsum += texture2D( tDiffuse, imageCoord ) * cKernel[ i ];\n\t\t\t\timageCoord += uImageIncrement;\n\n\t\t\t}\n\n\t\t\tgl_FragColor = sum;\n\n\t\t}",buildKernel:function(e){let t=2*Math.ceil(3*e)+1;t>25&&(t=25);let i=.5*(t-1),r=new Array(t),n=0;for(let s=0;s0){e.getClearColor(this._oldClearColor),this.oldClearAlpha=e.getClearAlpha();let t=e.autoClear;e.autoClear=!1,n&&e.state.buffers.stencil.setTest(!1),e.setClearColor(16777215,1),this.changeVisibilityOfSelectedObjects(!1);let r=this.renderScene.background;if(this.renderScene.background=null,this.renderScene.overrideMaterial=this.depthMaterial,e.setRenderTarget(this.renderTargetDepthBuffer),e.clear(),e.render(this.renderScene,this.renderCamera),this.changeVisibilityOfSelectedObjects(!0),this._visibilityCache.clear(),this.updateTextureMatrix(),this.changeVisibilityOfNonSelectedObjects(!1),this.renderScene.overrideMaterial=this.prepareMaskMaterial,this.prepareMaskMaterial.uniforms.cameraNearFar.value.set(this.renderCamera.near,this.renderCamera.far),this.prepareMaskMaterial.uniforms.depthTexture.value=this.renderTargetDepthBuffer.texture,this.prepareMaskMaterial.uniforms.textureMatrix.value=this.textureMatrix,e.setRenderTarget(this.renderTargetMaskBuffer),e.clear(),e.render(this.renderScene,this.renderCamera),this.renderScene.overrideMaterial=null,this.changeVisibilityOfNonSelectedObjects(!0),this._visibilityCache.clear(),this.renderScene.background=r,this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetMaskBuffer.texture,e.setRenderTarget(this.renderTargetMaskDownSampleBuffer),e.clear(),this.fsQuad.render(e),this.tempPulseColor1.copy(this.visibleEdgeColor),this.tempPulseColor2.copy(this.hiddenEdgeColor),this.pulsePeriod>0){let e=.625+.75*Math.cos(.01*performance.now()/this.pulsePeriod)/2;this.tempPulseColor1.multiplyScalar(e),this.tempPulseColor2.multiplyScalar(e)}this.fsQuad.material=this.edgeDetectionMaterial,this.edgeDetectionMaterial.uniforms.maskTexture.value=this.renderTargetMaskDownSampleBuffer.texture,this.edgeDetectionMaterial.uniforms.texSize.value.set(this.renderTargetMaskDownSampleBuffer.width,this.renderTargetMaskDownSampleBuffer.height),this.edgeDetectionMaterial.uniforms.visibleEdgeColor.value=this.tempPulseColor1,this.edgeDetectionMaterial.uniforms.hiddenEdgeColor.value=this.tempPulseColor2,e.setRenderTarget(this.renderTargetEdgeBuffer1),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.separableBlurMaterial1,this.separableBlurMaterial1.uniforms.colorTexture.value=this.renderTargetEdgeBuffer1.texture,this.separableBlurMaterial1.uniforms.direction.value=au.BlurDirectionX,this.separableBlurMaterial1.uniforms.kernelRadius.value=this.edgeThickness,e.setRenderTarget(this.renderTargetBlurBuffer1),e.clear(),this.fsQuad.render(e),this.separableBlurMaterial1.uniforms.colorTexture.value=this.renderTargetBlurBuffer1.texture,this.separableBlurMaterial1.uniforms.direction.value=au.BlurDirectionY,e.setRenderTarget(this.renderTargetEdgeBuffer1),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.separableBlurMaterial2,this.separableBlurMaterial2.uniforms.colorTexture.value=this.renderTargetEdgeBuffer1.texture,this.separableBlurMaterial2.uniforms.direction.value=au.BlurDirectionX,e.setRenderTarget(this.renderTargetBlurBuffer2),e.clear(),this.fsQuad.render(e),this.separableBlurMaterial2.uniforms.colorTexture.value=this.renderTargetBlurBuffer2.texture,this.separableBlurMaterial2.uniforms.direction.value=au.BlurDirectionY,e.setRenderTarget(this.renderTargetEdgeBuffer2),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.overlayMaterial,this.overlayMaterial.uniforms.maskTexture.value=this.renderTargetMaskBuffer.texture,this.overlayMaterial.uniforms.edgeTexture1.value=this.renderTargetEdgeBuffer1.texture,this.overlayMaterial.uniforms.edgeTexture2.value=this.renderTargetEdgeBuffer2.texture,this.overlayMaterial.uniforms.patternTexture.value=this.patternTexture,this.overlayMaterial.uniforms.edgeStrength.value=this.edgeStrength,this.overlayMaterial.uniforms.edgeGlow.value=this.edgeGlow,this.overlayMaterial.uniforms.usePatternTexture.value=this.usePatternTexture,n&&e.state.buffers.stencil.setTest(!0),e.setRenderTarget(i),this.fsQuad.render(e),e.setClearColor(this._oldClearColor,this.oldClearAlpha),e.autoClear=t}this.renderToScreen&&(this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=i.texture,e.setRenderTarget(null),this.fsQuad.render(e))}getPrepareMaskMaterial(){return new Yt({uniforms:{depthTexture:{value:null},cameraNearFar:{value:new le(.5,.5)},textureMatrix:{value:null}},vertexShader:"#include \n\t\t\t\t#include \n\n\t\t\t\tvarying vec4 projTexCoord;\n\t\t\t\tvarying vec4 vPosition;\n\t\t\t\tuniform mat4 textureMatrix;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t\tvPosition = mvPosition;\n\n\t\t\t\t\tvec4 worldPosition = vec4( transformed, 1.0 );\n\n\t\t\t\t\t#ifdef USE_INSTANCING\n\n\t\t\t\t\t\tworldPosition = instanceMatrix * worldPosition;\n\n\t\t\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\t\tworldPosition = modelMatrix * worldPosition;\n\n\t\t\t\t\tprojTexCoord = textureMatrix * worldPosition;\n\n\t\t\t\t}",fragmentShader:"#include \n\t\t\t\tvarying vec4 vPosition;\n\t\t\t\tvarying vec4 projTexCoord;\n\t\t\t\tuniform sampler2D depthTexture;\n\t\t\t\tuniform vec2 cameraNearFar;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tfloat depth = unpackRGBAToDepth(texture2DProj( depthTexture, projTexCoord ));\n\t\t\t\t\tfloat viewZ = - DEPTH_TO_VIEW_Z( depth, cameraNearFar.x, cameraNearFar.y );\n\t\t\t\t\tfloat depthTest = (-vPosition.z > viewZ) ? 1.0 : 0.0;\n\t\t\t\t\tgl_FragColor = vec4(0.0, depthTest, 1.0, 1.0);\n\n\t\t\t\t}"})}getEdgeDetectionMaterial(){return new Yt({uniforms:{maskTexture:{value:null},texSize:{value:new le(.5,.5)},visibleEdgeColor:{value:new A(1,1,1)},hiddenEdgeColor:{value:new A(1,1,1)}},vertexShader:"varying vec2 vUv;\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\n\n\t\t\t\tuniform sampler2D maskTexture;\n\t\t\t\tuniform vec2 texSize;\n\t\t\t\tuniform vec3 visibleEdgeColor;\n\t\t\t\tuniform vec3 hiddenEdgeColor;\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tvec2 invSize = 1.0 / texSize;\n\t\t\t\t\tvec4 uvOffset = vec4(1.0, 0.0, 0.0, 1.0) * vec4(invSize, invSize);\n\t\t\t\t\tvec4 c1 = texture2D( maskTexture, vUv + uvOffset.xy);\n\t\t\t\t\tvec4 c2 = texture2D( maskTexture, vUv - uvOffset.xy);\n\t\t\t\t\tvec4 c3 = texture2D( maskTexture, vUv + uvOffset.yw);\n\t\t\t\t\tvec4 c4 = texture2D( maskTexture, vUv - uvOffset.yw);\n\t\t\t\t\tfloat diff1 = (c1.r - c2.r)*0.5;\n\t\t\t\t\tfloat diff2 = (c3.r - c4.r)*0.5;\n\t\t\t\t\tfloat d = length( vec2(diff1, diff2) );\n\t\t\t\t\tfloat a1 = min(c1.g, c2.g);\n\t\t\t\t\tfloat a2 = min(c3.g, c4.g);\n\t\t\t\t\tfloat visibilityFactor = min(a1, a2);\n\t\t\t\t\tvec3 edgeColor = 1.0 - visibilityFactor > 0.001 ? visibleEdgeColor : hiddenEdgeColor;\n\t\t\t\t\tgl_FragColor = vec4(edgeColor, 1.0) * vec4(d);\n\t\t\t\t}"})}getSeperableBlurMaterial(e){return new Yt({defines:{MAX_RADIUS:e},uniforms:{colorTexture:{value:null},texSize:{value:new le(.5,.5)},direction:{value:new le(.5,.5)},kernelRadius:{value:1}},vertexShader:"varying vec2 vUv;\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"#include \n\t\t\t\tvarying vec2 vUv;\n\t\t\t\tuniform sampler2D colorTexture;\n\t\t\t\tuniform vec2 texSize;\n\t\t\t\tuniform vec2 direction;\n\t\t\t\tuniform float kernelRadius;\n\n\t\t\t\tfloat gaussianPdf(in float x, in float sigma) {\n\t\t\t\t\treturn 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tvec2 invSize = 1.0 / texSize;\n\t\t\t\t\tfloat sigma = kernelRadius/2.0;\n\t\t\t\t\tfloat weightSum = gaussianPdf(0.0, sigma);\n\t\t\t\t\tvec4 diffuseSum = texture2D( colorTexture, vUv) * weightSum;\n\t\t\t\t\tvec2 delta = direction * invSize * kernelRadius/float(MAX_RADIUS);\n\t\t\t\t\tvec2 uvOffset = delta;\n\t\t\t\t\tfor( int i = 1; i <= MAX_RADIUS; i ++ ) {\n\t\t\t\t\t\tfloat x = kernelRadius * float(i) / float(MAX_RADIUS);\n\t\t\t\t\t\tfloat w = gaussianPdf(x, sigma);\n\t\t\t\t\t\tvec4 sample1 = texture2D( colorTexture, vUv + uvOffset);\n\t\t\t\t\t\tvec4 sample2 = texture2D( colorTexture, vUv - uvOffset);\n\t\t\t\t\t\tdiffuseSum += ((sample1 + sample2) * w);\n\t\t\t\t\t\tweightSum += (2.0 * w);\n\t\t\t\t\t\tuvOffset += delta;\n\t\t\t\t\t}\n\t\t\t\t\tgl_FragColor = diffuseSum/weightSum;\n\t\t\t\t}"})}getOverlayMaterial(){return new Yt({uniforms:{maskTexture:{value:null},edgeTexture1:{value:null},edgeTexture2:{value:null},patternTexture:{value:null},edgeStrength:{value:1},edgeGlow:{value:1},usePatternTexture:{value:0}},vertexShader:"varying vec2 vUv;\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\n\n\t\t\t\tuniform sampler2D maskTexture;\n\t\t\t\tuniform sampler2D edgeTexture1;\n\t\t\t\tuniform sampler2D edgeTexture2;\n\t\t\t\tuniform sampler2D patternTexture;\n\t\t\t\tuniform float edgeStrength;\n\t\t\t\tuniform float edgeGlow;\n\t\t\t\tuniform bool usePatternTexture;\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tvec4 edgeValue1 = texture2D(edgeTexture1, vUv);\n\t\t\t\t\tvec4 edgeValue2 = texture2D(edgeTexture2, vUv);\n\t\t\t\t\tvec4 maskColor = texture2D(maskTexture, vUv);\n\t\t\t\t\tvec4 patternColor = texture2D(patternTexture, 6.0 * vUv);\n\t\t\t\t\tfloat visibilityFactor = 1.0 - maskColor.g > 0.0 ? 1.0 : 0.5;\n\t\t\t\t\tvec4 edgeValue = edgeValue1 + edgeValue2 * edgeGlow;\n\t\t\t\t\tvec4 finalColor = edgeStrength * maskColor.r * edgeValue;\n\t\t\t\t\tif(usePatternTexture)\n\t\t\t\t\t\tfinalColor += + visibilityFactor * (1.0 - maskColor.r) * (1.0 - patternColor.r);\n\t\t\t\t\tgl_FragColor = finalColor;\n\t\t\t\t}",blending:vp,depthTest:!1,depthWrite:!1,transparent:!0})}};au.BlurDirectionX=new le(1,0),au.BlurDirectionY=new le(0,1);var w3=class extends as{constructor(e,t,i,r,n){super(),this.scene=e,this.camera=t,this.overrideMaterial=i,this.clearColor=r,this.clearAlpha=void 0!==n?n:0,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new je}render(e,t,i){let r,n,s=e.autoClear;e.autoClear=!1,void 0!==this.overrideMaterial&&(n=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(e.getClearColor(this._oldClearColor),r=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:i),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor&&e.setClearColor(this._oldClearColor,r),void 0!==this.overrideMaterial&&(this.scene.overrideMaterial=n),e.autoClear=s}},K_={defines:{NUM_SAMPLES:7,NUM_RINGS:4,NORMAL_TEXTURE:0,DIFFUSE_TEXTURE:0,DEPTH_PACKING:1,PERSPECTIVE_CAMERA:1},uniforms:{tDepth:{value:null},tDiffuse:{value:null},tNormal:{value:null},size:{value:new le(512,512)},cameraNear:{value:1},cameraFar:{value:100},cameraProjectionMatrix:{value:new Be},cameraInverseProjectionMatrix:{value:new Be},scale:{value:1},intensity:{value:.1},bias:{value:.5},minResolution:{value:0},kernelRadius:{value:100},randomSeed:{value:0}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t}",fragmentShader:"\n\n\t\t#include \n\n\t\tvarying vec2 vUv;\n\n\t\t#if DIFFUSE_TEXTURE == 1\n\t\tuniform sampler2D tDiffuse;\n\t\t#endif\n\n\t\tuniform sampler2D tDepth;\n\n\t\t#if NORMAL_TEXTURE == 1\n\t\tuniform sampler2D tNormal;\n\t\t#endif\n\n\t\tuniform float cameraNear;\n\t\tuniform float cameraFar;\n\t\tuniform mat4 cameraProjectionMatrix;\n\t\tuniform mat4 cameraInverseProjectionMatrix;\n\n\t\tuniform float scale;\n\t\tuniform float intensity;\n\t\tuniform float bias;\n\t\tuniform float kernelRadius;\n\t\tuniform float minResolution;\n\t\tuniform vec2 size;\n\t\tuniform float randomSeed;\n\n\t\t// RGBA depth\n\n\t\t#include \n\n\t\tvec4 getDefaultColor( const in vec2 screenPosition ) {\n\t\t\t#if DIFFUSE_TEXTURE == 1\n\t\t\treturn texture2D( tDiffuse, vUv );\n\t\t\t#else\n\t\t\treturn vec4( 1.0 );\n\t\t\t#endif\n\t\t}\n\n\t\tfloat getDepth( const in vec2 screenPosition ) {\n\t\t\t#if DEPTH_PACKING == 1\n\t\t\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );\n\t\t\t#else\n\t\t\treturn texture2D( tDepth, screenPosition ).x;\n\t\t\t#endif\n\t\t}\n\n\t\tfloat getViewZ( const in float depth ) {\n\t\t\t#if PERSPECTIVE_CAMERA == 1\n\t\t\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );\n\t\t\t#else\n\t\t\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );\n\t\t\t#endif\n\t\t}\n\n\t\tvec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) {\n\t\t\tfloat clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];\n\t\t\tvec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 );\n\t\t\tclipPosition *= clipW; // unprojection.\n\n\t\t\treturn ( cameraInverseProjectionMatrix * clipPosition ).xyz;\n\t\t}\n\n\t\tvec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPosition ) {\n\t\t\t#if NORMAL_TEXTURE == 1\n\t\t\treturn unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz );\n\t\t\t#else\n\t\t\treturn normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );\n\t\t\t#endif\n\t\t}\n\n\t\tfloat scaleDividedByCameraFar;\n\t\tfloat minResolutionMultipliedByCameraFar;\n\n\t\tfloat getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {\n\t\t\tvec3 viewDelta = sampleViewPosition - centerViewPosition;\n\t\t\tfloat viewDistance = length( viewDelta );\n\t\t\tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;\n\n\t\t\treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - bias) / (1.0 + pow2( scaledScreenDistance ) );\n\t\t}\n\n\t\t// moving costly divides into consts\n\t\tconst float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );\n\t\tconst float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );\n\n\t\tfloat getAmbientOcclusion( const in vec3 centerViewPosition ) {\n\t\t\t// precompute some variables require in getOcclusion.\n\t\t\tscaleDividedByCameraFar = scale / cameraFar;\n\t\t\tminResolutionMultipliedByCameraFar = minResolution * cameraFar;\n\t\t\tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUv );\n\n\t\t\t// jsfiddle that shows sample pattern: https://jsfiddle.net/a16ff1p7/\n\t\t\tfloat angle = rand( vUv + randomSeed ) * PI2;\n\t\t\tvec2 radius = vec2( kernelRadius * INV_NUM_SAMPLES ) / size;\n\t\t\tvec2 radiusStep = radius;\n\n\t\t\tfloat occlusionSum = 0.0;\n\t\t\tfloat weightSum = 0.0;\n\n\t\t\tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {\n\t\t\t\tvec2 sampleUv = vUv + vec2( cos( angle ), sin( angle ) ) * radius;\n\t\t\t\tradius += radiusStep;\n\t\t\t\tangle += ANGLE_STEP;\n\n\t\t\t\tfloat sampleDepth = getDepth( sampleUv );\n\t\t\t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfloat sampleViewZ = getViewZ( sampleDepth );\n\t\t\t\tvec3 sampleViewPosition = getViewPosition( sampleUv, sampleDepth, sampleViewZ );\n\t\t\t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );\n\t\t\t\tweightSum += 1.0;\n\t\t\t}\n\n\t\t\tif( weightSum == 0.0 ) discard;\n\n\t\t\treturn occlusionSum * ( intensity / weightSum );\n\t\t}\n\n\t\tvoid main() {\n\t\t\tfloat centerDepth = getDepth( vUv );\n\t\t\tif( centerDepth >= ( 1.0 - EPSILON ) ) {\n\t\t\t\tdiscard;\n\t\t\t}\n\n\t\t\tfloat centerViewZ = getViewZ( centerDepth );\n\t\t\tvec3 viewPosition = getViewPosition( vUv, centerDepth, centerViewZ );\n\n\t\t\tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );\n\n\t\t\tgl_FragColor = getDefaultColor( vUv );\n\t\t\tgl_FragColor.xyz *= 1.0 - ambientOcclusion;\n\t\t}"},pd={defines:{KERNEL_RADIUS:4,DEPTH_PACKING:1,PERSPECTIVE_CAMERA:1},uniforms:{tDiffuse:{value:null},size:{value:new le(512,512)},sampleUvOffsets:{value:[new le(0,0)]},sampleWeights:{value:[1]},tDepth:{value:null},cameraNear:{value:10},cameraFar:{value:1e3},depthCutoff:{value:10}},vertexShader:"\n\n\t\t#include \n\n\t\tuniform vec2 size;\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec2 vInvSize;\n\n\t\tvoid main() {\n\t\t\tvUv = uv;\n\t\t\tvInvSize = 1.0 / size;\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t}",fragmentShader:"\n\n\t\t#include \n\t\t#include \n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform sampler2D tDepth;\n\n\t\tuniform float cameraNear;\n\t\tuniform float cameraFar;\n\t\tuniform float depthCutoff;\n\n\t\tuniform vec2 sampleUvOffsets[ KERNEL_RADIUS + 1 ];\n\t\tuniform float sampleWeights[ KERNEL_RADIUS + 1 ];\n\n\t\tvarying vec2 vUv;\n\t\tvarying vec2 vInvSize;\n\n\t\tfloat getDepth( const in vec2 screenPosition ) {\n\t\t\t#if DEPTH_PACKING == 1\n\t\t\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );\n\t\t\t#else\n\t\t\treturn texture2D( tDepth, screenPosition ).x;\n\t\t\t#endif\n\t\t}\n\n\t\tfloat getViewZ( const in float depth ) {\n\t\t\t#if PERSPECTIVE_CAMERA == 1\n\t\t\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );\n\t\t\t#else\n\t\t\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );\n\t\t\t#endif\n\t\t}\n\n\t\tvoid main() {\n\t\t\tfloat depth = getDepth( vUv );\n\t\t\tif( depth >= ( 1.0 - EPSILON ) ) {\n\t\t\t\tdiscard;\n\t\t\t}\n\n\t\t\tfloat centerViewZ = -getViewZ( depth );\n\t\t\tbool rBreak = false, lBreak = false;\n\n\t\t\tfloat weightSum = sampleWeights[0];\n\t\t\tvec4 diffuseSum = texture2D( tDiffuse, vUv ) * weightSum;\n\n\t\t\tfor( int i = 1; i <= KERNEL_RADIUS; i ++ ) {\n\n\t\t\t\tfloat sampleWeight = sampleWeights[i];\n\t\t\t\tvec2 sampleUvOffset = sampleUvOffsets[i] * vInvSize;\n\n\t\t\t\tvec2 sampleUv = vUv + sampleUvOffset;\n\t\t\t\tfloat viewZ = -getViewZ( getDepth( sampleUv ) );\n\n\t\t\t\tif( abs( viewZ - centerViewZ ) > depthCutoff ) rBreak = true;\n\n\t\t\t\tif( ! rBreak ) {\n\t\t\t\t\tdiffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;\n\t\t\t\t\tweightSum += sampleWeight;\n\t\t\t\t}\n\n\t\t\t\tsampleUv = vUv - sampleUvOffset;\n\t\t\t\tviewZ = -getViewZ( getDepth( sampleUv ) );\n\n\t\t\t\tif( abs( viewZ - centerViewZ ) > depthCutoff ) lBreak = true;\n\n\t\t\t\tif( ! lBreak ) {\n\t\t\t\t\tdiffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;\n\t\t\t\t\tweightSum += sampleWeight;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tgl_FragColor = diffuseSum / weightSum;\n\t\t}"},Z_={createSampleWeights:function(e,t){let i=[];for(let r=0;r<=e;r++)i.push(CNt(r,t));return i},createSampleOffsets:function(e,t){let i=[];for(let r=0;r<=e;r++)i.push(t.clone().multiplyScalar(r));return i},configure:function(e,t,i,r){e.defines.KERNEL_RADIUS=t,e.uniforms.sampleUvOffsets.value=Z_.createSampleOffsets(t,r),e.uniforms.sampleWeights.value=Z_.createSampleWeights(t,i),e.needsUpdate=!0}};function CNt(e,t){return Math.exp(-e*e/(t*t*2))/(Math.sqrt(2*Math.PI)*t)}var R3={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\t#include \n\n\t\tvoid main() {\n\n\t\t\tfloat depth = 1.0 - unpackRGBAToDepth( texture2D( tDiffuse, vUv ) );\n\t\t\tgl_FragColor = vec4( vec3( depth ), opacity );\n\n\t\t}"},J_=class extends as{constructor(e,t,i=!1,r=!1,n=new le(256,256)){let s;super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.supportsDepthTextureExtension=i,this.supportsNormalTexture=r,this.originalClearColor=new je,this._oldClearColor=new je,this.oldClearAlpha=1,this.params={output:0,saoBias:.5,saoIntensity:.18,saoScale:1,saoKernelRadius:100,saoMinResolution:0,saoBlur:!0,saoBlurRadius:8,saoBlurStdDev:4,saoBlurDepthCutoff:.01},this.resolution=new le(n.x,n.y),this.saoRenderTarget=new Vr(this.resolution.x,this.resolution.y),this.blurIntermediateRenderTarget=this.saoRenderTarget.clone(),this.beautyRenderTarget=this.saoRenderTarget.clone(),this.normalRenderTarget=new Vr(this.resolution.x,this.resolution.y,{minFilter:Di,magFilter:Di}),this.depthRenderTarget=this.normalRenderTarget.clone(),this.supportsDepthTextureExtension&&(s=new cf,s.type=Cx,this.beautyRenderTarget.depthTexture=s,this.beautyRenderTarget.depthBuffer=!0),this.depthMaterial=new Ip,this.depthMaterial.depthPacking=Wy,this.depthMaterial.blending=Ui,this.normalMaterial=new pf,this.normalMaterial.blending=Ui,this.saoMaterial=new Yt({defines:Object.assign({},K_.defines),fragmentShader:K_.fragmentShader,vertexShader:K_.vertexShader,uniforms:pn.clone(K_.uniforms)}),this.saoMaterial.extensions.derivatives=!0,this.saoMaterial.defines.DEPTH_PACKING=this.supportsDepthTextureExtension?0:1,this.saoMaterial.defines.NORMAL_TEXTURE=this.supportsNormalTexture?1:0,this.saoMaterial.defines.PERSPECTIVE_CAMERA=this.camera.isPerspectiveCamera?1:0,this.saoMaterial.uniforms.tDepth.value=this.supportsDepthTextureExtension?s:this.depthRenderTarget.texture,this.saoMaterial.uniforms.tNormal.value=this.normalRenderTarget.texture,this.saoMaterial.uniforms.size.value.set(this.resolution.x,this.resolution.y),this.saoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.saoMaterial.uniforms.cameraProjectionMatrix.value=this.camera.projectionMatrix,this.saoMaterial.blending=Ui,this.vBlurMaterial=new Yt({uniforms:pn.clone(pd.uniforms),defines:Object.assign({},pd.defines),vertexShader:pd.vertexShader,fragmentShader:pd.fragmentShader}),this.vBlurMaterial.defines.DEPTH_PACKING=this.supportsDepthTextureExtension?0:1,this.vBlurMaterial.defines.PERSPECTIVE_CAMERA=this.camera.isPerspectiveCamera?1:0,this.vBlurMaterial.uniforms.tDiffuse.value=this.saoRenderTarget.texture,this.vBlurMaterial.uniforms.tDepth.value=this.supportsDepthTextureExtension?s:this.depthRenderTarget.texture,this.vBlurMaterial.uniforms.size.value.set(this.resolution.x,this.resolution.y),this.vBlurMaterial.blending=Ui,this.hBlurMaterial=new Yt({uniforms:pn.clone(pd.uniforms),defines:Object.assign({},pd.defines),vertexShader:pd.vertexShader,fragmentShader:pd.fragmentShader}),this.hBlurMaterial.defines.DEPTH_PACKING=this.supportsDepthTextureExtension?0:1,this.hBlurMaterial.defines.PERSPECTIVE_CAMERA=this.camera.isPerspectiveCamera?1:0,this.hBlurMaterial.uniforms.tDiffuse.value=this.blurIntermediateRenderTarget.texture,this.hBlurMaterial.uniforms.tDepth.value=this.supportsDepthTextureExtension?s:this.depthRenderTarget.texture,this.hBlurMaterial.uniforms.size.value.set(this.resolution.x,this.resolution.y),this.hBlurMaterial.blending=Ui,this.materialCopy=new Yt({uniforms:pn.clone(aa.uniforms),vertexShader:aa.vertexShader,fragmentShader:aa.fragmentShader,blending:Ui}),this.materialCopy.transparent=!0,this.materialCopy.depthTest=!1,this.materialCopy.depthWrite=!1,this.materialCopy.blending=Fp,this.materialCopy.blendSrc=Vy,this.materialCopy.blendDst=mf,this.materialCopy.blendEquation=Sa,this.materialCopy.blendSrcAlpha=Gy,this.materialCopy.blendDstAlpha=mf,this.materialCopy.blendEquationAlpha=Sa,this.depthCopy=new Yt({uniforms:pn.clone(R3.uniforms),vertexShader:R3.vertexShader,fragmentShader:R3.fragmentShader,blending:Ui}),this.fsQuad=new sa(null)}render(e,t,i){if(this.renderToScreen&&(this.materialCopy.blending=Ui,this.materialCopy.uniforms.tDiffuse.value=i.texture,this.materialCopy.needsUpdate=!0,this.renderPass(e,this.materialCopy,null)),1===this.params.output)return;e.getClearColor(this._oldClearColor),this.oldClearAlpha=e.getClearAlpha();let r=e.autoClear;e.autoClear=!1,e.setRenderTarget(this.depthRenderTarget),e.clear(),this.saoMaterial.uniforms.bias.value=this.params.saoBias,this.saoMaterial.uniforms.intensity.value=this.params.saoIntensity,this.saoMaterial.uniforms.scale.value=this.params.saoScale,this.saoMaterial.uniforms.kernelRadius.value=this.params.saoKernelRadius,this.saoMaterial.uniforms.minResolution.value=this.params.saoMinResolution,this.saoMaterial.uniforms.cameraNear.value=this.camera.near,this.saoMaterial.uniforms.cameraFar.value=this.camera.far;let n=this.params.saoBlurDepthCutoff*(this.camera.far-this.camera.near);this.vBlurMaterial.uniforms.depthCutoff.value=n,this.hBlurMaterial.uniforms.depthCutoff.value=n,this.vBlurMaterial.uniforms.cameraNear.value=this.camera.near,this.vBlurMaterial.uniforms.cameraFar.value=this.camera.far,this.hBlurMaterial.uniforms.cameraNear.value=this.camera.near,this.hBlurMaterial.uniforms.cameraFar.value=this.camera.far,this.params.saoBlurRadius=Math.floor(this.params.saoBlurRadius),(this.prevStdDev!==this.params.saoBlurStdDev||this.prevNumSamples!==this.params.saoBlurRadius)&&(Z_.configure(this.vBlurMaterial,this.params.saoBlurRadius,this.params.saoBlurStdDev,new le(0,1)),Z_.configure(this.hBlurMaterial,this.params.saoBlurRadius,this.params.saoBlurStdDev,new le(1,0)),this.prevStdDev=this.params.saoBlurStdDev,this.prevNumSamples=this.params.saoBlurRadius),e.setClearColor(0),e.setRenderTarget(this.beautyRenderTarget),e.clear(),e.render(this.scene,this.camera),this.supportsDepthTextureExtension||this.renderOverride(e,this.depthMaterial,this.depthRenderTarget,0,1),this.supportsNormalTexture&&this.renderOverride(e,this.normalMaterial,this.normalRenderTarget,7829503,1),this.renderPass(e,this.saoMaterial,this.saoRenderTarget,16777215,1),this.params.saoBlur&&(this.renderPass(e,this.vBlurMaterial,this.blurIntermediateRenderTarget,16777215,1),this.renderPass(e,this.hBlurMaterial,this.saoRenderTarget,16777215,1));let s=this.materialCopy;3===this.params.output?this.supportsDepthTextureExtension?(this.materialCopy.uniforms.tDiffuse.value=this.beautyRenderTarget.depthTexture,this.materialCopy.needsUpdate=!0):(this.depthCopy.uniforms.tDiffuse.value=this.depthRenderTarget.texture,this.depthCopy.needsUpdate=!0,s=this.depthCopy):4===this.params.output?(this.materialCopy.uniforms.tDiffuse.value=this.normalRenderTarget.texture,this.materialCopy.needsUpdate=!0):(this.materialCopy.uniforms.tDiffuse.value=this.saoRenderTarget.texture,this.materialCopy.needsUpdate=!0),0===this.params.output?s.blending=Fp:s.blending=Ui,this.renderPass(e,s,this.renderToScreen?null:i),e.setClearColor(this._oldClearColor,this.oldClearAlpha),e.autoClear=r}renderPass(e,t,i,r,n){e.getClearColor(this.originalClearColor);let s=e.getClearAlpha(),a=e.autoClear;e.setRenderTarget(i),e.autoClear=!1,null!=r&&(e.setClearColor(r),e.setClearAlpha(n||0),e.clear()),this.fsQuad.material=t,this.fsQuad.render(e),e.autoClear=a,e.setClearColor(this.originalClearColor),e.setClearAlpha(s)}renderOverride(e,t,i,r,n){e.getClearColor(this.originalClearColor);let s=e.getClearAlpha(),a=e.autoClear;e.setRenderTarget(i),e.autoClear=!1,r=t.clearColor||r,n=t.clearAlpha||n,null!=r&&(e.setClearColor(r),e.setClearAlpha(n||0),e.clear()),this.scene.overrideMaterial=t,e.render(this.scene,this.camera),this.scene.overrideMaterial=null,e.autoClear=a,e.setClearColor(this.originalClearColor),e.setClearAlpha(s)}setSize(e,t){this.beautyRenderTarget.setSize(e,t),this.saoRenderTarget.setSize(e,t),this.blurIntermediateRenderTarget.setSize(e,t),this.normalRenderTarget.setSize(e,t),this.depthRenderTarget.setSize(e,t),this.saoMaterial.uniforms.size.value.set(e,t),this.saoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.saoMaterial.uniforms.cameraProjectionMatrix.value=this.camera.projectionMatrix,this.saoMaterial.needsUpdate=!0,this.vBlurMaterial.uniforms.size.value.set(e,t),this.vBlurMaterial.needsUpdate=!0,this.hBlurMaterial.uniforms.size.value.set(e,t),this.hBlurMaterial.needsUpdate=!0}dispose(){this.saoRenderTarget.dispose(),this.blurIntermediateRenderTarget.dispose(),this.beautyRenderTarget.dispose(),this.normalRenderTarget.dispose(),this.depthRenderTarget.dispose(),this.depthMaterial.dispose(),this.normalMaterial.dispose(),this.saoMaterial.dispose(),this.vBlurMaterial.dispose(),this.hBlurMaterial.dispose(),this.materialCopy.dispose(),this.depthCopy.dispose(),this.fsQuad.dispose()}};J_.OUTPUT={Beauty:1,Default:0,SAO:2,Depth:3,Normal:4};var M3=class extends as{constructor(e,t,i,r){super(),this.scene=e,this.camera=t,this.sampleLevel=4,this.unbiased=!0,this.clearColor=void 0!==i?i:0,this.clearAlpha=void 0!==r?r:0,this._oldClearColor=new je;let n=aa;this.copyUniforms=pn.clone(n.uniforms),this.copyMaterial=new Yt({uniforms:this.copyUniforms,vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,transparent:!0,depthTest:!1,depthWrite:!1,blending:Fp,blendEquation:Sa,blendDst:ky,blendDstAlpha:ky,blendSrc:Mx,blendSrcAlpha:ky}),this.fsQuad=new sa(this.copyMaterial)}dispose(){this.sampleRenderTarget&&(this.sampleRenderTarget.dispose(),this.sampleRenderTarget=null),this.copyMaterial.dispose(),this.fsQuad.dispose()}setSize(e,t){this.sampleRenderTarget&&this.sampleRenderTarget.setSize(e,t)}render(e,t,i){this.sampleRenderTarget||(this.sampleRenderTarget=new Vr(i.width,i.height),this.sampleRenderTarget.texture.name="SSAARenderPass.sample");let r=ANt[Math.max(0,Math.min(this.sampleLevel,5))],n=e.autoClear;e.autoClear=!1,e.getClearColor(this._oldClearColor);let s=e.getClearAlpha(),a=1/r.length;this.copyUniforms.tDiffuse.value=this.sampleRenderTarget.texture;let o={fullWidth:i.width,fullHeight:i.height,offsetX:0,offsetY:0,width:i.width,height:i.height},l=Object.assign({},this.camera.view);l.enabled&&Object.assign(o,l);for(let i=0;id?(s=1,a=0):(s=0,a=1);let f=p-s+u,m=d-a+u,g=p-1+2*u,y=d-1+2*u,v=255&l,T=255&h,x=this.perm[v+this.perm[T]]%12,b=this.perm[v+s+this.perm[T+a]]%12,_=this.perm[v+1+this.perm[T+1]]%12,E=.5-p*p-d*d;E<0?i=0:(E*=E,i=E*E*this.dot(this.grad3[x],p,d));let w=.5-f*f-m*m;w<0?r=0:(w*=w,r=w*w*this.dot(this.grad3[b],f,m));let S=.5-g*g-y*y;return S<0?n=0:(S*=S,n=S*S*this.dot(this.grad3[_],g,y)),70*(i+r+n)}noise3d(e,t,i){let r,n,s,a,o,l,h,u,c,p,d=.3333333333333333*(e+t+i),f=Math.floor(e+d),m=Math.floor(t+d),g=Math.floor(i+d),y=1/6,v=(f+m+g)*y,T=e-(f-v),x=t-(m-v),b=i-(g-v);T>=x?x>=b?(o=1,l=0,h=0,u=1,c=1,p=0):T>=b?(o=1,l=0,h=0,u=1,c=0,p=1):(o=0,l=0,h=1,u=1,c=0,p=1):xb?32:0)+(x>_?16:0)+(b>_?8:0)+(x>E?4:0)+(b>E?2:0)+(_>E?1:0),S=u[w][0]>=3?1:0,I=u[w][1]>=3?1:0,M=u[w][2]>=3?1:0,A=u[w][3]>=3?1:0,D=u[w][0]>=2?1:0,O=u[w][1]>=2?1:0,R=u[w][2]>=2?1:0,C=u[w][3]>=2?1:0,N=u[w][0]>=1?1:0,P=u[w][1]>=1?1:0,L=u[w][2]>=1?1:0,F=u[w][3]>=1?1:0,U=x-S+d,k=b-I+d,B=_-M+d,H=E-A+d,G=x-D+2*d,z=b-O+2*d,V=_-R+2*d,j=E-C+2*d,W=x-N+3*d,Y=b-P+3*d,X=_-L+3*d,q=E-F+3*d,Z=x-1+4*d,K=b-1+4*d,J=_-1+4*d,$=E-1+4*d,Q=255&m,ee=255&g,te=255&y,ie=255&v,re=c[Q+c[ee+c[te+c[ie]]]]%32,ne=c[Q+S+c[ee+I+c[te+M+c[ie+A]]]]%32,se=c[Q+D+c[ee+O+c[te+R+c[ie+C]]]]%32,ae=c[Q+N+c[ee+P+c[te+L+c[ie+F]]]]%32,oe=c[Q+1+c[ee+1+c[te+1+c[ie+1]]]]%32,le=.6-x*x-b*b-_*_-E*E;le<0?n=0:(le*=le,n=le*le*this.dot4(h[re],x,b,_,E));let he=.6-U*U-k*k-B*B-H*H;he<0?s=0:(he*=he,s=he*he*this.dot4(h[ne],U,k,B,H));let ue=.6-G*G-z*z-V*V-j*j;ue<0?a=0:(ue*=ue,a=ue*ue*this.dot4(h[se],G,z,V,j));let ce=.6-W*W-Y*Y-X*X-q*q;ce<0?o=0:(ce*=ce,o=ce*ce*this.dot4(h[ae],W,Y,X,q));let pe=.6-Z*Z-K*K-J*J-$*$;return pe<0?l=0:(pe*=pe,l=pe*pe*this.dot4(h[oe],Z,K,J,$)),27*(n+s+a+o+l)}},Q_={defines:{PERSPECTIVE_CAMERA:1,KERNEL_SIZE:32},uniforms:{tDiffuse:{value:null},tNormal:{value:null},tDepth:{value:null},tNoise:{value:null},kernel:{value:null},cameraNear:{value:null},cameraFar:{value:null},resolution:{value:new le},cameraProjectionMatrix:{value:new Be},cameraInverseProjectionMatrix:{value:new Be},kernelRadius:{value:8},minDistance:{value:.005},maxDistance:{value:.05}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform sampler2D tNormal;\n\t\tuniform sampler2D tDepth;\n\t\tuniform sampler2D tNoise;\n\n\t\tuniform vec3 kernel[ KERNEL_SIZE ];\n\n\t\tuniform vec2 resolution;\n\n\t\tuniform float cameraNear;\n\t\tuniform float cameraFar;\n\t\tuniform mat4 cameraProjectionMatrix;\n\t\tuniform mat4 cameraInverseProjectionMatrix;\n\n\t\tuniform float kernelRadius;\n\t\tuniform float minDistance; // avoid artifacts caused by neighbour fragments with minimal depth difference\n\t\tuniform float maxDistance; // avoid the influence of fragments which are too far away\n\n\t\tvarying vec2 vUv;\n\n\t\t#include \n\n\t\tfloat getDepth( const in vec2 screenPosition ) {\n\n\t\t\treturn texture2D( tDepth, screenPosition ).x;\n\n\t\t}\n\n\t\tfloat getLinearDepth( const in vec2 screenPosition ) {\n\n\t\t\t#if PERSPECTIVE_CAMERA == 1\n\n\t\t\t\tfloat fragCoordZ = texture2D( tDepth, screenPosition ).x;\n\t\t\t\tfloat viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar );\n\t\t\t\treturn viewZToOrthographicDepth( viewZ, cameraNear, cameraFar );\n\n\t\t\t#else\n\n\t\t\t\treturn texture2D( tDepth, screenPosition ).x;\n\n\t\t\t#endif\n\n\t\t}\n\n\t\tfloat getViewZ( const in float depth ) {\n\n\t\t\t#if PERSPECTIVE_CAMERA == 1\n\n\t\t\t\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );\n\n\t\t\t#else\n\n\t\t\t\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );\n\n\t\t\t#endif\n\n\t\t}\n\n\t\tvec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) {\n\n\t\t\tfloat clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];\n\n\t\t\tvec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 );\n\n\t\t\tclipPosition *= clipW; // unprojection.\n\n\t\t\treturn ( cameraInverseProjectionMatrix * clipPosition ).xyz;\n\n\t\t}\n\n\t\tvec3 getViewNormal( const in vec2 screenPosition ) {\n\n\t\t\treturn unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tfloat depth = getDepth( vUv );\n\t\t\tfloat viewZ = getViewZ( depth );\n\n\t\t\tvec3 viewPosition = getViewPosition( vUv, depth, viewZ );\n\t\t\tvec3 viewNormal = getViewNormal( vUv );\n\n\t\t\tvec2 noiseScale = vec2( resolution.x / 4.0, resolution.y / 4.0 );\n\t\t\tvec3 random = vec3( texture2D( tNoise, vUv * noiseScale ).r );\n\n\t\t\t// compute matrix used to reorient a kernel vector\n\n\t\t\tvec3 tangent = normalize( random - viewNormal * dot( random, viewNormal ) );\n\t\t\tvec3 bitangent = cross( viewNormal, tangent );\n\t\t\tmat3 kernelMatrix = mat3( tangent, bitangent, viewNormal );\n\n\t\t float occlusion = 0.0;\n\n\t\t for ( int i = 0; i < KERNEL_SIZE; i ++ ) {\n\n\t\t\t\tvec3 sampleVector = kernelMatrix * kernel[ i ]; // reorient sample vector in view space\n\t\t\t\tvec3 samplePoint = viewPosition + ( sampleVector * kernelRadius ); // calculate sample point\n\n\t\t\t\tvec4 samplePointNDC = cameraProjectionMatrix * vec4( samplePoint, 1.0 ); // project point and calculate NDC\n\t\t\t\tsamplePointNDC /= samplePointNDC.w;\n\n\t\t\t\tvec2 samplePointUv = samplePointNDC.xy * 0.5 + 0.5; // compute uv coordinates\n\n\t\t\t\tfloat realDepth = getLinearDepth( samplePointUv ); // get linear depth from depth texture\n\t\t\t\tfloat sampleDepth = viewZToOrthographicDepth( samplePoint.z, cameraNear, cameraFar ); // compute linear depth of the sample view Z value\n\t\t\t\tfloat delta = sampleDepth - realDepth;\n\n\t\t\t\tif ( delta > minDistance && delta < maxDistance ) { // if fragment is before sample point, increase occlusion\n\n\t\t\t\t\tocclusion += 1.0;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tocclusion = clamp( occlusion / float( KERNEL_SIZE ), 0.0, 1.0 );\n\n\t\t\tgl_FragColor = vec4( vec3( 1.0 - occlusion ), 1.0 );\n\n\t\t}"},eS={defines:{PERSPECTIVE_CAMERA:1},uniforms:{tDepth:{value:null},cameraNear:{value:null},cameraFar:{value:null}},vertexShader:"varying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"uniform sampler2D tDepth;\n\n\t\tuniform float cameraNear;\n\t\tuniform float cameraFar;\n\n\t\tvarying vec2 vUv;\n\n\t\t#include \n\n\t\tfloat getLinearDepth( const in vec2 screenPosition ) {\n\n\t\t\t#if PERSPECTIVE_CAMERA == 1\n\n\t\t\t\tfloat fragCoordZ = texture2D( tDepth, screenPosition ).x;\n\t\t\t\tfloat viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar );\n\t\t\t\treturn viewZToOrthographicDepth( viewZ, cameraNear, cameraFar );\n\n\t\t\t#else\n\n\t\t\t\treturn texture2D( tDepth, screenPosition ).x;\n\n\t\t\t#endif\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tfloat depth = getLinearDepth( vUv );\n\t\t\tgl_FragColor = vec4( vec3( 1.0 - depth ), 1.0 );\n\n\t\t}"},tS={uniforms:{tDiffuse:{value:null},resolution:{value:new le}},vertexShader:"varying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"uniform sampler2D tDiffuse;\n\n\t\tuniform vec2 resolution;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec2 texelSize = ( 1.0 / resolution );\n\t\t\tfloat result = 0.0;\n\n\t\t\tfor ( int i = - 2; i <= 2; i ++ ) {\n\n\t\t\t\tfor ( int j = - 2; j <= 2; j ++ ) {\n\n\t\t\t\t\tvec2 offset = ( vec2( float( i ), float( j ) ) ) * texelSize;\n\t\t\t\t\tresult += texture2D( tDiffuse, vUv + offset ).r;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tgl_FragColor = vec4( vec3( result / ( 5.0 * 5.0 ) ), 1.0 );\n\n\t\t}"},rc=class extends as{constructor(e,t,i,r){super(),this.width=void 0!==i?i:512,this.height=void 0!==r?r:512,this.clear=!0,this.camera=t,this.scene=e,this.kernelRadius=8,this.kernelSize=32,this.kernel=[],this.noiseTexture=null,this.output=0,this.minDistance=.005,this.maxDistance=.1,this._visibilityCache=new Map,this.generateSampleKernel(),this.generateRandomKernelRotations();let n=new cf;n.format=Tp,n.type=gp,this.beautyRenderTarget=new Vr(this.width,this.height),this.normalRenderTarget=new Vr(this.width,this.height,{minFilter:Di,magFilter:Di,depthTexture:n}),this.ssaoRenderTarget=new Vr(this.width,this.height),this.blurRenderTarget=this.ssaoRenderTarget.clone(),this.ssaoMaterial=new Yt({defines:Object.assign({},Q_.defines),uniforms:pn.clone(Q_.uniforms),vertexShader:Q_.vertexShader,fragmentShader:Q_.fragmentShader,blending:Ui}),this.ssaoMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.ssaoMaterial.uniforms.tNormal.value=this.normalRenderTarget.texture,this.ssaoMaterial.uniforms.tDepth.value=this.normalRenderTarget.depthTexture,this.ssaoMaterial.uniforms.tNoise.value=this.noiseTexture,this.ssaoMaterial.uniforms.kernel.value=this.kernel,this.ssaoMaterial.uniforms.cameraNear.value=this.camera.near,this.ssaoMaterial.uniforms.cameraFar.value=this.camera.far,this.ssaoMaterial.uniforms.resolution.value.set(this.width,this.height),this.ssaoMaterial.uniforms.cameraProjectionMatrix.value.copy(this.camera.projectionMatrix),this.ssaoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.normalMaterial=new pf,this.normalMaterial.blending=Ui,this.blurMaterial=new Yt({defines:Object.assign({},tS.defines),uniforms:pn.clone(tS.uniforms),vertexShader:tS.vertexShader,fragmentShader:tS.fragmentShader}),this.blurMaterial.uniforms.tDiffuse.value=this.ssaoRenderTarget.texture,this.blurMaterial.uniforms.resolution.value.set(this.width,this.height),this.depthRenderMaterial=new Yt({defines:Object.assign({},eS.defines),uniforms:pn.clone(eS.uniforms),vertexShader:eS.vertexShader,fragmentShader:eS.fragmentShader,blending:Ui}),this.depthRenderMaterial.uniforms.tDepth.value=this.normalRenderTarget.depthTexture,this.depthRenderMaterial.uniforms.cameraNear.value=this.camera.near,this.depthRenderMaterial.uniforms.cameraFar.value=this.camera.far,this.copyMaterial=new Yt({uniforms:pn.clone(aa.uniforms),vertexShader:aa.vertexShader,fragmentShader:aa.fragmentShader,transparent:!0,depthTest:!1,depthWrite:!1,blendSrc:Vy,blendDst:mf,blendEquation:Sa,blendSrcAlpha:Gy,blendDstAlpha:mf,blendEquationAlpha:Sa}),this.fsQuad=new sa(null),this.originalClearColor=new je}dispose(){this.beautyRenderTarget.dispose(),this.normalRenderTarget.dispose(),this.ssaoRenderTarget.dispose(),this.blurRenderTarget.dispose(),this.normalMaterial.dispose(),this.blurMaterial.dispose(),this.copyMaterial.dispose(),this.depthRenderMaterial.dispose(),this.fsQuad.dispose()}render(e,t){switch(!1===e.capabilities.isWebGL2&&(this.noiseTexture.format=nC),e.setRenderTarget(this.beautyRenderTarget),e.clear(),e.render(this.scene,this.camera),this.overrideVisibility(),this.renderOverride(e,this.normalMaterial,this.normalRenderTarget,7829503,1),this.restoreVisibility(),this.ssaoMaterial.uniforms.kernelRadius.value=this.kernelRadius,this.ssaoMaterial.uniforms.minDistance.value=this.minDistance,this.ssaoMaterial.uniforms.maxDistance.value=this.maxDistance,this.renderPass(e,this.ssaoMaterial,this.ssaoRenderTarget),this.renderPass(e,this.blurMaterial,this.blurRenderTarget),this.output){case rc.OUTPUT.SSAO:this.copyMaterial.uniforms.tDiffuse.value=this.ssaoRenderTarget.texture,this.copyMaterial.blending=Ui,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t);break;case rc.OUTPUT.Blur:this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget.texture,this.copyMaterial.blending=Ui,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t);break;case rc.OUTPUT.Beauty:this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=Ui,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t);break;case rc.OUTPUT.Depth:this.renderPass(e,this.depthRenderMaterial,this.renderToScreen?null:t);break;case rc.OUTPUT.Normal:this.copyMaterial.uniforms.tDiffuse.value=this.normalRenderTarget.texture,this.copyMaterial.blending=Ui,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t);break;case rc.OUTPUT.Default:this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=Ui,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t),this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget.texture,this.copyMaterial.blending=Fp,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t);break;default:console.warn("THREE.SSAOPass: Unknown output type.")}}renderPass(e,t,i,r,n){e.getClearColor(this.originalClearColor);let s=e.getClearAlpha(),a=e.autoClear;e.setRenderTarget(i),e.autoClear=!1,null!=r&&(e.setClearColor(r),e.setClearAlpha(n||0),e.clear()),this.fsQuad.material=t,this.fsQuad.render(e),e.autoClear=a,e.setClearColor(this.originalClearColor),e.setClearAlpha(s)}renderOverride(e,t,i,r,n){e.getClearColor(this.originalClearColor);let s=e.getClearAlpha(),a=e.autoClear;e.setRenderTarget(i),e.autoClear=!1,r=t.clearColor||r,n=t.clearAlpha||n,null!=r&&(e.setClearColor(r),e.setClearAlpha(n||0),e.clear()),this.scene.overrideMaterial=t,e.render(this.scene,this.camera),this.scene.overrideMaterial=null,e.autoClear=a,e.setClearColor(this.originalClearColor),e.setClearAlpha(s)}setSize(e,t){this.width=e,this.height=t,this.beautyRenderTarget.setSize(e,t),this.ssaoRenderTarget.setSize(e,t),this.normalRenderTarget.setSize(e,t),this.blurRenderTarget.setSize(e,t),this.ssaoMaterial.uniforms.resolution.value.set(e,t),this.ssaoMaterial.uniforms.cameraProjectionMatrix.value.copy(this.camera.projectionMatrix),this.ssaoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.blurMaterial.uniforms.resolution.value.set(e,t)}generateSampleKernel(){let e=this.kernelSize,t=this.kernel;for(let i=0;i\n\t\t\t\tvarying vec2 vUv;\n\t\t\t\tuniform sampler2D colorTexture;\n\t\t\t\tuniform vec2 texSize;\n\t\t\t\tuniform vec2 direction;\n\n\t\t\t\tfloat gaussianPdf(in float x, in float sigma) {\n\t\t\t\t\treturn 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;\n\t\t\t\t}\n\t\t\t\tvoid main() {\n\t\t\t\t\tvec2 invSize = 1.0 / texSize;\n\t\t\t\t\tfloat fSigma = float(SIGMA);\n\t\t\t\t\tfloat weightSum = gaussianPdf(0.0, fSigma);\n\t\t\t\t\tvec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum;\n\t\t\t\t\tfor( int i = 1; i < KERNEL_RADIUS; i ++ ) {\n\t\t\t\t\t\tfloat x = float(i);\n\t\t\t\t\t\tfloat w = gaussianPdf(x, fSigma);\n\t\t\t\t\t\tvec2 uvOffset = direction * invSize * x;\n\t\t\t\t\t\tvec3 sample1 = texture2D( colorTexture, vUv + uvOffset).rgb;\n\t\t\t\t\t\tvec3 sample2 = texture2D( colorTexture, vUv - uvOffset).rgb;\n\t\t\t\t\t\tdiffuseSum += (sample1 + sample2) * w;\n\t\t\t\t\t\tweightSum += 2.0 * w;\n\t\t\t\t\t}\n\t\t\t\t\tgl_FragColor = vec4(diffuseSum/weightSum, 1.0);\n\t\t\t\t}"})}getCompositeMaterial(e){return new Yt({defines:{NUM_MIPS:e},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\n\t\t\t\tuniform sampler2D blurTexture1;\n\t\t\t\tuniform sampler2D blurTexture2;\n\t\t\t\tuniform sampler2D blurTexture3;\n\t\t\t\tuniform sampler2D blurTexture4;\n\t\t\t\tuniform sampler2D blurTexture5;\n\t\t\t\tuniform float bloomStrength;\n\t\t\t\tuniform float bloomRadius;\n\t\t\t\tuniform float bloomFactors[NUM_MIPS];\n\t\t\t\tuniform vec3 bloomTintColors[NUM_MIPS];\n\n\t\t\t\tfloat lerpBloomFactor(const in float factor) {\n\t\t\t\t\tfloat mirrorFactor = 1.2 - factor;\n\t\t\t\t\treturn mix(factor, mirrorFactor, bloomRadius);\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tgl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );\n\t\t\t\t}"})}};dd.BlurDirectionX=new le(1,0),dd.BlurDirectionY=new le(0,1);var JDe={uniforms:{tDiffuse:{value:null},resolution:{value:new le(1/1024,1/512)}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\tprecision highp float;\n\n\tuniform sampler2D tDiffuse;\n\n\tuniform vec2 resolution;\n\n\tvarying vec2 vUv;\n\n\t// FXAA 3.11 implementation by NVIDIA, ported to WebGL by Agost Biro (biro@archilogic.com)\n\n\t//----------------------------------------------------------------------------------\n\t// File: es3-keplerFXAAassetsshaders/FXAA_DefaultES.frag\n\t// SDK Version: v3.00\n\t// Email: gameworks@nvidia.com\n\t// Site: http://developer.nvidia.com/\n\t//\n\t// Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.\n\t//\n\t// Redistribution and use in source and binary forms, with or without\n\t// modification, are permitted provided that the following conditions\n\t// are met:\n\t// * Redistributions of source code must retain the above copyright\n\t// notice, this list of conditions and the following disclaimer.\n\t// * Redistributions in binary form must reproduce the above copyright\n\t// notice, this list of conditions and the following disclaimer in the\n\t// documentation and/or other materials provided with the distribution.\n\t// * Neither the name of NVIDIA CORPORATION nor the names of its\n\t// contributors may be used to endorse or promote products derived\n\t// from this software without specific prior written permission.\n\t//\n\t// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY\n\t// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n\t// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n\t// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n\t// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n\t// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n\t// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n\t// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t//\n\t//----------------------------------------------------------------------------------\n\n\t#ifndef FXAA_DISCARD\n\t\t\t//\n\t\t\t// Only valid for PC OpenGL currently.\n\t\t\t// Probably will not work when FXAA_GREEN_AS_LUMA = 1.\n\t\t\t//\n\t\t\t// 1 = Use discard on pixels which don't need AA.\n\t\t\t// For APIs which enable concurrent TEX+ROP from same surface.\n\t\t\t// 0 = Return unchanged color on pixels which don't need AA.\n\t\t\t//\n\t\t\t#define FXAA_DISCARD 0\n\t#endif\n\n\t/*--------------------------------------------------------------------------*/\n\t#define FxaaTexTop(t, p) texture2D(t, p, -100.0)\n\t#define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r), -100.0)\n\t/*--------------------------------------------------------------------------*/\n\n\t#define NUM_SAMPLES 5\n\n\t// assumes colors have premultipliedAlpha, so that the calculated color contrast is scaled by alpha\n\tfloat contrast( vec4 a, vec4 b ) {\n\t\t\tvec4 diff = abs( a - b );\n\t\t\treturn max( max( max( diff.r, diff.g ), diff.b ), diff.a );\n\t}\n\n\t/*============================================================================\n\n\t\t\t\t\t\t\t\t\tFXAA3 QUALITY - PC\n\n\t============================================================================*/\n\n\t/*--------------------------------------------------------------------------*/\n\tvec4 FxaaPixelShader(\n\t\t\tvec2 posM,\n\t\t\tsampler2D tex,\n\t\t\tvec2 fxaaQualityRcpFrame,\n\t\t\tfloat fxaaQualityEdgeThreshold,\n\t\t\tfloat fxaaQualityinvEdgeThreshold\n\t) {\n\t\t\tvec4 rgbaM = FxaaTexTop(tex, posM);\n\t\t\tvec4 rgbaS = FxaaTexOff(tex, posM, vec2( 0.0, 1.0), fxaaQualityRcpFrame.xy);\n\t\t\tvec4 rgbaE = FxaaTexOff(tex, posM, vec2( 1.0, 0.0), fxaaQualityRcpFrame.xy);\n\t\t\tvec4 rgbaN = FxaaTexOff(tex, posM, vec2( 0.0,-1.0), fxaaQualityRcpFrame.xy);\n\t\t\tvec4 rgbaW = FxaaTexOff(tex, posM, vec2(-1.0, 0.0), fxaaQualityRcpFrame.xy);\n\t\t\t// . S .\n\t\t\t// W M E\n\t\t\t// . N .\n\n\t\t\tbool earlyExit = max( max( max(\n\t\t\t\t\tcontrast( rgbaM, rgbaN ),\n\t\t\t\t\tcontrast( rgbaM, rgbaS ) ),\n\t\t\t\t\tcontrast( rgbaM, rgbaE ) ),\n\t\t\t\t\tcontrast( rgbaM, rgbaW ) )\n\t\t\t\t\t< fxaaQualityEdgeThreshold;\n\t\t\t// . 0 .\n\t\t\t// 0 0 0\n\t\t\t// . 0 .\n\n\t\t\t#if (FXAA_DISCARD == 1)\n\t\t\t\t\tif(earlyExit) FxaaDiscard;\n\t\t\t#else\n\t\t\t\t\tif(earlyExit) return rgbaM;\n\t\t\t#endif\n\n\t\t\tfloat contrastN = contrast( rgbaM, rgbaN );\n\t\t\tfloat contrastS = contrast( rgbaM, rgbaS );\n\t\t\tfloat contrastE = contrast( rgbaM, rgbaE );\n\t\t\tfloat contrastW = contrast( rgbaM, rgbaW );\n\n\t\t\tfloat relativeVContrast = ( contrastN + contrastS ) - ( contrastE + contrastW );\n\t\t\trelativeVContrast *= fxaaQualityinvEdgeThreshold;\n\n\t\t\tbool horzSpan = relativeVContrast > 0.;\n\t\t\t// . 1 .\n\t\t\t// 0 0 0\n\t\t\t// . 1 .\n\n\t\t\t// 45 deg edge detection and corners of objects, aka V/H contrast is too similar\n\t\t\tif( abs( relativeVContrast ) < .3 ) {\n\t\t\t\t\t// locate the edge\n\t\t\t\t\tvec2 dirToEdge;\n\t\t\t\t\tdirToEdge.x = contrastE > contrastW ? 1. : -1.;\n\t\t\t\t\tdirToEdge.y = contrastS > contrastN ? 1. : -1.;\n\t\t\t\t\t// . 2 . . 1 .\n\t\t\t\t\t// 1 0 2 ~= 0 0 1\n\t\t\t\t\t// . 1 . . 0 .\n\n\t\t\t\t\t// tap 2 pixels and see which ones are \"outside\" the edge, to\n\t\t\t\t\t// determine if the edge is vertical or horizontal\n\n\t\t\t\t\tvec4 rgbaAlongH = FxaaTexOff(tex, posM, vec2( dirToEdge.x, -dirToEdge.y ), fxaaQualityRcpFrame.xy);\n\t\t\t\t\tfloat matchAlongH = contrast( rgbaM, rgbaAlongH );\n\t\t\t\t\t// . 1 .\n\t\t\t\t\t// 0 0 1\n\t\t\t\t\t// . 0 H\n\n\t\t\t\t\tvec4 rgbaAlongV = FxaaTexOff(tex, posM, vec2( -dirToEdge.x, dirToEdge.y ), fxaaQualityRcpFrame.xy);\n\t\t\t\t\tfloat matchAlongV = contrast( rgbaM, rgbaAlongV );\n\t\t\t\t\t// V 1 .\n\t\t\t\t\t// 0 0 1\n\t\t\t\t\t// . 0 .\n\n\t\t\t\t\trelativeVContrast = matchAlongV - matchAlongH;\n\t\t\t\t\trelativeVContrast *= fxaaQualityinvEdgeThreshold;\n\n\t\t\t\t\tif( abs( relativeVContrast ) < .3 ) { // 45 deg edge\n\t\t\t\t\t\t\t// 1 1 .\n\t\t\t\t\t\t\t// 0 0 1\n\t\t\t\t\t\t\t// . 0 1\n\n\t\t\t\t\t\t\t// do a simple blur\n\t\t\t\t\t\t\treturn mix(\n\t\t\t\t\t\t\t\t\trgbaM,\n\t\t\t\t\t\t\t\t\t(rgbaN + rgbaS + rgbaE + rgbaW) * .25,\n\t\t\t\t\t\t\t\t\t.4\n\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\thorzSpan = relativeVContrast > 0.;\n\t\t\t}\n\n\t\t\tif(!horzSpan) rgbaN = rgbaW;\n\t\t\tif(!horzSpan) rgbaS = rgbaE;\n\t\t\t// . 0 . 1\n\t\t\t// 1 0 1 -> 0\n\t\t\t// . 0 . 1\n\n\t\t\tbool pairN = contrast( rgbaM, rgbaN ) > contrast( rgbaM, rgbaS );\n\t\t\tif(!pairN) rgbaN = rgbaS;\n\n\t\t\tvec2 offNP;\n\t\t\toffNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;\n\t\t\toffNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;\n\n\t\t\tbool doneN = false;\n\t\t\tbool doneP = false;\n\n\t\t\tfloat nDist = 0.;\n\t\t\tfloat pDist = 0.;\n\n\t\t\tvec2 posN = posM;\n\t\t\tvec2 posP = posM;\n\n\t\t\tint iterationsUsed = 0;\n\t\t\tint iterationsUsedN = 0;\n\t\t\tint iterationsUsedP = 0;\n\t\t\tfor( int i = 0; i < NUM_SAMPLES; i++ ) {\n\t\t\t\t\titerationsUsed = i;\n\n\t\t\t\t\tfloat increment = float(i + 1);\n\n\t\t\t\t\tif(!doneN) {\n\t\t\t\t\t\t\tnDist += increment;\n\t\t\t\t\t\t\tposN = posM + offNP * nDist;\n\t\t\t\t\t\t\tvec4 rgbaEndN = FxaaTexTop(tex, posN.xy);\n\t\t\t\t\t\t\tdoneN = contrast( rgbaEndN, rgbaM ) > contrast( rgbaEndN, rgbaN );\n\t\t\t\t\t\t\titerationsUsedN = i;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!doneP) {\n\t\t\t\t\t\t\tpDist += increment;\n\t\t\t\t\t\t\tposP = posM - offNP * pDist;\n\t\t\t\t\t\t\tvec4 rgbaEndP = FxaaTexTop(tex, posP.xy);\n\t\t\t\t\t\t\tdoneP = contrast( rgbaEndP, rgbaM ) > contrast( rgbaEndP, rgbaN );\n\t\t\t\t\t\t\titerationsUsedP = i;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(doneN || doneP) break;\n\t\t\t}\n\n\n\t\t\tif ( !doneP && !doneN ) return rgbaM; // failed to find end of edge\n\n\t\t\tfloat dist = min(\n\t\t\t\t\tdoneN ? float( iterationsUsedN ) / float( NUM_SAMPLES - 1 ) : 1.,\n\t\t\t\t\tdoneP ? float( iterationsUsedP ) / float( NUM_SAMPLES - 1 ) : 1.\n\t\t\t);\n\n\t\t\t// hacky way of reduces blurriness of mostly diagonal edges\n\t\t\t// but reduces AA quality\n\t\t\tdist = pow(dist, .5);\n\n\t\t\tdist = 1. - dist;\n\n\t\t\treturn mix(\n\t\t\t\t\trgbaM,\n\t\t\t\t\trgbaN,\n\t\t\t\t\tdist * .5\n\t\t\t);\n\t}\n\n\tvoid main() {\n\t\t\tconst float edgeDetectionQuality = .2;\n\t\t\tconst float invEdgeDetectionQuality = 1. / edgeDetectionQuality;\n\n\t\t\tgl_FragColor = FxaaPixelShader(\n\t\t\t\t\tvUv,\n\t\t\t\t\ttDiffuse,\n\t\t\t\t\tresolution,\n\t\t\t\t\tedgeDetectionQuality, // [0,1] contrast needed, otherwise early discard\n\t\t\t\t\tinvEdgeDetectionQuality\n\t\t\t);\n\n\t}\n\t"},UG=kn(ql(),1),ONt="bottomBar",PNt={stats:{icon:{default:"icon-showsectionplane"},mutexIds:["statistics","cameraInfo","tips"],onActive:e=>{e.viewer.showStats()},onDeactive:e=>{e.viewer.hideStats()}},statistics:{icon:{default:"icon-info",active:"icon-info-filled"},mutexIds:["stats","cameraInfo","tips"],onActive:e=>{let t=document.createElement("span");if(!e.viewer.scene)return void(t.textContent="Failed!");t.textContent="Comupting...";let i={components:{},points:0,faces:0,materials:{},lights:{}},r=["SKYBOX","GROUND_GRID","GRASS_GROUND","BIM_VIEWER_BOX_HELPER"];e.viewer.scene.traverse((e=>{(e instanceof rt||e instanceof Ir||e instanceof nn)&&!r.includes(e.name)?((e,t)=>{if(t.components[e.type]?t.components[e.type]++:t.components[e.type]=1,e.geometry){let i=e.geometry;if(e instanceof rt)if(i.index&&i.index.count){let r=Math.round(i.index.count/3);e instanceof rn&&(r*=e.count),t.faces+=r}else if(i.groups.length>0)for(let e=0;e{t.materials[e]?t.materials[e]++:t.materials[e]=1},r=e.material;r instanceof zr?i(r.id):Array.isArray(r)&&r.forEach((e=>i(e.id)))})(e,i):e instanceof Dl&&(i.lights[e.type]?i.lights[e.type]++:i.lights[e.type]=1)}));let n=(e,i)=>{t.innerHTML+=`

${e}:${i}

`};t.innerHTML="";let s=` (${(e=>{var t;let i=null==(t=e.renderer)?void 0:t.domElement;return null==i?void 0:i.dataset.engine})(e.viewer)})`;if(n("Version",`${XT}${s}`),n("Components",JSON.stringify(i.components)),n("Points",i.points),n("Faces",i.faces),n("Materials",Object.keys(i.materials).length),n("Lights",JSON.stringify(i.lights)),"DxfViewer"===e.viewer.name){n("Entities",e.viewer.getEntitiesCount())}e.tooltip.setContent(t),e.tooltip.show()},onDeactive:e=>{e.tooltip.hide()},onUpdate:e=>{let t=e.viewer.renderer,i=document.createElement("span"),r=(e,t)=>{i.innerHTML+=`

${e}:${t}

`};i.innerHTML="

-- Renderer Info --

";let n=null==t?void 0:t.info;r("Drawcalls",JSON.stringify(null==n?void 0:n.render.calls)),r("Points",JSON.stringify(null==n?void 0:n.render.points)),r("Lines",JSON.stringify(null==n?void 0:n.render.lines)),r("Triangles",JSON.stringify(null==n?void 0:n.render.triangles)),r("Geometries",JSON.stringify(null==n?void 0:n.memory.geometries)),r("Textures",JSON.stringify(null==n?void 0:n.memory.textures)),e.tooltip.updateChildContent(i)}},cameraInfo:{icon:{default:"icon-view",active:"icon-view-filled"},mutexIds:["stats","statistics","tips"],onActive:e=>{let t=()=>{if(!e.viewer||!e.viewer.camera||!e.viewer.controls)return;let i=e.viewer.camera,r=e.viewer.controls,n=e=>_t.numberToString(e),s=e=>_t.vectorToString(e),a=i.position,o=r instanceof $l?r.getTarget(new A):r.target;if(a){let t=document.createElement("span");t.innerHTML=`\n

Camera position:${s(a)}

\n

Camera target:${s(o)}

`,i instanceof Ji&&(t.innerHTML+=`\n

top: ${n(i.top)}, bottom: ${n(i.bottom)}, left: ${n(i.left)}, right: ${n(i.right)}

\n

zoom: ${n(i.zoom)}

`),e.tooltip.setContent(t)}e.active||window.removeEventListener("mouseup",t)};if(t(),window.addEventListener("mouseup",t),"BimViewer"===e.viewer.name){let i=e.viewer.controls;null==i||i.addEventListener("update",t)}else e.viewer.controls.addEventListener("change",t);e.tooltip.show()},onDeactive:e=>{e.tooltip.hide()}},tips:{icon:{default:"icon-more"},mutexIds:["stats","cameraInfo","cameraInfo"],onActive:e=>{let t=document.createElement("span");"BimViewer"===e.viewer.name?t.innerHTML="\n

W: Move forward

\n

A: Move backward

\n

S: Move left

\n

D: Move right

\n

Q: Rise up

\n

E: Lower down

\n

↑: Rotate up

\n

↓: Rotate down

\n

←: Rotate to left

\n

→: Rotate to right

\n ":"DxfViewer"===e.viewer.name?t.innerHTML="\n

↑: Move up

\n

↓: Move down

\n

←: Move to left

\n

→: Move to right

\n ":"BaseViewer"===e.viewer.name?t.innerHTML="\n

↑: Rotate up

\n

↓: Rotate down

\n

←: Rotate to left

\n

→: Rotate to right

\n ":t.innerHTML="\n

Nothing to show

\n ",e.tooltip.setContent(t),e.tooltip.show()},onDeactive:e=>{e.tooltip.hide()}}},om=class{constructor(e){this.viewer=e,this.itemList=new Map,this.init()}update(){this.itemList.forEach((e=>{e.update()}))}init(){var e;let t=document.createElement("div");t.id=ONt,t.classList.add("bottom-bar"),(0,UG.forEach)(PNt,((e,i)=>{let r=this.createItem(this.viewer,i,e);t.appendChild(r.element)})),this.element=t,null==(e=this.viewer.widgetContainer)||e.appendChild(this.element)}createItem(e,t,i){let r=new HG(e,this,t,i);return this.itemList.set(t,r),r}},HG=class{constructor(e,t,i,r){this.viewer=e,this.bottomBar=t,this.menuId=i,this.cfg=r,this.eventBus=fE(),this.active=!1,this.itemconfig=r,this.element=this.createButton(this.menuId,r),this.tooltip=new mh(i+"-tooltip",null,{parentNode:e.widgetContainer}),this.eventBus.on("activeChange",(e=>{e?(this.element.classList.add("active"),(0,UG.forEach)(r.mutexIds,(e=>{var t;let i=null==(t=this.bottomBar)?void 0:t.itemList.get(e);i&&i.active&&i.setActive(!1)})),r.onActive&&r.onActive(this)):(this.element.classList.remove("active"),r.onDeactive&&r.onDeactive(this)),this.element instanceof HTMLElement&&LC(this.element.classList,r.icon,this.active)}))}createButton(e,t){let i=document.createElement("i");i.id=e;let{default:r="icon-new",iconFont:n=uo}=t.icon;return i.classList.add("icon"),i.classList.add(n),i.classList.add(r),i.onclick=()=>{this.active=!this.active,t.onClick&&t.onClick(this),this.eventBus.emit("activeChange",this.active)},i}setActive(e){this.active=e,this.eventBus.emit("activeChange",this.active)}update(){this.active&&this.itemconfig.onUpdate&&this.itemconfig.onUpdate(this)}},rS=kn(ql(),1),NNt="gemini-context-menu",C3=class{constructor(e){this.itemList=[],this.id=e.id||NNt,this.container=e.container||document.body,this.context=e.context||{},this.element=this.createMenuUI(e.items||[]),this.handleClick=()=>{this.hide()},!1!==e.hideOnMouseDown&&document.addEventListener("click",this.handleClick),this.hide()}isEnable(e){return e.getEnabled?e.getEnabled(this.context):void 0===e.enabled||e.enabled}isShown(e){return e.getShown?e.getShown(this.context):void 0===e.shown||e.shown}getTitle(e){return e.title||e.getTitle&&e.getTitle(this.context)||""}createMenuUI(e){let t=document.createElement("div");t.id=this.id,t.classList.add("context-menu");let i=this.createMenuGroup(e);return t.append(...i),this.container.appendChild(t),t}createMenuGroup(e){return(0,rS.map)(e,(e=>{let t=document.createElement("ul");return(0,rS.forEach)(e,(e=>{let i=this.createMenuItem(e);t.append(i)})),t}))}createMenuItem(e){let t=document.createElement("li");return t.innerHTML=this.getTitle(e),t.onclick=()=>e.doAction&&e.doAction(this.context),this.isEnable(e)?t.classList.remove("disabled"):t.classList.add("disabled"),this.isShown(e)?t.removeAttribute("hidden"):t.setAttribute("hidden",""),this.itemList.push([e,t]),t}updateMenuItems(){(0,rS.forEach)(this.itemList,(([e,t])=>{this.isEnable(e)?t.classList.remove("disabled"):t.classList.add("disabled"),this.isShown(e)?t.removeAttribute("hidden"):t.setAttribute("hidden",""),t.innerHTML=this.getTitle(e)}))}showMenuElement(e,t){let i=this.element.offsetHeight,r=this.element.offsetWidth;t+i>window.innerHeight&&(t=window.innerHeight-i-5),e+r>window.innerWidth&&(e=window.innerWidth-r-5),this.element.style.left=e+"px",this.element.style.top=t+"px"}show(e,t){this.updateMenuItems(),this.element.removeAttribute("hidden"),this.showMenuElement(e,t)}hide(){this.element.setAttribute("hidden","")}destroy(){document.removeEventListener("click",this.handleClick),this.container.removeChild(this.element)}},To=e=>({bimViewer:t})=>t.translate(`ContextMenu.${e}`),eCe=e=>{var t;let i=0;return null==(t=e.scene)||t.traverseVisible((e=>{e instanceof rt&&i++})),i>0},LNt=e=>{var t,i;let r=0;return null==(t=e.scene)||t.traverse((e=>{e instanceof rt&&r++})),null==(i=e.scene)||i.traverseVisible((e=>{e instanceof rt&&r--})),r>0},BG=e=>e.hasTransparentObject(),A3=e=>!1!==e.userData.selectable,QDe=(e,t,i,r)=>{let n=e.selectedObject;return!(!n||!t||n.id!==t.id)&&(null!=i&&n.isInstancedMesh?i===n.userData.instanceId:null==r||!qi.isMergedMesh(n)||r===n.userData.batchId)},FNt={getTitle:To("viewFitEntity"),getShown:({hit:e})=>e,doAction:({bimViewer:e,hit:t})=>{e.flyToObject(t)}},HNt={getTitle:To("viewFitAll"),getEnabled:({bimViewer:e})=>eCe(e),doAction:({bimViewer:e})=>e.viewFitAll()},UNt={getTitle:To("hideEntity"),getShown:({hit:e})=>e,doAction:({bimViewer:e,hit:t})=>{A3(t)&&(t.visible=!1,e.enableRender())}},BNt={getTitle:To("hideOthers"),getShown:({hit:e})=>e,doAction:({bimViewer:e,hit:t})=>{var i;null==(i=e.scene)||i.traverse((e=>{e instanceof rt&&A3(e)&&(e.visible=!1)})),t.visible=!0,e.enableRender()}},kNt={getTitle:To("hideAll"),getEnabled:({bimViewer:e})=>eCe(e),doAction:({bimViewer:e})=>{var t;null==(t=e.scene)||t.traverse((e=>{e instanceof rt&&A3(e)&&(e.visible=!1)})),e.enableRender()}},GNt={getTitle:To("showAll"),getEnabled:({bimViewer:e})=>LNt(e),doAction:({bimViewer:e})=>{var t;null==(t=e.scene)||t.traverse((e=>{e instanceof rt&&A3(e)&&(e.visible=!0)})),e.enableRender()}},VNt={getTitle:({hit:e,bimViewer:t,instanceId:i,batchId:r})=>QDe(t,e,i,r)?To("deselect")({bimViewer:t}):To("select")({bimViewer:t}),getShown:({hit:e})=>e,doAction:({hit:e,bimViewer:t,instanceId:i,batchId:r})=>{!1!==e.userData.selectable?QDe(t,e,i,r)?t.clearSelection():t.selectObject(e,e.instanceId,r):ne.debug(`[ContextMenu] object(type: ${e.type}, name: ${e.name}) not selectable!`)}},zNt={getTitle:To("selectNone"),getEnabled:({bimViewer:e})=>e.selectedObject,doAction:({bimViewer:e})=>e.clearSelection()},jNt={getTitle:To("xRayAll"),getShown:({bimViewer:e})=>!BG(e),doAction:({bimViewer:e})=>{e.addOrRemoveObjectOpacity(!0),e.enableRender()}},WNt={getTitle:To("xRayNone"),getEnabled:({bimViewer:e})=>BG(e),doAction:({bimViewer:e})=>{BG(e)&&(e.addOrRemoveObjectOpacity(!1),e.enableRender())}},qNt={getTitle:To("xRayEntity"),getShown:({hit:e})=>e,doAction:({bimViewer:e,hit:t})=>{e.addOrRemoveObjectOpacity(!0,void 0,[t.id],void 0)}},YNt={getTitle:To("xRayOthers"),getShown:({hit:e})=>e,doAction:({bimViewer:e,hit:t})=>{e.addOrRemoveObjectOpacity(!0,.1,void 0,[t.id]),e.enableRender()}},XNt={getTitle:({bimViewer:e})=>{let t="";switch(e.sectionType){case"PickPlaneSection":t="*showSectionPlane";break;case"AxisPlaneSection":t="showAxisSection";break;case"ObjectsBoxSection":t="*showSectionBox"}return e.translate(`ContextMenu.${t}`)},getShown:({bimViewer:e,section:t})=>("PickPlaneSection"===e.sectionType||"AxisPlaneSection"===e.sectionType)&&(!!t&&!t.isShowSectionPlane),doAction:({bimViewer:e,section:t})=>{("PickPlaneSection"===e.sectionType||"AxisPlaneSection"===e.sectionType)&&(null==t||t.setSectionVisible(!0))}},$Nt={getTitle:({bimViewer:e})=>{let t="";switch(e.sectionType){case"PickPlaneSection":t="hideSectionPlane";break;case"AxisPlaneSection":t="hideAxisSection";break;case"ObjectsBoxSection":t="hideSectionBox"}return e.translate(`ContextMenu.${t}`)},getShown:e=>tCe(e),doAction:({bimViewer:e,section:t})=>{("PickPlaneSection"===e.sectionType||"AxisPlaneSection"===e.sectionType)&&(null==t||t.setSectionVisible(!1))}},KNt={getTitle:To("undoSection"),getShown:e=>tCe(e),doAction:({bimViewer:e,toolbar:t})=>{if("PickPlaneSection"===e.sectionType){let e=null==t?void 0:t.menuList.get("SectionPlane");null==e||e.setActive(!1)}else if("AxisPlaneSection"===e.sectionType){let e=null==t?void 0:t.menuList.get("SectionAxis");null==e||e.setActive(!1)}else if("ObjectsBoxSection"===e.sectionType){let e=null==t?void 0:t.menuList.get("SectionBox");null==e||e.setActive(!1)}}},tCe=({bimViewer:e,hit:t,section:i})=>("PickPlaneSection"===e.sectionType||"AxisPlaneSection"===e.sectionType)&&!!i&&i.isShowSectionPlane&&(null==t?void 0:t.name)===OB,rCe=[[XNt],[$Nt,KNt],[FNt,HNt],[UNt,BNt,kNt,GNt],[qNt,YNt,jNt,WNt],[VNt,zNt]];function ZNt(e){if(e&&"undefined"!=typeof window){var t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}}function ME(e,t){var i=e.__state.conversionName.toString(),r=Math.round(e.r),n=Math.round(e.g),s=Math.round(e.b),a=e.a,o=Math.round(e.h),l=e.s.toFixed(1),h=e.v.toFixed(1);if(t||"THREE_CHAR_HEX"===i||"SIX_CHAR_HEX"===i){for(var u=e.hex.toString(16);u.length<6;)u="0"+u;return"#"+u}return"CSS_RGB"===i?"rgb("+r+","+n+","+s+")":"CSS_RGBA"===i?"rgba("+r+","+n+","+s+","+a+")":"HEX"===i?"0x"+e.hex.toString(16):"RGB_ARRAY"===i?"["+r+","+n+","+s+"]":"RGBA_ARRAY"===i?"["+r+","+n+","+s+","+a+"]":"RGB_OBJ"===i?"{r:"+r+",g:"+n+",b:"+s+"}":"RGBA_OBJ"===i?"{r:"+r+",g:"+n+",b:"+s+",a:"+a+"}":"HSV_OBJ"===i?"{h:"+o+",s:"+l+",v:"+h+"}":"HSVA_OBJ"===i?"{h:"+o+",s:"+l+",v:"+h+",a:"+a+"}":"unknown format"}var iCe=Array.prototype.forEach,iS=Array.prototype.slice,mt={BREAK:{},extend:function(e){return this.each(iS.call(arguments,1),(function(t){(this.isObject(t)?Object.keys(t):[]).forEach(function(i){this.isUndefined(t[i])||(e[i]=t[i])}.bind(this))}),this),e},defaults:function(e){return this.each(iS.call(arguments,1),(function(t){(this.isObject(t)?Object.keys(t):[]).forEach(function(i){this.isUndefined(e[i])&&(e[i]=t[i])}.bind(this))}),this),e},compose:function(){var e=iS.call(arguments);return function(){for(var t=iS.call(arguments),i=e.length-1;i>=0;i--)t=[e[i].apply(this,t)];return t[0]}},each:function(e,t,i){if(e)if(iCe&&e.forEach&&e.forEach===iCe)e.forEach(t,i);else if(e.length===e.length+0){var r,n=void 0;for(n=0,r=e.length;n1?mt.toArray(arguments):arguments[0];return mt.each(JNt,(function(t){if(t.litmus(e))return mt.each(t.conversions,(function(t,i){if(nS=t.read(e),!1===O3&&!1!==nS)return O3=nS,nS.conversionName=i,nS.conversion=t,mt.BREAK})),mt.BREAK})),O3},nCe=void 0,N3={hsv_to_rgb:function(e,t,i){var r=Math.floor(e/60)%6,n=e/60-Math.floor(e/60),s=i*(1-t),a=i*(1-n*t),o=i*(1-(1-n)*t),l=[[i,o,s],[a,i,s],[s,i,o],[s,a,i],[o,s,i],[i,s,a]][r];return{r:255*l[0],g:255*l[1],b:255*l[2]}},rgb_to_hsv:function(e,t,i){var r=Math.min(e,t,i),n=Math.max(e,t,i),s=n-r,a=void 0;return 0===n?{h:NaN,s:0,v:0}:(a=e===n?(t-i)/s:t===n?2+(i-e)/s:4+(e-t)/s,(a/=6)<0&&(a+=1),{h:360*a,s:s/n,v:n/255})},rgb_to_hex:function(e,t,i){var r=this.hex_with_component(0,2,e);return r=this.hex_with_component(r,1,t),r=this.hex_with_component(r,0,i)},component_from_hex:function(e,t){return e>>8*t&255},hex_with_component:function(e,t,i){return i<<(nCe=8*t)|e&~(255<-1?t.length-t.indexOf(".")-1:0}var gCe=function(e){function t(e,i,r){ou(this,t);var n=um(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i)),s=r||{};return n.__min=s.min,n.__max=s.max,n.__step=s.step,mt.isUndefined(n.__step)?0===n.initialValue?n.__impliedStep=1:n.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(n.initialValue))/Math.LN10))/10:n.__impliedStep=n.__step,n.__precision=sCe(n.__impliedStep),n}return cm(t,U0),lu(t,[{key:"setValue",value:function(e){var i=e;return void 0!==this.__min&&ithis.__max&&(i=this.__max),void 0!==this.__step&&i%this.__step!=0&&(i=Math.round(i/this.__step)*this.__step),lm(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,i)}},{key:"min",value:function(e){return this.__min=e,this}},{key:"max",value:function(e){return this.__max=e,this}},{key:"step",value:function(e){return this.__step=e,this.__impliedStep=e,this.__precision=sCe(e),this}}]),t}();function nLt(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i}var L3=function(e){function t(e,i,r){ou(this,t);var n=um(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i,r));n.__truncationSuspended=!1;var s=n,a=void 0;function o(){s.__onFinishChange&&s.__onFinishChange.call(s,s.getValue())}function l(e){var t=a-e.clientY;s.setValue(s.getValue()+t*s.__impliedStep),a=e.clientY}function h(){Ye.unbind(window,"mousemove",l),Ye.unbind(window,"mouseup",h),o()}return n.__input=document.createElement("input"),n.__input.setAttribute("type","text"),Ye.bind(n.__input,"change",(function(){var e=parseFloat(s.__input.value);mt.isNaN(e)||s.setValue(e)})),Ye.bind(n.__input,"blur",(function(){o()})),Ye.bind(n.__input,"mousedown",(function(e){Ye.bind(window,"mousemove",l),Ye.bind(window,"mouseup",h),a=e.clientY})),Ye.bind(n.__input,"keydown",(function(e){13===e.keyCode&&(s.__truncationSuspended=!0,this.blur(),s.__truncationSuspended=!1,o())})),n.updateDisplay(),n.domElement.appendChild(n.__input),n}return cm(t,gCe),lu(t,[{key:"updateDisplay",value:function(){return this.__input.value=this.__truncationSuspended?this.getValue():nLt(this.getValue(),this.__precision),lm(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}();function aCe(e,t,i,r,n){return r+(e-t)/(i-t)*(n-r)}var VG=function(e){function t(e,i,r,n,s){ou(this,t);var a=um(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i,{min:r,max:n,step:s})),o=a;function l(e){e.preventDefault();var t=o.__background.getBoundingClientRect();return o.setValue(aCe(e.clientX,t.left,t.right,o.__min,o.__max)),!1}function h(){Ye.unbind(window,"mousemove",l),Ye.unbind(window,"mouseup",h),o.__onFinishChange&&o.__onFinishChange.call(o,o.getValue())}function u(e){var t=e.touches[0].clientX,i=o.__background.getBoundingClientRect();o.setValue(aCe(t,i.left,i.right,o.__min,o.__max))}function c(){Ye.unbind(window,"touchmove",u),Ye.unbind(window,"touchend",c),o.__onFinishChange&&o.__onFinishChange.call(o,o.getValue())}return a.__background=document.createElement("div"),a.__foreground=document.createElement("div"),Ye.bind(a.__background,"mousedown",(function(e){document.activeElement.blur(),Ye.bind(window,"mousemove",l),Ye.bind(window,"mouseup",h),l(e)})),Ye.bind(a.__background,"touchstart",(function(e){1===e.touches.length&&(Ye.bind(window,"touchmove",u),Ye.bind(window,"touchend",c),u(e))})),Ye.addClass(a.__background,"slider"),Ye.addClass(a.__foreground,"slider-fg"),a.updateDisplay(),a.__background.appendChild(a.__foreground),a.domElement.appendChild(a.__background),a}return cm(t,gCe),lu(t,[{key:"updateDisplay",value:function(){var e=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*e+"%",lm(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(),vCe=function(e){function t(e,i,r){ou(this,t);var n=um(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i)),s=n;return n.__button=document.createElement("div"),n.__button.innerHTML=void 0===r?"Fire":r,Ye.bind(n.__button,"click",(function(e){return e.preventDefault(),s.fire(),!1})),Ye.addClass(n.__button,"button"),n.domElement.appendChild(n.__button),n}return cm(t,U0),lu(t,[{key:"fire",value:function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}}]),t}(),zG=function(e){function t(e,i){ou(this,t);var r=um(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,i));r.__color=new Ns(r.getValue()),r.__temp=new Ns(0);var n=r;r.domElement=document.createElement("div"),Ye.makeSelectable(r.domElement,!1),r.__selector=document.createElement("div"),r.__selector.className="selector",r.__saturation_field=document.createElement("div"),r.__saturation_field.className="saturation-field",r.__field_knob=document.createElement("div"),r.__field_knob.className="field-knob",r.__field_knob_border="2px solid ",r.__hue_knob=document.createElement("div"),r.__hue_knob.className="hue-knob",r.__hue_field=document.createElement("div"),r.__hue_field.className="hue-field",r.__input=document.createElement("input"),r.__input.type="text",r.__input_textShadow="0 1px 1px ",Ye.bind(r.__input,"keydown",(function(e){13===e.keyCode&&u.call(this)})),Ye.bind(r.__input,"blur",u),Ye.bind(r.__selector,"mousedown",(function(){Ye.addClass(this,"drag").bind(window,"mouseup",(function(){Ye.removeClass(n.__selector,"drag")}))})),Ye.bind(r.__selector,"touchstart",(function(){Ye.addClass(this,"drag").bind(window,"touchend",(function(){Ye.removeClass(n.__selector,"drag")}))}));var s=document.createElement("div");function a(e){p(e),Ye.bind(window,"mousemove",p),Ye.bind(window,"touchmove",p),Ye.bind(window,"mouseup",l),Ye.bind(window,"touchend",l)}function o(e){d(e),Ye.bind(window,"mousemove",d),Ye.bind(window,"touchmove",d),Ye.bind(window,"mouseup",h),Ye.bind(window,"touchend",h)}function l(){Ye.unbind(window,"mousemove",p),Ye.unbind(window,"touchmove",p),Ye.unbind(window,"mouseup",l),Ye.unbind(window,"touchend",l),c()}function h(){Ye.unbind(window,"mousemove",d),Ye.unbind(window,"touchmove",d),Ye.unbind(window,"mouseup",h),Ye.unbind(window,"touchend",h),c()}function u(){var e=GG(this.value);!1!==e?(n.__color.__state=e,n.setValue(n.__color.toOriginal())):this.value=n.__color.toString()}function c(){n.__onFinishChange&&n.__onFinishChange.call(n,n.__color.toOriginal())}function p(e){-1===e.type.indexOf("touch")&&e.preventDefault();var t=n.__saturation_field.getBoundingClientRect(),i=e.touches&&e.touches[0]||e,r=i.clientX,s=i.clientY,a=(r-t.left)/(t.right-t.left),o=1-(s-t.top)/(t.bottom-t.top);return o>1?o=1:o<0&&(o=0),a>1?a=1:a<0&&(a=0),n.__color.v=o,n.__color.s=a,n.setValue(n.__color.toOriginal()),!1}function d(e){-1===e.type.indexOf("touch")&&e.preventDefault();var t=n.__hue_field.getBoundingClientRect(),i=1-((e.touches&&e.touches[0]||e).clientY-t.top)/(t.bottom-t.top);return i>1?i=1:i<0&&(i=0),n.__color.h=360*i,n.setValue(n.__color.toOriginal()),!1}return mt.extend(r.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),mt.extend(r.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:r.__field_knob_border+(r.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),mt.extend(r.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),mt.extend(r.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),mt.extend(s.style,{width:"100%",height:"100%",background:"none"}),oCe(s,"top","rgba(0,0,0,0)","#000"),mt.extend(r.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),aLt(r.__hue_field),mt.extend(r.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:r.__input_textShadow+"rgba(0,0,0,0.7)"}),Ye.bind(r.__saturation_field,"mousedown",a),Ye.bind(r.__saturation_field,"touchstart",a),Ye.bind(r.__field_knob,"mousedown",a),Ye.bind(r.__field_knob,"touchstart",a),Ye.bind(r.__hue_field,"mousedown",o),Ye.bind(r.__hue_field,"touchstart",o),r.__saturation_field.appendChild(s),r.__selector.appendChild(r.__field_knob),r.__selector.appendChild(r.__saturation_field),r.__selector.appendChild(r.__hue_field),r.__hue_field.appendChild(r.__hue_knob),r.domElement.appendChild(r.__input),r.domElement.appendChild(r.__selector),r.updateDisplay(),r}return cm(t,U0),lu(t,[{key:"updateDisplay",value:function(){var e=GG(this.getValue());if(!1!==e){var t=!1;mt.each(Ns.COMPONENTS,(function(i){if(!mt.isUndefined(e[i])&&!mt.isUndefined(this.__color.__state[i])&&e[i]!==this.__color.__state[i])return t=!0,{}}),this),t&&mt.extend(this.__color.__state,e)}mt.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var i=this.__color.v<.5||this.__color.s>.5?255:0,r=255-i;mt.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+i+","+i+","+i+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,oCe(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),mt.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+i+","+i+","+i+")",textShadow:this.__input_textShadow+"rgba("+r+","+r+","+r+",.7)"})}}]),t}(),sLt=["-moz-","-o-","-webkit-","-ms-",""];function oCe(e,t,i,r){e.style.background="",mt.each(sLt,(function(n){e.style.cssText+="background: "+n+"linear-gradient("+t+", "+i+" 0%, "+r+" 100%); "}))}function aLt(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}var oLt={load:function(e,t){var i=t||document,r=i.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,i.getElementsByTagName("head")[0].appendChild(r)},inject:function(e,t){var i=t||document,r=document.createElement("style");r.type="text/css",r.innerHTML=e;var n=i.getElementsByTagName("head")[0];try{n.appendChild(r)}catch(e){}}},lLt='
\n\n Here\'s the new load parameter for your GUI\'s constructor:\n\n \n\n
\n\n Automatically save\n values to localStorage on exit.\n\n
The values saved to localStorage will\n override those passed to dat.GUI\'s constructor. This makes it\n easier to work incrementally, but localStorage is fragile,\n and your friends may not see the same values you do.\n\n
\n\n
\n\n
',cLt=function(e,t){var i=e[t];return mt.isArray(arguments[2])||mt.isObject(arguments[2])?new rLt(e,t,arguments[2]):mt.isNumber(i)?mt.isNumber(arguments[2])&&mt.isNumber(arguments[3])?mt.isNumber(arguments[4])?new VG(e,t,arguments[2],arguments[3],arguments[4]):new VG(e,t,arguments[2],arguments[3]):mt.isNumber(arguments[4])?new L3(e,t,{min:arguments[2],max:arguments[3],step:arguments[4]}):new L3(e,t,{min:arguments[2],max:arguments[3]}):mt.isString(i)?new iLt(e,t):mt.isFunction(i)?new vCe(e,t,""):mt.isBoolean(i)?new mCe(e,t):null};function uLt(e){setTimeout(e,1e3/60)}var hLt=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||uLt,pLt=function(){function e(){ou(this,e),this.backgroundElement=document.createElement("div"),mt.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),Ye.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),mt.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var t=this;Ye.bind(this.backgroundElement,"click",(function(){t.hide()}))}return lu(e,[{key:"show",value:function(){var e=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),mt.defer((function(){e.backgroundElement.style.opacity=1,e.domElement.style.opacity=1,e.domElement.style.webkitTransform="scale(1)"}))}},{key:"hide",value:function(){var e=this,t=function t(){e.domElement.style.display="none",e.backgroundElement.style.display="none",Ye.unbind(e.domElement,"webkitTransitionEnd",t),Ye.unbind(e.domElement,"transitionend",t),Ye.unbind(e.domElement,"oTransitionEnd",t)};Ye.bind(this.domElement,"webkitTransitionEnd",t),Ye.bind(this.domElement,"transitionend",t),Ye.bind(this.domElement,"oTransitionEnd",t),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"}},{key:"layout",value:function(){this.domElement.style.left=window.innerWidth/2-Ye.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-Ye.getHeight(this.domElement)/2+"px"}}]),e}(),dLt=ZNt(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .cr.function .property-name{width:100%}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n");oLt.inject(dLt);var lCe="dg",cCe=72,uCe=20,lS="Default",sS=function(){try{return!!window.localStorage}catch(e){return!1}}(),aS=void 0,hCe=!0,wE=void 0,kG=!1,yCe=[],bn=function e(t){var i=this,r=t||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),Ye.addClass(this.domElement,lCe),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],r=mt.defaults(r,{closeOnTop:!1,autoPlace:!0,width:e.DEFAULT_WIDTH}),r=mt.defaults(r,{resizable:r.autoPlace,hideable:r.autoPlace}),mt.isUndefined(r.load)?r.load={preset:lS}:r.preset&&(r.load.preset=r.preset),mt.isUndefined(r.parent)&&r.hideable&&yCe.push(this),r.resizable=mt.isUndefined(r.parent)&&r.resizable,r.autoPlace&&mt.isUndefined(r.scrollable)&&(r.scrollable=!0);var n,s=sS&&"true"===localStorage.getItem(RE(this,"isLocal")),a=void 0,o=void 0;if(Object.defineProperties(this,{parent:{get:function(){return r.parent}},scrollable:{get:function(){return r.scrollable}},autoPlace:{get:function(){return r.autoPlace}},closeOnTop:{get:function(){return r.closeOnTop}},preset:{get:function(){return i.parent?i.getRoot().preset:r.load.preset},set:function(e){i.parent?i.getRoot().preset=e:r.load.preset=e,vLt(this),i.revert()}},width:{get:function(){return r.width},set:function(e){r.width=e,qG(i,e)}},name:{get:function(){return r.name},set:function(e){r.name=e,o&&(o.innerHTML=r.name)}},closed:{get:function(){return r.closed},set:function(t){r.closed=t,r.closed?Ye.addClass(i.__ul,e.CLASS_CLOSED):Ye.removeClass(i.__ul,e.CLASS_CLOSED),this.onResize(),i.__closeButton&&(i.__closeButton.innerHTML=t?e.TEXT_OPEN:e.TEXT_CLOSED)}},load:{get:function(){return r.load}},useLocalStorage:{get:function(){return s},set:function(e){sS&&(s=e,e?Ye.bind(window,"unload",a):Ye.unbind(window,"unload",a),localStorage.setItem(RE(i,"isLocal"),e))}}}),mt.isUndefined(r.parent)){if(this.closed=r.closed||!1,Ye.addClass(this.domElement,e.CLASS_MAIN),Ye.makeSelectable(this.domElement,!1),sS&&s){i.useLocalStorage=!0;var l=localStorage.getItem(RE(this,"gui"));l&&(r.load=JSON.parse(l))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=e.TEXT_CLOSED,Ye.addClass(this.__closeButton,e.CLASS_CLOSE_BUTTON),r.closeOnTop?(Ye.addClass(this.__closeButton,e.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(Ye.addClass(this.__closeButton,e.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),Ye.bind(this.__closeButton,"click",(function(){i.closed=!i.closed}))}else{void 0===r.closed&&(r.closed=!0);var h=document.createTextNode(r.name);Ye.addClass(h,"controller-name"),o=$G(i,h);Ye.addClass(this.__ul,e.CLASS_CLOSED),Ye.addClass(o,"title"),Ye.bind(o,"click",(function(e){return e.preventDefault(),i.closed=!i.closed,!1})),r.closed||(this.closed=!1)}r.autoPlace&&(mt.isUndefined(r.parent)&&(hCe&&(wE=document.createElement("div"),Ye.addClass(wE,lCe),Ye.addClass(wE,e.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(wE),hCe=!1),wE.appendChild(this.domElement),Ye.addClass(this.domElement,e.CLASS_AUTO_PLACE)),this.parent||qG(i,r.width)),this.__resizeHandler=function(){i.onResizeDebounced()},Ye.bind(window,"resize",this.__resizeHandler),Ye.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),Ye.bind(this.__ul,"transitionend",this.__resizeHandler),Ye.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),r.resizable&&gLt(this),a=function(){sS&&"true"===localStorage.getItem(RE(i,"isLocal"))&&localStorage.setItem(RE(i,"gui"),JSON.stringify(i.getSaveObject()))},this.saveToLocalStorageIfPossible=a,r.parent||((n=i.getRoot()).width+=1,mt.defer((function(){n.width-=1})))};function $G(e,t,i){var r=document.createElement("li");return t&&r.appendChild(t),i?e.__ul.insertBefore(r,i):e.__ul.appendChild(r),e.onResize(),r}function pCe(e){Ye.unbind(window,"resize",e.__resizeHandler),e.saveToLocalStorageIfPossible&&Ye.unbind(window,"unload",e.saveToLocalStorageIfPossible)}function jG(e,t){var i=e.__preset_select[e.__preset_select.selectedIndex];i.innerHTML=t?i.value+"*":i.value}function fLt(e,t,i){if(i.__li=t,i.__gui=e,mt.extend(i,{options:function(t){if(arguments.length>1){var r=i.__li.nextElementSibling;return i.remove(),oS(e,i.object,i.property,{before:r,factoryArgs:[mt.toArray(arguments)]})}if(mt.isArray(t)||mt.isObject(t)){var n=i.__li.nextElementSibling;return i.remove(),oS(e,i.object,i.property,{before:n,factoryArgs:[t]})}},name:function(e){return i.__li.firstElementChild.firstElementChild.innerHTML=e,i},listen:function(){return i.__gui.listen(i),i},remove:function(){return i.__gui.remove(i),i}}),i instanceof VG){var r=new L3(i.object,i.property,{min:i.__min,max:i.__max,step:i.__step});mt.each(["updateDisplay","onChange","onFinishChange","step","min","max"],(function(e){var t=i[e],n=r[e];i[e]=r[e]=function(){var e=Array.prototype.slice.call(arguments);return n.apply(r,e),t.apply(i,e)}})),Ye.addClass(t,"has-slider"),i.domElement.insertBefore(r.domElement,i.domElement.firstElementChild)}else if(i instanceof L3){var n=function(t){if(mt.isNumber(i.__min)&&mt.isNumber(i.__max)){var r=i.__li.firstElementChild.firstElementChild.innerHTML,n=i.__gui.__listening.indexOf(i)>-1;i.remove();var s=oS(e,i.object,i.property,{before:i.__li.nextElementSibling,factoryArgs:[i.__min,i.__max,i.__step]});return s.name(r),n&&s.listen(),s}return t};i.min=mt.compose(n,i.min),i.max=mt.compose(n,i.max)}else i instanceof mCe?(Ye.bind(t,"click",(function(){Ye.fakeEvent(i.__checkbox,"click")})),Ye.bind(i.__checkbox,"click",(function(e){e.stopPropagation()}))):i instanceof vCe?(Ye.bind(t,"click",(function(){Ye.fakeEvent(i.__button,"click")})),Ye.bind(t,"mouseover",(function(){Ye.addClass(i.__button,"hover")})),Ye.bind(t,"mouseout",(function(){Ye.removeClass(i.__button,"hover")}))):i instanceof zG&&(Ye.addClass(t,"color"),i.updateDisplay=mt.compose((function(e){return t.style.borderLeftColor=i.__color.toString(),e}),i.updateDisplay),i.updateDisplay());i.setValue=mt.compose((function(t){return e.getRoot().__preset_select&&i.isModified()&&jG(e.getRoot(),!0),t}),i.setValue)}function TCe(e,t){var i=e.getRoot(),r=i.__rememberedObjects.indexOf(t.object);if(-1!==r){var n=i.__rememberedObjectIndecesToControllers[r];if(void 0===n&&(n={},i.__rememberedObjectIndecesToControllers[r]=n),n[t.property]=t,i.load&&i.load.remembered){var s=i.load.remembered,a=void 0;if(s[e.preset])a=s[e.preset];else{if(!s[lS])return;a=s[lS]}if(a[r]&&void 0!==a[r][t.property]){var o=a[r][t.property];t.initialValue=o,t.setValue(o)}}}}function oS(e,t,i,r){if(void 0===t[i])throw new Error('Object "'+t+'" has no property "'+i+'"');var n=void 0;if(r.color)n=new zG(t,i);else{var s=[t,i].concat(r.factoryArgs);n=cLt.apply(e,s)}r.before instanceof U0&&(r.before=r.before.__li),TCe(e,n),Ye.addClass(n.domElement,"c");var a=document.createElement("span");Ye.addClass(a,"property-name"),a.innerHTML=n.property;var o=document.createElement("div");o.appendChild(a),o.appendChild(n.domElement);var l=$G(e,o,r.before);return Ye.addClass(l,bn.CLASS_CONTROLLER_ROW),n instanceof zG?Ye.addClass(l,"color"):Ye.addClass(l,QNt(n.getValue())),fLt(e,l,n),e.__controllers.push(n),n}function RE(e,t){return document.location.href+"."+t}function WG(e,t,i){var r=document.createElement("option");r.innerHTML=t,r.value=t,e.__preset_select.appendChild(r),i&&(e.__preset_select.selectedIndex=e.__preset_select.length-1)}function dCe(e,t){t.style.display=e.useLocalStorage?"block":"none"}function mLt(e){var t=e.__save_row=document.createElement("li");Ye.addClass(e.domElement,"has-save"),e.__ul.insertBefore(t,e.__ul.firstChild),Ye.addClass(t,"save-row");var i=document.createElement("span");i.innerHTML=" ",Ye.addClass(i,"button gears");var r=document.createElement("span");r.innerHTML="Save",Ye.addClass(r,"button"),Ye.addClass(r,"save");var n=document.createElement("span");n.innerHTML="New",Ye.addClass(n,"button"),Ye.addClass(n,"save-as");var s=document.createElement("span");s.innerHTML="Revert",Ye.addClass(s,"button"),Ye.addClass(s,"revert");var a=e.__preset_select=document.createElement("select");if(e.load&&e.load.remembered?mt.each(e.load.remembered,(function(t,i){WG(e,i,i===e.preset)})):WG(e,lS,!1),Ye.bind(a,"change",(function(){for(var t=0;t0&&(e.preset=this.preset,e.remembered||(e.remembered={}),e.remembered[this.preset]=P3(this)),e.folders={},mt.each(this.__folders,(function(t,i){e.folders[i]=t.getSaveObject()})),e},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=P3(this),jG(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(e){this.load.remembered||(this.load.remembered={},this.load.remembered[lS]=P3(this,!0)),this.load.remembered[e]=P3(this),this.preset=e,WG(this,e,!0),this.saveToLocalStorageIfPossible()},revert:function(e){mt.each(this.__controllers,(function(t){this.getRoot().load.remembered?TCe(e||this.getRoot(),t):t.setValue(t.initialValue),t.__onFinishChange&&t.__onFinishChange.call(t,t.getValue())}),this),mt.each(this.__folders,(function(e){e.revert(e)})),e||jG(this.getRoot(),!1)},listen:function(e){var t=0===this.__listening.length;this.__listening.push(e),t&&ECe(this.__listening)},updateDisplay:function(){mt.each(this.__controllers,(function(e){e.updateDisplay()})),mt.each(this.__folders,(function(e){e.updateDisplay()}))}});var bCe=bn,xCe=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],fd=(()=>{let e=xCe[0],t={};for(let i of xCe)if((null==i?void 0:i[1])in document){for(let[r,n]of i.entries())t[e[r]]=n;return t}return!1})(),ICe={change:fd.fullscreenchange,error:fd.fullscreenerror},il={request:(e=document.documentElement,t)=>new Promise(((i,r)=>{let n=()=>{il.off("change",n),i()};il.on("change",n);let s=e[fd.requestFullscreen](t);s instanceof Promise&&s.then(n).catch(r)})),exit:()=>new Promise(((e,t)=>{if(!il.isFullscreen)return void e();let i=()=>{il.off("change",i),e()};il.on("change",i);let r=document[fd.exitFullscreen]();r instanceof Promise&&r.then(i).catch(t)})),toggle:(e,t)=>il.isFullscreen?il.exit():il.request(e,t),onchange(e){il.on("change",e)},onerror(e){il.on("error",e)},on(e,t){let i=ICe[e];i&&document.addEventListener(i,t,!1)},off(e,t){let i=ICe[e];i&&document.removeEventListener(i,t,!1)},raw:fd};Object.defineProperties(il,{isFullscreen:{get:()=>Boolean(document[fd.fullscreenElement])},element:{enumerable:!0,get:()=>{var e;return null!=(e=document[fd.fullscreenElement])?e:void 0}},isEnabled:{enumerable:!0,get:()=>Boolean(document[fd.fullscreenEnabled])}}),fd||(il={isEnabled:!1});var F3=il;function _Ce(e,t,i,r,n,s,a){let o=e.addFolder(t);o.add(i,"x",n,s,a).onChange(r),o.add(i,"y",n,s,a).onChange(r),o.add(i,"z",n,s,a).onChange(r)}var H3=class{constructor(e){this.exploderDict={},this.controls={showGroundGrid:!1,showGrassGround:!1,skyMode:["None","Black Background","White Background","Gradient ramp","Cloudy"],environments:["None","Default (City Streat 64x32)","Venice Sunset","Footprint Court (HDR Labs)","City Street"],homeView:()=>console.log("[DGH] Go to home view"),views:["Top","Bottom","Front","Back","Left","Right"],OrthographicCamera:!1,viewpoints:!1,annotations:!1,takeSnapshot:()=>console.log("[DGH] Taking snapshot..."),fullScreen:()=>console.log("[DGH] Full screen..."),webcam:!1,uploadFile:()=>console.log("[DGH] Upload file..."),showBimTree:!1,showPropertyPanel:!1,transparentMode:!1,showVertexNormals:!1,sectionMode:["No section","Box section","Plane section"],alVisible:!0,alColor:"#cccccc",alIntensity:1,dlColor:"#dddddd",showDlHelper:!1,hlVisible:!0,hlIntensity:1,hlColor:[255,255,255,.6],hlGroundColor:[200,255,200,.6],fogEnabled:!1,fogColor:14540253,fogNearDistance:1,fogFarDistance:1e3,composerEnabled:!1,renderPassEnabled:!1,fxaaEnabled:!1,saoEnabled:!1,ssaoEnabled:!1,outlineEnabled:!1,ssaaEnabled:!1,bloomEnabled:!1,unrealBloomEnabled:!1},this.viewer=e,this.init()}init(){if(!this.viewer||!this.viewer.renderer||!this.viewer.scene)throw new Error("Need to initialize renderer, scene first!");let e=this.viewer,t=this.viewer.scene,i=this.controls;this.gui=new bCe({name:"controls",autoPlace:!0,width:300,closed:!0}),this.gui.domElement.style.opacity="0.6";let r=this.gui.addFolder("Common settings");r.add(i,"showGroundGrid").name("Show ground grid").onChange((i=>{e.groundGrid?e.groundGrid.visible=i:i&&(e.groundGrid=Js.createGroundGrid(),t.add(e.groundGrid),e.enableRender()),e.enableRender()})),r.add(i,"showGrassGround").name("Show grass ground").onChange((i=>{e.grassGround?e.grassGround.visible=i:i&&ht(this,null,(function*(){e.grassGround=yield Js.createGrassGround(),t.add(e.grassGround),e.enableRender()})),e.enableRender()}));let n=r.add(i,"skyMode",i.skyMode).name("Sky mode");n.onChange((i=>{if(e.skyOfGradientRamp&&(e.skyOfGradientRamp.visible="Gradient ramp"===i),"Black Background"===i)t.background=new je(0);else if("White Background"===i)t.background=new je(16777215);else if("Gradient ramp"===i)e.skyOfGradientRamp||(e.skyOfGradientRamp=qo.createSkyOfGradientRamp(),t.add(e.skyOfGradientRamp)),e.skyOfGradientRamp.visible=!0;else if("Cloudy"===i){let e=["right.jpg","left.jpg","top.jpg","bottom.jpg","front.jpg","back.jpg"];e=e.map((e=>`${window.location.origin}/images/skybox/cloudy/${e}`)),qo.createSkyFromTextures(e).then((e=>{t.background=e}))}else t.background=e.sceneBackgroundColor;e.enableRender()})),n.setValue("Gradient ramp"),r.add(i,"environments",i.environments).name("Environments").onChange((i=>{let r="";if("Default (City Streat 64x32)"===i){if(e.pmremGenerator)return Nc.createEnvTextureFromDataArray(e.pmremGenerator).then((e=>{t.environment=e})),void e.enableRender()}else"Venice Sunset"===i?r="venice_sunset_1k.hdr":"Footprint Court (HDR Labs)"===i?r="footprint_court_2k.hdr":"City Street"===i&&(r="city_street_256.hdr");""===r?t.environment=null:(r=`${window.location.origin}/images/envmap/${r}`,Nc.createEnvTexture(e.pmremGenerator,r).then((e=>{t.environment=e}))),e.enableRender()})),r.add(i,"homeView").name("Go to home view").onChange((()=>{e.goToHomeView()})),r.add(i,"views",i.views).name("Views").onChange((i=>{var r;let n=new A,s=new A,a=Tn.getVisibleObjectBoundingBox(t),o=xs.getCameraDirectionByView(i);xs.getCameraPositionByBboxAndDirection(a,n,s,null==(r=e.camera)?void 0:r.projectionMatrix,o),e.flyTo(n,s)})),r.add(i,"OrthographicCamera").name("Orth Camera").onChange((t=>{e.setToOrthographicCamera(t)})),r.add(i,"takeSnapshot").name("Take snapshot").onChange((()=>{})),r.add(i,"fullScreen").name("Full screen").onChange((()=>{F3&&F3.isEnabled&&F3.request(),e.enableRender()})),r.add(i,"uploadFile").name("Upload file").onChange((()=>{new $O(e).openFileBrowserToUpload()}));let s=this.gui.addFolder("Model operations");s.add(i,"transparentMode",i.transparentMode).name("Transparent mode").onChange((t=>{e.addOrRemoveObjectOpacity(t),e.enableRender()})),s.add(i,"showVertexNormals",i.showVertexNormals).name("Show Vertex Normals").onChange((t=>{e.showVertexNormals(t),e.enableRender()})),s.add(i,"sectionMode",i.sectionMode).name("Section mode").onChange((t=>{"No section"===t?e.deactivateSection():"Box section"===t?e.activateSection("ObjectsBoxSection"):"Plane section"===t&&e.activateSection("PickPlaneSection"),e.enableRender()}));let a=this.viewer.ambientLight,o=this.gui.addFolder("Ambient light");o.add(i,"alVisible",i.alVisible).name("visible").onChange((t=>{a&&(a.visible=t),e.enableRender()})),o.addColor(i,"alColor").name("color").onChange((t=>{a&&(a.color=new je(t)),e.enableRender()})),o.add(i,"alIntensity",0,5).name("intensity").onChange((t=>{a&&(a.intensity=t),e.enableRender()}));let l=this.viewer.directionalLight;if(l){let t=this.gui.addFolder("Directional light");t.add(l,"visible").name("visible").onChange((t=>{l&&(l.visible=t),e.enableRender()})),t.addColor(i,"dlColor").name("color").onChange((t=>{l&&(l.color=new je(t)),e.enableRender()})),t.add(l,"intensity",0,5).name("intensity").onChange((t=>{l&&(l.intensity=t),e.enableRender()})),t.add(l,"castShadow").name("castShadow").onChange((t=>{l&&(l.castShadow=t),e.enableRender()})),t.add(i,"showDlHelper").name("showDlHelper").onChange((t=>{e.showDirectionalLightHelper(t),e.enableRender()}));let r=()=>{e.updateDirectionalLight(),e.enableRender()};_Ce(t,"position",l.position,r),_Ce(t,"target",l.target.position,r);let n=t.addFolder("shadow");n.add(l.shadow.camera,"near").name("near").onChange(r),n.add(l.shadow.camera,"far").name("far").onChange(r),n.add(l.shadow.camera,"zoom").name("zoom").onChange(r)}let h=this.viewer.hemisphereLight,u=this.gui.addFolder("Hemisphere Light");u.add(i,"hlVisible",i.hlVisible).name("visible").onChange((t=>{h&&(h.visible=t),e.enableRender()})),u.add(i,"hlIntensity",0,5).name("intensity").onChange((t=>{h&&(h.intensity=t),e.enableRender()})),u.addColor(i,"hlColor").name("color").onChange((t=>{h&&(h.color=new je(t)),e.enableRender()})),u.addColor(i,"hlGroundColor").name("groundColor").onChange((t=>{h&&(h.groundColor=new je(t)),e.enableRender()}));let c=this.gui.addFolder("Fog");c.add(i,"fogEnabled",i.fogEnabled).name("Enabled").onChange((r=>{t.fog=r?new Uu(i.fogColor,i.fogNearDistance,i.fogFarDistance):null,e.enableRender()})),c.add(i,"fogNearDistance",0,100).name("Near").onChange((r=>{i.fogEnabled&&t&&(t.fog=new Uu(i.fogColor,r,i.fogFarDistance)),e.enableRender()})),c.add(i,"fogFarDistance",100,2e3).name("Far").onChange((r=>{i.fogEnabled&&t&&(t.fog=new Uu(i.fogColor,i.fogNearDistance,r)),e.enableRender()}));let p=this.gui.addFolder("Composer");p.add(i,"composerEnabled",i.composerEnabled).name("Composer Enabled").onChange((t=>{e.enableComposer(t)})),p.add(i,"renderPassEnabled",i.renderPassEnabled).name("RenderPass Enabled").onChange((t=>{e.enableRenderPass(t)})),p.add(i,"fxaaEnabled",i.fxaaEnabled).name("Effect FXAA Enabled").onChange((t=>{e.enableFxaaPass(t)})),p.add(i,"saoEnabled",i.saoEnabled).name("SAO Enabled").onChange((t=>{e.enableSaoPass(t)})),p.add(i,"ssaoEnabled",i.ssaoEnabled).name("SSAO Enabled").onChange((t=>{e.enableSsaoPass(t)})),p.add(i,"outlineEnabled",i.outlineEnabled).name("OutlinePass Enabled").onChange((t=>{e.enableOutlinePass(t)})),p.add(i,"ssaaEnabled",i.ssaaEnabled).name("SSAA Enabled").onChange((t=>{e.enableSsaaPass(t)})),p.add(i,"bloomEnabled",i.bloomEnabled).name("Bloom Enabled").onChange((t=>{e.enableBloomPass(t)})),p.add(i,"unrealBloomEnabled",i.unrealBloomEnabled).name("Unreal Bloom Enabled").onChange((t=>{e.enableUnrealBloomPass(t)}))}setExplodeMode(e,t=!1){!this.viewer||!this.viewer.scene||!this.viewer.loadedModels||!this.exploderDict||(e?Tn.explodeObjects(this.viewer.scene,this.exploderDict,Object.values(this.viewer.loadedModels).map((e=>e.id)),t):Tn.unexplodeObjects(this.viewer.scene,this.exploderDict||{}))}open(){this.gui&&this.gui.open()}close(){this.gui&&this.gui.close()}beforeDestroy(){this.viewer=void 0,this.gui&&this.gui.destroy(),this.gui=void 0,this.exploderDict=[]}},U3=class{constructor(){this.vertexShader="\n varying vec2 vUv;\n void main( void ) {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n }",this.fragmentShader="\n uniform vec3 keyColor;\n uniform float similarity;\n uniform float smoothness;\n varying vec2 vUv;\n uniform sampler2D map;\n void main() {\n vec4 videoColor = texture2D(map, vUv);\n\n float Y1 = 0.299 * keyColor.r + 0.587 * keyColor.g + 0.114 * keyColor.b;\n float Cr1 = keyColor.r - Y1;\n float Cb1 = keyColor.b - Y1;\n \n float Y2 = 0.299 * videoColor.r + 0.587 * videoColor.g + 0.114 * videoColor.b;\n float Cr2 = videoColor.r - Y2; \n float Cb2 = videoColor.b - Y2; \n \n float blend = smoothstep(similarity, similarity + smoothness, distance(vec2(Cr2, Cb2), vec2(Cr1, Cb1)));\n gl_FragColor = vec4(videoColor.rgb, videoColor.a * blend); \n }";let e=document.createElement("video");this.webcam=e;navigator.mediaDevices.getUserMedia({video:{width:600,height:400}}).then((t=>{e.srcObject=t,e.onloadedmetadata=()=>{e.setAttribute("autoplay","true"),e.setAttribute("playsinline","true"),e.play()}})).catch((function(e){alert(e.name+": "+e.message)})),this.webcamCanvas=document.createElement("canvas");let t=this.webcamCanvas.getContext("2d");this.canvasCtx=t,t.fillStyle="#000000",t.fillRect(0,0,this.webcamCanvas.width,this.webcamCanvas.height);let i=new Bi(this.webcamCanvas);this.webcamTexture=i,i.minFilter=oi,i.magFilter=oi,this.shaderMaterial=new Yt({transparent:!0,uniforms:{map:{value:i},keyColor:{value:[0,1,0]},similarity:{value:.3},smoothness:{value:0}},vertexShader:this.vertexShader,fragmentShader:this.fragmentShader})}getShaderMaterial(){return this.shaderMaterial}createWebCamPlane(e=5,t=4){let i=new ts(e,t);return new rt(i,this.shaderMaterial)}animate(){this.webcam.readyState===this.webcam.HAVE_ENOUGH_DATA&&(this.canvasCtx.drawImage(this.webcam,0,0,this.webcamCanvas.width,this.webcamCanvas.height),this.webcamTexture.needsUpdate=!0)}},SCe=new A,wCe=new Wi,RCe=class extends tm{constructor(e,t){var i;super(e),this.name="BimViewer",this.timer=Date.now(),this.selectedObject=void 0,this.sceneBackgroundColor=new je(15463159),this.loadedModels={},this.loaded3dTiles={},this.composerRenderEnabled=!0,this.composerEnabled=!1,this.savedMaterialsForOpacity=[],this.raf=new dT,this.clock=new Al,this.renderEnabled=!0,this.isFrustumInsectChecking=!1,this.lastFrameExecuteTime=Date.now(),this.maxFps=60,this.settings=cT,this.jobCount=0,this.twoDModelCount=0,this.bbox=new Dt,this.onResize=()=>{var e;let t=null==(e=this.renderer)?void 0:e.domElement;t&&t.parentElement&&this.resize(t.parentElement.clientWidth,t.parentElement.clientHeight)},this.onControlsChange=()=>{this.enableRender()},this.onKeyDown=e=>{let t=this.camera,i=this.controls;if(!t||!i)return;let r=this.settings.keyboard.sensitivity||3,n=i.getPosition(new A),s=i.getTarget(new A),a=s.clone();if("ArrowLeft"===e.code||"ArrowRight"===e.code){let t=Math.PI*r/180;"ArrowLeft"===e.code&&(t=-t),a.x=(s.x-n.x)*Math.cos(t)-(s.z-n.z)*Math.sin(t)+n.x,a.z=(s.z-n.z)*Math.cos(t)+(s.x-n.x)*Math.sin(t)+n.z,i.setTarget(a.x,a.y,a.z)}else if("ArrowUp"===e.code||"ArrowDown"===e.code){let t=Math.PI*r/180,o=new A(s.x-n.x,s.y-n.y,s.z-n.z).length(),l=s.y-n.y;"ArrowDown"===e.code&&(t=-t);let h=Math.asin(l/o)+t;if(h<-Math.PI/2||h>Math.PI/2)return;let u=Math.sin(h)*o;a.y=s.y+(u-l),i.setTarget(a.x,a.y,a.z)}else if("KeyW"===e.code){let e=.01*r,a=n.distanceTo(s);if(a<10*t.near){let e=i.getTarget(new A).lerp(n,-t.near/a);i.setTarget(e.x,e.y,e.z)}n.lerp(s,e),i.setLookAt(n.x,n.y,n.z,s.x,s.y,s.z)}else if("KeyS"===e.code){let e=.01*r;n.lerp(s,-e),i.setLookAt(n.x,n.y,n.z,s.x,s.y,s.z,!1)}else if("KeyF"===e.code)this.flyToSelectedObject();else if("KeyT"===e.code){let e=this.getIntersections();if(e.length>0){let r=e.find((e=>{let t=e.object;return t.visible&&t instanceof rt}));if(r&&r.point&&this.camera&&this.controls){let e=this.camera.position,n=r.point,s=i.getTarget(new A),a=e.distanceTo(n);if(a>t.near&&a{this.renderEnabled=!0,this.raf&&(this.timeoutSymbol&&this.raf.clearTimeout(this.timeoutSymbol),this.timeoutSymbol=this.raf.setTimeout((()=>{this.renderEnabled=!1,this.composerRenderEnabled=!0}),e))},this.applyOptionsAndAddToScene=(e,t,i)=>{ne.info(`[BimViewer] '${e}' is loaded in ${(Date.now()-this.timer)/1e3}s, adding to scene...`),this.timer=Date.now();let r=i.src&&i.src.toLowerCase();if(r&&r.endsWith("dxf")&&this.twoDModelCount++,i.matrix&&16===i.matrix.length){let e=new Be;e.elements=i.matrix,t.applyMatrix4(e)}else{let e=i.position||[0,0,0],r=i.rotation||[0,0,0],n=i.scale||[1,1,1];t.position.set(e[0],e[1],e[2]),t.rotation.set(r[0]*Math.PI/180,r[1]*Math.PI/180,r[2]*Math.PI/180),t.scale.set(n[0],n[1],n[2])}t.matrixAutoUpdate=!1,t.updateMatrix(),t.traverse((e=>{e.matrixAutoUpdate&&(e.matrixAutoUpdate=!1,e.updateMatrix())}));let n=i.instantiate,s=i.merge;n?setTimeout((()=>{this.instantiate(t),setTimeout((()=>{s&&this.merge(t),this.addLoadedModelToScene(t,i)}),0)}),0):s?setTimeout((()=>{this.merge(t),setTimeout((()=>this.addLoadedModelToScene(t,i)),0)}),0):this.addLoadedModelToScene(t,i)},this.onAnchorPointerDown=e=>{var t,i;null==(t=this.controls)||!t.enableRotate||!this.renderer||null!=(i=this.sectionManager)&&i.isSectionActive()||this.setOrbitPoint(e)},this.onAnchorPointerUp=()=>{this.anchor&&(this.anchor.className="anchor")},this.viewerCfg=Br(Br({},DDe),e),ne.info("[BimViewer]","viewerCfg:",this.viewerCfg),this.settings=cT,this.cameraCfg=t,this.cameraCfg&&this.cameraCfg.near&&(this.settings.camera.near=this.cameraCfg.near),this.cameraCfg&&this.cameraCfg.far&&(this.settings.camera.far=this.cameraCfg.far),this.increaseJobCount(),this.init(),this.animate(),this.renderer&&(null==(i=this.viewerContainer)||i.append(this.renderer.domElement)),this.decreaseJobCount(),ne.info(`[BimViewer] Initialized in ${(Date.now()-this.timer)/1e3}s`)}init(){let e=this.viewerCfg;this.initSpinner(),this.initScene(),this.initRenderer(),this.initCamera(),this.initLights(),this.initEvents(),this.initControls(),!0===e.enableDatGui&&this.initDatGui(),this.initOthers(),!0===e.enableAxisGizmo&&(this.axes=this.initAxes()),!0===e.enableStats&&(this.stats=this.initStats()),e.enableToolbar&&(this.toolbar=this.initToolbar()),e.enableBottomBar&&(this.bottomBar=this.initBottomBar()),e.enableNavCube&&(this.navCube=this.initNavCube()),e.enableContextMenu&&(this.contextMenu=this.initContextMenu())}initScene(){this.scene=new Pn,this.scene.matrixAutoUpdate=!1}initRenderer(){this.renderer=new Ol({antialias:!0,preserveDrawingBuffer:!0}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),this.renderer.outputEncoding=gr,this.renderer.toneMappingExposure=1,this.renderer.physicallyCorrectLights=!0,this.renderer.setClearColor(11119017,1),this.renderer.shadowMap.enabled=!0,this.renderer.shadowMap.type=By,_t.printGpuInfo(this.renderer.getContext()),this.pmremGenerator=new xp(this.renderer),this.pmremGenerator.compileEquirectangularShader(),this.enableOverlayRenderer&&(this.overlayRender=new wr(this)),this.setEnvironmentFromDataArray()}initCamera(){this.scene&&(this.perspectiveCamera=new Xr(45,this.width/this.height,this.settings.camera.near,this.settings.camera.far),this.perspectiveCamera.layers.enable(11),this.perspectiveCamera.position.set(0,100,0),this.scene.add(this.perspectiveCamera),this.camera=this.perspectiveCamera)}initControls(e=!1){if(!this.renderer)return;wi.printDeviceInfo();let t,i=e?this.orthoCamera:this.perspectiveCamera;i&&this.inputManager&&((!this.perspectiveCameraControls||!this.orthoCameraConrols)&&(t=new $l(i,this.inputManager),t.dollySpeed=.1,t.dollyToCursor=!0,t.enabled=!0,t.keyTruckSpeed=10,t.keys={left:"KeyD",up:"KeyE",right:"KeyA",bottom:"KeyQ"},t.listenToKeyEvents(),t.update(0)),t&&(e?(this.orthoCameraConrols=t,t.minZoom=3):(this.perspectiveCameraControls=t,this.bbox&&(t.minDistance=.1,t.maxDistance=3*this.bbox.getSize(new A).length())),this.controls=t,this.controls.addEventListener("update",this.onControlsChange)))}initRotateToCursor(){this.anchor=this.createAnchor()}initLights(){if(!this.scene)return;let e=16777215,t=new $s(e,1.5);t.name="sun",t.castShadow=!0,t.position.set(-2,2,4),t.shadow.autoUpdate=!1,t.shadow.mapSize.width=1024,t.shadow.mapSize.height=1024,this.directionalLight=t,this.scene.add(t),this.scene.add(t.target),this.directionalLightHelper=new Sx(this.directionalLight),this.directionalLightHelper.traverse((e=>{e.layers.set(11)})),this.directionalLightHelper.visible=!1,this.scene.add(this.directionalLightHelper),this.shadowCameraHelper=new wx(this.directionalLight.shadow.camera),this.shadowCameraHelper.layers.set(11),this.shadowCameraHelper.visible=!1,this.scene.add(this.shadowCameraHelper),this.ambientLight=new Cl(3158064),this.hemisphereLight=new df(e,14540253,2),this.hemisphereLight.position.set(0,300,0),this.scene.add(this.ambientLight),this.scene.add(this.hemisphereLight)}initEvents(){if(!this.renderer)return;let e=new M0(this.renderer.domElement);this.inputManager=e;let t,i=!1,r=!1;e.addEventListener("pointerdown",(e=>{r=!1,i=!0,this.setOrbitPoint(e)})),e.addEventListener("pointermove",(()=>{i&&(r=!0)})),e.addEventListener("pointerup",(()=>{i=!1,this.onAnchorPointerUp()})),e.addEventListener("click",(e=>{r?r=!1:(t&&clearTimeout(t),t=setTimeout((()=>{switch(this.onAnchorPointerDown(e),e.button){case 0:this.handleMouseClick(e);break;case 2:this.handleRightClick(e)}}),300))})),e.addEventListener("dblclick",(e=>{var i,n;!r&&null!=(i=this.sectionManager)&&i.isSectionActive()&&null!=(n=this.measurementManager)&&n.isMeasurementActive()||(t&&clearTimeout(t),this.handleMouseClick(e),this.flyToSelectedObject(),this.enableRender())})),e.addEventListener("keydown",(e=>{this.onKeyDown(e)})),e.addEventListener("resize",this.onResize),this.initRotateToCursor(),this.raycaster=new Oc}initDatGui(){this.datGui=new H3(this),this.datGui.close()}initSpinner(){var e;if(!this.viewerCfg.enableSpinner)return;let t=document.createElement("div");t.classList.add("bim-viewer-spinner");let i=document.createElement("div");i.classList.add(uo,"icon-loading"),t.append(i),null==(e=this.widgetContainer)||e.appendChild(t),this.spinner=t,this.setSpinnerVisibility(this.jobCount>0)}initOthers(){if(!this.scene||!this.renderer||!this.camera)return;let e=this.datGui&&this.datGui.controls;e&&(e.showGroundGrid&&(this.groundGrid=Js.createGroundGrid(),this.scene.add(this.groundGrid)),e.showGrassGround&&ht(this,null,(function*(){this.grassGround=yield Js.createGrassGround(),this.scene&&this.scene.add(this.grassGround),this.enableRender()})),e.webcam&&this.enableWebCam(),this.composerEnabled=e.composerEnabled,this.composerEnabled&&(this.enableComposer(!0),this.enableRenderPass(e.renderPassEnabled),this.enableFxaaPass(e.fxaaEnabled),this.enableSaoPass(e.saoEnabled),this.enableSsaoPass(e.ssaoEnabled),this.enableOutlinePass(e.outlineEnabled),this.enableSsaaPass(e.ssaaEnabled),this.enableBloomPass(e.bloomEnabled),this.enableUnrealBloomPass(e.unrealBloomEnabled))),this.renderer.domElement.style.outlineWidth="0"}initNavCube(){var e;let t=document.createElement("div");t.id="navCube";let i=new JO;return i.renderer&&(t.appendChild(i.renderer.domElement),i.setHostViewer(this)),null==(e=this.widgetContainer)||e.appendChild(t),i}initAxes(){var e,t;let i=document.createElement("div");i.classList.add("axesRenderer");let r=new Sf(i,this.camera);return null==(e=this.widgetContainer)||e.append(i),this.axesInScene=new oT(!1),null==(t=this.scene)||t.add(this.axesInScene),r}initStats(){var e;let t=I3();t.setMode(0);let i=document.createElement("div");return i.classList.add("statsOutput"),i.appendChild(t.domElement),null==(e=this.widgetContainer)||e.append(i),t}initContextMenu(){let e=new C3({items:rCe,context:{bimViewer:this,toolbar:this.toolbar,section:this.section},container:this.widgetContainer});return window.oncontextmenu=e=>e.preventDefault(),e}initToolbar(){let e=this.viewerCfg;return new Eh(this,(0,hm.merge)({},wDe,e.toolbarMenuConfig))}initBottomBar(){return new om(this)}get has2dModel(){return this.twoDModelCount>0}showContextMenu(e){if(!this.contextMenu||!this.widgetContainer)return;let t=this.getAllIntersections(e);ne.debug("[BimViewer] showContextMenu intersections = ",t);let i,r=(0,hm.find)(t,(e=>{let t=e.object;return t instanceof rt&&t.visible})),n=this.contextMenu.context,s=null==r?void 0:r.instanceId,a=null==r?void 0:r.faceIndex;a&&(i=qi.getBatchIdByFaceIndex(null==r?void 0:r.object,a)),this.contextMenu.context=Dn(Br({},n),{hit:null==r?void 0:r.object,instanceId:s,batchId:i});let{x:o,y:l}=e;this.contextMenu.show(o,l)}handleRightClick(e){this.showContextMenu(e)}sycnCameraPosition(e,t){let i=e.position;if(t.position.set(i.x,i.y,i.z),this.scene){let e=this.scene.position;t.lookAt(e)}}sycnControls(e,t){let i=e.getTarget(new A),r=e.getPosition(new A);t.setPosition(r.x,r.y,r.z),t.setTarget(i.x,i.y,i.z)}setToOrthographicCamera(e=!1){var t;if(!this.scene||!this.controls)return;let i=this.perspectiveCamera,r=this.perspectiveCameraControls,n=this.orthoCamera,s=this.orthoCameraConrols;e?(n||(n=new Ji(-this.width/2,this.width/2,this.height/2,-this.height/2,this.settings.camera.near,this.settings.camera.far),n.layers.enable(11),n.position.set(0,100,0),n.zoom=10,n.updateProjectionMatrix(),this.scene&&this.scene.add(n),this.orthoCamera=n),s||(this.initControls(!0),s=this.orthoCameraConrols),i&&(this.sycnCameraPosition(i,n),n.zoom=10,n.updateProjectionMatrix()),r&&s&&i&&this.sycnControls(r,s),this.camera=n,this.controls=s):(i&&n&&this.sycnCameraPosition(n,i),r&&s&&n&&this.sycnControls(s,r),this.camera=i,this.controls=r),null==(t=this.axes)||t.setHostCamera(this.camera),this.resize(this.width,this.height),this.dispatchEvent("CameraChanged")}animate(){var e,t;if(requestAnimationFrame(this.animate.bind(this)),this.maxFps>0){if(Date.now()-this.lastFrameExecuteTime<1e3/this.maxFps)return;this.lastFrameExecuteTime=Date.now()}this.webcam&&this.webcam.animate();let i=this.clock.getDelta(),r=this.controls&&this.controls.update(i);this.scene&&this.camera&&(this.renderEnabled||r)&&(this.update3dTiles(),this.renderer&&this.renderer.render(this.scene,this.camera),this.dispatchEvent("RenderAfter")),this.composerRenderEnabled&&this.composer&&this.composerEnabled&&(this.composer.render(),this.composerRenderEnabled=!1),this.frustrumCullingByModelBBox(),null==(e=this.stats)||e.update(),null==(t=this.bottomBar)||t.update()}update3dTiles(){if(!this.camera)return;let e=Object.values(this.loaded3dTiles);0!==e.length&&(this.camera.updateMatrixWorld(),e.forEach((e=>{e.renderer.update()})))}frustrumCullingByModelBBox(){let e=new Xs,t=new Be;this.isFrustumInsectChecking=!0,this.camera&&(t.multiplyMatrices(this.camera.projectionMatrix,this.camera.matrixWorldInverse),e.setFromProjectionMatrix(t),Object.values(this.loadedModels).forEach((t=>{let i=this.scene&&this.scene.getObjectById(t.id),r=t.bbox;i&&r&&this.scene&&(void 0===i.userData._visible&&(i.userData._visible=!0,Object.defineProperties(i,{visible:{set:e=>{i.userData._visible=e,this.isFrustumInsectChecking||(i.userData.userConfigVisibility=!0)},get:()=>i.userData._visible}})),void 0===i.userData.userConfigVisibility&&(r.geometry.computeBoundingBox(),r.geometry.boundingBox&&(i.visible=e.intersectsBox(r.geometry.boundingBox))))})),Object.values(this.loaded3dTiles).forEach((t=>{let i=t.renderer.group;i&&!t.bbox.isEmpty()&&this.scene&&(void 0===i.userData._visible&&(i.userData._visible=!0,Object.defineProperties(i,{visible:{set:e=>{i.userData._visible=e,this.isFrustumInsectChecking||(i.userData.userConfigVisibility=!0)},get:()=>i.userData._visible}})),void 0===i.userData.userConfigVisibility&&(i.visible=e.intersectsBox(t.bbox)))}))),this.isFrustumInsectChecking=!1}destroy(){var e,t,i,r;null==(e=this.inputManager)||e.removeEventListener(),this.datGui&&this.datGui.gui&&(this.datGui.beforeDestroy(),this.datGui=void 0);let n=this.webcamPlane;this.scene&&n&&(this.scene.remove(n),n.geometry.dispose(),n.material.dispose(),this.webcamPlane=void 0),this.webcam=void 0,this.composer=void 0,this.renderPass=void 0,this.effectFxaaPass=void 0,this.saoPass=void 0,this.ssaoPass=void 0,this.outlinePass=void 0,this.ambientLight=void 0,this.directionalLight=void 0,this.hemisphereLight=void 0,this.directionalLightHelper&&(this.directionalLightHelper.dispose(),this.directionalLightHelper=void 0),this.controls&&(this.disposeRotateToCursor(),this.controls.dispose(),this.controls=void 0),this.perspectiveCameraControls&&(this.perspectiveCameraControls.dispose(),this.perspectiveCameraControls=void 0),this.shadowCameraHelper&&(this.shadowCameraHelper.dispose(),this.shadowCameraHelper=void 0),this.stats=void 0,this.raycaster=void 0,this.selectedObject=void 0,this.groundGrid&&(this.groundGrid.geometry.dispose(),this.groundGrid.material.dispose(),this.groundGrid.clear(),this.groundGrid=void 0),this.grassGround&&(this.grassGround.geometry.dispose(),this.grassGround.material.dispose(),this.grassGround.clear(),this.grassGround=void 0),this.skyOfGradientRamp&&(this.skyOfGradientRamp.geometry.dispose(),this.skyOfGradientRamp.material.dispose(),this.skyOfGradientRamp.clear(),this.skyOfGradientRamp=void 0),this.savedMaterialsForOpacity=void 0,this.section=void 0,this.sectionType=void 0,Object.keys(this.loadedModels).forEach((e=>{delete this.loadedModels[e]})),Object.values(this.loaded3dTiles).forEach((e=>{e.renderer.dispose()})),this.loaded3dTiles={},this.perspectiveCamera=void 0,this.perspectiveCameraControls=void 0,this.raf&&(this.timeoutSymbol&&this.raf.clearTimeout(this.timeoutSymbol),this.raf=void 0),this.contextMenu&&(this.contextMenu.destroy(),this.contextMenu=void 0),this.navCube&&(this.navCube.dispose(),this.navCube=void 0),this.axes&&(this.axes.dispose(),this.axes=void 0),this.axesInScene&&(this.axesInScene.clear(),this.axesInScene=void 0),this.toolbar&&(this.toolbar.destroy(),this.toolbar=void 0),this.spinner&&(this.spinner.remove(),this.spinner=void 0),this.bottomBar=void 0,this.pmremGenerator&&(this.pmremGenerator.dispose(),this.pmremGenerator=void 0),null==(t=this.measurementManager)||t.destroy(),this.measurementManager=void 0,null==(i=this.zoomToRectHelper)||i.destroy(),this.zoomToRectHelper=void 0,null==(r=this.sectionManager)||r.destroy(),this.sectionManager=void 0,super.destroy()}loadLocalModel(e,t,i,r){return ht(this,null,(function*(){let n;this.timer=Date.now(),this.increaseJobCount();try{n=yield new $c(i).loadLocalModel(e,t.src,r)}catch(e){let i=`Error loading ${t.src}`;return ne.error(i,e),Promise.reject(i)}finally{this.decreaseJobCount()}return n?(this.applyOptionsAndAddToScene(e,n,t),Promise.resolve()):Promise.reject()}))}loadModel(e,t){return ht(this,null,(function*(){let i;this.timer=Date.now(),this.increaseJobCount();try{i=yield(new $c).loadModel(e.src,e.fileFormat,t)}catch(t){let i=`Error loading ${e.src}`;return ne.error(i,t),Promise.reject(i)}finally{this.decreaseJobCount()}return i?(this.applyOptionsAndAddToScene(e.src,i,e),Promise.resolve()):Promise.reject()}))}load3dTiles(e){return ht(this,null,(function*(){var t;this.timer=Date.now(),this.increaseJobCount();let i=new W_(e.src),r=new Dt,n=yield new Promise(((t,n)=>{i.onLoadTileSet=()=>{i.getBounds(r)||(i.getBoundingSphere(wCe)?wCe.getBoundingBox(r):(ne.warn(`[BimViewer] Can't get the correct bounding box of 3dTiles '${e.src}'!`),n())),ne.debug(r),i.onLoadTileSet=null;let s=i.group;ne.debug(s),t(s)},i.onLoadModel=e=>{e.traverse((e=>{e.matrixAutoUpdate&&(e.matrixAutoUpdate=!1,e.updateMatrix()),e.isMesh&&(e.castShadow=!0,e.receiveShadow=!0)})),e.updateWorldMatrix(!1,!0),this.updateDirectionalLightShadow(),this.enableRender()},i.setCamera(this.camera),i.setResolutionFromRenderer(this.camera,this.renderer),i.update()}));if(n){let s=Date.now(),a=e.modelId||e.src;if(this.loaded3dTiles[a]){let e=1;for(;this.loaded3dTiles[`${a}_${e}`];)e++;a=`${a}_${e}`,ne.warn(`[BimViewer] 3dTiles '${a}' is loaded more than once!`)}if(this.loaded3dTiles[a]={id:n.id,bbox:r,renderer:i},e.matrix&&16===e.matrix.length){let t=new Be;t.elements=e.matrix,n.applyMatrix4(t)}else{let t=e.position||[0,0,0],i=e.rotation||[0,0,0],r=e.scale||[1,1,1];n.position.set(t[0],t[1],t[2]),n.rotation.set(i[0]*Math.PI/180,i[1]*Math.PI/180,i[2]*Math.PI/180),n.scale.set(r[0],r[1],r[2])}if(n.matrixAutoUpdate=!1,n.updateMatrix(),n.updateMatrixWorld(!0),null==(t=this.scene)||t.add(n),r.applyMatrix4(n.matrix),this.computeBoundingBox(),this.tryAdjustDirectionalLight(),0===Object.keys(this.loadedModels).length&&1===Object.keys(this.loaded3dTiles).length){let e=this.datGui&&this.datGui.controls;this.regenSkyOfGradientRamp(),e&&e.showGroundGrid&&this.regenGroundGrid(),this.tryAdjustCameraNearAndFar(),this.goToHomeView()}return ne.info(`[BimViewer] Added 3dTiles '${e.src}' to scene in ${(Date.now()-s)/1e3}s`),this.enableRender(),this.decreaseJobCount(),Promise.resolve()}return this.decreaseJobCount(),Promise.reject()}))}addLoadedModelToScene(e,t){if(!this.scene)return;if(t.merge){let t=Date.now();tE.createMeshBvhAsync([e],{saveOriginalIndex:!0}),ne.info(`[BimViewer] Creates mesh bvh cost ${(Date.now()-t)/1e3}s`)}e.traverse((e=>{e.isMesh&&(e.castShadow=!0,e.receiveShadow=!0)})),this.scene.add(e);let i=new Hg(e);i.name="BIM_VIEWER_BOX_HELPER",i.visible=!1,i.matrixAutoUpdate=!1,i.material&&(i.material=void 0,i.layers.set(11));let r=t.modelId||t.src;if(this.loadedModels[r]){let e=1;for(;this.loadedModels[`${r}_${e}`];)e++;r=`${r}_${e}`,ne.warn(`[BimViewer] Model '${r}' is loaded more than once!`)}this.loadedModels[r]={id:e.id,bbox:i},this.computeBoundingBox(),this.tryAdjustDirectionalLight();let n=Object.values(this.loadedModels).map((e=>e.id));if(Object.values(this.loaded3dTiles).forEach((e=>n.push(e.id))),!n||n.length<=1){if(this.has2dModel)this.setToOrthographicCamera(!0),this.skyOfGradientRamp&&this.scene.remove(this.skyOfGradientRamp);else{let e=this.datGui&&this.datGui.controls;this.regenSkyOfGradientRamp(),e&&e.showGroundGrid&&this.regenGroundGrid()}this.tryAdjustCameraNearAndFar(),this.goToHomeView()}this.scene.add(i),t.edges&&ei.addOutlines(e),ne.info(`[BimViewer] Added '${t.src}' to scene in ${(Date.now()-this.timer)/1e3}s`),this.enableRender(),this.decreaseJobCount()}addOrRemoveObjectOpacity(e=!0,t=.3,i,r){if(this.savedMaterialsForOpacity||(this.savedMaterialsForOpacity=[]),!this.scene)return;let n=this.scene,s=[],a=Object.values(this.loadedModels).map((e=>e.id));Object.values(this.loaded3dTiles).forEach((e=>a.push(e.id))),a.forEach((a=>{if(e){this.savedMaterialsForOpacity&&this.savedMaterialsForOpacity.length>0&&ei.revertObjectOpacityById(n,a,this.savedMaterialsForOpacity);let e=ei.setObjectOpacityById(n,a,t,i,r);s.push(...e)}else this.savedMaterialsForOpacity&&ei.revertObjectOpacityById(n,a,this.savedMaterialsForOpacity)})),this.savedMaterialsForOpacity=e?s:[],this.enableRender()}hasTransparentObject(){return!!(this.savedMaterialsForOpacity&&this.savedMaterialsForOpacity.length>0)}showVertexNormals(e,t=.1){var i,r,n;e?(this.vertexNormalsHelpers||(this.vertexNormalsHelpers=new ur),null==(i=this.scene)||i.traverseVisible((e=>{var i;if(e instanceof rt&&!["SKYBOX","GROUND_GRID","GRASS_GROUND","BIM_VIEWER_BOX_HELPER"].includes(e.name)){if(!e.geometry.attributes.normal)return;let r=new x3(e,t,16711680);null==(i=this.vertexNormalsHelpers)||i.add(r)}})),null==(r=this.scene)||r.add(this.vertexNormalsHelpers)):this.vertexNormalsHelpers&&(null==(n=this.scene)||n.remove(this.vertexNormalsHelpers),this.vertexNormalsHelpers=void 0)}resize(e,t){let i=this.camera;i&&(this.width=e||window.innerWidth,this.height=t||window.innerHeight,i instanceof Xr?i.aspect=this.width/this.height:i instanceof Ji&&(i.left=-this.width/2,i.right=this.width/2,i.top=this.height/2,i.bottom=-this.height/2),i.updateProjectionMatrix(),this.renderer&&this.renderer.setSize(this.width,this.height),this.composer&&this.composer.setSize(this.width,this.height),this.effectFxaaPass&&this.effectFxaaPass.uniforms.resolution.value.set(1/this.width,1/this.height),this.overlayRender&&this.overlayRender.setSize(this.width,this.height)),this.enableRender()}getRaycaster(){return this.raycaster}getRaycastableObjectsByMouse(e){let t=[];if(!(this.raycaster&&this.camera&&this.scene&&e&&this.viewerContainer))return t;let i=new le(e.x,e.y),r=Ci.screenPoint2NdcPoint(i,this.camera,this.viewerContainer);return this.raycaster.setFromCamera(r,this.camera),t=this.getRaycastableObjects(),t}getRaycastableObjects(){let e=[];return Object.values(this.loadedModels).forEach((t=>{let i=this.scene&&this.scene.getObjectById(t.id);i&&i.visible&&e.push(i)})),Object.values(this.loaded3dTiles).forEach((t=>{let i=this.scene&&this.scene.getObjectById(t.id);i&&i.visible&&e.push(i)})),e}getIntersections(e){let t=this.getRaycastableObjectsByMouse(e);return this.raycaster&&this.raycaster.intersectObjects(t,!0)||[]}getAllIntersections(e){if(!(this.raycaster&&this.camera&&this.scene&&this.viewerContainer))return[];let t=new le(null==e?void 0:e.x,null==e?void 0:e.y),i=Ci.screenPoint2NdcPoint(t,this.camera,this.viewerContainer);this.raycaster.setFromCamera(i,this.camera);let r=this.scene.children;return this.raycaster.intersectObjects(r,!0)||[]}handleMouseClick(e){var t,i,r;if(null!=(t=this.measurementManager)&&t.isMeasurementActive()||null!=(i=this.sectionManager)&&i.isSectionActive())return;let n=Date.now(),s=this.getIntersections(e);ne.debug(`[BimViewer] getIntersections costs ${(Date.now()-n)/1e3}s`);let a,o,l=s.find((e=>{let t=e.object;return t.visible&&(!1!==t.userData.selectable||t instanceof rt)})),h=l&&l.object||void 0;if(h)if(h instanceof rn)a=l.instanceId,this.selectedObject&&this.selectedObject.id===h.id&&this.selectedObject.userData.instanceId===a&&(h=void 0);else if(qi.isMergedMesh(h)){let e=l&&l.faceIndex||-1;e>=0?(o=qi.getBatchIdByFaceIndex(h,e),this.selectedObject&&this.selectedObject.id===h.id&&this.selectedObject.userData.batchId===o&&(h=void 0)):h=void 0}else this.selectedObject&&this.selectedObject.id===h.id&&(h=void 0);if(s.length>0&&s[0].point){let e=null==(r=this.overlayRender)?void 0:r.getDrawablesByPosition(s[0].point,this.raycaster);e&&e.length>0&&(h=e[0])}this.selectedObject&&this.clearSelection(),h?this.selectObject(h,a,o):this.clearSelection()}selectObject(e,t,i,r){if(e instanceof Aa)return this.selectedObject=e,void(this.selectedObject.selected=!0);if(this.selectedObject){let t=this.selectedObject.userData;if(null!=t.instanceId&&t.originalMatrix&&t.clonedMesh){this.scene&&this.scene.remove(t.clonedMesh);let i=this.selectedObject;if(i.setMatrixAt(t.instanceId,t.originalMatrix),i.instanceMatrix.needsUpdate=!0,i.updateMatrix(),delete t.instanceId,delete t.originalMatrix,e===t.clonedMesh)return t.clonedMesh.geometry.dispose(),delete t.clonedMesh,this.selectedObject=void 0,void(this.outlinePass&&(this.outlinePass.selectedObjects=[]));t.clonedMesh.geometry.dispose(),delete t.clonedMesh}else if(null!=t.batchId&&t.clonedMesh){if(this.scene&&this.scene.remove(t.clonedMesh),delete t.batchId,e===t.clonedMesh)return t.clonedMesh.geometry.dispose(),delete t.clonedMesh,this.selectedObject=void 0,void(this.outlinePass&&(this.outlinePass.selectedObjects=[]));t.clonedMesh.geometry.dispose(),delete t.clonedMesh}else if(t.originalMaterial){if(this.selectedObject.material){let e=this.selectedObject.material;Array.isArray(e)?e.forEach((e=>e.dispose())):e instanceof zr&&e.dispose()}this.selectedObject.material=t.originalMaterial,delete t.originalMaterial}this.selectedObject=void 0,this.outlinePass&&(this.outlinePass.selectedObjects=[])}if(this.scene&&e){if(e instanceof rn&&null!=t){let i=e,n=new Be,s=new Be;s.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),i.getMatrixAt(t,n),this.selectedObject=e,this.outlinePass&&(this.outlinePass.selectedObjects=[e]);let a=Cs.clonedHighlightMaterials(e,{depthTest:r});if(a){let r=new rt(i.geometry.clone(),a);r.applyMatrix4(e.matrixWorld.multiply(n)),r.matrixWorldNeedsUpdate=!0,r.name="Cloned mesh for highlighting";let o=n.clone();o.multiplyMatrices(n,s),i.setMatrixAt(t,o),i.instanceMatrix.needsUpdate=!0,i.updateMatrix(),this.selectedObject.userData.instanceId=t,this.selectedObject.userData.originalMatrix=n,this.selectedObject.userData.clonedMesh=r,this.scene.add(r)}}else if(qi.isMergedMesh(e)&&null!=i){let t=qi.getBatchByBatchId(e,i),n=`[BimViewer] Clicked on merged mesh(id: ${e.id}).`;n+=` Original mesh batchId: ${i}, name: ${null==t?void 0:t.name}`,ne.info(n);let s=Cs.clonedHighlightMaterials(e,{depthTest:r}),a=qi.cloneGeometryForBatch(e,t);if(s&&a){let t=new rt(a,s);t.applyMatrix4(e.matrixWorld),t.matrixWorldNeedsUpdate=!0,t.name="Cloned mesh for highlighting",this.selectedObject=e,this.selectedObject.userData.batchId=i,this.selectedObject.userData.clonedMesh=t,this.scene.add(t)}}else{let t=Cs.clonedHighlightMaterials(e,{depthTest:r});t&&(this.selectedObject=e,this.selectedObject.userData.originalMaterial=this.selectedObject.material,this.selectedObject.material=t,this.outlinePass&&(this.outlinePass.selectedObjects=[e]))}this.enableRender()}else this.enableRender()}clearSelection(){this.selectedObject&&this.selectedObject instanceof Aa?this.selectedObject.selected=!1:this.selectObject(),this.selectedObject=void 0}getBBox(){return this.bbox}flyToObjects(e){if(!e||0===e.length||!this.camera)return;let t=new A,i=new A,r=new Dt;e.forEach((e=>{let t=Tn.getBoundingBox(e);r.union(t)}));let n=new A;this.camera.getWorldDirection(n),xs.getCameraPositionByBboxAndDirection(r,t,i,this.camera.projectionMatrix,n),this.flyTo(t,i)}flyToObject(e){this.flyToObjects([e])}flyToSelectedObject(){if(!this.selectedObject)return;let e=this.selectedObject;(e instanceof rn&&e.userData.clonedMesh||qi.isMergedMesh(e)&&e.userData.clonedMesh)&&(e=e.userData.clonedMesh),this.flyToObject(e)}flyToRandomObject(){var e,t,i;let r=Object.values(this.loadedModels).map((e=>e.id));Object.values(this.loaded3dTiles).forEach((e=>r.push(e.id)));let n=r.length;if(n<=0)return;let s=Math.floor(Math.random()*n),a=r[s];if(!(null==(e=this.scene)?void 0:e.getObjectById(a)))return;let o=[];if(null==(t=this.scene)||t.traverseVisible((e=>{(e instanceof rt||e instanceof Ir)&&!["SKYBOX","GROUND_GRID","GRASS_GROUND","BIM_VIEWER_BOX_HELPER"].includes(e.name)&&o.push(e.id)})),o.length<1)return;let l=Math.floor(Math.random()*o.length),h=null==(i=this.scene)?void 0:i.getObjectById(o[l]);h&&(ne.info(`[BimViewer] Flying to random object: ${h.name}, type: ${h.type}`),this.selectObject(h,void 0,void 0,!0),this.flyToObject(h))}flyTo(e,t){let i=this.camera,r=this.controls;if(!i||!r)return;if(e.equals(t))return void ne.error("[BimViewer] camera position and lookAt cannot be the same!");if(!_t.isVectorValid(e)||!_t.isVectorValid(t))return void ne.error("[BimViewer] invalid position or lookAt!");let n=e.distanceTo(t);ni.far&&(e=e.clone().sub(t).normalize().multiplyScalar(.9*i.far),ne.warn("[BimViewer] camera could be too far to see the object!"));let s=i.position.clone(),a=new A;i.getWorldDirection(a);let o=r.getTarget(new A).distanceTo(s),l=s.clone().addScaledVector(a,o),h=500,u=Date.now();this.cameraUpdateInterval&&clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=setInterval((()=>{let i=Date.now()-u;i>h&&(i=h);let n=(e,t,i)=>{let r=e.x+(t.x-e.x)*i,n=e.y+(t.y-e.y)*i,s=e.z+(t.z-e.z)*i;return new A(r,n,s)};((e,t)=>{r.setLookAt(e.x,e.y,e.z,t.x,t.y,t.z)})(n(s,e,i/h),n(l,t,i/h)),i>=h&&(clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=void 0)}),10)}viewFitAll(){var e;if(!this.scene||!this.camera)return;let t=new A,i=new A,r=Tn.getVisibleObjectBoundingBox(this.scene),n=new A;null==(e=this.camera)||e.getWorldDirection(n),xs.getCameraPositionByBboxAndDirection(r,t,i,this.camera.projectionMatrix,n),this.flyTo(t,i)}goToHomeView(){let e=this.camera,t=this.cameraCfg,i=t&&_t.arrayToVector3(t.eye),r=t&&_t.arrayToVector3(t.look);if(i&&r)this.flyTo(i,r);else if(this.scene){let t=new A,i=new A,r=new A(-1,-.5,-1);if(this.has2dModel){let e=this.bbox.max.x-this.bbox.min.x,t=this.bbox.max.y-this.bbox.min.y,i=this.bbox.max.z-this.bbox.min.z,n=Math.min(e,t,i);e-n<=0?r.set(1,0,0):t-n<=0?r.set(0,-1,0):i-n<=0&&r.set(0,0,-1)}if(xs.getCameraPositionByBboxAndDirection(this.bbox,t,i,null==e?void 0:e.projectionMatrix,r),(!this.cameraCfg||this.cameraCfg&&(!this.cameraCfg.eye||!this.cameraCfg.look))&&(this.cameraCfg={eye:t.toArray(),look:i.toArray()}),e instanceof Ji){let t=this.bbox,i=t.max.x-t.min.x,r=t.max.z-t.min.z,n=e.right-e.left,s=e.top-e.bottom;e.zoom=Math.max(n,s)/Math.max(i,r),e.zoom/=2,e.updateProjectionMatrix()}t.equals(i)||this.flyTo(t,i)}}zoomToBBox(e){var t,i;let r=new A,n=new A,s=new A;null==(t=this.camera)||t.getWorldDirection(s),xs.getCameraPositionByBboxAndDirection(e,r,n,null==(i=this.camera)?void 0:i.projectionMatrix,s),r.equals(n)||this.flyTo(r,n)}tryAdjustCameraNearAndFar(){let e=this.camera;if(!this.scene||!e)return;let t=this.bbox,i=e.near,r=e.far,n=t.max.x-t.min.x,s=t.max.y-t.min.y,a=t.max.z-t.min.z,o=Math.max(n,s,a),l=o/5,h=5*o;if(i>l||r_t.numberToString(e);ne.info(`[BimViewer] BBox's longest side is: ${t(o)}`),i>l&&(ne.warn(`[BimViewer] camera.near(${t(i)}) shouldn't bigger than ${t(l)}, will change it!`),e.near=l),re.id));if(Object.values(this.loaded3dTiles).forEach((t=>e.push(t.id))),e){let t=this.cameraCfg,i=t&&_t.arrayToVector3(t.eye),r=t&&_t.arrayToVector3(t.look),n=new Dt;if(i&&r){let e=i,t=r;n.expandByPoint(new A(e.x,e.y,e.z)),n.expandByPoint(new A(t.x,t.y,t.z))}else n=Tn.getObjectsBoundingBox(this.scene,e);this.skyOfGradientRamp=qo.createSkyOfGradientRampByBoundingBox(n),this.scene.add(this.skyOfGradientRamp)}}regenGroundGrid(){if(!this.scene)return;this.groundGrid&&(this.groundGrid.geometry.dispose(),this.groundGrid.material.dispose(),this.scene.remove(this.groundGrid));let e=Object.values(this.loadedModels).map((e=>e.id));if(Object.values(this.loaded3dTiles).forEach((t=>e.push(t.id))),e){let e=this.cameraCfg,t=e&&_t.arrayToVector3(e.look);t&&(t.y=0),this.groundGrid=Js.createGroundGrid(void 0,void 0,t),this.scene.add(this.groundGrid)}}setOrbitPoint(e){let t=this.controls;if(this.camera&&this.renderer&&this.controls&&this.scene&&this.raycaster&&this.viewerContainer)if(this.selectedObject){let e=(new Dt).setFromObject(this.selectedObject),i=new A;e.getCenter(i),null==t||t.setOrbitPoint(i.x,i.y,i.z);let r=Ci.worldPosition2ScreenPoint(i,this.camera,this.viewerContainer);this.setAnchorPosition(r)}else{let i=this.getIntersections(e),r=new le(e.x,e.y);if(i&&0!==i.length){let e=i[0].point;null==t||t.setOrbitPoint(e.x,e.y,e.z),this.setAnchorPosition(r),this.lastOrbPoint=i[0].point}else{let e=this.bbox.getCenter(new A),i=Ci.worldPosition2ScreenPoint(e,this.camera,this.renderer.domElement);this.setAnchorPosition(i),t.setOrbitPoint(e.x,e.y,e.z),this.lastOrbPoint=e}}}setAnchorPosition(e){this.anchor&&(this.anchor.className="anchor active",this.anchor.style.left=`${e.x}px`,this.anchor.style.top=`${e.y}px`)}createAnchor(){var e;let t=document.createElement("div");return t.className="anchor",null==(e=this.viewerContainer)||e.appendChild(t),t}disposeAnchor(){var e;this.anchor&&(null==(e=this.viewerContainer)||e.removeChild(this.anchor),this.anchor=void 0)}disposeRotateToCursor(){this.disposeAnchor()}enableComposer(e){!this.scene||!this.camera||!this.renderer||(this.composerEnabled=e,e&&!this.composer&&(this.composer=new S3(this.renderer)),this.enableRender())}enableRenderPass(e){if(this.scene&&this.camera&&this.renderer&&this.composer){if(e&&!this.renderPass){let e=new w3(this.scene,this.camera);e.setSize(this.width,this.height),this.composer.addPass(e),this.renderPass=e}this.renderPass&&(this.renderPass.enabled=e),this.enableRender()}}enableFxaaPass(e){if(this.scene&&this.camera&&this.renderer&&this.composer){if(e&&!this.effectFxaaPass){let e=new SE(JDe);e.uniforms.resolution.value.set(1/this.width,1/this.height),e.setSize(this.width,this.height),e.renderToScreen=!0,this.composer.addPass(e),this.effectFxaaPass=e}this.effectFxaaPass&&(this.effectFxaaPass.enabled=e),this.enableRender()}}enableSaoPass(e){if(this.scene&&this.camera&&this.renderer&&this.composer){if(e&&!this.saoPass){let e=new J_(this.scene,this.camera,!1,!0,new le(1/this.width,1/this.height));e.setSize(this.width,this.height),e.params.output=0,e.params.saoBias=.5,e.params.saoIntensity=5e-5,e.params.saoScale=5,e.params.saoKernelRadius=40,e.params.saoMinResolution=0,this.composer.addPass(e),this.saoPass=e}this.saoPass&&(this.saoPass.enabled=e),this.enableRender()}}enableSsaoPass(e){if(this.scene&&this.camera&&this.renderer&&this.composer){if(e&&!this.ssaoPass){let e=new rc(this.scene,this.camera,this.width,this.height);e.kernelRadius=16,e.minDistance=.005,e.maxDistance=.1,this.composer.addPass(e),this.ssaoPass=e}this.ssaoPass&&(this.ssaoPass.enabled=e),this.enableRender()}}enableOutlinePass(e){if(this.scene&&this.camera&&this.renderer&&this.composer){if(e&&!this.outlinePass){let e=new au(new le(this.width,this.height),this.scene,this.camera);e.edgeStrength=3,e.edgeGlow=0,e.edgeThickness=2,e.pulsePeriod=0,e.visibleEdgeColor.set(16711680),e.hiddenEdgeColor.set(16752768),this.composer.addPass(e),this.outlinePass=e}this.outlinePass&&(this.outlinePass.enabled=e),this.enableRender()}}enableSsaaPass(e){if(this.scene&&this.camera&&this.renderer&&this.composer){if(e&&!this.ssaaRenderPass){let e=new M3(this.scene,this.camera,16777215,0);this.composer.addPass(e),this.ssaaRenderPass=e}this.ssaaRenderPass&&(this.ssaaRenderPass.enabled=e),this.enableRender()}}enableBloomPass(e){if(this.scene&&this.camera&&this.renderer&&this.composer){if(e&&!this.bloomPass){let e=new xh(1,25,4);e.renderToScreen=!0,this.composer.addPass(e),this.bloomPass=e}this.bloomPass&&(this.bloomPass.enabled=e),this.enableRender()}}enableUnrealBloomPass(e){if(this.scene&&this.camera&&this.renderer&&this.composer){if(e&&!this.unrealBloomPass){let e=new dd(new le(this.width,this.height),1,0,0);e.threshold=0,e.strength=.5,e.radius=0,this.composer.addPass(e),this.unrealBloomPass=e}this.unrealBloomPass&&(this.unrealBloomPass.enabled=e),this.enableRender()}}activateSection(e="ObjectsBoxSection"){this.inputManager&&(this.sectionType=e,this.clearSelection(),this.sectionManager||(this.sectionManager=new t3(this,this.inputManager)),this.sectionManager.activateSection(e),this.enableRender())}deactivateSection(){var e;null==(e=this.sectionManager)||e.deactivateSection(),this.enableRender()}getActiveSection(){var e;return null==(e=this.sectionManager)?void 0:e.getActiveSection()}getMeasurements(){return this.inputManager?(this.measurementManager||(this.measurementManager=new ru(this,this.inputManager)),this.measurementManager.getMeasurementsData()):[]}activateMeasurement(e){this.inputManager&&(this.measurementManager||(this.measurementManager=new ru(this,this.inputManager)),this.measurementManager.activateMeasurement(e),this.clearSelection())}deactivateMeasurement(){var e;null==(e=this.measurementManager)||e.deactivateMeasurement()}setMeasurementVisibility(e,t){return!!(this.inputManager&&this.measurementManager&&e)&&this.measurementManager.setMeasurementVisibility(e,t)}clearMeasurements(){var e;null==(e=this.measurementManager)||e.clearMeasurements()}zoomToRect(){this.zoomToRectHelper||(this.zoomToRectHelper=new dE(this)),this.zoomToRectHelper.activate()}enableWebCam(){this.scene&&(this.webcam||(this.webcam=new U3),this.webcamPlane||(this.webcamPlane=this.webcam.createWebCamPlane(),this.webcamPlane.position.set(10,2,0)),this.scene.add(this.webcamPlane))}disableWebCam(){this.scene&&this.webcamPlane&&(this.webcamPlane.geometry.dispose(),this.webcamPlane.material.dispose(),this.scene.remove(this.webcamPlane))}setEnvironment(e){Nc.createEnvTexture(this.pmremGenerator,e).then((e=>{this.scene&&(this.scene.environment=e)}))}setEnvironmentFromDataArray(e){Nc.createEnvTextureFromDataArray(this.pmremGenerator,e).then((e=>{this.scene&&(this.scene.environment=e)}))}takeObjectsScreenshot(e){return ht(this,null,(function*(){return new Promise(((t,i)=>{var r;this.renderer||i("renderer is undefined"),null==(r=this.scene)||r.traverse((t=>{t instanceof rt&&((0,hm.includes)(e,(0,hm.get)(t.userData,"UniqueId"))?t.visible=!0:t.visible=!1)})),this.enableRender(),setTimeout((()=>{var e;t(null==(e=this.renderer)?void 0:e.domElement.toDataURL("image/png"))}),1e3)}))}))}updateRaycasterThreshold(){let e=this.camera;if(!e||!this.raycaster)return;let t=12/e.zoom,i=this.raycaster.params;i.Line?i.Line.threshold=t:i.Line={threshold:t},i.Points?i.Points.threshold=t:i.Points={threshold:t}}instantiate(e){new iA(e).instantiate()}merge(e){this.increaseJobCount();try{let t=[];e.traverse((e=>{e.geometry&&e.material&&t.push(e)})),qi.deepMerge(t,e)}finally{this.decreaseJobCount()}}setSpinnerVisibility(e){this.spinner&&(e?this.spinner.classList.remove("hidden"):this.spinner.classList.add("hidden"))}increaseJobCount(){this.setSpinnerVisibility(++this.jobCount>0)}decreaseJobCount(){this.setSpinnerVisibility(--this.jobCount>0)}updateProjectSettings(e){this.settings=e;let t=(e,t)=>{e&&t&&(e.near=t.near,e.far=t.far,e.updateProjectionMatrix())};t(this.perspectiveCamera,this.settings.camera),t(this.orthoCamera,this.settings.camera),this.enableRender(10)}dynamicallyUpdateControllerTarget(e){let t=this.getIntersections(e);if(t.length<0)return;let i=this.camera,r=this.controls;if(!i||!r)return;let n=t.find((e=>{if(e.distancei.far)return!1;let t=e.object;return t.visible&&t instanceof rt}));if(null!=n&&n.point&&r){let e=i.position,t=r.getTarget(new A),s=n.distance,a=e.distanceTo(t),o=e.clone().lerp(t,s/a);r.setTarget(o.x,o.y,o.z)}}computeBoundingBox(){let e=new Dt;return Object.values(this.loadedModels).forEach((t=>{if(t.bbox){t.bbox.geometry.computeBoundingBox();let i=t.bbox.geometry.boundingBox;i&&!i.isEmpty()&&e.union(i)}})),Object.values(this.loaded3dTiles).forEach((t=>{t.bbox.isEmpty()||e.union(t.bbox)})),this.bbox=e,this.controls&&(this.controls.minDistance=.1,this.controls.maxDistance=3*this.bbox.getSize(new A).length()),e}},ACe=kn(ql(),1),B3=class{constructor(e){this.viewer=e,this.itemList={},this.handleMouseWheel=e=>{e.preventDefault(),this.element&&(this.element.scrollLeft+=e.deltaY)},e.addEventListener("ModelLoaded",(()=>{this.init()}))}init(){var e;let t=document.createElement("div");t.classList.add("model-layout-switch-bar");let i=document.createElement("div");i.classList.add("model-layout-switch-bar-content"),i.addEventListener("wheel",this.handleMouseWheel),this.viewer.getLayoutNames().forEach(((e,t)=>{let r=this.createItem(e,t);this.itemList[e]=r,r.resetActivate=()=>{for(let e in this.itemList)this.itemList[e].resetActive()},null==i||i.appendChild(r.element)})),this.element=t,this.content=i,this.element.appendChild(this.content),null==(e=this.viewer.widgetContainer)||e.appendChild(this.element)}createItem(e,t){let i=new KG(this.viewer,e);return 0===t&&i.setActive(!0),i}destroy(){var e,t;for(let t in this.itemList){let i=this.itemList[t];i.destroy(),null==(e=this.content)||e.removeChild(i.element)}this.itemList={},this.element&&this.content&&(this.element.removeChild(this.content),this.element.removeEventListener("wheel",this.handleMouseWheel),null==(t=this.viewer.widgetContainer)||t.removeChild(this.element),this.element=void 0)}show(){this.element&&(this.element.style.display="block")}hide(){this.element&&(this.element.style.display="none")}},KG=class{constructor(e,t){this.viewer=e,this.eventBus=fE(),this.active=!1,this.element=this.createItem(t),this.eventBus.on("activechange",(e=>{this.resetActivate&&this.resetActivate(),e?(this.element.classList.add("activate"),this.viewer.activateLayout(t)):this.element.classList.remove("activate")}))}createItem(e){let t=document.createElement("div"),i=document.createElement("span");return t.classList.add("model-layout-switch-item"),t.onclick=()=>{this.active=!this.active,this.eventBus.emit("activechange",this.active)},i.innerText=e,t.appendChild(i),t}setActive(e){this.active!==e&&(this.active=e,this.eventBus.emit("activechange",e))}resetActive(){this.active=!1,this.element.classList.remove("activate")}destroy(){this.eventBus.off("activechange")}},k3=class{constructor(e){this.progresseItems=[],this.element=document.createElement("div"),this.element.classList.add("progress-bar"),e.appendChild(this.element)}setVisibility(e){this.element&&(e?this.element.classList.remove("hidden"):this.element.classList.add("hidden"))}addProgressItem(e,t){let i=this.progresseItems.find((t=>t.id===e));if(!i){let r=document.createElement("div");r.classList.add("progress-bar-item"),r.innerHTML=t||"",this.element.append(r),i={id:e,div:r},this.progresseItems.push(i)}this.setVisibility(!0)}updateProgress(e,t,i){let r=this.progresseItems.find((t=>t.id===e));if(!r)return;let n=t?`${t}`:"";t&&i&&(n+=": "),i&&(n+=`${i.toFixed(2)}%`),r.div.innerHTML=n}removeProgressItem(e){let t=this.progresseItems.find((t=>t.id===e));t&&t.div.remove(),0===this.progresseItems.length&&this.setVisibility(!1)}delayRemoveProgressItem(e,t=3e3){setTimeout((()=>{this.removeProgressItem(e)}),t)}},cS=new Be,MCe=new Be,DCe=new Xs,ZG=new A,CCe=class extends tm{constructor(e){super(e),this.name="DxfViewer",this.CAMERA_Z_POSITION=100,this.CAMERA_MIN_ZOOM=1e-6,this.timer=Date.now(),this.loadedModels={},this.masterModelId="",this.raycaster=new Oc,this.mouseMoved=!1,this.mouseDoubleClicked=!1,this.selected=!0,this.raf=new dT,this.clock=new Al,this.renderEnabled=!1,this.jobCount=0,this.enableHideVisuallySmallObjects=!0,this.sortedHidableObjects={},this.lastCameraZoom=1/0,this.activeLayoutName="",this.layoutInfos={},this.units=void 0,this.fpsUtils=new HC,this.onResize=()=>{var e;let t=null==(e=this.renderer)?void 0:e.domElement;t&&t.parentElement&&this.resize(t.parentElement.clientWidth,t.parentElement.clientHeight)},this.enableRender=(e=1e3)=>{this.renderEnabled=!0,this.raf&&(this.timeoutSymbol&&this.raf.clearTimeout(this.timeoutSymbol),this.timeoutSymbol=this.raf.setTimeout((()=>{this.renderEnabled=!1}),e))},this.loadingDxfCount=0,this.compareMode=!1,this.viewerCfg=e,this.increaseJobCount(),this.init(),this.animate(),this.enableRender(),this.decreaseJobCount(),ne.info(`[DxfViewer] Initialized in ${(Date.now()-this.timer)/1e3}s`)}init(){let e=this.viewerCfg;this.initThree(),wi.isBrowser&&!e.context&&this.initDom(),this.initInputManager(),this.initEvents(),this.initControls(),this.initOthers(),this.enableSelection=e.enableSelection}initInputManager(){this.renderer&&(this.inputManager=new M0(this.renderer.domElement))}initThree(){this.initScene(),this.initRenderer(),this.initCamera()}initDom(){let e=this.viewerCfg;this.initSpinner(),this.initCSS2DRenderer(),!0===e.enableAxisGizmo&&(this.axes=this.initAxes()),!0===e.enableStats&&(this.stats=this.initStats()),e.enableToolbar&&(this.toolbar=this.initToolbar()),e.enableBottomBar&&(this.bottomBar=this.initBottomBar()),e.enableProgressBar&&(this.loadingProgressBar=this.initLoadingProgressBar()),e.enableLayoutBar&&(this.dxfLayoutBar=new B3(this))}initScene(){let e=new Pn;e.background=new je(2172976),e.matrixAutoUpdate=!1,e.matrixWorldAutoUpdate=!1,this.scene=e}initRenderer(){var e;let{context:t}=this.viewerCfg,i={context:t,antialias:!0,preserveDrawingBuffer:!0,alpha:!1,stencil:!1};!wi.isBrowser&&t&&Object.assign(i,{context:t,canvas:wi.creatReactNativeCanvas(t)}),t&&(this.width=t.drawingBufferWidth,this.height=t.drawingBufferHeight),this.renderer=new Ol(i),this.renderer.setClearColor(11119017,1),this.renderer.localClippingEnabled=!0,wi.isBrowser&&(!t&&this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.domElement.classList.add("webgl-renderer"),null==(e=this.viewerContainer)||e.appendChild(this.renderer.domElement)),this.renderer.setSize(this.width,this.height),_t.printGpuInfo(this.renderer.getContext()),Er.maxFragmentUniforms=this.renderer.capabilities.maxFragmentUniforms-20,this.enableOverlayRenderer&&(this.overlayRender=new wr(this))}initCSS2DRenderer(){var e;let t=new _f;t.setSize(this.width,this.height),t.domElement.style.height="0",t.domElement.style.width="0",t.domElement.style.position="absolute",t.domElement.style.top="0",t.domElement.style.left="0",t.domElement.style.overflow="visible",t.domElement.classList.add("css2d-renderer"),null==(e=this.viewerContainer)||e.appendChild(t.domElement),this.css2dRenderer=t}initCamera(){if(!this.scene)return;let e=new Ji(-this.width/2,this.width/2,this.height/2,-this.height/2,.1,1e5);e.layers.enable(10),e.position.set(0,0,this.CAMERA_Z_POSITION),e.zoom=10,e.updateProjectionMatrix(),this.scene.add(e),this.camera=e}initControls(){let e=this.camera;if(!this.inputManager||!e)return;let t=new $l(e,this.inputManager);t.enableRotate=!1,t.enabled=!0,t.keyTruckSpeed=10,t.dollyToCursor=!0,t.dollySpeed=.5,t.truckSpeed=1,t.mouseButtons={left:et.TRUCK,middle:et.TRUCK,wheel:et.ZOOM,right:et.TRUCK},t.touches={one:et.TOUCH_TRUCK,two:et.TOUCH_ZOOM_TRUCK,three:et.NONE},t.listenToKeyEvents(),t.update(0),this.controls=t,t.addEventListener("control",this.onControlsChange(this)),t.addEventListener("controlend",this.onControlsEnd(this))}onControlsChange(e){return()=>{e.enableRender()}}onControlsEnd(e){return()=>{e.enableRender()}}initSpinner(){var e;if(!this.viewerCfg.enableSpinner)return;let t=document.createElement("div");t.classList.add("bim-viewer-spinner");let i=document.createElement("div");i.classList.add(uo,"icon-loading"),t.append(i),null==(e=this.widgetContainer)||e.appendChild(t),this.spinner=t,this.setSpinnerVisibility(this.jobCount>0)}initEvents(){this.inputManager&&(this.inputManager.addEventListener("pointerdown",(e=>{this.handleMouseClick(e)})),this.inputManager.addEventListener("pointermove",(()=>{})),this.inputManager.addEventListener("pointerup",(()=>{})),this.inputManager.addEventListener("keydown",(e=>{e.altKey&&"KeyR"===e.code&&this.flyToRandomObject()})),this.inputManager.addEventListener("resize",this.onResize))}initOthers(){!this.scene||!this.renderer||!this.camera||(this.renderer.domElement.style.outlineWidth="0")}initAxes(){var e;let t=document.createElement("div");t.classList.add("axesRenderer");let i=new Sf(t,this.camera,!0);return null==(e=this.widgetContainer)||e.append(t),i}initStats(){var e;let t=I3();t.setMode(0);let i=document.createElement("div");return i.classList.add("statsOutput"),i.appendChild(t.domElement),t.domElement.style.position="absolute",null==(e=this.widgetContainer)||e.append(i),t}showStats(){this.stats||(this.stats=this.initStats()),this.stats.showPanel(0)}hideStats(){this.stats&&this.stats.showPanel(-1)}initToolbar(){let e=this.viewerCfg;return new Eh(this,(0,ACe.merge)({},MDe,e.toolbarMenuConfig))}initBottomBar(){return new om(this)}initLoadingProgressBar(){return new k3(this.widgetContainer)}showLayoutBar(){var e;null==(e=this.dxfLayoutBar)||e.show()}hideLayoutBar(){var e;null==(e=this.dxfLayoutBar)||e.hide()}animate(){var e,t,i,r,n,s;requestAnimationFrame(this.animate.bind(this));let a=this.clock.getDelta(),o=null==(e=this.controls)?void 0:e.update(a);if(this.scene&&this.camera&&(this.renderEnabled||o)){if(this.updateRaycasterThreshold(),this.updateCameraZoomUniform(this.camera.zoom),Er.resolutionUniform.value.set(this.width,this.height),null==(t=this.renderer)||t.render(this.scene,this.camera),!wi.isBrowser){let e=null==(i=this.renderer)?void 0:i.getContext();e&&e.endFrameEXP&&(e.flush(),e.endFrameEXP())}this.hotpointRoot&&this.hotpointRoot.children.length>0&&(null==(r=this.css2dRenderer)||r.render(this.scene,this.camera)),this.dispatchEvent("RenderAfter")}null==(n=this.stats)||n.update(),this.fpsUtils.update(),null==(s=this.bottomBar)||s.update()}getFps(){return this.fpsUtils.fps}is3d(){return!1}destroy(){var e,t,i,r,n,s;Er.abortJobs=!0,this.dxfLayoutBar&&(this.dxfLayoutBar.destroy(),this.dxfLayoutBar=void 0),null==(e=this.measurementManager)||e.destroy(),this.measurementManager=void 0,null==(t=this.markupManager)||t.destroy(),this.markupManager=void 0,null==(i=this.zoomToRectHelper)||i.destroy(),this.zoomToRectHelper=void 0,null==(r=this.boxSelectHelper)||r.destroy(),this.boxSelectHelper=void 0,this.sortedHidableObjects={},this.layoutInfos={},this.raycastableObjects=void 0,this.changes={},Object.keys(this.loadedModels).forEach((e=>{delete this.loadedModels[e]})),this.loadedModels={},this.css2dRenderer&&(null==(n=this.viewerContainer)||n.removeChild(this.css2dRenderer.domElement),this.css2dRenderer=void 0),this.stats=void 0,this.raycaster=void 0,this.selectedObject=void 0,this.raf&&(this.timeoutSymbol&&this.raf.clearTimeout(this.timeoutSymbol),this.raf=void 0),this.contextMenu&&(this.contextMenu.destroy(),this.contextMenu=void 0),this.axes&&(this.axes.dispose(),this.axes=void 0),this.toolbar&&(this.toolbar.destroy(),this.toolbar=void 0),this.spinner&&(this.spinner.remove(),this.spinner=void 0),this.bottomBar=void 0,this.font=void 0,null==(s=this.inputManager)||s.removeEventListener(),super.destroy()}loadModelAsync(e,t){return ht(this,null,(function*(){var i,r;this.loadingDxfCount++,this.timer=Date.now(),this.increaseJobCount();let n=e.modelId||e.src;this.masterModelId||(this.masterModelId=n);let s=e.ignorePaperSpace||this.masterModelId!==n;!1===e.ignorePaperSpace&&s&&ne.warn(`[DxfViewer] Paper space will be ignored for '${n}' although 'ignorePaperSpace' is false!`),_t.printMemory("Before loadModelAsync");let a=new $c;a.setFont(this.font);let o=n,l=this.translate("ProgressBar.Loading"),h=e=>{var i;null==(i=this.loadingProgressBar)||i.updateProgress(o,l,e),t&&t(new ProgressEvent("LoadProgress",{loaded:e,total:100}))},u=(e,i,r)=>{var n;let s=100*e.loaded/e.total;s=s*(r-i)/100+i,null==(n=this.loadingProgressBar)||n.updateProgress(o,l,s),t&&t(new ProgressEvent("LoadProgress",{loaded:s,total:100}))};null==(i=this.loadingProgressBar)||i.addProgressItem(o),h(0);let c=this.viewerCfg,p=yield a.loadDxfDataAsync(e.src,e.modelId,(e=>u(e,0,90)),void 0,s,c.enableLocalCache).finally((()=>{this.loadingDxfCount--,0===this.loadingDxfCount&&this.font&&this.font.releaseFontData&&this.font.releaseFontData()}));if(ne.info(`[DxfViewer] Loaded '${e.src}' in ${(Date.now()-this.timer)/1e3}s, adding to scene...`),Er.abortJobs&&Promise.reject("[DxfViewer] abort load dxf"),0===p.threejsObject.children.length){let t=`[DxfViewer] Nothing was loaded from ${e.src}`;return ne.warn(t),this.decreaseJobCount(),Promise.reject(t)}let d=p.threejsObject;d.name=n;let f=this.getDxfUnits(p);if(this.masterModelId===e.modelId&&(this.units=f),ne.info(`[DxfViewer] Units of '${e.src}' is '${f}'`),f){let t=1;this.units&&f!==this.units&&(t=G8(f,this.units)),e.scale?e.scale=[e.scale[0]*t,e.scale[0]*t,e.scale[0]*t]:e.scale=[t,t,t]}if(e.matrix&&16===e.matrix.length){let t=new Be;t.elements=e.matrix,d.applyMatrix4(t)}else{let t=e.position||[0,0,0],i=e.rotation||[0,0,0],r=e.scale||[1,1,1];d.position.set(t[0],t[1],t[2]),d.rotation.set(i[0]*Math.PI/180,i[1]*Math.PI/180,i[2]*Math.PI/180),d.scale.set(r[0],r[1],r[2])}return this.addLoadedModelToScene(d,e,p),_t.printMemory("After addLoadedModelToScene"),ne.info(`[DxfViewer] Added '${e.src}' to scene in ${(Date.now()-this.timer)/1e3}s`),this.decreaseJobCount(),h(100),null==(r=this.loadingProgressBar)||r.delayRemoveProgressItem(o),this.dispatchEvent("ModelLoaded"),Promise.resolve()}))}unloadDxf(){throw new Error("Not implemented yet!")}isCompareMode(){return this.compareMode}compare(e,t,i){return ht(this,null,(function*(){var r,n,s,a,o;let{src:l,modelId:h}=e,{src:u}=t;if(this.compareMode)return Promise.reject("[DxfViewer] It is already under comparing mode!");if(this.masterModelId||Object.keys(this.loadedModels).length>0)return Promise.reject("[DxfViewer] Shouldn't load anything else before compare!");if(this.compareMode=!0,this.timer=Date.now(),this.increaseJobCount(),!this.font)return Promise.reject("[DxfViewer] Should set font first!");let c=new Er(!0);c.setFont(this.font),this.font instanceof Yc&&this.font.getFontData&&(yield this.font.getFontData());let p=l+u,d=this.translate("ProgressBar.Comparing"),f=e=>{var t;null==(t=this.loadingProgressBar)||t.updateProgress(p,d,e),i&&i(new ProgressEvent("CompareProgress",{loaded:e,total:100}))},m=(e,t,r)=>{var n;let s=100*e.loaded/e.total;s=s*(r-t)/100+t,null==(n=this.loadingProgressBar)||n.updateProgress(p,d,s),i&&i(new ProgressEvent("CompareProgress",{loaded:s,total:100}))};_t.printMemory("Before comparing"),this.masterModelId=h||l,this.loadingDxfCount+=2,null==(r=this.loadingProgressBar)||r.addProgressItem(p),f(0);let g=Date.now(),y=yield c.parse(l,(e=>m(e,0,15))),v=yield c.parse(u,(e=>m(e,15,30))),[T,x]=yield Promise.allSettled([y,v]);if("rejected"===T.status)return Promise.reject(`[DxfViewer] Failed to parse ${l}`);if("rejected"===x.status)return Promise.reject(`[DxfViewer] Failed to parse ${u}`);if(ne.info(`[DxfViewer] loadFiles in ${(Date.now()-g)/1e3}s`),Er.abortJobs)return Promise.reject("[DxfViewer] compare loadFile aborted");let b=T.value,_=x.value;g=Date.now();let E=yield new qn(b,_).compare((e=>m(e,30,60)));if(ne.info(`[DxfViewer] Compared in ${(Date.now()-g)/1e3}s`),ne.debug("Compared results:",E),Er.abortJobs)return Promise.reject("[DxfViewer] compare change aborted");_t.printMemory("After getting the comparison results"),g=Date.now(),yield c.loadEntitiesForCompare(b,_,E,(e=>m(e,60,95))),_t.printMemory("After Creating threejs objects based on comparison result"),null==(n=this.font)||n.releaseFontData(),this.changes=E,ne.info(`[DxfViewer] Creates threejs objects based on comparison result in ${(Date.now()-g)/1e3}s`);let w=b,S=_;if(this.loadingDxfCount-=2,this.decreaseJobCount(),Object.keys(E).length||ne.info("[DxfViewer] No change found"),0===(null==(s=w.threejsObject)?void 0:s.children.length)&&0===(null==(a=S.threejsObject)?void 0:a.children.length)){let e=`[DxfViewer] Nothing was loaded from ${l} and ${u}`;return ne.warn(e),Promise.reject(e)}let I=w.threejsObject,M=S.threejsObject;return I.name=l,M.name=u,g=Date.now(),this.addLoadedModelToScene(I,Br({},e),w),_t.printMemory("After adding first loaded Model to scene"),f(95),this.addLoadedModelToScene(M,Br({},t),S),_t.printMemory("After adding second loaded Model to scene"),ne.info(`[DxfViewer] Added compared objects to scene in ${(Date.now()-g)/1e3}s`),ne.info(`[DxfViewer] The comparison between ${l}' and '${u}' is completed in ${(Date.now()-this.timer)/1e3}s !`),f(100),null==(o=this.loadingProgressBar)||o.delayRemoveProgressItem(p),Promise.resolve()}))}getEntitiesCount(){let e=0;return Object.values(this.loadedModels).forEach((t=>{var i;e+=(null==(i=t.dxfData)?void 0:i.loadedEntityCount)||0})),e}getLoadedDxfModelIds(){return Object.keys(this.loadedModels)}getLayoutNames(){let e=[];return this.getLayouts().forEach((t=>{e.push(t.layoutName)})),e}getLayouts(){let e=[],t=this.loadedModels[this.masterModelId];if(t){let i=t.dxfData,r=null==i?void 0:i.objects.LAYOUT;null==r||r.forEach((t=>{e.push(t)}))}return e}handleOverlayDxf(e){var t;let i=this.loadedModels[e];if(!i)return void ne.warn(`[DxfViewer] Can't find model for modelId '${e}'!`);this.increaseJobCount(),this.switchTransformMs(Er.MODEL_LAYOUT_NAME,e);let r=null==(t=i.dxfData)?void 0:t.threejsObject,n=null==r?void 0:r.children.find((e=>e.name===Er.MODEL_LAYOUT_NAME));n&&(n.traverse((e=>{this.addSpatialFilterSection(e,i.dxfData)})),this.calBoundingBoxOfLayoutChild(n)),this.showLayoutObjects(this.activeLayoutName),this.decreaseJobCount()}activateLayout(e){var t,i,r;if(this.increaseJobCount(),0==e.length)return ne.warn("[DxfViewer] layout name is empty !"),void this.decreaseJobCount();if(e===this.activeLayoutName)return void this.decreaseJobCount();let n=Date.now(),s=this.camera,a=this.getLayoutByName(e);if(!a)return ne.warn(`[DxfViewer] Can't find layout of ${e} !`),void this.decreaseJobCount();let o=this.loadedModels[this.masterModelId];if(!o)return ne.warn(`[DxfViewer] Can't find master model for modelId '${this.masterModelId}'!`),void this.decreaseJobCount();if(this.raycastableObjects=void 0,this.activeLayoutName){let e=this.getActiveLayoutInfo();e.lastCameraPosition||(e.lastCameraPosition=new A),null==(t=this.camera)||t.getWorldPosition(e.lastCameraPosition),e.lastCameraZoom=s.zoom}if(!(e=>{let t=this.layoutInfos[e];return!(null==t||!t.lastCameraZoom)})(e)){this.switchTransformMs(e,this.masterModelId);let t=this.getLayoutViewports(a),n=[];t.length>0&&(n=t[0].frozenLayerHandles);let s=e!==Er.MODEL_LAYOUT_NAME,l=null==(i=o.dxfData)?void 0:i.threejsObject,h=null==l?void 0:l.children.find((t=>t.name===e));if(h){let t=[],i=null==(r=o.dxfData)?void 0:r.layersAndThreejsObjects;h.traverse((r=>{this.addSpatialFilterSection(r,o.dxfData);let a=r;if(s&&a.material&&a.geometry){let r=a.userData.layerName;if(!this.isLayerFrozenForViewport(o.dxfData,r,n))return;t.push(a);let s=-1;i&&i[r]&&(s=i[r].indexOf(a),s>=0&&i[r].splice(s,1)),s<0&&ne.warn(`[DxfViewer] Failed to find object for modelId '${this.masterModelId}', layer '${r}', layout '${e}'`)}})),t.forEach((e=>{e.removeFromParent()}))}let u=this.getFilteredViewports(a);ne.debug("[DxfViewer] Active layout:",e,", viewports:",u);let c=Date.now();u.forEach((t=>{this.generateObjectsByViewport(e,t,o.dxfData)})),ne.info(`[DxfViewer] generateObjectsByViewport in ${(Date.now()-c)/1e3}s`),e!==Er.MODEL_LAYOUT_NAME&&this.switchTransformMs(Er.MODEL_LAYOUT_NAME,this.masterModelId),e!==Er.MODEL_LAYOUT_NAME&&h&&this.setLayoutHidableObjectArray(h),h&&this.calBoundingBoxOfLayoutChild(h)}let l=this.getActiveLayoutInfo();this.measurementManager&&(l.measurementDataArray=this.measurementManager.getMeasurementsData()||[],l.measurementDataArray.forEach((e=>{e.layoutName=this.activeLayoutName,this.setMeasurementVisibility(e.id,!1)})),this.measurementManager.clearUndoRedo()),this.markupManager&&(l.markupDataArray=this.markupManager.getMarkupData()||[],l.markupDataArray.forEach((e=>{e.layoutName=this.activeLayoutName,this.setMarkupVisibility(e.id,!1)})),this.markupManager.clearUndoRedo()),this.showLayoutObjects(e),this.activeLayoutName=e,l=this.getActiveLayoutInfo();let h=l.measurementDataArray||[];this.measurementManager&&(this.measurementManager.setMeasurementsData(h),h.forEach((e=>this.setMeasurementVisibility(e.id,!0))));let u=l.markupDataArray||[];if(this.markupManager&&(this.markupManager.setMarkupData(u),u.forEach((e=>this.setMarkupVisibility(e.id,!0)))),l.lastCameraPosition)this.goTo(l.lastCameraPosition,l.lastCameraZoom,!1);else{let e=this.getLayoutExtentEx(a);if(e){let t=e.max.x-e.min.x,i=e.max.y-e.min.y;(t<1e-16||i<1e-16||t>1e16||i>1e16)&&(ne.warn(`[BimViewer] Got wired bbox, max: ${e.max.toArray()}, min: ${e.min.toArray()}, going to calculate one...`),e=this.computeBoundingBox()),l.bbox=e,this.activeLayoutName!==Er.MODEL_LAYOUT_NAME&&this.updateGroundPlane(),this.zoomToBBox(e)}}this.dispatchEvent("LayoutChanged"),_t.printMemory(`After activated layout '${this.activeLayoutName}'`),this.enableRender(),this.decreaseJobCount(),ne.info(`[DxfViewer] Activated layout '${e}' in ${(Date.now()-n)/1e3}s`)}calBoundingBoxOfLayoutChild(e){let t=e.children.length;for(let i=0;i0?t.userData.boundingBox=Tn.getBoundingBox(t):t.userData.boundingBox&&delete t.userData.boundingBox}}getActiveLayoutName(){return this.activeLayoutName}getLayers(){var e,t;let i=[];if(this.masterModelId){let t=this.loadedModels[this.masterModelId],r=null==(e=null==t?void 0:t.dxfData)?void 0:e.tables.layer.layers;r&&i.push({modelId:this.masterModelId,layers:r})}for(let[e,r]of Object.entries(this.loadedModels)){if(e===this.masterModelId)continue;let n=null==(t=null==r?void 0:r.dxfData)?void 0:t.tables.layer.layers;n&&i.push({modelId:e,layers:n})}return i}setModelVisibility(e,t){let i=this.loadedModels[e];if(!i||!i.dxfData)throw new Error(`Failed to find model by modelId '${e}'!`);i.dxfData.threejsObject.visible=t,this.enableRender()}setLayerVisibility(e,t,i){let r=this.camera;i=i||this.masterModelId;let n=this.loadedModels[i];if(!n)throw new Error(`Failed to find layer by modelId '${i}'!`);let s=n.dxfData,a=null==s?void 0:s.tables.layer.layers[e];a?a.visible=t:ne.warn(`[DxfViewer] Layer '${e}' not found from dxfData!`);let o=null==s?void 0:s.layersAndThreejsObjects[e];if(o){let e=r.zoom;o.forEach((i=>{this.enableHideVisuallySmallObjects&&t&&e&&i.userData.visibleMinZoom&&e{let i=e;i.material&&Cs.setMaterialColor(i.material,new je(t))})):ne.warn(`[DxfViewer] No object found for layer '${e}'`),this.enableRender()}setFont(e){return ht(this,null,(function*(){let t=Date.now();w0.isShxFile(e[0])?this.font=yield(new w0).loadAsync(e):(e.length>1&&ne.warn("[DxfViewer] Only support 1 typeface font file for now, others will be ignored!"),this.font=yield(new mT).loadAsync(e[0])),ne.info(`[DxfViewer] Font file(s) load time in ${(Date.now()-t)/1e3}s`)}))}setDisplayLengthUnits(){throw new Error("Not implemented yet!")}setDisplayAreaUnits(){throw new Error("Not implemented yet!")}setDisplayPrecision(){throw new Error("Not implemented yet!")}getScreenshot(){return ht(this,null,(function*(){var e;let t,i="image/png",r=.8,n=null==(e=this.renderer)?void 0:e.domElement;if(!n)return;this.boxSelectHelper||(this.boxSelectHelper=new Jf(this)),t=yield this.boxSelectHelper.select();let s=yield _t.canvasToImage(n),a=document.createElement("canvas");a.width=n.width,a.height=n.height;let o=window.devicePixelRatio,l=a.getContext("2d");if(l.drawImage(s,0,0,s.width/o,s.height/o),this.overlayRender){let e=this.overlayRender.getCanvas(),t=yield _t.canvasToImage(e);l.drawImage(t,0,0,t.width/o,t.height/o)}return _t.renderingContextToImage(l,t,i,r)}))}activateMeasurement(e){this.inputManager&&(this.measurementManager||(this.measurementManager=new ru(this,this.inputManager)),this.measurementManager.activateMeasurement(e),this.clearSelection())}deactivateMeasurement(){var e;null==(e=this.measurementManager)||e.deactivateMeasurement()}getActiveMeasurementType(){var e;return null==(e=this.measurementManager)?void 0:e.getActiveMeasurementType()}getMeasurements(){var e,t;let i=this.getActiveLayoutInfo();i.measurementDataArray=(null==(e=this.measurementManager)?void 0:e.getMeasurementsData())||[],i.measurementDataArray.forEach((e=>{e.layoutName||(e.layoutName=this.activeLayoutName)}));let r=[];for(let e of Object.values(this.layoutInfos))null==(t=e.measurementDataArray)||t.forEach((e=>r.push(e)));return r}setMeasurements(e){if(!this.inputManager)return;e.forEach((e=>{var t;let i=e.layoutName||Er.MODEL_LAYOUT_NAME;null==(t=this.getLayoutInfo(i).measurementDataArray)||t.push(e)}));let t=this.getActiveLayoutInfo();this.measurementManager||(this.measurementManager=new ru(this,this.inputManager));let i=this.measurementManager;t.measurementDataArray&&i.setMeasurementsData(t.measurementDataArray)}selectMeasurement(e){this.inputManager&&(this.measurementManager||(this.measurementManager=new ru(this,this.inputManager)),this.measurementManager.selectMeasurementById(e))}unselectMeasurement(){this.inputManager&&(this.measurementManager||(this.measurementManager=new ru(this,this.inputManager)),this.measurementManager.unselectMeasurement())}removeMeasurement(e){this.inputManager&&(this.measurementManager||(this.measurementManager=new ru(this,this.inputManager)),this.measurementManager.removeMeasurementById(e))}setMeasurementVisibility(e,t){return!!(this.inputManager&&this.measurementManager&&e)&&this.measurementManager.setMeasurementVisibility(e,t)}clearMeasurements(){var e;null==(e=this.measurementManager)||e.clearMeasurements();for(let e of Object.values(this.layoutInfos))e.measurementDataArray=[]}activateMarkup(e){this.inputManager&&(this.markupManager||(this.markupManager=new P_(this,this.inputManager)),this.markupManager.isMarkupActive()||this.markupManager.activate(),this.markupManager.setDrawType(e),this.clearSelection())}deactivateMarkup(){this.markupManager&&this.markupManager.deactivate()}getActiveMarkupType(){var e;return null==(e=this.markupManager)?void 0:e.getActiveMarkupType()}setMarkupLineColor(e){var t;null==(t=this.markupManager)||t.setLineColor(e)}getMarkupLineColor(){var e;return null==(e=this.markupManager)?void 0:e.getLineColor()}setMarkupFillColor(e){var t;null==(t=this.markupManager)||t.setFillColor(e)}getMarkupFillColor(){var e;return null==(e=this.markupManager)?void 0:e.getFillColor()}setMarkupLineWidth(e){var t;null==(t=this.markupManager)||t.setLineWidth(e)}getMarkupLineWidth(){var e;return null==(e=this.markupManager)?void 0:e.getLineWidth()}setMarkupFontSize(e){var t;null==(t=this.markupManager)||t.setFontSize(e)}getMarkupFontSize(){var e;return null==(e=this.markupManager)?void 0:e.getFontSize()}getMarkups(){var e,t;let i=this.getActiveLayoutInfo();i.markupDataArray=(null==(e=this.markupManager)?void 0:e.getMarkupData())||[],i.markupDataArray.forEach((e=>{e.layoutName||(e.layoutName=this.activeLayoutName)}));let r=[];for(let e of Object.values(this.layoutInfos))null==(t=e.markupDataArray)||t.forEach((e=>r.push(e)));return r}setMarkups(e){if(!this.inputManager)return;this.clearMarkups(),e.forEach((e=>{var t;let i=e.layoutName||Er.MODEL_LAYOUT_NAME;null==(t=this.getLayoutInfo(i).markupDataArray)||t.push(e)}));let t=this.getActiveLayoutInfo();this.markupManager||(this.markupManager=new P_(this,this.inputManager));let i=this.markupManager;t.markupDataArray&&i.setMarkupData(t.markupDataArray),this.enableRender()}setMarkupVisibility(e,t){return!!(this.inputManager&&this.markupManager&&e)&&this.markupManager.setMarkupVisibility(e,t)}updateMarkup(e){if(!(this.inputManager&&this.markupManager&&e&&e.id))return!1;let t=!1;for(let i of Object.values(this.layoutInfos)){let r=i.markupDataArray||[];for(let i=0;i{var i;return(null==(i=t.userData.hotpoint)?void 0:i.hotpointId)===e}))}getHitResult(e){let t=this.viewerContainer;if(!this.camera||!this.raycaster||!this.groundPlane)return;let i=Ci.getScreenPointByEvent(e,t),r=Ci.screenPoint2NdcPoint(i,this.camera,t);this.raycaster.setFromCamera(r,this.camera),this.raycaster.layers.enable(10);let n=this.raycaster.intersectObject(this.groundPlane,!0);if(n&&n.length>0){let e=n[0].point;return{location:[e.x,e.y]}}}zoomToRect(){this.zoomToRectHelper||(this.zoomToRectHelper=new dE(this)),this.zoomToRectHelper.activate()}getLayoutByName(e){let t,i=this.getLayouts();for(let r of i)if(r.layoutName===e){t=r;break}return t}getActiveLayoutInfo(){return this.getLayoutInfo(this.activeLayoutName)}getMsTransformMatrix(e){var t,i;let r=this.loadedModels[e],n=null==(t=r.dxfData)?void 0:t.header;if(!n)return;let s=n.$ANGDIR,a=this.getDxfUnits(r.dxfData),o=null==(i=r.dxfData)?void 0:i.tables.viewPort.viewPorts.filter((e=>"*ACTIVE"===e.name.toLocaleUpperCase()));if(!o)return;let l=new Be,h=Er.getDcs2WcsMatrix(o[0],s),u=new A(o[0].center.x,o[0].center.y,0).applyMatrix4(h),c=1;this.units&&a!==this.units&&(c=G8(a,this.units)),u.multiplyScalar(c),l.makeTranslation(u.x,u.y,0),l.multiply((new Be).makeRotationZ(_r.degToRad(o[0].viewTwistAngle))),l.multiply((new Be).makeTranslation(-u.x,-u.y,0)),this.loadedModels[e].msTransformMatrix=l}switchTransformMs(e,t){var i;let r=this.loadedModels[t];if(!r)return void ne.warn(`[DxfViewer] Can't find model whose modelId is ${t}`);let n=r.msTransformMatrix;if(cS.identity(),!n||n.equals(cS))return;let s=null==(i=r.dxfData)?void 0:i.threejsObject,a=null==s?void 0:s.children.find((e=>e.name===Er.MODEL_LAYOUT_NAME));a&&(e===Er.MODEL_LAYOUT_NAME?a.applyMatrix4(n):a.applyMatrix4(n.clone().invert()),a.updateMatrixWorld(!0))}getLayoutExtentEx(e){return e.layoutName===Er.MODEL_LAYOUT_NAME?this.getModelSpaceExtent():this.getLayoutExtent(e)}getModelSpaceExtent(){var e,t;let i=this.loadedModels[this.masterModelId],r=null==(e=i.dxfData)?void 0:e.header,n=new A,s=new A;if(!r)throw new Error(`Header is undefined in ${this.masterModelId}!`);let a=null==(t=i.dxfData)?void 0:t.tables.viewPort.viewPorts,o=r.$EXTMIN,l=r.$EXTMAX,h=r.$ANGDIR;if(a&&a.length>0)for(let e=0;e0){let e,t=s.filter((e=>1===parseInt(e.viewportId)));e=t.length>0?t[0]:s[0];let{centerPoint:i,width_paperSpace:r,height_paperSpace:n}=e,h=Er.getDcs2WcsMatrix(e,l),u=new A(i.x,i.y,0);u.applyMatrix4(h),a={x:u.x-r/2,y:u.y-n/2,z:0},o={x:u.x+r/2,y:u.y+n/2,z:0}}return r.set(a.x,a.y,a.z),n.set(o.x,o.y,o.z),new Dt(r,n)}showLayoutObjects(e){Object.values(this.loadedModels).forEach((t=>{var i;let r=0,n=0,s=null==(i=t.dxfData)?void 0:i.threejsObject;null==s||s.children.forEach((t=>{let i=t.name===e;t.visible=i,i?r++:n++})),ne.debug(`[DxfViewer] showLayoutObjects('${e}') sets ${r} layout level object(s) to visible and ${n} to hidden for model '${null==s?void 0:s.name}'`)}))}getLayoutViewports(e){var t;let i=this.loadedModels[this.masterModelId],r=e.ownerHandle;return(null==(t=i.dxfData)?void 0:t.layoutViewportsMap[r])||[]}setMaterialUniforms(e,t){e instanceof Yt&&(e.uniforms.u_cameraZoom&&(e.uniforms.u_cameraZoom=Er.cameraZoomUniform),e.uniforms.u_viewportScale&&1===(null==t?void 0:t.header.$PSLTSCALE)&&(e.uniforms.u_viewportScale=Er.viewportScaleUniform))}isLayerFrozenForViewport(e,t,i){if(!e||!t)return!1;let r=e.tables.layer.layers[t];return!!(r&&(1&r.flag)>0)||!(!i||i.length<=0)&&(r&&i.indexOf(r.handle)>=0)}getFilteredViewports(e){let t=this.getLayoutViewports(e),i=t.filter((e=>"1"!==e.viewportId));return i.length===t.length&&(i=t.filter(((e,t)=>0!==t))),i}generateObjectsByViewport(e,t,i,r=[]){let n=t;if("1"==t.viewportId)return;if(!n.psBBox||!n.msToPsMatrix)throw new Error("The bbox or matrix is invalid in the viewport!");Er.transformMatrixUniform={value:n.msToPsMatrix},Er.viewportScaleUniform={value:t.viewHeight/t.height_paperSpace};let s=n.psBBox.clone();s.applyMatrix4(n.msToPsMatrix.clone().invert()),s.min.setZ(-1),s.max.setZ(1);let a=this.getObjectsByBoundingBox(s);if(0===a.length)return;let o,l=n.psBBox.min,h=n.psBBox.max,u=new rs(new le(l.x,l.y),new le(h.x,h.y)),c=Yu.generateSectionPlanesByBox(u),p=[],d=e=>(p[e.id]||(p[e.id]=e.clone(),this.setMaterialUniforms(p[e.id],i),Yu.setMaterialSection(p[e.id],c)),p[e.id]),f=[...r,...t.frozenLayerHandles||[]];if(e!==Er.MODEL_LAYOUT_NAME){let e=t;e.associatedLeafObjectSet||(e.associatedLeafObjectSet=new Set),o=e.associatedLeafObjectSet}let m=new ur;m.name=t.viewportId;let g=null==i?void 0:i.layersAndThreejsObjects,y=[];if(a.forEach((t=>{let r=t.clone();r.traverse((t=>{if(t.material&&t.geometry){let r=t.userData.layerName;if(this.isLayerFrozenForViewport(i,r,f))return void y.push(t);!1!==t.userData.layerVisible&&(t.visible=!0),t.material=(e=>{if(Array.isArray(e)){let t=[];return e.forEach((e=>{let i=d(e);t.push(i)})),t}return d(e)})(t.material),null==o||o.add(t),g&&g[r]?g[r].push(t):ne.warn(`[DxfViewer] Failed to find object for modelId '${this.masterModelId}', layer '${r}', layout '${e}'`)}})),r.userData.boundingBox&&(r.visible=!0,delete r.userData.boundingBox),m.add(r)})),o&&0===o.size)return;ei.removeEmptyObjectsFromRemovingObjects(y,m);let v=null==i?void 0:i.threejsObject,T=null==v?void 0:v.children.find((t=>t.name===e));T||(T=new ur,ei.setSharedVariablesOfObject(T),T.name=e,null==v||v.add(T)),T.add(m),m.applyMatrix4(n.msToPsMatrix),m.updateMatrixWorld(!0),m.traverse((e=>{ei.setSharedVariablesOfObject(e),this.addSpatialFilterSection(e,i,!0)}))}findSpatialFilter(e,t){let i,r=t.objects.SPATIAL_FILTER;if(r){for(let t of r)if(t.handle===e){i=t;break}return i}}getAnyMaterial(e){let t,i=e;if(i.material)return Array.isArray(i.material)?i.material[0]:i.material;for(let i=0;i0),n=s.clipIntersection),t&&n!==r.clipPolylines[0].bReversed)return void ne.warn("[DxfViewer] Material cannot set clipIntersection to different values at the same time. clipIntersection needs to be set to true here!");n=r.clipPolylines[0].bReversed;let a=this.generateSectionsBySpatialFilter(r,e.matrixWorld);if(a){let i=e=>{let t=0;return e.clippingPlanes&&(t=e.clippingPlanes.length),t+a.length>Er.maxFragmentUniforms},r=new Set,s=e=>{r.has(e.id)||(r.add(e.id),i(e)||Yu.setMaterialSection(e,a,t,n))};e.traverse((e=>{let t=e.material;Array.isArray(t)?t.forEach((e=>{s(e)})):t&&s(t)}))}}}getObjectsByBoundingBox(e){var t;let i=[];if(e.isEmpty())return ne.warn("[DxfViewer] bbox is empty !"),i;let r=null==(t=this.loadedModels[this.masterModelId].dxfData)?void 0:t.threejsObject,n=null==r?void 0:r.children.find((e=>e.name===Er.MODEL_LAYOUT_NAME));return n&&n.children.forEach((t=>{(t=>{let r=Tn.getBoundingBox(t,!1);e.intersectsBox(r)&&i.push(t)})(t)})),i}getDxfUnits(e){if(e||Object.keys(this.loadedModels).length>0&&(e=this.loadedModels[this.masterModelId].dxfData),!e)return"Unitless";let t=null==e?void 0:e.header;if(!t)return ne.warn("DxfData or its header is undefined!"),"Unitless";let i=t.$INSUNITS;return Er.getDxfUnits(i)}generateSectionsBySpatialFilter(e,t){let i=e.clipPolylines[0];if(i.bConcave)return void ne.warn("[DxfViewer] clipPolyline.bConcave = true is not supported yet in spatialFilter !");cS.copy(t),e.localMatrix&&cS.multiply(e.localMatrix);let r=i.polyline,n=[];r.forEach((e=>{let t=e.clone().applyMatrix4(cS);n.push(new le(t.x,t.y))}));let s=es.isClockWise(n),a=!s&&!i.bReversed||s&&i.bReversed;return Yu.generateSectionPlanesByPoints(n,a)}addLoadedModelToScene(e,t,i){if(!this.scene)return;let r=t.modelId||t.src;if(this.loadedModels[r]){let e=1;for(;this.loadedModels[`${r}_${e}`];)e++;r=`${r}_${e}`,ne.warn(`[DxfViewer] Model '${r}' is loaded more than once!`)}this.loadedModels[r]={dxfData:i},e.matrixAutoUpdate=!1,e.updateMatrix(),_t.printMemory("Before merge"),t.merge&&(Er.merge(i),_t.printMemory("After merged")),e.updateMatrixWorld(!0),Er.computeLineDistances(e),this.getMsTransformMatrix(r),this.masterModelId===r?this.activateLayout(Er.MODEL_LAYOUT_NAME):this.handleOverlayDxf(r),ne.debug(i),this.scene.add(e);let n=null==i?void 0:i.threejsObject.children.find((e=>e.name===Er.MODEL_LAYOUT_NAME));n&&this.setLayoutHidableObjectArray(n),this.updateGroundPlane(),this.raycastableObjects=void 0,this.masterModelId===r||this.enableRender()}resize(e,t){let i=this.camera;if(i){let r=e||window.innerWidth,n=t||window.innerHeight,s=r/n;i.left=-this.height*s/2,i.right=this.height*s/2,i.top=this.height/2,i.bottom=-this.height/2,i.updateProjectionMatrix(),this.renderer&&this.renderer.setSize(r,n),this.css2dRenderer&&(this.css2dRenderer.setSize(r,n),this.css2dRenderer.domElement.style.width="0",this.css2dRenderer.domElement.style.height="0"),this.overlayRender&&this.overlayRender.setSize(r,n)}this.enableRender()}getRaycaster(){return this.raycaster}getRaycastableObjects(){var e;if(this.raycastableObjects)return this.raycastableObjects;let t=Date.now(),i=[];for(let t of Object.values(this.loadedModels)){let r=null==(e=t.dxfData)?void 0:e.threejsObject,n=r&&r.children.find((e=>e.name===this.activeLayoutName));n&&n.traverseVisible((e=>{ei.isLeafObject(e)&&i.push(e)}))}return this.groundPlane&&i.push(this.groundPlane),this.raycastableObjects=i,ne.debug(`[DxfViewer] getRaycastableObjects() finds ${i.length} objects`),ne.debug(`[DxfViewer] getRaycastableObjects() costs ${(Date.now()-t)/1e3} s`),i}getViewportByPoint(e){if(0===this.activeLayoutName.length||this.activeLayoutName===Er.MODEL_LAYOUT_NAME)return;let t=this.getLayoutByName(this.activeLayoutName);if(!t)return;let i=t=>e.xt.max.x||e.yt.max.y,r=this.getFilteredViewports(t);for(let e=0,t=r.length;e{i.visible&&(t.push(i),e.add(i))}))}let r=this.getViewportByPoint(this.raycaster.ray.origin);r&&r.associatedLeafObjectSet?(this.getRaycastableObjects().forEach((i=>{var n;null!=(n=r.associatedLeafObjectSet)&&n.has(i)&&!e.has(i)&&i.visible&&(t.push(i),e.add(i))})),ne.debug("[DxfViewer] getRaycastableObjectsByMouse() from inside of viewport:",r.viewportId)):ne.debug("[DxfViewer] getRaycastableObjectsByMouse() from out of viewport"),this.groundPlane&&t.push(this.groundPlane)}return ne.debug(`[DxfViewer] getRaycastableObjectsByMouse() costs ${(Date.now()-r)/1e3} s`),t}getIntersections(e){this.raycaster&&this.raycaster.layers.enable(10);let t=this.getRaycastableObjectsByMouse(e);return this.raycaster&&this.raycaster.intersectObjects(t,!0)||[]}handleMouseClick(e){var t;if(!this.enableSelection||this.measurementManager&&this.measurementManager.isMeasurementActive()||this.markupManager&&this.markupManager.isMarkupActive())return;let i=this.getIntersections(e);if(i.length>0){let e=e=>_t.vectorToString(e);ne.debug(`[DxfViewer] Clicked at: ${e(i[0].point)}`)}let r=i.find((e=>{let t=e.object;return t.visible&&!1!==t.userData.selectable})),n=r&&r.object||void 0;if(i.length>0&&i[0].point){let e=null==(t=this.overlayRender)?void 0:t.getDrawablesByPosition(i[0].point,this.raycaster);if(e&&e.length>0)return this.clearSelection(),e[0].selected=!0,void(this.selectedObject=e[0])}this.selectedObject&&this.clearSelection(),n&&this.selectedObject&&this.selectedObject.id===n.id&&(n=void 0),n?this.selectObject(n):this.clearSelection()}selectObject(e,t){if(!this.enableSelection)return;let i=e=>{if(e.children.length>0&&e.children.forEach((e=>i(e))),e instanceof rt||e instanceof Ir){let i=Cs.clonedHighlightMaterials(e,{depthTest:t});i&&(e.userData.originalMaterial=e.material,e.material=i)}},r=e=>{if(e.children.length>0&&e.children.forEach((e=>r(e))),(e instanceof rt||e instanceof Ir)&&e.userData.originalMaterial){let t=e.material;e.material=e.userData.originalMaterial,delete e.userData.originalMaterial,Array.isArray(t)?t.forEach((e=>e.dispose())):t instanceof zr&&t.dispose()}};this.selectedObject&&(r(this.selectedObject),this.selectedObject=void 0),e&&(i(e),this.selectedObject=e,e.userData.dxfEntity?ne.info("[DxfViewer] Selected entity:",e.userData.dxfEntity):ne.info("[DxfViewer] Selected object:",e)),this.enableRender()}clearSelection(){this.selectedObject&&this.selectedObject instanceof Aa?this.selectedObject.selected=!1:this.selectObject(),this.selectedObject=void 0}flyToObjects(e){if(!e||0===e.length||!this.camera)return;let t=new Dt;e.forEach((e=>{let i=Tn.getBoundingBox(e);i.isEmpty()||t.union(i)})),this.zoomToBBox(t)}flyToObject(e){this.flyToObjects([e])}flyToSelectedObject(){if(!this.selectedObject)return;let e=this.selectedObject;(e instanceof rn&&e.userData.clonedMesh||e instanceof rt&&qi.isMergedMesh(e)&&e.userData.clonedMesh)&&(e=e.userData.clonedMesh),this.flyToObject(e)}flyToRandomObject(){var e;let t=this.scene,i=[];for(let t of Object.values(this.loadedModels)){let r=null==(e=t.dxfData)?void 0:e.threejsObject;r&&i.push(r.id)}let r=i.length;if(r<=0)return;let n=i[Math.floor(Math.random()*r)];if(!t.getObjectByProperty("id",n.toString()))return;let s=[];if(t.traverseVisible((e=>{(e instanceof rt||e instanceof Ir)&&!["SKYBOX","GROUND_GRID","GRASS_GROUND","BIM_VIEWER_BOX_HELPER"].includes(e.name)&&s.push(e.id)})),s.length<1)return;let a=Math.floor(Math.random()*s.length),o=t.getObjectById(s[a]);o&&(ne.info(`[DxfViewer] Flying to random object: ${o.name}, type: ${o.type}`),this.selectObject(o,void 0),this.flyToObject(o))}flyTo(e,t,i,r){let n=this.camera,s=this.controls;if(!n||!s)return;if(i&&(i=this.checkAndGetLimitedCameraZoom(i)),e.equals(t))return void ne.error("[DxfViewer] Camera position and lookAt cannot be the same!");if(!_t.isVectorValid(e)||!_t.isVectorValid(t))return void ne.error("[DxfViewer] Invalid position or lookAt!",e,t);let a=e.distanceTo(t);an.far&&(e=e.clone().sub(t).normalize().multiplyScalar(.9*n.far),ne.warn("[DxfViewer] Camera could be too far to see the object!"));let o=(e,t,i)=>{i&&Number.isFinite(i)&&s.zoomTo(i),s.setLookAt(e.x,e.y,e.z,t.x,t.y,t.z)};if(!1===r)return this.cameraUpdateInterval&&clearInterval(this.cameraUpdateInterval),void o(e,t,i);let l=n.position.clone(),h=s.getTarget(new A),u=n.zoom,c=300,p=Date.now();this.cameraUpdateInterval&&clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=setInterval((()=>{let r=Date.now()-p;r>c&&(r=c);let n,s=(e,t,i)=>{let r=e.x+(t.x-e.x)*i,n=e.y+(t.y-e.y)*i,s=e.z+(t.z-e.z)*i;return new A(r,n,s)},a=s(l,e,r/c),d=s(h,t,r/c);i&&(n=u+(i-u)*r/c),o(a,d,n),r>=c&&(clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=void 0)}),10)}goTo(e,t,i){let r=this.camera,n=this.controls;if(!r||!n)return;let s=new A(e.x,e.y,r.position.z),a=n.getTarget(new A),o=new A(e.x,e.y,a.z);this.flyTo(s,o,t,i)}goToHomeView(){let e=this.getActiveLayoutInfo();e.bbox?this.zoomToBBox(e.bbox):ne.error(`[DxfViewer] Failed to find extent for ${this.activeLayoutName}`)}zoomToBBox(e){let t=this.camera;if(!t)return;let i=e.max.x-e.min.x,r=e.max.y-e.min.y,n=t.right-t.left,s=t.top-t.bottom,a=Math.min(n/i,s/r);a/=1.1;let o=new A;e.getCenter(o),o.z=0;let l=o.clone().setZ(this.CAMERA_Z_POSITION);l.equals(o)||this.flyTo(l,o,a,!1)}zoomToCompareChange(e){if(this.changes){let t=this.changes[e];if(!t)return;let i=t.box;i&&this.zoomToBBox(i.clone().expandByScalar(1.2))}}getCompareChanges(){return this.changes}setBackgroundColor(e,t,i){this.scene&&(this.scene.background=new je(e,t,i),this.enableRender())}setSpinnerVisibility(e){this.spinner&&(e?this.spinner.classList.remove("hidden"):this.spinner.classList.add("hidden"))}increaseJobCount(){this.setSpinnerVisibility(++this.jobCount>0)}decreaseJobCount(){this.setSpinnerVisibility(--this.jobCount>0)}getLayoutInfo(e){return this.layoutInfos[e]||(this.layoutInfos[e]={measurementDataArray:[],markupDataArray:[]}),this.layoutInfos[e]}updateGroundPlane(){if(!this.scene)return;let e=this.getActiveLayoutInfo();if(!e.bbox)return;let t=e.bbox.clone();_t.expandBoxByScale(t,3);let i=t.min,r=t.max,n=r.x-i.x+r.y-i.y+r.z-i.z;_t.expandBoxByMinSize(t,n);let s=[],a=(e,t,i)=>{s.push(new A(e,t,i))},o=t.getSize(new A),l=t.getCenter(new A);if(a(-o.x/2,-o.y/2,0),a(o.x/2,-o.y/2,0),a(o.x/2,o.y/2,0),a(-o.x/2,o.y/2,0),this.groundPlane)this.groundPlane.geometry.setFromPoints(s),this.groundPlane.geometry.computeBoundingSphere(),this.groundPlane.geometry.computeBoundingBox(),this.groundPlane.geometry.computeVertexNormals();else{let e=new lt;e.setFromPoints(s),e.setIndex([0,3,2,0,2,1]),e.computeVertexNormals();let t=new or({color:"#888",transparent:!0,opacity:0,side:gi});this.groundPlane=new rt(e,t),this.groundPlane.frustumCulled=!1,this.groundPlane.position.copy(l),this.groundPlane.scale.set(1e5,1e5,1),this.groundPlane.name="groundPlane",this.groundPlane.userData.selectable=!1,this.groundPlane.renderOrder=-1e3,this.scene.add(this.groundPlane)}this.groundPlane.updateMatrixWorld()}computeBoundingBox(){var e;let t=new Dt;for(let i of Object.values(this.loadedModels)){let r=null==(e=i.dxfData)?void 0:e.threejsObject;if(r){let e=Tn.getBoundingBox(r,!1);e.isEmpty()||t.union(e)}}return t.min.z=0,t.max.z=0,ne.info(`[BimViewer] computeBoundingBox(), BBox's max: ${t.max.toArray()}, min: ${t.min.toArray()}`),t}checkAndGetLimitedCameraZoom(e){if(!e)return 1;let t=e;return e{e.visible&&e.children.forEach((e=>{e.userData.boundingBox&&(DCe.intersectsBox(e.userData.boundingBox)?e.visible=!0:e.visible=!1)}))}))}ne.debug(`[DxfViewer] setVisibilityByCameraFrustum cost: ${(Date.now()-t)/1e3}s`)}getVisiblePixelSize(e){let t=6.5*_r.smoothstep(e,1e4,3e4)+.5;return ne.debug("[DxfViewer] visiblePixelSize:",t),t}setLayoutHidableObjectArray(e){let t=this.camera;if(!this.enableHideVisuallySmallObjects||!t)return;let i=Date.now(),r=e.name;this.sortedHidableObjects[r]||(this.sortedHidableObjects[r]=[]);let n=this.sortedHidableObjects[r],s=t.zoom;this.lastCameraZoom=s;let a=e=>{if(!this.isCompareMode()||!e.material)return!1;let t;return t=e.material instanceof Yt?e.material.uniforms.u_color.value:e.material.color,t.equals(new je(qn.ENTITY_COLOR_ADDED))||t.equals(new je(qn.ENTITY_COLOR_REMOVED))},o=1;e.traverse((e=>{if(this.isCompareMode()&&a(e)||!ei.isLeafObject(e))return;let t=e.geometry;t.boundingBox||t.computeBoundingBox();let i=t.boundingBox.clone();if(!i||!_t.isBoxValid(i))return;i.applyMatrix4(e.matrixWorld),i.getSize(ZG);let r=Math.max(ZG.x,ZG.y),s=o/r;s<1/0?n.push({visibleMinZoom:s,object:e}):e instanceof nn?n.push({visibleMinZoom:o,object:e}):ne.warn("[DxfViewer] The size of bbox is 0 ! ",e)})),o=this.getVisiblePixelSize(n.length);let l=0;n.forEach((e=>{let t=e.visibleMinZoom*o;e.visibleMinZoom=t,e.object.userData.visibleMinZoom=t,t>s&&(e.object.visible=!1,l++)})),n.sort(((e,t)=>e.visibleMinZoom-t.visibleMinZoom)),ne.debug(`[DxfViewer] setLayoutHidableObjectArray cost: ${(Date.now()-i)/1e3}s, ${l} objects changed to hidden`)}statObjects(e){let t=this.sortedHidableObjects[this.activeLayoutName],i=t.length,r={},n=0;t.forEach((t=>{let i=t.object;if(i.geometry&&i.material){n++;let i=(t=>{let i=0,r=t;for(;r&&(i++,r!==e);)r=r.parent;return i})(t.object);r[i]||(r[i]=0),r[i]++}}));let s=0;e.traverse((e=>{let t=e;t.geometry&&t.material&&s++})),ne.info(`[DxfViewer] hidableObjects count:${i}, real count:${n}, layout count: ${s}, level:`,r),ne.info("[DxfViewer] scene:",this.scene)}updateHidableObjectsVisibility(){let e=this.camera;if(!e)return;let t=Date.now(),i=e.zoom;if(Math.abs(i-this.lastCameraZoom)<1e-5||(this.updateRaycasterThreshold(),this.updateCameraZoomUniform(i),this.raycastableObjects=void 0,!this.sortedHidableObjects[this.activeLayoutName]))return;let r=this.sortedHidableObjects[this.activeLayoutName];if(0===r.length)return;let n=i>this.lastCameraZoom,s=Math.min(i,this.lastCameraZoom),a=Math.max(i,this.lastCameraZoom),o=[],l=0;for(let e=0;ea)break;r[e].object.visible=n,n&&o.push(r[e].object),l++}this.lastCameraZoom=i,ne.debug(`[DxfViewer] updateHidableObjectsVisibility cost: ${(Date.now()-t)/1e3}s, ${l}(out of ${r.length}) objects changed to ${n?"visible":"hidden"}`),this.groundPlane&&o.push(this.groundPlane),this.raycastableObjects=o}updateRaycasterThreshold(){let e=this.camera;if(!e||!this.raycaster)return;let t=12/e.zoom,i=this.raycaster.params;i.Line?i.Line.threshold=t:i.Line={threshold:t},i.Points?i.Points.threshold=t:i.Points={threshold:t}}updateCameraZoomUniform(e){Er.cameraZoomUniform.value=e}},G3=kn(ql(),1),TLt=(e=>(e[e.Browser=0]="Browser",e[e.Browserless=1]="Browserless",e[e.Headless=2]="Headless",e))(TLt||{}),OCe=class{constructor(e,t,i){if(this.scene=this.initScene(),this.selectedObject=void 0,this.loadedModels={},this.clock=new Al,this.viewerMode=0,this.raycaster=new Oc,this.savedMaterialsForOpacity=[],this.jobCount=0,this.bbox=new Dt,this.outlineMaterial=new vr({color:1118481}),this.outlineRoot=new ur,this.transparentObjectIds=[],this.applyOptionsAndAddToScene=(e,t,i)=>{if(ne.info(`[SimplifiedBimViewer] '${e}' is loaded, adding to scene...`),i.matrix&&16===i.matrix.length){let e=new Be;e.elements=i.matrix,t.applyMatrix4(e)}else{let e=i.position||[0,0,0],r=i.rotation||[0,0,0],n=i.scale||[1,1,1];t.position.set(e[0],e[1],e[2]),t.rotation.set(r[0]*Math.PI/180,r[1]*Math.PI/180,r[2]*Math.PI/180),t.scale.set(n[0],n[1],n[2])}this.addLoadedModelToScene(t,i)},this.getMeshes=e=>{let t=[];return e instanceof rt?t.push(e):e.traverseVisible((e=>{e instanceof rt&&t.push(e)})),t},this.containerOrCanvas=e,t&&(this.viewerMode=t),this.glContext=i,1===this.viewerMode&&(e instanceof HTMLDivElement||!i))throw new Error("[SimplifiedBimViewer] Parameters don't match Browserless viewerMode !");this.increaseJobCount(),this.init(),this.decreaseJobCount(),ne.info("[SimplifiedBimViewer] Initialized"),this.animate()}init(){this.initRenderer(),this.initCamera(),this.initControls(),this.initLights(),this.initPointerEvents(),this.scene.add(this.outlineRoot)}initScene(){let e=new Pn;return e.background=new je(7112861),e.matrixAutoUpdate=!0,e}isBrowserlessMode(){return 1===this.viewerMode}isBrowserMode(){return 0===this.viewerMode}initRenderer(){let e={antialias:!0,preserveDrawingBuffer:!0},t=this.isBrowserlessMode();t&&Object.assign(e,{canvas:this.containerOrCanvas,context:this.glContext});let i=new Ol(e);if(t){let e=this.containerOrCanvas.width,t=this.containerOrCanvas.height;ne.info(`[SimplifiedBimViewer] Render target size: ${e} x ${t}`),this.renderTarget=new Vr(e,t,{minFilter:oi,magFilter:Di,format:Us,type:Fu}),i.setRenderTarget(this.renderTarget)}else{let e=this.containerOrCanvas.clientWidth,t=this.containerOrCanvas.clientHeight;this.containerOrCanvas.append(i.domElement),i.setPixelRatio(window.devicePixelRatio),i.setSize(e,t)}i.outputEncoding=gr,i.toneMappingExposure=1,i.physicallyCorrectLights=!0,i.setClearColor(11119017,1),i.shadowMap.enabled=!0,i.shadowMap.type=By,this.renderer=i,t||(this.pmremGenerator=new xp(i),this.pmremGenerator.compileEquirectangularShader(),this.setEnvironmentFromDataArray())}initCamera(){if(!this.scene)return;let e=this.containerOrCanvas.clientWidth||this.containerOrCanvas.width||0,t=this.containerOrCanvas.clientHeight||this.containerOrCanvas.height||0,i=1;e&&t&&(i=e/t),this.camera=new Xr(68,i,.05,1e4),this.camera.position.set(10,10,10),this.camera.lookAt(0,0,0),this.scene.add(this.camera)}initControls(){if(!this.renderer)return;let e=this.camera;if(!e)return;let t=new $l(e,this.renderer.domElement);t.smoothTime=.5,t.enabled=!0,t.keyTruckSpeed=10,t.keys={left:"KeyD",up:"KeyE",right:"KeyA",bottom:"KeyQ"},t.update(0),this.controls=t,t.addEventListener("update",(()=>{!this.isBrowserMode()&&this.renderer&&this.renderer.render(this.scene,e)}))}initLights(){if(!this.scene)return;let e=16777215,t=new $s(e,.3);t.position.set(-2,2,4);let i=new Cl(3158064),r=new df(e,14540253,3);r.position.set(0,300,0),this.scene.add(t),this.scene.add(i),this.scene.add(r)}initPointerEvents(){if(!this.renderer||!this.camera||!this.controls)return;let e=!1,t=!1,i=-1,r=-1;this.renderer.domElement.addEventListener("pointerdown",(t=>{i=t.x,r=t.y,e=!1})),this.renderer.domElement.addEventListener("pointermove",(t=>{i>=0&&r>=0&&(Math.abs(t.x-i)>5||Math.abs(t.y-r)>5)&&(e=!0)})),this.renderer.domElement.addEventListener("pointerup",(()=>{t&&setTimeout((()=>{t=!1}),200),i=-1,r=-1})),this.renderer.domElement.addEventListener("dblclick",(i=>{t=!0,e||(this.handleMouseClick(i),this.flyToSelectedObject())}))}animate(){var e;this.isBrowserMode()&&requestAnimationFrame(this.animate.bind(this));let t=this.clock.getDelta();this.controls&&this.controls.update(t),this.scene&&this.camera&&(null==(e=this.renderer)||e.render(this.scene,this.camera))}destroy(){this.camera=void 0,this.scene&&this.scene.clear(),this.renderer&&(this.containerOrCanvas.removeChild(this.renderer.domElement),this.renderer.clear(),this.renderer.dispose(),this.renderer=void 0),this.controls&&(this.controls.dispose(),this.controls=void 0),this.renderTarget&&(this.renderTarget.dispose(),this.renderTarget=void 0),this.raycaster=void 0,this.selectedObject=void 0,this.savedMaterialsForOpacity=void 0,Object.keys(this.loadedModels).forEach((e=>{delete this.loadedModels[e]}))}loadLocalModel(e,t,i){return ht(this,null,(function*(){let r=yield(new $c).loadLocalModel(e,t.src,i);return r?(this.applyOptionsAndAddToScene(e,r,t),Promise.resolve()):Promise.reject()}))}loadModel(e,t){return ht(this,null,(function*(){this.increaseJobCount();let i=yield(new $c).loadModel(e.src,e.fileFormat,t);return i?(this.applyOptionsAndAddToScene(e.src,i,e),Promise.resolve()):Promise.reject()}))}parseGltf(e,t,i,r){this.increaseJobCount(),(new $c).parseGltf(e,t.src,(e=>{this.applyOptionsAndAddToScene(t.src,e,t),i&&i(e)}),(e=>{r&&r(e)}))}addLoadedModelToScene(e,t){if(!this.scene)return;e.updateMatrix(),this.scene.add(e);let i=new Hg(e);i.name="BIM_VIEWER_BOX_HELPER",i.visible=!1,i.material&&(i.material=void 0,i.layers.set(11));let r=t.modelId||t.src;if(this.loadedModels[r]){let e=1;for(;this.loadedModels[`${r}_${e}`];)e++;r=`${r}_${e}`,ne.warn(`[BimViewer] Model '${r}' is loaded more than once!`)}this.loadedModels[r]={id:e.id,bbox:i},this.computeBoundingBox();let n=Object.values(this.loadedModels).map((e=>e.id));(!n||n.length<=1)&&(this.tryAdjustCameraNearAndFar(),this.goToHomeView()),this.scene.add(i),t.edges&&ei.addOutlines(e),this.decreaseJobCount(),ne.info(`[SimplifiedBimViewer] Added '${t.src}' to scene`)}addOrRemoveObjectOpacity(e=!0,t=.3,i,r){if(this.savedMaterialsForOpacity||(this.savedMaterialsForOpacity=[]),!this.scene)return;let n=this.scene,s=[];Object.keys(this.loadedModels).forEach((a=>{let o=this.loadedModels[a];if(e){this.savedMaterialsForOpacity&&this.savedMaterialsForOpacity.length>0&&ei.revertObjectOpacityById(n,o.id,this.savedMaterialsForOpacity);let e=ei.setObjectOpacityById(n,o.id,t,i,r);s.push(...e)}else this.savedMaterialsForOpacity&&ei.revertObjectOpacityById(n,o.id,this.savedMaterialsForOpacity)})),this.savedMaterialsForOpacity=e?s:[]}hasTransparentObject(){return!!(this.savedMaterialsForOpacity&&this.savedMaterialsForOpacity.length>0)}getIntersections(e){if(!this.raycaster||!this.camera||!this.scene)return[];let t=new le;e&&(t=Ci.getScreenPointByEvent(e,this.containerOrCanvas));let i=Ci.screenPoint2NdcPoint(t,this.camera,this.containerOrCanvas);this.raycaster.setFromCamera(i,this.camera);let r=[];return Object.values(this.loadedModels).forEach((e=>{let t=this.scene&&this.scene.getObjectById(e.id);t&&t.visible&&r.push(t)})),this.raycaster.intersectObjects(r,!0)||[]}handleMouseClick(e){let t=this.getIntersections(e).find((e=>{let t=e.object;return t.visible&&(!1!==t.userData.selectable||t instanceof rt)})),i=t&&t.object||void 0;i&&this.selectedObject&&this.selectedObject.id===i.id&&(i=void 0),i?this.selectObject(i):this.clearSelection()}selectObject(e){if(this.selectedObject){let e=this.selectedObject.userData;if(e.originalMaterial){if(this.selectedObject.material){let e=this.selectedObject.material;Array.isArray(e)?e.forEach((e=>e.dispose())):e instanceof zr&&e.dispose()}this.selectedObject.material=e.originalMaterial,delete e.originalMaterial}this.selectedObject=void 0}if(!this.scene||!e)return;let t=Cs.clonedHighlightMaterials(e);t&&(this.selectedObject=e,this.selectedObject.userData.originalMaterial=this.selectedObject.material,this.selectedObject.material=t)}clearSelection(){this.selectObject()}flyToObjects(e){if(!e||0===e.length||!this.camera)return;let t=new A,i=new A,r=new Dt;e.forEach((e=>{let t=Tn.getBoundingBox(e);r.union(t)}));let n=new A;this.camera.getWorldDirection(n),xs.getCameraPositionByBboxAndDirection(r,t,i,this.camera.projectionMatrix,n),this.flyTo(t,i)}flyToObject(e){this.flyToObjects([e])}flyToSelectedObject(){this.selectedObject&&this.flyToObject(this.selectedObject)}flyTo(e,t,i){var r;let n=this.camera,s=this.controls;if(!n||!s)return;let a=e=Array.isArray(e)?new A(e[0],e[1],e[2]):e,o=t=Array.isArray(t)?new A(t[0],t[1],t[2]):t;ne.info("[SimplifiedBimViewer] flyTo: ",_t.vectorToString(a)),s.setPosition(a.x,a.y,a.z),s.setTarget(o.x,o.y,o.z),this.isBrowserMode()||null==(r=this.renderer)||r.render(this.scene,n),i&&i()}goToHomeView(){var e;let t=new A,i=new A,r=new A,n=new A;this.bbox.getSize(n),this.bbox.getCenter(r);let s=(n.x+n.y+n.z)/3*1.5,a=new A(r.x+s,r.y+s/1.5,r.z+s),o=r.clone().sub(a);xs.getCameraPositionByBboxAndDirection(this.bbox,t,i,null==(e=this.camera)?void 0:e.projectionMatrix,o),t.equals(i)||this.flyTo(t,i)}setEnvironmentFromDataArray(e){Nc.createEnvTextureFromDataArray(this.pmremGenerator,e).then((e=>{this.scene.environment=e,this.isBrowserMode()||this.animate()}))}tryAdjustCameraNearAndFar(){let e=this.camera;if(!this.scene||!e)return;let t=this.bbox,i=e.near,r=e.far,n=t.max.x-t.min.x,s=t.max.y-t.min.y,a=t.max.z-t.min.z,o=Math.max(n,s,a),l=o/5,h=5*o;if(i>l||r_t.numberToString(e);ne.info(`[SimplifiedBimViewer] BBox's longest side is: ${t(o)}`),i>l&&(ne.warn(`[SimplifiedBimViewer] camera.near(${t(i)}) shouldn't bigger than ${t(l)}, will change it!`),e.near=l),r0?void 0:this.transparentObjectIds,i=this.transparentObjectIds.length>0?this.transparentObjectIds:void 0,r=new or({color:16777215,transparent:!0,opacity:.1});Object.keys(this.loadedModels).forEach((e=>{let n=this.loadedModels[e];ei.applyMaterialToObjectById(this.scene,n.id,r,i,t)})),this.outlineRoot.clear();let n=[];if(e.forEach((e=>{let t=e.modelId,i=t?this.scene.getObjectById(this.loadedModels[t].id):this.scene;i||(ne.warn(`[BimViewer] The ModelId of ${t} has no corresponding model.`),i=this.scene),i.traverse((t=>{if((0,G3.includes)(e.id,(0,G3.get)(t.userData,"UniqueId"))){let e=this.getMeshes(t);n=n.concat(e)}}))})),n.length>0){n.forEach((e=>{var t;let i=ei.createOutline(e.geometry,e.matrix,this.outlineMaterial);null!=(t=e.parent)&&t.matrixWorld&&i.applyMatrix4(e.parent.matrixWorld),this.outlineRoot.add(i)}));let e=n.map((e=>e.id));Object.keys(this.loadedModels).forEach((t=>{let i=this.loadedModels[t];ei.revertAppliedMaterialToObjectById(this.scene,i.id,e)})),this.transparentObjectIds=e,this.flyToObjects(n)}else ne.warn(`[BimViewer] No object found with uniqueIds: ${e.map((e=>e.id))}`);this.isBrowserMode()||this.animate()}increaseJobCount(){++this.jobCount}decreaseJobCount(){--this.jobCount}computeBoundingBox(){let e=new Dt;return Object.values(this.loadedModels).forEach((t=>{if(t.bbox){t.bbox.geometry.computeBoundingBox();let i=t.bbox.geometry.boundingBox;i&&!i.isEmpty()&&e.union(i)}})),this.bbox=e,e}getContext(){var e;return null==(e=this.renderer)?void 0:e.getContext()}getCameraDirection(){var e;let t=new A;return null==(e=this.camera)||e.getWorldDirection(t),{x:t.x,y:t.y,z:t.z}}setFov(e){this.camera&&(this.camera.fov=e,this.camera.updateProjectionMatrix())}},PCe=kn(ql(),1),pm=class extends ur{constructor(e,t,i=10){super(),this.images=e,this.thumbnailImages=t,this.size=i,this.textureLoader=new bs,this.mesh=new rt}fadeIn(e=1e3){let t=this.getMaterials();if(!(Array.isArray(t)&&t.length>0))return void(this.visible=!0);t.forEach((e=>e.opacity=0));let i=1/(e/10);this.visible=!0,this.clearFading(),this.renderOrder+=1,this.fadingInInterval=setInterval((()=>{let e=1,r=this.getMaterials();this.materialEquals(t,r)||(t=r),t.length>0&&(e=Math.min(t[0].opacity+i,1),t.forEach((t=>t.opacity=e))),e>=1&&this.clearFading()}),10)}materialEquals(e,t){return PCe.default.isEqualWith(e,t,((e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))return e.id===t.id}))}fadeOut(e=1e3){let t=this.getMaterials(),i=1/(e/10),r=1/(e/10);this.clearFading(),this.scale.set(2,2,2),this.fadingOutInterval=setInterval((()=>{let e=this.scale.x+r;this.scale.set(e,e,e);let n=0;t.length>0&&(n=Math.max(t[0].opacity-i,0),t.forEach((e=>e.opacity=n))),(n<=0||e>=3)&&this.clearFading()}),10)}clearFading(){let e=this.getMaterials();this.fadingInInterval&&(clearInterval(this.fadingInInterval),this.fadingInInterval=void 0,this.visible=!0,e.forEach((e=>e.opacity=1)),this.renderOrder-=1),this.fadingOutInterval&&(clearInterval(this.fadingOutInterval),this.fadingOutInterval=void 0,this.visible=!1,e.forEach((e=>e.opacity=1)),this.scale.set(1,1,1))}getMaterials(){let e=this.thumbnailMesh;e||(e=this.mesh);let t=[];return Array.isArray(e.material)?t.push(...e.material):e.material&&t.push(e.material),t}create(){}createThumbnailMesh(e){return ht(this,null,(function*(){if(!this.thumbnailImages||6!=this.thumbnailImages.length)return;this.thumbnailMesh=new rt(new eo(e,e,e)),this.thumbnailMesh.geometry.scale(1,1,-1);let t=(yield this.loadTexturesAsync(this.thumbnailImages)).map((e=>new or({map:e,side:tn,transparent:!0})));this.thumbnailMesh&&(this.thumbnailMesh.material=t,this.add(this.thumbnailMesh))}))}loadTextures(e){return e.map((e=>this.textureLoader.load(e)))}loadTexturesAsync(e){return ht(this,null,(function*(){let t=e.map((e=>this.textureLoader.loadAsync(e)));return yield Promise.all(t)}))}destroyMesh(e){var t;this.remove(e),e.clear(),e.geometry.dispose(),Array.isArray(e.material)?e.material.forEach((e=>{var t;null==(t=e.map)||t.dispose(),e.dispose()})):(null==(t=e.material.map)||t.dispose(),e.material.dispose())}destroy(){this.clearFading(),this.images=[],this.mesh&&(this.mesh instanceof rt?this.destroyMesh(this.mesh):this.mesh.traverse((e=>{e instanceof rt&&this.destroyMesh(e)})),this.mesh=void 0)}},V3=class extends pm{constructor(e,t,i=200){if(super(e,t,i),6!==e.length)throw new Error(`[VRCube] Wrong number of images! Expected 6, got ${e.length}`)}create(){return ht(this,null,(function*(){yield this.createThumbnailMesh(this.size+.1),this.thumbnailMesh?this.createMesh():yield this.createMesh()}))}createMesh(){return ht(this,null,(function*(){let e=this.mesh;e.geometry=new eo(this.size,this.size,this.size),e.geometry.scale(1,1,-1);let t=(yield this.loadTexturesAsync(this.images)).map((e=>new or({map:e,side:tn,transparent:!0})));e.material=t,this.add(e),this.thumbnailMesh&&(this.destroyMesh(this.thumbnailMesh),this.thumbnailMesh=void 0,this.thumbnailImages=void 0)}))}},z3=class extends pm{constructor(e,t,i=200){if(super(e,t,i),24!==e.length)throw new Error(`[VRCube24Faces] Wrong number of images! Expected 24, got ${e.length}`);this.ratio=1,this.subPlaneWidth0=this.size*(this.ratio/(this.ratio+1)),this.subPlaneWidth1=this.size-this.subPlaneWidth0}create(){return ht(this,null,(function*(){yield this.createThumbnailMesh(this.size+.1),this.thumbnailMesh?this.createMesh():yield this.createMesh()}))}createMesh(){return ht(this,null,(function*(){var e;this.mesh=new ur,this.mesh.scale.set(1,1,-1);let t=(yield this.loadTexturesAsync(this.images)).map((e=>new or({map:e,side:zn,transparent:!0})));if(24!==t.length)throw new Error(`[VRCube24Faces] Wrong number of materials! Expected 24, got ${t.length}`);let i=this.createPlaneOfAFace(t.slice(0,4));i.rotateOnAxis(new A(0,1,0),-Math.PI/2),i.position.set(this.size/2,0,0);let r=this.createPlaneOfAFace(t.slice(4,8));r.rotateOnAxis(new A(0,1,0),Math.PI/2),r.position.set(-this.size/2,0,0);let n=this.createPlaneOfAFace(t.slice(8,12));n.rotateOnAxis(new A(1,0,0),-Math.PI/2),n.rotateOnAxis(new A(0,0,1),Math.PI),n.rotateOnAxis(new A(1,0,0),Math.PI),n.position.set(0,this.size/2,0);let s=this.createPlaneOfAFace(t.slice(12,16));s.rotateOnAxis(new A(1,0,0),Math.PI/2),s.rotateOnAxis(new A(0,0,1),Math.PI),s.rotateOnAxis(new A(1,0,0),Math.PI),s.position.set(0,-this.size/2,0);let a=this.createPlaneOfAFace(t.slice(16,20));a.rotateOnAxis(new A(0,1,0),Math.PI),a.position.set(0,0,this.size/2),this.createPlaneOfAFace(t.slice(20,24)).position.set(0,0,-this.size/2),this.add(this.mesh),this.thumbnailMesh&&(this.destroyMesh(this.thumbnailMesh),this.remove(this.thumbnailMesh),null==(e=this.thumbnailMesh)||e.clear(),this.thumbnailMesh=void 0)}))}createPlaneOfAFace(e){var t;let i=new ur,r=new ts(this.subPlaneWidth0,this.subPlaneWidth0),n=new ts(this.subPlaneWidth1,this.subPlaneWidth0),s=new ts(this.subPlaneWidth0,this.subPlaneWidth1),a=new ts(this.subPlaneWidth1,this.subPlaneWidth1),o=new rt(r,e[0]),l=new rt(n,e[1]),h=new rt(s,e[2]),u=new rt(a,e[3]);return o.position.set(this.subPlaneWidth1/2,this.subPlaneWidth1/2,0),l.position.set(-this.subPlaneWidth0/2,this.subPlaneWidth1/2,0),h.position.set(this.subPlaneWidth1/2,-this.subPlaneWidth0/2,0),u.position.set(-this.subPlaneWidth0/2,-this.subPlaneWidth0/2,0),o.geometry.scale(-1,1,1),l.geometry.scale(-1,1,1),h.geometry.scale(-1,1,1),u.geometry.scale(-1,1,1),i.add(o,l,h,u),null==(t=this.mesh)||t.add(i),i}},j3=class extends pm{constructor(e,t,i=100){if(super(e,t,i),1!==e.length)throw new Error(`[VRSphere] Wrong number of images! Expected 1, got ${e.length}`)}create(){return ht(this,null,(function*(){yield this.createThumbnailMesh(this.size+.1),this.thumbnailMesh?this.createMesh():yield this.createMesh()}))}createMesh(){return ht(this,null,(function*(){var e;let t=this.mesh;t.geometry=new ro(this.size,100,100),t.geometry.scale(-1,1,1);let i=(yield this.loadTexturesAsync(this.images)).map((e=>new or({map:e,side:tn,transparent:!0})));t.material=i[0],this.add(t),this.thumbnailMesh&&(this.destroyMesh(this.thumbnailMesh),this.remove(this.thumbnailMesh),null==(e=this.thumbnailMesh)||e.clear(),this.thumbnailMesh=void 0)}))}},NCe=class extends tm{constructor(e,t){super(e),this.name="BaseViewer",this.minFov=50,this.maxFov=95,this.raycaster=new Oc,this.autoRotate=!0,this.events=[],this.lastFrameExecuteTime=Date.now(),this.maxFps=60,this.isMousePressing=!1,this.settings=cT,this.jobCount=0,this.viewpoints=[],this.previousViewpointId="",this.previousPanoramaId="",this.activeViewpointId="",this.activePanoramaId="",this.viewpointAssetsMap=new Map,this.loadingPanos=[],this.onResize=()=>{var e;let t=null==(e=this.renderer)?void 0:e.domElement;t&&t.parentElement&&this.resize(t.parentElement.clientWidth,t.parentElement.clientHeight)},this.onMouseWheel=e=>{let t=e.wheelDelta>0?-5:5;this.updateFov(t)},this.viewerCfg=e,this.cameraCfg=t||{eye:[0,0,0],look:[0,0,0]},this.settings=cT,this.cameraCfg.near&&(this.settings.camera.near=this.cameraCfg.near),this.cameraCfg.far&&(this.settings.camera.far=this.cameraCfg.far),this.setSpinnerVisibility(++this.jobCount>0),this.init(),this.animate(),this.setSpinnerVisibility(--this.jobCount>0)}init(){let e=this.viewerCfg;this.initSpinner(),this.initScene(),this.initRenderer(),this.initCamera(),this.initControls(),this.initLights(),this.initEvents(),this.initOthers(),!0===e.enableAxisGizmo&&(this.axes=this.initAxes()),e.enableToolbar&&(this.toolbar=this.initToolbar()),e.enableBottomBar&&(this.bottomBar=this.initBottomBar())}initScene(){let e=new Pn;e.background=new je(16777215),e.matrixAutoUpdate=!0,this.scene=e}initRenderer(){var e,t;this.renderer=new Ol({antialias:!1,preserveDrawingBuffer:!1}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),this.css2dRenderer=new _f,this.css2dRenderer.setSize(this.width,this.height),this.css2dRenderer.domElement.style.height="0",this.css2dRenderer.domElement.style.width="0",null==(e=this.viewerContainer)||e.appendChild(this.renderer.domElement),null==(t=this.viewerContainer)||t.appendChild(this.css2dRenderer.domElement)}initCamera(){this.scene&&(this.camera=new Xr(75,this.width/this.height,this.settings.camera.near,this.settings.camera.far),this.scene.add(this.camera))}initControls(){if(!this.renderer||!this.camera)return;let e=this.camera,t=this.viewerCfg,i=new EO(e,this.renderer.domElement,!0);i.enabled=!0,i.autoRotate=this.autoRotate,i.autoRotateSpeed=t.autoRotateSpeed||-2,i.enablePan=!1,i.enableZoom=!1,i.enableRotate=!0,i.rotateSpeed=.3,i.minPolarAngle=.05*Math.PI,i.maxPolarAngle=.95*Math.PI,i.listenToKeyEvents(document.body),i.update(),this.controls=i,this.controlsHelper=new rA(e,i),this.controls.controlsHelper=this.controlsHelper,this.autoRotate&&this.controlsHelper.delayAutoRotate(),this.controlsHelper.automaticallyAdjustCameraPosition=!1,this.controls.addEventListener("end",(()=>{this.handleDragEnd&&this.handleDragEnd()}));let r=new A(0,0,0),n=new A(10,0,0);this.setCameraPositionAndDirection(r,n)}onKeyDown(e){return t=>{var i,r;let n=e.camera,s=e.controls;!n||!s||(("ArrowLeft"===t.code||"ArrowRight"===t.code||"ArrowUp"===t.code||"ArrowDown"===t.code)&&(null==(i=this.controlsHelper)||i.startToRotate(t)),null==(r=this.controlsHelper)||r.delayAutoRotate())}}initLights(){if(!this.scene)return;let e=new $s(16777215,.3);e.position.set(-2,2,4),this.scene.add(e)}initEvents(){let e=this.renderer,t=this.camera;if(!e||!t)return;let i=!1,r=-1,n=-1;this.addEvent(window,"keydown",this.onKeyDown(this)),this.addEvent(window,"resize",this.onResize),this.addEvent(window,"mousewheel",this.onMouseWheel),this.addEvent(window,"pointerdown",(t=>{var s;r=t.x,n=t.y,i=!1,this.isMousePressing=!0,this.autoRotate&&(null==(s=this.controlsHelper)||s.delayAutoRotate()),t.button===rC.LEFT&&t.target instanceof HTMLCanvasElement&&(e.domElement.style.cursor="move")})),this.addEvent(window,"pointermove",(e=>{r>=0&&n>=0&&(Math.abs(e.x-r)>5||Math.abs(e.y-n)>5)&&(i=!0)})),this.addEvent(window,"pointerup",(r=>{var n,s;if(this.isMousePressing=!1,this.autoRotate&&(null==(n=this.controlsHelper)||n.delayAutoRotate()),e.domElement.style.cursor="auto",!i&&r.button===rC.LEFT)if(r.target&&r.target instanceof HTMLDivElement){let e=wf.tryFindObjectId(r.target);if(e){let t=null==(s=this.scene)?void 0:s.getObjectById(e);if(t){let e=t.userData.hotpoint;e&&(ne.info("[VRViewer] Clicked on hotpoint: ",e.hotpointId||e),this.onHotpointClicked&&this.onHotpointClicked(e))}}}else{let e=this.getIntersection(r);if(e){let i=e=>_t.vectorToString(e),r=e.point,n=r.clone().sub(t.position).normalize();ne.info(`[VRViewer] Clicked at: ${i(r)},\n Camera position: ${i(t.position)},\n Target direction: ${i(n)}`)}}}))}initSpinner(){var e;let t=document.createElement("div");t.classList.add("spinner");let i=document.createElement("div");i.classList.add(uo,"icon-loading"),t.append(i),null==(e=this.widgetContainer)||e.appendChild(t),this.spinner=t,this.setSpinnerVisibility(this.jobCount>0)}initOthers(){!this.controls||!this.renderer||!this.camera||(this.renderer.domElement.style.outlineWidth="0")}initAxes(){var e;let t=document.createElement("div");t.classList.add("axesRenderer");let i=new Sf(t,this.camera);return null==(e=this.widgetContainer)||e.append(t),i}initToolbar(){let e=this.viewerCfg;return new Eh(this,Br(Br({},RDe),e.toolbarMenuConfig),[["SceneClear"]])}initBottomBar(){return new om(this)}animate(){var e,t,i;if(requestAnimationFrame(this.animate.bind(this)),this.maxFps>0){let e=Date.now()-this.lastFrameExecuteTime;if(e<1e3/this.maxFps)return;if(this.lastFrameExecuteTime=Date.now(),this.autoRotate){let t=this.controlsHelper;t&&t.autoRotateRemainingTime>0&&!this.isMousePressing&&(t.autoRotateRemainingTime-=e,t.autoRotateRemainingTime<=0&&this.controls&&t.startAutoRotate())}}this.controls.update(),this.scene&&this.camera&&(null==(e=this.renderer)||e.render(this.scene,this.camera),null==(t=this.css2dRenderer)||t.render(this.scene,this.camera),null==(i=this.css3dRenderer)||i.render(this.scene,this.camera))}clearAllCachedPanoramas(){this.handleCameraUpdateInterval(),this.loadingPanos.forEach((e=>{e.creationPromise&&(e.creationPromise.cancel(),e.creationPromise=void 0)})),this.viewpointAssetsMap.forEach((e=>{var t;let i=e.panoramas;for(let e=i.length-1;e>=0;--e){let r=i[e];r.box.destroy(),null==(t=this.scene)||t.remove(r.box)}})),this.loadingPanos=[],this.viewpointAssetsMap.clear(),this.activePanoramaId="",this.activePanoramaId="",this.previousViewpointId="",this.previousPanoramaId=""}destroy(){var e,t,i,r;this.events.forEach((e=>e.node.removeEventListener(e.type,e.func))),this.events=[],this.clearAllCachedPanoramas(),this.css2dRenderer&&(null==(e=this.viewerContainer)||e.removeChild(this.css2dRenderer.domElement)),null==(t=this.spinner)||t.remove(),null==(i=this.axes)||i.dispose(),null==(r=this.toolbar)||r.destroy(),super.destroy()}updateFov(e){var t;let i=this.camera;if(!i)return;let r=this.minFov,n=this.maxFov,s=e=>{let t=i.fov+e;t=Math.min(t,n),t=Math.max(t,r),i.fov!==t&&(i.fov=t,i.updateProjectionMatrix())},a=e/20;for(let e=0;e<20;++e)setTimeout((()=>s(a)),5*e);this.autoRotate&&(null==(t=this.controlsHelper)||t.delayAutoRotate())}setMinAndMaxFov(e,t){let i=this.controls;i&&(this.minFov=e,this.maxFov=t,i.minFov=e,i.maxFov=t)}resize(e,t){var i,r,n;let s=this.camera;s&&(this.width=e||window.innerWidth,this.height=t||window.innerHeight,s.aspect=this.width/this.height,s.updateProjectionMatrix(),null==(i=this.renderer)||i.setSize(this.width,this.height),null==(r=this.css2dRenderer)||r.setSize(this.width,this.height),null==(n=this.css3dRenderer)||n.setSize(this.width,this.height))}enableAutoRotate(e){this.controls&&(this.autoRotate=e,this.controls.autoRotate=e)}setAutoRotateSpeed(e=1){this.controls&&(this.controls.autoRotateSpeed=e)}setCameraFov(e=75){let t=this.camera;t&&(t.fov=e,t.updateProjectionMatrix())}setSpinnerVisibility(e){this.spinner&&(e?this.spinner.classList.remove("hidden"):this.spinner.classList.add("hidden"))}addEvent(e,t,i){e.addEventListener(t,i),this.events.push({node:e,type:t,func:i})}setCameraPositionAndDirection(e,t,i){let r,n,s=this.camera,a=this.controls;if(!s||!a)return;r=t?Array.isArray(t)?new A(t[0],t[1],t[2]):new A(t.x,t.y,t.z):a.target.clone().sub(s.position),r.normalize(),n=Array.isArray(e)?new A(e[0],e[1],e[2]):new A(e.x,e.y,e.z);let o=n.clone().addScaledVector(r,.01);this.fianlCameraPosition=n,this.finalCameraTarget=o;let l=(e,t)=>{s.position.set(e.x,e.y,e.z),a.target.set(t.x,t.y,t.z),a.update()};if(!1===i)return this.cameraUpdateInterval&&clearInterval(this.cameraUpdateInterval),void l(n,o);let h=s.position.clone(),u=a.target.clone(),c=500,p=Date.now();this.cameraUpdateInterval&&clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=setInterval((()=>{let e=Date.now()-p;e>c&&(e=c);let t=(e,t,i)=>{let r=e.x+(t.x-e.x)*i,n=e.y+(t.y-e.y)*i,s=e.z+(t.z-e.z)*i;return new A(r,n,s)},i=t(h,n,e/c),r=t(u,o,e/c);l(i,r),e>=c&&(clearInterval(this.cameraUpdateInterval),this.cameraUpdateInterval=void 0)}),10)}getCameraPositionAndDirection(){let e=this.camera;if(!e)return;let t=e.position,i=new A;return e.getWorldDirection(i),{position:{x:t.x,y:t.y,z:t.z},direction:{x:i.x,y:i.y,z:i.z}}}getCameraFov(){let e=this.camera;if(e)return e.fov}setViewpoints(e){this.handleCameraUpdateInterval(),this.viewpointAssetsMap.size>0&&(this.viewpointAssetsMap.forEach((e=>{let t=e.panoramas,i=e.css2dObjects;t.forEach((e=>{var t;e.box.destroy(),null==(t=this.scene)||t.remove(e.box)})),i.forEach((e=>{var t;null==(t=this.scene)||t.remove(e)}))})),this.viewpointAssetsMap.clear()),this.loadingPanos.forEach((e=>{e.creationPromise&&(e.creationPromise.cancel(),e.creationPromise=void 0)})),this.loadingPanos=[],this.previousViewpointId="",this.previousPanoramaId="",this.activeViewpointId="",this.activePanoramaId="",this.viewpoints=e}addPanorama(e,t){let i=this.viewpoints.find((t=>t.id===e));if(!i)throw new Error(`[VRViewer] Failed to find viewpoint by id '${e}'`);i.panoramas||(i.panoramas=[]),i.panoramas.push(t)}findPanorama(e,t){let i=this.viewpoints.find((t=>t.id===e));if(i&&i.panoramas)return i.panoramas.find((e=>e.id===t))}setHotpointsVisibility(e,t="",i=[]){if(!this.viewpoints)return;let r=t=>{var r;let n=this.viewpointAssetsMap.get(t.id),s=(null==n?void 0:n.css2dObjects)||[];null==(r=t.hotpoints)||r.forEach((r=>{if(i&&i.length>0){if(-1===i.findIndex((e=>e===r.hotpointId)))return;if(r.visible=e,this.activeViewpointId===t.id){let t=s.find((e=>e.userData.hotpoint.hotpointId===r.hotpointId));t&&(t.visible=e)}}else r.visible=e,this.activeViewpointId===t.id&&s.forEach((t=>t.visible=e))}))};if(t){let e=this.viewpoints.find((e=>e.id===t));e&&r(e)}else this.viewpoints.forEach((e=>r(e)))}addHotpoints(e){if(!this.activeViewpointId||!e)return;let t=this.viewpoints.find((e=>e.id===this.activeViewpointId)),i=this.viewpointAssetsMap.get(this.activeViewpointId);!t||!i||(t.hotpoints||(t.hotpoints=[]),e.forEach((e=>{var r,n;if(-1!==(null==(r=t.hotpoints)?void 0:r.findIndex((t=>t.hotpointId===e.hotpointId))))return void ne.warn(`[VRViewer] Duplicated hotpointId: ${e.hotpointId}`);let s=t.position||[0,0,0],a=e.anchorPosition,o=wf.createHotpoint(e.html),l=new A(a[0],a[1],a[2]),h=new A(s[0],s[1],s[2]);this.relocateAnchorIfTooCloseToCamera(o,l,h),o.visible=!1!==e.visible,o.userData.hotpoint=e,i.css2dObjects.push(o),null==(n=this.scene)||n.add(o),t.hotpoints.push(e)})))}removeHotpoints(e){if(!this.activeViewpointId||!e)return;let t=this.viewpoints.find((e=>e.id===this.activeViewpointId)),i=this.viewpointAssetsMap.get(this.activeViewpointId);!t||!i||e.forEach((e=>{var r,n;if(t.hotpoints)for(let i=t.hotpoints.length-1;i>=0;--i)e===t.hotpoints[i].hotpointId&&t.hotpoints.splice(i,1);for(let t=i.css2dObjects.length-1;t>=0;--t){let s=i.css2dObjects[t];e===(null==(r=s.userData.hotpoint)?void 0:r.hotpointId)&&(i.css2dObjects.splice(t,1),null==(n=this.scene)||n.remove(s))}}))}activeViewpointById(e,t,i,r){this.activatePanoramaById(e,"",!0,t,i,r)}activatePanoramaById(e,t,i=!0,r,n,s){if(e===this.activeViewpointId&&t===this.activePanoramaId)return;let a=this.viewpoints.find((t=>t.id===e));a&&this.activatePanorama(a,t,i,r,n,s)}removeCachedPanoramas(){this.viewpointAssetsMap.forEach(((e,t)=>{var i;let r=e.panoramas;for(let e=r.length-1;e>=0;--e){let n=r[e];if(t===this.activeViewpointId&&n.id===this.activePanoramaId||t===this.previousViewpointId&&n.id===this.previousPanoramaId)return;n.box.destroy(),null==(i=this.scene)||i.remove(n.box),r.splice(e,1)}}))}unlimitControlsAndShowAssets(e=!1){if(this.controls){let e=this.controls;e.enablePan=!0,e.enableZoom=!0}this.viewpointAssetsMap.forEach((t=>{t.panoramas.forEach((e=>{e.box.visible=!0})),e&&t.css2dObjects.forEach((e=>{e.visible=!0}))}))}relocateAnchorIfTooCloseToCamera(e,t,i){let r=this.camera;if(!r)return ne.error("[VRViewer] Camera is not initialized"),void e.position.set(t.x,t.y,t.z);let n,s=Math.abs(t.distanceTo(i));if(s{let r=e.panoramas.find((e=>e.id===t)),n=null==r?void 0:r.box;n&&(i?this.fadeIn(n):this.fadeOut(n))},u=(e,t)=>{e.css2dObjects.forEach((e=>{t?!1!==e.userData.hotpoint.visible&&(e.visible=t):e.visible=t}))},c=()=>{var t;let n=new A(0,0,0),s=new A(1,0,0),a=null==(t=this.getCameraPositionAndDirection())?void 0:t.direction;a&&s.set(a.x,a.y,a.z);let o=e.position;if(o&&3===o.length&&n.set(o[0],o[1],o[2]),i){let t=e.initialDirection;t&&3===t.length&&s.set(t[0],t[1],t[2])}this.setCameraPositionAndDirection(n,s,r)};!t&&(null==(a=e.panoramas)?void 0:a.length)>0&&(t=e.panoramas[0].id||""),this.handleCameraUpdateInterval();let p=this.viewpointAssetsMap.get(this.activeViewpointId),d=this.viewpointAssetsMap.get(e.id);if(this.activeViewpointId&&p&&(this.activeViewpointId!==e.id&&u(p,!1),h(p,this.activePanoramaId,!1)),d&&d.panoramas.find((e=>e.id===t)))return h(d,t,!0),this.activeViewpointId!==e.id&&u(d,!0),this.activeViewpointId!==e.id&&c(),this.activeViewpointId=e.id,this.activePanoramaId=t,void(n&&n(e));this.previousViewpointId=this.activeViewpointId,this.previousPanoramaId=this.activePanoramaId,this.activeViewpointId=e.id,this.activePanoramaId=t;try{if(this.loadingPanos.some((i=>i.viewpointId===e.id&&i.panoramaId===t)))return void ne.warn(`[VRViewer] Panorama with viewpointId=${e.id} and panoramaId=${t} is being created`);let i=new OC(this.createBoxByImageOrImages(e,t));this.loadingPanos.push({viewpointId:e.id,panoramaId:t,creationPromise:i});let r=yield i.promise;this.loadingPanos=this.loadingPanos.filter((i=>i.viewpointId!==e.id||i.panoramaId!==t));let s=e.position;s&&3===s.length&&r.position.set(s[0],s[1],s[2]),this.activeViewpointId===e.id&&this.activePanoramaId===t?(this.fadeIn(r),null==(o=this.scene)||o.add(r),c()):(r.visible=!1,null==(l=this.scene)||l.add(r));let a={id:t,box:r},h=this.viewpointAssetsMap.get(e.id);if(h)h.panoramas.push(a),u(h,!0);else{let i=[];e.hotpoints&&e.hotpoints.forEach((n=>{let s=n.anchorPosition,a=wf.createHotpoint(n.html);a.visible=!1!==n.visible,a.userData.hotpoint=n;let o=new A(s[0],s[1],s[2]);this.relocateAnchorIfTooCloseToCamera(a,o,r.position),(this.activeViewpointId!==e.id||this.activePanoramaId!==t)&&(a.visible=!1),i.push(a)}));let n={panoramas:[a],css2dObjects:i};this.viewpointAssetsMap.set(e.id,n),i.forEach((e=>{var t;return null==(t=this.scene)?void 0:t.add(e)}))}n&&n(e)}catch(e){"cancel"!==e.type&&s&&s(e)}}))}createBoxByImageOrImages(e,t){var i;let r=e.imageOrImages,n=e.thumbnailImages;if((null==(i=e.panoramas)?void 0:i.length)>0){let i=this.findPanorama(e.id,t);i||(i=e.panoramas[0],ne.warn(`[VRViewer] Failed to find panorama by id '${t}', will use the first one`)),r=i.images,n=i.thumbnails}if(!r)throw new Error("[VRViewer] Invalid images!");if(Array.isArray(r)||(r=[r]),1===r.length)return this.createBoxByImage(r,n);if(6===r.length)return this.createBoxBy6Images(r,n);if(24===r.length)return this.createBoxBy24Images(r,n);throw new Error(`[VRViewer] Wrong number of images! Expected 1/6/24, got ${r.length}`)}createBoxByImage(e,t){return ht(this,null,(function*(){let i=new j3(e,t);return yield i.create(),i}))}createBoxBy6Images(e,t){return ht(this,null,(function*(){if(6!==e.length)throw new Error(`[VRCube] Wrong number of images! Expected 6, got ${e.length}`);let i=new V3(e,t);return yield i.create(),i}))}createBoxBy24Images(e,t){return ht(this,null,(function*(){if(24!==e.length)throw new Error(`[VRCube] Wrong number of images! Expected 24, got ${e.length}`);let i=new z3(e,t);return yield i.create(),i}))}getIntersection(e){if(!this.camera||!this.scene)return;let t=this.viewpointAssetsMap.get(this.activeViewpointId);if(!t)return;let i=t.panoramas.find((e=>e.id===this.activePanoramaId));if(!i)return;let r=i.box,n=this.viewerContainer,s=new le;e&&(s=Ci.getScreenPointByEvent(e,n));let a=Ci.screenPoint2NdcPoint(s,this.camera,n);this.raycaster.setFromCamera(a,this.camera);let o=[r],l=this.raycaster.intersectObjects(o,!0)||[];return l.length>0?l.find((e=>{let t=e.object;return t.visible&&t instanceof rt})):void 0}fadeIn(e,t=500){e.fadeIn(t)}fadeOut(e,t=1e3){e.fadeOut(t)}handleCameraUpdateInterval(){if(this.cameraUpdateInterval){clearInterval(this.cameraUpdateInterval);let e=this.fianlCameraPosition,t=this.finalCameraTarget;if(e&&t&&this.controls&&this.camera){this.camera.position.set(e.x,e.y,e.z);let i=this.controls;i.target.set(t.x,t.y,t.z),i.update()}this.cameraUpdateInterval=void 0}this.fianlCameraPosition=void 0,this.finalCameraTarget=void 0}getHitResult(e){let t={location:null};if(!this.camera)return t;let i=this.getIntersection(e);return t.location=i?{x:i.point.x,y:i.point.y,z:i.point.z}:null,t}lookToPosition(e){var t;if(!this.camera)return;this.handleCameraUpdateInterval();let i=new A(e[0],e[1],e[2]).clone().sub(this.camera.position);null==(t=this.controlsHelper)||t.lookTo(i)}};export{Rqt as AXIS_SECTION_PLANE_CONTROL_ID,wqt as AXIS_SECTION_PLANE_ID,jO as AngleMeasurement,V8 as AnnotationTable,WO as AreaMeasurement,XB as ArrowMarkup,GO as AxisPlaneSection,SDe as AxisType,D8 as BYBLOCK,QA as BYLAYER,tu as BaseMeasurement,nm as BaseSection,ch as BaseTable,pm as BaseVRMesh,tm as BaseViewer,RCe as BimViewer,Af as BinaryReader,R0 as BitView,Jf as BoxSelectHelper,wf as CSS2DObjectUtils,$l as CameraControlsEx,OC as CancelablePromise,wr as CanvasRender,$B as CircleMarkup,kp as CloudLineMarkup,KB as CloudRectMarkup,_t as CommonUtils,P0 as CompareDrawable,rA as ControlsHelper,oT as CoordinateAxes,Sf as CoordinateAxesViewport,Ci as CoordinateConversionUtils,qO as CoordinateMeasurement,zx as CreateEdgesGeometryWorker,wDe as DEFAULT_BIMVIEWER_TOOLBAR_CONFIG,DDe as DEFAULT_BIM_VIEWER_CONFIG,MDe as DEFAULT_DXFVIEWER_TOOLBAR_CONFIG,hpe as DEFAULT_LABEL_FONT_SIZE,Jvt as DEFAULT_LINE_WIDTH,EDe as DEFAULT_MARKUP_TOOLBAR_CONFIG,uO as DEFAULT_SIZE,RDe as DEFAULT_VRVIEWER_TOOLBAR_CONFIG,Er as DXFLoader,wi as DeviceUtils,YO as DistanceMeasurement,ZB as DotMarkup,Aa as Drawable,Xu as DrawableList,L8 as DxfChangeType,qn as DxfCompare,yDe as DxfCompareMarkupManager,QT as DxfDataTable,I0 as DxfParser,mMe as DxfRenderOrder,CCe as DxfViewer,Sqt as ENTER_KEY,_qt as ESC_KEY,JB as EllipseMarkup,Ks as Event,Zx as Exploder,zg as ExportUtils,uh as FontDataTable,HC as FpsUtils,Mpe as GROUND_PLANE_RENDER_ORDER,TDe as GROUP_CONFIG,BC as GenerateMeshBvhWorker,kt as GeometryUtils,Js as GroundUtils,uo as ICON_FONT_CLASS,k_ as IUploader,ss as IndexedDbManager,M0 as InputManager,iA as InstantiateHelper,xqt as KEYDOWN_EVENT,Iqt as KEYUP_EVENT,C2t as Keys,oO as LinePatternShaders,$c as LoadingHelper,CDe as LocalDxfUploader,ADe as LocalImageUploader,$O as LocalModelUploader,AB as MOUSEDOWN_EVENT,Mf as MOUSEMOVE_EVENT,CB as MOUSEUP_EVENT,P_ as MarkupManager,BO as MarkupToolbar,Yo as MarkupType,Cs as MaterialUtils,sr as MathUtils,ru as MeasurementManager,Ql as MeasurementType,UO as MenuTypeEnums,qi as MergeUtils,tE as MeshBvhHelper,ZO as NavCube,JO as NavCubeViewport,E0 as NestCompareTypes,DO as OSnapHelper,N2t as OSnapType,XMe as ObjectPixelSizeHelper,ei as ObjectUtils,QO as ObjectsBoxSection,UC as Offset,OMe as Orientation,e3 as PickPlaneSection,Cf as PolygonUtils,QB as PolylineMarkup,dT as RafHelper,ek as RectMarkup,Cqt as SECTION_BOX_ID,Dqt as SECTION_PLANE_CONTROL_ID,Mqt as SECTION_PLANE_ID,OB as SECTION_PLANE_NAME,GMe as SHP,TO as SHPLoader,vO as SHPParser,eAr as SIMPLE_BIM_VIEWER_CONFIG,cpe as SNAP_ICON_COLOR,upe as SNAP_ICON_SIZE,D2t as STATE,epe as SVGObject,lT as SVGObjectUtils,tpe as SVGRenderer,Tn as SceneUtils,t3 as SectionManager,hT as SectionType,Yu as SectionUtils,yO as ShpThree,Yc as ShxFont,w0 as ShxFontLoader,S0 as ShxFontType,OCe as SimplifiedBimViewer,Jx as SimplifyUtils,qo as SkyboxUtils,rl as SnapDrawable,ppe as SnapType,tk as TextMarkup,Nc as TextureUtils,Eh as Toolbar,dG as ToolbarMenu,N_ as ToolbarMenuId,cE as UndoRedoHelper,k8 as Units,EO as VRControls,V3 as VRCube,z3 as VRCube24Faces,j3 as VRSphere,NCe as VRViewer,xs as Viewer3DUtils,Kg as ViewerEvent,TLt as ViewerMode,pE as ViewerName,z8 as ViewpointTable,YB as Views,U3 as WebCam,rk as XMarkup,dE as ZoomToRectHelper,B8 as bspline,AMe as checkIsNewVersion,Cpe as cn,MMe as createHatchPatternShaderMaterial,p2t as decodeDxfTextCharacterCodes,f2t as decodeDxfTextMbcsCharacterCodes,d2t as decodeDxfTextUnicodeCodePoints,Dpe as en,YYt as getLengthValueByUnit,Qx as getUnitStr,g2t as getVersionFromLocalStorage,qu as layerForNonSnapableObjects,Nn as layerForUnselectableObjects,ne as log,yn as matrixAutoUpdate,lO as parseDxfMTextContent,cO as parseDxfTextContent,H8 as round10,bqt as sceneAutoUpdate,LC as setIcon,lpe as setLogLevel,v2t as setVersionToLocalStorage,Wu as showPrecisionValue,ude as unitConversionByMeter,cTt as unitLabel,G8 as unitScaleConversion,DMe as unitScaleToMeter}; \ No newline at end of file